/* ══════════════════════════════════════════════════════════════════════
   Ditto — investor deck
   Same design language as the public site, re-tuned for a 16:9 slide that
   someone will project, screen-share, and print to PDF.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --bg:        #05060a;
  --bg-panel:  #0a0c12;
  --bg-lift:   #0e1118;
  --line:      #1c212c;
  --line-faint:#141821;
  --line-strong:#2a3140;
  --text:      #e8edf5;
  --text-dim:  #b6c0d0;
  --text-faint:#8d97a8;
  --text-ghost:#606b7e;
  --accent:    #22d3ee;
  --accent-2:  #67e8f9;
  --ok:        #10b981;
  --warn:      #fbbf24;
  --danger:    #ef4444;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Outfit, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ══════════════════════════ GATE ══════════════════════════ */

.gate {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .5s var(--ease);
}
.gate.gone { opacity: 0; pointer-events: none; }
#gate-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }

.gate-card {
  position: relative; z-index: 2;
  width: min(92vw, 400px);
  padding: 40px 36px 30px;
  background: rgba(10,12,18,.86);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
}
.gate-mark {
  width: 44px; height: 44px; margin: 0 auto 18px;
  border: 1.5px solid var(--accent); border-radius: 11px;
  display: grid; place-items: center;
  box-shadow: 0 0 26px rgba(34,211,238,.24);
}
.gate-mark span {
  width: 15px; height: 15px; border-radius: 4px; background: var(--accent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.72); opacity: .55; } }

.gate-brand { font-size: 1.5rem; font-weight: 300; letter-spacing: .34em; margin-bottom: 6px; }
.gate-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
            color: var(--text-ghost); text-transform: uppercase; margin-bottom: 30px; }

.gate-label { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .14em;
              color: var(--text-ghost); text-align: left; margin-bottom: 8px; }
.gate-input {
  width: 100%; padding: 12px 14px; margin-bottom: 14px;
  background: #05060a; border: 1px solid var(--line-strong); border-radius: 9px;
  color: var(--text); font-family: var(--mono); font-size: 14px; letter-spacing: .22em;
  transition: border-color .2s, box-shadow .2s;
}
.gate-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34,211,238,.13); }
.gate-card.bad .gate-input { border-color: var(--danger); animation: shake .38s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-7px)} 40%{transform:translateX(7px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }

.gate-btn {
  width: 100%; padding: 12px; border: none; border-radius: 9px; cursor: pointer;
  background: var(--accent); color: #04252b; font-family: Outfit, sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: .02em;
  transition: filter .2s, transform .2s var(--ease);
}
.gate-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.gate-btn:disabled { opacity: .55; cursor: wait; }
.gate-msg { min-height: 18px; margin-top: 12px; font-family: var(--mono); font-size: 10px;
            letter-spacing: .05em; color: var(--danger); }
.gate-msg.work { color: var(--text-ghost); }
.gate-foot { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-faint);
             font-size: 11px; line-height: 1.65; color: var(--text-ghost); text-align: left; }

/* ══════════════════════════ CHROME ══════════════════════════ */

.deck { position: fixed; inset: 0; display: flex; flex-direction: column; }

.rail { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--line-faint); z-index: 40; }
.rail i { display: block; height: 100%; width: 0;
          background: linear-gradient(90deg, var(--accent), var(--accent-2));
          transition: width .45s var(--ease); }

.topbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 14px 26px; border-bottom: 1px solid var(--line-faint); z-index: 30;
}
.tb-brand { font-size: .95rem; font-weight: 400; letter-spacing: .3em; color: var(--text);
            text-decoration: none; }
.tb-brand:hover { color: var(--accent); }
.tb-title { font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em;
            color: var(--text-ghost); text-transform: uppercase; }
.tb-spacer { flex: 1; }
.tb-btn {
  padding: 6px 12px; background: transparent; border: 1px solid var(--line-strong);
  border-radius: 7px; color: var(--text-faint); cursor: pointer;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .09em;
  transition: color .2s, border-color .2s;
}
.tb-btn:hover { color: var(--accent); border-color: var(--accent); }
.tb-count { font-family: var(--mono); font-size: 10px; color: var(--text-ghost); margin-left: 4px; }
.tb-count b { color: var(--text); font-weight: 500; }

.stage { flex: 1 1 auto; position: relative; overflow: hidden; }

.edge {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 25;
  width: 40px; height: 74px; border: 1px solid var(--line); border-radius: 11px;
  background: rgba(10,12,18,.6); color: var(--text-faint); cursor: pointer;
  font-size: 22px; line-height: 1; transition: all .25s var(--ease); opacity: .35;
}
.edge:hover { opacity: 1; color: var(--accent); border-color: var(--accent); }
.edge.prev { left: 14px; }
.edge.next { right: 14px; }
.edge[disabled] { opacity: .1; cursor: default; }

.dots { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
        display: flex; gap: 5px; z-index: 25; max-width: 82vw; flex-wrap: wrap;
        justify-content: center; }
.dots i { width: 18px; height: 3px; border-radius: 2px; background: var(--line-strong);
          cursor: pointer; transition: background .25s, transform .25s var(--ease); }
.dots i:hover { background: var(--text-ghost); transform: scaleY(1.8); }
.dots i.on { background: var(--accent); }

.hint { position: fixed; bottom: 16px; right: 20px; z-index: 25;
        font-family: var(--mono); font-size: 9px; letter-spacing: .07em; color: var(--text-ghost);
        transition: opacity .6s; }
.hint b { color: var(--text-faint); }
.hint.fade { opacity: 0; }

/* ══════════════════════════ SLIDES ══════════════════════════ */

.slide {
  position: absolute; inset: 0;
  padding: 40px clamp(28px, 5vw, 76px) 58px;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateY(14px);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
  overflow: auto;
}
.slide.on { opacity: 1; pointer-events: auto; transform: none; }
.slide.back { transform: translateY(-14px); }

.kicker { font-family: var(--mono); font-size: 9.5px; letter-spacing: .19em;
          color: var(--accent); text-transform: uppercase; margin-bottom: 14px; }
.kicker.warn { color: var(--warn); }

h1.st { font-size: clamp(1.9rem, 3.5vw, 3.1rem); font-weight: 200; line-height: 1.1;
        letter-spacing: -.02em; margin-bottom: 10px; }
h2.st { font-size: clamp(1.5rem, 2.5vw, 2.25rem); font-weight: 200; line-height: 1.15;
        letter-spacing: -.015em; margin-bottom: 8px; }
.lede { font-size: clamp(.95rem, 1.15vw, 1.1rem); font-weight: 300; color: var(--text-dim);
        line-height: 1.6; max-width: 68ch; margin-bottom: 22px; }
.lede b, .hl { color: var(--accent); font-weight: 400; }
.body { font-size: .93rem; color: var(--text-faint); line-height: 1.72; }
.body + .body { margin-top: 12px; }
.tiny { font-size: 11px; color: var(--text-ghost); line-height: 1.6; }
.tiny sup, sup.ref { color: var(--accent); font-family: var(--mono); font-size: 8.5px; }

.fill { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 3vw, 46px);
       flex: 1 1 auto; min-height: 0; align-items: stretch; }
.two.wide-l { grid-template-columns: 1.35fr 1fr; }
.two.wide-r { grid-template-columns: 1fr 1.35fr; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.four  { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 22px); }
.col { display: flex; flex-direction: column; min-height: 0; }
.mt  { margin-top: 20px; }
.mta { margin-top: auto; }

/* figure host */
.fig { position: relative; flex: 1 1 auto; min-height: 190px;
       background: #05060a; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.fig canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.fig.plain { background: none; border: none; }
.figcap { font-size: 10.5px; color: var(--text-ghost); margin-top: 9px; line-height: 1.55; }

/* cards */
.card { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 13px;
        padding: 20px; display: flex; flex-direction: column; }
.card.hot { border-color: rgba(34,211,238,.32); background: rgba(34,211,238,.045); }
.card.risk { border-color: rgba(239,68,68,.28); background: rgba(239,68,68,.04); }
.card.warn { border-color: rgba(251,191,36,.3);  background: rgba(251,191,36,.04); }
.card h3 { font-size: 1rem; font-weight: 400; margin-bottom: 7px; }
.card p { font-size: .84rem; color: var(--text-faint); line-height: 1.62; }
.card .n { font-family: var(--mono); font-size: 9px; letter-spacing: .11em;
           color: var(--text-ghost); margin-bottom: 10px; }

/* big stat */
.stat { display: flex; flex-direction: column; gap: 3px; }
.stat b { font-size: clamp(1.5rem, 2.6vw, 2.3rem); font-weight: 200; line-height: 1;
          font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--mono); font-size: 8.5px; letter-spacing: .11em;
             color: var(--text-ghost); text-transform: uppercase; }
.stat.cy b { color: var(--accent); }
.stat.ok b { color: var(--ok); }
.stat.wn b { color: var(--warn); }
.stat.dn b { color: var(--danger); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 22px; }

/* lists */
ul.ticks { list-style: none; }
ul.ticks li { position: relative; padding-left: 22px; font-size: .89rem; color: var(--text-dim);
              line-height: 1.6; margin-bottom: 11px; }
ul.ticks li::before { content: '→'; position: absolute; left: 0; top: 1px;
                      color: var(--accent); font-family: var(--mono); font-size: 10.5px; }
ul.ticks li b { color: var(--text); font-weight: 500; }
ul.ticks.no li::before { content: '×'; color: var(--danger); }
ul.ticks.dot li::before { content: '·'; color: var(--text-ghost); font-size: 15px; top: -2px; }

/* table */
table.t { width: 100%; border-collapse: collapse; font-size: .84rem; }
table.t th { text-align: left; font-family: var(--mono); font-size: 8.5px; font-weight: 400;
             letter-spacing: .11em; color: var(--text-ghost); text-transform: uppercase;
             padding: 0 12px 9px 0; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-faint);
             color: var(--text-faint); vertical-align: top; }
table.t td b { color: var(--text); font-weight: 500; }
table.t td.num { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
                 white-space: nowrap; text-align: right; }
table.t tr.tot td { border-bottom: none; border-top: 1px solid var(--line-strong);
                    color: var(--text); font-weight: 500; }
table.t tr:hover td { color: var(--text-dim); }

/* pills / tags */
.tag { display: inline-block; font-family: var(--mono); font-size: 8px; letter-spacing: .1em;
       padding: 3px 8px; border-radius: 4px; border: 1px solid var(--line-strong);
       color: var(--text-ghost); text-transform: uppercase; }
.tag.cy { color: var(--accent); border-color: rgba(34,211,238,.35); background: rgba(34,211,238,.07); }
.tag.ok { color: var(--ok); border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.07); }
.tag.wn { color: var(--warn); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.07); }
.tag.dn { color: var(--danger); border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.07); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* cover */
.cover { justify-content: center; align-items: flex-start; }
.cover .mark { width: 52px; height: 52px; border: 1.5px solid var(--accent); border-radius: 13px;
               display: grid; place-items: center; margin-bottom: 28px;
               box-shadow: 0 0 30px rgba(34,211,238,.22); }
.cover .mark i { width: 18px; height: 18px; border-radius: 5px; background: var(--accent);
                 animation: pulse 2.6s var(--ease) infinite; }
.cover h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); font-weight: 200; letter-spacing: .12em;
            line-height: 1; margin-bottom: 16px; }
.cover .tl { font-size: clamp(1.05rem, 1.9vw, 1.6rem); font-weight: 200; color: var(--text-dim);
             margin-bottom: 30px; }
.cover .meta { display: flex; gap: 26px; flex-wrap: wrap; font-family: var(--mono);
               font-size: 9.5px; letter-spacing: .11em; color: var(--text-ghost); }
/* full-bleed animated backdrop behind a slide's content */
.backdrop { position: absolute !important; inset: 0; z-index: 0; opacity: .75;
            border: none !important; background: none !important; min-height: 0 !important; }
.above { position: relative; z-index: 2; }

/* people */
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.person { text-align: center; }
.person img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
              filter: grayscale(1) contrast(1.07); border: 1px solid var(--line);
              margin-bottom: 12px; }
.person .role { font-family: var(--mono); font-size: 8.5px; letter-spacing: .13em;
                color: var(--accent); margin-bottom: 5px; text-transform: uppercase; }
.person h4 { font-size: .96rem; font-weight: 400; margin-bottom: 4px; }
.person p { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }
.person p.dim { color: var(--text-ghost); }

/* editable / needs-input flag */
.flag {
  border-left: 2px solid var(--warn); background: rgba(251,191,36,.06);
  padding: 12px 16px; border-radius: 0 8px 8px 0; margin-top: 16px;
}
.flag b { color: var(--warn); font-family: var(--mono); font-size: 9px; letter-spacing: .11em;
          display: block; margin-bottom: 5px; text-transform: uppercase; }
.flag p { font-size: 12px; color: var(--text-faint); line-height: 1.6; }

/* source ledger */
.src { display: grid; grid-template-columns: 26px 1fr 92px; gap: 12px;
       padding: 9px 0; border-bottom: 1px solid var(--line-faint); align-items: start; }
.src .i { font-family: var(--mono); font-size: 9px; color: var(--text-ghost); padding-top: 3px; }
.src .d { font-size: 12px; color: var(--text-faint); line-height: 1.55; }
.src .d b { color: var(--text-dim); font-weight: 500; }
.src .k { text-align: right; }

/* index overlay */
.overlay[hidden] { display: none !important; }
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(5,6,10,.97);
           backdrop-filter: blur(8px); display: flex; flex-direction: column;
           padding: 22px clamp(20px, 4vw, 60px); }
.ov-head { display: flex; align-items: center; justify-content: space-between;
           padding-bottom: 16px; border-bottom: 1px solid var(--line);
           font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
           color: var(--text-ghost); text-transform: uppercase; }
.ov-grid { flex: 1; overflow: auto; display: grid;
           grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
           gap: 9px; padding: 18px 0; align-content: start; }
.ov-item { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 11px 13px;
           border: 1px solid var(--line-faint); border-radius: 9px; cursor: pointer;
           transition: border-color .2s, background .2s; }
.ov-item:hover { border-color: var(--accent); background: rgba(34,211,238,.05); }
.ov-item.on { border-color: var(--accent); background: rgba(34,211,238,.09); }
.ov-item .n { font-family: var(--mono); font-size: 9px; color: var(--text-ghost); padding-top: 2px; }
.ov-item .t { font-size: 12.5px; color: var(--text-dim); line-height: 1.4; }

/* ══════════════════════════ RESPONSIVE ══════════════════════════ */

@media (max-width: 900px) {
  .two, .two.wide-l, .two.wide-r, .three, .four { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr 1fr; }
  .edge { display: none; }
  .slide { padding: 26px 20px 54px; }
  .hint { display: none; }
  .fig { min-height: 200px; }
}
@media (max-width: 560px) {
  .people { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .src { grid-template-columns: 22px 1fr; }
  .src .k { grid-column: 2; text-align: left; }
}

/* ══════════════════════════ PRINT / PDF ══════════════════════════
   One slide per landscape page. Canvas figures print as their current frame,
   which is why every figure settles on a readable final state.
   ══════════════════════════════════════════════════════════════════ */

/* The print page box is sized to match the on-screen stage exactly (1440 × 756 CSS
   px at 96 dpi), so anything that fits on screen fits on the page and the responsive
   breakpoints see the width they were designed for. */
@page { size: 381mm 200mm; margin: 0; }

@media print {
  html, body { overflow: visible; height: auto; background: #05060a; }
  .gate, .topbar, .edge, .dots, .hint, .rail, .overlay { display: none !important; }
  .deck { position: static; display: block; }
  .stage { overflow: visible; }
  .slide {
    position: relative; inset: auto; opacity: 1 !important; transform: none !important;
    pointer-events: auto; page-break-after: always; break-after: page;
    width: 381mm; height: 200mm; overflow: hidden;
    padding: 34px 66px 30px; display: flex !important;
  }
  .slide:last-child { page-break-after: auto; }

  /* Print media does not re-evaluate the screen breakpoints reliably, so restate the
     multi-column layouts explicitly rather than trusting the page width. */
  .two            { grid-template-columns: 1fr 1fr !important; }
  .two.wide-l     { grid-template-columns: 1.35fr 1fr !important; }
  .two.wide-r     { grid-template-columns: 1fr 1.35fr !important; }
  .three          { grid-template-columns: repeat(3, 1fr) !important; }
  .four           { grid-template-columns: repeat(4, 1fr) !important; }
  .people         { grid-template-columns: repeat(3, 1fr) !important; }
  .stats          { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important; }
  .ov-grid        { display: none !important; }
  .fill           { overflow: hidden !important; }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
