@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f0f0f3;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: rgba(0, 0, 0, .09);
  --accent: #f0561a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(240, 86, 26, .12);
  --ok: #1f9d55;
  --ok-soft: rgba(31, 157, 85, .13);
  --warn: #b7791f;
  --warn-soft: rgba(214, 158, 46, .16);
  --bad: #d92d3a;
  --bad-soft: rgba(217, 45, 58, .12);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(0,0,0,.06);
  --radius: 20px;
  --radius-sm: 12px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b0d;
  --surface: #1a1a1d;
  --surface-2: #26262a;
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;
  --line: rgba(255, 255, 255, .12);
  --accent: #ff7a3d;
  --accent-ink: #1a0a02;
  --accent-soft: rgba(255, 122, 61, .16);
  --ok: #4cd480;
  --ok-soft: rgba(76, 212, 128, .15);
  --warn: #f0b445;
  --warn-soft: rgba(240, 180, 69, .15);
  --bad: #ff6b76;
  --bad-soft: rgba(255, 107, 118, .15);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0d; --surface: #1a1a1d; --surface-2: #26262a; --ink: #f5f5f7; --ink-2: #a1a1a6;
    --line: rgba(255,255,255,.12); --accent: #ff7a3d; --accent-ink: #1a0a02; --accent-soft: rgba(255,122,61,.16);
    --ok: #4cd480; --ok-soft: rgba(76,212,128,.15); --warn: #f0b445; --warn-soft: rgba(240,180,69,.15);
    --bad: #ff6b76; --bad-soft: rgba(255,107,118,.15);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.35); color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 750; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1240px; }

/* header */
.bar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.brand svg { width: 26px; height: 26px; }
.spacer { flex: 1; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.nav a[aria-current="page"], .nav a:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn { background: transparent; border: 0; color: var(--ink-2); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

/* cards & layout */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border: 1px solid var(--line); }
.card + .card { margin-top: 16px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* hero */
.hero { padding: 44px 0 26px; }
.hero p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 34em; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; font-weight: 650; box-shadow: var(--shadow); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-2); }
.dot.live { background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 1.8s infinite; }
.dot.ok { background: var(--ok); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* forms */
label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: 6px; }
label .opt { font-weight: 500; color: var(--ink-2); }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=date], input[type=datetime-local], input[type=password], select, textarea {
  width: 100%; font: inherit; color: inherit; background: var(--surface-2); border: 1.5px solid transparent;
  border-radius: var(--radius-sm); padding: 13px 14px; min-height: 48px; appearance: none; -webkit-appearance: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.field { margin-bottom: 16px; }
.hint { color: var(--ink-2); font-size: .82rem; margin-top: 5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius-sm); padding: 18px; text-align: center; color: var(--ink-2); cursor: pointer; background: var(--surface-2); }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--ink); }
.files { list-style: none; padding: 0; margin: 10px 0 0; }
.files li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; margin-top: 6px; font-size: .9rem; word-break: break-all; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 550; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }

.btn {
  font: inherit; font-weight: 700; border: 0; cursor: pointer; border-radius: 999px; min-height: 48px; padding: 0 24px;
  background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: .9rem; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 550; font-size: .93rem; }
.alert.err { background: var(--bad-soft); color: var(--bad); }
.alert.info { background: var(--accent-soft); }
.alert.okk { background: var(--ok-soft); color: var(--ok); }

/* link box */
.linkbox { display: flex; gap: 8px; align-items: stretch; }
.linkbox input { font-size: .85rem; }

/* status timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 40px; color: var(--ink-2); }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li .node { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line); display: grid; place-items: center; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--accent); }
.timeline li.done .node { background: var(--accent); border-color: var(--accent); }
.timeline li.done .node::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px,-1px); }
.timeline li.current .node { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline li.current .node::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline li.bad .node { background: var(--bad); border-color: var(--bad); }
.timeline li.bad .node::after { content: "✕"; color: #fff; font-size: 12px; font-weight: 800; }
.timeline li.current { color: var(--ink); font-weight: 700; }
.timeline .when { display: block; font-size: .8rem; font-weight: 500; color: var(--ink-2); }
.timeline .msg { display: block; font-weight: 500; font-size: .92rem; color: var(--ink-2); margin-top: 2px; }

.progress { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #ffb347)); border-radius: 999px; transition: width .6s ease; }
.big-num { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; font-size: .95rem; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.kv .total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-size: 1.05rem; color: var(--ink); }

.badge { display: inline-block; font-size: .76rem; font-weight: 750; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.s-received, .badge.s-review { background: var(--warn-soft); color: var(--warn); }
.badge.s-accepted, .badge.s-queued { background: var(--accent-soft); color: var(--accent); }
.badge.s-printing { background: var(--accent); color: var(--accent-ink); }
.badge.s-done, .badge.s-pickedup { background: var(--ok-soft); color: var(--ok); }
.badge.s-rejected { background: var(--bad-soft); color: var(--bad); }

footer.site { padding: 36px 0 44px; color: var(--ink-2); font-size: .85rem; text-align: center; }
footer.site a { color: var(--ink-2); margin: 0 8px; }

/* admin */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; font-size: .88rem; padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.chip b { margin-left: 6px; color: var(--ink-2); font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] b { color: var(--bg); opacity: .7; }
.rlist { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.ritem { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.ritem:hover { border-color: var(--accent); }
.ritem .t { font-weight: 700; }
.ritem .m { color: var(--ink-2); font-size: .85rem; grid-column: 1 / -1; }
.hl { background: linear-gradient(135deg, var(--accent-soft), transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.split { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } }
.viewer { position: relative; aspect-ratio: 4/3; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.viewer canvas { width: 100%; height: 100%; display: block; }
.viewer .note { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--ink-2); font-size: .9rem; }
.fit { font-weight: 700; padding: 10px 14px; border-radius: 12px; }
.fit.yes { background: var(--ok-soft); color: var(--ok); }
.fit.no { background: var(--bad-soft); color: var(--bad); }
.fit.unk { background: var(--surface-2); color: var(--ink-2); }
table.t { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.t th, table.t td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.t th { color: var(--ink-2); font-weight: 650; font-size: .8rem; }
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.stat .v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 650; z-index: 50; box-shadow: var(--shadow); }
.hide { display: none !important; }
details summary { cursor: pointer; font-weight: 650; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
