/* ==========================================================================
   trexiptv.my — "The Household"
   A calm, advisory consumer guide. Warm paper ground, generous whitespace,
   large comfortable type, flat card surfaces that read like worksheets the
   reader mentally fills in. Emphasis comes from warmth, rules and space —
   never from shadow stacks or scale tricks.

   Type:  Fraunces (soft serif, headings)  +  Karla (humanist sans, body)
   Load in the PHP <head> with:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..700&family=Karla:wght@400..700&display=swap">
   ========================================================================== */

/* --------------------------------------------------------------- tokens */
:root {
  /* grounds */
  --paper:        #FBF7F1;   /* page */
  --paper-band:   #F4EDE2;   /* .alt bands, footer */
  --card:         #FFFFFF;   /* worksheets */
  --card-warm:    #FBF3E8;   /* featured / quiet panels */
  --field:        #FFFDF9;   /* form controls */

  /* ink */
  --ink:          #2A2622;   /* 14.07:1 on paper */
  --ink-soft:     #63584D;   /* 6.49:1 on paper, 5.95:1 on band */
  --placeholder:  #7A6E62;   /* 4.88:1 on field */

  /* rules and edges */
  --rule:         #E6DACA;   /* decorative hairline */
  --rule-firm:    #D6C6B0;   /* stronger separation */
  --rule-faint:   rgba(154, 72, 42, .10);
  --edge:         #97836A;   /* interactive control borders, >= 3:1 */

  /* warm accents */
  --clay:         #99482A;   /* primary — 6.34:1 with white */
  --clay-deep:    #7D3A21;   /* links, small accent text — 7.87:1 on paper */
  --clay-tint:    #F5E4D8;
  --sage:         #35513F;   /* secondary, savings, focus — 8.75:1 on card */
  --sage-tint:    #E7EFE7;
  --honey:        #E9B44C;   /* tags, band CTA */
  --honey-tint:   #F7E3B5;

  /* the one rich panel on the page */
  --band:         #35513F;
  --band-ink:     #F4EDE2;   /* 7.52:1 on band */
  --band-soft:    #DCD2C3;   /* 5.85:1 on band */
  --band-btn-ink: #2A1F0C;   /* on honey — 8.54:1 */

  /* notices */
  --bad-bg:  #FBE9E4;  --bad-ink:  #8A2E1C;  --bad-edge:  #E3B6A9;
  --ok-bg:   #E7EFE7;  --ok-ink:   #2C5739;  --ok-edge:   #B4CCBB;
  --info-bg: #E9EEF3;  --info-ink: #33485C;  --info-edge: #B7C6D4;

  --btn-primary-ink: #FFFFFF;
  --focus: #35513F;

  --font-head: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Karla", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  --wrap: 1080px;
  --measure: 68ch;
  --gutter: clamp(20px, 5vw, 40px);
  --radius-card: 22px;
  --radius-soft: 16px;

  color-scheme: light;
}

/* Warm dusk counterpart — same personality after dark, lamp-lit rather than
   inverted. Every ratio below re-measured against the dark grounds. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #191512;
    --paper-band:   #211B17;
    --card:         #221C18;
    --card-warm:    #262019;
    --field:        #1E1815;

    --ink:          #F2E9DE;   /* 15.11:1 on paper */
    --ink-soft:     #C0B1A2;   /* 8.69:1 on paper, 8.06:1 on card */
    --placeholder:  #A2937F;   /* 5.63:1 on field */

    --rule:         #3A3029;
    --rule-firm:    #4A3E34;
    --rule-faint:   rgba(232, 168, 124, .10);
    --edge:         #857161;   /* 3.63:1 on card */

    --clay:         #E8A87C;   /* 8.92:1 on paper */
    --clay-deep:    #F0BE9A;
    --clay-tint:    #33231A;
    --sage:         #9BC4A4;   /* 9.35:1 on paper */
    --sage-tint:    #1D2A22;
    --honey:        #E9B44C;
    --honey-tint:   #3A2E14;

    --band:         #24352B;
    --band-ink:     #F2E9DE;   /* 10.8:1 on band */
    --band-soft:    #C6D3C8;

    --bad-bg:  #2A1A16;  --bad-ink:  #F0A893;  --bad-edge:  #5E3428;
    --ok-bg:   #16211A;  --ok-ink:   #A9D2B4;  --ok-edge:   #2F4636;
    --info-bg: #161D26;  --info-ink: #A8C4DE;  --info-edge: #2C3E4F;

    --btn-primary-ink: #20140E;  /* on the lifted clay — 6.82:1 */
    --focus: #9BC4A4;

    color-scheme: dark;
  }
  .btn-primary { --clay: #E08A5E; }
}

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

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

body,
body.site-my {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.75;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

[hidden] { display: none !important; }

img, svg, video { max-width: 100%; height: auto; }
img { border: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.15rem, 1.55rem + 2.5vw, 3.3rem); line-height: 1.1; }
h2 { font-size: clamp(1.7rem, 1.35rem + 1.4vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 1.12rem + 0.35vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--clay-deep); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--clay); }

strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--rule); margin: clamp(32px, 4vw, 48px) 0; }

::selection { background: var(--honey-tint); color: var(--ink); }

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

/* --------------------------------------------------------- skip to main */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 var(--radius-soft) 0;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  left: 0;
  outline: 3px solid var(--honey);
  outline-offset: -6px;
}

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

main#main { display: block; }

.section { padding-block: clamp(56px, 8.5vw, 112px); }
.section.alt {
  background: var(--paper-band);
  border-block: 1px solid var(--rule);
}

/* utilities ------------------------------------------------------------ */
.small { font-size: 0.875rem; line-height: 1.6; }
.mut   { color: var(--ink-soft); }
.center { text-align: center; }
.center p, .center .lede { margin-inline: auto; }
.mb0   { margin-bottom: 0 !important; }
.mt    { margin-top: clamp(22px, 2.8vw, 34px); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0;
  background: var(--clay-tint);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.15em 0.5em;
  overflow-wrap: anywhere;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 1.1em;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--rule-firm);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
}
a.chip:hover { border-color: var(--clay); color: var(--clay-deep); }

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-soft);
  margin-bottom: 1.2em;
}
.table-wrap table { width: 100%; min-width: 520px; border-collapse: collapse; }
.table-wrap th {
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--card-warm);
  padding: 15px 20px;
  border-bottom: 1px solid var(--rule-firm);
}
.table-wrap td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.table-wrap tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------- header */
/* Deliberately not sticky: nothing here should chase the reader. */
.site-head {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.head-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  min-height: 88px;
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: block;
  flex: none;
}
.brand-text {
  font-family: var(--font-head);
  font-size: 1.18rem;
  font-weight: 400;
  letter-spacing: 0.004em;
  color: var(--ink);
  white-space: nowrap;
}
.brand-text strong { font-weight: 700; color: var(--clay-deep); }

.burger { display: none; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.7vw, 28px);
}
.nav a {
  color: var(--ink);
  font-size: 0.97rem;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.nav a:hover { color: var(--clay-deep); border-bottom-color: var(--rule-firm); }
.nav a.on { color: var(--clay-deep); border-bottom-color: var(--clay); font-weight: 700; }

.nav .nav-cta {
  background: var(--clay-tint);
  color: var(--clay-deep);      /* 6.79:1 */
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 700;
  transition: background-color .18s ease, color .18s ease;
}
.nav .nav-cta:hover {
  background: var(--clay);
  color: var(--btn-primary-ink);
  border-bottom-color: transparent;
}

/* ----------------------------------------------------------------- hero */
.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(48px, 7vw, 92px) clamp(44px, 6vw, 78px);
}
.hero-inner { display: grid; gap: clamp(34px, 5vw, 60px); }
.hero-copy { min-width: 0; max-width: 620px; }
.hero:not(.hero-home) .hero-copy { max-width: 760px; }
.hero h1 { margin: 20px 0 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--clay-deep);
}
/* Not a rule-dash: a small empty tick-box, the mark this whole site is
   built on — the household reads down the page and ticks things off. */
.eyebrow::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid var(--clay);
  border-radius: 4px;
  background: none;
  flex: none;
  transform: translateY(-1px);
}

.lede {
  margin: 22px 0 0;
  font-size: clamp(1.12rem, 1.02rem + 0.5vw, 1.3rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(28px, 3.6vw, 38px);
}

.hero-art { position: relative; min-width: 0; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 6% 2% 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 58% 46%, var(--honey-tint) 0%, transparent 70%);
  z-index: 0;
}
.hero-art img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 660px;
  margin-inline: auto;
}

/* The copy leads and the picture sits under it on the same floor line —
   the room stands on the baseline of the buttons, not beside a mirrored
   half-column. */
@media (min-width: 940px) {
  .hero-home .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
    column-gap: clamp(40px, 6vw, 76px);
    align-items: end;
  }
  .hero-home .hero-art { align-self: end; }
}

/* --------------------------------------------------------- section head */
.section-head {
  max-width: 62ch;
  margin-bottom: clamp(30px, 4vw, 50px);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section-head h2 { margin: 14px 0 0; }
.section-head p { margin-top: 16px; color: var(--ink-soft); }
.section-head.center .eyebrow::after {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid var(--clay);
  border-radius: 4px;
  flex: none;
  transform: translateY(-1px);
}

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 15px 30px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--btn-primary-ink);   /* 6.34:1 */
}
.btn-primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); color: var(--btn-primary-ink); }
.btn-ghost {
  background: transparent;
  border-color: var(--clay);
  color: var(--clay-deep);
}
.btn-ghost:hover { background: var(--clay-tint); color: var(--clay-deep); }
.btn-block { display: flex; width: 100%; }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------------------------------------------------------------- plans */
/* Not three columns racing each other — a stacked worksheet, one row per
   term, so the household can read down the page and compare calmly. */
.plans {
  display: grid;
  gap: clamp(20px, 2.6vw, 28px);
  margin-top: 14px;
}
.plan {
  position: relative;
  display: grid;
  gap: 6px 34px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: clamp(26px, 3.4vw, 40px);
  transition: border-color .2s ease, background-color .2s ease;
}
.plan:hover { border-color: var(--rule-firm); }

.plan .tag {
  position: absolute;
  top: -14px;
  left: clamp(22px, 3vw, 36px);
  background: var(--honey);
  color: var(--band-btn-ink);      /* 8.54:1 */
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
}

.plan .term {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 1.2rem + 0.4vw, 1.55rem);
  font-weight: 600;
  color: var(--ink);
}
/* Often emitted as a non-breaking space when there is nothing to save, so it
   is plain text rather than a pill — an empty pill would read as a blemish. */
.plan .save {
  align-self: start;
  justify-self: start;
  margin-top: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
  color: var(--sage);
}

.plan .price {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 1.9rem + 2.2vw, 3.1rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.plan .price sup {
  font-size: 0.42em;
  font-weight: 600;
  top: -0.62em;
  margin-right: 2px;
  color: var(--clay-deep);
}
.plan .per {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.plan ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.plan ul li {
  position: relative;
  padding-left: 30px;
  font-size: 0.97rem;
  line-height: 1.5;
  color: var(--ink);
}
.plan ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sage);
  background: var(--sage-tint);
  border-radius: 50%;
}

.plan .btn { margin-top: 20px; }

.plan.featured {
  background: var(--card-warm);
  border-color: var(--clay);
}
.plan.featured .price { color: var(--clay-deep); }
.plan.featured ul li::before { color: var(--clay-deep); background: var(--clay-tint); }

@media (min-width: 900px) {
  .plan {
    grid-template-columns: minmax(180px, 0.95fr) minmax(160px, 0.8fr) minmax(250px, 1.3fr);
    grid-template-areas:
      "term price list"
      "save per   list"
      "cta  cta   list";
    align-items: start;
  }
  .plan .term  { grid-area: term; }
  .plan .save  { grid-area: save; }
  .plan .price { grid-area: price; }
  .plan .per   { grid-area: per; }
  .plan ul     { grid-area: list; border-left: 1px solid var(--rule); padding-left: 34px; align-self: stretch; }
  .plan .btn   { grid-area: cta; justify-self: start; }
  .plan.featured ul { border-left-color: var(--rule-firm); }
}
@media (max-width: 899.98px) {
  .plan .btn { width: 100%; }
}

/* ---------------------------------------------------------------- prose */
/* Worksheet sheets: a clay margin rule down the left, like a printed
   guide someone has been annotating. */
.prose {
  display: grid;
  gap: clamp(20px, 2.6vw, 30px);
  max-width: 880px;
  margin-inline: auto;
}
/* Styled bare, not as `.prose .block`, so a single sheet still gets its
   card when it is rendered outside the prose grid (a legal page, one
   standing callout). */
.block {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--clay-tint);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: clamp(26px, 3.4vw, 40px) clamp(24px, 3.4vw, 40px);
}
.block h2 {
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.65rem);
  margin: 0 0 14px;
}
.block p {
  margin: 0 0 1em;
  color: var(--ink-soft);
  max-width: var(--measure);
}
.block p:last-child { margin-bottom: 0; }
.block-alt {
  background: var(--card-warm);
  border-left-color: var(--sage);
}
.block-alt h2 { color: var(--ink); }

/* ------------------------------------------------------------------ faq */
/* A printed question sheet rather than a stack of cards. */
.faq {
  max-width: 880px;
  margin-inline: auto;
  border-top: 1px solid var(--rule);
}
.faq details {
  border-bottom: 1px solid var(--rule);
  padding-inline: clamp(8px, 1.6vw, 20px);
  border-radius: var(--radius-soft);
  transition: background-color .2s ease;
}
.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  list-style: none;
  cursor: pointer;
  padding: 24px 0;
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.18rem);
  font-weight: 600;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--clay-deep);
  background: var(--clay-tint);
  border-radius: 50%;
  transform: translateY(2px);
}
.faq summary:hover { color: var(--clay-deep); }
.faq details[open] { background: var(--card-warm); }
.faq details[open] summary::after { content: "–"; }
.faq .body {
  padding: 0 0 26px;
  max-width: var(--measure);
}
.faq .body p {
  margin: 0 0 0.9em;
  color: var(--ink-soft);
}
.faq .body p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------- band */
/* The single rich surface on the site: a deep sage panel, inset and
   rounded, so it reads as a note to the reader rather than a billboard. */
/* The template emits <section class="band"><div class="wrap band-inner">, so
   .wrap already supplies the max-width and centring; the section carries the
   inline gutter instead, which is what keeps the panel genuinely inset from
   both screen edges at 360px (its own padding overrides .wrap's). */
section.band {
  padding-block: clamp(24px, 3.6vw, 44px);
  padding-inline: var(--gutter);
}
.band .band-inner {
  background: var(--band);
  color: var(--band-ink);
  border-radius: 28px;
  padding: clamp(32px, 4.4vw, 54px);
  display: grid;
  gap: 28px;
  align-items: center;
}
.band h2 { color: var(--band-ink); margin: 0 0 10px; }
.band p { color: var(--band-soft); max-width: 52ch; }
.band-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.band .btn-primary {
  background: var(--honey);
  border-color: var(--honey);
  color: var(--band-btn-ink);      /* 8.54:1 */
}
.band .btn-primary:hover { background: #F3C468; border-color: #F3C468; }
.band .btn-ghost {
  background: transparent;
  border-color: var(--band-ink);
  color: var(--band-ink);          /* 7.52:1 */
}
.band .btn-ghost:hover { background: var(--band-ink); color: var(--band); }
.band :focus-visible { outline-color: var(--honey); }

@media (min-width: 880px) {
  .band .band-inner {
    grid-template-columns: 1.5fr auto;
    gap: 44px;
  }
}

/* -------------------------------------------------------------- notices */
.notice {
  background: var(--card-warm);
  border: 1px solid var(--rule-firm);
  border-left: 4px solid var(--clay);
  border-radius: 14px;
  padding: 18px 22px;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 1.2em;
}
.notice p { margin-bottom: 0.6em; }
.notice p:last-child { margin-bottom: 0; }
.notice.bad  { background: var(--bad-bg);  border-color: var(--bad-edge);  border-left-color: var(--bad-ink);  color: var(--bad-ink); }
.notice.ok   { background: var(--ok-bg);   border-color: var(--ok-edge);   border-left-color: var(--ok-ink);   color: var(--ok-ink); }
.notice.info { background: var(--info-bg); border-color: var(--info-edge); border-left-color: var(--info-ink); color: var(--info-ink); }
.notice.bad a, .notice.ok a, .notice.info a { color: inherit; }

/* ---------------------------------------------------------------- forms */
.form {
  display: grid;
  gap: clamp(20px, 2.6vw, 28px);
  max-width: 760px;
}
.form > .notice,
.form > p:last-child { margin-bottom: 0; }
.field { display: grid; gap: 9px; }
.field > label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--ink);
}

/* Scoped to form context, and never to checkboxes or radios: the 54px
   rounded box belongs to text fields and selects only, so a stray
   "remember me" box anywhere on the site keeps its native size.
   background-color (not the shorthand) so :focus cannot wipe the caret. */
:is(.field, .form) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  font: inherit;
  font-size: 1rem;
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  color: var(--ink);
  background-color: var(--field);
  border: 1.5px solid var(--edge);      /* >= 3:1 against every ground */
  border-radius: 14px;
  transition: border-color .18s ease, background-color .18s ease;
}
:is(.field, .form) textarea { min-height: 150px; line-height: 1.6; resize: vertical; }
:is(.field, .form) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover {
  border-color: var(--clay);
}
:is(.field, .form) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  border-color: var(--clay);
  background-color: var(--card);
}
:is(.field, .form) :is(input[type="checkbox"], input[type="radio"]) {
  width: 22px;
  height: 22px;
  min-height: 0;
  padding: 0;
  accent-color: var(--clay);
  flex: none;
}
::placeholder { color: var(--placeholder); opacity: 1; }

:is(.field, .form) select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5 8 8l6.5-6.5' fill='none' stroke='%2363584D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 15px 9px;
}
@media (prefers-color-scheme: dark) {
  :is(.field, .form) select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5 8 8l6.5-6.5' fill='none' stroke='%23C0B1A2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

.hint {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.row2 {
  display: grid;
  gap: clamp(18px, 2.2vw, 24px);
  grid-template-columns: 1fr;
}
@media (min-width: 620px) {
  .row2 { grid-template-columns: 1fr 1fr; }
}

/* Choices read as ticked boxes on a form the household fills in together. */
.choice > label,
label.choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  align-items: start;
  padding: 16px 18px;
  background: var(--card);
  border: 1.5px solid var(--edge);
  border-radius: var(--radius-soft);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}
.choice:not(:has(label)) {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  align-items: start;
  padding: 16px 18px;
  background: var(--card);
  border: 1.5px solid var(--edge);
  border-radius: var(--radius-soft);
  cursor: pointer;
}
.choice:has(> label) {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
}
.choice input {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 3px 0 0;
  padding: 0;
  border-radius: 50%;
  accent-color: var(--clay);
  flex: none;
}
.choice input[type="checkbox"] { border-radius: 6px; }
.choice .t {
  grid-column: 2;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.choice .d {
  grid-column: 2;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.choice > label:hover,
label.choice:hover { border-color: var(--clay); }
.choice > label:has(input:checked),
label.choice:has(input:checked) {
  border-color: var(--clay);
  background: var(--clay-tint);
}

/* Order summary: a small receipt with dotted leaders. */
.summary-box {
  background: var(--card-warm);
  border: 1px solid var(--rule-firm);
  border-radius: 20px;
  padding: clamp(22px, 3vw, 30px);
}
.summary-box .line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 18px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--rule-firm);
  font-size: 0.98rem;
  color: var(--ink-soft);
}
.summary-box .line > :last-child { color: var(--ink); font-weight: 700; }
.summary-box .line:last-child { border-bottom: 0; padding-bottom: 0; }
/* The total is not a ruled-off last line — it lifts out of the warm box as
   its own pale tile, the figure the household actually carries away. */
.summary-box .line.total {
  border: 1.5px solid var(--rule-firm);
  border-radius: 14px;
  background: var(--card);
  margin-top: 16px;
  padding: 18px 16px;
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  font-weight: 600;
  color: var(--ink);
}
.summary-box .line.total > :last-child { font-weight: 700; }

/* --------------------------------------------------------------- footer */
.site-foot {
  background: var(--paper-band);
  border-top: 1px solid var(--rule-firm);
  margin-top: clamp(40px, 6vw, 84px);
  padding-top: clamp(48px, 6vw, 80px);
  font-size: 0.97rem;
}
.foot-grid {
  display: grid;
  gap: clamp(28px, 4vw, 46px);
  grid-template-columns: 1fr;
}
.foot-about .brand-text { font-size: 1.12rem; }
.foot-note {
  margin: 16px 0 0;
  max-width: 46ch;
  color: var(--ink-soft);
  line-height: 1.65;
}
.foot-note.foot-small { font-size: 0.84rem; line-height: 1.6; }

.site-foot h4 {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 16px;
}
.site-foot h4.mt { margin-top: 28px; }
.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.site-foot ul a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-foot ul a:hover { color: var(--clay-deep); border-bottom-color: var(--clay); }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 26px;
  margin-top: clamp(36px, 4.5vw, 58px);
  padding-block: 24px;
  border-top: 1px solid var(--rule-firm);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.foot-base span + span { text-align: right; }

/* ----------------------------------------------------- per-page tuning */
/* The body carries body.site-my plus body.page-<slug>; the pages that are
   really a form get a narrower, quieter column. */
body.site-my { background: var(--paper); color: var(--ink); }
body.page-checkout .section .wrap,
body.page-order-status .section .wrap { --wrap: 900px; }
body.page-checkout .hero,
body.page-order-status .hero { padding-block: clamp(40px, 5vw, 68px) clamp(28px, 4vw, 44px); }
body.page-contact .prose,
body.page-privacy .prose,
body.page-terms .prose,
body.page-refund .prose { max-width: 820px; }

@media (min-width: 720px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .foot-grid { grid-template-columns: 1.7fr 1fr 1fr 1fr; }
  .foot-about { grid-column: auto; }
}

/* ------------------------------------------------------ mobile nav < 780 */
@media (max-width: 779.98px) {
  /* Keyed off BOTH signals the shared script may set — aria-expanded on the
     button and .open on the nav — so the control is never left half-toggled.
     Open inverts the whole key rather than only folding the bars. */
  .burger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    padding: 0;
    background: var(--card);
    border: 1.5px solid var(--edge);
    border-radius: 14px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
  }
  .burger span {
    display: block;
    width: 22px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .22s ease, opacity .18s ease;
  }
  .burger[aria-expanded="true"],
  .site-head:has(.nav.open) .burger {
    background: var(--clay-tint);
    border-color: var(--clay);
  }
  .burger[aria-expanded="true"] span:nth-child(1),
  .site-head:has(.nav.open) .burger span:nth-child(1) { transform: translateY(8.5px) rotate(-45deg); }
  .burger[aria-expanded="true"] span:nth-child(2),
  .site-head:has(.nav.open) .burger span:nth-child(2) { transform: scaleX(0.15); opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3),
  .site-head:has(.nav.open) .burger span:nth-child(3) { transform: translateY(-8.5px) rotate(45deg); }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 4px;
    padding-bottom: 10px;
    border-top: 1px solid var(--rule);
  }
  .nav.open,
  .site-head:has(.burger[aria-expanded="true"]) .nav { display: flex; }
  .nav a {
    padding: 15px 2px;
    border-bottom: 1px solid var(--rule);
    font-size: 1.02rem;
  }
  .nav a:hover { border-bottom-color: var(--rule); }
  /* The page you are on is the one already ticked off the list — no
     inset marker bar. */
  .nav a.on {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-left: 2px;
    border-bottom-color: var(--rule);
  }
  .nav a.on::after {
    content: "✓";
    flex: none;
    font-size: 0.92rem;
    line-height: 1;
    color: var(--clay);
  }
  .nav .nav-cta,
  .nav a.nav-cta.on {
    margin-top: 16px;
    padding: 14px 22px;
    border-bottom: 0;
    text-align: center;
    justify-content: center;
  }
  .nav .nav-cta::after { content: none; }
}

/* --------------------------------------------------- small screens / 360 */
@media (max-width: 420px) {
  :root { --gutter: 18px; }
  .head-inner { min-height: 74px; gap: 12px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-text { font-size: 1.05rem; }
  .plan { padding: 24px 20px; }
  .plan .tag { left: 20px; }
  .band .band-inner { border-radius: 22px; padding: 28px 22px; }
  .btn { padding: 14px 22px; width: 100%; }
  .actions, .band-actions { gap: 12px; }
  .faq summary { gap: 14px; }
}

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

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-head, .burger, .nav, .band, .actions, .band-actions, .skip { display: none !important; }
  .section { padding-block: 18pt; }
  .plan, .block, .summary-box, .notice {
    border: 1pt solid #999;
    background: #fff;
    break-inside: avoid;
  }
  .faq details { break-inside: avoid; }
  .faq .body { display: block !important; }
  a { color: #000; text-decoration: underline; }
}

