/* My Adrenal Life — Adrenal Insufficiency Toolkit
   Preserves public-theme brand tokens (navy, violet, sage, cream, ink). */

:root {
  --mal-navy: #273b61;
  --mal-purple: #6046a7;
  --mal-violet: #8b72cf;
  --mal-sage: #b7c982;
  --mal-cream: #f7f3ea;
  --mal-white: #ffffff;
  --mal-ink: #17233b;
  --mal-mist: #e6eaf2;
  --mal-soft: #eef2fa;
  --mal-measure: 42rem;
  --mal-site: 1120px;
  --mal-pad: clamp(1.15rem, 3vw, 1.75rem);
  --mal-radius: 1rem;
  --mal-shadow: 0 10px 28px rgba(23, 35, 59, 0.07);
  --mal-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mal-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.mal-toolkit {
  margin: 0;
  font-family: var(--mal-sans);
  color: var(--mal-ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(96, 70, 167, 0.08), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(183, 201, 130, 0.14), transparent 55%),
    linear-gradient(180deg, #fbf8f1 0%, var(--mal-cream) 38%, #f3efe6 100%);
  text-rendering: optimizeLegibility;
  line-height: 1.65;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 0.75rem;
  z-index: 100000;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--mal-white);
  color: var(--mal-ink);
  text-decoration: none;
  box-shadow: var(--mal-shadow);
}

.mal-emergency-bar {
  background: #3b1f57;
  color: #f7f3ea;
  font-size: 0.9rem;
  padding: 0.55rem var(--mal-pad);
  text-align: center;
}

.mal-emergency-bar a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mal-tk-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem var(--mal-pad);
  border-bottom: 1px solid rgba(39, 59, 97, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.mal-tk-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--mal-ink);
}

.mal-tk-brand__name {
  font-family: var(--mal-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mal-navy);
  line-height: 1.15;
}

.mal-tk-brand__sub {
  font-size: 0.82rem;
  color: var(--mal-purple);
  font-weight: 600;
}

.mal-tk-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}

.mal-tk-nav a {
  color: var(--mal-navy);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 650;
  padding: 0.35rem 0.15rem;
  border-bottom: 2px solid transparent;
}

.mal-tk-nav a[aria-current="page"],
.mal-tk-nav a:hover,
.mal-tk-nav a:focus-visible {
  border-bottom-color: var(--mal-purple);
  color: var(--mal-purple);
}

.mal-tk-shell {
  width: min(var(--mal-site), 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.75rem) var(--mal-pad) 3.5rem;
}

.mal-tk-hero {
  padding: clamp(1.5rem, 4vw, 2.75rem) 0 1.75rem;
  max-width: 46rem;
}

.mal-tk-hero h1 {
  font-family: var(--mal-serif);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--mal-navy);
  margin: 0 0 0.85rem;
}

.mal-tk-hero .lede {
  font-size: 1.08rem;
  max-width: 38rem;
  margin: 0 0 1.25rem;
  color: #2a3754;
}

.mal-guidance-checked {
  margin: 1.5rem 0 0.35rem;
  font-size: 0.88rem;
  color: #4a5670;
}

.mal-article > h1 {
  margin-bottom: 0.85rem;
}

.mal-tk-meta {
  /* Audience / publish dates stay in frontmatter only — never shown in page chrome. */
  display: none !important;
}

.mal-audience-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 2rem;
}

.mal-audience-nav a {
  display: block;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(39, 59, 97, 0.12);
  border-radius: 0.85rem;
  text-decoration: none;
  color: var(--mal-ink);
  font-weight: 650;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.mal-audience-nav a:hover,
.mal-audience-nav a:focus-visible {
  border-color: var(--mal-purple);
  transform: translateY(-1px);
}

.mal-audience-nav span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: #4a5670;
}

.mal-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

.mal-resource-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem 1.2rem 1.35rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(39, 59, 97, 0.1);
  border-radius: var(--mal-radius);
  box-shadow: var(--mal-shadow);
  text-decoration: none;
  color: inherit;
  min-height: 10.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mal-resource-card:hover,
.mal-resource-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(96, 70, 167, 0.35);
}

.mal-resource-card__kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mal-purple);
}

.mal-resource-card h2 {
  font-family: var(--mal-serif);
  font-size: 1.28rem;
  line-height: 1.25;
  margin: 0;
  color: var(--mal-navy);
}

.mal-resource-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #3a4660;
  flex: 1;
}

.mal-resource-card__cta {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--mal-purple);
}

.mal-progress {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.15rem;
  background: var(--mal-soft);
  border-radius: 0.85rem;
  border: 1px solid rgba(39, 59, 97, 0.08);
}

.mal-progress__bar {
  height: 0.55rem;
  background: rgba(39, 59, 97, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.55rem;
}

.mal-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mal-navy), var(--mal-purple));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.mal-article {
  max-width: var(--mal-measure);
}

.mal-article h1 {
  font-family: var(--mal-serif);
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--mal-navy);
  margin: 0 0 0.75rem;
}

.mal-article h2 {
  font-family: var(--mal-serif);
  font-size: 1.45rem;
  color: var(--mal-navy);
  margin: 2rem 0 0.7rem;
  line-height: 1.25;
}

.mal-article h3 {
  font-size: 1.12rem;
  color: var(--mal-navy);
  margin: 1.5rem 0 0.5rem;
}

.mal-article p,
.mal-article li {
  font-size: 1.02rem;
}

.mal-article ul,
.mal-article ol {
  padding-left: 1.2rem;
}

.mal-article a {
  color: var(--mal-purple);
  font-weight: 600;
}

.mal-article blockquote {
  margin: 1.25rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--mal-purple);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 0 0.6rem 0.6rem 0;
}

.mal-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0 1.5rem;
  background: rgba(255, 255, 255, 0.7);
}

.mal-article th,
.mal-article td {
  border: 1px solid rgba(39, 59, 97, 0.14);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.mal-article th {
  background: var(--mal-soft);
  color: var(--mal-navy);
}

.mal-crumbs {
  font-size: 0.86rem;
  margin: 0 0 1rem;
  color: #4a5670;
}

.mal-crumbs a {
  color: var(--mal-navy);
  text-decoration: none;
  font-weight: 600;
}

.mal-crumbs a:hover {
  color: var(--mal-purple);
}

.mal-disclaimer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(39, 59, 97, 0.12);
  font-size: 0.88rem;
  color: #4a5670;
  max-width: var(--mal-measure);
}

.mal-refs {
  margin-top: 2rem;
  font-size: 0.92rem;
}

.mal-refs a {
  word-break: break-word;
}

.mal-related {
  margin: 2.25rem 0 0;
  padding: 1.15rem 1.2rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--mal-radius);
  border: 1px solid rgba(39, 59, 97, 0.1);
  max-width: 40rem;
}

.mal-related h2 {
  font-family: var(--mal-serif);
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
  color: var(--mal-navy);
}

.mal-related ul {
  margin: 0;
  padding-left: 1.1rem;
}

.mal-quiz {
  margin: 1.5rem 0 2rem;
  padding: 1.15rem 1.2rem 1.35rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(39, 59, 97, 0.12);
  border-radius: var(--mal-radius);
}

.mal-quiz h2,
.mal-quiz h3 {
  margin-top: 0;
  font-family: var(--mal-serif);
  color: var(--mal-navy);
}

.mal-quiz__lede {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.mal-quiz fieldset {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}

.mal-quiz__q,
.mal-quiz legend.mal-quiz__q {
  margin: 1.1rem 0 0.35rem;
  padding: 0;
  font-weight: 700;
  font-size: 1rem;
}

.mal-quiz label {
  display: block;
  margin: 0.35rem 0;
  padding: 0.45rem 0.55rem;
  border-radius: 0.45rem;
  cursor: pointer;
}

.mal-quiz label:hover,
.mal-quiz label:focus-within {
  background: var(--mal-soft);
}

.mal-quiz input[type="radio"]:focus-visible {
  outline: 2px solid var(--mal-purple);
  outline-offset: 2px;
}

.mal-quiz__result {
  margin-top: 0.55rem;
  font-weight: 650;
  font-size: 0.92rem;
}

.mal-quiz__result.is-correct {
  color: #2f6b3a;
}

.mal-quiz__result.is-wrong {
  color: #8a2f3b;
}

.mal-quiz__summary {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--mal-soft);
  border-radius: 0.55rem;
  font-size: 0.95rem;
}

.mal-quiz__summary a {
  color: var(--mal-navy);
  font-weight: 700;
}

.mal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.65rem 1.15rem;
  border-radius: 0.65rem;
  border: 0;
  background: var(--mal-navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}

.mal-btn:hover,
.mal-btn:focus-visible {
  background: var(--mal-purple);
}

.mal-btn--ghost {
  background: transparent;
  color: var(--mal-navy);
  border: 1.5px solid rgba(39, 59, 97, 0.28);
}

.mal-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 0;
}

.mal-printable {
  background: #fff;
  color: #111;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem;
  font-family: var(--mal-sans);
}

.mal-printable h1 {
  font-family: var(--mal-serif);
  font-size: 1.55rem;
  margin: 0 0 0.5rem;
}

.mal-printable .blank {
  border-bottom: 1px solid #333;
  display: inline-block;
  min-width: 10rem;
  height: 1.1em;
}

.mal-printable label {
  display: block;
  font-weight: 650;
  font-size: 0.92rem;
  margin: 0.35rem 0 0;
}

.mal-printable textarea,
.mal-printable input[type="text"] {
  width: 100%;
  border: 1px solid #c5cbd8;
  border-radius: 0.4rem;
  padding: 0.45rem 0.55rem;
  font: inherit;
  margin: 0.25rem 0 0.55rem;
}

.mal-printable .note {
  font-size: 0.88rem;
  color: #444;
}

/* Shared form sections for intentional print pagination */
.mal-print-form {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mal-print-section {
  border: 1px solid rgba(39, 59, 97, 0.22);
  border-radius: 0.45rem;
  padding: 0.65rem 0.75rem 0.35rem;
  margin: 0.55rem 0 0;
  background: #fff;
}

.mal-print-section__title {
  margin: 0 0 0.35rem;
  font-family: var(--mal-serif);
  font-size: 1.05rem;
  color: var(--mal-navy);
}

.mal-print-section--continue {
  border-style: dashed;
}

.mal-printable .mal-disclaimer,
.mal-printable > .note:last-child {
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 0.75rem;
}

/* Collapsible answer keys (screen) + print-friendly (print) */
.mal-answer-key {
  margin: 0.85rem 0 1.25rem;
  border: 1px solid rgba(39, 59, 97, 0.2);
  border-radius: 0.5rem;
  padding: 0.35rem 0.75rem 0.55rem;
  background: rgba(255, 255, 255, 0.65);
}

.mal-answer-key > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--mal-navy);
  padding: 0.35rem 0;
}

.mal-answer-key__body {
  margin-top: 0.35rem;
}

.mal-answer-key__body > p {
  margin: 0.4rem 0;
}

/* Discreet Continue Learning (books / optional Companion) — never on emergency printables */
.mal-continue-learning {
  margin: 1.75rem 0 1.25rem;
  padding: 1rem 1.1rem;
  border-top: 1px solid rgba(39, 59, 97, 0.16);
  border-bottom: 1px solid rgba(39, 59, 97, 0.12);
  background: rgba(255, 255, 255, 0.45);
}

.mal-continue-learning__title {
  margin: 0 0 0.35rem;
  font-family: var(--mal-serif);
  font-size: 1.15rem;
  color: var(--mal-navy);
}

.mal-continue-learning__lede {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: #445066;
}

.mal-continue-learning__item {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: 0.85rem 1rem;
  align-items: start;
}

.mal-continue-learning__cover {
  width: 4.25rem;
  height: auto;
  border-radius: 0.25rem;
  box-shadow: 0 4px 12px rgba(23, 35, 59, 0.12);
  background: #fff;
}

.mal-continue-learning__name {
  margin: 0 0 0.3rem;
  font-weight: 700;
  color: var(--mal-navy);
  font-size: 1rem;
}

.mal-continue-learning__blurb {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.mal-continue-learning__actions {
  margin: 0;
  font-size: 0.9rem;
}

.mal-continue-learning__actions a {
  font-weight: 650;
}

.mal-continue-learning__extra {
  margin: 0.85rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(39, 59, 97, 0.18);
  font-size: 0.9rem;
}

.mal-continue-learning__extra strong {
  color: var(--mal-navy);
}

@media print {
  .mal-continue-learning {
    break-inside: avoid;
    page-break-inside: avoid;
    background: #fff;
  }
}

.mal-stage-banner {
  background: #fff4d6;
  color: #5a4300;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.4rem var(--mal-pad);
  border-bottom: 1px solid #e6d39a;
}

/* Wallet card — CR80 (3.375in × 2.125in); front/back identical outer box */
.mal-wallet-sheet {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5in;
  justify-content: center;
  align-items: flex-start;
  margin: 1.25rem 0;
}

.mal-wallet-card {
  width: 3.375in;
  height: 2.125in;
  box-sizing: border-box;
  padding: 0.08in 0.1in 0.06in;
  border: 1px dashed #333;
  background: #fff;
  color: #111;
  font-size: 7pt;
  line-height: 1.2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.035in;
  flex: 0 0 3.375in;
}

.mal-wallet-card__id {
  margin: 0;
  font-weight: 800;
  font-size: 7.6pt;
  letter-spacing: 0.015em;
  text-align: center;
  background: #3b1f57;
  color: #f7f3ea;
  padding: 0.05in 0.04in;
  line-height: 1.12;
  flex: 0 0 auto;
}

.mal-wallet-card__id--sm {
  font-size: 7pt;
}

.mal-wallet-card__alert {
  margin: 0;
  font-weight: 700;
  font-size: 6.2pt;
  line-height: 1.18;
  flex: 0 0 auto;
}

/* Higher specificity than .mal-printable label/input so CR80 stays compact */
.mal-printable .mal-wallet-fields {
  display: flex;
  flex-direction: column;
  gap: 0.03in;
  flex: 0 0 auto;
  min-height: 0;
}

.mal-printable .mal-wallet-field {
  display: grid;
  grid-template-columns: 0.92in minmax(0, 1fr);
  gap: 0.04in;
  align-items: center;
  margin: 0;
  font-weight: 650;
  font-size: 6.5pt;
  min-width: 0;
}

.mal-printable .mal-wallet-field--stack {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.02in;
}

.mal-printable .mal-wallet-field span {
  font-size: 6pt;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.mal-printable .mal-wallet-card input[type="text"],
.mal-printable .mal-wallet-card textarea {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.02in 0.04in;
  border: 1px solid #777;
  border-radius: 0;
  font: inherit;
  font-size: 6.5pt;
  line-height: 1.15;
  min-height: 0.18in;
  height: 0.2in;
  resize: none;
  overflow: hidden;
  background: #fff;
}

.mal-printable .mal-wallet-field--stack textarea,
.mal-printable .mal-wallet-card textarea {
  height: 0.34in;
}

.mal-printable .mal-wallet-plan {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0.42in;
  max-height: 0.62in;
  border: 1px solid #111;
  padding: 0.03in 0.04in;
  margin-top: 0.02in;
}

.mal-printable .mal-wallet-plan__title {
  margin: 0 0 0.02in;
  font-size: 5.8pt;
  font-weight: 800;
  line-height: 1.1;
  flex: 0 0 auto;
}

.mal-printable .mal-wallet-plan textarea {
  flex: 1 1 auto;
  border: 0;
  padding: 0;
  height: auto;
  min-height: 0.28in;
  margin: 0;
}

.mal-wallet-card__cut {
  margin: auto 0 0;
  padding-top: 0.02in;
  font-size: 5pt;
  color: #555;
  text-align: center;
  flex: 0 0 auto;
  line-height: 1.1;
}

.mal-einfo-sheet__banner {
  border: 2px solid #3b1f57;
  margin: 0 0 0.85rem;
}

.mal-einfo-sheet__id {
  margin: 0;
  background: #3b1f57;
  color: #f7f3ea;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 0.55rem 0.75rem;
}

.mal-einfo-sheet__alert {
  margin: 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  background: #f7f3ea;
}

.mal-einfo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.85rem;
}

.mal-einfo-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-weight: 650;
  font-size: 0.88rem;
}

.mal-einfo-grid label:nth-child(3),
.mal-einfo-grid label:nth-child(4),
.mal-einfo-grid label:nth-child(8) {
  grid-column: 1 / -1;
}

.mal-einfo-plan {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 2px solid var(--mal-navy);
}

.mal-einfo-plan h2 {
  margin: 0 0 0.35rem;
  font-family: var(--mal-serif);
  font-size: 1.15rem;
  color: var(--mal-navy);
}

.no-print {
  /* screen-only helper class; print rule below */
}

@media (max-width: 720px) {
  .mal-einfo-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0.45in;
  }

  .mal-emergency-bar,
  .mal-tk-header,
  .mal-stage-banner,
  .mal-progress,
  .mal-btn-row,
  .mal-tk-footer,
  .mal-crumbs,
  .skip-link,
  .no-print {
    display: none !important;
  }

  html,
  body.mal-toolkit {
    background: #fff !important;
    color: #000;
  }

  .mal-tk-shell,
  .mal-article,
  .mal-printable {
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  /* Prefer one intentional page; avoid orphan nearly-blank trailers */
  .mal-printable {
    font-size: 10pt;
    line-height: 1.32;
  }

  .mal-printable h1 {
    font-size: 14pt;
    margin: 0 0 0.2rem;
  }

  .mal-printable label {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-top: 0.12rem;
    font-size: 9.5pt;
  }

  .mal-printable textarea,
  .mal-printable input[type="text"] {
    border-color: #333;
    border-radius: 0;
    margin-bottom: 0.22rem;
    padding: 0.28rem 0.4rem;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .mal-printable textarea {
    min-height: 1.85rem;
  }

  .mal-print-section {
    break-inside: avoid;
    page-break-inside: avoid;
    border-radius: 0;
    margin-top: 0.28rem;
    padding: 0.28rem 0.4rem 0.12rem;
  }

  .mal-print-section__title {
    font-size: 11pt;
    margin-bottom: 0.2rem;
  }

  .mal-printable .note {
    font-size: 8.5pt;
    margin: 0.15rem 0 0.25rem;
  }

  .mal-printable .mal-disclaimer,
  .mal-printable > .note:last-of-type {
    break-inside: avoid;
    page-break-inside: avoid;
    font-size: 8pt;
    margin-top: 0.45rem;
  }

  .mal-wallet-page {
    padding: 0.25in 0;
  }

  .mal-wallet-sheet {
    gap: 0.35in 0.45in;
    break-inside: avoid;
    page-break-inside: avoid;
    justify-content: center;
  }

  .mal-wallet-card {
    border-style: dashed;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .mal-wallet-page .mal-disclaimer,
  .mal-wallet-page > .note {
    display: none !important;
  }

  .mal-einfo-sheet {
    padding: 0;
  }

  .mal-einfo-sheet .mal-einfo-sheet__banner {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .mal-einfo-sheet .mal-einfo-grid {
    gap: 0.35rem 0.65rem;
  }

  .mal-einfo-sheet .mal-einfo-plan {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-top: 0.65rem;
  }

  .mal-einfo-sheet .mal-disclaimer {
    font-size: 8pt;
    margin-top: 0.4rem;
  }

  .mal-einfo-sheet textarea {
    min-height: 3.4rem;
  }

  /* Answer keys: show body when printing; no raw tag chrome */
  .mal-answer-key {
    border: 1px solid #333;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
    background: #fff;
  }

  .mal-answer-key > summary {
    list-style: none;
    cursor: default;
    display: block;
    font-size: 11pt;
  }

  .mal-answer-key > summary::-webkit-details-marker {
    display: none;
  }

  .mal-answer-key:not([open]) > *:not(summary),
  .mal-answer-key > .mal-answer-key__body {
    display: block !important;
  }
}

@media (max-width: 720px) {
  .mal-tk-nav {
    width: 100%;
  }
}

/* Keep long reference URLs and school tables inside narrow viewports. */
.mal-article { min-width: 0; overflow-wrap: anywhere; }
.mal-article table { width: 100%; table-layout: fixed; }
.mal-article th, .mal-article td { overflow-wrap: anywhere; }
.skip-link:focus { width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
.mal-quiz__print-answer { display: none; }
@media print {
  .mal-quiz { padding: 0.35rem; margin: 0.5rem 0; box-shadow: none; }
  .mal-quiz fieldset { break-inside: avoid; page-break-inside: avoid; }
  .mal-quiz label { padding: 0.1rem 0.25rem; margin: 0; }
  .mal-quiz__print-answer { display: block; font-size: 9pt; margin: 0.2rem 0; }
  .mal-quiz__summary:empty, .mal-quiz__result:empty { display: none; }
  .mal-disclaimer { break-inside: avoid; }
}

@media screen and (max-width: 600px) {
  .mal-article table, .mal-article tbody { display: block; }
  .mal-article tr { display: block; margin-bottom: 1rem; border: 1px solid var(--mal-mist); border-radius: 0.5rem; }
  .mal-article tr:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mal-article td { display: block; width: auto; padding: 0.65rem 0.8rem; border: 0; overflow-wrap: break-word; }
  .mal-article td + td { border-top: 1px solid var(--mal-mist); }
  .mal-article td::before { content: attr(data-label); display: block; font-weight: 700; color: var(--mal-navy); font-size: 0.8rem; margin-bottom: 0.2rem; }
}
