/* abyss-docs — Abyss Row tokens (web/app/globals.css, docs/UIDesignGuide.md) */
@font-face { font-family: 'Source Serif 4'; font-weight: 400 600; font-display: swap; src: url('/static/fonts/serif.woff2') format('woff2'); }
@font-face { font-family: 'Libre Franklin'; font-weight: 400 700; font-display: swap; src: url('/static/fonts/franklin.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('/static/fonts/mono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('/static/fonts/mono-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-display: swap; src: url('/static/fonts/mono-600.woff2') format('woff2'); }

:root {
  --ink: #10161c;
  --paper: #f7f5f1;
  --brand: #33689b;
  --brand-deep: #1d4468;
  --dark-bg: #0d1620;
  --ok: #2f8a86;
  --warn: #c9a227;
  --bad: #b4544a;
  --text-2: rgba(16, 22, 28, 0.58);
  --text-faint: rgba(16, 22, 28, 0.42);
  --border: rgba(16, 22, 28, 0.1);
  --radius-chip: 4px;
  --radius-card: 6px;
  --radius-page: 8px;
  --font-body: 'Libre Franklin', system-ui, sans-serif;
  --font-headline: 'Source Serif 4', Georgia, serif;
  --font-data: 'IBM Plex Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--dark-bg);
  color: var(--ink);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  grid-template-columns: minmax(0, 480px);
  justify-content: center;
  padding: 32px 16px;
  overflow-x: hidden;
}
canvas#sea { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.depth {
  position: fixed; left: 18px; top: 0; bottom: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-around;
  font: 500 10px/1 var(--font-data); letter-spacing: .12em;
  color: rgba(255, 255, 255, .28); pointer-events: none;
}
.depth span::before { content: ''; display: inline-block; width: 10px; height: 1px; background: currentColor; margin-right: 8px; vertical-align: middle; }
.brandmark {
  position: fixed; right: 18px; bottom: 16px; z-index: 1;
  font: 500 10px/1 var(--font-data); letter-spacing: .12em; color: rgba(255, 255, 255, .3);
}

.card {
  position: relative; z-index: 2; width: 100%; min-width: 0;
  background: rgba(247, 245, 241, .955);
  border-radius: var(--radius-page);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .5) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 30px 30px 22px;
  animation: rise .9s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.logo { display: block; height: 34px; width: auto; margin: -4px 0 22px -2px; }
.eyebrow {
  font: 500 10.5px/1 var(--font-data); letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 10px; display: flex; align-items: center; gap: 8px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 138, 134, .18); flex: none; }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(180, 84, 74, .18); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(201, 162, 39, .2); }
.eyebrow.bad { color: var(--bad); }
h1 { font: 400 30px/1.12 var(--font-headline); letter-spacing: -.01em; margin: 0 0 10px; text-wrap: balance; overflow-wrap: anywhere; }
.lede { color: var(--text-2); margin: 0 0 22px; text-wrap: pretty; }

label, .label { display: block; font: 500 10.5px/1 var(--font-data); letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.field { display: flex; gap: 8px; }
input[type=text], input[type=password] {
  flex: 1; min-width: 0;
  font: 500 16px/1 var(--font-data); letter-spacing: .08em;
  padding: 12px 14px; border-radius: var(--radius-card);
  border: 1px solid rgba(16, 22, 28, .18); background: #fff; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(51, 104, 155, .18); }
button, .btn {
  font: 600 14px/1 var(--font-body); letter-spacing: .01em;
  padding: 12px 18px; border-radius: var(--radius-card); border: 0; cursor: pointer;
  background: var(--brand); color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s, transform .1s;
}
button:hover, .btn:hover { background: var(--brand-deep); }
button:active, .btn:active { transform: translateY(1px); }
.btn.big { width: 100%; padding: 15px 18px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid rgba(51, 104, 155, .35); }
.btn.ghost:hover { background: rgba(51, 104, 155, .08); }
.msg { min-height: 20px; margin: 10px 0 0; font-size: 13.5px; color: var(--bad); }
.cf-turnstile { margin-top: 14px; min-height: 65px; }

.file { border: 1px solid var(--border); border-radius: var(--radius-card); background: #fff; padding: 16px 16px 14px; margin: 0 0 16px; }
.file-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.file-name { font: 600 14px/1.35 var(--font-data); min-width: 0; overflow-wrap: anywhere; }
.file-size { font: 600 22px/1 var(--font-data); white-space: nowrap; }
.file-size small { font-size: 11px; color: var(--text-faint); font-weight: 500; letter-spacing: .1em; margin-left: 2px; }
dl.facts { margin: 14px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--border); display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
dl.facts dt { font: 500 10.5px/1.9 var(--font-data); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
dl.facts dd { margin: 0; font: 400 13px/1.7 var(--font-data); color: var(--text-2); min-width: 0; overflow-wrap: anywhere; text-align: right; }

.sha { margin: 0 0 18px; }
.sha-row { display: flex; gap: 8px; align-items: stretch; }
.sha code {
  flex: 1; min-width: 0; font: 400 11.5px/1.5 var(--font-data); color: var(--text-2);
  background: rgba(16, 22, 28, .04); border-radius: var(--radius-chip); padding: 8px 10px; word-break: break-all;
}
.sha button { padding: 0 12px; font-size: 12px; }
.hint { color: var(--text-faint); font-size: 12.5px; margin: 10px 0 0; text-align: center; }
.hint a, .lede a { color: var(--brand); text-decoration: none; border-bottom: 1px solid rgba(51, 104, 155, .35); }
.hint a:hover, .lede a:hover { border-bottom-color: var(--brand); }

.status { display: flex; gap: 14px; align-items: flex-start; border-radius: var(--radius-card); padding: 16px; font-size: 14px; color: var(--text-2); margin: 0 0 16px; }
.status svg { flex: none; margin-top: 1px; }
.status b { color: var(--ink); font-weight: 600; }
.status.ok { border: 1px solid rgba(47, 138, 134, .28); background: rgba(47, 138, 134, .07); }
.status.ok svg { color: var(--ok); }
.status.bad { border: 1px solid rgba(180, 84, 74, .3); background: rgba(180, 84, 74, .07); }
.status.bad svg { color: var(--bad); }
.status.warn { border: 1px solid rgba(201, 162, 39, .35); background: rgba(201, 162, 39, .08); }
.status.warn svg { color: #9a7a14; }

.or { display: flex; align-items: center; gap: 12px; margin: 22px 0; font: 500 10.5px/1 var(--font-data); letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.drop {
  display: block; font: 400 14px/1.5 var(--font-body); letter-spacing: normal; text-transform: none; margin: 0; border: 1.5px dashed rgba(51, 104, 155, .4); border-radius: var(--radius-card);
  padding: 22px 16px; text-align: center; cursor: pointer; color: var(--text-2); font-size: 14px;
  background: rgba(255, 255, 255, .55); transition: background .15s, border-color .15s;
}
.drop:hover, .drop.over { background: rgba(51, 104, 155, .07); border-color: var(--brand); }
.drop b { color: var(--brand); font-weight: 600; }
.drop small { display: block; margin-top: 6px; color: var(--text-faint); font-size: 12px; }
.drop input { display: none; }
#result:empty { display: none; }
#result { margin-top: 16px; }

footer {
  margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font: 500 10px/1.4 var(--font-data); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint);
}
footer b { color: var(--text-2); font-weight: 600; }
footer a { color: var(--brand); text-decoration: none; }

@media (max-width: 520px) {
  .card { padding: 24px 20px 18px; }
  h1 { font-size: 26px; }
  .depth { display: none; }
  .field { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
