/* Loadout Lab public pages. One face (Anuphan), paper ground, ink, and the check-green of the /v page. */
:root {
  --paper: #efede6; --paper-2: #e4e1d7; --ink: #121314; --ink-2: #4b4e54;
  --green: #0d6b4c; --green-hi: #1fc487; --night: #0e1012; --night-2: #181b1f; --on-night: #eceae3; --on-night-2: #9a9da4;
  --m: clamp(16px, 2.6vw, 40px);
  --step: clamp(120px, 14vw, 200px);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }
body { background: var(--paper); color: var(--ink); font: 400 18px/1.6 'Anuphan', sans-serif; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--green); color: #fff; }
:focus-visible { outline: 3px solid var(--green-hi); outline-offset: 3px; }
.nb { white-space: nowrap; }

/* ---------- bar ---------- */
.bar { position: relative; z-index: 40; display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); padding: 14px var(--m); background: var(--paper); }
.mark { display: inline-flex; align-items: center; gap: 10px; font: 700 21px/1 'Anuphan'; letter-spacing: -0.01em; text-decoration: none; margin-right: auto; }
.mark svg { width: 26px; height: 26px; }
.bar nav { display: flex; gap: 22px; }
.bar nav a { text-decoration: none; font-size: 16px; color: var(--ink-2); transition: color .2s; }
.bar nav a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 0;
  font: 500 17px/1 'Anuphan'; text-decoration: none; white-space: nowrap; flex: none; cursor: pointer; transition: transform .18s ease, background-color .18s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn.go { background: var(--green); color: #fff; }
.btn.go:hover { background: #0a5a40; }
.btn.check { background: var(--paper-2); color: var(--ink); }
.btn.check:hover { background: #d8d4c8; }
.bar .btn { min-height: 42px; padding: 0 20px; font-size: 16px; }

/* ---------- hero ---------- */
.hero { padding: clamp(32px, 7vh, 88px) var(--m) 0; }
.hero h1 { font: 700 clamp(46px, 8.6vw, 148px)/0.98 'Anuphan'; letter-spacing: -0.04em; }
.hero h1 span { display: block; }
.hero h1 .r { text-align: right; }
.hero .sub { display: grid; grid-template-columns: minmax(0, 32em) max-content; justify-content: space-between; align-items: end; gap: 24px var(--m); margin-top: clamp(24px, 4vh, 44px); }
.hero .sub p { font-size: clamp(18px, 1.5vw, 21px); }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- the check (pinned story) ---------- */
.proof { background: var(--night); color: var(--on-night); margin-top: clamp(40px, 7vh, 80px); }
.check-stage { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 26vw, 400px); gap: var(--m); align-items: center; padding: var(--m); }
.frame { position: relative; }
.frame img { width: 100%; }
.frame .hl { position: absolute; border: 3px solid var(--green-hi); border-radius: 4px; opacity: 0; pointer-events: none; }
.frame .scan { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--green-hi); opacity: 0; }
.stamp { position: absolute; display: flex; align-items: center; gap: 4%; padding: .5% .8% .5% .5%; border-radius: 6px; background: #0b0c10; color: #fff; }
.stamp svg { height: 100%; width: auto; aspect-ratio: 1; background: #fff; border-radius: 3px; display: block; }
.stamp div { display: grid; font-size: clamp(7px, .62vw, 12px); line-height: 1.25; }
.stamp b { font-weight: 600; }
.stamp span { opacity: .75; }
.stamp code { font: 700 1.6em/1.1 'Anuphan'; letter-spacing: .04em; }
.side h2 { font: 700 clamp(30px, 2.8vw, 46px)/1.05 'Anuphan'; letter-spacing: -0.03em; }
.steps-say { position: relative; margin: 20px 0 28px; min-height: 7.5em; }
.steps-say p { font-size: 18px; color: var(--on-night); }
.js .steps-say p { position: absolute; inset: 0 0 auto; opacity: 0; }
.js .steps-say p.on { opacity: 1; }
.receipt { background: var(--night-2); padding: 20px; border-radius: 6px; }
.receipt .ok { color: var(--green-hi); font-weight: 700; font-size: 17px; }
.receipt .code { color: var(--on-night-2); font-size: 14px; margin-bottom: 12px; }
.receipt dl { display: grid; grid-template-columns: max-content 1fr; gap: 0 16px; font-size: 15px; }
.receipt dt, .receipt dd { padding: 6px 0; transition: color .3s, background-color .3s; }
.receipt dt { color: var(--on-night-2); }
.receipt dd { font-weight: 600; }
.receipt .lit { color: var(--green-hi); }
.receipt .fine { margin-top: 12px; font-size: 13px; color: var(--on-night-2); }

/* ---------- sizes (horizontal) ---------- */
.sizes { padding: var(--step) 0 0; overflow: hidden; }
@media (min-width: 901px) { .sizes { padding-top: clamp(56px, 9vh, 96px); margin-top: calc(var(--step) - clamp(56px, 9vh, 96px)); } }
.sizes .head { padding: 0 var(--m); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30em); gap: 20px var(--m); align-items: end; }
h2.big { font: 700 clamp(38px, 5.4vw, 92px)/1 'Anuphan'; letter-spacing: -0.035em; }
.track { display: flex; gap: clamp(16px, 2vw, 32px); align-items: flex-end; padding: 56px var(--m) 8px; width: max-content; }
.track figure { flex: none; }
.track img { height: clamp(240px, calc(100vh - 420px), 620px); width: auto; max-width: none; }
.track figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: 16px; color: var(--ink-2); }
.track figcaption b { color: var(--ink); font-size: 20px; }

/* ---------- compare ---------- */
.compare { padding: var(--step) var(--m) 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px var(--m); }
.compare table { width: 100%; border-collapse: collapse; font-size: 18px; }
.compare th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 0 12px 14px 0; font-size: 16px; }
.compare td { padding: 20px 12px 20px 0; vertical-align: top; border-top: 1px solid #cfcbc0; }
.compare td:first-child { font-weight: 700; width: 30%; }
.compare td.us { color: var(--green); font-weight: 600; }

/* ---------- price ---------- */
.price { margin-top: var(--step); background: var(--green); color: #f3f1ea; padding: clamp(56px, 9vh, 112px) var(--m); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: center; overflow: hidden; }
.price .num { font: 700 clamp(150px, 27vw, 460px)/0.8 'Anuphan'; letter-spacing: -0.06em; }
.price .num small { display: block; font: 500 clamp(20px, 2vw, 30px)/1.2 'Anuphan'; letter-spacing: 0; margin-top: 18px; }
.price ul { list-style: none; padding: 0; display: grid; gap: 18px; font-size: clamp(18px, 1.6vw, 23px); }
.price li b { display: block; }
.price li span { opacity: .82; font-size: .82em; }
.price .btn.go { background: #f3f1ea; color: var(--green); margin-top: 12px; }

/* ---------- VP calculator ---------- */
.calc { padding: var(--step) var(--m) 0; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px var(--m); align-items: start; }
.calc .lead { margin: 20px 0 0; max-width: 30em; }
.calc table { width: 100%; border-collapse: collapse; }
.calc th { font-weight: 500; color: var(--ink-2); font-size: 15px; text-align: left; padding: 0 0 10px; }
.calc td { padding: 10px 0; border-top: 1px solid #cfcbc0; }
.tier { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.tier img { width: 30px; height: 30px; }
.tier small { display: block; font-weight: 400; color: var(--ink-2); font-size: 14px; }
.count { display: inline-flex; align-items: center; background: var(--paper-2); border-radius: 999px; }
.count button { width: 40px; height: 40px; border: 0; background: none; font: 500 22px/1 'Anuphan'; color: var(--ink); cursor: pointer; border-radius: 50%; transition: background-color .15s; }
.count button:hover { background: #d3cfc3; }
.count input { width: 3ch; border: 0; background: none; text-align: center; font: 600 18px/1 'Anuphan'; color: var(--ink); -moz-appearance: textfield; appearance: textfield; }
.count input::-webkit-inner-spin-button, .count input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.total { position: sticky; top: 32px; background: var(--night); color: var(--on-night); padding: clamp(24px, 3vw, 40px); border-radius: 6px; }
.total .vp { font: 700 clamp(56px, 7vw, 112px)/1 'Anuphan'; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.total .vp small { font-size: .32em; letter-spacing: 0; margin-left: 8px; }
.total p { color: var(--on-night-2); margin-top: 14px; font-size: 16px; }
.total .btn { margin-top: 20px; }

/* ---------- how: three steps beside a window that plays them ---------- */
.how { padding: var(--step) var(--m) 0; }
.how-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 32px var(--m); align-items: center; margin-top: 56px; }
.how-steps { list-style: none; padding: 0; display: grid; gap: 32px; }
.how-steps h3 { font: 700 clamp(24px, 2.2vw, 34px)/1.15 'Anuphan'; letter-spacing: -0.02em; margin-bottom: 8px; }
.how-steps p { max-width: 30em; }
.js .how-steps li { transition: opacity .35s; }
.js .how-steps.playing li { opacity: .32; }
.js .how-steps.playing li.on { opacity: 1; }
.demo figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.win { position: relative; aspect-ratio: 16 / 10; background: #fbfaf7; border-radius: 8px; overflow: hidden; container-type: inline-size; font-family: 'Anuphan', sans-serif; }
.chrome { position: absolute; inset: 0 0 auto; height: 9%; background: var(--paper-2); display: flex; align-items: center; gap: 2cqw; padding: 0 2cqw; }
.dots { display: flex; gap: .8cqw; }
.dots i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #c9c5b9; }
.addr { flex: 1; height: 60%; background: #fff; border-radius: 99px; display: flex; align-items: center; padding: 0 2cqw; font-size: 1.7cqw; color: var(--ink-2); overflow: hidden; white-space: nowrap; }
.addr span { border-radius: 3px; padding: .2cqw .4cqw; overflow: hidden; text-overflow: ellipsis; }
.addr.sel span { background: #b6d7ff; color: var(--ink); }
.scr { position: absolute; inset: 9% 0 0; }
.scr-auth, .scr-done { opacity: 0; }
.ui { position: absolute; display: flex; align-items: center; border-radius: .8cqw; font-size: 1.5cqw; }
.pane { position: absolute; inset: 0 auto 0 0; width: 31%; background: #fff; padding: 0 2.4cqw; }
.pane .t { position: absolute; top: 3%; font-size: 2cqw; }
.pane .lb { position: absolute; font-size: 1.45cqw; font-weight: 600; }
.pane .ui { left: 2.4cqw; right: 2.4cqw; }
.btn-o { height: 9%; padding: 0 1.4cqw; background: #f1efe9; }
.area { height: 18%; align-items: flex-start; padding: 1cqw; background: #f6f5f1; border: .15cqw solid #ddd9cf; font-size: 1.3cqw; color: var(--ink); word-break: break-all; overflow: hidden; }
.area.focus { border-color: var(--green); }
.btn-k { right: auto !important; height: 9%; padding: 0 2cqw; background: var(--ink); color: #fff; font-weight: 600; }
.view { position: absolute; inset: 3% 2% 4% 33%; background: #e9e6de; border-radius: .8cqw; display: grid; place-items: center; overflow: hidden; }
.view .empty { font-size: 1.5cqw; color: var(--ink-2); }
.view img { position: absolute; inset: 0; margin: auto; width: 96%; opacity: 0; }
.scr-auth { background: #e6e3db; }
.card { position: absolute; left: 33%; width: 34%; top: 6%; bottom: 6%; background: #fff; border-radius: 1cqw; }
.card .t { position: absolute; top: 9%; left: 0; right: 0; text-align: center; font-size: 2.6cqw; }
.card .field { left: 9%; right: 9%; height: 13%; background: #f3f2ef; padding: 0 1.4cqw; gap: 1.2cqw; font-size: 1.6cqw; color: var(--ink); }
.card .field em { font-style: normal; font-size: 1.05cqw; color: #8a8c90; font-weight: 600; }
.card .go { left: 41%; width: 18%; height: 13%; bottom: 8%; justify-content: center; border-radius: 99px; border: .2cqw solid #d6d3cb; font-size: 2.4cqw; color: #8a8c90; }
.card .go.ready { background: var(--ink); border-color: var(--ink); color: #fff; }
.scr-done { background: #fff; display: grid; place-items: center; font-size: 1.8cqw; color: #8a8c90; }
.menu { position: absolute; padding: .8cqw 2.4cqw; background: #fff; border-radius: .6cqw; font-size: 1.5cqw; box-shadow: 0 .6cqw 2cqw rgba(0, 0, 0, .18); opacity: 0; pointer-events: none; }
.menu.hot { background: #e8f3ee; }
.lb1 { top: 12%; } #dLogin { top: 19%; } .lb2 { top: 35%; } #dArea { top: 42%; } #dFetch { top: 66%; }
#dUser { top: 25%; } #dPass { top: 42%; }
/* On a phone the window is a phone: taller, the form above the picture, everything at a readable size. */
@media (max-width: 900px) {
  .win { aspect-ratio: 9 / 15; }
  .chrome { height: 7%; padding: 0 3cqw; }
  .dots { display: none; }
  .addr { font-size: 3.4cqw; padding: 0 3cqw; }
  .scr { inset: 7% 0 0; }
  .ui { font-size: 3.6cqw; border-radius: 1.6cqw; }
  .pane { inset: 0 0 auto 0; width: auto; height: 60%; padding: 0 5cqw; }
  .pane .t { font-size: 4.6cqw; }
  .pane .lb { font-size: 3.4cqw; }
  .pane .ui { left: 5cqw; right: 5cqw; }
  .btn-o, .btn-k { height: 11%; padding: 0 4cqw; }
  .area { height: 20%; padding: 2cqw; font-size: 3cqw; border-width: .4cqw; }
  #dArea { top: 43%; } #dFetch { top: 70%; }
  .view { inset: 61% 4% 4% 4%; border-radius: 1.6cqw; }
  .view .empty { font-size: 3.4cqw; }
  .card { left: 6%; width: 88%; top: 8%; bottom: 34%; border-radius: 2cqw; }
  .card .t { font-size: 6cqw; }
  .card .field { font-size: 4cqw; padding: 0 3cqw; gap: 3cqw; }
  .card .field em { font-size: 2.6cqw; }
  .card .go { font-size: 5cqw; }
  .scr-done { font-size: 4cqw; }
  .menu { font-size: 3.8cqw; padding: 2cqw 5cqw; border-radius: 1.6cqw; }
  .cur { width: 5cqw; }
}
.cur { position: absolute; width: 2.2cqw; left: 60%; top: 70%; filter: drop-shadow(0 .2cqw .3cqw rgba(0, 0, 0, .3)); }

/* ---------- tips ---------- */
.tips { padding: var(--step) var(--m) 0; }
.tips ul { list-style: none; padding: 0; margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px var(--m); }
.tips b { display: block; font-size: 21px; line-height: 1.3; margin-bottom: 8px; }
.tips span { color: var(--ink-2); font-size: 17px; }

/* ---------- faq ---------- */
.faq { padding: var(--step) var(--m) 0; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px var(--m); }
.faq details { border-top: 1px solid #cfcbc0; }
.faq details:last-child { border-bottom: 1px solid #cfcbc0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; font-size: 20px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 28px; line-height: .8; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; max-width: 40em; }

/* ---------- close ---------- */
.close { margin-top: var(--step); background: var(--night); color: var(--on-night); padding: clamp(64px, 10vh, 120px) var(--m) 32px; }
.close .last { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 32px; align-items: end; }
.close h2 { font: 700 clamp(40px, 6vw, 104px)/1 'Anuphan'; letter-spacing: -0.04em; }
.close .btn.check { background: var(--night-2); color: var(--on-night); }
.close .word { font: 700 clamp(64px, 15.5vw, 280px)/0.85 'Anuphan'; letter-spacing: -0.055em; margin-top: clamp(64px, 12vh, 140px); white-space: nowrap; }
.close .legal { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; margin-top: 32px; font-size: 14px; color: var(--on-night-2); }
.close .legal a { color: var(--on-night); }
.close .legal nav { display: flex; gap: 20px; }

/* ---------- entrances (only when script runs) ---------- */
.js [data-rise], .js [data-hero] { opacity: 0; transform: translateY(28px); }

@media (max-width: 900px) {
  .bar nav { display: none; }
  .bar .btn.check { display: none; }
  .hero .sub, .sizes .head, .compare, .calc, .faq, .close .last, .close .legal { grid-template-columns: minmax(0, 1fr); }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .demo { order: -1; }
  .check-stage { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 18px; padding: 72px 12px 16px; }
  .side h2 { font-size: 26px; }
  .steps-say { margin: 10px 0 14px; min-height: 5.2em; }
  .steps-say p { font-size: 16px; }
  .receipt { padding: 14px; }
  .receipt dl { font-size: 13.5px; grid-template-columns: max-content 1fr; }
  .receipt dt, .receipt dd { padding: 3px 0; }
  .receipt .fine { display: none; }
  .track { overflow-x: auto; width: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; }
  .track figure { scroll-snap-align: start; }
  .track img { height: 380px; }
  .price { grid-template-columns: minmax(0, 1fr); }
  .tips ul { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .total { position: static; }
  .compare td:first-child { width: 28%; }
  .compare table { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover { transition: none; transform: none; }
}

/* ---------- start chooser (start.js) ---------- */
dialog.start { margin: auto; width: min(560px, calc(100vw - 32px)); padding: clamp(20px, 4vw, 32px); border: 0; border-radius: 22px; background: var(--paper); color: var(--ink); }
dialog.start::backdrop { background: rgba(14, 16, 18, .6); }
dialog.start > * + * { margin-top: 16px; }
.start-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.start-head h2 { font: 700 28px/1.1 'Anuphan'; letter-spacing: -0.02em; }
.start-x { border: 0; background: none; font: 500 16px 'Anuphan'; color: var(--ink-2); cursor: pointer; padding: 6px; }
.start-who { color: var(--ink-2); font-size: 16px; }
.start-err { color: #b3261e; font-size: 16px; }
.start-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.start-pick { display: grid; align-content: start; gap: 8px; padding: 20px; border-radius: 16px; background: var(--paper-2); text-decoration: none; border: 2px solid transparent; transition: border-color .18s, transform .18s; }
.start-pick:hover { border-color: var(--green); transform: translateY(-2px); }
.start-pick b { font: 700 21px/1.2 'Anuphan'; }
.start-pick span { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.start-pick em { font-style: normal; font-weight: 600; font-size: 15px; color: var(--green); }
.start-line { display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px; border-radius: 999px; background: #06c755; color: #fff; font: 600 17px/1 'Anuphan'; text-decoration: none; }
.start-line:hover { background: #05b34c; }
@media (max-width: 560px) { .start-picks { grid-template-columns: 1fr; } }
