/* inb4 draft A: shared tokens, rail and components. Ground, greys and type follow the picked style (near-white, black and greys only). */
@font-face { font-family: "Roboto"; src: url("/fonts/roboto-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Roboto"; src: url("/fonts/roboto-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: block; }
@font-face { font-family: "Roboto Mono"; src: url("/fonts/roboto-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Roboto Mono"; src: url("/fonts/roboto-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: block; }

:root {
  --bg: #fcfcfc;
  --paper: #ffffff;
  --panel: #f3f3f3;
  --panel-2: #ececec;
  --ink: #171717;
  --mute: #5c5c5c;
  --grey: #6b6b6b;
  --grey-h: #6b6b6b; /* A used #797979; darkened to hold 4.5:1 on every ground */
  --off: #707070; /* A used #a3a3a3; darkened to hold 4.5:1 */
  --line: rgb(var(--shade) / .09);
  --line-2: rgb(var(--shade) / .16);
  --rail: 248px;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
  --press: cubic-bezier(.4, 0, .2, 1);
  --mono: "Roboto Mono", ui-monospace, monospace;
  --sans: "Roboto", system-ui, sans-serif;
  color-scheme: light;
  --app-bg: #f6f6f5;
  --on-ink: #ffffff;
  --ink-hover: #333333;
  --ink-press: #000000;
  --err: #b4232c;
  --skel-a: #efefef;
  --skel-b: #f7f7f7;
  --text-2: #2d2d2d;
  --shade: 0 0 0;          /* hairlines, fills and rings: black on the light ground */
  --ink-rgb: 23 23 23;     /* the line drawings */
  --grey-rgb: 121 121 121;
  --paper-rgb: 255 255 255;
}
/* dark theme: the same tokens swapped (near-black ground, light ink, the same steps of grey, hairlines and the line
   drawings inverted). It follows the system unless a theme was picked in the rail (data-theme on <html>). Every text
   grey holds 4.5:1 or more on every dark ground. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0e0e;
  --paper: #161616;
  --panel: #1d1d1d;
  --panel-2: #242424;
  --ink: #ededed;
  --mute: #bdbdbd;
  --grey: #a6a6a6;
  --grey-h: #9e9e9e;
  --off: #949494;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);
  --app-bg: #121212;
  --on-ink: #111111;
  --ink-hover: #d4d4d4;
  --ink-press: #ffffff;
  --err: #ff8080;
  --skel-a: #1e1e1e;
  --skel-b: #2a2a2a;
  --text-2: #d4d4d4;
  --shade: 255 255 255;
  --ink-rgb: 237 237 237;
  --grey-rgb: 150 150 150;
  --paper-rgb: 22 22 22;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e0e0e;
    --paper: #161616;
    --panel: #1d1d1d;
    --panel-2: #242424;
    --ink: #ededed;
    --mute: #bdbdbd;
    --grey: #a6a6a6;
    --grey-h: #9e9e9e;
    --off: #949494;
    --line: rgba(255, 255, 255, .1);
    --line-2: rgba(255, 255, 255, .18);
    --app-bg: #121212;
    --on-ink: #111111;
    --ink-hover: #d4d4d4;
    --ink-press: #ffffff;
    --err: #ff8080;
    --skel-a: #1e1e1e;
    --skel-b: #2a2a2a;
    --text-2: #d4d4d4;
    --shade: 255 255 255;
    --ink-rgb: 237 237 237;
    --grey-rgb: 150 150 150;
    --paper-rgb: 22 22 22;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/24px var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tab { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* two-tone heading, the style's one typographic move */
.tt { font-weight: 400; letter-spacing: -0.048em; margin: 0; }
.tt .g { color: var(--grey-h); }

/* underlined text link, the dice's button */
.ul { display: inline-flex; align-items: center; min-height: 44px; gap: 6px; font-size: 15px; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--off); transition: text-decoration-color 150ms var(--press), color 150ms var(--press), transform 150ms var(--press); }
.ul:hover { text-decoration-color: var(--ink); }
.ul:active { transform: scale(.97); }
.ul .arr { font-family: var(--mono); font-size: 13px; color: var(--grey); }

/* the style's solid button: 2px corners, black fill */
.btn { display: inline-grid; place-items: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 2px; background: var(--ink); color: var(--on-ink); font-weight: 500; font-size: 15px; cursor: pointer; transition: background-color 150ms var(--press), transform 150ms var(--press), opacity 150ms var(--press); }
.btn:hover { background: var(--ink-hover); }
.btn:active { transform: scale(.97); background: var(--ink-press); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.quiet { background: rgb(var(--shade) / .06); color: var(--ink); }
.btn.quiet:hover { background: rgb(var(--shade) / .1); }
.btn > span { grid-area: 1 / 1; transition: opacity 150ms var(--press); }
.btn > span[hidden] { display: block; visibility: hidden; opacity: 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 2px; background: rgb(var(--shade) / .05); font: 400 13px/1 var(--mono); color: var(--mute); white-space: nowrap; }
.pill.on { background: var(--ink); color: var(--on-ink); }
.pill.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.stamp { font: 500 13px/1 var(--mono); letter-spacing: .02em; }

/* ---------- the rail: the dice's left vertical menu, the style's sticky left column ---------- */
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); padding: 24px 24px 24px 24px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand b { font-weight: 400; font-size: 28px; letter-spacing: -0.05em; }
.menu { list-style: none; margin: 36px 0 0; padding: 0; }
.menu li + li { border-top: 1px solid var(--line); }
.menu a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; text-decoration: none; color: var(--grey); font-size: 15px; letter-spacing: -0.02em; transition: color 150ms var(--press); }
.menu a .n { font: 400 13px/1 var(--mono); color: var(--off); transition: color 150ms var(--press); }
.menu a:hover, .menu a[aria-current="page"] { color: var(--ink); }
.menu a:hover .n, .menu a[aria-current="page"] .n { color: var(--mute); }
.menu a:active { transform: scale(.98); }
.rail-foot { margin-top: auto; }
.launch { border-top: 1px solid var(--line); padding-top: 14px; }
.launch .row { display: flex; justify-content: space-between; align-items: baseline; }
.launch .tick { font-size: 15px; letter-spacing: -0.02em; }
.launch .n { font: 400 13px/1 var(--mono); color: var(--off); }
.launch .state { margin-top: 6px; font: 500 13px/18px var(--mono); color: var(--ink); }
.launch p { margin: 4px 0 0; color: var(--grey); font-size: 13px; line-height: 19px; }
.rail .x { margin-top: 10px; font-size: 15px; }
.menu-btn { display: none; }

.page { margin-left: var(--rail); min-height: 100vh; }

.foot { margin-left: var(--rail); border-top: 1px solid var(--line); padding: 28px 40px 40px; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; color: var(--grey); font-size: 14px; }
.foot .legal { flex: 1 1 420px; }
.foot a { color: var(--mute); display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }

@media (max-width: 860px) {
  .rail { position: sticky; top: 0; inset: auto; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-grid; place-items: center; min-height: 44px; min-width: 64px; padding: 0 12px; border: 0; background: rgb(var(--shade) / .06); border-radius: 2px; font-size: 15px; cursor: pointer; }
  .menu { display: none; width: 100%; }
  .rail-foot { order: 5; width: 100%; margin: 0 0 6px; }
  .launch { border-top: 0; padding-top: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
  .launch .row { display: contents; }
  .launch .row .n { display: none; }
  .launch .tick { font-size: 15px; }
  .launch .state { margin: 0; }
  .launch p { margin: 0; width: 100%; font-size: 13px; }
  .rail.open .menu { display: block; }
  .rail .x { display: none; }
  .rail.open .menu { margin-top: 8px; }
  .page, .foot { margin-left: 0; }
  .foot { padding: 24px 16px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- live site additions (same tokens and devices as draft A) ---------- */
.menu a.ext::after { content: ""; }
.launch .tok { margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.launch .tok dt { font-size: 13px; color: var(--grey); }
.launch .tok dd { margin: 0; font: 400 15px/22px var(--mono); }
.launch .mint { margin-top: 8px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 2px; background: rgb(var(--shade) / .06); font: 400 13px/1 var(--mono); cursor: pointer; display: inline-grid; place-items: center; transition: background-color 150ms var(--press), transform 150ms var(--press); }
.launch .mint:hover { background: rgb(var(--shade) / .1); }
.launch .mint:active { transform: scale(.97); }
.launch .mint > span { grid-area: 1 / 1; }
.launch .mint > span[hidden] { display: block; visibility: hidden; }
.toasts { position: fixed; right: 24px; bottom: 24px; display: grid; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--on-ink); border-radius: 2px; padding: 10px 14px; font-size: 14px; line-height: 20px; transform: translateY(0); opacity: 1; transition: transform 400ms var(--out), opacity 400ms var(--out); }
.toast.in { transform: translateY(100%); opacity: 0; }
.foot a[hidden] { display: none; }
@media (max-width: 860px) {
  .launch .tok { display: flex; gap: 12px; margin: 0; }
  .launch .tok div { display: flex; gap: 6px; align-items: baseline; }
  .launch .mint { margin: 0; }
  .toasts { right: 16px; bottom: 16px; }
}

/* theme toggle in the rail footer: auto (the system's), light, dark */
.rail .theme { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--grey); font-size: 15px; cursor: pointer; transition: color 150ms var(--press); }
.rail .theme span { font: 400 13px/1 var(--mono); color: var(--mute); padding: 4px 6px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--line-2); }
.rail .theme:hover { color: var(--ink); }
.rail .theme:active { transform: scale(.97); }
.rail-foot .theme { display: flex; }
@media (max-width: 860px) {
  .rail .theme { display: none; }
  .rail.open .theme { display: inline-flex; margin: 4px 0 0; }
}
