/* GTM Signal Plays · Asshvin Kumar
   Dark navy system: framed column, thin borders, serif + light-blue accent, mono labels, bracket corners. */
:root {
  --bg: #04060c; --bg-2: #080b14; --panel: #0b0f1a; --panel-2: #0f1422;
  --line: #1b2232; --line-2: #263045;
  --ink: #eef1f6; --ink-2: #c3cad6; --muted: #8a93a4; --dim: #5d6678;
  --accent: #8fb3ff; --accent-2: #b7cdff; --accent-ink: #06090f; --accent-soft: rgba(143,179,255,.08);
  --ok: #7fd6b5;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: Inter, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --frame: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 400 14.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
/* framed center column, like a page ruler */
body::before { content: ""; position: fixed; inset: 0; max-width: var(--frame); margin: 0 auto; pointer-events: none; z-index: 0;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
main, header, footer { position: relative; z-index: 1; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
.wrap { max-width: var(--frame); margin: 0 auto; padding: 0 40px; }
.mono { font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; font-size: 11px; color: var(--muted); }

/* corner brackets helper */
.brackets { position: relative; }
.brackets::before, .brackets::after { content: ""; position: absolute; width: 7px; height: 7px; border-color: var(--ink-2); border-style: solid; }
.brackets::before { top: -4px; left: -4px; border-width: 1px 0 0 1px; }
.brackets::after { bottom: -4px; right: -4px; border-width: 0 1px 1px 0; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(4,6,12,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 500 15px var(--sans); letter-spacing: -.01em; }
.brand i { width: 14px; height: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.brand i::before { content: ""; grid-column: 2; width: 4px; height: 4px; background: var(--accent); box-shadow: -5px 5px 0 var(--accent), 0 5px 0 var(--accent), 5px 5px 0 var(--accent), 0 10px 0 var(--accent-2); }
.nav nav { display: flex; align-items: center; gap: 26px; }
.nav nav a { font: 400 13.5px var(--sans); color: var(--ink-2); text-decoration: none; transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.cta { font: 500 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-decoration: none;
  padding: 9px 16px; border: 1px solid var(--line-2); background: var(--panel); }
.cta:hover { border-color: var(--ink-2); }

/* hero */
.hero { position: relative; padding: 96px 40px 72px; text-align: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: -40% -10% 0; pointer-events: none; opacity: .9;
  background: repeating-radial-gradient(ellipse 120% 90% at 50% 120%, transparent 0 17px, rgba(160,180,220,.07) 17px 18px);
  -webkit-mask-image: radial-gradient(ellipse at 50% 60%, transparent 18%, #000 70%); mask-image: radial-gradient(ellipse at 50% 60%, transparent 18%, #000 70%); }
.hero > * { position: relative; }
.bracket-tag { display: inline-block; position: relative; padding: 5px 12px; font: 500 11px var(--mono); letter-spacing: .16em; color: var(--accent); text-transform: uppercase; }
.bracket-tag::before, .bracket-tag::after { content: ""; position: absolute; top: 0; bottom: 0; width: 6px; border: 1px solid var(--accent); }
.bracket-tag::before { left: 0; border-right: 0; }
.bracket-tag::after { right: 0; border-left: 0; }
h1.display { font: 400 clamp(38px, 5.2vw, 64px)/1.04 var(--serif); letter-spacing: -.02em; margin: 18px auto 14px; max-width: 760px; }
h1.display em, .play-head h1 em { font-style: normal; color: var(--accent); }
.lede { max-width: 520px; margin: 0 auto; color: var(--ink-2); font-size: 15px; }
.byline { margin-top: 18px; font-size: 13px; color: var(--muted); }
.byline b { color: var(--ink); font-weight: 500; }

/* signal x signal = play: one bordered strip, cells share borders */
.equation { display: grid; grid-template-columns: 1fr 40px 1fr 40px 1fr; border-bottom: 1px solid var(--line); }
.eq-box { padding: 26px 28px; }
.eq-box h3 { font: 500 15px var(--sans); margin: 10px 0 4px; }
.eq-box p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.eq-box.play { background: var(--accent-soft); }
.eq-box.play .mono { color: var(--accent); }
.eq-op { display: grid; place-items: center; font: 400 22px var(--serif); color: var(--dim); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

/* sections */
.sec { padding: 64px 0 80px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.sec-head h2 { font: 400 32px/1.05 var(--serif); letter-spacing: -.015em; }
.filters { display: flex; gap: 0; flex-wrap: wrap; border: 1px solid var(--line); }
.filter { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 8px 12px; border: 0; border-right: 1px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, background .2s; }
.filter:last-child { border-right: 0; }
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.filter:focus-visible, .copy:focus-visible, .play-card:focus-visible, .expand:focus-visible, .close:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* play cards: one bordered grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.play-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px; min-height: 236px; text-decoration: none;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); transition: background .3s var(--ease); }
a.play-card:hover { background: var(--panel-2); }
.play-card::before, .play-card::after { content: ""; position: absolute; width: 9px; height: 9px; opacity: 0; border-color: var(--accent); border-style: solid; transition: all .3s var(--ease); }
.play-card::before { top: 14px; left: 14px; border-width: 1px 0 0 1px; }
.play-card::after { bottom: 14px; right: 14px; border-width: 0 1px 1px 0; }
a.play-card:hover::before { opacity: 1; top: 8px; left: 8px; }
a.play-card:hover::after { opacity: 1; bottom: 8px; right: 8px; }
.play-card .top { display: flex; justify-content: space-between; align-items: center; }
.play-card h3 { font: 400 24px/1.1 var(--serif); }
.play-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.sig { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sig span { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line-2); padding: 4px 8px; }
.sig b { font: 400 14px var(--serif); color: var(--dim); }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.status { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 4px 8px; }
.status.ran { color: var(--accent-ink); background: var(--accent); }
.status.queued { color: var(--muted); border: 1px solid var(--line-2); }
.play-card.queued { background: var(--bg); }
.play-card.queued h3 { color: var(--ink-2); }
.play-card[hidden] { display: none; }

/* play page */
.play-head { position: relative; text-align: center; padding: 80px 40px 56px; overflow: hidden; border-bottom: 1px solid var(--line); }
.play-head::before { content: ""; position: absolute; inset: -40% -10% 0; pointer-events: none;
  background: repeating-radial-gradient(ellipse 120% 90% at 50% 120%, transparent 0 17px, rgba(160,180,220,.06) 17px 18px);
  -webkit-mask-image: radial-gradient(ellipse at 50% 60%, transparent 22%, #000 72%); mask-image: radial-gradient(ellipse at 50% 60%, transparent 22%, #000 72%); }
.play-head > * { position: relative; }
.play-head h1 { font: 400 clamp(34px, 4.6vw, 58px)/1.04 var(--serif); letter-spacing: -.02em; margin: 16px 0 14px; white-space: nowrap; }
.facts { display: inline-flex; flex-wrap: wrap; justify-content: center; margin: 26px auto 0; border: 1px solid var(--line); background: var(--bg-2); }
.facts span { padding: 9px 16px; font: 500 13px var(--sans); border-right: 1px solid var(--line); }
.facts span:last-child { border-right: 0; }
.facts span b { font: 500 10.5px var(--mono); letter-spacing: .12em; color: var(--muted); margin-right: 8px; }

.receipt2 { margin: 56px 0 64px; border: 1px solid var(--line); background: var(--bg-2); }
.receipt2 header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.receipt2 header .mono:first-child { color: var(--ink); }
.steps-row { display: grid; grid-template-columns: repeat(5, 1fr); }
.steps-row div { padding: 26px 24px 24px; border-right: 1px solid var(--line); }
.steps-row div:last-child { border-right: 0; background: var(--accent-soft); }
.steps-row strong { display: block; font: 400 42px/1 var(--serif); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.steps-row div:last-child strong { color: var(--accent); }
.steps-row span { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; }
.receipt2 footer { padding: 14px 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.receipt2 footer b { color: var(--ok); font-weight: 500; }

.stage { display: flex; flex-direction: column; align-items: center; margin: 0 0 80px; }
.stage-frame { position: relative; width: min(400px, 100%); border: 1px solid var(--line-2); padding: 8px; background: var(--bg-2); }
.stage-frame video { width: 100%; height: auto; aspect-ratio: 9 / 16; background: var(--bg); cursor: zoom-in; }
.expand { position: absolute; top: 18px; right: 18px; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase;
  background: rgba(4,6,12,.85); color: var(--ink); border: 1px solid var(--line-2); padding: 8px 11px; cursor: pointer; transition: border-color .2s; }
.expand:hover { border-color: var(--accent); }
.stage figcaption { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* full-size viewer: the diagram at its real 1080px width, scroll to read */
dialog.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: rgba(4,6,12,.94); overflow: auto; }
dialog.lightbox::backdrop { background: rgba(4,6,12,.94); }
.lightbox-inner { width: min(1080px, 100%); margin: 0 auto; padding: 64px 0 48px; }
dialog.lightbox video { width: 100%; height: auto; display: block; border: 1px solid var(--line-2); background: var(--bg); }
.lightbox-bar { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 20px;
  background: rgba(4,6,12,.9); border-bottom: 1px solid var(--line); z-index: 2; }
.close { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); border: 0; padding: 8px 12px; cursor: pointer; }

.simple { max-width: 680px; margin: 0 auto 72px; }
.simple h2 { font: 400 30px/1.1 var(--serif); letter-spacing: -.015em; margin-bottom: 14px; }
.simple > p { font-size: 15px; color: var(--ink-2); margin-bottom: 10px; }
.plain-steps { list-style: none; counter-reset: s; margin-top: 16px; border: 1px solid var(--line); }
.plain-steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 14px; padding: 13px 18px;
  font-size: 14.5px; color: var(--ink-2); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.plain-steps li:last-child { border-bottom: 0; }
.plain-steps li::before { content: "0" counter(s); font: 500 11px var(--mono); letter-spacing: .1em; color: var(--accent); }
.proof { margin-top: 16px; border: 1px solid var(--line); }
.proof article { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.proof article:last-child { border-bottom: 0; }
.proof h3 { font: 500 14px var(--sans); }
.proof h3 small { display: block; margin-top: 4px; }
.proof p { font-size: 13.5px; color: var(--ink-2); }
.proof q { color: var(--ink); }
.proof a { color: var(--accent); font-size: 12.5px; text-decoration: none; }
.oops { margin-top: 16px; border: 1px solid var(--line); }
.oops div { padding: 14px 18px; font-size: 14px; color: var(--ink-2); border-bottom: 1px solid var(--line); background: var(--bg-2); border-left: 2px solid var(--accent); }
.oops div:last-child { border-bottom: 0; }
.oops div b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; }

/* prompt block */
.prompt { border: 1px solid var(--line-2); background: #060910; margin: 4px 0 80px; }
.prompt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.prompt-head .dots { display: flex; gap: 6px; }
.prompt-head .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.copy { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); border: 0; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.copy:hover { background: var(--accent-2); }
.prompt pre { padding: 18px 20px; overflow: auto; max-height: 420px; font: 400 12.5px/1.65 var(--mono); color: var(--ink-2); white-space: pre-wrap; }
.prompt-foot { padding: 11px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.prompt-foot a { color: var(--accent); }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 36px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s var(--ease) both; }
  .rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } }
}
@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .equation { grid-template-columns: 1fr; }
  .eq-op { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; }
  .play-head h1 { white-space: normal; }
  .steps-row { grid-template-columns: 1fr 1fr; }
  .steps-row div { border-bottom: 1px solid var(--line); }
  .steps-row div:nth-child(2n) { border-right: 0; }
  .steps-row div:last-child { grid-column: 1 / -1; }
  .proof article { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .nav nav a:not(.cta) { display: none; }
  .hero { padding: 64px 20px 48px; }
  .play-head { padding: 56px 20px 40px; }
  .facts span { border-right: 0; border-bottom: 1px solid var(--line); width: 50%; }
}

/* roles found in the run */
.simple.wide { max-width: 860px; }
.role-filters { margin: 18px 0 0; border-bottom: 0; }
.roles { border: 1px solid var(--line); }
.role { display: grid; grid-template-columns: 1.4fr 1.1fr 1fr 64px; align-items: center; gap: 14px; padding: 13px 18px;
  text-decoration: none; border-bottom: 1px solid var(--line); background: var(--bg-2); transition: background .2s; }
.role:last-child { border-bottom: 0; }
.role:hover { background: var(--panel-2); }
.role:hover .role-go { color: var(--accent); }
.role-t { font: 500 14px var(--sans); color: var(--ink); }
.role-c { font-size: 13px; color: var(--ink-2); }
.role-m { font-size: 10.5px; color: var(--muted); letter-spacing: .08em; }
.role-go { font-size: 10.5px; text-align: right; color: var(--muted); }
.roles-note { margin-top: 10px; font-size: 10.5px; }

/* prompt tabs */
.tabs { display: flex; border: 1px solid var(--line); }
.tab { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 7px 12px; background: transparent;
  color: var(--muted); border: 0; border-right: 1px solid var(--line); cursor: pointer; }
.tab:last-child { border-right: 0; }
.tab[aria-selected="true"] { background: var(--panel-2); color: var(--ink); }
.tab:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

@media (max-width: 760px) {
  .role { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .role-c, .role-m { grid-column: 1; }
  .role-go { grid-row: 1; grid-column: 2; }
}
