/* ==========================================================================
   China Medical Guides — base.css
   Design tokens, reset, typography, layout primitives, buttons, badges, forms.
   Load order: base.css -> components.css -> pages.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------------------------
   One accent colour (--brand). Change these four values to re-theme the
   entire site. Everything else is neutral so the accent stays meaningful.
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --brand: #3268b9;
  --brand-dark: #2a5ba6;
  --brand-soft: rgba(50, 104, 185, 0.08);
  --brand-soft-strong: rgba(50, 104, 185, 0.14);
  --brand-ink: #1d3f70;

  /* Neutrals */
  --ink: #222222;
  --body: #2b2b2b;
  --lead: #4a4a45;
  --muted: #6b6b66;
  --faint: #8e8e88;
  --warm: #f7f7f4;
  --warm-deep: #efefe9;
  --white: #ffffff;
  --rule: #e5e5e0;
  --rule-strong: #d6d6cf;

  /* Semantic */
  --success: #2e7d5b;
  --success-soft: #e8f3ec;
  --warning: #c77a2a;
  --warning-soft: #fbf1e6;
  --danger: #b23a3a;
  --danger-soft: #f6e8e8;
  --highlight: #ffe574;

  /* Type */
  --font-sans: "Figtree", "Noto Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman",
    "Songti SC", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;

  /* Shape — the site's shape signature: pill buttons, 16px cards,
     10px small surfaces (inputs, dropdowns, accordions), 4px chips. */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-surface: 10px;
  --radius: 16px;
  --radius-card: 16px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Elevation — cards are FLAT at rest. Shadow only appears on hover,
     together with a small lift. */
  --shadow-pop: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-lift: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-sticky: 0 1px 0 0 var(--rule), 0 8px 24px -20px rgba(34, 34, 34, 0.35);

  /* Layout */
  --container: 1240px;
  --container-narrow: 860px;
  --container-wide: 1400px;
  --gutter: 1.5rem;
  --header-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur: 200ms;
}

@media (max-width: 640px) {
  :root {
    --gutter: 1.125rem;
    --header-h: 64px;
  }
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* The [hidden] attribute must beat any author-set display value. */
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   3. Typography scale
   -------------------------------------------------------------------------- */
.t-display,
.t-h1,
.t-h2,
.t-h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
}

.t-display {
  font-size: 3rem;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.t-h1 {
  font-size: 2.5rem;
  line-height: 1.08;
  letter-spacing: -0.012em;
}

.t-h2 {
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: -0.008em;
}

.t-h3 {
  font-size: 1.375rem;
  line-height: 1.28;
}

.t-h4 {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--ink);
}

.t-lead {
  font-size: 1.1875rem;
  line-height: 1.56;
  color: var(--lead);
}

.t-body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
}

.t-small {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--lead);
}

.t-caption {
  font-size: 0.8125rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--muted);
}

.t-micro {
  font-size: 0.6875rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.t-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-block;
}

.muted {
  color: var(--muted);
}
.lead-color {
  color: var(--lead);
}
.ink {
  color: var(--ink);
}
.brand-color {
  color: var(--brand);
}
.center {
  text-align: center;
}
.balance {
  text-wrap: balance;
}
.pretty {
  text-wrap: pretty;
}

@media (max-width: 860px) {
  .t-display {
    font-size: 2.25rem;
  }
  .t-h1 {
    font-size: 2rem;
  }
  .t-h2 {
    font-size: 1.625rem;
  }
  .t-h3 {
    font-size: 1.1875rem;
  }
  .t-lead {
    font-size: 1.0625rem;
  }
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-wide {
  max-width: var(--container-wide);
}
.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: 3.5rem;
}
.section-sm {
  padding-block: 3.5rem;
}
.section-xs {
  padding-block: 2.5rem;
}
.section-warm {
  background: var(--warm);
}
.section-ink {
  background: var(--ink);
  color: #fff;
}
.section-brand {
  background: var(--brand);
  color: #fff;
}
.section-rule-top {
  border-top: 1px solid var(--rule);
}
.section-rule-bottom {
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 860px) {
  .section {
    padding-block: 2.5rem;
  }
  .section-sm {
    padding-block: 2.5rem;
  }
}

/* Section header: eyebrow + title + optional lead + optional action */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.section-head-text {
  max-width: 46rem;
}
.section-head .eyebrow {
  margin-bottom: 0.75rem;
}
.section-head .t-h2 + .t-lead {
  margin-top: 0.875rem;
}
.section-head-actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
@media (max-width: 860px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
  }
}

/* Grids */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-2-1 {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}
.grid-1-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
}
.grid-gap-sm {
  gap: 1rem;
}
.grid-gap-lg {
  gap: 2rem;
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2-1,
  .grid-1-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 700px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Simple flex helpers */
.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.row-wrap {
  flex-wrap: wrap;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.full { width: 100%; }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }

.sr-only {
  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 {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 999;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus {
  top: 1rem;
}

@media (max-width: 700px) {
  .hide-sm {
    display: none !important;
  }
}
@media (min-width: 701px) {
  .show-sm {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   5. Icons
   -------------------------------------------------------------------------- */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  stroke-width: 1.75;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.icon-xs { width: 0.875rem; height: 0.875rem; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2rem; height: 2rem; }
.icon-2xl { width: 2.75rem; height: 2.75rem; }

.icon-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
}
.icon-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--brand-soft-strong);
}
.icon-badge > * {
  position: relative;
  z-index: 1;
  color: var(--brand);
}
.icon-badge-sm {
  width: 2.75rem;
  height: 2.75rem;
}
.icon-badge-lg {
  width: 4.5rem;
  height: 4.5rem;
}
.icon-badge-ink::before {
  background: rgba(34, 34, 34, 0.07);
}
.icon-badge-ink > * {
  color: var(--ink);
}
.icon-badge-white::before {
  background: rgba(255, 255, 255, 0.16);
}
.icon-badge-white > * {
  color: #fff;
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-dark);
}

/* Secondary inverts to solid ink on hover — a signature of the source design. */
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  padding-inline: 0.5rem;
}
.btn-ghost:hover {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}
.btn-ink:hover {
  background: #000;
}

.btn-white {
  background: #fff;
  color: var(--ink);
}
.btn-white:hover {
  background: var(--warm);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-outline-white:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-sm {
  padding: 0.5625rem 1.125rem;
  font-size: 0.875rem;
}
.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
}
.btn-block {
  width: 100%;
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brand);
}
.link-arrow .icon {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform var(--dur) var(--ease);
}
.link-arrow:hover .icon {
  transform: translateX(3px);
}
.link-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
}
.link-underline:hover {
  text-decoration-color: currentColor;
}

/* --------------------------------------------------------------------------
   7. Badges, pills, chips
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.6875rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  background: var(--warm-deep);
  color: var(--ink);
  white-space: nowrap;
}
.badge .icon {
  width: 0.875rem;
  height: 0.875rem;
}
.badge-brand {
  background: var(--brand-soft-strong);
  color: var(--brand-ink);
}
.badge-success {
  background: var(--success-soft);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-ink {
  background: var(--ink);
  color: #fff;
}
.badge-highlight {
  background: var(--highlight);
  color: var(--ink);
}
.badge-outline {
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--lead);
}
.badge-lg {
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  background: var(--white);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--lead);
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--muted);
  flex-shrink: 0;
}
.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-danger { background: var(--danger); }
.dot-brand { background: var(--brand); }

/* Honesty strip — repeated under every page hero */
.honesty-strip {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
}
.honesty-strip .icon {
  width: 1.0625rem;
  height: 1.0625rem;
  color: var(--brand);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.card-flat {
  background: var(--warm);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.card-pad-sm {
  padding: 1.125rem;
}
.card-pad-lg {
  padding: 2rem;
}
/* Flat at rest; lift + shadow on hover only. */
.card-hover {
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color var(--dur) var(--ease);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--rule-strong);
}
.card-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.card-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.card-link {
  display: block;
  color: inherit;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.28;
  font-weight: 500;
  color: var(--ink);
}
.card-hover:hover .card-title {
  color: var(--brand);
}
.card-icon-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   9. Forms
   -------------------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
}
.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}
.field-label .req {
  color: var(--danger);
  margin-left: 0.125rem;
}
.field-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}
.field-error {
  font-size: 0.8125rem;
  color: var(--danger);
  font-weight: 500;
  display: none;
}
.field.has-error .field-error {
  display: block;
}
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: var(--danger);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-surface);
  background: var(--white);
  font-size: 0.9375rem;
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--faint);
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--muted);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft-strong);
}
.textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.6;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group .icon {
  position: absolute;
  left: 0.875rem;
  color: var(--muted);
  pointer-events: none;
  width: 1.125rem;
  height: 1.125rem;
}
.input-group .input {
  padding-left: 2.625rem;
}
.input-group-btn {
  display: flex;
  gap: 0.5rem;
}

.check {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--lead);
  cursor: pointer;
}
.check input[type="checkbox"],
.check input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1875rem;
  accent-color: var(--brand);
  flex-shrink: 0;
  cursor: pointer;
}

/* Selectable option card (radio/checkbox driven) */
.option-card {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 1rem 1.125rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-card);
  background: var(--white);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.option-card:hover {
  border-color: var(--brand);
}
.option-card input {
  margin-top: 0.25rem;
  accent-color: var(--brand);
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}
.option-card:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.option-card.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.option-card-title {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9375rem;
}
.option-card-desc {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0.125rem;
}

/* Segmented control */
.segmented {
  display: inline-flex;
  padding: 0.25rem;
  background: var(--warm);
  border: 1px solid var(--rule);
  border-radius: var(--radius-surface);
  gap: 0.25rem;
}
.segmented button {
  padding: 0.4375rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--lead);
  transition: all var(--dur) var(--ease);
}
.segmented button[aria-selected="true"],
.segmented button.is-active {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--rule);
}

/* Success / notice panels */
.notice {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  line-height: 1.55;
  border: 1px solid var(--rule);
  background: var(--warm);
  color: var(--lead);
}
.notice .icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
  width: 1.125rem;
  height: 1.125rem;
}
.notice-success {
  background: var(--success-soft);
  border-color: rgba(46, 125, 91, 0.25);
  color: #1f5a41;
}
.notice-success .icon { color: var(--success); }
.notice-warning {
  background: var(--warning-soft);
  border-color: rgba(199, 122, 42, 0.25);
  color: #8a5320;
}
.notice-warning .icon { color: var(--warning); }
.notice-danger {
  background: var(--danger-soft);
  border-color: rgba(178, 58, 58, 0.25);
  color: #8c2d2d;
}
.notice-danger .icon { color: var(--danger); }
.notice-brand {
  background: var(--brand-soft);
  border-color: rgba(50, 104, 185, 0.22);
  color: var(--brand-ink);
}
.notice-brand .icon { color: var(--brand); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.form-grid .span-2 {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   10. Scroll reveal (progressive enhancement)
   -------------------------------------------------------------------------- */
/* Content is visible by default. The hidden start state only applies once
   main.js has confirmed it can animate (html.js-reveal), and main.js also
   forces every element visible after a short timeout, so a failed observer
   can never leave content invisible. */
.reveal {
  opacity: 1;
  transform: none;
}
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  will-change: opacity, transform;
}
html.js-reveal .reveal.is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
@media print {
  html.js-reveal .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
