/* ==========================================================================
   billkitnow — interface system
   Ivory ground, deep teal ink, coral / mint / amber / lavender accents.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Type — served from assets/fonts/, no third-party font CDN.
   Inter does the work; Instrument Serif italic carries the accent words.
   -------------------------------------------------------------------------- */

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  /* Brand palette */
  --ivory:      #FFFFEB;
  --ivory-2:    #F7F6E0;
  --teal:       #034F46;
  --teal-2:     #046B5E;
  --teal-line:  #D8DDCF;
  --coral:      #FF6C4C;
  --coral-deep: #D8401A;
  --mint:       #34D399;
  --amber:      #FFA946;
  --lavender:   #F0D7FF;
  --violet:     #8B5CF6;
  --white:      #FFFFFF;

  /* Working tokens */
  --ink:        var(--teal);
  --ink-soft:   #3C6D63;
  --muted:      #5F7A73;
  --muted-2:    #91A69F;
  --line:       #E3E4CF;
  --line-2:     #EDEEDC;
  --good:       #0F8F63;
  --warn:       #C2761A;
  --bad:        #E04B2A;

  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-xs: 8px;
  --r-sm: 12px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --shadow-sm: 0 1px 2px rgba(3,79,70,.05), 0 4px 12px -6px rgba(3,79,70,.12);
  --shadow:    0 2px 4px rgba(3,79,70,.04), 0 12px 30px -14px rgba(3,79,70,.20);
  --shadow-lg: 0 8px 20px rgba(3,79,70,.06), 0 34px 70px -30px rgba(3,79,70,.28);

  --wrap: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--mint); color: var(--teal); }

.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: 760px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Type scale (deliberately modest) --------------------------- */

h1, h2, h3, h4 {
  font-family: var(--body);
  font-weight: 600;
  margin: 0;
  letter-spacing: -.035em;
  line-height: 1.06;
}
h1 { font-size: clamp(2.15rem, 4.4vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 2.9vw, 2.35rem); letter-spacing: -.03em; }
h3 { font-size: 1.12rem; letter-spacing: -.02em; line-height: 1.25; }
h4 { font-size: .96rem; letter-spacing: -.01em; }
p  { margin: 0 0 1em; }

/* The one flourish: accent words set in the serif italic. */
em.say, .say {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.14em;
  line-height: .9;
  letter-spacing: -.01em;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .74rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .9rem;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--coral); box-shadow: 0 0 0 4px rgba(255,108,76,.16);
}

.lede { font-size: clamp(.98rem, 1.1vw, 1.09rem); color: var(--muted); max-width: 56ch; line-height: 1.6; }

/* ---------- Buttons ---------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-size: .92rem; font-weight: 500; letter-spacing: -.01em;
  padding: .72rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--teal); color: var(--ivory);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .3s var(--ease-out), background .2s ease, color .2s ease,
              border-color .2s ease, box-shadow .3s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(3,79,70,.55); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }

.btn-coral { background: var(--coral-deep); color: #fff; }
.btn-coral:hover { box-shadow: 0 12px 30px -12px rgba(255,108,76,.7); }
.btn-mint { background: var(--mint); color: var(--teal); }
.btn-light { background: var(--white); color: var(--teal); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--teal); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); box-shadow: none; }
.btn-blue { background: var(--coral-deep); color: #fff; }
.btn-blue:hover { box-shadow: 0 12px 30px -12px rgba(255,108,76,.7); }
.btn-quiet { background: transparent; color: var(--muted); padding-inline: .6rem; }
.btn-quiet:hover { color: var(--ink); box-shadow: none; transform: none; }
.btn-danger { background: transparent; color: var(--bad); border-color: rgba(224,75,42,.3); }
.btn-danger:hover { background: var(--bad); color: #fff; }

.btn-lg { font-size: .98rem; padding: .88rem 1.7rem; }
.btn-sm { font-size: .84rem; padding: .48rem .92rem; }
.btn-block { width: 100%; }

/* ---------- Announcement strip ------------------------------------------ */

.announce {
  position: fixed; top: 0; left: 0; right: 0; z-index: 210;
  height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--teal); color: var(--ivory); font-size: .84rem; overflow: hidden;
  transition: transform .45s var(--ease-out);
}
.announce.is-away { transform: translateY(-100%); }
.announce a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .55rem; }
.announce .rot { position: relative; display: inline-block; height: 20px; line-height: 20px; overflow: hidden; vertical-align: middle; }
.announce .rot b { display: block; height: 20px; line-height: 20px; font-weight: 500; animation: rotUp 12s cubic-bezier(.7,0,.3,1) infinite; }
@keyframes rotUp {
  0%, 26%  { transform: translateY(0); }
  33%, 59% { transform: translateY(-20px); }
  66%, 92% { transform: translateY(-40px); }
  100%     { transform: translateY(-60px); }
}
.announce .go { color: var(--mint); }

/* ---------- Navigation --------------------------------------------------- */

.nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 200; width: calc(100% - 28px); max-width: 1140px;
  transition: top .4s var(--ease-out);
}
body.has-announce .nav { top: 52px; }
body.has-announce .nav.is-stuck { top: 12px; }

.nav-inner {
  position: relative;
  display: flex; align-items: center; gap: 1.4rem;
  padding: .55rem .55rem .55rem 1.4rem;
  border-radius: 999px;
  background: rgba(255,255,235,.78);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: box-shadow .4s var(--ease), background .4s var(--ease);
}
.nav.is-stuck .nav-inner { background: rgba(255,255,235,.94); box-shadow: var(--shadow); }
.nav a.nav-brand { display: inline-flex; align-items: center; color: var(--teal); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; }
.nav-links > a { font-size: .9rem; color: var(--ink-soft); text-decoration: none; transition: color .2s ease; }
.nav-links > a:hover { color: var(--teal); }
.nav .btn { padding: .55rem 1.15rem; font-size: .88rem; }
.nav-burger { display: none; background: none; border: 0; color: inherit; padding: .4rem .5rem; cursor: pointer; font-size: 1.15rem; }

/* ---------- Soft colour wash --------------------------------------------- */

.wash { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.wash i { position: absolute; display: block; border-radius: 50%; filter: blur(80px); will-change: transform; }
.wash i:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: -14vw;   background: radial-gradient(circle, rgba(255,108,76,.55), transparent 68%); animation: drift1 24s ease-in-out infinite; }
.wash i:nth-child(2) { width: 42vw; height: 42vw; right: -8vw; top: -6vw;    background: radial-gradient(circle, rgba(240,215,255,.9), transparent 66%); animation: drift2 28s ease-in-out infinite; }
.wash i:nth-child(3) { width: 40vw; height: 40vw; left: 22vw;  bottom: -18vw; background: radial-gradient(circle, rgba(52,211,153,.5), transparent 66%); animation: drift3 32s ease-in-out infinite; }
.wash i:nth-child(4) { width: 30vw; height: 30vw; right: 12vw; bottom: -12vw; background: radial-gradient(circle, rgba(255,169,70,.45), transparent 68%); animation: drift1 26s ease-in-out infinite reverse; }

@keyframes drift1 { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(5vw,3vw,0) scale(1.14); } }
@keyframes drift2 { 0%,100% { transform: translate3d(0,0,0) scale(1.06); } 50% { transform: translate3d(-4vw,5vw,0) scale(.94); } }
@keyframes drift3 { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(4vw,-4vw,0) scale(1.16); } }

/* ---------- Hero ---------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(9.5rem, 18vh, 12.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-head { text-align: center; max-width: 860px; margin-inline: auto; }
.hero .lede { margin: 1.3rem auto 0; text-align: center; max-width: 46ch; }

.pill-tag {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .34rem .55rem .34rem .8rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line);
  font-size: .8rem; color: var(--ink-soft); margin-bottom: 1.5rem; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-out);
}
.pill-tag:hover { transform: translateY(-2px); }
.pill-tag b { background: var(--mint); color: var(--teal); font-weight: 600; padding: .14rem .5rem; border-radius: 999px; font-size: .72rem; }

.hero-cta { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.9rem; }
.hero-sub { margin-top: 1.1rem; font-size: .84rem; color: var(--muted-2); text-align: center; }

/* ---------- Hero demo: rough note becomes a finished document ------------- */

.duo {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, .8fr) 50px minmax(0, 1.2fr);
  align-items: stretch;
  max-width: 1060px; margin: clamp(2.6rem, 5vw, 4rem) auto 0;
}

.duo-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--white);
  box-shadow: var(--shadow-lg);
}
.duo-card.note { background: var(--teal); border-color: transparent; }
.duo-head {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem 1rem; border-bottom: 1px solid var(--line-2);
  font-size: .78rem; color: var(--muted);
}
.duo-card.note .duo-head { border-bottom-color: rgba(255,255,235,.14); color: rgba(255,255,235,.6); }
.duo-head .lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

.duo-note { padding: 1.1rem 1.2rem 1.2rem; min-height: 292px; display: flex; flex-direction: column; height: calc(100% - 41px); }
.duo-line { color: var(--ivory); font-size: .93rem; line-height: 1.95; white-space: pre-wrap; min-height: 1.95em; }
.duo-line.dim { color: rgba(255,255,235,.5); }
.duo-foot {
  margin-top: auto; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,235,.14);
  font-size: .78rem; color: rgba(255,255,235,.55); display: grid; gap: .4rem;
}
.duo-foot span { display: flex; align-items: center; gap: .45rem; }
.duo-foot b { color: var(--mint); font-weight: 600; }
.duo-caret::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em;
  background: var(--mint); margin-left: 2px; vertical-align: -.16em;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.duo-arrow { display: grid; place-items: center; position: relative; }
.duo-arrow-dot {
  width: 34px; height: 34px; border-radius: 50%; z-index: 2;
  background: var(--coral); display: grid; place-items: center; color: #fff;
  box-shadow: 0 0 0 0 rgba(255,108,76,.5);
  animation: arrowPulse 2.4s ease-out infinite;
}
@keyframes arrowPulse { 60% { box-shadow: 0 0 0 15px rgba(255,108,76,0); } 100% { box-shadow: 0 0 0 0 rgba(255,108,76,0); } }
.duo-arrow::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--coral), transparent);
}

.duo-doc { position: relative; overflow: hidden; min-width: 0; background: #fff; transition: opacity .4s var(--ease); }
.duo-doc.resetting { opacity: .18; }
.duo-note { transition: opacity .4s var(--ease); }
.duo-note.resetting { opacity: .15; }
.duo-doc .sheet { width: 210mm; padding: 13mm 12mm; box-shadow: none; margin: 0; min-height: 0; transform-origin: top left; }
.duo-doc .doc-items tbody tr,
.duo-doc .doc-party-name,
.duo-doc .doc-summary,
.duo-doc .doc-signature {
  opacity: 0; transform: translateY(6px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.duo-doc .is-lit { opacity: 1; transform: none; }

.duo-stamp {
  position: absolute; right: 16px; bottom: 16px; z-index: 4;
  display: flex; align-items: center; gap: .45rem;
  background: var(--mint); color: var(--teal); border-radius: 999px;
  padding: .42rem .85rem; font-size: .78rem; font-weight: 600;
  opacity: 0; transform: translateY(10px) scale(.9);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
  box-shadow: var(--shadow);
}
.duo-stamp.is-on { opacity: 1; transform: none; }
.duo-stamp i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

.duo-tabs { display: flex; gap: 4px; margin-left: auto; }
.duo-tab {
  border: 0; background: transparent; color: var(--muted-2); cursor: pointer;
  font-size: .74rem; padding: .2rem .55rem; border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.duo-tab:hover { color: var(--teal); }
.duo-tab.is-on { background: var(--teal); color: var(--ivory); }

/* ---------- Ticker --------------------------------------------------------- */

.ticker {
  overflow: hidden; border-block: 1px solid var(--line);
  background: var(--ivory-2); padding: 1rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; gap: 3rem; width: max-content; animation: slide 34s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { display: inline-flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.ticker span b { color: var(--teal); font-weight: 600; font-size: 1rem; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections -------------------------------------------------------- */

.section { position: relative; padding: clamp(3.6rem, 7vw, 6rem) 0; }
.section-teal { background: var(--teal); color: var(--ivory); }
.section-teal .lede { color: rgba(255,255,235,.7); }
.section-teal .eyebrow { color: rgba(255,255,235,.6); }
.section-teal .eyebrow::before { background: var(--mint); box-shadow: 0 0 0 4px rgba(52,211,153,.2); }
.section-tint { background: var(--ivory-2); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 3.5vw, 3rem); }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .lede { margin-inline: auto; }
.section-head h2 { margin-bottom: .85rem; }

.rise { opacity: 0; transform: translateY(22px); transition: opacity .75s var(--ease-out), transform .75s var(--ease-out); }
.rise.is-in { opacity: 1; transform: none; }
.rise-d1 { transition-delay: .08s; } .rise-d2 { transition-delay: .16s; }
.rise-d3 { transition-delay: .24s; } .rise-d4 { transition-delay: .32s; }

/* ---------- Bento ----------------------------------------------------------- */

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cell {
  position: relative; overflow: hidden;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.6rem;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.cell:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cell h3 { margin-bottom: .45rem; }
.cell p { color: var(--muted); font-size: .92rem; margin: 0; }
.cell-4 { grid-column: span 4; } .cell-3 { grid-column: span 3; }
.cell-2 { grid-column: span 2; } .cell-6 { grid-column: span 6; }
.cell-tall { min-height: 296px; display: flex; flex-direction: column; }
.cell-art { margin-top: auto; padding-top: 1.4rem; }

.cell-teal   { background: var(--teal); color: var(--ivory); border-color: transparent; }
.cell-teal p { color: rgba(255,255,235,.7); }
.cell-coral  { background: var(--coral-deep); color: #fff; border-color: transparent; }
.cell-coral p { color: rgba(255,255,255,.85); }
.cell-mint   { background: var(--mint); color: var(--teal); border-color: transparent; }
.cell-mint p { color: rgba(3,79,70,.75); }
.cell-lav    { background: var(--lavender); color: #40206B; border-color: transparent; }
.cell-lav p  { color: rgba(64,32,107,.72); }
.cell-amber  { background: var(--amber); color: #5A3200; border-color: transparent; }
.cell-amber p { color: rgba(90,50,0,.75); }

.prop-row {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  background: rgba(255,255,255,.6); border: 1px solid rgba(3,79,70,.08);
  border-radius: 12px; padding: .58rem .8rem; font-size: .84rem; margin-bottom: .45rem;
}
.cell-teal .prop-row, .cell-coral .prop-row { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); }
.prop-row b { font-weight: 600; }
.chips-inline { display: flex; gap: .4rem; flex-wrap: wrap; }

.art-stack { display: grid; gap: .45rem; }
.art-doc {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: .7rem .85rem; font-size: .8rem; display: flex; align-items: center; gap: .55rem;
  box-shadow: var(--shadow-sm); transition: transform .4s var(--ease-out);
}
.cell:hover .art-doc:nth-child(1) { transform: translateX(4px); }
.cell:hover .art-doc:nth-child(2) { transform: translateX(-4px); }
.cell:hover .art-doc:nth-child(3) { transform: translateX(3px); }
.art-doc .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---------- Steps ------------------------------------------------------------ */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; counter-reset: s; }
.step-card {
  position: relative; padding: 1.7rem 1.5rem; border-radius: var(--r-lg);
  background: rgba(255,255,235,.07); border: 1px solid rgba(255,255,235,.16);
  transition: background .4s var(--ease), transform .45s var(--ease-out);
}
.step-card:hover { background: rgba(255,255,235,.12); transform: translateY(-4px); }
.step-card::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  font-size: .76rem; font-weight: 600; color: var(--mint);
  display: block; margin-bottom: .9rem;
}
.step-card h3 { color: var(--ivory); margin-bottom: .4rem; }
.step-card p { color: rgba(255,255,235,.65); font-size: .9rem; margin: 0; }

/* ---------- Template rail ------------------------------------------------------ */

.rail {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.rail-track { display: flex; gap: 18px; width: max-content; animation: slide 46s linear infinite; }
.rail:hover .rail-track { animation-play-state: paused; }
.rail-card {
  width: 196px; flex: none; border-radius: var(--r);
  background: var(--white); border: 1px solid var(--line); padding: 11px;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
  text-decoration: none; color: inherit; display: block;
}
.rail-card:hover { transform: translateY(-7px) scale(1.03); box-shadow: var(--shadow-lg); }
.rail-thumb { aspect-ratio: 1 / 1.3; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line-2); }
.rail-thumb svg { width: 100%; height: 100%; display: block; }
.rail-name { font-weight: 600; font-size: .92rem; margin-top: .6rem; }
.rail-note { font-size: .76rem; color: var(--muted-2); }

/* ---------- Money scene --------------------------------------------------------- */

.money {
  position: relative; overflow: hidden;
  min-height: 380px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 2.4rem 1.5rem 2.4rem;
  border-radius: var(--r-xl);
  background:
    radial-gradient(110% 100% at 8% 40%, rgba(255,108,76,.4), transparent 62%),
    radial-gradient(110% 100% at 92% 60%, rgba(240,215,255,.95), transparent 64%),
    radial-gradient(90% 90% at 50% 110%, rgba(52,211,153,.35), transparent 60%),
    var(--ivory-2);
  border: 1px solid var(--line);
}
.money-rail { position: relative; width: 100%; max-width: 880px; height: 290px; flex: none; }

.money-tag {
  position: absolute; left: 0; top: 50%; margin-top: -160px;
  font-size: .74rem; color: var(--muted); display: flex; align-items: center; gap: .4rem;
}
.money-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }

.money-invoice {
  position: absolute; left: 0; top: 50%; width: 208px; margin-top: -122px; padding: 16px;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  transform: translateX(0) rotate(-4deg); opacity: 0;
}
.money-invoice.run { animation: invoiceFly 6s cubic-bezier(.55,0,.25,1) infinite; }
@keyframes invoiceFly {
  0%   { transform: translateX(-60px) rotate(-10deg) scale(.88); opacity: 0; }
  8%   { transform: translateX(0) rotate(-4deg) scale(1); opacity: 1; }
  46%  { transform: translateX(70px) rotate(-2deg) scale(1); opacity: 1; }
  60%  { transform: translateX(150px) rotate(7deg) scale(.84); opacity: .5; }
  72%  { transform: translateX(215px) rotate(13deg) scale(.62); opacity: 0; }
  95%, 100% { transform: translateX(-60px) rotate(-10deg) scale(.88); opacity: 0; }
}
.mi-bar { height: 7px; border-radius: 3px; background: var(--line-2); margin-bottom: 7px; }
.mi-bar.w1 { width: 62%; background: var(--teal); height: 9px; }
.mi-bar.w2 { width: 88%; } .mi-bar.w3 { width: 74%; } .mi-bar.w4 { width: 46%; }
.mi-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 9px; border-top: 1.5px solid var(--teal); }
.mi-total span { font-size: .62rem; color: var(--muted-2); }
.mi-total b { font-size: .95rem; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }

.coin {
  position: absolute; left: 0; top: 0; z-index: 3;
  width: 50px; height: 50px; margin: -25px 0 0 -25px;
  border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 1.3rem; line-height: 1; color: #fff;
  background: var(--coral);
  box-shadow: 0 8px 18px -6px rgba(255,108,76,.75), inset 0 1px 0 rgba(255,255,255,.45);
  opacity: 0;
}
.coin.mint { background: var(--mint); color: var(--teal); box-shadow: 0 8px 18px -6px rgba(52,211,153,.75), inset 0 1px 0 rgba(255,255,255,.5); }
.coin.amber { background: var(--amber); color: #5A3200; box-shadow: 0 8px 18px -6px rgba(255,169,70,.75), inset 0 1px 0 rgba(255,255,255,.5); }
.coin.run { animation: coinArc 6s cubic-bezier(.4,0,.3,1) infinite; }
@keyframes coinArc {
  0%, 30%   { opacity: 0; transform: translate(0,0) scale(.25); }
  40%       { opacity: 1; transform: translate(var(--x1, 40px), var(--lift, -70px)) scale(1); }
  62%       { opacity: 1; transform: translate(var(--x2, 240px), var(--mid, -30px)) scale(1); }
  84%       { opacity: 1; transform: translate(var(--x3, 420px), var(--dy, 10px)) scale(.9); }
  92%, 100% { opacity: 0; transform: translate(var(--x3, 420px), var(--dy, 10px)) scale(.3); }
}

.money-wallet {
  position: absolute; right: 0; top: 50%; width: 244px; margin-top: -84px;
  padding: 1.2rem 1.3rem; border-radius: 18px;
  background: var(--teal); color: var(--ivory);
  box-shadow: var(--shadow-lg);
}
.money-wallet .lab { font-size: .74rem; color: rgba(255,255,235,.6); }
.money-wallet .amt { font-size: 1.7rem; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin: .25rem 0 .85rem; }
.money-wallet .row { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: rgba(255,255,235,.65); padding: .32rem 0; border-top: 1px solid rgba(255,255,235,.14); }
.money-wallet.pop { animation: walletPop .5s var(--ease-out); }
@keyframes walletPop { 40% { transform: scale(1.045); } }

.money-cur {
  position: relative; z-index: 2; margin: 1.6rem 0 0;
  font-size: .8rem; color: var(--muted); text-align: center;
}
.money-cur b { color: var(--teal); font-weight: 600; }

/* ---------- Pinned walkthrough ----------------------------------------------- */

.pin { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.pin-steps { display: grid; }
.pin-step { padding: clamp(2.6rem, 10vh, 5.5rem) 0; }
.pin-step h3 { font-size: clamp(1.3rem, 2.1vw, 1.7rem); margin-bottom: .8rem; opacity: .4; transition: opacity .5s var(--ease); }
.pin-step p { color: rgba(255,255,235,.4); max-width: 42ch; transition: color .5s var(--ease); margin: 0; font-size: .93rem; }
.pin-step.is-on h3 { opacity: 1; }
.pin-step.is-on p { color: rgba(255,255,235,.74); }
.pin-num { font-size: .76rem; color: var(--mint); font-weight: 600; margin-bottom: .7rem; }

.pin-visual {
  position: sticky; top: 22vh; height: 54vh; min-height: 380px;
  border-radius: var(--r-lg); overflow: hidden;
  background: rgba(255,255,235,.07); border: 1px solid rgba(255,255,235,.16);
}
.pin-scene {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem;
  opacity: 0; transform: scale(.97) translateY(10px); pointer-events: none;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.pin-scene.is-on { opacity: 1; transform: none; pointer-events: auto; }

.mini { width: 100%; max-width: 320px; background: #fff; border-radius: 14px; padding: 1rem 1.1rem; box-shadow: var(--shadow-lg); color: var(--ink); }
.mini-head { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); margin-bottom: .7rem; }
.mini-row { display: flex; justify-content: space-between; font-size: .84rem; padding: .36rem 0; border-bottom: 1px solid var(--line-2); }
.mini-row:last-child { border-bottom: 0; }
.mini-row b { font-variant-numeric: tabular-nums; }

.notif {
  width: 100%; max-width: 330px; background: var(--white); border-radius: 16px;
  padding: 1rem 1.1rem; box-shadow: var(--shadow-lg); color: var(--ink);
  display: flex; gap: .75rem; align-items: flex-start;
  animation: notifIn .7s var(--ease-out);
}
@keyframes notifIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
.notif .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--lavender); display: grid; place-items: center; flex: none; }
.notif b { display: block; font-size: .88rem; font-weight: 600; }
.notif span { font-size: .8rem; color: var(--muted); }
.notif .ago { margin-left: auto; font-size: .72rem; color: var(--muted-2); }

.tpl-flip { display: grid; grid-template-columns: repeat(2, 110px); gap: 12px; justify-content: center; }
.tpl-flip > div {
  border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,235,.2);
  background: #fff; aspect-ratio: 1 / 1.3; animation: tplBreathe 4s ease-in-out infinite;
}
.tpl-flip > div:nth-child(2) { animation-delay: .5s; }
.tpl-flip > div:nth-child(3) { animation-delay: 1s; }
.tpl-flip > div:nth-child(4) { animation-delay: 1.5s; }
.tpl-flip svg { width: 100%; height: 100%; display: block; }
@keyframes tplBreathe { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-7px) scale(1.03); } }

/* ---------- Steps comparison ----------------------------------------------------- */

.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.vs-card { border-radius: var(--r-lg); padding: 1.7rem; border: 1px solid var(--line); background: var(--white); }
.vs-card.win { background: var(--teal); border-color: transparent; color: var(--ivory); }
.vs-title { display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1.2rem; }
.vs-title h3 { font-size: 1.02rem; }
.vs-count { margin-left: auto; font-size: 1.9rem; font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.vs-card.win .vs-count { color: var(--mint); }
.vs-list { list-style: none; margin: 0; padding: 0; }
.vs-list li {
  display: flex; align-items: center; gap: .6rem; font-size: .88rem;
  padding: .48rem 0; border-bottom: 1px solid var(--line-2);
  opacity: 0; transform: translateX(-8px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
.vs-card.win .vs-list li { border-bottom-color: rgba(255,255,235,.12); color: rgba(255,255,235,.85); }
.vs-list li:last-child { border-bottom: 0; }
.vs-list.is-in li { opacity: 1; transform: none; }
.vs-list li .tick { width: 16px; height: 16px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .6rem; }
.vs-list li .tick.no { background: rgba(224,75,42,.14); color: var(--bad); }
.vs-list li .tick.yes { background: var(--mint); color: var(--teal); }
.vs-foot { margin-top: 1.2rem; font-size: .82rem; color: var(--muted); }
.vs-card.win .vs-foot { color: rgba(255,255,235,.55); }

/* ---------- Flying cards ---------------------------------------------------------- */

.fly {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; height: 520px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
}
.fly-col { display: flex; flex-direction: column; gap: 14px; will-change: transform; }
.fly-col.up   { animation: flyUp 44s linear infinite; }
.fly-col.down { animation: flyDown 52s linear infinite; }
.fly-col.slow { animation-duration: 64s; }
.fly:hover .fly-col { animation-play-state: paused; }
@keyframes flyUp   { to { transform: translateY(calc(-50% - 7px)); } }
@keyframes flyDown { from { transform: translateY(calc(-50% - 7px)); } to { transform: translateY(0); } }

.fly-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.15rem; box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.fly-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow); }
.fly-card p { font-size: .9rem; line-height: 1.55; margin: 0 0 .9rem; }
.fly-who { display: flex; align-items: center; gap: .6rem; }
.fly-av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .76rem; font-weight: 700; background: var(--mint); color: var(--teal); }
.fly-who b { display: block; font-size: .84rem; font-weight: 600; }
.fly-meta { min-width: 0; }
.fly-meta span { display: block; font-size: .76rem; color: var(--muted-2); }
.fly-card.teal { background: var(--teal); color: var(--ivory); border-color: transparent; }
.fly-card.teal .fly-meta span { color: rgba(255,255,235,.6); }
.fly-card.teal .fly-av { background: var(--mint); color: var(--teal); }
.fly-card.coral { background: var(--coral-deep); color: #fff; border-color: transparent; }
.fly-card.coral .fly-meta span { color: rgba(255,255,255,.75); }
.fly-card.coral .fly-av { background: #fff; color: var(--coral-deep); }
.fly-card.lav { background: var(--lavender); color: #40206B; border-color: transparent; }
.fly-card.lav .fly-meta span { color: rgba(64,32,107,.6); }
.fly-card.lav .fly-av { background: var(--violet); color: #fff; }

/* ---------- Counters, CTA, FAQ ------------------------------------------------------ */

.statement { text-align: center; }
.statement h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); max-width: 20ch; margin-inline: auto; }

.counter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.8rem; }
.counter { text-align: center; }
.counter b { display: block; font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 700; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.counter span { font-size: .82rem; color: var(--muted); }
.section-teal .counter b { color: var(--mint); }
.section-teal .counter span { color: rgba(255,255,235,.6); }

.speed-ring {
  width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center;
  margin-inline: auto; position: relative;
  background: conic-gradient(var(--mint) 0turn, var(--mint) var(--p, .18turn), rgba(255,255,235,.18) var(--p, .18turn));
}
.speed-ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--teal); }
.speed-ring b { position: relative; z-index: 2; font-size: 1.6rem; font-weight: 700; letter-spacing: -.04em; color: var(--ivory); }

.cta-band {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl); padding: clamp(2.6rem, 5vw, 4.4rem) 2rem;
  background: var(--coral-deep); color: #fff; text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: -20%;
  background: radial-gradient(50% 60% at 20% 30%, rgba(255,169,70,.9), transparent 60%),
              radial-gradient(50% 60% at 82% 70%, rgba(240,215,255,.75), transparent 60%);
  animation: drift1 18s ease-in-out infinite;
}
.cta-band > * { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; margin-bottom: .9rem; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 46ch; margin-inline: auto; }

.faq { max-width: 760px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; gap: 1rem; cursor: pointer; list-style: none;
  padding: 1.15rem 0; font-size: 1rem; font-weight: 600; letter-spacing: -.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-left: auto; flex: none; width: 9px; height: 9px;
  border-right: 1.8px solid var(--muted-2); border-bottom: 1.8px solid var(--muted-2);
  transform: rotate(45deg); transition: transform .3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .faq-body { padding: 0 0 1.3rem; color: var(--muted); font-size: .92rem; max-width: 64ch; animation: faqIn .4s var(--ease-out); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Footer --------------------------------------------------------------- */

.foot { background: var(--teal); color: rgba(255,255,235,.65); padding: 3.4rem 0 2.2rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.2rem; }
.foot h4 { color: var(--ivory); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .9rem; font-weight: 600; }
.foot a { display: block; color: rgba(255,255,235,.65); text-decoration: none; padding: .2rem 0; font-size: .9rem; }
.foot a:hover { color: var(--mint); }
.foot-base { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,235,.16); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .84rem; }

.progress { position: fixed; top: 0; left: 0; height: 3px; z-index: 300; background: var(--coral); width: 0; transition: width .1s linear; }

/* ---------- Forms ------------------------------------------------------------------ */

.field { margin-bottom: 1rem; }
.field > label, .lbl { display: block; font-size: .82rem; font-weight: 500; color: var(--ink); margin-bottom: .35rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: .92rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xs);
  padding: .6rem .75rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(3,79,70,.1); }
textarea { min-height: 82px; resize: vertical; line-height: 1.5; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235F7A73' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2rem;
}
.input-num { font-variant-numeric: tabular-nums; text-align: right; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; }
.hint { font-size: .79rem; color: var(--muted); margin-top: .3rem; }
.hint a { color: var(--coral-deep); }

.check { display: flex; align-items: center; gap: .55rem; font-size: .88rem; cursor: pointer; margin-bottom: .5rem; }
.check input { width: 16px; height: 16px; accent-color: var(--teal); flex: none; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row h4 { font-size: .93rem; font-weight: 600; margin: 0; }
.switch-row p { font-size: .82rem; color: var(--muted); margin: .1rem 0 0; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch span { position: absolute; inset: 0; background: #CFD6C8; border-radius: 999px; transition: background .2s var(--ease); }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; transition: transform .24s var(--ease-out); box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + span { background: var(--mint); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------- Auth --------------------------------------------------------------------- */

.auth-shell { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 4rem 24px; background: var(--ivory); overflow: hidden; }
.auth-card { position: relative; z-index: 2; width: 100%; max-width: 410px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2rem; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.7rem; margin-bottom: .35rem; }
.auth-card .lede { font-size: .92rem; margin-bottom: 1.5rem; }
.auth-alt { text-align: center; font-size: .87rem; color: var(--muted); margin: 1.1rem 0 0; }
.auth-alt a { color: var(--coral-deep); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 1.4rem; color: var(--teal); }

/* ---------- Notices, toast, dialog -------------------------------------------------- */

.notice {
  display: block;
  border: 1px solid var(--line); border-left: 3px solid var(--muted-2);
  background: var(--white); border-radius: var(--r-xs);
  padding: .78rem 1rem; font-size: .89rem; margin-bottom: 1.1rem;
}
.notice a { color: var(--coral-deep); }
.notice-ok   { border-left-color: var(--mint); }
.notice-err  { border-left-color: var(--bad); }
.notice-warn { border-left-color: var(--amber); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  background: var(--teal); color: var(--ivory); font-size: .89rem;
  padding: .68rem 1.1rem; border-radius: 999px; z-index: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

dialog { border: 0; border-radius: var(--r-lg); padding: 1.8rem; box-shadow: var(--shadow-lg); max-width: 450px; width: 92%; background: var(--white); }
dialog::backdrop { background: rgba(3,79,70,.4); backdrop-filter: blur(4px); }

/* ---------- App shell ----------------------------------------------------------------- */

.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

.side {
  background: var(--teal); color: rgba(255,255,235,.7);
  padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: 1.4rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-brand { display: flex; align-items: center; color: var(--ivory); padding: .5rem .5rem .3rem; text-decoration: none; }
.side-group > p { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,235,.4); margin: 0 0 .45rem .6rem; }
.side a.side-link {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .5rem .62rem; border-radius: 10px;
  color: rgba(255,255,235,.7); text-decoration: none; font-size: .9rem;
  transition: background .2s ease, color .2s ease;
}
.side a.side-link:hover { background: rgba(255,255,235,.1); color: var(--ivory); }
.side a.side-link.is-active { background: var(--mint); color: var(--teal); font-weight: 500; }
.side a.side-link .pill { font-size: .74rem; opacity: .7; font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; display: grid; gap: .45rem; }
.side-new { display: flex; align-items: center; justify-content: center; gap: .45rem; }

.kbd {
  display: inline-flex; align-items: center; gap: 2px; justify-content: center;
  font-size: .72rem; padding: .3rem .5rem; border-radius: 8px; width: 100%;
  border: 1px solid rgba(255,255,235,.22); color: rgba(255,255,235,.55);
  background: none; cursor: pointer;
}
.kbd:hover { color: var(--ivory); border-color: rgba(255,255,235,.45); }

.main { padding: 1.9rem clamp(1rem, 3vw, 2.4rem) 4rem; min-width: 0; background: var(--ivory); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-head h1 { font-size: clamp(1.6rem, 2.4vw, 2.05rem); }
.page-head p { color: var(--muted); font-size: .92rem; margin: .28rem 0 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 12px; margin-bottom: 1.6rem; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 1.05rem 1.15rem; transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.stat-key { font-size: .77rem; color: var(--muted); }
.stat-val { font-size: 1.5rem; font-weight: 700; letter-spacing: -.04em; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .78rem; color: var(--muted-2); }
.stat-val.is-due { color: var(--bad); }
.stat-val.is-paid { color: var(--good); }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 1.2rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h3 { font-size: 1rem; }
.panel-body { padding: 1.2rem; }

.table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.table th { font-size: .73rem; font-weight: 500; color: var(--muted); text-align: left; padding: .75rem 1.2rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .8rem 1.2rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .2s ease; }
.table tbody tr:hover { background: var(--ivory-2); }
.table .ta-r { text-align: right; }
.table a { color: var(--ink); text-decoration: none; font-weight: 500; }
.table a:hover { color: var(--coral-deep); }
.table-scroll { overflow-x: auto; }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .73rem; font-weight: 500; padding: .2rem .58rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: var(--white); white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-paid      { color: var(--good); border-color: rgba(15,143,99,.3); background: rgba(52,211,153,.14); }
.badge-overdue   { color: var(--bad);  border-color: rgba(224,75,42,.3);  background: rgba(255,108,76,.12); }
.badge-pending   { color: var(--warn); border-color: rgba(194,118,26,.3); background: rgba(255,169,70,.16); }
.badge-sent      { color: #5B2C8D;     border-color: rgba(139,92,246,.3); background: var(--lavender); }
.badge-draft     { color: var(--muted-2); }
.badge-cancelled { color: var(--muted-2); text-decoration: line-through; }

.empty { text-align: center; padding: 3.2rem 1.5rem; }
.empty h3 { margin-bottom: .45rem; }
.empty p { color: var(--muted); max-width: 42ch; margin-inline: auto; }
.empty .btn { margin-top: 1.1rem; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.1rem; }
.filters input, .filters select { width: auto; min-width: 148px; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .81rem; padding: .36rem .74rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--muted);
  text-decoration: none; cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s var(--ease-out);
}
.chip:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.chip.is-on { background: var(--teal); color: var(--ivory); border-color: var(--teal); }

.pager { display: flex; gap: .45rem; justify-content: center; margin-top: 1.4rem; }
.seen-dot { display: inline-flex; align-items: center; gap: .3rem; font-size: .73rem; color: var(--coral-deep); }
.seen-dot i { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.show-sm { display: none; }

/* ---------- Builder --------------------------------------------------------------------- */

.builder { display: grid; grid-template-columns: minmax(390px, 470px) 1fr; min-height: 100vh; }
.builder-form { background: var(--white); border-right: 1px solid var(--line); padding: 1.4rem 1.5rem 6rem; overflow-y: auto; max-height: 100vh; }
.builder-stage {
  background: var(--ivory-2); padding: 1.4rem; overflow-y: auto; max-height: 100vh;
  background-image: radial-gradient(rgba(3,79,70,.09) 1px, transparent 1px);
  background-size: 24px 24px;
}
.builder-top { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.builder-top .back { color: var(--muted); text-decoration: none; font-size: .88rem; }
.builder-top .back:hover { color: var(--teal); }

.step { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.step:first-of-type { padding-top: 0; }
.step > summary { display: flex; align-items: center; gap: .7rem; cursor: pointer; list-style: none; font-size: 1.02rem; font-weight: 600; letter-spacing: -.02em; }
.step > summary::-webkit-details-marker { display: none; }
.step > summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px; flex: none;
  border-right: 1.6px solid var(--muted-2); border-bottom: 1.6px solid var(--muted-2);
  transform: rotate(45deg); transition: transform .3s var(--ease-out);
}
.step[open] > summary::after { transform: rotate(-135deg); }
.step-no { font-size: .7rem; font-weight: 600; color: var(--teal); background: var(--mint); border-radius: 6px; padding: .1rem .38rem; flex: none; font-variant-numeric: tabular-nums; }
.step-body { padding-top: 1rem; }
.step-sub { font-size: .8rem; color: var(--muted-2); font-weight: 400; }

.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .42rem; }
.type-btn { font: inherit; font-size: .81rem; cursor: pointer; text-align: center; padding: .5rem .3rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--muted); transition: all .2s ease; }
.type-btn:hover { border-color: var(--teal); color: var(--teal); }
.type-btn.is-on { background: var(--teal); color: var(--ivory); border-color: var(--teal); }

.swatches { display: flex; gap: .42rem; flex-wrap: wrap; align-items: center; }
.swatch { width: 27px; height: 27px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); cursor: pointer; padding: 0; transition: transform .2s var(--ease-out); }
.swatch:hover { transform: scale(1.14); }
.swatch.is-on { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--teal); }

.magic-box { background: var(--lavender); border: 1px solid rgba(139,92,246,.25); border-radius: var(--r-sm); padding: .85rem; margin-bottom: 1rem; }
.magic-box .lbl { color: #40206B; }
.magic-row { display: flex; gap: .5rem; }
.magic-row input { flex: 1; }
.magic-ex { font-size: .77rem; color: rgba(64,32,107,.7); margin: .5rem 0 0; }
.magic-ex button { background: none; border: 0; color: #5B2C8D; cursor: pointer; font: inherit; font-size: .77rem; padding: 0 .2rem; text-decoration: underline; }

.items-head, .item-row { display: grid; grid-template-columns: 1fr 60px 90px 56px 26px; gap: .4rem; align-items: start; }
.items-head { font-size: .72rem; color: var(--muted); margin-bottom: .35rem; }
.items-head span:not(:first-child) { text-align: right; }
.item-row { margin-bottom: .42rem; animation: rowIn .35s var(--ease-out); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.item-row input { padding: .46rem .55rem; font-size: .86rem; }
.item-row .item-desc-wrap { display: grid; gap: .3rem; }
.item-del { background: none; border: 0; color: var(--muted-2); cursor: pointer; font-size: 1.15rem; line-height: 1; padding: .4rem 0; align-self: center; }
.item-del:hover { color: var(--bad); }
.items-notax .items-head, .items-notax .item-row { grid-template-columns: 1fr 60px 90px 26px; }

.builder-bar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; gap: .55rem; align-items: center; flex-wrap: wrap;
  padding: .8rem 1.5rem; margin: 0 -1.5rem -6rem;
  background: rgba(255,255,255,.94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.builder-bar .total-live { margin-right: auto; }
.total-live span { font-size: .73rem; color: var(--muted); display: block; }
.total-live strong { font-size: 1.18rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

.stage-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tpl-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.tpl-card { border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: .55rem; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color .2s ease, box-shadow .2s ease, transform .3s var(--ease-out); }
.tpl-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.tpl-card.is-active { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,108,76,.2); }
.tpl-thumb { aspect-ratio: 1 / 1.28; border: 1px solid var(--line-2); border-radius: 7px; margin-bottom: .45rem; overflow: hidden; background: #fff; }
.tpl-thumb svg { width: 100%; height: 100%; display: block; }
.tpl-name { font-weight: 600; font-size: .88rem; }
.tpl-note { font-size: .75rem; color: var(--muted-2); line-height: 1.35; }

/* ---------- Command palette --------------------------------------------------------------- */

.cmdk { position: fixed; inset: 0; z-index: 400; display: none; }
.cmdk.is-open { display: block; }
.cmdk-veil { position: absolute; inset: 0; background: rgba(3,79,70,.38); backdrop-filter: blur(6px); animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.cmdk-box { position: relative; z-index: 2; width: 92%; max-width: 540px; margin: 12vh auto 0; background: var(--white); border-radius: var(--r); box-shadow: var(--shadow-lg); overflow: hidden; animation: cmdkIn .28s var(--ease-out); }
@keyframes cmdkIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.cmdk-box input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 1rem 1.15rem; font-size: .98rem; }
.cmdk-box input:focus { box-shadow: none; border-color: var(--line); }
.cmdk-list { max-height: 330px; overflow-y: auto; padding: .4rem; }
.cmdk-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .72rem; border-radius: 10px; border: 0; background: none; font: inherit; font-size: .91rem; color: var(--ink); cursor: pointer; text-align: left; text-decoration: none; }
.cmdk-item small { margin-left: auto; color: var(--muted-2); font-size: .77rem; }
.cmdk-item.is-sel, .cmdk-item:hover { background: var(--ivory-2); }
.cmdk-empty { padding: 1.5rem; text-align: center; color: var(--muted); font-size: .89rem; }

/* ---------- Admin ------------------------------------------------------------------------ */

.bars { display: flex; align-items: flex-end; gap: 3px; height: 116px; }
.bars > div { flex: 1; background: var(--mint); border-radius: 4px 4px 0 0; min-height: 3px; opacity: .9; transform-origin: bottom; transition: opacity .2s ease; animation: barGrow .6s var(--ease-out) backwards; }
@keyframes barGrow { from { transform: scaleY(0); } }
.bars > div:hover { opacity: 1; }
.bar-axis { display: flex; justify-content: space-between; font-size: .73rem; color: var(--muted-2); margin-top: .45rem; }

.meter { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--teal); border-radius: 999px; transition: width .8s var(--ease-out); }

.split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.3rem; align-items: start; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .89rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---------- Share page --------------------------------------------------------------------- */

.share-shell { background: var(--ivory-2); min-height: 100vh; padding: 1.3rem 0 4rem; }
.share-bar { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; max-width: 880px; margin: 0 auto 1.2rem; padding-inline: 16px; }
.share-bar .share-meta { margin-right: auto; font-size: .89rem; color: var(--muted); }
.share-bar .share-meta strong { color: var(--ink); }

/* ---------- Email editor ---------------------------------------------------------------------- */

.mail-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.mail-preview { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--ivory-2); padding: 1rem; }
.mail-preview iframe { width: 100%; height: 520px; border: 0; border-radius: 10px; background: #fff; display: block; }
.var-list { display: flex; gap: .35rem; flex-wrap: wrap; }
.var-list button { font: inherit; font-size: .75rem; padding: .2rem .5rem; border-radius: 6px; border: 1px solid var(--line); background: var(--white); color: var(--muted); cursor: pointer; }
.var-list button:hover { border-color: var(--coral-deep); color: var(--coral-deep); }
.code-area { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .83rem; line-height: 1.6; min-height: 310px; }

/* ---------- Motion preferences ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .rise { opacity: 1; transform: none; }
  .fly-col, .ticker-track, .rail-track { animation: none !important; }
}

/* ---------- Responsive ---------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .builder { grid-template-columns: 1fr; }
  .builder-form { max-height: none; overflow: visible; border-right: 0; }
  /* overflow:hidden also sets the grid item's automatic minimum size to zero,
     which is what stops the 210mm sheet from forcing the page wider. */
  .builder { min-height: 0; }
  .builder-stage { max-height: none; overflow: hidden; border-right: 0; border-top: 1px solid var(--line); }
  .stage-bar { position: sticky; top: 0; z-index: 5; background: var(--ivory-2); padding-block: .6rem; margin-top: -.6rem; }
}

@media (max-width: 980px) {
  .duo { grid-template-columns: 1fr; gap: 12px; }
  .duo-arrow { height: 42px; }
  .duo-arrow::before { width: 1px; height: 100%; left: 50%; right: auto; top: 0; background: linear-gradient(180deg, transparent, var(--coral), transparent); }
  .duo-arrow-dot { transform: rotate(90deg); }
  .pin { grid-template-columns: 1fr; }
  .pin-visual { position: relative; top: 0; height: 320px; min-height: 0; margin-bottom: 1.4rem; }
  .pin-step { padding: 1.5rem 0; }
  .pin-step h3 { opacity: 1; }
  .pin-step p { color: rgba(255,255,235,.74); }
  .fly { grid-template-columns: repeat(2, 1fr); height: 460px; }
  .fly-col:nth-child(3) { display: none; }
  .vs { grid-template-columns: 1fr; }
  .money-rail { height: 250px; }
  .money-invoice { width: 150px; }
  .money-wallet { width: 190px; padding: 1rem; }
}

@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex; position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .2rem; padding: .7rem;
    background: rgba(255,255,235,.98); backdrop-filter: blur(18px);
    border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  }
  .nav-links.is-open > a { padding: .55rem .6rem; }
  .nav-burger { display: block; margin-left: auto; }
  .nav-inner > .btn { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell-4, .cell-3, .cell-2, .cell-6 { grid-column: span 2; }
  .steps { grid-template-columns: 1fr; }
  .counter-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: .5rem; overflow-x: auto; padding: .7rem 1rem; }
  .side-group { display: flex; gap: .4rem; align-items: center; }
  .side-group > p, .side-foot .kbd { display: none; }
  .side-foot { margin: 0 0 0 auto; }
}

@media (max-width: 620px) {
  .announce { font-size: .72rem; }
  .announce .go { display: none; }
  .announce .rot b { white-space: nowrap; }
  .wash i { filter: blur(60px); }
  .wash i:nth-child(1) { width: 90vw; height: 90vw; left: -26vw; top: -28vw; }
  .wash i:nth-child(2) { width: 82vw; height: 82vw; right: -30vw; top: 6vw; }
  .bento { grid-template-columns: 1fr; }
  .cell-4, .cell-3, .cell-2, .cell-6 { grid-column: span 1; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .tpl-strip { grid-template-columns: repeat(2, 1fr); }
  .type-grid { grid-template-columns: repeat(3, 1fr); }
  .counter-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .fly { grid-template-columns: 1fr; height: 400px; }
  .fly-col:nth-child(2) { display: none; }
  .items-head, .item-row { grid-template-columns: 1fr 46px 68px 42px 20px; gap: .3rem; }
  .items-notax .items-head, .items-notax .item-row { grid-template-columns: 1fr 46px 68px 20px; }
  .items-head { font-size: .66rem; }
  .item-row input { padding: .44rem .4rem; font-size: .82rem; }
  .main { padding: 1.3rem 1rem 3rem; }

  /* Builder on a phone */
  .builder-form { padding: 1.1rem 1rem 5.5rem; }
  .builder-stage { padding: 1rem .8rem 2rem; }
  .builder-bar { padding: .7rem 1rem; margin: 0 -1rem -5.5rem; gap: .45rem; }
  .builder-bar .btn { flex: 1; justify-content: center; padding-inline: .6rem; font-size: .84rem; }
  .builder-bar .total-live { flex: 1 0 100%; margin: 0 0 .5rem; display: flex;
    align-items: baseline; justify-content: space-between; }
  .builder-bar .total-live span { margin: 0; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .type-btn { padding: .58rem .3rem; }
  .step > summary { font-size: .98rem; }
  .tpl-strip { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .magic-row { flex-direction: column; }
  .magic-row .btn { width: 100%; }
  .swatch { width: 32px; height: 32px; }
  .show-sm { display: inline-flex; }
  .money { padding: 1.8rem 1.1rem 2rem; }
  .money-rail { height: 340px; }
  .money-tag { margin-top: -170px; font-size: .7rem; }
  .money-invoice { width: 132px; margin-top: -140px; padding: 12px; }
  .money-invoice .mi-total b { font-size: .82rem; }
  .money-wallet { width: 172px; margin-top: 34px; padding: .9rem 1rem; }
  .money-wallet .amt { font-size: 1.35rem; }
  .money-wallet .row { font-size: .72rem; }
  .coin { width: 40px; height: 40px; margin: -20px 0 0 -20px; font-size: 1.05rem; }
  .money-cur { font-size: .74rem; margin-top: 1.2rem; }
  .duo-note { min-height: 210px; }
}

/* ==========================================================================
   Pricing
   ========================================================================== */

.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 900px; margin-inline: auto; }

.plan {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 2rem 1.8rem;
  display: flex; flex-direction: column;
}
.plan-pro { background: var(--teal); border-color: transparent; color: var(--ivory); }
.plan-flag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--mint); color: var(--teal); font-size: .72rem; font-weight: 600;
  padding: .22rem .8rem; border-radius: 999px; white-space: nowrap;
}
.plan-head { margin-bottom: 1.2rem; }
.plan-name { font-size: 1.25rem; margin-bottom: .35rem; }
.plan-sub { font-size: .88rem; color: var(--muted); margin: 0; }
.plan-pro .plan-sub { color: rgba(255,255,235,.65); }

.plan-price { display: flex; align-items: baseline; gap: .5rem; margin-bottom: 1rem; }
.plan-price .amt { font-size: 2.5rem; font-weight: 700; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.plan-price .per { font-size: .85rem; color: var(--muted); }
.plan-pro .plan-price .per { color: rgba(255,255,235,.6); }

.plan-toggle {
  display: flex; gap: 3px; padding: 3px; border-radius: 999px;
  background: rgba(255,255,235,.1); margin-bottom: .6rem;
}
.plan-toggle button {
  flex: 1; border: 0; background: transparent; color: rgba(255,255,235,.65);
  font: inherit; font-size: .8rem; padding: .4rem .6rem; border-radius: 999px; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.plan-toggle button.is-on { background: var(--mint); color: var(--teal); font-weight: 600; }
.plan-billed { font-size: .78rem; color: rgba(255,255,235,.6); margin: 0 0 1.1rem; text-align: center; }

.plan .btn { margin-bottom: 1.4rem; }

.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.plan-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .89rem; line-height: 1.45; }
.plan-list li small { display: block; font-size: .78rem; color: var(--muted-2); }
.plan-pro .plan-list li small { color: rgba(255,255,235,.5); }
.plan-list li.off { color: var(--muted-2); }
.plan-list i { width: 16px; height: 16px; border-radius: 50%; flex: none; margin-top: .18rem; position: relative; }
.plan-list i.ok { background: var(--mint); }
.plan-list i.ok::after {
  content: ""; position: absolute; left: 5px; top: 3px; width: 4px; height: 7px;
  border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(42deg);
}
.plan-list i.no { background: var(--line); }
.plan-list i.no::after {
  content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 2px; background: var(--muted-2);
}
.plan-pro .plan-list i.no { background: rgba(255,255,235,.2); }

.plan-note { text-align: center; font-size: .85rem; color: var(--muted); margin: 1.8rem auto 0; max-width: 52ch; }

/* Side-by-side table */
.cmp { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--white); }
.cmp-row {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 1rem;
  padding: .9rem 1.3rem; border-bottom: 1px solid var(--line-2); font-size: .89rem; align-items: center;
}
.cmp-row:last-child { border-bottom: 0; }
.cmp-row span small { display: block; font-size: .78rem; color: var(--muted-2); margin-top: .1rem; }
.cmp-head { background: var(--ivory-2); font-weight: 600; font-size: .8rem; color: var(--muted); }
.cmp-row .yes { color: var(--good); font-weight: 500; }
.cmp-row .no { color: var(--muted-2); }
.cmp-row > span:nth-child(2), .cmp-row > span:nth-child(3) { text-align: center; }

/* ---------- Upgrade screen ---------------------------------------------- */

.upgrade { max-width: 460px; margin-inline: auto; }
.upgrade-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 2rem; box-shadow: var(--shadow-lg); }
.upgrade-line { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.upgrade-line:last-of-type { border-bottom: 0; }
.upgrade-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: .8rem; padding-top: .9rem; border-top: 2px solid var(--teal); }
.upgrade-total b { font-size: 1.5rem; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.period-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.3rem; }
.period-pick label {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .85rem;
  cursor: pointer; text-align: center; transition: border-color .2s ease, background .2s ease;
}
.period-pick input { position: absolute; opacity: 0; }
.period-pick label.is-on { border-color: var(--teal); background: var(--ivory-2); }
.period-pick b { display: block; font-size: 1.1rem; letter-spacing: -.03em; }
.period-pick span { font-size: .77rem; color: var(--muted); }
.period-pick .save { color: var(--good); font-weight: 600; }

/* ---------- Pro locks in the app ------------------------------------------ */

.lock-note {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  background: var(--lavender); border: 1px solid rgba(139,92,246,.25);
  border-radius: var(--r-sm); padding: .8rem 1rem; font-size: .87rem; color: #40206B;
  margin-bottom: 1.1rem;
}
.lock-note .btn { margin-left: auto; }
.tpl-card.is-locked { opacity: .55; }
.tpl-card.is-locked .tpl-thumb { position: relative; }
.tpl-card.is-locked .tpl-thumb::after {
  content: "Pro"; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(3,79,70,.55); color: var(--ivory); font-size: .74rem; font-weight: 600;
}
.plan-badge {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600;
  padding: .18rem .55rem; border-radius: 999px; background: var(--mint); color: var(--teal);
}
.plan-badge.free { background: var(--line-2); color: var(--muted); }

@media (max-width: 820px) {
  .plans { grid-template-columns: 1fr; }
  .cmp-row { grid-template-columns: 1.4fr 1fr 1fr; padding-inline: 1rem; font-size: .84rem; }
}

/* ==========================================================================
   Client portal
   ========================================================================== */

.portal { min-height: 100vh; background: var(--ivory); display: flex; flex-direction: column; }

.portal-head {
  position: relative; overflow: hidden;
  background: var(--teal); color: var(--ivory);
  padding: 2.6rem 0 2.4rem;
}
.portal-head::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 90% at 88% 30%, rgba(52,211,153,.22), transparent 62%),
              radial-gradient(55% 90% at 10% 90%, rgba(255,108,76,.16), transparent 62%);
}
.portal-head .wrap { position: relative; z-index: 2; }

.portal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.portal-head .eyebrow { color: rgba(255,255,235,.6); margin-bottom: .5rem; }
.portal-head .eyebrow::before { background: var(--mint); box-shadow: 0 0 0 4px rgba(52,211,153,.2); }
.portal-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--ivory); }
.portal-from { color: rgba(255,255,235,.7); font-size: .95rem; margin: .5rem 0 0; }
.portal-from strong { color: var(--ivory); font-weight: 600; }
.portal-logo { max-height: 54px; max-width: 160px; object-fit: contain; background: #fff; padding: 8px 12px; border-radius: 10px; flex: none; }

.portal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 2rem; }
.pstat {
  background: rgba(255,255,235,.08); border: 1px solid rgba(255,255,235,.16);
  border-radius: var(--r); padding: 1rem 1.15rem;
}
.pstat span { display: block; font-size: .78rem; color: rgba(255,255,235,.62); }
.pstat b {
  display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: -.04em;
  margin-top: .3rem; font-variant-numeric: tabular-nums;
}
.pstat b.is-due { color: #FFB4A0; }
.pstat small { display: block; font-size: .76rem; color: rgba(255,255,235,.5); margin-top: .2rem; }

.portal-pay { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }
.portal-pay span { font-size: .84rem; color: rgba(255,255,235,.6); }

.portal-body { padding: 2rem 24px 3rem; flex: 1; }
.portal-contact { text-align: center; margin-top: 2.4rem; font-size: .92rem; }
.portal-contact p { margin: 0 0 .3rem; }
.portal-contact .muted { color: var(--muted); font-size: .87rem; }

.portal-foot { border-top: 1px solid var(--line); padding: 1.4rem 0 2rem; }
.portal-foot .wrap {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .84rem; color: var(--muted-2);
}
.portal-foot a { color: var(--muted); }

@media (max-width: 700px) {
  .portal-stats { grid-template-columns: 1fr; gap: 10px; }

  /* A seven-column table cannot survive a phone. Turn each row into a card. */
  .portal .table thead { display: none; }
  .portal .table, .portal .table tbody, .portal .table tr, .portal .table td { display: block; width: 100%; }
  .portal .table tr {
    padding: .95rem 1.1rem; border-bottom: 1px solid var(--line-2);
    display: grid; grid-template-columns: 1fr auto; gap: .3rem .8rem; align-items: baseline;
  }
  .portal .table tr:last-child { border-bottom: 0; }
  .portal .table td { padding: 0; border: 0; }
  .portal .table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .portal .table td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
  .portal .table td:nth-child(2)::before { content: "Issued "; color: var(--muted-2); }
  .portal .table td:nth-child(3)::before { content: "Due "; color: var(--muted-2); }
  .portal .table td:nth-child(2),
  .portal .table td:nth-child(3) { grid-column: 1; font-size: .8rem; color: var(--muted); text-align: left; }
  .portal .table td:nth-child(2) { grid-row: 2; }
  .portal .table td:nth-child(3) { grid-row: 3; }
  .portal .table td:nth-child(5)::before { content: "Total "; color: var(--muted-2); }
  .portal .table td:nth-child(6)::before { content: "Outstanding "; color: var(--muted-2); }
  .portal .table td:nth-child(5) { grid-column: 2; grid-row: 2; text-align: right; }
  .portal .table td:nth-child(6) { grid-column: 2; grid-row: 3; text-align: right; }
  .portal .table td:nth-child(7) { grid-column: 1 / -1; grid-row: 4; text-align: left; margin-top: .55rem; }
  .pstat { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
  .pstat b { margin-top: 0; font-size: 1.25rem; }
  .pstat small { display: none; }
  .portal-top { flex-direction: column-reverse; align-items: flex-start; }
  .portal-logo { max-height: 44px; }
}

/* ---------- Plain-English entry ------------------------------------------ */

.plain-box {
  background: var(--teal); color: var(--ivory);
  border-radius: var(--r-sm); padding: 1rem 1.05rem; margin-bottom: .9rem;
}
.plain-box .lbl { color: var(--ivory); margin-bottom: .3rem; }
.plain-hint { font-size: .8rem; color: rgba(255,255,235,.62); margin: 0 0 .7rem; line-height: 1.45; }
.plain-box textarea {
  background: rgba(255,255,235,.07); border-color: rgba(255,255,235,.22);
  color: var(--ivory); font-size: .9rem; line-height: 1.5; min-height: 74px; resize: vertical;
}
.plain-box textarea::placeholder { color: rgba(255,255,235,.42); }
.plain-box textarea:focus {
  border-color: var(--mint); box-shadow: 0 0 0 4px rgba(52,211,153,.16); background: rgba(255,255,235,.1);
}
.plain-row { display: flex; gap: .5rem; margin-top: .6rem; }
.plain-box .btn-quiet { color: rgba(255,255,235,.6); }
.plain-box .btn-quiet:hover { color: var(--ivory); }
.plain-box .magic-ex { color: rgba(255,255,235,.55); margin-top: .7rem; }
.plain-box .magic-ex button { color: var(--mint); }

.plain-read {
  margin-top: .85rem; padding-top: .8rem; border-top: 1px solid rgba(255,255,235,.16);
  font-size: .82rem; line-height: 1.5;
}
.plain-read b { color: var(--ivory); }
.pr-chip {
  display: inline-block; background: rgba(255,255,235,.13); color: var(--ivory);
  border-radius: 999px; padding: .16rem .55rem; font-size: .76rem; margin: .25rem .25rem 0 0;
}
.pr-warn { color: var(--amber); margin-top: .5rem; }
.pr-note { color: rgba(255,255,235,.5); margin-top: .4rem; font-size: .78rem; }

@media (max-width: 620px) {
  .plain-row { flex-direction: column; }
  .plain-row .btn { width: 100%; }
}

/* ---------- Dictation ---------------------------------------------------- */

.btn-mic {
  background: rgba(255,255,235,.12); color: var(--ivory);
  border: 1px solid rgba(255,255,235,.28);
  display: inline-flex; align-items: center; gap: .45rem;
}
.btn-mic:hover { background: rgba(255,255,235,.2); box-shadow: none; }
.mic-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--mint); flex: none;
}
.btn-mic.is-live { background: var(--coral-deep); border-color: transparent; color: #fff; }
.btn-mic.is-live .mic-dot { background: #fff; animation: micPulse 1.1s ease-in-out infinite; }
@keyframes micPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.45); opacity: .45; }
}
.pr-lang {
  display: inline-block; background: var(--mint); color: var(--teal);
  font-size: .72rem; font-weight: 600; padding: .12rem .5rem;
  border-radius: 999px; margin-bottom: .45rem;
}

/* ---------- Client questions --------------------------------------------- */

.qnote {
  background: var(--ivory-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: .85rem 1rem; margin-bottom: .7rem;
}
.qnote.is-answered { background: var(--white); }
.qnote-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.qnote-when { font-size: .76rem; color: var(--muted-2); margin-left: auto; }
.qnote-doc { font-size: .78rem; color: var(--muted); margin: 0 0 .3rem; }
.qnote-body { font-size: .9rem; margin: 0 0 .5rem; line-height: 1.5; }
.qnote-reply {
  font-size: .86rem; color: var(--muted); margin: .5rem 0 0;
  padding-left: .7rem; border-left: 3px solid var(--mint); line-height: 1.5;
}
.qnote-form { margin-top: .6rem; }
.qnote-form textarea { min-height: 52px; font-size: .86rem; }
.qnote-actions { display: flex; gap: .4rem; margin-top: .45rem; }

/* ---------- Financial-year bar on the portal ----------------------------- */

.fy-bar {
  display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.fy-lab { font-size: .8rem; color: var(--muted); margin-right: .3rem; }
.fy-dl { margin-left: auto; }

@media (max-width: 620px) {
  .fy-dl { margin-left: 0; width: 100%; justify-content: center; }
}
