/* The deck: a navy shaded master, Times New Roman and Arial, WordArt, hard drop shadows. */
:root {
  --times: "Times New Roman", Tinos, Times, serif;
  --arial: Arial, Arimo, "Helvetica Neue", Helvetica, sans-serif;
  --ui: Tahoma, "Segoe UI", Arimo, Arial, sans-serif;
  --gold: linear-gradient(90deg, #8a6400, #ffe680 30%, #c9960f 60%, #fff2b0 80%, #8a6400);
  --face: #c0c0c0;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--arial); color: #fff; -webkit-tap-highlight-color: transparent; }
body.wait, body.wait * { cursor: wait !important; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ------------------------------------------------ the old window look */
.win { background: var(--face); color: #000; font: 12px/1.3 var(--ui);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff; padding: 3px; }
.win-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 20px; padding: 0 3px 0 6px;
  background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font: bold 12px/20px var(--ui); white-space: nowrap; overflow: hidden; }
.win-btns { display: flex; gap: 2px; }
.win-btns i { width: 16px; height: 14px; display: grid; place-items: center; font: bold 10px/1 var(--ui); font-style: normal; color: #000; background: var(--face);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080; }
.w98 { min-width: 75px; height: 23px; padding: 0 12px; border: 0; background: var(--face); color: #000; font: 12px var(--ui); cursor: pointer;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.w98:active { box-shadow: inset 1px 1px #0a0a0a, inset -1px -1px #fff, inset 2px 2px #808080, inset -2px -2px #dfdfdf; }
.w98:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }

/* ------------------------------------------------ loading */
#loader { position: fixed; inset: 0; z-index: 50; background: #000; display: grid; place-items: center; transition: opacity .25s; }
#loader.gone { opacity: 0; pointer-events: none; }
.dlg { width: min(340px, calc(100vw - 32px)); }
.dlg-body { display: flex; gap: 14px; align-items: center; padding: 16px 14px 14px; }
.hourglass { width: 22px; height: 30px; flex: none; animation: flip 1.6s steps(1) infinite; }
@keyframes flip { 50% { transform: rotate(180deg); } }
.dlg-text { flex: 1; min-width: 0; }
.dlg-text p { margin: 0 0 8px; }
.progress { height: 18px; padding: 2px; background: #fff; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #0a0a0a; }
#loader-bar { width: 0; height: 100%; transition: width .2s steps(4);
  background: repeating-linear-gradient(90deg, #000080 0 9px, transparent 9px 11px); }
.dlg-text .w98 { margin-top: 10px; }

/* ------------------------------------------------ the show */
#show { position: fixed; inset: 0; background: #000; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default; outline: none; }
#frame { position: absolute; overflow: hidden; background: #000; }
#scaler { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#pen { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 5; }
.pen-on #show, .pen-on #show * { cursor: crosshair; }
#blank { position: fixed; inset: 0; z-index: 8; display: none; }
#blank.on { display: block; }
#blank.black { background: #000; }
#blank.white { background: #fff; }
#endscreen { position: fixed; inset: 0; z-index: 9; background: #000; cursor: default; }
#endscreen p { margin: 0; padding: 14px 16px; font: 16px/1.3 var(--arial); color: #fff; text-align: center; }

#showbar { position: fixed; left: max(8px, env(safe-area-inset-left)); bottom: max(8px, env(safe-area-inset-bottom)); z-index: 7;
  display: flex; gap: 3px; opacity: 0; transition: opacity .4s; }
#showbar.awake, #showbar:focus-within { opacity: .85; }
#showbar.touch { opacity: .55; }
#showbar button { width: 26px; height: 22px; padding: 2px 4px; border: 1px solid rgba(255,255,255,.35); border-radius: 0; background: rgba(40,40,40,.55); cursor: pointer; }
#showbar.touch button { width: 40px; height: 34px; }
#showbar button svg { width: 100%; height: 100%; fill: #fff; stroke: #fff; stroke-width: .8; }
#showbar button[data-cmd="pen"] svg { fill: none; stroke-width: 1.3; }
#showbar button[aria-pressed="true"] { background: rgba(160,20,20,.7); }
#showbar button:hover { background: rgba(90,90,90,.8); }

/* ------------------------------------------------ the master slide */
.slide { position: absolute; left: 0; top: 0; width: var(--W); height: var(--H); overflow: hidden; background: var(--master, #0d1b80);
  display: flex; flex-direction: column; padding: 30px 64px 34px; color: #fff; }
.slide-black { background: #000; }
.veil { position: absolute; inset: 0; background: #000; z-index: 4; pointer-events: none; }
.slide .off { visibility: hidden; }

.s-title { flex: none; height: 104px; display: flex; align-items: center; justify-content: center; text-align: center; }
.t-text { margin: 0; font-weight: 700; line-height: 1.04; letter-spacing: 0; text-shadow: 3px 3px 0 #00051f; }
.t-text .w { white-space: nowrap; display: inline-block; }
.font-times { font-family: var(--times); color: #fff; }
.font-arial { font-family: var(--arial); color: #ffe94d; }
.s-rule { flex: none; height: 5px; margin: 6px 6px 18px; background: var(--gold); box-shadow: 2px 2px 0 #00051f; }
.s-pic { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 14px 14px 0; }
.s-pic img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; border: 3px solid #fff; box-shadow: 12px 12px 0 rgba(0, 3, 20, .78); background: #000; }
.s-foot { flex: none; height: 62px; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.s-client { font: 700 22px/1.1 var(--arial); letter-spacing: .14em; color: #c9d3ff; text-shadow: 2px 2px 0 #00051f; }

.wa-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.wa-wrap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wa-tilt svg { transform: perspective(520px) rotateX(24deg); transform-origin: 50% 80%; }

/* the action button: chunky bevel, like the program drew them */
.action { display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 22px 0 14px; cursor: pointer;
  background: #2b47c9; color: #fff; font: 700 22px/1 var(--arial); text-shadow: 1px 1px 0 #00051f;
  border: 6px solid; border-color: #8ea2ff #0a1660 #0a1660 #8ea2ff; border-radius: 0; }
.action svg { width: 30px; height: 30px; flex: none; }
.action:active { border-color: #0a1660 #8ea2ff #8ea2ff #0a1660; }
.action:focus-visible { outline: 3px dotted #ffe94d; outline-offset: 4px; }

/* title slide */
.slide-title { justify-content: center; align-items: center; padding: 40px; }
.s-wordart { width: 940px; height: 360px; }

/* about slide: the bullet slide */
.slide-about .bullets { list-style: none; margin: 8px 0 0; padding: 0 30px; display: grid; gap: 22px; align-content: start; }
.slide-about li { position: relative; padding-left: 46px; font: 30px/1.25 var(--arial); text-shadow: 2px 2px 0 #00051f; }
.slide-about li::before { content: ""; position: absolute; left: 4px; top: .42em; width: 16px; height: 16px; background: #ffe94d; box-shadow: 2px 2px 0 #00051f; }
.slide-about a { color: #9fd2ff; text-decoration: underline; pointer-events: auto; }

/* portrait page setup on a phone */
.slide.pt { padding: 40px 24px 36px; justify-content: center; }
.pt .s-title { height: auto; min-height: 170px; }
.pt .s-title.has-wa { height: 220px; }
.pt .s-rule { margin: 14px 8px 34px; height: 6px; }
.pt .s-pic { flex: none; height: 400px; padding: 0 16px 16px 0; }
.pt .s-foot { height: auto; margin-top: 44px; flex-direction: column; gap: 36px; }
.pt .s-client { font-size: 30px; }
.pt .action { height: 100px; padding: 0 40px 0 26px; font-size: 38px; gap: 18px; border-width: 9px; }
.pt .action svg { width: 48px; height: 48px; }
.slide-title.pt { padding: 30px; }
.pt .s-wordart { width: 660px; height: 560px; }
.slide-about.pt li { font-size: 38px; padding-left: 54px; }
.slide-about.pt li::before { width: 20px; height: 20px; }
.slide-about.pt .bullets { gap: 30px; padding: 0 16px; }
.s-title.has-wa { height: 118px; }

/* ------------------------------------------------ popup menu */
#menu { position: fixed; z-index: 30; min-width: 190px; max-width: calc(100vw - 8px); max-height: calc(100vh - 8px); overflow: auto; padding: 3px; }
#menu .mi { display: flex; align-items: center; width: 100%; min-height: 22px; padding: 2px 6px 2px 2px; border: 0; background: none; color: #000; font: 12px var(--ui); text-align: left; cursor: default; white-space: nowrap; }
#menu .mi:hover, #menu .mi:focus { background: #000080; color: #fff; outline: none; }
.mi-check { width: 18px; text-align: center; flex: none; }
.mi-label { flex: 1; }
.mi-more { width: 14px; text-align: right; flex: none; }
#menu .sep { height: 2px; margin: 3px 2px; border-top: 1px solid #808080; border-bottom: 1px solid #fff; }
@media (hover: none) { #menu .mi { min-height: 36px; font-size: 14px; } }

/* ------------------------------------------------ help */
#help { position: fixed; z-index: 40; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); display: flex; flex-direction: column; }
.help-body { padding: 10px; overflow: auto; }
.help-body table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; }
.help-body td { padding: 4px 8px; vertical-align: top; border-bottom: 1px solid #e4e4e4; }
.help-body td:first-child { width: 55%; }
.help-ok { display: flex; justify-content: flex-end; padding-top: 10px; }

/* ------------------------------------------------ slide sorter */
.app { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--face); color: #000; font: 12px var(--ui); }
.app > .win-title { flex: none; }
.toolbar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 6px; border-bottom: 1px solid #808080; box-shadow: 0 1px #fff; }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 0; background: var(--face); color: #000; font: 12px var(--ui); cursor: pointer;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.tb-btn svg { width: 20px; height: 16px; }
.tb-btn:active { box-shadow: inset 1px 1px #0a0a0a, inset -1px -1px #fff; }
.tb-field select { height: 24px; max-width: 46vw; font: 12px var(--ui); background: #fff; color: #000; border: 0; border-radius: 0;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #0a0a0a; padding: 0 4px; }
#sorter-pane { flex: 1; min-height: 0; overflow: auto; margin: 4px; padding: 16px; background: #fff; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #0a0a0a; outline: none; -webkit-overflow-scrolling: touch; }
#sorter-grid { display: grid; grid-template-columns: repeat(auto-fill, var(--tw, 210px)); justify-content: center; }
.thumb { width: var(--tw); outline: none; cursor: pointer; }
.thumb-slide { position: relative; width: var(--tw); height: var(--th); overflow: hidden; border: 1px solid #000; background: #000; box-shadow: 3px 3px 0 #808080; }
.thumb-scaler { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.thumb.sel .thumb-slide { outline: 3px solid #000; outline-offset: 2px; }
.thumb:focus-visible .thumb-slide { outline: 3px solid #000080; outline-offset: 2px; }
.thumb:hover .thumb-slide { box-shadow: 3px 3px 0 #404040; }
.thumb-meta { display: flex; align-items: center; justify-content: space-between; height: 26px; padding: 2px 2px 0; }
.tr-icon { width: 30px; height: 24px; padding: 3px 4px; border: 0; background: none; cursor: pointer; }
.tr-icon svg { width: 100%; height: 100%; display: block; }
.tr-icon:hover { box-shadow: inset -1px -1px #808080, inset 1px 1px #fff; background: #e6e6e6; }
.thumb-n { font: 12px var(--ui); color: #000; padding-right: 2px; }
.statusbar { flex: none; display: flex; gap: 2px; padding: 2px; }
.statusbar span { padding: 2px 8px; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statusbar span:first-child { flex: none; }
.statusbar span:last-child { flex: 1; min-width: 0; }

/* ------------------------------------------------ the case study, as a linked slide */
#cs { position: fixed; inset: 0; z-index: 25; background: var(--master, #0d1b80); }
#cs.opening { animation: boxout .5s linear; }
@keyframes boxout { from { clip-path: inset(50% 50%); } to { clip-path: inset(0 0); } }
#cs-scroll { position: absolute; inset: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.cs-page { width: min(1120px, 100%); margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 64px; }
.cs-head { display: flex; align-items: center; gap: 20px; padding-top: 10px; }
.cs-head .action { flex: none; height: 50px; padding: 0 16px 0 10px; font-size: 18px; border-width: 5px; gap: 8px; }
.cs-head .action svg { width: 24px; height: 24px; fill: #fff; }
.cs-titles { min-width: 0; }
#cs-title { margin: 0; font: 700 clamp(30px, 5vw, 54px)/1.05 var(--times); text-shadow: 3px 3px 0 #00051f; }
#cs-client { margin: 6px 0 0; font: 700 clamp(14px, 1.8vw, 18px)/1.2 var(--arial); letter-spacing: .14em; color: #c9d3ff; }
.cs-rule { height: 5px; margin: 16px 0 24px; background: var(--gold); box-shadow: 2px 2px 0 #00051f; }
#cs-body { --ab-fg: #fff; --ab-muted: #c9d3ff; --ab-accent: #ffe94d; --ab-chrome: 110px; --ab-gap: 18px; font: 18px/1.5 var(--arial); }
#cs-body .ab-lede { font: 22px/1.45 var(--times); max-width: 60ch; }
#cs-body .ab-heading { font: 700 30px/1.15 var(--times); color: #ffe94d; text-shadow: 2px 2px 0 #00051f; padding-left: 30px; position: relative; }
#cs-body .ab-heading::before { content: ""; position: absolute; left: 2px; top: .38em; width: 14px; height: 14px; background: #ffe94d; box-shadow: 2px 2px 0 #00051f; }
#cs-body .ab-text { max-width: 68ch; }
#cs-body .ab-frame { border: 3px solid #fff; box-shadow: 10px 10px 0 rgba(0, 3, 20, .78); }
#cs-body .ab-image img { border: 3px solid #fff; box-shadow: 10px 10px 0 rgba(0, 3, 20, .78); }
#cs-body .ab-zoom { padding: 0 10px 10px 0; }
#cs-body .ab-films { padding-right: 10px; }
#cs-body figcaption { font-family: var(--arial); }
#cs-body a { color: #9fd2ff; }
@media (max-width: 600px) {
  #sorter-pane { padding: 12px 8px; }
  .cs-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  #cs-body { font-size: 16px; }
  #cs-body .ab-lede { font-size: 19px; }
  #cs-body .ab-heading { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { #cs.opening { animation: none; } .hourglass { animation: none; } }
