/* EŞİK money in 90 seconds: the short version of the money and rules piece, the same look. Tokens, fonts and buttons follow ../css/base.css (direction b "Kesit").
   The fonts are copied into ./fonts so the page works from file:// in every browser. */
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --paper: #FAFAFA; --ink: #1D1F22; --ink-2: #50555C; --line: #7A8088; --tone: #EFF0F0; --tone-2: #E2E4E4;
  --red: #C42B1C; --sill: #F2B705; --on-ink: #FAFAFA; --bg: #E7E8E8;
  --font: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tap: 44px; --r-ctl: 6px; --r-chip: 2px;
  --pad: clamp(16px, 3vw, 40px);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; }
body { -webkit-font-smoothing: antialiased; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--paper); padding: 10px 14px; border: 1.5px solid var(--ink); }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--ink); box-shadow: 0 0 0 5px var(--sill); outline-offset: 0; }

.stage { position: fixed; inset: 0 0 64px 0; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.leads, .labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.leads line { stroke: var(--ink); stroke-width: 1; }
.leads circle { fill: var(--ink); }
.leads .is-no line { stroke: var(--red); } .leads .is-no circle { fill: var(--red); }
.labels .lb {
  position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 14px; font-weight: 560; font-stretch: 86%; line-height: 1.15;
  background: var(--paper); padding: 3px 7px 4px; border-radius: 2px; color: var(--ink); will-change: transform, opacity;
}
.labels .lb b { font-weight: 700; }
.labels .lb.is-no { color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.labels .lb.is-diagram { box-shadow: inset 0 0 0 1px var(--ink); }
.labels .lb.is-tag { box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 700; }
.labels .lb.is-fig { white-space: nowrap; display: grid; gap: 3px; padding: 6px 9px 7px; box-shadow: inset 0 0 0 1.5px var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.labels .lb.is-fig b { font-size: 14px; }
.labels .lb.is-fig .bar { display: inline-block; vertical-align: middle; width: 70px; height: 7px; box-shadow: inset 0 0 0 1px var(--ink); }
.labels .lb.is-fig .bar i { display: block; height: 100%; background: var(--ink); }
.labels .lb.is-fig .tk { display: inline-flex; gap: 6px; vertical-align: middle; height: 10px; }
.labels .lb.is-fig .tk i { display: block; width: 1.5px; height: 10px; background: var(--ink); }
.labels .lb.dim { font-variant-numeric: tabular-nums; padding: 1px 5px; font-size: 13px; }

.top { position: absolute; left: var(--pad); right: var(--pad); top: calc(var(--pad) * .8); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; pointer-events: none; }
.brand { background: var(--paper); padding: 3px 10px 4px; margin: 0 0 0 -10px; font-weight: 750; font-stretch: 76%; font-size: 22px; letter-spacing: .01em; }
.brand span { font-weight: 500; font-stretch: 88%; font-size: 14px; color: var(--ink-2); margin-left: 6px; }
.stamp { background: var(--paper); padding: 2px 8px; margin: 0; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12.5px; font-stretch: 88%; color: var(--ink); }
.stamp em { font-style: normal; } .stamp .s-short { display: none; }
.stamp > span { border: 1.5px solid var(--ink); padding: 1px 6px; outline: 1px solid var(--ink); outline-offset: 2px; margin: 3px; background: var(--paper); }

.say { position: absolute; left: var(--pad); top: calc(var(--pad) + 52px); max-width: min(46vw, 760px); pointer-events: none; background: var(--paper); padding: 12px 18px 14px 14px; margin-left: -14px; width: fit-content; }
.line { margin: 0; font-weight: 720; font-stretch: 76%; font-size: clamp(38px, 4.6vw, 76px); line-height: .98; letter-spacing: -.005em; text-wrap: balance; }
.line span { display: table; background: var(--paper); padding: 2px 12px 6px 4px; margin-left: -4px; }
.line span:empty { display: none; }
.line span.out { opacity: 0; transform: translateY(10px); }
.chip-row { margin: 18px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 34px; }
.chip-row.out { opacity: 0; }
.chip-row .t, .chip-row .w { background: var(--paper); padding: 0 6px; }
.chip-row .t { font-weight: 600; font-stretch: 72%; font-size: 26px; font-variant-numeric: tabular-nums; }
.chip-row .w { font-weight: 720; font-stretch: 76%; font-size: 26px; }
.chip-row .chip { display: inline-block; border: 1.5px solid var(--ink); border-radius: var(--r-chip); padding: 2px 7px; font-weight: 650; font-stretch: 88%; font-size: 15px; line-height: 1.2; font-variant-numeric: tabular-nums; background: var(--paper); }
.chip-row .br { flex-basis: 100%; height: 0; }
.chip-row .r { font-size: 18px; line-height: 1.3; background: var(--paper); padding: 2px 7px; max-width: 30em; }
.chip-row .r.a { font-size: 15px; color: var(--ink-2); margin-top: 4px; }
.chip-row.is-no .w, .chip-row.is-no .chip { color: var(--red); border-color: var(--red); }
.big { background: var(--paper); padding: 2px 6px; width: fit-content; margin: 12px 0 0; font-weight: 500; font-stretch: 92%; font-size: 14px; line-height: 1.3; color: var(--ink-2); max-width: 30em; }
.big.out { opacity: 0; }
.big:empty { display: none; }

.end { position: absolute; left: var(--pad); bottom: calc(var(--pad) + 36px); max-width: min(52vw, 720px); background: var(--paper); padding: 22px 24px 20px; border: 1.5px solid var(--ink); }
.end.out { opacity: 0; }
.end p { margin: 0; }
.n1 { font-weight: 720; font-stretch: 76%; font-size: clamp(30px, 3.2vw, 50px); line-height: 1; font-variant-numeric: tabular-nums; }
.n2 { margin-top: 10px !important; font-size: 18px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.n2 .no { color: var(--red); font-weight: 650; }
.n3 { margin-top: 6px !important; font-size: 18px; line-height: 1.35; font-weight: 650; }
.go { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.go-note { margin-top: 8px !important; font-size: 13px; color: var(--ink-2); }
.btn {
  min-width: var(--tap); min-height: var(--tap); padding: 0 14px; display: inline-grid; place-items: center; grid-auto-flow: column; gap: 6px;
  border: 1.5px solid var(--ink); border-radius: var(--r-ctl); background: var(--paper); color: var(--ink); text-decoration: none;
  font: 650 15px/1 var(--font); font-stretch: 88%; cursor: pointer; transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.btn:hover { background: var(--tone); }
.btn.main { background: var(--ink); color: var(--on-ink); }
.btn.main:hover { background: #33373C; }
.btn svg { width: 14px; height: 14px; fill: currentColor; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

.key { position: absolute; left: var(--pad); bottom: 14px; display: flex; gap: 14px; font-size: 13px; font-weight: 500; font-stretch: 88%; color: var(--ink); pointer-events: none; }
.key { background: var(--paper); padding: 4px 8px; margin-left: -8px; }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key i { display: inline-block; width: 12px; height: 12px; }
.k-person { border-radius: 50%; background: #A9A6A0; }
.k-machine { background: #34383D; }
.k-sill { height: 5px !important; width: 16px !important; background: var(--sill); outline: 1px solid var(--ink); }
.k-no { height: 5px !important; width: 16px !important; background: var(--red); }
.about { background: var(--paper); padding: 4px 8px; position: absolute; right: var(--pad); bottom: 14px; margin: 0; max-width: 44em; text-align: right; font-size: 13px; line-height: 1.3; color: var(--ink-2); font-stretch: 92%; pointer-events: none; }
.still-note { position: absolute; right: var(--pad); top: calc(var(--pad) + 40px); margin: 0; font-size: 13px; color: var(--ink-2); }
.fail { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; font-size: 20px; background: var(--paper); }
.fail p { margin: 0; display: flex; gap: 10px; justify-content: center; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 var(--pad) env(safe-area-inset-bottom); background: var(--paper); border-top: 1.5px solid var(--ink); }
.bar .play { min-width: 84px; }
.track { position: relative; flex: 1; height: 44px; margin: 0 8px; cursor: pointer; }
.track-line { position: absolute; left: 0; right: 0; top: 21px; height: 2px; background: var(--tone-2); }
.track-fill { height: 100%; width: 0; background: var(--ink); }
.marks { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.marks li { position: absolute; top: 0; height: 44px; transform: translateX(-50%); }
.marks button { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; border-radius: 6px; }
.marks button::before { content: ""; width: 10px; height: 10px; background: var(--paper); border: 1.5px solid var(--ink); transform: rotate(45deg); }
.marks button[aria-current="true"]::before { background: var(--sill); }
.marks button .n { position: absolute; top: 31px; font-size: 11px; font-weight: 600; font-stretch: 88%; color: var(--ink-2); }
.clock { min-width: 64px; text-align: right; font-weight: 600; font-stretch: 72%; font-size: 20px; font-variant-numeric: tabular-nums; }
.nojs { position: fixed; inset: 0; display: grid; place-content: center; background: var(--paper); margin: 0; font-size: 20px; }

/* the night beat of scene 4 turns the sheet dark (DESIGN.md: the night chapter is the dark sheet) */
body.night { --paper: #141618; --ink: #E4E6E8; --ink-2: #A9AEB4; --tone: #1D2023; --tone-2: #262A2E; --red: #FF7A66; --on-ink: #141618; --bg: #141618; }
.brand, .stamp, .line, .chip-row, .big, .key, .about, .bar, .labels .lb, .btn, .clock { transition: color 400ms var(--ease), background-color 400ms var(--ease), border-color 400ms var(--ease); }

body.night .k-machine { background: #8C9299; }

/* tablet and phone */
@media (max-width: 1099px) {
  .say { max-width: 70vw; }
  .about { max-width: 30em; }
}
@media (max-width: 639px), (orientation: portrait) and (max-width: 900px) {
  :root { --pad: 16px; }
  .stage { inset: 0 0 60px 0; }
  .bar { height: 60px; gap: 4px; }
  .bar .play { min-width: 64px; }
  .clock { display: none; }
  .marks button .n { display: none; }
  .top { top: 12px; }
  .brand { font-size: 19px; } .brand span { display: none; }
  .stamp { font-size: 11px; } .stamp > span { font-size: 11px; }
  .stamp .s-long { display: none; } .stamp .s-short { display: inline; }
  body.ended .key, body.ended .about { display: none; }
  .say { top: 52px; max-width: calc(100% - 20px); padding: 10px 14px 12px 12px; margin-left: -6px; }
  .line { font-size: clamp(30px, 8.4vw, 44px); }
  .chip-row { margin-top: 12px; gap: 8px; }
  .chip-row .t, .chip-row .w { font-size: 21px; }
  .chip-row .r { font-size: 15.5px; }
  .big { font-size: 12.5px; }
  .end { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 16px; }
  .n2, .n3 { font-size: 15.5px; }
  .key { bottom: 58px; gap: 10px; font-size: 12px; }
  .about { left: 16px; right: 16px; bottom: 10px; text-align: left; font-size: 11.5px; }
  .labels .lb { font-size: 12.5px; }
  .labels .lb.lod2 { display: none; }
}
@media (max-width: 379px) {
  .chip-row .chip { font-size: 13px; }
  .key span:nth-child(n+3) { display: none; }
}

/* the decision log: the newest decision on top, older ones fade */
.chip-row.log { display: grid; gap: 8px; min-height: 0; }
.chip-row.log .logrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; transition: none; }
.chip-row.log .logrow .r { font-size: 16px; }
.chip-row.log .logrow.is-no .w, .chip-row.log .logrow.is-no .chip { color: var(--red); border-color: var(--red); }
.chip-row.log .logrow + .logrow .t, .chip-row.log .logrow + .logrow .w { font-size: 19px; }
.k-coin { border-radius: 50%; background: var(--ink); }
@media (max-width: 639px), (orientation: portrait) and (max-width: 900px) {
  .chip-row.log .logrow .r { font-size: 13.5px; }
  .chip-row.log .logrow + .logrow { display: none; }
}

/* longer lines than the story: a wider text panel on wide screens */
@media (min-width: 640px) and (orientation: landscape), (min-width: 901px) {
  .say { max-width: min(54vw, 860px); }
  .line { font-size: clamp(34px, 4vw, 64px); }
}
.chip-row.log .logrow + .logrow .r, .chip-row.log .logrow + .logrow .br { display: none; }

/* big name tags that stay on, and the link to the full version */
.labels .lb.is-name { font-size: 16px; font-weight: 700; font-stretch: 88%; padding: 4px 9px 5px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.top .full { pointer-events: auto; margin-left: 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
@media (max-width: 639px), (orientation: portrait) and (max-width: 900px) {
  .labels .lb.is-name { font-size: 12.5px; padding: 2px 6px 3px; }
  .top .full { font-size: 11.5px; margin-left: 4px; }
}
