/* Lanternfin — site.info
   One stylesheet, system fonts only, no external requests of any kind. */

:root {
  --abyss:  #04141d;
  --deep:   #072a38;
  --slab:   #0a3444;
  --edge:   #17627a;
  --paper:  #e9f8ff;
  --muted:  #97bccb;
  --gold:   #ffcf51;
  --brass:  #e0932a;
  --bio:    #6ff2c9;
  --pearl:  #c9b8ff;
  --coral:  #ff6b5c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(1200px 700px at 10% -10%, #0d4f63 0%, transparent 60%),
    radial-gradient(1000px 620px at 92% 4%, #0a4a44 0%, transparent 58%),
    var(--abyss);
  font: 16px/1.7 system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}

a { color: var(--gold); }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.18; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.5px; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: 1.06rem; }
p { margin: 0 0 1.1em; }

.shell { width: min(1160px, 100% - 40px); margin-inline: auto; }
.jump { position: absolute; left: -9999px; top: 0; z-index: 90; background: var(--gold); color: #123; padding: 10px 16px; border-radius: 8px; }
.jump:focus { left: 16px; top: 16px; }
.mute { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------- top bar ---------------- */

.top {
  border-bottom: 1px solid var(--edge);
  background: rgba(4, 20, 29, .84);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 40;
}
.top .shell { display: flex; align-items: center; gap: 20px; min-height: 62px; flex-wrap: wrap; }
.sig { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); margin-right: auto; }
.sig span { font-weight: 700; letter-spacing: .5px; }
.sig em { font-style: normal; color: var(--muted); font-size: .78rem; letter-spacing: 1.6px; text-transform: uppercase; display: block; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-size: .93rem; padding: 6px 11px; border-radius: 8px; }
.top nav a:hover { color: var(--paper); background: rgba(111, 242, 201, .12); }
.top nav a[aria-current] { color: var(--gold); background: rgba(255, 207, 81, .1); }

/* ---------------- the dive console ---------------- */

.arena { padding: 26px 0 6px; }
.arena-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.arena-head p { color: var(--muted); margin: 0; max-width: 56ch; }
.arena-head h1 { margin: 0 0 .2em; }

.console { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; align-items: start; }
.rail { display: grid; gap: 12px; }

.gauge {
  background: linear-gradient(180deg, var(--slab), var(--deep));
  border: 1px solid var(--edge); border-radius: 14px; padding: 11px 14px;
}
.gauge b { display: block; font-size: .66rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.gauge i { font-style: normal; font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.gauge.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gauge.pair i { font-size: 1.1rem; }
.gauge .bio { color: var(--bio); }
.gauge .small { font-size: .98rem; font-weight: 600; }

.wick { display: flex; gap: 5px; margin-top: 6px; }
.wick span { flex: 1; height: 12px; border-radius: 4px; background: #06202b; border: 1px solid var(--edge); }
.wick span.lit { background: linear-gradient(180deg, #ffe9a3, var(--brass)); border-color: var(--gold); }

.tube { height: 12px; border-radius: 99px; background: #06202b; border: 1px solid var(--edge); overflow: hidden; margin-top: 6px; }
.tube i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--bio), var(--gold)); }
.tube.full i { background: linear-gradient(90deg, var(--gold), #fff6cf, var(--gold)); animation: throb .9s infinite; }
@keyframes throb { 50% { filter: brightness(1.45); } }

.pane { position: relative; border: 1px solid var(--edge); border-radius: 16px; overflow: hidden; background: #04202e; }
.pane canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }

.veil {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  text-align: center; padding: 28px; background: rgba(3, 16, 23, .84);
}
.veil[hidden] { display: none; }
.veil h2 { color: var(--gold); }
.veil p { color: var(--muted); max-width: 46ch; }
.veil .tally { font-size: 1.7rem; font-weight: 700; color: var(--paper); margin-bottom: .6em; }

.knobs { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.knobs .hint { color: var(--muted); font-size: .87rem; }

button.key, a.key {
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
  padding: 11px 22px; border-radius: 11px; border: 1px solid #ffbf4d;
  background: linear-gradient(180deg, var(--gold), var(--brass)); color: #24170a;
}
button.key:hover, a.key:hover { filter: brightness(1.08); }
button.flat {
  font: inherit; cursor: pointer; padding: 9px 15px; border-radius: 10px;
  border: 1px solid var(--edge); background: rgba(111, 242, 201, .09); color: var(--paper); font-size: .92rem;
}
button.flat:hover { background: rgba(111, 242, 201, .2); }
button:disabled { opacity: .42; cursor: not-allowed; filter: none; }
:focus-visible { outline: 2px solid var(--bio); outline-offset: 2px; }

/* ---------------- content ---------------- */

.band { padding: 40px 0; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tile { background: var(--slab); border: 1px solid var(--edge); border-radius: 14px; padding: 20px 20px 8px; }
.tile h3 { color: var(--gold); }
.tile p { color: var(--muted); font-size: .95rem; }

.chip { display: inline-flex; align-items: center; gap: 8px; }
.chip::before { content: ""; width: 15px; height: 15px; border-radius: 50%; flex: none; }
.chip.coin::before { background: radial-gradient(circle at 35% 30%, #fff0a8, var(--brass)); }
.chip.pearl::before { background: radial-gradient(circle at 35% 30%, #fff, var(--pearl)); }
.chip.chest::before { background: linear-gradient(180deg, #a2661f, #5d3714); border-radius: 3px; }
.chip.urchin::before { background: radial-gradient(circle at 35% 30%, #c08bff, #43156e); }
.chip.hook::before { background: linear-gradient(180deg, #cfd6c8, #6f7a6a); border-radius: 3px; }
.chip.jelly::before { background: radial-gradient(circle at 35% 30%, #d6fff1, #2ea87f); }
.chip.cuda::before { background: linear-gradient(160deg, #58818c, #1d3138); border-radius: 3px; }

.ladder { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--edge); }
.ladder li { padding: 0 0 18px 22px; position: relative; color: var(--muted); }
.ladder li::before {
  content: ""; position: absolute; left: -7px; top: 10px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bio); box-shadow: 0 0 0 4px rgba(111, 242, 201, .16);
}
.ladder li.armed::before { background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 107, 92, .2); }
.ladder b { color: var(--paper); }
.ladder .clock { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 700; margin-right: 8px; }

.pledge { border: 1px solid var(--edge); border-left: 3px solid var(--bio); background: var(--slab); border-radius: 12px; padding: 20px 22px 6px; }
.pledge h3 { color: var(--bio); }

/* ---------------- long-form pages ---------------- */

.sheet { width: min(820px, 100% - 40px); margin-inline: auto; padding: 36px 0 12px; }
.sheet .stamp { color: var(--muted); font-size: .9rem; margin-bottom: 2em; }
.sheet h2 { margin-top: 2em; color: var(--gold); }
.sheet h3 { margin-top: 1.5em; }
.sheet p, .sheet li { color: var(--muted); }
.sheet p.open { color: var(--paper); font-size: 1.08rem; }
.sheet ul, .sheet ol { padding-left: 1.25em; }
.sheet li { margin-bottom: .5em; }
.note { border: 1px solid var(--edge); border-left: 3px solid var(--gold); background: var(--slab); border-radius: 12px; padding: 18px 20px 4px; margin: 1.6em 0; }
.note p { color: var(--paper); }
table.grid { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .93rem; }
table.grid th, table.grid td { border: 1px solid var(--edge); padding: 10px 12px; text-align: left; vertical-align: top; }
table.grid th { background: var(--deep); color: var(--paper); }
table.grid td { color: var(--muted); }
code { background: #06202b; border: 1px solid var(--edge); border-radius: 5px; padding: 1px 6px; font-size: .9em; }
.slot { color: var(--coral); font-weight: 600; }

/* ---------------- foot ---------------- */

.foot { border-top: 1px solid var(--edge); margin-top: 40px; padding: 26px 0 40px; background: rgba(4, 20, 29, .6); }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.foot a:hover { color: var(--gold); }
.foot small { color: var(--muted); }
.foot .fine { color: var(--muted); font-size: .85rem; margin: 16px 0 0; max-width: 86ch; }

/* ---------------- consent banner (built by media/consent.js) ---------------- */

.consent-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70;
  width: min(1100px, calc(100% - 32px)); margin-inline: auto;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--slab); border: 1px solid var(--edge); border-radius: 14px;
  padding: 16px 20px; box-shadow: 0 14px 44px rgba(0, 0, 0, .6);
}
.consent-bar p { margin: 0; color: var(--muted); font-size: .9rem; max-width: 64ch; }
.consent-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- responsive ---------------- */

@media (max-width: 880px) {
  .console { grid-template-columns: 1fr; }
  .rail { grid-template-columns: repeat(2, 1fr); }
  .rail .wide { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .rail { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
