/* Edge.Kituwa — the savepoint layout, rethemed through its own custom
   properties. Structure, responsive behaviour and accessibility come from the
   layout unchanged: hairline frames, wide display type, three-up board,
   collection rows, one white action per screen.

   Deviation from the study: the three-up gallery tiles carry live venue state
   instead of screenshots (a market monitor's first screen is its status), and
   the collection rows are the signal board. Nothing else moves. */

:root {
  --max: 1240px;
  --radius: 0px;
  --radius-sm: 0px;
  --bg: #050505;
  --surface: #0d0d0d;
  --surface-2: #131313;
  --ink: #f4f4f4;
  --muted: #a3a3a3;
  --soft: #6b6b6b;
  --line: #242424;
  --accent: #ffffff;
  --accent-2: #ff3b2f;
  --accent-ink: #050505;
  --ok: #7ce0b0;
  --warn: #ffb04f;
  --font-display: "Archivo", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-serif: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }
.section { padding: 74px 0; position: relative; }
.section-sm { padding: 56px 0; }
.section.alt { background: #0a0a0a; border-block: 1px solid var(--line); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; line-height: 1;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
.tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
  text-transform: uppercase; border: 1px solid var(--line); padding: 5px 9px; color: var(--muted);
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

h1.display {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(74px, 12.4vw, 168px); line-height: .78; letter-spacing: -.07em;
  text-transform: uppercase; max-width: 12ch;
}
h1.display .outline { color: transparent; -webkit-text-stroke: 1.5px #f4f4f4; }
h2.h2 {
  margin: 0; font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 800; letter-spacing: -.05em; text-transform: uppercase; line-height: .9;
}
.lede { margin: 0; max-width: 60ch; font-size: 18px; line-height: 1.6; color: var(--muted); }

/* one white action per screen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 24px; border: 0; background: var(--ink); color: var(--bg);
  font-size: 15px; font-weight: 500; letter-spacing: -.005em; line-height: 1; cursor: pointer;
  transition: background .2s ease, transform .14s ease;
}
.btn:hover { background: #d8d8d8; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: transparent; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 12.5px; }

/* nav */
.site-nav {
  position: relative; z-index: 20; display: flex; align-items: center; gap: 28px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 19px; font-weight: 800;
  letter-spacing: -.02em; text-transform: uppercase;
}
.brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 900; line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* hero */
.hero { border-bottom: 1px solid var(--line); padding: 64px 0 0; }
.sv-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-top: 30px; padding-bottom: 34px; flex-wrap: wrap; }
.sv-meta p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 14px; }
.sv-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* three-up board (layout's gallery slot) */
.sv-gallery { display: grid; grid-template-columns: 1.35fr .95fr .7fr; gap: 10px; padding: 0 0 26px; }
.sv-tile { position: relative; border: 1px solid var(--line); min-height: 270px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; }
.sv-tile .idx { position: absolute; right: 10px; top: 8px; font-family: var(--font-mono); font-size: 8px; color: var(--soft); letter-spacing: .12em; }
.sv-tile .label { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.sv-tile .value { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3.4vw, 52px); line-height: .9; letter-spacing: -.05em; }
.sv-tile .value small { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.sv-tile .sub { font-size: 12.5px; color: var(--muted); }
.sv-tile.a { background: radial-gradient(circle at 75% 20%, #ff3b2f1f, transparent 45%), linear-gradient(160deg, #101722 0%, #182430 55%, #07090c 100%); }
.sv-tile.a::before { content: ""; position: absolute; inset: 34% 12% 30%; background: repeating-linear-gradient(90deg, #ffffff0f 0 1px, transparent 1px 22px); pointer-events: none; }
.sv-tile.b { background: linear-gradient(140deg, #161616, #0b0b0b 60%, #0a0505); }
.sv-tile.c { background: repeating-linear-gradient(45deg, #0d0d0d 0 6px, #151515 6px 12px); }
.sv-tile .grain { position: absolute; inset: 0; opacity: .3; background-image: radial-gradient(rgba(255,255,255,.3) .5px, transparent .5px); background-size: 3px 3px; pointer-events: none; }
.sv-tile > * { position: relative; z-index: 2; }

.venue-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid #ffffff14; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.venue-row:last-child { border-bottom: 0; }
.state { display: inline-flex; align-items: center; gap: 6px; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--soft); }
.state.ok::before { background: var(--ok); box-shadow: 0 0 0 3px #7ce0b022; }
.state.warn::before { background: var(--warn); }
.state.off::before { background: var(--accent-2); }

/* status strip */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.strip div { padding: 22px 20px; border-right: 1px solid var(--line); }
.strip div:last-child { border-right: 0; }
.strip b { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.strip span { display: block; margin-top: 7px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }

/* notices */
.notice { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); padding: 16px 18px; margin-bottom: 26px; background: var(--surface); }
.notice .k { flex: none; width: 8px; height: 8px; margin-top: 7px; background: var(--ok); }
.notice.offline .k { background: var(--accent-2); }
.notice h3 { margin: 0 0 4px; font-size: 14px; letter-spacing: -.01em; font-weight: 650; }
.notice p { margin: 0; font-size: 13px; color: var(--muted); }
.notice[hidden] { display: none; }

/* section head */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; flex-wrap: wrap; }

/* signal board */
.board { border-top: 1px solid var(--line); }
.sig {
  display: grid; grid-template-columns: 44px minmax(0, 2.1fr) .8fr .9fr .8fr .9fr 26px;
  gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line);
}
.sig .n { font-family: var(--font-mono); font-size: 10px; color: var(--soft); letter-spacing: .1em; }
.sig h3 { margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.sig .meta { margin: 5px 0 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); display: flex; gap: 10px; flex-wrap: wrap; }
.sig .col { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sig .edge { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.sig .edge small { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; color: var(--soft); margin-left: 3px; }
.sig .go { font-family: var(--font-mono); font-size: 14px; color: var(--ink); }
.sig .cls { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 6px; border: 1px solid var(--line); color: var(--muted); }
.sig .cls.guaranteed { color: var(--ok); border-color: #7ce0b055; }
.sig .cls.passive { color: var(--warn); border-color: #ffb04f4d; }
.sig:hover h3 { text-decoration: underline; text-underline-offset: 3px; }

.empty { border: 1px dashed var(--line); padding: 40px; text-align: center; color: var(--muted); }
.empty b { display: block; font-family: var(--font-display); font-size: 22px; color: var(--ink); letter-spacing: -.02em; margin-bottom: 6px; }

/* explain card */
.explain { display: grid; grid-template-columns: 1fr .85fr; gap: 40px; align-items: center; }
.brief {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 26px;
  background: #0e1014; border: 1px solid #1f232b; color: #f2f1ee; overflow: hidden;
}
.brief__ribbon { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #4ed8ff 0%, #ff4fa3 52%, #ff8a2a 100%); }
.brief__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brief__index { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #8a8e97; }
.brief__index em { color: #ff4fa3; font-style: normal; margin-right: .4em; }
.brief__chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 4px; background: #14171d; border: 1px solid #1f232b; font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.brief__dot { width: 6px; height: 6px; border-radius: 999px; background: #7ce0b0; box-shadow: 0 0 0 3px #7ce0b02e; }
.brief h3 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.015em; font-weight: 600; }
.brief h3 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.brief p { margin: 0; color: #8a8e97; font-size: 14.5px; }
.brief__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid #1f232b; flex-wrap: wrap; }
.brief__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #8a8e97; }

.sv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }
.sv-stat { border: 1px solid var(--line); padding: 16px; }
.sv-stat b { display: block; font-family: var(--font-display); font-size: 28px; letter-spacing: -.05em; }
.sv-stat span { font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }

.checks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.checks .tick { flex: none; width: 18px; height: 18px; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 10px; font-family: var(--font-mono); }

/* cta */
.cta-band { background: #f4f4f4; color: #050505; padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-band .h2 { max-width: 16ch; }
.cta-band p { color: #3b3b3b; margin: 14px 0 0; max-width: 46ch; font-size: 15px; }
.cta-band .btn { background: #050505; color: #f4f4f4; }
.cta-band .btn-ghost { background: transparent; color: #050505; border-color: #c9c9c9; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 52px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, .6fr); gap: 32px; }
.footer-brand p { max-width: 36ch; color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }
.footer-col h4 { margin: 0 0 12px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); font-family: var(--font-mono); font-weight: 500; }
.footer-col a { display: block; margin: 7px 0; font-size: 13.5px; color: var(--muted); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; font-size: 12px; color: var(--soft); flex-wrap: wrap; }
.caveat { border: 1px solid var(--line); padding: 18px 20px; margin-top: 26px; font-size: 12.5px; color: var(--muted); }
.caveat b { color: var(--ink); font-weight: 600; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .sv-gallery { grid-template-columns: 1fr 1fr; }
  .sv-gallery .c { display: none; }
  .sig { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .sig .col.mid, .sig .col.exp { display: none; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip div:nth-child(2) { border-right: 0; }
  .explain { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  h1.display { font-size: clamp(38px, 13vw, 62px); line-height: .82; }
  h2.h2 { font-size: 30px; }
  .sv-gallery { grid-template-columns: 1fr; gap: 8px; }
  .sv-gallery .b, .sv-gallery .c { display: none; }
  .sv-tile { min-height: 200px; }
  .sv-meta { flex-direction: column; align-items: flex-start; }
  .strip { grid-template-columns: 1fr; }
  .strip div { border-right: 0; border-bottom: 1px solid var(--line); }
  .strip div:last-child { border-bottom: 0; }
  .sig { grid-template-columns: 28px minmax(0, 1fr); row-gap: 6px; padding: 16px 0; }
  .sig .edge { grid-column: 2; }
  .sig .go { display: none; }
  .sig .col { display: none; }
  .section { padding: 52px 0; }
  .cta-band { padding: 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { flex-direction: column; }
  .sv-stats { grid-template-columns: 1fr 1fr; }
  .sv-tile .value { font-size: 34px; }
}
