@font-face { font-family: Fraunces; src: url('../fonts/Fraunces.ttf'); font-weight: 100 900; }
@font-face { font-family: PlexMono; src: url('../fonts/PlexMono.ttf'); font-weight: 400; }
@font-face { font-family: PlexMono; src: url('../fonts/PlexMono-Medium.ttf'); font-weight: 500; }

:root {
  --paper: #f7f3ec;
  --plate: #fffdf8;
  --ink: #141310;
  --ink2: #26241f;
  --muted: #6d675a;
  --faint: #a39e93;
  --gold: #a07c2c;
  --gold2: #b08d4f;
  --hair: #ddd5c2;
  --hair2: #e3dccb;
  --kw: #5b4a9e;
  --fn: #14586e;
  --num: #b4552d;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: PlexMono, monospace; font-size: 14px; line-height: 1.6; }
a { color: var(--ink); }
.mono { font-family: PlexMono, monospace; }
.serif { font-family: Fraunces, serif; }

header.site { position: sticky; top: 0; z-index: 20; background: rgba(247,243,236,0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--ink); }
.head-in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 20px; }
.head-in img { width: 36px; height: 36px; }
.brand { font-family: Fraunces, serif; font-weight: 600; letter-spacing: 0.3em; font-size: 15px; text-decoration: none; }
nav.main { margin-left: auto; display: flex; gap: 20px; font-size: 10.5px; letter-spacing: 0.2em; }
nav.main a { text-decoration: none; color: var(--muted); }
nav.main a:hover, nav.main a.on { color: var(--ink); }
.commit-chip { margin-left: 8px; font-size: 10px; letter-spacing: 0.18em; color: var(--muted); text-align: right; line-height: 1.6; }
.commit-chip b { color: var(--ink); font-weight: 500; }
@media (max-width: 720px) { nav.main { display: none; } }

main { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.hero { padding: 44px 0 8px; }
.kick { font-size: 10.5px; letter-spacing: 0.34em; color: var(--gold); font-weight: 500; }
h1.display { font-family: Fraunces, serif; font-weight: 560; font-size: clamp(40px, 8.5vw, 76px); line-height: 1.04; margin-top: 16px; }
h1.display em, h2.sec em { font-style: italic; color: var(--gold); }
.lede { font-size: 13.5px; color: #57534a; line-height: 1.7; margin-top: 16px; max-width: 560px; }

.plate { margin: 30px 0 0; background: var(--plate); border: 1px solid var(--ink); outline: 1px solid #d8d0bf; outline-offset: 5px; padding: 22px 20px 18px; position: relative; }
.plate .cap { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; letter-spacing: 0.22em; color: var(--muted); border-bottom: 1px solid var(--hair2); padding-bottom: 12px; }
.plate .cap b { color: var(--ink); font-weight: 500; }
.code { padding: 16px 0 8px; font-size: 12.8px; line-height: 1.95; color: var(--ink2); overflow-x: auto; }
.code .line { display: flex; white-space: nowrap; }
.code .no { width: 32px; text-align: right; padding-right: 13px; color: #b3ac9c; flex: none; }
.code .new { background: #f3ecd9; }
.kw { color: var(--kw); } .fn { color: var(--fn); } .stx { color: var(--gold); } .cm { color: var(--faint); } .num { color: var(--num); }
.sealstamp { position: absolute; right: 16px; bottom: 14px; width: 60px; height: 60px; border-radius: 50%; border: 1.5px solid var(--gold2); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 8px; letter-spacing: 0.13em; text-align: center; line-height: 1.55; transform: rotate(-8deg); background: rgba(247,243,236,0.88); font-weight: 500; }
.prog { margin: 24px 0 0; }
.prog .row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 10.5px; letter-spacing: 0.2em; color: var(--muted); }
.prog .row b { color: var(--ink); font-weight: 500; }
.prog .rule { height: 2px; background: #e0d9c6; margin-top: 10px; }
.prog .rule i { display: block; height: 2px; width: 0%; background: var(--ink); transition: width 1s linear; }

.spec { margin: 26px 0 0; border-top: 1px solid var(--ink); }
.spec .r { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.spec .l { font-size: 10.5px; letter-spacing: 0.24em; color: var(--muted); }
.spec .v { font-family: Fraunces, serif; font-size: clamp(19px, 4.6vw, 24px); font-weight: 560; text-align: right; min-width: 0; overflow-wrap: anywhere; }

section.block { margin: 54px 0 0; }
h2.sec { font-family: Fraunces, serif; font-weight: 560; font-size: clamp(28px, 6vw, 42px); line-height: 1.1; }
.sec-kick { font-size: 10px; letter-spacing: 0.32em; color: var(--gold); font-weight: 500; margin-bottom: 12px; }
p.body { color: #57534a; font-size: 13.5px; line-height: 1.75; margin-top: 14px; max-width: 640px; }
p.body b, li b { color: var(--ink); font-weight: 500; }
ul.body { color: #57534a; font-size: 13.5px; line-height: 1.8; margin: 12px 0 0 18px; max-width: 640px; }

.tablewrap { overflow-x: auto; margin-top: 20px; border: 1px solid var(--ink); outline: 1px solid #d8d0bf; outline-offset: 4px; background: var(--plate); }
table.board { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 560px; }
table.board th { text-align: left; font-weight: 500; font-size: 10px; letter-spacing: 0.22em; color: var(--muted); padding: 13px 14px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
table.board td { padding: 12px 14px; border-bottom: 1px solid var(--hair2); white-space: nowrap; color: var(--ink2); }
table.board td.serif { font-size: 15px; }
table.board .empty { color: var(--muted); white-space: normal; }
.st { font-size: 10px; letter-spacing: 0.16em; font-weight: 500; }
.st-shipped { color: var(--gold); } .st-compiled { color: #6f7477; } .st-broken { color: #3a382f; } .st-open { color: var(--fn); }

form.check { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
form.check input { flex: 1 1 260px; background: var(--plate); border: 1px solid var(--ink); padding: 14px 16px; font-family: PlexMono, monospace; font-size: 13px; color: var(--ink); }
form.check button, .btn { background: var(--ink); color: var(--paper); border: none; padding: 14px 22px; font-family: PlexMono, monospace; font-size: 11px; letter-spacing: 0.24em; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.note { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin-top: 16px; max-width: 640px; }
.note b { color: var(--ink); font-weight: 500; }
.addr { overflow-wrap: anywhere; }

footer.site { margin-top: 70px; border-top: 1px solid var(--ink); background: var(--paper); }
.foot-in { max-width: 1080px; margin: 0 auto; padding: 34px 20px 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 26px; }
@media (max-width: 720px) { .foot-in { grid-template-columns: 1fr 1fr; } }
footer.site h4 { font-size: 10px; letter-spacing: 0.3em; color: var(--gold); font-weight: 500; margin-bottom: 14px; }
footer.site a, footer.site .fl { display: block; color: var(--muted); text-decoration: none; font-size: 12px; line-height: 2; overflow-wrap: anywhere; }
footer.site a:hover { color: var(--ink); }
.foot-brand { font-family: Fraunces, serif; letter-spacing: 0.26em; font-size: 14px; color: var(--ink); }
.foot-tag { font-size: 11.5px; color: var(--muted); line-height: 1.8; margin-top: 10px; max-width: 260px; }
.legal-line { border-top: 1px solid var(--hair); }
.legal-in { max-width: 1080px; margin: 0 auto; padding: 16px 20px 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 9.5px; letter-spacing: 0.26em; color: var(--faint); }

article.page { padding: 40px 0 0; max-width: 720px; }
article.page h1 { font-family: Fraunces, serif; font-weight: 560; font-size: clamp(32px, 7vw, 52px); line-height: 1.08; }
article.page h2 { font-family: Fraunces, serif; font-weight: 560; font-size: 24px; margin-top: 34px; }
article.page p, article.page li { color: #57534a; font-size: 13.5px; line-height: 1.8; margin-top: 12px; }
article.page ul { margin-left: 18px; }
article.page b { color: var(--ink); font-weight: 500; }
.kv { border-top: 1px solid var(--ink); margin-top: 22px; }
.kv .r { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--hair); font-size: 12.5px; }
.kv .r span:first-child { color: var(--muted); letter-spacing: 0.14em; font-size: 10.5px; padding-top: 2px; }
.kv .r span:last-child { text-align: right; overflow-wrap: anywhere; }

/* ---------- v2 interactive layer (homepage) ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

.plate.tilting { transition: transform .18s ease-out; transform-style: preserve-3d; will-change: transform; }
.plate .sheen { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(176,141,79,0.14), transparent 65%); opacity: 0; transition: opacity .3s ease; }
.plate:hover .sheen { opacity: 1; }

.graphwrap { margin-top: 16px; border-top: 1px solid var(--hair2); padding-top: 14px; }
.graph-cap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 9.5px; letter-spacing: 0.22em; color: var(--muted); }
.graph-cap b { color: var(--ink); font-weight: 500; }
.graph-cap .zd { color: var(--gold); }
#graphCanvas { display: block; width: 100%; margin-top: 10px; }
.typeline { margin-top: 12px; font-size: 12px; color: var(--ink2); min-height: 1.6em; overflow-wrap: anywhere; }
.typeline .caret { display: inline-block; width: 7px; height: 13px; background: var(--gold); margin-left: 3px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .typeline .caret { animation: none; } }

.gauge { margin: 26px 0 0; background: var(--plate); border: 1px solid var(--ink); outline: 1px solid #d8d0bf; outline-offset: 5px; padding: 18px 20px 16px; }
.gauge-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 10px; letter-spacing: 0.22em; color: var(--muted); border-bottom: 1px solid var(--hair2); padding-bottom: 10px; }
.gauge-head b { color: var(--ink); font-weight: 500; }
.gauge-track { position: relative; display: flex; margin-top: 16px; border: 1px solid var(--hair); }
.gauge .band { padding: 9px 10px 8px; min-width: 0; }
.gauge .band span { display: block; font-size: 10px; letter-spacing: 0.18em; font-weight: 500; white-space: nowrap; }
.gauge .band small { display: block; font-size: 9.5px; color: var(--muted); letter-spacing: 0.04em; margin-top: 2px; white-space: nowrap; }
.band-broken { flex: 0 0 19.23%; background: #efe9da; color: #3a382f; }
.band-compiled { flex: 0 0 58.47%; background: #e6e2d6; color: #4c4f52; border-left: 1px solid var(--hair); }
.band-shipped { flex: 1 1 auto; background: #f3ecd9; color: var(--gold); border-left: 1px solid var(--hair); }
.gauge .band.on { box-shadow: inset 0 0 0 1.5px var(--ink); }
.gauge .band.on small { color: var(--ink2); }
.gauge-marker { position: absolute; top: -7px; bottom: -7px; width: 2px; background: var(--ink); left: 0%; transition: left 1.2s cubic-bezier(.22,.8,.3,1); }
.gauge-marker::before { content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top: 6px solid var(--ink); }
.gauge-note { margin-top: 12px; font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.gauge-note b { color: var(--ink); font-weight: 500; }
@media (max-width: 560px) {
  .gauge .band small { white-space: normal; }
  .gauge .band span { font-size: 9px; letter-spacing: 0.1em; }
  .gauge .band { padding: 8px 7px 7px; }
}

.files { margin: 26px 0 0; background: var(--plate); border: 1px solid var(--ink); outline: 1px solid #d8d0bf; outline-offset: 5px; }
.filetabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--ink); }
.ftab { appearance: none; background: transparent; border: none; border-right: 1px solid var(--hair); font-family: PlexMono, monospace; font-size: 11.5px; letter-spacing: 0.06em; color: var(--muted); padding: 12px 18px; cursor: pointer; white-space: nowrap; }
.ftab::before { content: "◆ "; color: var(--faint); font-size: 8px; vertical-align: 2px; }
.ftab:hover { color: var(--ink); }
.ftab.on { color: var(--ink); background: #f3ecd9; box-shadow: inset 0 -2px 0 var(--gold); }
.filepanel { padding: 16px 20px 14px; min-height: 148px; }
.filepanel .line { opacity: 0; transform: translateX(6px); transition: opacity .3s ease, transform .3s ease; }
.filepanel .line.show { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .filepanel .line { opacity: 1; transform: none; transition: none; } }

.archgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
@media (max-width: 860px) { .archgrid { grid-template-columns: 1fr; } }
.archplate { position: relative; background: var(--plate); border: 1px solid var(--ink); outline: 1px solid #d8d0bf; outline-offset: 4px; padding: 18px 18px 14px; overflow: hidden; }
.archplate .ano { font-family: Fraunces, serif; font-size: 30px; font-weight: 560; }
.archplate .awin { font-size: 10px; letter-spacing: 0.14em; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.archplate .arow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hair2); font-size: 11.5px; margin-top: 8px; }
.archplate .arow span:first-child { color: var(--muted); letter-spacing: 0.14em; font-size: 9.5px; padding-top: 2px; }
.archplate .arow span:last-child { font-weight: 500; text-align: right; }
.archplate .arate { margin-top: 10px; font-size: 11px; color: var(--muted); }
.archplate .arate b { color: var(--gold); font-weight: 500; }
.astamp { position: absolute; right: 12px; top: 12px; border: 1.5px solid var(--gold2); color: var(--gold); border-radius: 4px; padding: 4px 8px; font-size: 9.5px; letter-spacing: 0.18em; font-weight: 500; transform: rotate(7deg) scale(1.6); opacity: 0; background: rgba(247,243,236,0.9); }
.astamp.st-broken { border-color: #8a8578; color: #57534a; }
.astamp.st-compiled { border-color: #8b9094; color: #4c4f52; }
.rv.in .astamp, .astamp.in { animation: stampin .45s cubic-bezier(.2,2.2,.4,1) forwards; }
@keyframes stampin { to { transform: rotate(7deg) scale(1); opacity: 0.92; } }
@media (prefers-reduced-motion: reduce) { .astamp { transform: rotate(7deg) scale(1); opacity: 0.92; animation: none; } }
