:root {
  --bg: #0C0C0E; --card: #16161A; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #F2F2F5; --muted: #9A9AA6; --dim: #6E6E7A; --lav: #A9ADE4; --ink: #11161E;
  --ok: #2ECC7B; --ok-text: #7CE8AE; --red: #FF6B7D;
  --pen: #A9ADE4; --pen-bright: #C9CCF2; --pen-soft: rgba(169,173,228,.4);
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --num: 'Saira Condensed', Inter, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --hair: rgba(255,255,255,.07); --hair2: rgba(255,255,255,.1); --chip: rgba(255,255,255,.05);
  --sub: #A9A9B4; --soft-text: #C9C9D4; --eyebrow: #8C8C99; --placeholder: #5E5E6A; --dot-off: #3A3A44;
  --topbar: rgba(12,12,14,.74); --grain: rgba(255,255,255,.04); --shadow: rgba(0,0,0,.55);
  --pen-ink: var(--pen-bright); --info-text: #D6D8F4; --bad-text: #F3C4CA;
  --btn-bg: #F2F2F5; --btn-text: #11161E;
  color-scheme: dark;
}

/* Light theme: follows the phone's setting unless the visitor picks one. */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --bg: #F6F6FA; --card: #FFFFFF; --line: rgba(17,22,30,.08); --line2: rgba(17,22,30,.14);
  --text: #11161E; --muted: #5F6472; --dim: #7A7F8C; --lav: #5C61C4; --ok-text: #127A45; --red: #C4122F;
  --hair: rgba(17,22,30,.08); --hair2: rgba(17,22,30,.12); --chip: rgba(17,22,30,.04);
  --sub: #525866; --soft-text: #3A3F4B; --eyebrow: #6B7080; --placeholder: #9A9EAA; --dot-off: #C9CBD6;
  --topbar: rgba(246,246,250,.8); --grain: rgba(17,22,30,.035); --shadow: rgba(17,22,30,.22);
  --pen-ink: var(--pen); --info-text: #34397F; --bad-text: #6E1020;
  --btn-bg: #11161E; --btn-text: #FFFFFF;
  color-scheme: light; } }
:root[data-theme="light"] { --bg: #F6F6FA; --card: #FFFFFF; --line: rgba(17,22,30,.08); --line2: rgba(17,22,30,.14);
  --text: #11161E; --muted: #5F6472; --dim: #7A7F8C; --lav: #5C61C4; --ok-text: #127A45; --red: #C4122F;
  --hair: rgba(17,22,30,.08); --hair2: rgba(17,22,30,.12); --chip: rgba(17,22,30,.04);
  --sub: #525866; --soft-text: #3A3F4B; --eyebrow: #6B7080; --placeholder: #9A9EAA; --dot-off: #C9CBD6;
  --topbar: rgba(246,246,250,.8); --grain: rgba(17,22,30,.035); --shadow: rgba(17,22,30,.22);
  --pen-ink: var(--pen); --info-text: #34397F; --bad-text: #6E1020;
  --btn-bg: #11161E; --btn-text: #FFFFFF;
  color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
img { max-width: none; }
h1, h2 { margin: 0; letter-spacing: -0.02em; }
h1 { font-weight: 800; font-size: clamp(30px, 8vw, 46px); line-height: 1.02; }
h2 { font-weight: 700; font-size: 19px; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.stack { max-width: 560px; display: flex; flex-direction: column; gap: 14px; padding-top: 18px; padding-bottom: 36px; }
.mono { font-family: var(--mono); }
.num { font-family: var(--num); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.lav { color: var(--lav); }
.eyebrow { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--eyebrow); }
.eyebrow.light { color: rgba(255,255,255,.78); }
.eyebrow.red { color: var(--red); }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 3px; border-radius: 6px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; background: var(--topbar); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--hair); }
.topin { height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.mark { width: 30px; height: 30px; border-radius: 8px; background: var(--btn-bg); color: var(--btn-text); display: grid; place-items: center; font-weight: 900; font-size: 15px; letter-spacing: -.06em; }
.pill { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--lav); border: 1px solid rgba(169,173,228,.3); border-radius: 999px; padding: 5px 10px; display: flex; align-items: center; gap: 7px; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--lav); }

/* animation */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sweep { 0% { top: 6%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 90%; opacity: 0; } }
@keyframes floaty { 0%,100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(-7deg) translateY(-8px); } }
@keyframes pulse { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: .9; transform: scale(1.06); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes blink { 50% { opacity: .25; } }
.rise { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.pop { animation: pop .45s cubic-bezier(.2,.8,.2,1) .2s both; }
.floaty { animation: floaty 6s ease-in-out infinite; }
.stagger > * { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.stagger > *:nth-child(2) { animation-delay: .04s } .stagger > *:nth-child(3) { animation-delay: .08s }
.stagger > *:nth-child(4) { animation-delay: .12s } .stagger > *:nth-child(5) { animation-delay: .16s }
.stagger > *:nth-child(6) { animation-delay: .2s } .stagger > *:nth-child(7) { animation-delay: .24s }
.stagger > *:nth-child(8) { animation-delay: .28s } .stagger > *:nth-child(9) { animation-delay: .32s }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* home hero */
.hero { position: relative; height: 300px; overflow: hidden; background: radial-gradient(ellipse at 50% 70%, rgba(169,173,228,.28) 0%, transparent 60%); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--bg)); }
.fanrow { position: absolute; left: 0; right: 0; bottom: 30px; display: flex; justify-content: center; align-items: flex-end; }
.fan { margin: 0 -8px; filter: drop-shadow(0 16px 18px var(--shadow)); }
.fan-0 { height: 162px; transform: rotate(-20deg) translateY(36px); } .fan-8 { height: 162px; transform: rotate(20deg) translateY(36px); }
.fan-1 { height: 174px; transform: rotate(-15deg) translateY(27px); } .fan-7 { height: 174px; transform: rotate(15deg) translateY(27px); }
.fan-2 { height: 186px; transform: rotate(-10deg) translateY(18px); } .fan-6 { height: 186px; transform: rotate(10deg) translateY(18px); }
.fan-3 { height: 198px; transform: rotate(-5deg) translateY(9px); } .fan-5 { height: 198px; transform: rotate(5deg) translateY(9px); }
.fan-4 { height: 212px; }
.sweep { position: absolute; left: 50%; width: min(88%, 520px); transform: translateX(-50%); height: 2px; background: linear-gradient(90deg, transparent, var(--lav), #fff, var(--lav), transparent); box-shadow: 0 0 18px 4px rgba(169,173,228,.55); animation: sweep 2.2s ease-in-out infinite; z-index: 2; }
.intro { max-width: 560px; margin-top: -16px; position: relative; display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.lede { color: var(--sub); font-size: 15px; max-width: 460px; }

/* lookup */
.lookup { margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card .lookup { margin: 0; background: none; border: 0; padding: 0; }
.lookup label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--eyebrow); }
.lk-row { display: flex; gap: 8px; }
.lookup input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line2); color: var(--text); border-radius: 12px; padding: 13px 14px; font: 500 16px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.lookup input::placeholder { color: var(--placeholder); text-transform: none; letter-spacing: .02em; }
.lookup input:focus { outline: none; border-color: var(--lav); box-shadow: 0 0 0 3px rgba(169,173,228,.18); }
.lookup button { background: var(--btn-bg); color: var(--btn-text); border: 0; border-radius: 12px; padding: 0 18px; font: 700 15px var(--sans); cursor: pointer; }
.lookup button:hover { filter: brightness(.92); }
.lk-status:empty { display: none; }
.lk-status { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; }
.lk-status.checking { background: var(--chip); border: 1px solid var(--line2); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--soft-text); display: flex; align-items: center; gap: 9px; }
.lk-status.checking::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lav); animation: blink 1s infinite; }
.lk-status.found { background: rgba(27,138,82,.16); border: 1px solid rgba(46,204,123,.45); color: var(--ok-text); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; }
.lk-status.bad { background: rgba(196,18,47,.14); border: 1px solid rgba(255,90,110,.45); color: var(--bad-text); }
.lk-status.bad b { color: var(--red); display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; margin-bottom: 3px; }
.lk-status.info { background: rgba(169,173,228,.1); border: 1px solid rgba(169,173,228,.35); color: var(--info-text); }

/* pen grid */
.rowhead { display: flex; align-items: baseline; justify-content: space-between; margin: 26px auto 12px; max-width: 560px; }
@media (min-width: 760px) { .rowhead { max-width: none; } }
.pengrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 560px; margin: 0 auto; padding-bottom: 30px; }
@media (min-width: 760px) { .pengrid { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: none; } }
.pencard { height: 216px; border-radius: 18px; background: linear-gradient(180deg, var(--card) 30%, var(--pen-soft) 140%); border: 1px solid var(--hair); position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding-top: 12px; transition: transform .15s, border-color .2s; }
.pencard:hover { transform: translateY(-2px); border-color: var(--pen-ink); }
.pencard img { height: 140px; width: auto; filter: drop-shadow(0 10px 14px var(--shadow)); }
.pc-name { position: absolute; left: 10px; right: 10px; bottom: 26px; font-size: 12.5px; font-weight: 700; line-height: 1.15; }
.pc-meta { position: absolute; left: 10px; right: 8px; bottom: 10px; font: 9px var(--mono); letter-spacing: 0; color: var(--muted); display: flex; gap: 5px; align-items: center; white-space: nowrap; overflow: hidden; }
.pc-meta i { width: 6px; height: 6px; border-radius: 50%; background: var(--pen-ink); flex: none; }

/* pen page */
.penhero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(160deg, var(--pen) 0%, var(--bg) 78%); }
.penhero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(var(--grain) 1px, transparent 1px); background-size: 3px 3px; }
.ph-in { position: relative; height: 270px; max-width: 560px; }
.ph-text { position: absolute; left: 18px; top: 28px; display: flex; flex-direction: column; gap: 6px; max-width: 64%; }
.dose { font-family: var(--num); font-weight: 800; font-size: 46px; line-height: .9; }
.dose small { font-size: 18px; margin-left: 2px; }
.dose.accent { color: var(--pen-ink); font-size: 58px; line-height: .8; }
.ph-box { position: absolute; right: 28px; top: 18px; height: 300px; width: auto; transform: rotate(8deg); filter: drop-shadow(0 24px 30px var(--shadow)); }

/* batch page */
.bhero { position: relative; height: 400px; overflow: hidden; }
.bhero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, var(--bg)); pointer-events: none; }
.glow { position: absolute; left: 50%; top: 55%; width: 440px; height: 440px; margin: -220px 0 0 -220px; border-radius: 50%; background: radial-gradient(circle, var(--pen) 0%, transparent 62%); opacity: .7; animation: pulse 4s ease-in-out infinite; }
.bh-in { position: relative; height: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; }
.badge { margin-top: 18px; display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 14px; font: 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; z-index: 2; }
.badge i { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 10px; }
.badge.ok { background: rgba(27,138,82,.16); border: 1px solid rgba(46,204,123,.45); color: var(--ok-text); }
.badge.ok i { background: var(--ok); color: var(--bg); }
.badge.wait { background: var(--chip); border: 1px solid var(--line2); color: var(--soft-text); }
.badge.wait i { background: var(--lav); color: var(--bg); }
.bh-box { height: 300px; width: auto; margin-top: 22px; filter: drop-shadow(0 30px 40px var(--shadow)); }
.bh-meta { position: absolute; left: 18px; top: 76px; display: flex; flex-direction: column; gap: 2px; font-size: 11px; z-index: 2; }
.bh-meta span { font-size: 9.5px; letter-spacing: .18em; }
.namerow { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -40px; position: relative; z-index: 3; }
.h-pen { font-size: 30px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--hair); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.stat .eyebrow { font-size: 9px; letter-spacing: .16em; }
.stat b.num { font-size: 30px; font-weight: 700; line-height: 1; }
.stat b.num small { font-size: 15px; color: var(--muted); }
.stat b.t { font-size: 14px; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 14px; }
.labcard { display: flex; align-items: center; gap: 12px; }
.labcard > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.labcard small { font-size: 11px; }
.labmark { width: 42px; height: 42px; border-radius: 12px; background: var(--btn-bg); color: var(--btn-text); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.indep { font-size: 9.5px; letter-spacing: .1em; color: var(--ok-text); }
.cta, .ghost { border-radius: 16px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 15px; transition: filter .15s, transform .15s; }
.cta { background: #A9ADE4; color: #11161E; box-shadow: 0 10px 30px rgba(169,173,228,.22); }
.ghost { border: 1px solid var(--line2); font-weight: 600; font-size: 14px; }
.cta:hover, .ghost:hover { filter: brightness(1.08); }
.cta:active, .ghost:active { transform: scale(.98); }
.note { display: flex; gap: 12px; align-items: flex-start; border-color: rgba(46,204,123,.3); }
.note i { width: 28px; height: 28px; border-radius: 50%; background: rgba(46,204,123,.16); color: var(--ok-text); display: grid; place-items: center; font-style: normal; font-weight: 800; flex: none; }
.note p { font-size: 13px; color: var(--soft-text); }
.note b { color: var(--text); }
.note.wait { border-color: rgba(169,173,228,.3); }
.note.wait i { background: rgba(169,173,228,.2); color: var(--lav); }
.soon h2 { font-size: 22px; line-height: 1.15; margin: 6px 0 8px; }

/* timeline */
.timeline { display: flex; flex-direction: column; }
.tl { display: flex; gap: 14px; position: relative; }
.tl::before { content: ''; position: absolute; left: 7px; top: 34px; bottom: -4px; width: 2px; background: var(--hair2); }
.tl:last-child::before { display: none; }
.tl-dot { width: 16px; flex: none; display: flex; justify-content: center; }
.tl-dot::after { content: ''; width: 12px; height: 12px; margin-top: 20px; border-radius: 50%; background: var(--dot-off); }
.tl-current .tl-dot::after { background: var(--pen-ink); box-shadow: 0 0 0 4px var(--pen-soft); }
.tl-card { flex: 1; margin-bottom: 10px; background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 13px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tl-current .tl-card { border-color: var(--pen-ink); }
.tl-card > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.tl-card b { font-size: 13.5px; }
.tl-card small { font-size: 10.5px; color: var(--muted); }
.tl-tag { font-size: 9.5px; letter-spacing: .12em; color: var(--muted); }
.tl-current .tl-tag { color: var(--pen-ink); }

/* 404 */
.missing { padding-top: 60px; }
.alert { background: radial-gradient(circle at 50% 0%, rgba(196,18,47,.3), transparent 70%); border: 1px solid rgba(255,90,110,.35); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }

/* footer */
.foot { border-top: 1px solid var(--hair); padding: 26px 0 40px; font-size: 12.5px; }
.foot .wrap { max-width: 560px; display: flex; flex-direction: column; gap: 8px; }
.foot a { color: var(--lav); font-weight: 600; }

/* theme switch */
.topright { display: flex; align-items: center; gap: 8px; }
.themebtn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); background: var(--chip); color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; }
.themebtn svg { width: 16px; height: 16px; }
.themebtn .sun { display: none; }
:root[data-theme="light"] .themebtn .sun { display: block; } :root[data-theme="light"] .themebtn .moon { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .themebtn .sun { display: block; } :root:not([data-theme]) .themebtn .moon { display: none; } }
@media (max-width: 360px) { .pill { display: none; } }
