/* TRIQUOTE app.css — shell. Scale: 1rem = 10 CSS px at a 1920 viewport (html font-size = 100vw/192), so every
   rem value below = (px at 1920)/10 and the page scales in proportion from 1024 to 2560+. */
:root{
  --paper:#E8F3FD;--surface:#F8FBFF;--surface-blue:#E5F0FF;--primary:#202A70;--ink:#101A42;
  --blue:#1478FF;--violet:#8B4FF2;--coral:#FF5872;--peach:#FFD8C8;--teal:#17CEB0;--mint:#97F1D7;
  --rule:#C6D7EC;--muted:#536680;--nav-ground:#edf5fa;--nav-ink:#101c3b;--nav-rule:#D6E3EC;
  --lane-blue:linear-gradient(90deg,#1478FF,#57A8FF);--lane-violet:linear-gradient(90deg,#7448F0,#C260F4);--lane-coral:linear-gradient(90deg,#FF526E,#FF94B4);
  --warm-band:linear-gradient(135deg,#FFD9CB,#FF7B91);--teal-band:linear-gradient(135deg,#8CF1D9,#25D3BD);
  --font-display:"Source Serif 4",Georgia,serif;--font-ui:"Roboto",system-ui,-apple-system,"Segoe UI",sans-serif;--font-num:"Roboto",system-ui,sans-serif;
  /* page frame (home measurement): one container for every route */
  --gutter:2.6rem;--nav-h:13rem;
  /* motion family */
  --ease:cubic-bezier(.22,.8,.2,1);--t-fast:180ms;--t-mid:420ms;--t-lane:760ms;
  /* border tokens: width + colour per rule kind (widths from BORDER_TABLE) */
  --rule-hair-w:max(1px,.11rem);--rule-panel-w:max(1px,.22rem);--rule-input-w:max(1px,.1rem);--rule-dashed-w:max(1px,.15rem);
  --rule-hair-c:var(--nav-rule);--rule-panel-c:#B3C5E2;--rule-row-c:#CCDAEE;--rule-row-dark-c:#1E2A6E;--rule-card-c:#B3C5E2;--rule-divider-c:#C6D4EA;--rule-dark-c:#0F1955;
}
*,*::before,*::after{box-sizing:border-box}
html{font-size:calc(100vw/192);-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;min-height:100vh;background:var(--paper);color:var(--ink);font:400 max(12px,1.6rem)/1.4 var(--font-ui);font-variant-numeric:tabular-nums;overflow-x:hidden}
img,svg,video,canvas{display:block;max-width:100%}
a{color:inherit}
button,input,select,textarea{font:inherit;color:inherit}
:where(button,input,select,textarea){border:0;outline:0;background:none;border-radius:0}
:where(a,button,input,select,summary):focus-visible{outline:max(2px,.2rem) solid var(--blue);outline-offset:.2rem}
h1,h2,h3{font-family:var(--font-display);font-weight:700;letter-spacing:-.02em;line-height:1.06;margin:0}

/* ---------- page atmosphere (DESIGN §3b): sky gradient + four colour pools + coral/teal waves, shared by every route ---------- */
.page{position:relative;min-height:100vh;display:flex;flex-direction:column;isolation:isolate;
  background:linear-gradient(180deg,#F7FBFF 0,#E8F3FD 90rem,#E8F3FD 100%)}
.page::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(60rem 40rem at 10% 22rem,rgba(20,120,255,.13),transparent 70%),
    radial-gradient(52rem 38rem at 90% 70rem,rgba(139,79,242,.10),transparent 70%),
    radial-gradient(56rem 40rem at 14% 150rem,rgba(255,88,114,.10),transparent 70%),
    radial-gradient(52rem 38rem at 88% 215rem,rgba(23,206,176,.13),transparent 70%),
    radial-gradient(60rem 40rem at 20% 290rem,rgba(20,120,255,.09),transparent 70%),
    radial-gradient(52rem 38rem at 84% 360rem,rgba(255,88,114,.09),transparent 70%)}
.page::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;z-index:-1;pointer-events:none;opacity:.55;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 240' preserveAspectRatio='none'%3E%3Cpath d='M0 150 C260 70 520 190 820 130 C1120 70 1420 170 1920 90 L1920 240 L0 240Z' fill='%23FF5872' fill-opacity='.10'/%3E%3Cpath d='M0 190 C300 130 600 230 960 170 C1300 120 1600 210 1920 150 L1920 240 L0 240Z' fill='%2317CEB0' fill-opacity='.11'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 240' preserveAspectRatio='none'%3E%3Cpath d='M0 120 C300 190 640 60 960 130 C1280 200 1620 80 1920 140 L1920 240 L0 240Z' fill='%2317CEB0' fill-opacity='.10'/%3E%3Cpath d='M0 170 C320 110 640 220 980 160 C1320 100 1640 200 1920 130 L1920 240 L0 240Z' fill='%23FF5872' fill-opacity='.09'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-size:100% 24rem,100% 24rem;background-position:0 128rem,0 250rem}

/* ---------- page frame: ONE container for every route ---------- */
main{flex:1;width:100%;padding-inline:var(--gutter);min-width:0}
main.is-leaving{opacity:.7;transition:opacity var(--t-fast) var(--ease)}
.route-body{min-height:60vh}
.frame-bleed{margin-inline:calc(var(--gutter)*-1)} /* a block that runs edge to edge inside the frame, only where the mockup does */

/* ---------- border rules: ONE class per framed component (BORDER_TABLE). Route bodies contain zero border/outline. ---------- */
.rule-nav{border-bottom:var(--rule-hair-w) solid var(--rule-hair-c)}
.rule-footer{border-top:var(--rule-hair-w) solid var(--rule-hair-c)}
.rule-panel{border:var(--rule-panel-w) solid var(--rule-panel-c);border-radius:2.8rem}
.rule-panel-tb{border-block:var(--rule-panel-w) solid var(--rule-panel-c);border-radius:2.8rem}
.rule-row{border-bottom:var(--rule-hair-w) solid var(--rule-row-c)}
.rule-row-dark{border-bottom:var(--rule-hair-w) solid var(--rule-row-dark-c)}
.rule-divider{border-left:var(--rule-hair-w) solid var(--rule-divider-c)}
.rule-card{border:var(--rule-panel-w) solid var(--rule-card-c);border-radius:1.8rem}
.rule-input{border:var(--rule-input-w) solid var(--rule);border-radius:1.2rem;background:var(--surface-blue);padding:.9rem 1.4rem;box-sizing:border-box;min-width:0}
.rule-chip{border:var(--rule-input-w) solid var(--rule);border-radius:999px}
.rule-dashed{border:var(--rule-dashed-w) solid rgba(83,102,128,.6);border-radius:1.8rem}
.rule-double{border-block:max(3px,.3rem) double var(--rule)}
/* frame-only classes: keep the component's own radius (fix-presend 12/11: mockup frames these panels) */
.rule-box{border:var(--rule-panel-w) solid var(--rule-panel-c)}
.rule-box-dark{border:var(--rule-panel-w) solid var(--rule-dark-c)}
/* last row inside a framed panel: the frame draws that edge (no doubled line) */
.rule-box .rule-row:last-child,.rule-panel .rule-row:last-child,.rule-box-dark .rule-row-dark:last-child,.rule-panel .rule-row-dark:last-child{border-bottom:0}

/* ---------- shared nav (chrome/nav.html, scaled) ---------- */
.site-header{position:relative;z-index:5;background:var(--nav-ground);color:var(--nav-ink);font-family:var(--font-ui)}
.ticker{height:3.2rem;background:#1f345e;color:#fff;padding:0 4.8rem;display:flex;align-items:center;overflow:hidden;white-space:nowrap;font:600 max(12px,1.5rem)/1 var(--font-ui);gap:4rem}
.ticker-item{display:inline-block;position:relative}
.bar{height:9.8rem;display:flex;align-items:center;padding:0 4.8rem;gap:4.2rem}
.brand{display:flex;align-items:center;gap:1.2rem;margin-right:2.4rem;text-decoration:none;color:#111c3d}
.brand-mark{height:5.2rem;width:auto;aspect-ratio:2048/1321;flex:none}
.brand-name{font:800 max(14px,3rem)/1 var(--font-ui);letter-spacing:.01em}
.nav-desktop{display:flex;align-items:center;gap:2.2rem;flex:1}
.nav-desktop a{color:#111c3d;text-decoration:none;font:650 max(12px,1.5rem)/1.2 var(--font-ui);padding:1rem 1.8rem;border-radius:999px;transition:background var(--t-fast) var(--ease)}
.nav-desktop a:hover{background:#dcebfb}
.nav-desktop a.is-active,.nav-drawer a.is-active{background:#cfe2ff}
.social{font:400 max(12px,1.9rem)/1 var(--font-ui);text-decoration:none;color:#111c3d;cursor:pointer}
.social[aria-disabled="true"]{cursor:default;opacity:.7}
.badge{background:#97fce4;padding:1rem 2.2rem;border-radius:999px;font:700 max(12px,1.5rem)/1.2 var(--font-ui);white-space:nowrap}
.nav-toggle{display:none}
.nav-drawer{display:none}

/* ---------- shared footer (chrome/footer.html, scaled) ---------- */
.site-footer{background:var(--nav-ground);color:var(--nav-ink);font-family:var(--font-ui);min-height:28.8rem;padding:3.2rem 4.8rem}
.site-footer{position:relative}
.foot-mark{position:absolute;right:4.8rem;top:3.2rem;height:5.2rem;width:auto;aspect-ratio:2048/1321}
.site-footer .close{font:700 max(18px,4.6rem)/1.15 var(--font-ui);margin-bottom:2rem}
.site-footer .actions{display:flex;gap:1.6rem;margin-bottom:1.8rem;flex-wrap:wrap}
.site-footer .actions>*{min-width:18rem;padding:1.5rem 2.4rem;border-radius:1.6rem;background:#fff;color:#101c3b;text-align:center;text-decoration:none;font:750 max(12px,1.6rem)/1.3 var(--font-ui);box-shadow:0 .6rem 1.8rem #24395b20;cursor:pointer;transition:transform var(--t-fast) var(--ease)}
.site-footer .actions>*:hover{transform:translateY(-.2rem)}
.site-footer .actions>*:nth-child(2){background:#238ef2;color:#fff}
.site-footer .actions>*:nth-child(3){background:#fc688d;color:#fff}
.site-footer .actions>*[aria-disabled="true"]{cursor:default}
.site-footer .small{font-size:max(12px,1.2rem);line-height:1.45;max-width:120rem}
.howto{margin-top:1.4rem;max-width:90rem;font-size:max(12px,1.4rem)}
.howto summary{cursor:pointer;font-weight:700;list-style:none;display:inline-flex;align-items:center;gap:.8rem}
.howto summary::-webkit-details-marker{display:none}
.howto summary::after{content:"+";font-weight:700}
.howto[open] summary::after{content:"–"}
.howto ol{margin:1rem 0 0;padding-left:2.4rem;line-height:1.5}

/* ---------- motion: the three lanes ---------- */
/* resting state = final state; motion only plays when .is-in is added (no hidden content if JS or IO never fires) */
@keyframes lane-in{from{opacity:.25;transform:translateX(-2.4rem)}to{opacity:1;transform:none}}
@keyframes lane-draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes lane-grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes bloom{0%{opacity:0;transform:scale(.6)}55%{opacity:.9}100%{opacity:.0;transform:scale(1.6)}}
@keyframes tick-flash{0%{opacity:.85}100%{opacity:0}}
@keyframes sweep{0%{transform:scaleX(0);opacity:1}70%{transform:scaleX(1);opacity:1}100%{transform:scaleX(1);opacity:0}}
[data-reveal].is-in,[data-reveal-group].is-in>*{animation:lane-in var(--t-lane) var(--ease) both}
[data-reveal-group].is-in>*{animation-delay:calc(var(--i,0)*30ms)}
[data-lane-draw]{stroke-dasharray:1;stroke-dashoffset:0}
.is-in [data-lane-draw],[data-lane-draw].is-in{animation:lane-draw var(--t-lane) var(--ease) both}
[data-bar]{transform-origin:left center}
.is-in [data-bar],[data-bar].is-in{animation:lane-grow var(--t-lane) var(--ease) both}
.bloom{position:absolute;pointer-events:none;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.95),rgba(255,255,255,0) 70%);opacity:0}
.is-in .bloom,.bloom.is-in{animation:bloom 1100ms var(--ease) 600ms both}
.tick-host{position:relative}
.tick-host.is-tick::after{content:"";position:absolute;inset:-.2rem -.6rem;border-radius:.8rem;background:var(--teal);opacity:0;pointer-events:none;animation:tick-flash 900ms var(--ease) both}
.tick-host.is-tick-down::after{background:var(--coral)}
.lift{transition:transform var(--t-fast) var(--ease)}
.lift:hover{transform:translateY(-.3rem)}
.lane-sweep{position:fixed;left:0;right:0;top:0;height:.6rem;z-index:50;pointer-events:none;display:flex;flex-direction:column;gap:0}
.lane-sweep i{display:block;flex:1;transform-origin:left center;transform:scaleX(0);opacity:0}
.lane-sweep i:nth-child(1){background:var(--lane-blue)}
.lane-sweep i:nth-child(2){background:var(--lane-violet)}
.lane-sweep i:nth-child(3){background:var(--lane-coral)}
.lane-sweep.is-run i{animation:sweep 720ms var(--ease) both}
.lane-sweep.is-run i:nth-child(2){animation-delay:70ms}
.lane-sweep.is-run i:nth-child(3){animation-delay:140ms}
.ticker-item.is-live::before{content:"";position:absolute;left:-1.4rem;top:50%;width:.6rem;height:.6rem;margin-top:-.3rem;border-radius:50%;background:var(--teal);animation:tick-flash 1800ms ease-out infinite}
.loop-video{width:100%;height:100%;object-fit:cover}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  .lane-sweep{display:none}
}

/* ---------- below 1024: mobile (390 target). 1rem = 10px here, rem values written for 1920 are NOT reused. ---------- */
@media (max-width:1023px){
  html{font-size:10px}
  :root{--gutter:1.6rem}
  .ticker{height:28px;padding:0 16px;font-size:12px}
  .bar{height:64px;padding:0 16px;gap:12px}
  .brand{margin-right:auto;gap:8px}
  .brand-mark{height:36px}
  .brand-name{font-size:20px}
  .nav-desktop,.bar>.social,.bar>.badge{display:none}
  .nav-toggle{display:flex;flex-direction:column;justify-content:center;gap:5px;width:44px;height:44px;padding:11px;border-radius:12px;cursor:pointer;background:#cfe2ff}
  .nav-toggle span{display:block;height:2px;border-radius:2px;background:#111c3d;transition:transform var(--t-fast) var(--ease),opacity var(--t-fast) var(--ease)}
  .nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
  .nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
  .nav-drawer:not([hidden]){display:flex;flex-direction:column;gap:4px;padding:12px 16px 16px;background:var(--nav-ground);position:absolute;left:0;right:0;top:100%;box-shadow:0 12px 24px #24395b25;z-index:6}
  .nav-drawer a{padding:12px 16px;border-radius:14px;text-decoration:none;font:650 16px/1.2 var(--font-ui);color:#111c3d}
  .drawer-social{display:flex;gap:16px;align-items:center;padding:12px 16px 0;font-size:16px}
  .drawer-social a{text-decoration:none}
  .site-footer{padding:24px 16px;min-height:0}
  .foot-mark{position:static;height:36px;margin-bottom:12px}
  .site-footer .close{font-size:28px}
  .site-footer .actions{gap:10px}
  .site-footer .actions>*{min-width:0;flex:1 1 40%;padding:12px 16px;border-radius:12px;font-size:14px}
  .site-footer .small,.howto{font-size:12px}
  main{padding-inline:16px}
  .frame-bleed{margin-inline:-16px}
  .lane-sweep{height:4px}
}
