:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --surface: #ffffff;
  --surface-2: #f5f5f3;
  --border: #e5e5e0;
  --accent: #ff6600;
  --accent-hover: #e55a00;
  --accent-ink: #c2410c;
  --on-accent: #ffffff;
  --danger: #c0362c;
  --success: #1e7a46;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px;
  --col: 720px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: #e6dccb;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}
#sim {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  display: block;
  image-rendering: pixelated;
}

/* ---------- article column ---------- */
#page { position: relative; z-index: 1; padding: max(320px, 52vh) 16px 120px; pointer-events: none; }
#unhide[hidden] { display: none; }
.column {
  pointer-events: auto;
  max-width: var(--col);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.985);
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: var(--r-lg);
  padding: 48px 56px 40px;
  box-shadow: 0 12px 40px rgba(40, 28, 10, 0.18);
  transition: opacity .35s ease, transform .35s ease;
}
body.article-hidden .column { opacity: 0; transform: translateY(16px); pointer-events: none; }
.prose h1 { font-size: 2.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 24px; }
.prose h2 { font-size: 1.6rem; font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; margin: 48px 0 14px; }
.prose h3 { font-size: 1.2rem; font-weight: 600; margin: 32px 0 8px; }
.prose p, .prose li { max-width: 66ch; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.3em; }
.prose li { margin: 0 0 8px; padding-left: 4px; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: #333; }
.prose a { color: var(--accent-ink); text-underline-offset: 2px; }
.prose strong { font-weight: 650; }
.muted { color: var(--muted); }
.label-caps { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-ink); }

.sim-note {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin: 0 0 36px;
  font-size: 15px;
}
.sim-note p { margin: 6px 0 12px; }
.sim-note-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 600;
  padding: 9px 14px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  line-height: 1.2;
}
.btn.sm { font-size: 13px; padding: 7px 10px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* When the article is minimized, "Show me" (primary) and "Show the article" (secondary) ride a dock.
   Web: the dock is fixed in the bottom-LEFT corner with the buttons side-by-side (Show me on the left).
   On touch the dock is transparent (display:contents) and the mobile rules below lay the buttons out as a
   3-up bottom bar alongside the Simulation panel's gear. */
#unhide-dock { display: contents; }
#unhide-add[hidden] { display: none; }
/* Share controls inside your own profile card (shown after "Show me"). */
.cc-share { display: flex; gap: 8px; margin-top: 10px; }
.cc-share-btn { flex: 1; min-width: 0; text-align: center; border: 2px solid #1a1a1a; background: #fff; color: #1a1a1a; padding: 10px 8px; font-family: var(--font-pixel); font-size: 9px; font-weight: 400; line-height: 1.5; letter-spacing: 0; cursor: pointer; text-decoration: none; box-shadow: 3px 3px 0 rgba(26,26,26,.85); } /* 8-bit like the page's .btn: pixel face + hard offset shadow */
.cc-share-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 rgba(26,26,26,.85); }
.cc-share-copy { background: #ff6600; color: #fff; }
.cc-share-co { display: none; } /* company card: share controls show only on the touch bottom-sheet (desktop hover cards auto-hide, and the address bar already holds the shareable URL) */
.cc-edit { display: block; width: 100%; text-align: center; background: none; border: 0; color: #2b6cb0; font-size: 12px; font-family: inherit; cursor: pointer; padding: 10px 0 2px; text-decoration: underline; }
/* "Add yourself to the expo" nudge on another reader's card. */
.cc-add { display: block; width: 100%; box-sizing: border-box; margin-top: 10px; text-align: center; border: 2px solid #1a1a1a; background: #ff6600; color: #fff; padding: 10px 8px; font-family: var(--font-pixel); font-size: 9px; font-weight: 400; line-height: 1.5; letter-spacing: 0; cursor: pointer; box-shadow: 3px 3px 0 rgba(26,26,26,.85); }
.cc-add:hover { background: #e95f00; }
.cc-add:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 rgba(26,26,26,.85); }

/* ---------- HUD ---------- */
#hud {
  position: fixed; z-index: 2; top: 14px; left: 14px;
  width: 232px;
  background: rgba(26, 26, 26, 0.9);
  color: #fff;
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 12px;
  pointer-events: none;
}
.hud-top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: var(--accent); color: #fff; border-radius: 6px; font-weight: 700; font-size: 19px; line-height: 1; flex: none; }
.mark { pointer-events: auto; cursor: pointer; } /* easter egg: the HUD Y is clickable even though the HUD isn't */
.hud-clock { font-family: var(--font-mono); font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.hud-mode { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #ffa060; margin-top: 4px; }
.hud-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; }
.hud-stats div { min-width: 0; }
.hud-stats dt { color: #b8b8b8; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.hud-stats dd { margin: 0; font-family: var(--font-mono); font-size: 17px; font-weight: 700; }
#s-gaveup.bad { color: #ff7a6b; }
.hud-extra { margin-top: 8px; color: #b8b8b8; font-size: 11px; min-height: 1em; }

/* ---------- panel ---------- */
.panel {
  position: fixed; z-index: 3; right: 14px; bottom: 14px;
  width: 300px; max-height: calc(100vh - 28px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 10px 34px rgba(40, 28, 10, 0.25);
  font-size: 13px;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  font: inherit; font-weight: 700; font-size: 14px;
  background: none; border: 0; padding: 12px 14px; cursor: pointer; color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.panel.collapsed .panel-head { border-bottom: 0; }
.panel.collapsed .panel-body { display: none; }
.panel.collapsed .chev { transform: rotate(-90deg); }
.chev { transition: transform .2s; color: var(--muted); display: inline-flex; }
.panel-gear { display: none; } /* shown only as the collapsed Simulation control on a small screen (see the max-width:820px block) */
.panel-body { overflow-y: auto; padding: 12px 14px 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 3px; gap: 3px; }
.seg button { font: inherit; font-weight: 600; border: 0; background: none; padding: 7px 6px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--accent); color: #fff; }
.mode-desc { color: var(--muted); margin: 8px 0 10px; line-height: 1.45; font-size: 12.5px; }
.row-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sl { margin: 8px 0 0; }
.sl label { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 12.5px; }
.sl label output { white-space: nowrap; flex: none; font-family: var(--font-mono); font-weight: 600; color: var(--accent-ink); }
.sl .hint { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.sl.disabled { opacity: .6; }
.sl.disabled label span::after { content: ' (matched only)'; font-weight: 400; color: var(--muted); }
input[type=range] { width: 100%; margin: 4px 0 0; accent-color: var(--accent); }
.group-title { margin: 16px 0 0; }
.score { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 10px; }
.score table { width: 100%; border-collapse: collapse; font-size: 12px; }
.score th, .score td { text-align: right; padding: 3px 4px; font-variant-numeric: tabular-nums; }
.score th:first-child, .score td:first-child { text-align: left; }
.score thead th { color: var(--muted); font-weight: 600; font-size: 11px; }
.score td.best { color: var(--success); font-weight: 700; }

#toast {
  position: fixed; z-index: 42; left: 50%; top: 18px; transform: translate(-50%, -12px); /* clears the hero backdrop/card (40/41) so a toast isn't covered */
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-md);
  font-size: 14px; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
  max-width: min(560px, calc(100vw - 32px)); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  #hud { width: auto; padding: 8px 12px; }
  .hud-stats { grid-template-columns: repeat(3, auto); gap: 4px 12px; }
  .hud-stats dd { font-size: 14px; }
  .hud-extra { display: none; }
  #page { padding-top: max(300px, 48vh); }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .column { padding: 28px 20px; background: rgba(255,255,255,0.97); }
  .prose h1 { font-size: 2rem; }
  #hud { left: 8px; right: 8px; top: 8px; }
  .hud-top { margin-bottom: 6px; }
  .hud-stats div:nth-child(n+5) { display: none; }
  .hud-stats { grid-template-columns: repeat(4, auto); }
  .panel { right: 8px; left: 8px; bottom: 8px; width: auto; max-height: 60vh; }
  #page { padding-top: 46vh; padding-bottom: 80px; }
  .panel.collapsed { left: auto; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- v2: article as translucent left overlay (desktop) ---------- */
@media (min-width: 821px) {
  #page {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: clamp(400px, 44vw, 660px);
    padding: 0; overflow-y: auto; overscroll-behavior: contain;
    pointer-events: auto;
    scrollbar-width: thin; scrollbar-color: rgba(26,26,26,.25) transparent;
    transition: transform .4s ease, opacity .4s ease;
  }
  .column {
    max-width: none; margin: 0; min-height: 100%;
    border-radius: 0; border: 0; border-right: 1px solid rgba(26,26,26,.10);
    background: linear-gradient(90deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.91) 100%);
    -webkit-backdrop-filter: blur(3px) saturate(1.05);
    backdrop-filter: blur(3px) saturate(1.05);
    box-shadow: 8px 0 32px rgba(40,28,10,.12);
    padding: 40px clamp(28px, 3.4vw, 52px) 48px;
  }
  .prose h1 { font-size: clamp(2rem, 2.6vw, 2.5rem); }
  .sim-note { background: rgba(245,245,243,.92); }
  body.article-hidden #page { transform: translateX(-100%); opacity: 0; pointer-events: none; }
  body.article-hidden .column { transform: none; }

  /* HUD + controls stacked on the right, always on top */
  #hud { left: auto; right: 14px; top: 14px; width: 320px; }
  .panel { width: 320px; top: auto; bottom: 14px; max-height: calc(100vh - 210px); }
  #unhide-dock { display: flex; position: fixed; z-index: 3; left: 20px; bottom: 20px; gap: 10px; } /* web: the Show me / Show the article pair sits in the bottom-left corner (the panel owns bottom-right) */
}
@media (min-width: 821px) and (max-width: 1180px) {
  #hud { width: 320px; padding: 8px 12px; }
  .panel { max-height: calc(100vh - 120px); }
}

/* ---------- v3: mobile buttons as equal half-width grid ---------- */
@media (max-width: 820px) {
  .sim-note-actions, .row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .sim-note-actions .btn, .row-btns .btn { width: 100%; justify-content: center; text-align: center; min-height: 40px; }
}

/* ---------- v4: 80s arcade type ---------- */
:root {
  --font-pixel: "Press Start 2P", ui-monospace, monospace;
  --font-sans: "VT323", ui-monospace, monospace;
  --font-mono: "Press Start 2P", ui-monospace, monospace;
}
body { font-size: 22px; line-height: 1.35; -webkit-font-smoothing: none; }
.prose p, .prose li { max-width: 62ch; }
.prose h1, .prose h2, .prose h3 { font-family: var(--font-pixel); font-weight: 400; letter-spacing: 0; }
.prose h1 { font-size: clamp(1.15rem, 1.6vw, 1.5rem); line-height: 1.5; margin-bottom: 28px; }
.prose h2 { font-size: 1rem; line-height: 1.6; margin-top: 44px; }
.prose h3 { font-size: .8rem; line-height: 1.6; }
.prose strong, .prose b { font-weight: 400; color: var(--accent-ink); }
.label-caps, .hud-mode, .hud-stats dt { font-family: var(--font-pixel); font-weight: 400; letter-spacing: 0; font-size: 9px; line-height: 1.6; }
.hud-clock { font-size: 16px; font-weight: 400; }
.hud-stats dd { font-size: 13px; font-weight: 400; margin-top: 3px; }
.hud-extra { font-size: 17px; }
.mark { font-family: var(--font-pixel); font-size: 15px; font-weight: 400; border-radius: 0; }
.btn, .seg button, .panel-head { font-family: var(--font-pixel); font-weight: 400; font-size: 10px; line-height: 1.4; letter-spacing: 0; }
.btn.sm { font-size: 9px; }
.btn, .seg, .seg button, .panel, #hud, .sim-note, #toast { border-radius: 0; }
.btn { box-shadow: 3px 3px 0 rgba(26,26,26,.85); }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 rgba(26,26,26,.85); }
.panel { box-shadow: 6px 6px 0 rgba(26,26,26,.55); border: 2px solid var(--ink); font-size: 18px; }
#hud { box-shadow: 4px 4px 0 rgba(26,26,26,.35); }
.sl label { font-weight: 400; font-size: 19px; }
.sl label output { font-size: 10px; font-weight: 400; align-self: center; }
.sl .hint, .mode-desc { font-size: 17px; line-height: 1.25; }
.score table { font-size: 17px; }
.score thead th { font-size: 15px; font-weight: 400; }
.sim-note { font-size: 20px; }
.foot { font-size: 17px; }
#toast { font-size: 19px; }
@media (max-width: 700px) { body { font-size: 20px; } .prose h1 { font-size: 1.05rem; } }
@media (max-width: 820px) { .panel { box-shadow: 3px 3px 0 rgba(26,26,26,.55); right: 12px; } }

/* ---------- v5: wider body face; mobile hidden-article button pair ---------- */
:root { --font-sans: "Pixelify Sans", ui-monospace, monospace; }
body { font-size: 18px; line-height: 1.55; }
.sl label, .sl .hint, .mode-desc, .score table, .sim-note, .foot, #toast, .hud-extra { font-size: 15px; }
.score thead th { font-size: 13px; }
.panel { font-size: 15px; }
@media (max-width: 700px) { body { font-size: 17px; } }
@media (max-width: 820px) {
  /* Article hidden on a small screen: a 3-up bottom bar — the primary "Add yourself / Show me!" (left) and
     "Show the article" (middle) as equal buttons, and the Simulation panel as a gear at the far right. Tapping
     the gear expands the panel to a full-width bottom sheet, which hides the two buttons so it owns the bottom.
     Keyed on article-hidden (not touch) so the layout also previews in a narrow desktop window. */
  body.article-hidden #unhide-add,
  body.article-hidden #unhide {
    position: fixed; top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); transform: none;
    height: 44px; padding-top: 0; padding-bottom: 0; justify-content: center; text-align: center;
  }
  body.article-hidden #unhide-add { left: 8px; right: auto; width: calc(50% - 38px); }
  body.article-hidden #unhide { left: calc(50% - 22px); right: auto; width: calc(50% - 38px); }
  body.article-hidden .panel.collapsed { left: auto; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: 44px; background: none; border: 0; box-shadow: none; } /* collapsed = a plain floating gear, not a boxed button; dropping the border also makes it 44px so it centers against the buttons */
  body.article-hidden .panel.collapsed .panel-head { width: 44px; height: 44px; min-height: 0; padding: 0; justify-content: center; gap: 0; }
  body.article-hidden .panel.collapsed #panel-label,
  body.article-hidden .panel.collapsed .chev { display: none; }
  body.article-hidden .panel.collapsed .panel-gear { display: inline-flex; align-items: center; justify-content: center; color: var(--ink); filter: drop-shadow(1px 1px 0 rgba(255,255,255,.9)); } /* light offset so the lone glyph stays legible on the hall floor */
  body.article-hidden .panel.collapsed .panel-gear svg { width: 26px; height: 26px; }
  body.article-hidden .panel:not(.collapsed) { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom)); }
  body.article-hidden:has(.panel:not(.collapsed)) #unhide-add,
  body.article-hidden:has(.panel:not(.collapsed)) #unhide { display: none; }
}

/* ---------- v6: readable body; pixel type only for headings + game chrome ---------- */
:root { --font-sans: "IBM Plex Sans", system-ui, sans-serif; --font-head: "Pixelify Sans", ui-monospace, monospace; }
body { font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.prose strong, .prose b { font-weight: 600; color: inherit; }
.prose h1, .prose h2, .prose h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: 0; }
.prose h1 { font-size: clamp(2rem, 2.8vw, 2.6rem); line-height: 1.12; }
.prose h2 { font-size: 1.55rem; line-height: 1.25; }
.prose h3 { font-size: 1.2rem; line-height: 1.3; }
.sim-note, .sl label, .sl .hint, .mode-desc, .score table, .foot, #toast, .hud-extra, .panel { font-size: 14px; }
.sl label { font-weight: 600; }
.sim-note b { font-weight: 600; }
@media (max-width: 700px) { body { font-size: 17px; } .prose h1 { font-size: 1.8rem; } }

/* ---------- v7: headings back to Press Start 2P ---------- */
.prose h1, .prose h2, .prose h3 { font-family: var(--font-pixel); font-weight: 400; letter-spacing: 0; }
.prose h1 { font-size: clamp(1.15rem, 1.6vw, 1.5rem); line-height: 1.5; }
.prose h2 { font-size: 1rem; line-height: 1.6; }
.prose h3 { font-size: .8rem; line-height: 1.6; }
@media (max-width: 700px) { .prose h1 { font-size: 1.05rem; } }

/* ---------- author photo (floats so the closing text wraps around it) ---------- */
figure.jet-photo { float: left; width: 104px; margin: 6px 20px 10px 0; }
figure.jet-photo img { display: block; width: 100%; height: auto; image-rendering: pixelated; border: 2px solid var(--ink); background: #e9dfcd; box-shadow: 4px 4px 0 rgba(26,26,26,.55); }
figure.jet-photo figcaption { margin-top: 8px; font-size: 12px; line-height: 1.35; color: var(--muted); }
figure.jet-photo figcaption b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; }
@media (max-width: 480px) { figure.jet-photo { width: 84px; margin: 4px 16px 8px 0; } }

/* ---------- panel flash cue ---------- */
@keyframes panelflash { 0%,100% { outline: 0 solid var(--accent); } 20%,60% { outline: 4px solid var(--accent); } 40%,80% { outline: 0 solid var(--accent); } }
.panel.flash { animation: panelflash 1.4s ease; }

/* ---------- booth company cards ---------- */
.co-card { position: fixed; z-index: 5; width: 260px; background: #fff; border: 2px solid var(--ink); box-shadow: 5px 5px 0 rgba(26,26,26,.75); padding: 12px 14px; font-size: 14px; line-height: 1.4; }
.co-card[hidden] { display: none; }
.co-card.linked { cursor: pointer; }
.co-card.linked:hover .cc-cta { text-decoration: underline; }
.cc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc-name { font-family: var(--font-pixel); font-size: 11px; line-height: 1.5; }
.cc-batch { flex: none; font-family: var(--font-pixel); font-size: 8px; background: var(--accent); color: #fff; padding: 4px 5px 3px; }
.cc-desc { margin: 8px 0 6px; }
.cc-meta { color: var(--muted); font-size: 12.5px; }
.cc-cta { margin-top: 10px; font-family: var(--font-pixel); font-size: 8.5px; color: var(--accent-ink); }
.cc-close { display: none; } /* desktop: the card is a hover preview, so no minimize button; shown only on touch */
.cc-founder { display: flex; align-items: center; gap: 10px; margin: -2px 0 10px; padding-bottom: 10px; border-bottom: 2px dashed #d8cdb9; }
.cc-founder img { width: 64px; height: 64px; image-rendering: pixelated; border: 2px solid var(--ink); background: #efe6d6; flex: none; }
.cc-fname { font-weight: 600; font-size: 14px; }
.cc-ftitle { color: var(--muted); font-size: 12.5px; }

/* ---------- hero character card: centered modal ---------- */
#co-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(20,22,26,.6); }
#co-backdrop[hidden] { display: none; }
.co-card.hero {
  z-index: 41; width: min(420px, 92vw); padding: 24px 22px 20px;
  left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; /* beats the inline left/top a prior anchored open left behind */
  box-shadow: 8px 8px 0 rgba(26,26,26,.5);
  max-height: 92vh; max-height: 92dvh; overflow-y: auto; /* scroll inside on short/landscape screens rather than clipping the controls off-screen */
}
.co-card.hero .cc-founder { flex-direction: column; text-align: center; gap: 14px; border-bottom: 0; padding-bottom: 0; margin: 0 0 14px; }
.co-card.hero .cc-founder img { width: min(180px, 52vw); height: min(180px, 52vw); border-width: 3px; }
.co-card.hero .cc-fname { font-size: 19px; }
.co-card.hero .cc-ftitle { font-size: 14px; }
.co-card.hero .cc-meta { text-align: center; font-size: 14px; }
.co-card.hero .cc-share { margin-top: 16px; }

/* ⌘K "find a company" palette + its launcher pill */
.find { position: fixed; z-index: 7; inset: 0; background: rgba(26,26,26,.15); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.find[hidden] { display: none; }
.find-box { width: min(440px, 94vw); background: var(--surface); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(26,26,26,.6); padding: 12px; }
#find-input { width: 100%; box-sizing: border-box; font-family: var(--font-sans); font-size: 18px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--surface-2); color: var(--ink); outline: none; }
#find-input:focus { border-color: var(--accent); }
.find-results { list-style: none; margin: 10px 0 0; padding: 0; max-height: 44vh; overflow-y: auto; }
.find-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; cursor: pointer; border: 2px solid transparent; }
.find-item.sel, .find-item:hover { border-color: var(--ink); background: #fff3e8; }
.find-name { font-family: var(--font-sans); font-size: 17px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-batch { flex: none; font-family: var(--font-pixel); font-size: 8px; background: var(--accent); color: #fff; padding: 4px 5px 3px; }
.find-empty { padding: 10px; color: var(--muted); font-family: var(--font-sans); font-size: 16px; }
.find-hint { margin-top: 8px; color: var(--muted); font-family: var(--font-pixel); font-size: 8px; line-height: 1.6; }
/* on-screen marker that rides above the (near-opaque) article so a found booth is visible even behind it */
.find-marker { position: fixed; z-index: 6; display: flex; flex-direction: column; align-items: center; pointer-events: none; animation: findbob .6s ease-in-out infinite; }
.find-marker[hidden] { display: none; }
.find-marker-label { font-family: var(--font-pixel); font-size: 9px; line-height: 1.4; background: var(--accent); color: #fff; border: 2px solid var(--ink); padding: 4px 6px 3px; white-space: nowrap; box-shadow: 2px 2px 0 rgba(26,26,26,.6); }
.find-marker-arrow { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--accent); margin-top: -1px; }
@keyframes findbob { 0%, 100% { transform: translate(-50%, -100%); } 50% { transform: translate(-50%, calc(-100% - 5px)); } }

/* ---------- Mobile explore mode — only (hover: none); web is untouched ---------- */
@media (hover: none) {
  body.exploring { overflow: hidden; overscroll-behavior: none; }   /* the page can't scroll while you pan the hall */
  body.exploring #sim { touch-action: none; }                        /* the canvas owns one-finger drags -> pan, not scroll */
  /* the bottom bar is positioned in the max-width:820px block; on touch it only needs to sit under a company sheet (z-index 9) when one opens */
  body.article-hidden #unhide-add, body.article-hidden #unhide, body.article-hidden #panel { z-index: 8; }
  body:not(.article-hidden) #panel { display: none; } /* reading: the article note has the controls, so no floating panel */

  /* dock these as a bottom sheet so they never cover the hall; .hero is excluded so it stays a centered modal */
  .co-card:not([hidden]):not(.hero) {
    position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
    width: auto !important; max-width: none !important; z-index: 9 !important; /* above the #unhide exit (8) so the sheet owns the bottom when open */
    border-radius: 16px 16px 0 0; border-width: 3px 0 0 0;
    box-shadow: 0 -6px 0 rgba(26,26,26,.18);
    padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  }
  .co-card:not([hidden]) .cc-desc { font-size: 15px; }
  .co-card:not([hidden]) .cc-meta { font-size: 14px; }
  .co-card:not([hidden]) .cc-share-co { display: flex; }
  .co-card:not([hidden]):not(.hero) > *:first-child { padding-right: 40px; } /* only the top row clears the minimize chevron; the rest of the card (left-aligned) uses the full width */
  .co-card:not([hidden]):not(.hero) .cc-close { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; color: #8a8580; cursor: pointer; } /* minimize affordance — tap to close the sheet */
  body.exploring #toast { top: auto; bottom: calc(96px + env(safe-area-inset-bottom)); } /* keep the intro hint clear of the top HUD */
}
