/* ============================================================
   TRI PRESENTER 2.6 · fictional presentation software by T-R-I
   The website is a deck being presented, chrome and all.
   ============================================================ */

:root {
  /* app chrome */
  --chrome: #17171A;
  --chrome-2: #1F1F24;
  --chrome-3: #2A2A31;
  --chrome-line: #33333B;
  --chrome-text: #C9C9D2;
  --chrome-dim: #7C7C88;
  --select: #21A1A4;          /* design-tool selection blue */
  --ok: #34C759;
  --warn: #FF9F0A;

  /* slide surface */
  --paper: #FFFFFF;
  --ink: #101013;
  --ink-2: #55555E;
  --ink-3: #9A9AA4;
  --slide-line: #E7E7EC;
  --tri-blue: #21A1A4;        /* deck accent */

  /* backstage */
  --guide: #FF2BD6;           /* magenta guides */
  --sticky: #FFE81A;
  --laser: #FF2D2D;

  --f-display: "Archivo", "Helvetica Neue", sans-serif;
  --f-body: "Inter", "Helvetica Neue", sans-serif;
  --f-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --SW: 1280;                  /* slide design width  */
  --SH: 720;                   /* slide design height */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--chrome);
  color: var(--chrome-text);
  font-family: var(--f-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--select); color: #fff; }

.mono { font-family: var(--f-mono); }

/* ============================================================
   APP LAYOUT
   ============================================================ */

#app {
  display: grid;
  grid-template-rows: 44px 1fr 30px;
  grid-template-columns: 168px 1fr;
  grid-template-areas: "titlebar titlebar" "filmstrip stage" "statusbar statusbar";
  height: 100%;
  transition: grid-template-columns .3s ease;
}
#app.no-filmstrip { grid-template-columns: 0 1fr; }
#app.presenting { grid-template-rows: 0 1fr 0; grid-template-columns: 0 1fr; }
#app.presenting .titlebar, #app.presenting .statusbar, #app.presenting .filmstrip { display: none; }

/* ---------- titlebar ---------- */
.titlebar {
  grid-area: titlebar;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  background: var(--chrome-2);
  border-bottom: 1px solid var(--chrome-line);
  user-select: none;
  position: relative;
  z-index: 60;
}
.traffic { display: flex; gap: 8px; margin-right: 2px; }
.traffic i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.traffic .r { background: #FF5F57; } .traffic .y { background: #FEBC2E; } .traffic .g { background: #28C840; }
.traffic i { position: relative; }
.traffic i:hover::after {
  content: attr(data-tip);
  position: absolute; top: 18px; left: -8px;
  background: var(--chrome-3); color: var(--chrome-text);
  font: 10px/1.6 var(--f-mono); padding: 2px 8px; white-space: nowrap; border-radius: 4px;
}

.app-id { display: flex; align-items: center; gap: 8px; }
.app-id img { height: 16px; width: auto; }
.app-id .app-name { font: 600 12px var(--f-body); letter-spacing: .02em; color: #fff; }
.app-id .ver { font: 10px var(--f-mono); color: var(--chrome-dim); }

.menus { display: flex; gap: 2px; }
.menu { position: relative; }
.menu > button {
  font-size: 12.5px; color: var(--chrome-text);
  padding: 5px 10px; border-radius: 5px;
}
.menu > button:hover, .menu.open > button { background: var(--chrome-3); color: #fff; }
.menu .dropdown {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 236px;
  background: #232329;
  border: 1px solid var(--chrome-line);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
  padding: 5px;
  z-index: 100;
}
.menu.open .dropdown { display: block; }
.dropdown button, .dropdown a {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  width: 100%; text-align: left;
  font-size: 12.5px; padding: 7px 10px; border-radius: 5px;
  color: var(--chrome-text);
}
.dropdown button:hover, .dropdown a:hover { background: var(--select); color: #fff; }
.dropdown .kbd { font: 10px var(--f-mono); color: var(--chrome-dim); }
.dropdown button:hover .kbd, .dropdown a:hover .kbd { color: rgba(255,255,255,.75); }
.dropdown hr { border: 0; border-top: 1px solid var(--chrome-line); margin: 5px 4px; }
.dropdown .check::before { content: "○  "; }
.dropdown .check.on::before { content: "●  "; color: var(--ok); }
.dropdown button:hover.check.on::before { color: #fff; }

.filename {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  font: 12px var(--f-mono);
  color: var(--chrome-dim);
  max-width: 34vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.filename .doc-ico { color: var(--chrome-dim); }
.filename em { font-style: normal; color: var(--chrome-text); }

.presence { display: flex; align-items: center; margin-left: 14px; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--chrome-2);
  margin-left: -7px;
  background-size: cover; background-position: top center;
  position: relative;
}
.avatar:first-child { margin-left: 0; }
.avatar.you { background: var(--chrome-3); color: #fff; font: 600 10px var(--f-body); display: flex; align-items: center; justify-content: center; }
.avatar .ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid transparent; }
.avatar.masha .ring { border-color: #FF7AC6; }
.avatar.alex .ring { border-color: #6EE7B7; }
.avatar:hover::after {
  content: attr(data-name);
  position: absolute; top: 32px; right: 0;
  background: var(--chrome-3); padding: 3px 8px; border-radius: 4px;
  font: 10px var(--f-mono); white-space: nowrap; z-index: 10;
}

.present-btn {
  margin-left: 14px;
  display: flex; align-items: center; gap: 7px;
  background: var(--select); color: #fff;
  font: 600 12px var(--f-body);
  padding: 7px 14px; border-radius: 6px;
  transition: filter .15s ease;
}
.present-btn:hover { filter: brightness(1.12); }

/* ---------- filmstrip ---------- */
.filmstrip {
  grid-area: filmstrip;
  background: var(--chrome-2);
  border-right: 1px solid var(--chrome-line);
  overflow-y: auto;
  padding: 10px 8px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--chrome-3) transparent;
}
#app.no-filmstrip .filmstrip { display: none; }
.thumb {
  display: grid; grid-template-columns: 18px 1fr; gap: 6px;
  align-items: start;
  margin-bottom: 8px;
  cursor: pointer;
}
.thumb .no { font: 10px var(--f-mono); color: var(--chrome-dim); padding-top: 2px; text-align: right; }
.thumb .shot {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--paper);
  border-radius: 3px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color .15s ease;
}
.thumb:hover .shot { border-color: var(--chrome-dim); }
.thumb.active .shot { border-color: var(--select); }
.thumb.active .no { color: var(--select); }
.thumb .shot .mini {
  width: calc(var(--SW) * 1px); height: calc(var(--SH) * 1px);
  transform-origin: top left;
  pointer-events: none;
  position: absolute; top: 0; left: 0;
}

/* ---------- stage ---------- */
.stage {
  grid-area: stage;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, #26262C 1px, transparent 1.5px) 0 0 / 22px 22px,
    #1B1B1F;
  display: flex; align-items: center; justify-content: center;
}
.progress {
  position: absolute; top: 0; left: 0; height: 2px;
  background: var(--select);
  width: 0;
  transition: width .35s ease;
  z-index: 20;
}
.deck-holder { position: relative; }
#deck {
  width: calc(var(--SW) * 1px);
  height: calc(var(--SH) * 1px);
  transform-origin: center center;
  position: relative;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 2px 0 rgba(255,255,255,.04);
  background: var(--paper);
}

/* click nav zones */
.nav-zone { position: absolute; top: 0; bottom: 0; width: 18%; z-index: 1; }
.deck-holder { z-index: 10; }
.nav-zone.prev { left: 0; cursor: w-resize; }
.nav-zone.next { right: 0; cursor: e-resize; }

/* nav arrows (hover reveal) */
.nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 16;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(23,23,26,.85); color: #fff;
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s ease;
}
.nav-arrow.prev { left: 14px; } .nav-arrow.next { right: 14px; }
.stage:hover .nav-arrow { opacity: .9; }
.nav-arrow:hover { background: var(--select); }

/* ============================================================
   SLIDES · designed at 1280x720
   ============================================================ */

.slide {
  position: absolute; inset: 0;
  background: var(--paper);
  color: var(--ink);
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateX(60px);
  transition: opacity .45s cubic-bezier(.2,.6,.2,1), transform .45s cubic-bezier(.2,.6,.2,1), visibility 0s linear .45s;
}
.slide.active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .45s cubic-bezier(.2,.6,.2,1), transform .45s cubic-bezier(.2,.6,.2,1);
  z-index: 5;
}
.slide.leaving { opacity: 0; visibility: visible; z-index: 4; }
.deck-back .slide { transform: translateX(-60px); }
.deck-back .slide.leaving { transform: translateX(60px); }
.deck-fwd .slide.leaving { transform: translateX(-60px); }
.slide.active.leaving { opacity: 0; }
.slide[data-transition="fade"] { transform: none !important; }
.slide[data-transition="zoom"] { transform: scale(.94); }
.slide[data-transition="zoom"].active { transform: scale(1); }
body.reduced .slide { transform: none !important; transition-duration: .01s !important; }

/* in-slide build animation */
.slide .b { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--b, 0) * 90ms + 180ms); }
.slide.active .b { opacity: 1; transform: none; }
body.reduced .slide .b { transition: none; opacity: 1; transform: none; }

/* --- slide furniture --- */
.sl-pad { padding: 64px 76px 44px; height: 100%; display: flex; flex-direction: column; }
.kicker {
  font: 500 13px/1 var(--f-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--tri-blue);
  display: flex; align-items: center; gap: 10px;
}
.kicker { margin-bottom: 24px; }
.s-divider .kicker { margin-bottom: 0; }
.kicker::after { content: ""; height: 1px; width: 46px; background: var(--tri-blue); opacity: .4; }
.sl-foot {
  margin-top: auto;
  padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  font: 11px var(--f-mono); color: var(--ink-3);
  letter-spacing: .08em; text-transform: uppercase;
}
h1.sl-title { font: 800 76px/1.02 var(--f-display); letter-spacing: -.025em; }
h2.sl-h { font: 800 46px/1.08 var(--f-display); letter-spacing: -.02em; }
.sl-sub { font: 400 21px/1.55 var(--f-body); color: var(--ink-2); max-width: 640px; }
.mark { position: relative; white-space: nowrap; display: inline-block; }
.mark i { position: relative; z-index: 1; font-style: normal; }
.mark::before, .mark::after {
  content: ""; position: absolute; z-index: 0;
  background: var(--tri-blue);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .7s cubic-bezier(.6,0,.2,1);
}
.mark::before {
  left: -2%; right: -3%; top: 46%; bottom: -4%;
  opacity: .32; border-radius: 6px 14px 4px 12px / 12px 5px 14px 6px;
  transform: scaleX(0) rotate(-1deg);
  transition-delay: .7s;
}
.mark::after {
  left: -1%; right: -4%; top: 62%; bottom: 2%;
  opacity: .3; border-radius: 12px 4px 10px 5px / 5px 12px 4px 10px;
  transform: scaleX(0) rotate(.6deg);
  transition-delay: .95s;
}
.slide.active .mark::before { transform: scaleX(1) rotate(-1deg); }
.slide.active .mark::after { transform: scaleX(1) rotate(.6deg); }
body.reduced .mark::before, body.reduced .mark::after { transition: none; transform: scaleX(1); }
.blue { color: var(--tri-blue); }

/* title slide */
.s-title .sl-pad { justify-content: center; gap: 24px; padding-top: 120px; }
.s-title .logo-wrap { width: 250px; transition: transform .5s cubic-bezier(.3,1.6,.4,1); }
.s-title .logo-wrap.bigger { transform: scale(1.6); }
.s-title h1 { font-size: 70px; max-width: 900px; }
.s-title .press-hint { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-3); font: 13px var(--f-mono); }
.press-hint .key {
  border: 1px solid var(--slide-line); border-bottom-width: 2px; border-radius: 5px;
  padding: 3px 9px; font: 12px var(--f-mono); color: var(--ink-2);
  animation: keypulse 2.2s ease infinite;
}
@keyframes keypulse { 0%,100% { transform: none; } 50% { transform: translateY(2px); } }
body.reduced .press-hint .key { animation: none; }

/* agenda */
.agenda { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 48px; margin-top: 40px; }
.agenda button {
  display: flex; align-items: center; gap: 16px; text-align: left;
  padding: 14px 12px; border-bottom: 1px solid var(--slide-line); border-radius: 8px 8px 0 0;
  font: 600 22px var(--f-display); color: var(--ink);
  transition: color .15s ease, background .15s ease;
}
.agenda button:hover { color: var(--tri-blue); background: rgba(33,161,164,.07); }
.agenda .no { font: 11px var(--f-mono); color: var(--ink-3); }
.agenda .pg { margin-left: auto; font: 11px var(--f-mono); color: var(--ink-3); }

/* big statement */
.s-statement { background: var(--ink); }
.s-statement .sl-pad { justify-content: center; align-items: center; text-align: center; gap: 30px; }
.s-statement h2 { font: 800 96px/1 var(--f-display); letter-spacing: -.03em; color: #fff; }
.s-statement .sl-sub { color: rgba(255,255,255,.62); margin: 0 auto; }
.s-statement .sl-foot { color: rgba(255,255,255,.38); width: 100%; }
.s-statement .kicker::after { display: none; }
.s-statement .rejected { color: #6E6E78; }

/* logo wall */
.logo-wall {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--slide-line); border-left: 1px solid var(--slide-line);
}
.logo-cell {
  border-right: 1px solid var(--slide-line); border-bottom: 1px solid var(--slide-line);
  height: 108px; display: flex; align-items: center; justify-content: center;
  padding: 20px 40px;
  filter: grayscale(1) contrast(.9);
  opacity: .78;
  transition: filter .2s ease, opacity .2s ease;
}
.logo-cell:hover { filter: none; opacity: 1; }
.logo-cell img { max-height: 42px; width: auto; max-width: 100%; object-fit: contain; }
.logo-cell.you { font: 600 15px var(--f-display); color: var(--ink-3); letter-spacing: .02em; filter: none; }
.logo-cell.you:hover { color: var(--tri-blue); }

/* card grids */
.cards { display: grid; gap: 18px; margin-top: 40px; }
.cards.c4 { grid-template-columns: repeat(4, 1fr); }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c2 { grid-template-columns: repeat(2, 1fr); }
.dcard {
  border: 1px solid var(--slide-line); border-radius: 10px;
  padding: 24px 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.dcard .tag { font: 500 10.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tri-blue); }
.dcard h3 { font: 700 21px var(--f-display); letter-spacing: -.01em; }
.dcard p { font: 14.5px/1.55 var(--f-body); color: var(--ink-2); }
.dcard ul { list-style: none; display: grid; gap: 8px; }
.dcard li { font: 14.5px/1.45 var(--f-body); color: var(--ink-2); padding-left: 16px; position: relative; }
.dcard li::before { content: "→"; position: absolute; left: 0; color: var(--tri-blue); font-size: 12px; top: 2px; }
.dcard li strong { color: var(--ink); font-weight: 600; }

/* process */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 46px; position: relative; }
.steps::before { content: ""; position: absolute; top: 17px; left: 4%; right: 4%; height: 1px; background: var(--slide-line); }
.stp { position: relative; display: flex; flex-direction: column; gap: 12px; }
.stp .dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--ink);
  font: 600 12px var(--f-mono);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.stp:last-child .dot { background: var(--tri-blue); border-color: var(--tri-blue); color: #fff; }
.stp h3 { font: 700 18px var(--f-display); }
.stp p { font: 13.5px/1.5 var(--f-body); color: var(--ink-2); }

/* dividers (full-bleed image) */
.s-divider { background: var(--ink); color: #fff; }
.s-divider .bleed {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .92;
}
.s-divider .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(10deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.1) 100%);
}
.s-divider .sl-pad { position: relative; z-index: 2; justify-content: flex-end; gap: 14px; }
.s-divider .case-no { font: 500 13px var(--f-mono); letter-spacing: .18em; color: #fff; opacity: .85; }
.s-divider h2 { font: 800 74px/1 var(--f-display); letter-spacing: -.02em; color: #fff; }
.s-divider .meta-row { display: flex; gap: 26px; font: 12px var(--f-mono); letter-spacing: .06em; color: rgba(255,255,255,.75); text-transform: uppercase; }

/* case layouts */
.s-case .sl-pad { gap: 0; }
.case-split { display: grid; grid-template-columns: 460px 1fr; gap: 52px; align-items: center; flex: 1; min-height: 0; }
.case-split.rev { grid-template-columns: 1fr 460px; }
.case-copy { display: flex; flex-direction: column; gap: 18px; }
.case-copy p { font: 16.5px/1.6 var(--f-body); color: var(--ink-2); }
.case-copy p strong { color: var(--ink); font-weight: 600; }
.case-media {
  position: relative; height: 100%; min-height: 0;
  display: flex; align-items: center; justify-content: center;
}
.shot-frame {
  position: relative;
  border: 1px solid var(--slide-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(16,16,19,.14);
  max-height: 100%;
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; }
.shot-frame .shot-tag {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(16,16,19,.82); color: #fff;
  font: 10px var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 4px;
}
.stat-big { display: flex; flex-direction: column; gap: 4px; }
.stat-big .n { font: 800 64px/1 var(--f-display); letter-spacing: -.03em; color: var(--tri-blue); }
.stat-big .d { font: 13px var(--f-mono); color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }

.media-stack { display: grid; gap: 14px; height: 100%; min-height: 0; }
.media-stack.two-row { grid-template-rows: auto 1fr; }
.media-full { flex: 1; min-height: 0; display: flex; margin-top: 34px; }
.media-full .shot-frame { width: 100%; }
.media-full img { object-fit: cover; width: 100%; }

/* quote grid */
.quotes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.qcard { border: 1px solid var(--slide-line); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.qcard blockquote { font: 500 13.5px/1.5 var(--f-display); letter-spacing: -.005em; }
.qcard cite { font: 10px var(--f-mono); font-style: normal; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.qcard .stars { color: var(--tri-blue); font-size: 11px; letter-spacing: 3px; }

/* team */
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 38px; flex: 1; min-height: 0; }
.tcard { display: grid; grid-template-columns: 268px 1fr; gap: 24px; border: 1px solid var(--slide-line); border-radius: 12px; overflow: hidden; }
.tcard .photo { height: 100%; }
.tcard .photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.tcard .bio { padding: 24px 24px 24px 0; display: flex; flex-direction: column; gap: 8px; }
.tcard h3 { font: 800 30px var(--f-display); letter-spacing: -.02em; }
.tcard .role { font: 11px var(--f-mono); color: var(--tri-blue); letter-spacing: .12em; text-transform: uppercase; }
.tcard .loc { font: 11px var(--f-mono); color: var(--ink-3); }
.tcard p { font: 13.5px/1.55 var(--f-body); color: var(--ink-2); }

/* CTA slide */
.s-cta { background: var(--ink); color: #fff; }
.s-cta h2 { font: 800 72px/1.04 var(--f-display); letter-spacing: -.025em; max-width: 950px; }
.s-cta .sl-sub { color: rgba(255,255,255,.65); }
.cta-actions { display: flex; flex-wrap: wrap; margin-top: 10px; position: relative; z-index: 3; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--tri-blue); color: #fff;
  font: 700 16px var(--f-display);
  padding: 16px 26px; border-radius: 8px;
  margin: 0 14px 14px 0;
  white-space: nowrap;
  transition: transform .15s ease, filter .15s ease;
}
.cta-btn:hover { transform: translateY(-2px); filter: brightness(1.12); }
.cta-btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.cta-btn.ghost:hover { border-color: #fff; }
.s-cta .sl-foot { color: rgba(255,255,255,.4); }
.s-cta .logo-foot img { height: 22px; opacity: .9; }

/* ============================================================
   WORKING VIEW · the mess under every slide
   ============================================================ */

.wk { display: none; }
body.working .wk { display: block; }
body.working #deck { box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 2px var(--guide); }

/* safe margins + columns */
.slide .guides { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
body.working .slide .guides::before {
  content: ""; position: absolute; inset: 40px 56px;
  border: 1px dashed color-mix(in srgb, var(--guide) 55%, transparent);
}
body.working .slide .guides::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, transparent calc(33.33% - .5px), color-mix(in srgb, var(--guide) 30%, transparent) calc(33.33% - .5px), color-mix(in srgb, var(--guide) 30%, transparent) calc(33.33% + .5px), transparent calc(33.33% + .5px)),
    linear-gradient(to right, transparent calc(66.66% - .5px), color-mix(in srgb, var(--guide) 30%, transparent) calc(66.66% - .5px), color-mix(in srgb, var(--guide) 30%, transparent) calc(66.66% + .5px), transparent calc(66.66% + .5px));
}
body.working .slide [class*="s-"] {}

/* element outlines */
body.working .dcard, body.working .qcard, body.working .tcard,
body.working .shot-frame, body.working .logo-cell {
  outline: 1px solid color-mix(in srgb, var(--select) 55%, transparent);
  outline-offset: 2px;
}

/* stickies */
.sticky-note {
  position: absolute;
  width: 168px;
  background: var(--sticky);
  color: #1B1500;
  font: 500 12.5px/1.45 var(--f-body);
  padding: 14px 14px 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,.22);
  transform: rotate(var(--rot, -2deg));
  z-index: 35;
}
.sticky-note::before {
  content: ""; position: absolute; top: -9px; left: 50%; transform: translateX(-50%) rotate(1deg);
  width: 58px; height: 16px;
  background: rgba(255,255,255,.55);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.sticky-note .who { display: block; margin-top: 8px; font: 10px var(--f-mono); opacity: .6; }

/* rejected / approved text */
.rejected { position: relative; color: var(--ink-3); margin-right: 14px; display: none; }
.rejected::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 52%;
  height: 4px; background: var(--laser); transform: rotate(-1.5deg); border-radius: 2px;
}
body.working .rejected { display: inline; }

/* version pill */
.ver-pill {
  position: absolute; top: 18px; right: 20px; z-index: 35;
  display: flex; gap: 6px; align-items: center;
  font: 10px var(--f-mono);
}
.ver-pill span { background: #EFEFF4; color: var(--ink-3); padding: 3px 8px; border-radius: 20px; }
.ver-pill span.cur { background: var(--select); color: #fff; }
.ver-pill span.dead { text-decoration: line-through; }

/* comment pins */
.pin {
  position: absolute; z-index: 40;
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: 28px; height: 28px;
  border-radius: 50% 50% 50% 4px;
  background: var(--warn);
  color: #1B1500;
  font: 700 12px var(--f-body);
  display: none; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transform: rotate(-45deg);
}
.pin > i { transform: rotate(45deg); font-style: normal; }
body.working .pin { display: flex; }
.pin.open { background: var(--select); color: #fff; }
.pin-pop {
  position: absolute; z-index: 45;
  width: 250px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--slide-line);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(16,16,19,.22);
  padding: 12px;
  font: 13px/1.5 var(--f-body);
}
.pin-pop .msg { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 6px 2px; }
.pin-pop .msg + .msg { border-top: 1px solid var(--slide-line); margin-top: 4px; padding-top: 10px; }
.pin-pop .av { width: 24px; height: 24px; border-radius: 50%; background-size: cover; background-position: top center; }
.pin-pop .who { font: 600 11px var(--f-body); }
.pin-pop .when { font: 9.5px var(--f-mono); color: var(--ink-3); margin-left: 6px; }
.pin-pop .txt { color: var(--ink-2); }
.pin-pop .resolve { margin-top: 8px; font: 600 11px var(--f-body); color: var(--select); }
.pin-pop .resolve:hover { text-decoration: underline; }

/* backstage-native slide */
.s-backstage { background: #F4F4F7; }
.s-backstage .board { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin-top: 30px; flex: 1; min-height: 0; }
.polaroid {
  background: #fff; padding: 10px 10px 14px;
  box-shadow: 0 12px 30px rgba(16,16,19,.16);
  transform: rotate(var(--rot, 0deg));
  border-radius: 3px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 0;
}
.polaroid img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 2px; }
.polaroid figcaption { font: 11px var(--f-mono); color: var(--ink-2); }

/* ============================================================
   NOTES DRAWER
   ============================================================ */

.notes {
  position: absolute; left: 0; right: 0; bottom: 0;
  transform: translateY(calc(100% - 30px));
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
  z-index: 30;
}
.notes.open { transform: none; }
.notes .pull {
  margin: 0 auto;
  width: 240px; height: 30px;
  background: var(--chrome-2);
  border: 1px solid var(--chrome-line); border-bottom: 0;
  border-radius: 10px 10px 0 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--chrome-dim);
  cursor: pointer;
}
.notes .pull:hover { color: #fff; }
.notes .pull .chev { transition: transform .3s ease; }
.notes.open .pull .chev { transform: rotate(180deg); }
.notes .paper {
  background: var(--chrome-2);
  border-top: 1px solid var(--chrome-line);
  padding: 18px 26px 22px;
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
}
.notes .label {
  font: 10px var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--warn);
  border: 1px solid var(--warn);
  padding: 4px 8px; border-radius: 4px;
  white-space: nowrap;
}
.notes .txt { font: 14.5px/1.65 var(--f-body); color: var(--chrome-text); max-width: 900px; }
.notes .txt em { color: #fff; font-style: normal; font-weight: 600; }

/* ============================================================
   STATUS BAR
   ============================================================ */

.statusbar {
  grid-area: statusbar;
  display: flex; align-items: center; gap: 20px;
  padding: 0 14px;
  background: var(--chrome-2);
  border-top: 1px solid var(--chrome-line);
  font: 11px var(--f-mono);
  color: var(--chrome-dim);
  user-select: none;
  position: relative; z-index: 55;
}
.statusbar .counter { color: #fff; }
.statusbar .counter b { color: var(--select); font-weight: 500; }
.statusbar .save { display: flex; align-items: center; gap: 6px; }
.statusbar .save .led { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: led 3s ease infinite; }
@keyframes led { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.statusbar .spacer { flex: 1; }
.statusbar .hint { display: flex; gap: 14px; }
.statusbar .hint span b { color: var(--chrome-text); font-weight: 500; }
.statusbar .timer.on { color: var(--warn); }
.statusbar .mode-ind { color: var(--guide); display: none; }
body.working .statusbar .mode-ind { display: inline; }

/* ============================================================
   GHOST COLLABORATORS
   ============================================================ */

.gcursor {
  position: absolute; z-index: 48;
  pointer-events: none;
  transition: opacity .4s ease;
  will-change: transform;
}
.gcursor svg { display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.gcursor .tag {
  position: absolute; top: 18px; left: 14px;
  white-space: nowrap;
  font: 500 10.5px var(--f-body);
  color: #fff;
  padding: 3px 9px; border-radius: 20px;
}
.gcursor.masha .tag { background: #E0489B; }
.gcursor.alex .tag { background: #0FA573; }
.gcursor .bubble {
  position: absolute; top: 42px; left: 14px;
  width: max-content; max-width: 240px;
  background: #fff; color: var(--ink);
  font: 12.5px/1.45 var(--f-body);
  border-radius: 10px 10px 10px 3px;
  padding: 9px 12px;
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
  opacity: 0; transform: translateY(4px) scale(.96);
  transition: opacity .25s ease, transform .25s ease;
}
.gcursor .bubble.show { opacity: 1; transform: none; }

/* ============================================================
   OVERLAYS
   ============================================================ */

.blank-screen { position: fixed; inset: 0; z-index: 200; display: none; }
.blank-screen.black { background: #000; }
.blank-screen.white { background: #fff; }
.blank-screen.show { display: block; }

.laser-canvas { position: fixed; inset: 0; z-index: 190; pointer-events: none; display: none; }
body.laser .laser-canvas { display: block; }
body.laser .stage { cursor: none; }

/* toasts */
.toasts { position: fixed; bottom: 44px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #232329; color: #fff;
  border: 1px solid var(--chrome-line);
  font: 12.5px var(--f-body);
  padding: 10px 18px; border-radius: 30px;
  box-shadow: 0 12px 34px rgba(0,0,0,.5);
  animation: toast-in .25s ease;
}
.toast .k { color: var(--sticky); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* help overlay */
.overlay {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(10,10,12,.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
}
.overlay.show { display: flex; }
.sheet {
  background: #202026; border: 1px solid var(--chrome-line);
  border-radius: 14px;
  width: min(640px, 92vw); max-height: 84vh; overflow: auto;
  padding: 28px 30px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
.sheet h2 { font: 700 20px var(--f-display); color: #fff; margin-bottom: 4px; }
.sheet .sub { font: 13px var(--f-body); color: var(--chrome-dim); margin-bottom: 20px; }
.keys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 30px; }
.keyrow { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--chrome-line); font: 13px var(--f-body); color: var(--chrome-text); }
.keyrow .kb { display: flex; gap: 5px; }
.kb kbd {
  font: 11px var(--f-mono); color: #fff;
  background: var(--chrome-3); border: 1px solid #3D3D46; border-bottom-width: 2px;
  padding: 3px 8px; border-radius: 5px;
}
.sheet .close-x { position: sticky; float: right; top: 0; font-size: 18px; color: var(--chrome-dim); }
.sheet .close-x:hover { color: #fff; }

/* about modal */
.about-logo { height: 34px; width: auto; margin-bottom: 16px; }
.about-rows { display: grid; gap: 8px; font: 13px var(--f-body); color: var(--chrome-text); }
.about-rows b { color: #fff; font-weight: 600; }
.about-fine { margin-top: 18px; font: 11px var(--f-mono); color: var(--chrome-dim); line-height: 1.7; }

/* sorter */
.sorter {
  position: fixed; inset: 0; z-index: 240;
  background: rgba(16,16,19,.97);
  display: none;
  overflow: auto;
  padding: 40px;
}
.sorter.show { display: block; }
.sorter h2 { font: 700 15px var(--f-display); color: #fff; margin-bottom: 20px; display: flex; justify-content: space-between; }
.sorter h2 span { font: 11px var(--f-mono); color: var(--chrome-dim); }
.sorter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.sorter-cell { cursor: pointer; }
.sorter-cell .shot {
  aspect-ratio: 16/9; background: var(--paper); border-radius: 6px; overflow: hidden;
  border: 2px solid transparent; position: relative;
  transition: transform .15s ease, border-color .15s ease;
}
.sorter-cell:hover .shot { transform: translateY(-3px); border-color: var(--chrome-dim); }
.sorter-cell.active .shot { border-color: var(--select); }
.sorter-cell .shot .mini { width: calc(var(--SW) * 1px); height: calc(var(--SH) * 1px); transform-origin: top left; pointer-events: none; position: absolute; }
.sorter-cell .cap { font: 10.5px var(--f-mono); color: var(--chrome-dim); margin-top: 7px; display: flex; justify-content: space-between; }

/* boot loader */
.boot {
  position: fixed; inset: 0; z-index: 400;
  background: var(--chrome);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot img { height: 40px; }
.boot .bar { width: 280px; height: 3px; background: var(--chrome-3); border-radius: 2px; overflow: hidden; }
.boot .bar i { display: block; height: 100%; width: 0; background: var(--select); transition: width .3s ease; }
.boot .step { font: 11.5px var(--f-mono); color: var(--chrome-dim); min-height: 18px; }
.boot .skip { font: 10px var(--f-mono); color: var(--chrome-dim); letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.boot .skip:hover { color: #fff; opacity: 1; }

/* ============================================================
   RESPONSIVE + PRINT
   ============================================================ */

@media (max-width: 900px) {
  #app { grid-template-columns: 0 1fr; }
  .filmstrip { display: none; }
  .menus, .filename { display: none; }
  .app-id .ver { display: none; }
  .statusbar .hint { display: none; }
  .notes .pull { width: 190px; }
}

@media print {
  body { overflow: visible; background: #fff; }
  .titlebar, .statusbar, .filmstrip, .notes, .nav-zone, .nav-arrow, .progress,
  .gcursor, .toasts, .overlay, .sorter, .boot, .blank-screen, .laser-canvas, .pin, .sticky-note, .ver-pill { display: none !important; }
  #app { display: block; height: auto; }
  .stage { display: block; background: #fff; overflow: visible; }
  #deck { transform: none !important; width: 100%; height: auto; box-shadow: none; }
  .slide {
    position: relative; inset: auto;
    opacity: 1 !important; visibility: visible !important; transform: none !important;
    width: 100%; aspect-ratio: 16/9;
    page-break-after: always;
    border: 1px solid #ddd; border-radius: 0;
    margin-bottom: 4mm;
  }
  .slide .b { opacity: 1; transform: none; }
}


/* ============ mini data-viz (slides 5 & 8) ============ */
.viz { height: 70px; display: flex; align-items: flex-end; }
.viz svg { width: 150px; height: 66px; overflow: visible; }
.viz .d {
  fill: none;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  transition: stroke-dashoffset .9s cubic-bezier(.3,.5,.2,1);
  transition-delay: calc(var(--b, 0) * 90ms + 480ms);
}
.slide.active .viz .d { stroke-dashoffset: 0; }
.viz .f { opacity: 0; transition: opacity .5s ease; transition-delay: calc(var(--b, 0) * 90ms + 1150ms); }
.slide.active .viz .f { opacity: 1; }
body.reduced .viz .d { stroke-dashoffset: 0; transition: none; }
body.reduced .viz .f { opacity: 1; transition: none; }

/* ============ combined services slide ============ */
.svc-list { margin-top: 36px; border-top: 1px solid var(--slide-line); }
.svc-row {
  display: grid; grid-template-columns: 54px 400px 1fr;
  gap: 26px; padding: 17px 0 16px;
  border-bottom: 1px solid var(--slide-line);
  align-items: center;
}
.svc-row .svc-no { font: 500 12px var(--f-mono); color: var(--tri-blue); letter-spacing: .1em; }
.svc-row h3 { font: 700 19px var(--f-display); letter-spacing: -.01em; }
.svc-row .svc-sub { font: 12.5px var(--f-body); color: var(--ink-3); margin-top: 2px; }
.svc-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 8px; justify-content: flex-end; }
.svc-chips li {
  font: 500 13px var(--f-body); color: var(--ink-2);
  border: 1px solid var(--slide-line); border-radius: 30px;
  padding: 7px 14px;
  transition: border-color .15s ease, color .15s ease;
}
.svc-chips li:hover { border-color: var(--tri-blue); color: var(--tri-blue); }

/* ============ focus visibility ============ */
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; border-radius: 4px; }

/* ============ forced landscape on portrait phones ============ */
@media screen and (max-width: 920px) and (orientation: portrait) {
  body {
    position: absolute; top: 100%; left: 0;
    width: 100vh; height: 100vw;
    transform: rotate(-90deg); transform-origin: left top;
    overflow: hidden;
  }
}


/* live-site links inside case slides */
.site-link {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  font: 500 13px var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--tri-blue);
  border-bottom: 1.5px solid var(--tri-blue);
  padding-bottom: 3px;
  transition: gap .15s ease, filter .15s ease;
}
.site-link:hover { gap: 12px; filter: brightness(.85); }
