@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=Instrument+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* Layout: white paper, sticky top bar, 1040px column; ink outlines with the Shiba's orange as the one accent; gears as the recurring motif */
:root {
  --paper: #ffffff;
  --wash: #faf8f6;
  --ink: #141210;
  --muted: #67625c;
  --line: #ece7e1;
  --shiba: #df8a2f;
  --shiba-deep: #b9661a;
  --shiba-soft: #fff4e8;
  --good: #1f8a4c;
  --display: 'Syne', 'Arial Black', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --r: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.6; }
img { max-width: 100%; display: block; }
main { overflow-x: clip; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--shiba); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.6vw, 50px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.8vw, 30px); font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: 0; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* top bar */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: .06em; }
.brand .mark { position: relative; width: 38px; height: 38px; }
.brand .mark svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.brand .mark img { position: absolute; inset: 7px; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; font-size: 14px; color: var(--muted); padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--wash); }
.nav a.on { color: var(--ink); background: var(--shiba-soft); box-shadow: inset 0 0 0 1px var(--shiba); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 14px; font: 600 14px var(--body); color: var(--ink); cursor: pointer; }
.x-btn { display: inline-flex; align-items: center; gap: 7px; flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font: 700 13px var(--body); letter-spacing: .04em; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.x-btn svg { width: 13px; height: 13px; display: block; }
.x-btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--shiba); }
.top .x-btn { margin-left: 8px; }
footer .x-btn { margin-top: 18px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 14px var(--body); text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--shiba); }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* sections */
.section { padding-block: 60px; border-top: 1px solid var(--line); }
.section.wash { background: var(--wash); }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--shiba-deep); display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--shiba); }
.lead { font-size: 16px; color: var(--muted); max-width: 58ch; margin-top: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.head { display: grid; gap: 0; margin-bottom: 28px; max-width: 720px; }

/* page header (inner pages) */
.page-head { padding-block: 56px 40px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.page-head .gearbig { width: 96px; height: 96px; color: var(--line); }

/* hero */
.hero { padding-block: 56px 64px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--shiba); }
.hero .actions { margin-top: 32px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 24px; background: var(--paper); }
.pill .live { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(31,138,76,.15); }
.medallion { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1; margin-left: auto; }
.medallion svg.g1 { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--ink); }
.medallion svg.g2 { position: absolute; width: 34%; height: 34%; right: -8%; bottom: 2%; color: var(--shiba); }
.medallion .face { position: absolute; inset: 17%; border-radius: 50%; overflow: hidden; border: 3px solid var(--ink); background: var(--wash); }
.medallion .face img { width: 100%; height: 100%; object-fit: cover; }
.spin { animation: spin 40s linear infinite; transform-origin: 50% 50%; }
.spin-rev { animation: spin 20s linear infinite reverse; transform-origin: 50% 50%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ticker */
.ticker { border-block: 2px solid var(--ink); overflow: hidden; background: var(--shiba-soft); }
.ticker .track { display: flex; gap: 40px; padding: 10px 0; width: max-content; animation: slide 36s linear infinite; font-family: var(--display); font-weight: 700; font-size: 14px; white-space: nowrap; }
.ticker .track span { display: inline-flex; align-items: center; gap: 48px; }
.ticker .track span::after { content: "⚙"; color: var(--shiba); }
@keyframes slide { to { transform: translateX(-50%); } }

/* cards */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 22px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card.lift { box-shadow: 3px 3px 0 var(--ink); }
.card.soft { border-color: var(--line); }
.card.tint { background: var(--shiba-soft); border-color: var(--shiba); }
.card .idx { font-family: var(--mono); font-size: 12px; color: var(--shiba-deep); }
.stat .l { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stat .n { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .n small { font-family: var(--body); font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; }

/* launch stat */
.launch { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.launch .big { font-family: var(--display); font-weight: 800; font-size: clamp(52px, 8vw, 88px); line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.launch .big sup { font-size: .4em; color: var(--shiba); vertical-align: top; }
.timeline { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 18px; }
.timeline i { flex: 1; background: var(--ink); border-radius: 4px 4px 0 0; }
.timeline i:last-child { background: var(--shiba); }
.tl-labels { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 6px; }

/* flywheel */
.wheel-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.wheel { width: 100%; max-width: 380px; margin: 0 auto; }
.wheel text { font-family: var(--body); font-size: 14px; font-weight: 600; fill: var(--ink); }
.wheel .sub { font-size: 11.5px; font-weight: 500; fill: var(--muted); paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round; }
.wheel .hub { font-family: var(--display); font-weight: 800; font-size: 26px; }
.steps { display: grid; gap: 0; counter-reset: s; }
.steps > div { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.steps > div:last-child { border-bottom: 0; }
.steps > div::before { counter-increment: s; content: counter(s); width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 14px; }
.steps h3 { font-size: 17px; margin-bottom: 4px; }

/* split bar */
.split { display: flex; height: 48px; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; font-family: var(--display); font-weight: 700; font-size: 14px; }
.split div { flex: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.split .a { background: var(--shiba); color: var(--ink); border-right: 2px solid var(--ink); }
.split .b { background: var(--ink); color: var(--paper); }

/* QR card */
.qr-card { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.qr { width: 168px; height: 168px; position: relative; border: 2px solid var(--ink); border-radius: 16px; padding: 12px; background: var(--paper); }
.qr canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.qr img { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); border-radius: 50%; border: 3px solid var(--paper); object-fit: cover; }
.qr .badge { position: absolute; top: -10px; right: -10px; }
.badge { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--paper); letter-spacing: .04em; }
.badge.o { background: var(--shiba); color: var(--ink); }
.badge.g { background: var(--wash); color: var(--muted); border: 1px solid var(--line); }

/* forms */
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input, select { font: 500 16px var(--body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 10px; padding: 12px 14px; width: 100%; min-width: 0; }
input:disabled, select:disabled { background: var(--wash); border-color: var(--line); color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { font: 600 14px var(--body); padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--muted); cursor: pointer; }
.chips button.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* table */
.table-wrap { overflow-x: auto; border: 1.5px solid var(--ink); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 14px 18px; border-bottom: 1.5px solid var(--ink); background: var(--wash); white-space: nowrap; }
td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
td.note { white-space: normal; min-width: 200px; }
tr:last-child td { border-bottom: 0; }
td.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.empty { padding: 64px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.empty svg { width: 56px; height: 56px; color: var(--line); }
.empty b { font-family: var(--display); font-size: 20px; }

/* docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 80px; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 90px); display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a { text-decoration: none; font-size: 14px; color: var(--muted); padding: 6px 14px; margin-left: -2px; border-left: 2px solid transparent; }
.toc a.on { color: var(--ink); border-left-color: var(--shiba); font-weight: 600; }
article.prose { max-width: 68ch; }
.prose section { padding-block: 8px 40px; scroll-margin-top: 100px; }
.prose h2 { font-size: 22px; margin-bottom: 16px; }
.prose p + p { margin-top: 14px; }
.prose pre { font-family: var(--mono); font-size: 13.5px; background: var(--ink); color: #f6efe7; padding: 20px; border-radius: 12px; overflow-x: auto; margin: 18px 0 0; line-height: 1.7; }
.prose ul { padding-left: 20px; margin: 12px 0 0; }
.prose li + li { margin-top: 6px; }
details { border: 1.5px solid var(--ink); border-radius: 12px; padding: 4px 18px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
details p { padding-bottom: 14px; color: var(--muted); }

/* calculator */
.calc-out { display: grid; gap: 0; }
.calc-out .kv b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.saved { font-family: var(--display); font-weight: 700; font-size: 30px; color: var(--shiba-deep); font-variant-numeric: tabular-nums; }

/* feed */
.post { display: grid; gap: 10px; }
.post .meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.post .meta img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--ink); }
.post .meta b { color: var(--ink); }
.post a.more { font-weight: 600; text-decoration: none; color: var(--shiba-deep); }
.feed { display: grid; gap: 16px; max-width: 720px; }

/* footer */
footer { border-top: 2px solid var(--ink); padding-block: 48px 56px; margin-top: 0; }
footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
footer .fnav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; align-content: start; }
footer .fnav a { text-decoration: none; font-weight: 500; }
footer p { font-size: 13px; color: var(--muted); max-width: 52ch; margin-top: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 40; }

@media (max-width: 900px) {
  .hero, .wheel-wrap, .launch { grid-template-columns: 1fr; }
  .medallion { margin: 0 auto; max-width: 320px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 0; }
  .toc a { border-left: 0; padding: 6px 0; margin: 0; }
  .page-head .gearbig { display: none; }
  .page-head { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr; }
  footer .fnav { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-block; order: 3; margin-left: 8px; }
  .top .x-btn { order: 2; margin-left: auto; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .g2, .field-row, .qr-card { grid-template-columns: 1fr; }
  .section { padding-block: 56px; }
  .split { font-size: 14px; }
}
@media (max-width: 480px) {
  .g4 { grid-template-columns: 1fr; }
  .stat .n { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .spin, .spin-rev, .ticker .track { animation: none; }
  html { scroll-behavior: auto; }
  .btn, .x-btn { transition: none; }
}
