/* =============================================================
   IB Subject Explainer — iBOrbit brand styling
   Tokens mirror the iBOrbit design system (colors_and_type.css).
   All class names match app.js output; only the look changes.
   ============================================================= */
:root {
  /* Brand accent — NAVY is the structural voice (law: navy = voice) */
  --c-accent:         #1b2d61;
  --c-accent-2:       #243a72;
  --c-accent-hover:   #14204f;
  --c-accent-light:   #f1e7d2;   /* warm tan pill bg (eyebrow style) */
  --c-accent-border:  rgba(184, 138, 69, .30);
  --c-accent-glow:    0 18px 56px rgba(16, 27, 69, .18);

  /* Gold — proof / achievement / attention (law: gold = proof) */
  --c-gold:           #b88a45;
  --c-gold-bright:    #d6a23e;
  --c-gold-soft:      #f3e2b8;
  --c-gold-deep:      #8a641f;

  /* Pen purple — annotation only (law: purple = pen on paper) */
  --c-pen:            #5e4bb6;
  --c-indigo:         #4e49a6;

  /* Text — navy ink family */
  --c-text:           #1b2d61;
  --c-text-mid:       #393952;
  --c-text-body:      #4f5570;
  --c-text-muted:     #6e7390;

  /* Surfaces — warm cream paper world */
  --c-bg:             #faf5ed;
  --c-bg-soft:        #fdf7eb;
  --c-card:           #fffdf8;
  --c-border:         rgba(7, 21, 68, .10);
  --c-border-dark:    rgba(7, 21, 68, .16);

  /* Flags — THE STAR. Warm paper note with a gold attention marker. */
  --c-flag-bg:        #fff7e9;
  --c-flag-border:    rgba(184, 138, 69, .30);
  --c-flag-icon:      #b88a45;
  --c-flag-text:      #4a4326;

  /* Session note — gold caveat */
  --c-session-bg:     #fbf4e6;
  --c-session-border: rgba(184, 138, 69, .32);
  --c-session-text:   #6b5618;

  /* Level colours: SL neutral muted navy, HL strong navy */
  --c-sl:             #5b6079;
  --c-sl-bg:          #efece4;
  --c-hl:             #1b2d61;
  --c-hl-bg:          #e7e0cf;

  /* Type badge colours — warm + functional (no purple/blue) */
  --c-exam-bg:        #ece6da;
  --c-exam-text:      #41475c;
  --c-ia-bg:          #e8f0e4;
  --c-ia-text:        #3a6418;
  --c-ea-bg:          #f6ecd4;
  --c-ea-text:        #6b5618;
  --c-project-bg:     #e3ddcd;
  --c-project-text:   #1b2d61;

  /* Radii */
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Shadows — soft navy-tinted (paper above paper) */
  --shadow-sm: 0 1px 0 rgba(31, 24, 16, .02);
  --shadow-md: 0 18px 50px rgba(13, 18, 56, .07), 0 2px 8px rgba(13, 18, 56, .05), inset 0 1px 0 rgba(255, 255, 255, .9);

  --max-w: 760px;
  --font: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-script: 'Caveat', 'Segoe Script', cursive;
}

/* ========================= RESET ========================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  background-color: var(--c-bg);
  background-image:
    radial-gradient(125% 60% at 50% -8%, rgba(255, 250, 242, .9), rgba(255, 250, 242, 0) 55%),
    radial-gradient(circle at 88% 4%, rgba(78, 73, 166, .045), transparent 26%),
    radial-gradient(circle at 6% 100%, rgba(184, 138, 69, .10), transparent 34%),
    url("assets/paper.png");
  background-size: 100% 100%, 100% 100%, 100% 100%, 300px 300px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  background-attachment: scroll, scroll, scroll, fixed;
}

img, svg { display: block; max-width: 100%; }

button, input, select { font-family: inherit; font-size: inherit; }

/* Display headings → Fraunces (iBOrbit display serif) */
.site-title { font-family: var(--font-display) !important; font-weight: 600 !important; letter-spacing: -.02em !important; }
.subject-name, .cta-title, .result-card h2, .result-card h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.012em; }
/* "actually" emphasis stays navy ink; the scribble underline carries the pen-purple accent */
.site-title em { color: var(--c-text); }

/* ========================= UTILITIES ========================= */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ========================= LAYOUT ========================= */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 18px 72px;
}

/* ========================= HEADER ========================= */
.site-header {
  padding: 36px 18px 30px;
  background:
    radial-gradient(circle at 50% -40%, rgba(16, 27, 69, .06), transparent 55%);
  border-bottom: 1px solid var(--c-border);
}

.site-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Brand lockup */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-logo {
  height: 26px;
  width: auto;
}

.brand-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(16, 27, 69, .12);
  transform: translateY(1px);
}

.brand-name {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--c-text);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  background: var(--c-accent-light);
  color: var(--c-accent);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-title {
  font-size: clamp(1.6rem, 5.1vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--c-text);
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.site-title em {
  font-style: normal;
  color: var(--c-accent);
}

/* Hand-drawn scribble underline under "actually" */
.scribble {
  position: relative;
  display: inline-block;
}
.scribble::after {
  content: "";
  position: absolute;
  left: -1%; right: -3%;
  bottom: -0.13em;
  height: 0.36em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'><path d='M2 6 C 50 1, 130 9, 198 4' stroke='%235e4bb6' stroke-width='3.4' stroke-linecap='round' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  filter: drop-shadow(0 4px 6px rgba(94, 75, 182, .22));
  pointer-events: none;
}

.site-subtitle {
  margin-top: 16px;
  font-size: 1rem;
  color: var(--c-text-body);
  line-height: 1.55;
  letter-spacing: -0.01em;
  max-width: 56ch;
}

/* ========================= PICKER SECTION ========================= */
.picker-section {
  margin-bottom: 40px;
}

/* Settings bar */
.settings-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.settings-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--c-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.session-select {
  padding: 9px 12px;
  border: 1px solid var(--c-border-dark);
  border-radius: var(--r-sm);
  background: var(--c-card);
  color: var(--c-text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  appearance: auto;
  box-shadow: var(--shadow-sm);
}

.session-select:focus {
  outline: none;
  border-color: rgba(16, 27, 69, .5);
  box-shadow: 0 0 0 4px rgba(16, 27, 69, .1);
}

/* Search */
.search-wrap {
  margin-bottom: 12px;
}

.subject-search {
  width: 100%;
  padding: 15px 18px;
  font-size: 1rem;
  letter-spacing: -0.01em;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-card);
  color: var(--c-text);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: border-color 0.16s, box-shadow 0.16s;
}

.subject-search::placeholder { color: var(--c-text-muted); }

.subject-search:focus {
  outline: none;
  border-color: rgba(16, 27, 69, .5);
  box-shadow: 0 0 0 4px rgba(16, 27, 69, .1);
}

/* Subject list */
.subject-list {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.loading-msg,
.picker-empty {
  padding: 22px 16px;
  color: var(--c-text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.picker-group + .picker-group {
  border-top: 1px solid var(--c-border);
}

.picker-group-label {
  padding: 11px 16px 7px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  background: linear-gradient(180deg, var(--c-bg-soft), rgba(255, 255, 255, 0));
}

.picker-items {
  list-style: none;
}

.picker-items li + li {
  border-top: 1px solid rgba(26, 22, 12, .055);
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--c-text);
  transition: background 0.12s;
  min-height: 52px;
}

.picker-item:hover {
  background: var(--c-bg-soft);
}

.picker-item:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: -2px;
}

.picker-item--selected {
  background: var(--c-accent-light);
}

.picker-item__name {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.picker-item__badges {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.picker-item__check {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--c-accent);
  flex-shrink: 0;
}

/* Chips */
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  min-height: 20px;
}

.chips-hint {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  width: 100%;
  padding: 2px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  background: linear-gradient(180deg, #f3e9d4, #ecdfc4);
  color: var(--c-accent);
  padding: 0 8px 0 14px;
  border: 1px solid var(--c-accent-border);
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  box-shadow: 0 6px 16px rgba(16, 27, 69, .1);
}

.chip__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(16, 27, 69, .14);
  border: none;
  border-radius: 50%;
  color: var(--c-accent-hover);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.12s;
}

.chip__remove:hover { background: rgba(16, 27, 69, .26); }

.chip__remove:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
}

/* ========================= RESULTS ========================= */
.results-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ========================= RESULT CARD ========================= */
.result-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .88));
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 22px 18px;
  flex-wrap: wrap;
}

.card-title-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--c-text);
  line-height: 1.12;
  letter-spacing: -0.018em;
  order: 2;
}

.card-group {
  display: block;
  margin-bottom: 0;
  font-size: 0.6875rem;
  color: var(--c-accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  order: 1;
}

.subject-summary {
  padding: 0 22px 18px;
  font-size: 0.9375rem;
  color: var(--c-text-mid);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* ========================= LEVEL TOGGLE ========================= */
.level-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #f1f0ee;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
}

.level-toggle__btn {
  padding: 8px 14px;
  border: none;
  border-radius: var(--r-sm);
  background: none;
  color: var(--c-text-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}

.level-toggle__btn:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: -2px;
}

.level-toggle__btn--active {
  background: var(--c-card);
  color: var(--c-text);
  box-shadow: 0 4px 12px rgba(31, 24, 16, .1), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.level-only-badge {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--c-accent-light);
  color: var(--c-accent);
  border: 1px solid var(--c-accent-border);
  flex-shrink: 0;
}

/* ========================= COMPONENTS TABLE ========================= */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 22px;
  border-top: 1px solid var(--c-border);
}

.components-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.components-table thead tr {
  background: none;
}

.components-table th {
  padding: 12px 12px 9px;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--c-border);
}
.components-table th:first-child { padding-left: 0; }
.components-table th:last-child { padding-right: 0; }

.components-table td {
  padding: 13px 12px;
  vertical-align: top;
  border-bottom: 1px solid rgba(26, 22, 12, .055);
  color: var(--c-text-mid);
  line-height: 1.5;
}
.components-table td:first-child {
  padding-left: 0;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.components-table td:last-child { padding-right: 0; }

.components-table tbody tr:last-child td {
  border-bottom: none;
}

.component-note {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
}

.weight-cell {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--c-text);
}

/* ========================= TYPE BADGES ========================= */
.type-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  font-size: 0.6875rem;
  font-weight: 800;
  white-space: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
}

/* Keep the TYPE column from ballooning — let the badge sit in a tidy block */
.components-table th:nth-child(2),
.components-table td:nth-child(2) {
  width: 1%;
  max-width: 132px;
}

.type-badge--exam {
  background: var(--c-exam-bg);
  color: var(--c-exam-text);
}

.type-badge--ia {
  background: var(--c-ia-bg);
  color: var(--c-ia-text);
}

.type-badge--ea-coursework {
  background: var(--c-ea-bg);
  color: var(--c-ea-text);
}

.type-badge--project {
  background: var(--c-project-bg);
  color: var(--c-project-text);
}

/* ========================= LEVEL BADGES (picker) ========================= */
.level-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.level-badge--sl {
  background: var(--c-sl-bg);
  color: var(--c-sl);
}

.level-badge--hl {
  background: var(--c-hl-bg);
  color: var(--c-hl);
}

/* ========================= FLAGS SECTION — THE STAR ========================= */
.flags-section {
  margin: 18px 22px 22px;
  padding: 18px 20px 18px;
  background:
    radial-gradient(circle at 92% -20%, rgba(184, 138, 69, .10), transparent 46%),
    linear-gradient(180deg, #fffdf5, var(--c-flag-bg));
  border: 1px solid var(--c-flag-border);
  border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.flags-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-flag-icon);
  margin-bottom: 13px;
}
.flags-heading::before {
  content: "";
  width: 16px; height: 16px;
  flex: none;
  background-color: var(--c-flag-icon);
  -webkit-mask: center / contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 8h.01M11 12h1v4h1'/></svg>");
  mask: center / contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 8h.01M11 12h1v4h1'/></svg>");
}

.flags-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flags-list li {
  font-size: 0.9375rem;
  color: var(--c-flag-text);
  line-height: 1.5;
  letter-spacing: -0.005em;
  padding: 0 0 0 30px;
  position: relative;
}
.flags-list li + li {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(16, 27, 69, .12);
}

.flags-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c-card);
  border: 1px solid rgba(16, 27, 69, .22);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e4bb6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M18.4 5.6l-2.1 2.1M7.7 16.3l-2.1 2.1'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}
.flags-list li + li::before { top: 12px; }

/* when a session note follows the flags, collapse the flags' bottom gap */
.flags-section:not(:last-child) { margin-bottom: 0; }

.session-note {
  margin: 16px 22px 22px;
  padding: 13px 16px;
  font-size: 0.8375rem;
  color: var(--c-session-text);
  background: var(--c-session-bg);
  border: 1px solid var(--c-session-border);
  border-radius: var(--r-md);
  line-height: 1.5;
}
/* keep bottom padding when flags are absent and session note ends the card */
.result-card > .session-note:last-child { margin-bottom: 22px; }
.table-wrap + .session-note { margin-top: 18px; }

/* spacing for the table when it's the last block before card edge */
.table-wrap:last-child { margin-bottom: 6px; }

/* ========================= CTA FOOTER ========================= */
.cta-footer {
  max-width: var(--max-w);
  margin: 28px auto 0;
  width: calc(100% - 36px);
  padding: 30px 28px 32px;
  text-align: center;
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 50% 0%, rgba(16, 27, 69, .08), transparent 55%),
    linear-gradient(180deg, var(--c-card), var(--c-bg-soft));
  border: 1px solid var(--c-accent-border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cta-footer::before {
  content: "One more thing";
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.cta-text {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--c-text);
  max-width: 42ch;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  background: linear-gradient(180deg, var(--c-accent-2), var(--c-accent-hover));
  color: #fff;
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  border-radius: var(--r-md);
  text-decoration: none;
  box-shadow: var(--c-accent-glow), inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: transform 0.16s;
}

.cta-btn::after {
  content: "";
  width: 17px; height: 17px;
  background-color: #fff;
  -webkit-mask: center / contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m12 5 7 7-7 7'/></svg>");
  mask: center / contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m12 5 7 7-7 7'/></svg>");
}

.cta-btn:hover {
  transform: translateY(-2px);
}

.cta-btn:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
}

/* ========================= MOBILE TIGHTENING ========================= */
@media (max-width: 599px) {
  .type-badge {
    font-size: 0.625rem;
    padding: 3px 7px;
    letter-spacing: 0.02em;
  }
  .components-table th:nth-child(2),
  .components-table td:nth-child(2) {
    max-width: 96px;
  }
  .components-table th,
  .components-table td { padding-left: 9px; padding-right: 9px; }
}

/* ========================= TABLET+ ADJUSTMENTS ========================= */
@media (min-width: 600px) {
  .main { padding: 36px 24px 88px; }
  .site-header { padding: 44px 24px 38px; }
  .card-header { flex-wrap: nowrap; align-items: center; }
}

/* ========================= PRINT ========================= */
@media print {
  .picker-section,
  .cta-footer,
  .settings-bar { display: none !important; }

  body { background: #fff; }
  .site-header { border-bottom: 2px solid #000; background: none; }
  .result-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .flags-section {
    background: #fff7e9;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
