/* Quiet Volt — the app's tokens (ios-app/ndemo/Design/Theme.swift), light and dark.
   Shared by index.html and it/index.html so the two languages cannot drift. */
:root {
  color-scheme: light dark;
  --bg: #ffffff; --surface: #ffffff; --surface2: #eef0f5;
  --fg: #0e1230; --on-fg: #ffffff; --muted: #646991; --border: #d6daea;
  --primary: #312e81; --primary-soft: rgba(49,46,129,.14); --primary-glow: rgba(49,46,129,.08);
  --success: #3e9b63; --success-soft: rgba(62,155,99,.09);
  --slate: #52698f; --ink: #273746;
  --shade: rgba(14,18,48,.05); --shade-deep: rgba(14,18,48,.12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1018; --surface: #171b27; --surface2: #232838;
    --fg: #ecedf7; --on-fg: #0e1018; --muted: #9ea4c8; --border: #2c3247;
    --primary: #8b87f5; --primary-soft: rgba(139,135,245,.22); --primary-glow: rgba(139,135,245,.14);
    --success: #5fca8c; --success-soft: rgba(95,202,140,.12);
    --slate: #92abd0; --ink: #dde5f0;
    --shade: rgba(0,0,0,.1); --shade-deep: rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 15px/1.5 -apple-system, system-ui, "Segoe UI", sans-serif;
       -webkit-font-smoothing: antialiased; }
main { max-width: 26.5rem; margin: 0 auto; padding: 0 1rem 3rem; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
/* The skip link sits above the page until it is focused; sr-only is for headings the design carries another way. */
.skip { position: absolute; left: 12px; top: -60px; z-index: 3; padding: 9px 14px; border-radius: 999px;
        background: var(--fg); color: var(--on-fg); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Display face: the app sets headings in the rounded system face, tracked tight. */
.display { font-family: ui-rounded, -apple-system, system-ui, sans-serif; font-weight: 600; letter-spacing: -.02em; }

/* Topbar: the app's, flattened — mark and wordmark, two anchors, the primary button. */
.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
       gap: 12px; padding: 10px 1rem; background: color-mix(in srgb, var(--bg) 86%, transparent);
       -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.top .inner { display: flex; align-items: center; justify-content: space-between; gap: 12px;
              max-width: 26.5rem; margin: 0 auto; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 15px; }
.brand svg { width: 26px; height: 26px; }
.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a { text-decoration: none; color: var(--muted); font-size: 13.6px; font-weight: 600; padding: 8px 10px; border-radius: 999px; }
.top nav a:hover { color: var(--fg); background: var(--surface2); }
.top nav .hide-narrow { display: none; }

/* Btn: a capsule, 44 high, semibold 14.4. Primary is the ink, not the violet. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
       min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 14.4px;
       text-decoration: none; color: var(--fg); background: var(--surface); border: 1px solid var(--border);
       transition: transform .12s ease, opacity .12s ease; }
.btn.primary { color: var(--on-fg); background: var(--fg); border-color: var(--fg); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.top nav a.btn.primary { color: var(--on-fg); background: var(--fg); }
.btn:active { transform: scale(.985); opacity: .9; }
.btn svg { width: 16px; height: 16px; }

/* Hero — the sign-in door: mark, headline, one muted line. A soft glow sits behind the mark. */
.hero { position: relative; text-align: center; padding: 4.5rem 1rem 2.75rem; }
.hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  z-index: -1; pointer-events: none;
  background: radial-gradient(38rem 60% at 50% 0%, var(--primary-glow), transparent 100%); }
.hero { overflow: visible; }
body { overflow-x: hidden; }
.mark { width: 76px; height: 76px; display: block; margin: 0 auto; filter: drop-shadow(0 6px 14px var(--shade-deep)); }
h1 { font-size: 30px; line-height: 1.12; margin: 26px 0 0; letter-spacing: -.5px; text-wrap: balance; }
.lead { color: var(--muted); font-size: 15px; margin: 12px auto 0; max-width: 22rem; text-wrap: pretty; }
.cta { margin-top: 26px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cta-note { color: var(--muted); font-size: 12px; margin: 12px 0 0; }

/* Lab: 12 semibold, uppercase, tracked, muted. HeadRow: the label with a hairline running out of it. */
.lab { font-size: 12px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted); }
.section { margin-top: 2.75rem; scroll-margin-top: 4.5rem; }
.headrow h2 { margin: 0; font-size: 12px; }
.section > .headrow { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.section > .headrow::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* CardBox: surface, hairline border, continuous 14pt corners, a whisper of shadow. */
.stack { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
        padding: 14px 16px 16px; box-shadow: 0 1px 3px var(--shade); }
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card > .lab { display: block; margin-bottom: 3px; }
/* IconChip: a glyph on surface2, 10pt corners. */
.chip { width: 34px; height: 34px; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; color: var(--fg); flex: none; }
.chip svg { width: 18px; height: 18px; }
.card h3 { font-size: 17px; margin: 0 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; text-wrap: pretty; }

/* BadgeView: 12 semibold in a capsule. plain / volt / dash / ok. */
.badge { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.4; padding: 2.5px 9px;
         border-radius: 999px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; }
.badge.volt { color: var(--on-fg); background: var(--primary); border-color: var(--primary); }
.badge.dash { color: var(--muted); border-style: dashed; }
.badge.ok { color: var(--success); border-color: currentColor; }

/* Callout: the primary at 9% behind a line of 12.5. */
.callout { margin-top: 12px; padding: 11px 13px; border-radius: 10px; font-size: 12.5px; background: var(--primary-soft); }
.callout.ok { color: var(--success); background: var(--success-soft); }

/* Who is still out, by face. */
.faces { display: flex; align-items: center; margin-top: 12px; }
.face { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
        background: var(--surface2); border: 2px solid var(--surface); margin-right: -6px; }
.face.out { background: var(--surface); border: 1px dashed var(--muted); color: var(--muted); margin-left: 6px; }
.faces span:last-child { color: var(--muted); font-size: 12.5px; margin-left: 14px; }

/* Fig and Meter. */
.fig { font-size: 24px; letter-spacing: -.48px; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.fig small { color: var(--muted); font-size: 14px; letter-spacing: 0; font-weight: 500; }
.meter { height: 6px; border-radius: 999px; background: var(--surface2); overflow: hidden; margin-top: 12px; }
.meter i { display: block; height: 100%; width: 58%; background: var(--fg); border-radius: 999px; }

/* Principles: the waypoint as the bullet. */
.principles { list-style: none; margin: 0; padding: 0; }
.principles li { padding: 12px 0 12px 20px; border-top: 1px solid var(--border); position: relative; }
.principles li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.principles li:last-child { border-bottom: 1px solid var(--border); }
.principles b { display: block; font-size: 15px; }
.principles span { color: var(--muted); font-size: 13.5px; text-wrap: pretty; }

/* The closing card. */
.go .card { text-align: center; padding: 26px 20px 28px; background: linear-gradient(180deg, var(--primary-glow), transparent 60%) var(--surface); }
.go h2 { font-size: 28px; letter-spacing: -.5px; margin: 6px 0 8px; }
.go p { font-size: 14px; margin: 0 auto; max-width: 22rem; }
.go p em { font-style: normal; font-weight: 600; color: var(--fg); }
.go .cta { margin-top: 18px; }

footer { margin-top: 3rem; padding-top: 16px; border-top: 1px solid var(--border);
         color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
footer .brand { font-size: 13.5px; margin-right: auto; }
footer .brand svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } .btn:active { transform: none; } }

/* Desktop: the same pieces, laid out wide. The phone column is the design;
   past a tablet the cards become a grid and the hero and principles get room. */
@media (min-width: 760px) {
  main, .top .inner { max-width: 60rem; }
  main { padding: 0 2rem 4rem; }
  .top { padding: 10px 2rem; }
  .top nav { gap: 6px; }
  .top nav .hide-narrow { display: inline-block; }
  .hero { padding: 6.5rem 1rem 3.5rem; }
  .mark { width: 92px; height: 92px; }
  h1 { font-size: 48px; letter-spacing: -1.1px; margin-top: 30px; }
  .lead { font-size: 17.5px; max-width: 34rem; }
  .section { margin-top: 3.75rem; }
  .stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .card { padding: 16px 18px 18px; }
  .principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .principles li { border-top: 1px solid var(--border); }
  .principles li:last-child, .principles li:nth-last-child(2) { border-bottom: 1px solid var(--border); }
  .go .card { max-width: 34rem; margin: 0 auto; }
}
@media (min-width: 1100px) {
  main, .top .inner { max-width: 72rem; }
  .stack { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .principles { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; }
  .principles li { border-bottom: 1px solid var(--border); }
}

/* ---- The animations: each card carries a small looping scene of the thing it
   describes, drawn with the same pieces. CSS only; the site keeps its one
   script. Under Reduce Motion nothing moves and each scene shows its end state
   (every rule below is the end state; the keyframes only take it away). ---- */
.stage { position: relative; margin-top: 12px; padding: 10px; border-radius: 10px;
         background: var(--surface2); overflow: hidden; height: 128px; font-size: 12px; }
.s-ideas, .s-money { height: 152px; }
.stage .row { display: flex; align-items: center; justify-content: space-between; gap: 8px;
              background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
              padding: 5px 8px; margin-top: 6px; font-weight: 600; }
.stage .row:first-child { margin-top: 0; }
.stage .row small { color: var(--muted); font-weight: 500; }
.stage .badge { font-size: 10.5px; padding: 1px 7px; }

/* Hero mark: the splash — the route draws in and the waypoint drops. Once. */
.mark path { stroke-dasharray: 100; stroke-dashoffset: 0; animation: draw 1.1s cubic-bezier(.32,.72,0,1) both; }
.mark circle { transform-origin: 35px 38.5px; animation: drop .5s cubic-bezier(.32,.72,0,1) .9s both; }
@keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes drop { from { transform: scale(0); } to { transform: scale(1); } }

/* 1 · Collect ideas: a link is pasted, three places are found, the unsure one is let go. */
.s-ideas .paste { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500;
                  background: var(--surface); border: 1px dashed var(--muted); border-radius: 999px;
                  padding: 4px 10px; margin-bottom: 8px; animation: paste 9s infinite; }
.s-ideas .paste i { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); opacity: .8; }
.s-ideas .row { animation: pop 9s infinite; }
.s-ideas .row:nth-of-type(1) { animation-delay: .25s; }
.s-ideas .row:nth-of-type(2) { animation-delay: .55s; }
.s-ideas .row.dim { opacity: .0; animation: popfade 9s infinite .85s; }
@keyframes paste { 0%,4% { opacity: 0; transform: translateY(6px); } 12%,88% { opacity: 1; transform: none; } 96%,100% { opacity: 0; } }
@keyframes pop   { 0%,18% { opacity: 0; transform: translateY(8px) scale(.98); } 26%,88% { opacity: 1; transform: none; } 96%,100% { opacity: 0; } }
@keyframes popfade { 0%,18% { opacity: 0; transform: translateY(8px); } 26%,55% { opacity: 1; transform: none; } 66%,100% { opacity: 0; transform: translateX(-10px); } }

/* 2 · Shape the days: a place lands on day 2, the day fills, the night gets its bed. */
.s-days .days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 100%; }
.s-days .day { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
               padding: 6px 8px; display: flex; flex-direction: column; }
.s-days .day span { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .5px; }
.s-days .day i { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 999px; background: var(--border); }
.s-days .day i::after { content: ""; position: absolute; inset: 0; width: var(--h); background: var(--fg); border-radius: 999px; }
.s-days .day:nth-child(2) i::after { animation: fill 9s infinite; }
.s-days .tile { position: absolute; left: calc(33.33% + 6px); top: 32px; width: calc(33.33% - 14px);
                background: var(--primary-soft); color: var(--fg); border-radius: 6px; padding: 4px 6px;
                font-weight: 600; animation: land 9s cubic-bezier(.32,.72,0,1) infinite; }
.s-days .bed { position: absolute; right: 16px; bottom: 26px; }
.s-days .bed.dash { animation: bedgone 9s infinite; }
.s-days .bed.ok { background: var(--surface); animation: bedhere 9s infinite; }
@keyframes land { 0%,8% { opacity: 0; transform: translate(-105%, 70px) rotate(-3deg); } 14% { opacity: 1; }
                  30%,90% { transform: none; opacity: 1; } 97%,100% { opacity: 0; } }
@keyframes fill { 0%,30% { width: .2; width: 20%; } 42%,92% { width: var(--h); } 100% { width: 20%; } }
@keyframes bedgone { 0%,55% { opacity: 1; } 62%,100% { opacity: 0; } }
@keyframes bedhere { 0%,58% { opacity: 0; transform: scale(.9); } 66%,92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* 3 · Decide together: the deck — keep, pass, keep — and the last face answers. */
.s-round .deck { position: absolute; left: 10px; right: 10px; top: 10px; height: 74px; }
.s-round .cardlet { position: absolute; inset: 0; margin: 0 auto; width: 72%; background: var(--surface);
                    border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-weight: 600;
                    box-shadow: 0 1px 3px var(--shade); display: flex; align-items: flex-end;
                    transform-origin: 50% 140%; }
.s-round .cardlet small { display: block; color: var(--muted); font-weight: 500; }
.s-round .c1 { animation: keep 9s cubic-bezier(.32,.72,0,1) infinite; }
.s-round .c2 { animation: pass 9s cubic-bezier(.32,.72,0,1) infinite; }
.s-round .c3 { animation: keep2 9s cubic-bezier(.32,.72,0,1) infinite; }
@keyframes keep  { 0%,12% { transform: none; z-index: 3; opacity: 1; } 22%,100% { transform: translateX(120%) rotate(12deg); opacity: 0; z-index: 3; } }
@keyframes pass  { 0%,12% { transform: scale(.96) translateY(5px); z-index: 2; } 22%,36% { transform: none; z-index: 2; opacity: 1; }
                   46%,100% { transform: translateX(-120%) rotate(-12deg); opacity: 0; z-index: 2; } }
@keyframes keep2 { 0%,12% { transform: scale(.92) translateY(10px); z-index: 1; } 22%,36% { transform: scale(.96) translateY(5px); z-index: 1; }
                   46%,60% { transform: none; z-index: 1; opacity: 1; } 70%,100% { transform: translateX(120%) rotate(12deg); opacity: 0; z-index: 1; } }
.s-round .tally { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.s-round .tally .badge.ok { margin-left: auto; animation: closed 9s infinite; }
.s-round .face { width: 24px; height: 24px; font-size: 10px; margin: 0; border: 0; }
.s-round .face.out { border: 1px dashed var(--muted); background: var(--surface); animation: answered 9s infinite; }
.s-round .face.in { background: var(--fg); color: var(--on-fg); margin-left: -24px; animation: answeredin 9s infinite; }
@keyframes answered { 0%,72% { opacity: 1; } 78%,100% { opacity: 0; } }
@keyframes answeredin { 0%,72% { opacity: 0; transform: scale(.6); } 80%,100% { opacity: 1; transform: none; } }
@keyframes closed { 0%,80% { opacity: 0; transform: translateY(4px); } 88%,100% { opacity: 1; transform: none; } }

/* 4 · The money: three expenses land, the ledger answers who owes whom, the meter follows. */
.s-money .row { animation: pop 9s infinite; }
.s-money .row:nth-of-type(2) { animation-delay: .5s; }
.s-money .row:nth-of-type(3) { animation-delay: 1s; }
.s-money .bal { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 0 2px;
                color: var(--muted); animation: closed 9s infinite; }
.s-money .bal b { color: var(--fg); font-variant-numeric: tabular-nums; }
.s-money .bal .badge { font-size: 10.5px; }
.card .meter i { animation: meter 9s cubic-bezier(.32,.72,0,1) infinite; }
@keyframes meter { 0%,20% { width: 0; } 60%,92% { width: 58%; } 100% { width: 0; } }

/* ---- See it move: the four scenes above, recorded on the real app (landing-page/media,
   one folder per language): a muted, looping, inline video with its last frame as the
   poster. The page's second script plays them only on screen and never under Reduce Motion. ---- */
.flows-lead { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; text-wrap: pretty; }
.flows { display: grid; grid-template-columns: 1fr; gap: 20px; }
.flow { margin: 0; }
.flow .phone { max-width: 270px; margin: 0 auto; aspect-ratio: 540 / 1174; border: 1px solid var(--border);
               border-radius: 26px; overflow: hidden; background: var(--surface2); box-shadow: 0 1px 3px var(--shade); }
.flow video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--surface2); }
.flow figcaption { text-align: center; margin-top: 10px; }
.flow figcaption b { display: block; font-size: 15px; }
.flow figcaption span { color: var(--muted); font-size: 13.5px; text-wrap: pretty; }
@media (min-width: 760px) { .flows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1100px) { .flows { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } .flow .phone { max-width: none; } }

@media (prefers-reduced-motion: reduce) {
  .stage *, .mark path, .mark circle, .card .meter i { animation: none !important; }
  .s-ideas .row.dim { display: none; }
  .s-days .bed.dash, .s-round .c1, .s-round .c2, .s-round .face.out { display: none; }
}
