/* Tokens, base, shared components, prototype guide UI */
:root {
  --black: #0a0a0a;
  --ink: #141414;
  --char: #1c1c1c;
  --line: #2b2b2b;
  --lime: #addd31;
  --lime-hi: #c3ee4a;
  --lime-lo: #86b016;
  --paper: #f1f0ec;
  --beige: #e9e6e1;
  --sand: #d9d1c6;
  --white: #fff;
  --red: #e4262b;
  --sky: #8fd0e6;
  --sun: #f4d311;
  --grey: #6b6a66;
  --font: 'Jost', 'Futura', 'Century Gothic', 'Trebuchet MS', sans-serif;
  --pad: clamp(20px, 4.2vw, 60px);
  --focus: var(--lime);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.45;
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.has-tour { padding-bottom: 104px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.on-light { --focus: #000; color: #000; }
.skip { position: absolute; left: -999px; top: 0; background: var(--lime); color: #000; padding: 12px 18px; z-index: 999; font-weight: 700; }
.skip:focus { left: 8px; top: 8px; }
.ico { width: 20px; height: 20px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* type */
.h1 { font-weight: 800; text-transform: uppercase; line-height: .9; letter-spacing: -.012em; font-size: clamp(44px, 6.6vw, 96px); }
.h2 { font-weight: 800; text-transform: uppercase; line-height: .95; letter-spacing: -.01em; font-size: clamp(30px, 3.8vw, 54px); }
.h3 { font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: -.005em; font-size: clamp(20px, 2vw, 27px); }
.h4 { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: 16px; }
.label { font-weight: 700; text-transform: uppercase; letter-spacing: .17em; font-size: 13px; }
.label--lime { color: var(--lime); }
.label--red { color: var(--red); }
.label--grey { color: var(--grey); }
.lead { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.5; }
.muted { color: var(--grey); }
.on-dark .muted, .panel--black .muted { color: #a9a8a3; }
.bar { display: block; width: clamp(110px, 12vw, 190px); height: 10px; background: var(--lime); }
.num-t { font-variant-numeric: tabular-nums; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  background: var(--lime); color: #000; border: 0; cursor: pointer;
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; line-height: 1.15;
  padding: 19px 24px; text-align: left;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--lime-hi); }
.btn:active { transform: translateY(1px); }
.btn--black { background: #000; color: #fff; }
.btn--black:hover { background: #262626; }
.btn--white { background: #fff; color: #000; }
.btn--white:hover { background: #ece9e2; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: #f0393d; }
.btn--sm { padding: 12px 16px; font-size: 13px; gap: 10px; }
.btn--block { width: 100%; justify-content: space-between; }
.btn[disabled], .btn.is-off { opacity: .32; cursor: not-allowed; pointer-events: none; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; border: 2px solid currentColor; border-radius: 999px;
  padding: 11px 24px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; line-height: 1;
  cursor: pointer; transition: background .15s, color .15s;
}
.pill:hover { background: #000; color: #fff; border-color: #000; }
.pill--fill { background: #000; color: #fff; border-color: #000; }
.pill--fill:hover { background: #2a2a2a; }
.pill--lime { background: var(--lime); color: #000; border-color: var(--lime); }
.pill--lime:hover { background: var(--lime-hi); color: #000; border-color: var(--lime-hi); }
.panel--black .pill:hover, .on-dark .pill:hover { background: #fff; color: #000; border-color: #fff; }
.circ { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: #000; flex: none; transition: transform .2s, background .2s; }
.circ--black { background: #000; color: #fff; }
.circ .ico { width: 24px; height: 24px; }
a:hover > .circ, .tile:hover .circ { transform: translateX(4px); }
.btn-link { font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; border-bottom: 2px solid currentColor; padding-bottom: 4px; }
.btn-link:hover { color: var(--lime); }

/* numbered circles */
.num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: #000; color: #fff; flex: none; }
.num--red { background: var(--red); }
.num--lime { background: var(--lime); color: #000; }
.num--sky { background: var(--sky); color: #000; }
.num--sun { background: var(--sun); color: #000; }
.num--lg { width: 64px; height: 64px; font-size: 24px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; padding: 5px 11px; border-radius: 999px; white-space: nowrap; line-height: 1.2; }
.chip .ico { width: 13px; height: 13px; stroke-width: 2.6; }
.chip--ok { background: var(--lime); color: #000; }
.chip--warn { background: var(--sun); color: #000; }
.chip--bad { background: var(--red); color: #fff; }
.chip--mute { background: #e1ded7; color: #38372f; }
.chip--dark { background: #000; color: #fff; }
.chip--sky { background: var(--sky); color: #000; }
.chip--line { border: 1.5px solid currentColor; }

/* forms */
.field { display: grid; gap: 9px; }
.field > label, .field > .lab { font-weight: 700; text-transform: uppercase; letter-spacing: .13em; font-size: 12px; }
.input, .select, .textarea {
  width: 100%; height: 58px; border: 2px solid #000; border-radius: 0; background: #fff; color: #000;
  font: 500 18px var(--font); padding: 0 16px; appearance: none; -webkit-appearance: none;
}
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 46px; }
.textarea { height: auto; min-height: 220px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 0; box-shadow: 0 0 0 4px var(--lime); }
.field.is-err .input { border-color: var(--red); box-shadow: 0 0 0 4px rgba(228, 38, 43, .16); }
.field.is-err .hint { display: none; }
.field__msg { display: none; color: var(--red); font-weight: 600; font-size: 14.5px; }
.field.is-err .field__msg { display: block; }
.hint { font-size: 14px; color: #55544f; }
.input[readonly] { background: var(--beige); border-color: #b9b5ab; color: #4a493f; }

.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #c9c5bb; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + i { background: #000; }
.switch input:checked + i::after { transform: translateX(22px); background: var(--lime); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + i { opacity: .55; }
.switch input:focus-visible + i { outline: 3px solid #000; outline-offset: 3px; }

.check { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.check input { position: absolute; opacity: 0; }
.check__box { width: 30px; height: 30px; border: 2px solid #000; background: #fff; display: grid; place-items: center; flex: none; margin-top: 1px; }
.check__box .ico { width: 20px; height: 20px; stroke-width: 3.2; opacity: 0; }
.check input:checked + .check__box { background: #000; color: var(--lime); }
.check input:checked + .check__box .ico { opacity: 1; }
.check input:focus-visible + .check__box { outline: 3px solid #000; outline-offset: 3px; }
.check input:disabled + .check__box { opacity: .35; }
.check input:disabled ~ .check__txt { opacity: .5; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 24px); opacity: 0; pointer-events: none; z-index: 9000;
  background: #000; color: #fff; border-left: 6px solid var(--lime); padding: 14px 20px; max-width: min(92vw, 560px);
  font-weight: 500; font-size: 15.5px; box-shadow: 0 12px 40px rgba(0,0,0,.35); transition: opacity .22s, transform .22s;
}
body.has-tour .toast { bottom: 128px; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 8000; display: grid; place-items: center; padding: 20px; }
.modal__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.66); }
.modal__box { position: relative; background: var(--paper); color: #000; width: min(640px, 100%); max-height: 92vh; overflow: auto; padding: clamp(22px, 3vw, 38px); border-top: 10px solid var(--lime); --focus: #000; }
.modal__x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; display: grid; place-items: center; }
.modal__x:hover { background: #000; color: #fff; }

/* ---------- prototype guide (menu + tour bar) ---------- */
.pmenu-btn {
  position: fixed; left: 16px; bottom: 16px; z-index: 7000; display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; border: 2px solid var(--lime); border-radius: 999px; padding: 11px 18px 11px 14px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 12.5px; box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
.pmenu-btn::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); }
.pmenu-btn:hover { background: #1b1b1b; }
.pmenu {
  position: fixed; left: 16px; bottom: 70px; z-index: 7001; width: min(380px, calc(100vw - 32px)); max-height: min(78vh, 720px); overflow: auto;
  background: #0d0d0d; color: #fff; border: 1px solid #333; border-top: 6px solid var(--lime); box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.pmenu__hd { padding: 20px 20px 14px; border-bottom: 1px solid #262626; }
.pmenu__hd p { color: #a9a8a3; font-size: 14px; margin-top: 6px; }
.pmenu__sec { padding: 14px 8px 8px; }
.pmenu__sec > .label { display: block; padding: 0 12px 8px; color: var(--lime); font-size: 12px; }
.pmenu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; font-weight: 500; font-size: 16px; }
.pmenu a:hover, .pmenu a.is-cur { background: #1c1c1c; }
.pmenu a.is-cur { box-shadow: inset 3px 0 0 var(--lime); }
.pmenu a span { color: #8c8b86; font-size: 13px; }
.pmenu__ft { display: flex; gap: 10px; padding: 14px 20px 20px; border-top: 1px solid #262626; flex-wrap: wrap; }

.tour {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 7100; background: #000; color: #fff; border-top: 4px solid var(--lime);
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0,0,0,.4);
}
.tour__count { display: grid; gap: 4px; }
.tour__count b { font-size: 34px; line-height: 1; font-weight: 800; color: var(--lime); font-variant-numeric: tabular-nums; }
.tour__count span { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #a9a8a3; font-weight: 700; }
.tour__txt { min-width: 0; }
.tour__txt .label { color: var(--lime); font-size: 11.5px; }
.tour__txt h4 { font-size: 20px; font-weight: 800; text-transform: uppercase; line-height: 1.1; margin: 4px 0 4px; }
.tour__txt p { font-size: 15px; color: #cfcdc6; max-width: 920px; line-height: 1.4; }
.tour__nav { display: flex; gap: 10px; align-items: center; }
.tour__nav .pill { padding: 12px 18px; font-size: 13px; }
.tour__nav .btn { padding: 14px 18px; font-size: 13px; }
.tour__dots { display: flex; gap: 4px; margin-top: 10px; }
.tour__dots i { height: 4px; flex: 1; max-width: 26px; background: #333; }
.tour__dots i.is-done { background: var(--lime-lo); }
.tour__dots i.is-cur { background: var(--lime); }

@media (max-width: 640px) {
  .pmenu-btn { padding: 8px 14px 8px 11px; font-size: 11px; left: 10px; bottom: 10px; }
}
@media (max-width: 880px) {
  .tour { grid-template-columns: 1fr; gap: 10px; padding-top: 12px; }
  .tour__count { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 10px; }
  .tour__count b { font-size: 24px; }
  .tour__txt h4 { font-size: 17px; }
  .tour__txt p { font-size: 14px; }
  .tour__nav { justify-content: space-between; }
  body.has-tour { padding-bottom: 214px; }
  body.has-tour .toast { bottom: 232px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
