/* iskra.run/na-zywo.html: Iskra na żywo na scenie landingu. Liczba i dziennik na srebrnej połowie,
   świat, w którym żyje, na czarnej. Dane z publicznego odczytu https://iskra-model.fly.dev. */
.world-canvas { position: fixed; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; pointer-events: none; }

.spirit-live .hero { grid-template-columns: minmax(0, 1fr) 36% minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; }
.spirit-live .mind { grid-column: 1; grid-row: 1; align-self: center; position: relative; top: -3vh; max-width: 470px; }
/* Miękka srebrna poświata pod tekstem: uspokaja kropki tła, żeby litery były czytelne. */
.spirit-live .mind::before { content: ''; position: absolute; inset: -60px -90px -50px -70px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, #c9c9c7e6 0%, #c4c4c2b3 55%, #c4c4c200 100%); }
.spirit-live .world-labels { grid-column: 3; grid-row: 1; align-self: end; top: 0; display: flex; gap: 22px; padding-bottom: 4px; }

.eyebrow { display: flex; align-items: center; gap: 10px; color: #101112; font: 500 12px/1.6 var(--body); letter-spacing: .16em; text-transform: uppercase; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #101112; box-shadow: 0 0 0 0 #10111280; animation: beat 1.8s infinite; }
@keyframes beat { 70% { box-shadow: 0 0 0 8px #10111200; } 100% { box-shadow: 0 0 0 0 #10111200; } }

/* Jedna liczba, która żyje: o ile mniej pomyłek niż na początku tego świata. */
.figure { margin-top: 14px; color: var(--ink); font: 200 clamp(84px, 8.6vw, 148px)/.95 var(--display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.figure-caption { margin-top: 10px; color: #101112; font: 400 clamp(15px, 1.1vw, 17px)/1.5 var(--read); }
.status { margin-top: 18px; color: #101112; font: 400 14px/1.6 var(--read); }
.status:empty { display: none; }
/* Dziennik: tylko zdarzenia, które coś znaczą, z godziną. */
.log { margin: 22px 0 0; padding: 0; list-style: none; }
.log li { display: grid; grid-template-columns: 4.2em 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid #10111229; color: #101112; font: 400 14px/1.5 var(--read); }
.log li:nth-child(n+3) { color: #101112b8; }
.log time { color: #1011129e; font: 500 12px/1.75 var(--body); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.log li.mark { font-weight: 500; }
.key { display: inline-flex; align-items: center; gap: 8px; color: #a9aea9; font: 400 11px/1.5 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.key .ghost, .key .real { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.key .ghost { border: 1px solid #c9d1d6; }
.key .real { background: #f6f6f1; }

.stages-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 20px; color: #101112; font: 400 12px/1.6 var(--body); letter-spacing: .06em; }
.stages-line b { font-weight: 500; }
.stages-line span { opacity: .6; }
.stages-row .link { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #10111266; }
.link { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.link:hover, .foot a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Szczegóły: testy i liczby dla tych, którzy chcą sprawdzić. */
.details { width: min(860px, calc(100% - 32px)); max-height: calc(100svh - 48px); padding: 26px 30px; border: 1px solid var(--silver-line); background: var(--silver-surface); color: var(--silver-copy); font: 400 15px/1.6 var(--body); box-shadow: 0 30px 90px #000a; overflow-y: auto; overscroll-behavior: contain; }
.details::backdrop { background: #0b0c0d99; backdrop-filter: blur(4px); }
.details-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.details-head h2 { color: var(--silver-ink); font: 300 28px/1.2 var(--display); }
.close { min-width: 44px; min-height: 44px; margin: -8px -12px 0 0; border: 0; background: none; color: var(--silver-ink); font: 300 28px var(--body); cursor: pointer; }
.details-note { margin-top: 6px; color: var(--silver-muted); font: 300 14px/1.6 var(--read); }
.stage-test { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--silver-line); }
.stage-test h3 { color: var(--silver-ink); font: 400 18px/1.4 var(--display); }
.stage-test p { margin-top: 4px; color: var(--silver-copy); font: 300 14px/1.6 var(--read); }
.details-sub { margin-top: 30px; color: var(--silver-ink); font: 300 22px/1.3 var(--display); }
.biographies { display: grid; gap: 16px; margin-top: 12px; }
.card { padding: 18px 20px; border: 1px solid var(--silver-line); background: var(--silver-surface); }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.world { color: var(--silver-muted); font: 400 12px/1.5 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.state { color: var(--silver-muted); font: 400 11px/1.5 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.state.live { color: var(--silver-ink); }
.headline { margin-top: 8px; color: var(--silver-ink); font: 300 22px/1.3 var(--display); }
.story { margin-top: 6px; color: var(--silver-copy); font: 300 14px/1.6 var(--read); }
.chart { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.chart text { fill: var(--silver-muted); font: 400 11px var(--display); }
.chart .label { fill: var(--silver-ink); }
.access { margin-top: 24px; }
.access label { color: var(--silver-muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.access div { display: flex; gap: 14px; border-bottom: 1px solid var(--silver-muted); }
.access input { flex: 1; min-width: 0; padding: 12px 0; border: 0; background: none; color: var(--silver-ink); font: 400 16px var(--body); }
.access button { border: 0; background: none; color: var(--silver-ink); font: 400 15px var(--body); cursor: pointer; }

@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

/* Telefon: myśl na górze, świat pod iskrą. */
@media (max-width: 760px) {
  .spirit-live { height: auto; min-height: 100svh; }
  .spirit-live .hero { grid-template-columns: 1fr; grid-template-rows: auto minmax(46svh, 1fr) auto; }
  .spirit-live .mind { grid-row: 1; top: 0; max-width: none; }
  .spirit-live .world-labels { grid-column: 1; grid-row: 3; }
  .figure { font-size: clamp(64px, 18vw, 96px); }
  .figure-caption { max-width: 62%; font-size: 15px; }
  .status { max-width: 62%; font-size: 13px; }
  /* Na telefonie tylko najnowsze zdarzenie, w pełnej szerokości lewej kolumny. */
  .log { max-width: 62%; margin-top: 14px; }
  .log li { grid-template-columns: 1fr; gap: 2px; font-size: 13px; }
  .log li:nth-child(n+2) { display: none; }
  .stages-row { display: none; }
}

/* Inspection is a pause in the presentation, never a fabricated server-side intervention. */
.spirit-live { display: block; height: auto; }
.spirit-live .hero { height: auto; min-height: max(600px, calc(100svh - var(--header))); }
.inspect-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 16px; font-size: 15px; text-decoration: underline; text-underline-offset: 5px; }
/* The reader stands on the opening's silver → black gradient: its title on silver, everything else on black.
   The gradient is fixed to the viewport, like the landscape, so the canvas world never shows through;
   the top edge fades so the reader slides over the scene without a seam. */
.experience-reader { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 1.4fr; gap: 7%; padding: 72px var(--edge); background: var(--opening-surface) fixed; color: var(--silver-ink);
  --silver-ink: #f0f0eb; --silver-copy: #d1d4d0; --silver-muted: #c2c5c2; --silver-line: #ffffff3d;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 110px); mask-image: linear-gradient(180deg, transparent 0, #000 110px); }
@media (min-width: 761px) {
  .spirit-live .experience-reader { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); column-gap: clamp(48px, 7vw, 120px); row-gap: 0; align-items: start; padding-top: 140px; }
  .experience-reader::before { content: ''; position: absolute; z-index: -1; inset: 0 0 0 40%; pointer-events: none;
    background: linear-gradient(90deg, transparent 0, #0d0e0fb8 32%, #0d0e0fb8 100%); }
  .spirit-live .reader-intro { display: contents; }
  .spirit-live .reader-intro h2 { grid-column: 1; grid-row: 1 / span 8; max-width: 12ch; color: #101112; }
  .spirit-live .reader-intro > :not(h2) { grid-column: 2; max-width: 680px; }
  .spirit-live .reader-intro > p:first-of-type { margin-top: 0; }
  .spirit-live .reader-data { grid-column: 2; margin-top: 36px; }
}
.reader-intro h2 { font: 300 clamp(34px, 3.4vw, 52px)/1.15 var(--display); letter-spacing: -.02em; }
.reader-intro p { margin-top: 22px; font: 300 15px/1.8 var(--read); color: var(--silver-copy); }
.reader-intro p + p { color: var(--silver-muted); font-size: 13px; }
.reader-controls { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-block: 16px 24px; }
.reader-controls button { min-height: 44px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--silver-muted); background: none; cursor: pointer; }
.reader-controls button:hover { border-color: var(--silver-ink); }
.table-scroll { overflow-x: auto; }
.reader-data { min-width: 0; }
.reader-data table { width: 100%; border-collapse: collapse; font: 400 13px/1.6 var(--read); font-variant-numeric: tabular-nums; }
.reader-data th, .reader-data td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--silver-line); white-space: nowrap; }
.reader-data th { font-weight: 400; color: var(--silver-muted); }
.reader-data th:first-child { padding-left: 0; text-align: left; }
.reader-data #step-result { margin-top: 20px; font: 300 14px/1.7 var(--read); }
/* The footer continues the reader's shade, so there is no step between them. */
.spirit-live .foot { position: relative; min-height: 60px; background: linear-gradient(90deg, transparent 40%, #0d0e0fb8 59.2%), var(--opening-surface); background-attachment: scroll, fixed; color: #c4c8c4; }
.spirit-live .foot .copyright { color: inherit; }
@media (max-width: 760px) {
  .spirit-live .hero { min-height: max(720px, calc(100svh - var(--header))); }
  /* Its own graphite-to-black gradient: a veil would let the moving world of the canvas through. */
  .experience-reader { grid-template-columns: 1fr; gap: 32px; padding-block: 96px 48px;
    background: linear-gradient(160deg, #565656 0%, #2c2d2e 38%, #111213 80%); }
  .spirit-live .foot { background: #111213; }
  .spirit-live .reader-intro h2 { margin-inline: calc(-1 * var(--edge)); padding: 52px var(--edge) 40px; color: #101112;
    background: linear-gradient(180deg, transparent 0, #a9a9a9 36px, #b9b9b9 50%, #9a9a9a calc(100% - 32px), transparent 100%); }
  .reader-intro h2 { max-width: 400px; }
  .reader-data th, .reader-data td { padding: 10px 5px; font-size: 12px; }
  .spirit-live .stages-row { display: flex; }
}
