/* Jojee Consulting
   Layout: public pages are editorial bands on cream paper, anchored by a spreadsheet-grid motif from the logo;
   the admin and client portals use a side menu plus ledger-style tables. */
:root {
  --paper: #FAF7F1;
  --surface: #FFFFFF;
  --sunk: #F3EEE5;
  --ink: #2B2324;
  --muted: #6E6562;
  --line: #E5DDD1;
  --wine: #6E1F26;          /* fills: buttons, logo */
  --wine-hover: #561820;
  --wine-ink: #6E1F26;      /* text accents */
  --on-wine: #FFFFFF;
  --gold: #D19B33;
  --gold-soft: #F5E8C9;
  --gold-ink: #85590C;
  --vt-input: #EDF2F8;      /* input cells in template mockups */
  --vt-input-ink: #1E3A5C;
  --ok: #2E6A4E;  --ok-soft: #E1EFE7;
  --warn: #8F540A; --warn-soft: #F8EAD3;
  --bad: #A3302C;  --bad-soft: #F6E0DE;
  --shadow: 0 1px 2px rgba(70, 30, 30, .06), 0 10px 28px rgba(70, 30, 30, .07);

  --f-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "Jost", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 6px;
  --maxw: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161011; --surface: #201718; --sunk: #1B1314; --ink: #F2EBE6; --muted: #A99E99; --line: #3A2D2E;
    --wine: #9B3640; --wine-hover: #B2434E; --wine-ink: #E6A0A6; --on-wine: #FFFFFF;
    --gold: #E2B457; --gold-soft: #3A2C14; --gold-ink: #EBC67D; --vt-input: #1C2633; --vt-input-ink: #BCD0E8;
    --ok: #7CC4A0; --ok-soft: #1C3329; --warn: #E6B062; --warn-soft: #3A2A12; --bad: #EC8F8A; --bad-soft: #3D1E1C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161011; --surface: #201718; --sunk: #1B1314; --ink: #F2EBE6; --muted: #A99E99; --line: #3A2D2E;
  --wine: #9B3640; --wine-hover: #B2434E; --wine-ink: #E6A0A6; --on-wine: #FFFFFF;
  --gold: #E2B457; --gold-soft: #3A2C14; --gold-ink: #EBC67D; --vt-input: #1C2633; --vt-input-ink: #BCD0E8;
  --ok: #7CC4A0; --ok-soft: #1C3329; --warn: #E6B062; --warn-soft: #3A2A12; --bad: #EC8F8A; --bad-soft: #3D1E1C;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--paper);
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--wine-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 5.2vw, 4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; color: var(--muted);
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.prose { max-width: 65ch; display: grid; gap: 1rem; }
.stack { display: grid; gap: 1rem; }
.rule-gold { height: 2px; width: 72px; background: var(--gold); border: 0; margin: 0; }

/* ---------- Buttons, chips, forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 500 .95rem/1 var(--f-body); letter-spacing: .02em;
  padding: .85rem 1.4rem; border-radius: var(--radius); border: 1px solid var(--wine);
  background: var(--wine); color: var(--on-wine); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--wine-hover); border-color: var(--wine-hover); }
.btn-ghost { background: transparent; color: var(--wine-ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--sunk); border-color: var(--muted); color: var(--wine-ink); }
.btn-sm { padding: .55rem .95rem; font-size: .88rem; }
.btn-danger { background: transparent; color: var(--bad); border-color: var(--line); }
.btn-danger:hover, .btn-danger.armed { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--wine-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.chip {
  display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  font-size: .75rem; font-weight: 500; letter-spacing: .03em; padding: .2rem .6rem; border-radius: 999px;
  background: var(--sunk); color: var(--muted); border: 1px solid var(--line);
}
.chip-gold { background: var(--gold-soft); color: var(--gold-ink); border-color: transparent; }
.chip-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip-wine { background: transparent; color: var(--wine-ink); border-color: var(--wine-ink); }

.field { display: grid; gap: .35rem; min-width: 0; }
.field > span { font-size: .82rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.field small { color: var(--muted); font-size: .8rem; }
input, select, textarea {
  font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .65rem .75rem; width: 100%; min-width: 0;
}
textarea { resize: vertical; min-height: 6rem; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--wine); padding: 0; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: .55rem; font-size: .95rem; cursor: pointer; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.form-msg { font-size: .9rem; }
.form-msg.err { color: var(--bad); }
.form-msg.ok { color: var(--ok); }

/* ---------- Header / footer ---------- */
.announce { background: var(--wine); color: var(--on-wine); font-size: .88rem; text-align: center; }
.announce .wrap { padding-block: .55rem; }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--wine-ink); }
.brand .mark { width: 38px; height: auto; }
.wordmark { display: grid; line-height: 1; }
.wordmark b { font-family: var(--f-display); font-weight: 600; font-size: 1.55rem; letter-spacing: .32em; }
.wordmark small { font-family: var(--f-display); font-size: .66rem; letter-spacing: .42em; color: var(--muted); margin-top: .2rem; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: .95rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover { border-color: var(--line); }
.nav a[aria-current="page"] { border-color: var(--gold); color: var(--wine-ink); }
.nav .hidden-flag { font-size: .65rem; color: var(--muted); margin-left: .25rem; }
.nav-toggle { display: none; }
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem max(16px, env(safe-area-inset-right, 0px)) 1rem max(16px, env(safe-area-inset-left, 0px));
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: .75rem; }
}

.site-footer { border-top: 1px solid var(--line); margin-top: 5rem; }
.site-footer .wrap { padding-block: 3rem 2.5rem; display: grid; gap: 2rem; grid-template-columns: 1.3fr 1fr 1fr; }
.site-footer h4 { margin: 0 0 .75rem; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--wine-ink); text-decoration: underline; }
.tagline { font-size: .74rem; letter-spacing: .24em; color: var(--muted); text-transform: uppercase; }
.fine { font-size: .8rem; color: var(--muted); }
.footer-brand { display: grid; gap: 1rem; align-content: start; }
.footer-brand .brand .mark { width: 44px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- Public page sections ---------- */
.band { padding-block: 5rem; }
.band-tight { padding-block: 3rem; }
.band-sunk { background: var(--sunk); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: .9rem; margin-bottom: 2.5rem; max-width: 760px; }
.page-head { padding-block: 4.5rem 2.5rem; display: grid; gap: 1rem; }
.page-head .lede { margin-top: .25rem; }
.preview-flag {
  background: var(--warn-soft); color: var(--warn); font-size: .88rem;
}
.preview-flag .wrap { padding-block: .6rem; }

.hero { padding-block: 4.5rem 4rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.hero-copy { display: grid; gap: 1.4rem; }
.hero h1 em { font-style: italic; color: var(--wine-ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-proof { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .45rem; font-size: .92rem; color: var(--muted); }
.hero-proof li { display: flex; gap: .6rem; align-items: baseline; }
.hero-proof li::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--gold); transform: translateY(-1px); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* the "template" card: a nod to the grid in the logo */
.sheet {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow); overflow: hidden; min-width: 0;
}
.sheet-bar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .8rem 1rem; border-bottom: 1px solid var(--line); font-size: .85rem; font-weight: 500; }
.sheet-bar .tabs { display: flex; gap: .3rem; }
.sheet-bar .tabs i { width: 9px; height: 9px; border: 1.5px solid var(--wine-ink); display: block; }
.sheet-bar .tabs i.on { background: var(--gold); border-color: var(--gold); }
.sheet-scroll { overflow-x: auto; }
.sheet table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { padding: .6rem .9rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: right; white-space: nowrap; }
.sheet th:last-child, .sheet td:last-child { border-right: 0; }
.sheet th { font-weight: 500; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--sunk); }
.sheet th:first-child, .sheet td:first-child { text-align: left; color: var(--ink); }
.sheet td.cell-gold { background: var(--gold-soft); color: var(--gold-ink); font-weight: 600; box-shadow: inset 0 0 0 2px var(--gold); }
.sheet figcaption { display: flex; gap: .6rem; align-items: center; padding: .8rem 1rem; font-size: .85rem; color: var(--muted); }
.sheet figcaption::before { content: ""; width: 10px; height: 10px; background: var(--gold); flex: none; }

.pain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pain { background: var(--paper); padding: 1.8rem 1.6rem; display: grid; gap: .7rem; align-content: start; }
.pain .when { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; }
.pain h3 { font-size: 1.35rem; }
.pain p { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .pain-grid { grid-template-columns: 1fr; } }

/* planning-year calendar */
.cal-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; }
.cal { display: grid; grid-template-columns: 200px repeat(12, minmax(46px, 1fr)); min-width: 780px; font-size: .85rem; }
.cal > div { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: .6rem .5rem; min-height: 46px; display: flex; align-items: center; }
.cal > div:nth-child(13n) { border-right: 0; }
.cal .mh { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--sunk); justify-content: center; min-height: 0; }
.cal .rl { font-weight: 500; padding-left: 1rem; flex-direction: column; align-items: flex-start; justify-content: center; gap: .1rem; line-height: 1.25; }
.cal .rl small { color: var(--muted); font-weight: 400; font-size: .75rem; }
.cal .on { position: relative; }
.cal .on::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 7px); height: 14px; background: var(--wine); opacity: .85; transform-origin: left center; }
.cal .on.start::after { left: 6px; }
.cal .on.end::after { right: 6px; }
.cal .tick::after { content: ""; position: absolute; left: calc(50% - 6px); top: calc(50% - 6px); width: 12px; height: 12px; background: var(--gold); }
.cal.in .on::after { animation: grow-x .5s cubic-bezier(.3, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
.cal.in .tick::after { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i, 0) * 60ms + 100ms); }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.cal .tick { position: relative; }
.cal > div:nth-last-child(-n+13) { border-bottom: 0; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: .9rem; font-size: .85rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.cal-legend i { width: 14px; height: 10px; background: var(--wine); display: inline-block; }
.cal-legend i.g { width: 10px; background: var(--gold); }

.card-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; display: grid; gap: .8rem; align-content: start; }
.card p { color: var(--muted); font-size: .95rem; }
.card .more { font-size: .9rem; font-weight: 500; text-decoration: none; }
.card .more:hover { text-decoration: underline; }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr; } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.steps li { display: grid; gap: .6rem; padding-top: 1.2rem; border-top: 2px solid var(--wine); counter-increment: step; }
.steps li::before { content: "Step " counter(step); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; }
.steps p { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 3.5rem; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 2rem; } }

.cta-band { background: var(--wine); color: var(--on-wine); }
.cta-band .wrap { padding-block: 3.5rem; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.cta-band h2 { color: var(--on-wine); max-width: 22ch; }
.cta-band .btn { background: var(--gold); border-color: var(--gold); color: #2B2324; }
.cta-band .btn:hover { filter: brightness(1.06); }

/* services page */
.svc-list { display: grid; }
.svc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2.5rem; padding-block: 2.5rem; border-top: 1px solid var(--line); }
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc-head { display: grid; gap: .7rem; align-content: start; }
.svc-head .chip { justify-self: start; }
.svc-body { display: grid; gap: 1rem; }
.svc-body > p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
.ticks li { display: flex; gap: .65rem; font-size: .95rem; }
.ticks li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .6rem; background: var(--gold); }
@media (max-width: 800px) { .svc { grid-template-columns: 1fr; gap: 1rem; } .ticks { grid-template-columns: 1fr; } }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.plan.featured { border: 2px solid var(--wine); box-shadow: var(--shadow); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 1.6rem; }
.plan h3 { font-size: 1.6rem; }
.price { font-family: var(--f-display); font-size: 2.8rem; font-weight: 600; line-height: 1; color: var(--wine-ink); font-variant-numeric: tabular-nums; }
.price small { font-family: var(--f-body); font-size: .9rem; font-weight: 400; color: var(--muted); }
.plan .hours { font-size: .9rem; font-weight: 500; }
.plan .per-month { font-size: .82rem; color: var(--muted); margin-top: -.6rem; font-variant-numeric: tabular-nums; }
.plan .blurb { color: var(--muted); font-size: .93rem; }
.plan ul { list-style: none; padding: 1rem 0 0; margin: 0; border-top: 1px solid var(--line); display: grid; gap: .5rem; font-size: .92rem; flex: 1; align-content: start; }
.plan li { display: flex; gap: .6rem; }
.plan li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .55rem; background: var(--gold); }
.pricing-note { margin-top: 1.5rem; color: var(--muted); font-size: .92rem; max-width: 75ch; }
.faq { display: grid; gap: 0; max-width: 820px; }
.faq details { border-top: 1px solid var(--line); padding-block: 1.1rem; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--f-display); font-size: 1.3rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold-ink); font-family: var(--f-body); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: .7rem; color: var(--muted); max-width: 70ch; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 4rem; align-items: start; }
.portrait { aspect-ratio: 4 / 5; max-width: 100%; background: var(--sunk); border: 1px solid var(--line); display: grid; place-items: center; position: relative; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .mark { width: 42%; opacity: .9; }
.portrait figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: .7rem 1rem; font-size: .78rem; color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); }
.about-side { display: grid; gap: 1.5rem; }
.creds { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.creds li { display: flex; gap: .7rem; font-size: .95rem; }
.creds li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .6rem; background: var(--gold); }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.principles div { display: grid; gap: .5rem; align-content: start; padding-top: 1rem; border-top: 1px solid var(--line); }
.principles p { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .about-grid, .principles { grid-template-columns: 1fr; gap: 2rem; } .portrait { max-width: 320px; } }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.contact-aside { display: grid; gap: 1.6rem; }
.contact-aside dl { margin: 0; display: grid; gap: 1.1rem; }
.contact-aside dt { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact-aside dd { margin: .2rem 0 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.copy-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.success { display: grid; gap: .8rem; padding: 1rem 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } }

/* login */
.login-wrap { max-width: 460px; margin: 0 auto; padding-block: 4rem 2rem; display: grid; gap: 1.5rem; }
.login-wrap .mark { width: 56px; justify-self: center; }
.login-wrap h1 { font-size: 2.4rem; text-align: center; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); padding: 3px; background: var(--sunk); }
.seg button { font: inherit; font-size: .92rem; border: 0; background: transparent; padding: .6rem; border-radius: 4px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.demo-hint { font-size: .85rem; color: var(--muted); background: var(--sunk); border: 1px dashed var(--line); padding: .8rem 1rem; border-radius: var(--radius); }
.demo-hint code { font-size: .85rem; color: var(--ink); }

/* ---------- App shell (admin + portal) ---------- */
.app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; padding-block: 2.5rem; align-items: start; }
.side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 96px); display: grid; gap: .2rem; }
.side .who { padding: 0 .75rem 1rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); display: grid; gap: .15rem; }
.side .who b { font-weight: 500; }
.side .who span { font-size: .8rem; color: var(--muted); }
.side button {
  font: inherit; font-size: .95rem; text-align: left; border: 0; background: transparent; color: var(--ink);
  padding: .6rem .75rem; border-radius: var(--radius); cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.side button:hover { background: var(--sunk); }
.side button[aria-current="true"] { background: var(--surface); box-shadow: inset 3px 0 0 var(--gold); color: var(--wine-ink); font-weight: 500; }
.side .count { font-size: .72rem; background: var(--wine); color: var(--on-wine); border-radius: 999px; padding: .05rem .5rem; }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 1.5rem; }
  .side { position: static; display: flex; overflow-x: auto; gap: .3rem; border-bottom: 1px solid var(--line); padding-bottom: .6rem; }
  .side .who { display: none; }
  .side button { white-space: nowrap; }
}
.app-main { display: grid; gap: 1.75rem; min-width: 0; }
.app-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; }
.app-head h1 { font-size: clamp(2rem, 3.6vw, 2.6rem); }
.app-head .sub { color: var(--muted); margin-top: .3rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.toolbar select, .toolbar input { width: auto; padding: .5rem .65rem; font-size: .9rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 1.4rem; }
.panel-body { padding: 1.25rem; display: grid; gap: 1rem; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kpi { background: var(--surface); padding: 1.1rem 1.25rem; display: grid; gap: .3rem; align-content: start; }
.kpi .label { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi .value { font-family: var(--f-display); font-size: 2.1rem; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: .82rem; color: var(--muted); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.meter { height: 8px; background: var(--sunk); border-radius: 999px; overflow: hidden; position: relative; min-width: 80px; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--wine); border-radius: 999px; }
.meter.over i { background: var(--gold); }

.table-scroll { overflow-x: auto; }
table.ledger { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ledger th { text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--sunk); white-space: nowrap; }
.ledger td { padding: .8rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger .nowrap { white-space: nowrap; }
.ledger .what { font-weight: 500; }
.ledger .why { color: var(--muted); font-size: .85rem; margin-top: .2rem; }
.ledger .why b { font-weight: 500; color: var(--gold-ink); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; margin-right: .35rem; }
.ledger tfoot td { font-weight: 600; background: var(--sunk); border-top: 1px solid var(--line); }
.ledger .row-actions { display: flex; gap: .4rem; justify-content: flex-end; }
.empty { padding: 2.5rem 1.25rem; text-align: center; color: var(--muted); }

.bars { display: grid; gap: .8rem; }
.bar-row { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 64px; gap: .9rem; align-items: center; font-size: .9rem; }
.bar-track { height: 14px; background: var(--sunk); position: relative; }
.bar-track i { position: absolute; inset: 0 auto 0 0; background: var(--wine); }
.bar-row:first-child .bar-track i { background: var(--gold); }

.statement { display: grid; gap: .55rem; font-size: .95rem; }
.statement div { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.statement div span:first-child { color: var(--muted); }
.statement .total { border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .2rem; font-weight: 600; font-size: 1.05rem; }
.statement .total span:first-child { color: var(--ink); }

.two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

.timer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; }
.timer-display { font-family: var(--f-display); font-size: 2.4rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer.running .timer-display { color: var(--wine-ink); }
.timer .live { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); margin-right: .5rem; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.toggle-list { display: grid; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .t { display: grid; }
.toggle-row .t small { color: var(--muted); font-size: .82rem; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--wine); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .5; }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.plan-editor { display: grid; gap: 1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.plan-editor .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-editor .half { grid-column: span 2; }
.editor-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.editor-top b { font-family: var(--f-display); font-size: 1.25rem; font-weight: 600; }
.panel-head > div { display: grid; gap: .1rem; }
@media (max-width: 760px) { .plan-editor .form-grid { grid-template-columns: 1fr 1fr; } }

.inquiry { display: grid; gap: .5rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.inquiry:last-child { border-bottom: 0; }
.inquiry-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; align-items: center; }
.inquiry p { color: var(--muted); font-size: .93rem; white-space: pre-wrap; }

.toast {
  position: fixed; z-index: 50; left: 50%; transform: translateX(-50%);
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; border-radius: var(--radius); font-size: .9rem; box-shadow: var(--shadow);
}

/* ---------- Motion and interactive sections ---------- */
@keyframes rise { from { transform: translateY(22px); opacity: .25; } to { transform: none; opacity: 1; } }
@keyframes word-in { from { transform: translateY(.35em); opacity: 0; filter: blur(3px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.reveal.in { animation: rise .75s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }

/* hero: faint spreadsheet grid with a gold cell that hops between cells */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 80% 35%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 80% at 80% 35%, #000 0%, transparent 70%);
}
.hero > .wrap { position: relative; }
.hero-cell {
  position: absolute; width: 55px; height: 55px; top: 0; left: 0; background: var(--gold); opacity: .18; pointer-events: none;
  transform: translate(calc(56px * 18), calc(56px * 2)); animation: hop 14s steps(1, end) infinite;
}
@keyframes hop {
  0% { transform: translate(calc(56px * 18), calc(56px * 2)); }
  20% { transform: translate(calc(56px * 21), calc(56px * 1)); }
  40% { transform: translate(calc(56px * 16), calc(56px * 6)); }
  60% { transform: translate(calc(56px * 23), calc(56px * 5)); }
  80% { transform: translate(calc(56px * 13), calc(56px * 1)); }
}
@media (max-width: 900px) { .hero-cell { display: none; } }
.rotator { display: inline-block; font-style: italic; color: var(--wine-ink); position: relative; }
.rotator::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: 3px; background: var(--gold); transform-origin: left; }
.rotator.swap { animation: word-in .55s cubic-bezier(.2, .7, .2, 1); }
.rotator.swap::after { animation: grow-x .6s cubic-bezier(.3, .7, .2, 1) .1s both; }
.sheet { transition: transform .3s, box-shadow .3s; }
.sheet:hover { transform: translateY(-3px); }
.sheet td { transition: background-color .45s, color .45s, box-shadow .45s; }
.sheet figcaption.ok::before { background: var(--ok); }
.sheet figcaption.swap { animation: fade-in .4s ease-out; }

.btn .arr { display: inline-block; transition: transform .2s; }
.btn:hover .arr, .more:hover .arr { transform: translateX(4px); }
.more .arr { display: inline-block; transition: transform .2s; }

/* stats strip */
.stats-band { background: var(--wine); color: var(--on-wine); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: 2.2rem; gap: 1.5rem; }
.stat { display: grid; gap: .3rem; align-content: start; padding-left: 1.2rem; border-left: 1px solid rgba(255, 255, 255, .22); }
.stat b { font-family: var(--f-display); font-weight: 600; font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--gold); }
.stat b small { font-size: 1.3rem; color: var(--on-wine); opacity: .85; }
.stat > span { font-size: .9rem; opacity: .85; max-width: 24ch; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat b { font-size: 2.4rem; } }

/* cards */
.card { transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.card-ico { width: 44px; height: 44px; display: grid; place-items: center; background: var(--sunk); border: 1px solid var(--line); }
.card-ico .mini { width: 26px; height: auto; transition: transform .35s; }
.card:hover .card-ico .mini { transform: rotate(-8deg) scale(1.08); }
.pain { transition: background .25s; }
.pain:hover { background: var(--surface); }
.steps li { transition: border-color .25s; }
.steps li:hover { border-color: var(--gold); }

/* industries ticker */
.industries .section-head { margin-bottom: 2rem; }
.ticker {
  overflow: hidden; border-block: 1px solid var(--line); background: var(--surface);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-set { display: flex; }
.ind { font-family: var(--f-display); font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 600; padding: 1.1rem 2rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 2rem; color: var(--ink); }
.ind::after { content: ""; width: 10px; height: 10px; background: var(--gold); }
.ind:nth-child(even) { font-style: italic; color: var(--wine-ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* custom modules */
.core-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.75rem; }
.core-row .fine { margin-right: .35rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.mod-tabs { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.mod-list { display: grid; align-content: start; border-right: 1px solid var(--line); background: var(--sunk); }
.mod-list button {
  font: inherit; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink);
  padding: .9rem 1.2rem; cursor: pointer; display: grid; gap: .1rem; position: relative; transition: background .2s, padding-left .2s;
}
.mod-list button:last-child { border-bottom: 0; }
.mod-list button small { font-size: .75rem; color: var(--muted); letter-spacing: .04em; }
.mod-list button:hover { background: var(--surface); padding-left: 1.45rem; }
.mod-list button[aria-selected="true"] { background: var(--surface); color: var(--wine-ink); font-weight: 500; box-shadow: inset 4px 0 0 var(--gold); }
.mod-panel { padding: 2rem; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.mod-panel .chip { justify-self: start; }
.mod-panel h3 { font-size: 2rem; }
.mod-text { color: var(--muted); max-width: 60ch; }
.mod-panel.swap > * { animation: fade-in .45s cubic-bezier(.2, .7, .2, 1) both; }
.mod-panel.swap > *:nth-child(2) { animation-delay: .05s; }
.mod-panel.swap > *:nth-child(3) { animation-delay: .1s; }
.mod-panel.swap > *:nth-child(4) { animation-delay: .15s; }
.io { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); gap: 1rem; align-items: center; margin-top: .5rem; padding: 1.25rem; background: var(--paper); border: 1px solid var(--line); }
.io-col { display: grid; gap: .6rem; align-content: start; }
.ticks.one { grid-template-columns: 1fr; }
.io-arrow { height: 2px; background: var(--line); position: relative; overflow: hidden; }
.io-arrow span { position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: var(--gold); animation: flow 1.8s ease-in-out infinite; }
@keyframes flow { to { left: 100%; } }
@media (max-width: 860px) {
  .mod-tabs { grid-template-columns: 1fr; }
  .mod-list { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .mod-list button { border-bottom: 0; border-right: 1px solid var(--line); white-space: nowrap; }
  .mod-list button:hover { padding-left: 1.2rem; }
  .mod-list button[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--gold); }
  .mod-panel { padding: 1.4rem; }
  .io { grid-template-columns: 1fr; }
  .io-arrow { height: 24px; width: 2px; justify-self: center; }
  .io-arrow span { left: 0; top: -40%; width: 100%; height: 40%; animation-name: flow-y; }
}
@keyframes flow-y { to { top: 100%; } }

/* testimonials */
.quotes-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 3rem; align-items: start; }
.carousel { position: relative; padding-top: 1rem; }
.q-mark { position: absolute; top: -2.2rem; left: -.6rem; font-family: var(--f-display); font-size: 8rem; line-height: 1; color: var(--gold); opacity: .55; pointer-events: none; }
.carousel-stage { display: grid; position: relative; }
.quote-slide { grid-area: 1 / 1; margin: 0; display: grid; gap: 1.2rem; align-content: start; visibility: hidden; opacity: 0; transform: translateX(16px); transition: opacity .55s, transform .55s, visibility 0s .55s; }
.quote-slide.active { visibility: visible; opacity: 1; transform: none; transition: opacity .55s, transform .55s, visibility 0s; }
.quote-slide blockquote { margin: 0; font-family: var(--f-display); font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.3; font-weight: 500; text-wrap: pretty; }
.quote-slide figcaption { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; padding-top: 1rem; border-top: 1px solid var(--line); }
.q-name { font-weight: 600; }
.q-meta { color: var(--muted); font-size: .92rem; }
.carousel-nav { display: flex; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.round-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--wine-ink); font-size: 1.1rem; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.round-btn:hover { border-color: var(--wine-ink); transform: scale(1.06); }
.dots { display: flex; gap: .45rem; }
.dots button { width: 22px; height: 4px; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: background .3s, width .3s; }
.dots button[aria-current="true"] { background: var(--wine-ink); width: 40px; }
@media (max-width: 860px) { .quotes-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* portal testimonial history */
.t-history { display: grid; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.t-item { display: grid; gap: .4rem; padding: .9rem 1rem; background: var(--paper); border: 1px solid var(--line); }
.t-item p, .t-quote { font-family: var(--f-display); font-size: 1.15rem; color: var(--ink) !important; white-space: normal !important; }

/* ---------- Planning template mockups (Excel-style Vena templates) ---------- */
.vt {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
  overflow: hidden; min-width: 0; font-size: .78rem; line-height: 1.35; display: grid; text-align: left;
}
.vt-chrome { display: flex; align-items: center; gap: .7rem; padding: .5rem .8rem; background: var(--wine); color: var(--on-wine); }
.vt-dots { display: flex; gap: 5px; flex: none; }
.vt-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.vt-file { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-step { font-size: .7rem; background: rgba(255, 255, 255, .16); padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; }
.vt-ribbon { display: flex; gap: 1.1rem; padding: .4rem .8rem 0; background: var(--sunk); color: var(--muted); border-bottom: 1px solid var(--line); overflow: hidden; }
.vt-ribbon span { padding-bottom: .3rem; border-bottom: 2px solid transparent; }
.vt-ribbon .on { color: var(--wine-ink); border-color: var(--wine-ink); font-weight: 600; }
.vt-tools { display: flex; gap: .4rem; padding: .45rem .8rem; border-bottom: 1px solid var(--line); overflow: hidden; }
.vt-tools span { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; }
.vt-tools i { width: 10px; height: 10px; border: 1.5px solid var(--wine-ink); border-radius: 2px; }
.vt-tools .go { background: var(--wine); border-color: var(--wine); color: var(--on-wine); }
.vt-tools .go i { border-color: var(--on-wine); }
.vt-pov { display: flex; flex-wrap: wrap; gap: .4rem; padding: .55rem .8rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.vt-dim { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.vt-dim small { color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; }
.vt-dim b { font-weight: 500; }
.vt-dim i { font-style: normal; color: var(--muted); font-size: .62rem; }
.vt-fxbar { display: flex; align-items: center; min-width: 0; border-bottom: 1px solid var(--line); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .75rem; }
.vt-ref { min-width: 54px; padding: .35rem .6rem; border-right: 1px solid var(--line); color: var(--muted); }
.vt-fx-label { padding: .35rem .5rem; font-style: italic; color: var(--gold-ink); border-right: 1px solid var(--line); }
.vt-fx { padding: .35rem .6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vt-grid-wrap { overflow-x: auto; }
.vt-grid { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.vt-grid th, .vt-grid td { border: 1px solid var(--line); padding: .38rem .6rem; white-space: nowrap; }
.vt-grid td { text-align: right; position: relative; transition: box-shadow .3s, background-color .3s; }
.vt-grid thead th { background: var(--sunk); color: var(--muted); font-weight: 500; font-size: .66rem; text-align: center; }
.vt-grid .vt-rn { background: var(--sunk); color: var(--muted); font-weight: 400; font-size: .66rem; text-align: center; width: 28px; }
.vt-band td { text-align: left; background: var(--wine); color: var(--on-wine); font-family: var(--f-display); font-size: 1.02rem; font-weight: 600; }
.vt-band span { font-family: var(--f-body); font-size: .7rem; font-weight: 400; opacity: .8; margin-left: .6rem; }
.vt-head td { background: var(--gold-soft); color: var(--gold-ink); font-weight: 600; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; }
.vt-head td:first-of-type { text-align: left; }
.vt-section td { text-align: left; font-weight: 600; color: var(--wine-ink); background: var(--paper); }
.vt-grid td.vt-label { text-align: left; }
.vt-grid td.vt-input { background: var(--vt-input); color: var(--vt-input-ink); }
.vt-sub td { font-weight: 600; background: var(--paper); border-top: 1px solid var(--muted); }
.vt-total td { font-weight: 700; border-top: 2px double var(--ink); background: var(--sunk); }
.vt-kpi td { font-style: italic; color: var(--muted); font-size: .74rem; background: var(--surface); }
.vt-kpi td:last-child, .vt-kpi td.has-note, .vt-kpi td.has-flag { color: var(--wine-ink); font-weight: 600; }
.mod-panel .vt { font-size: .74rem; }
.mod-panel .vt-grid th, .mod-panel .vt-grid td { padding: .34rem .5rem; }
.vt-grid td.has-note::after, .vt-grid td.has-flag::after {
  content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 7px 7px 0;
  border-color: transparent var(--gold) transparent transparent;
}
.vt-grid td.has-flag::after { border-right-color: var(--bad); }
.vt-grid td.focus { box-shadow: inset 0 0 0 2px var(--wine-ink); }
.vt-grid td.focus.has-flag { box-shadow: inset 0 0 0 2px var(--bad); background: var(--bad-soft); color: var(--bad); }
.vt-tabs { display: flex; background: var(--sunk); border-top: 1px solid var(--line); overflow: hidden; }
.vt-tabs span { padding: .35rem .85rem; border-right: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.vt-tabs .on { background: var(--surface); color: var(--wine-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--wine-ink); }
.vt-note { display: flex; gap: .6rem; align-items: center; padding: .6rem .8rem; font-size: .8rem; border-top: 1px solid var(--line); min-height: 3.1rem; }
.vt-avatar { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #2B2324; font-weight: 700; font-size: .72rem; flex: none; }
.vt-note.flag .vt-avatar { background: var(--bad); color: var(--surface); }
.vt-note.swap .vt-note-text { animation: fade-in .4s ease-out; }
.vt, .mod-panel { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 600px) { .vt-ribbon, .vt-tools, .vt-step { display: none; } }

/* hero: template with floating status cards */
.hero-visual { position: relative; min-width: 0; display: grid; gap: .8rem; }
.hero-visual .vt { transition: transform .35s; }
.hero-visual .vt:hover { transform: translateY(-3px); }
.file-picker { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.fp-label { flex-basis: 100%; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.file-picker button {
  font: inherit; font-size: .85rem; display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.file-picker button i { width: 11px; height: 11px; border: 1.5px solid currentColor; border-radius: 2px; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat; opacity: .8; }
.file-picker button:hover { border-color: var(--wine-ink); transform: translateY(-1px); }
.file-picker button[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: var(--on-wine); }
#hero-sheet.swap .vt { animation: fade-in .45s cubic-bezier(.2, .7, .2, 1); }
.vt-tabs button { font: inherit; border: 0; border-right: 1px solid var(--line); background: transparent; padding: .35rem .85rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.vt-tabs button:hover { color: var(--wine-ink); background: var(--surface); }
.vt-tabs button.on { background: var(--surface); color: var(--wine-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--wine-ink); }.mod-panel .vt { margin-top: .5rem; }

/* ---------- Admin edit mode ---------- */
.edit-bar {
  position: fixed; z-index: 45; left: 50%; transform: translateX(-50%);
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; max-width: calc(100% - 2rem);
  padding: .55rem .6rem .55rem 1rem; border-radius: 999px; font-size: .85rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.edit-bar.on { background: var(--ink); color: var(--paper); border-color: var(--ink); border-radius: 14px; }
.edit-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.edit-bar.on .edit-dot { background: var(--ok); animation: pulse 1.6s ease-in-out infinite; }
.edit-title { font-weight: 600; }
.edit-hint { opacity: .75; }
.edit-bar.on .btn-danger { color: var(--paper); border-color: rgba(255, 255, 255, .3); }
.editing .ed { outline: 1px dashed transparent; outline-offset: 2px; border-radius: 2px; cursor: text; transition: outline-color .15s, background-color .15s; }
.editing .ed:hover { outline-color: var(--gold); }
.editing .ed:focus { outline: 2px solid var(--gold); background: var(--gold-soft); color: var(--ink); }
.editing .ticker-track { animation-play-state: paused; }
.editing main { padding-bottom: 5rem; }
.edit-note { font-size: .82rem; color: var(--gold-ink); margin-top: -.6rem; }
.rotator-edit { font-style: italic; color: var(--wine-ink); }
.sec-wrap { position: relative; outline: 2px dashed transparent; outline-offset: -6px; transition: outline-color .2s; }
.sec-wrap:hover { outline-color: var(--gold); }
.sec-bar {
  position: absolute; z-index: 5; top: 10px; right: 10px; display: flex; align-items: center; gap: .6rem;
  padding: .3rem .3rem .3rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 500;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.sec-wrap.is-hidden > :not(.sec-bar) { opacity: .35; filter: grayscale(.6); }
.sec-wrap.is-hidden { background: repeating-linear-gradient(-45deg, transparent 0 12px, var(--sunk) 12px 24px); }
.sec-wrap.is-hidden .sec-bar { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
body:has(.edit-bar) .toast { bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 600px) { .edit-hint { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { width: auto; flex-wrap: wrap; }
  .ticker-set { flex-wrap: wrap; }
  .ticker-set[aria-hidden] { display: none; }
  .hero-cell { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
