@font-face {
  font-family: 'PP Pangram Sans';
  src: url('../assets/PPPangramSans-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3f3f3;
  --bg-dark: #000;
  --text: #000;
  --muted: rgba(0, 0, 0, 0.5);
  --muted-2: rgba(0, 0, 0, 0.35);
  --line: rgba(0, 0, 0, 0.15);
  --line-strong: rgba(0, 0, 0, 0.8);
  --white-line: rgba(255, 255, 255, 0.15);
  --white-muted: rgba(255, 255, 255, 0.55);
  --header-h: 52px;
  --header-top-h: 40px;
  --footer-h: 52px;
  --mono: "Courier Prime", "Courier New", monospace;
  --sans: "PP Pangram Sans", "Space Grotesk", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button, input, select, textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
  color: #fff;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
}

body:has(.landing-page) .site-header,
body:has(.tutorial-page) .site-header {
  border-bottom-color: #000;
}
.site-header--top {
  height: var(--header-top-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
}
.site-header--tool {
  height: var(--header-h);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
}
.site-title {
  text-decoration: none;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  white-space: nowrap;
}
.site-nav-flat {
  margin-left: auto;
  display: flex;
  gap: 28px;
}
.site-nav-flat a {
  text-decoration: none;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  opacity: 0.35;
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 5px 14px;
}
.site-nav-flat a.is-active,
.site-nav-flat a:hover { opacity: 1; }

.progress-nav {
  position: relative;
  display: flex;
  align-items: flex-start;
}
.progress-nav::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 36px;
  right: 36px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}
.progress-step {
  position: relative;
  padding: 0 32px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}
.progress-step__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #666;
  background: #000;
}
.progress-step.is-done .progress-step__dot {
  border-color: #777;
  background: #777;
}
.progress-step.is-active .progress-step__dot {
  border-color: #fff;
  background: #fff;
}
.progress-step__label {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}
.progress-step.is-active .progress-step__label { color: #fff; }
.progress-step:hover .progress-step__label { color: rgba(255,255,255,0.7); }
.progress-step:hover .progress-step__dot { border-color: #fff; }

.page-main { min-height: calc(100vh - var(--header-h)); }
.page-main--top { min-height: calc(100vh - var(--header-top-h)); }

.global-footer-cta,
.bottom-bar {
  height: var(--footer-h);
  background: #000;
  color: #fff;
  border-top: 0.5px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.bottom-bar button,
.global-footer-cta button {
  border-radius: 999px;
}
.global-footer-cta,
.bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 80;
}
.global-footer-cta__text,
.bottom-text {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.55);
}
.global-footer-cta__actions,
.bottom-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bottom-actions button kbd,
.button--primary kbd,
.landing-pill--primary kbd {
  display: inline-block;
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  font-style: normal;
  font-weight: 400;
  padding: 1px 4px;
  border: 0.5px solid rgba(255,255,255,0.35);
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0;
}
#test-type-btn kbd,
#customise-btn kbd,
#download-btn kbd,
.button--primary kbd,
.landing-pill--primary kbd {
  border-color: rgba(0,0,0,0.2) !important;
  background: rgba(0,0,0,0.06) !important;
  color: #666 !important;
}
.btn-separator {
  width: 0.5px;
  height: 30px;
  background: rgb(142, 142, 142);
  margin: 0 8px;
  flex-shrink: 0;
}
.button,
button {
  appearance: none;
  border: 0.5px solid rgba(255,255,255,0.25);
  border-radius: 3px;
  background: #111;
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  cursor: pointer;
}

.button {
  border-radius: 999px;
  padding: 10px 20px;
}
.button--primary,
#customise-btn,
#test-type-btn,
#download-btn,
#download-all-btn,
#import-trigger,
#export-json-btn {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-weight: 700;
}
button:hover,
.button:hover {
  opacity: 0.9;
}
.control-label-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 8px;
}
.control-label-row label {
  margin-bottom: 0;
  display: inline;
}
.info-btn {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.3) !important;
  background: transparent !important;
  color: #999 !important;
  padding: 0 !important;
  font-size: 8px !important;
  font-style: normal;
  font-family: var(--sans) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.info-btn:hover {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
  opacity: 1;
}
.info-tooltip {
  position: fixed;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-family: var(--sans);
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-transform: lowercase;
  padding: 8px 12px;
  max-width: 220px;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s;
}
.info-tooltip.visible {
  opacity: 1;
}

.help-badge,
.help-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #444;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* About */
.about-page {
  background: #fff;
}
.about-row {
  display: grid;
  grid-template-columns: 280px 1fr 40px;
  border-bottom: 0.5px solid var(--line);
}
.about-label {
  border-right: 0.5px solid var(--line);
  padding: 26px 24px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.6;
}
.about-content {
  padding: 18px 44px;
}
.about-bullet {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 34px;
}
.about-bullet span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
}
.about-display {
  font-family: var(--sans);
  font-size: clamp(70px, 8vw, 118px);
  line-height: 0.94;
  letter-spacing: -0.055em;
  font-weight: 400;
  color: #000;
  margin: 18px 0;
}
.about-large-number {
  font-family: var(--sans);
  font-size: clamp(88px, 11vw, 160px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  font-weight: 400;
  color: #000;
}
.about-signal-wrap {
  display: flex;
  align-items: center;
  gap: 44px;
  min-height: 220px;
}
.about-signal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.about-small {
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: none;
}
.about-copy {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 0;
}
.about-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}
.about-credit {
  font-family: var(--sans);
  font-size: clamp(34px, 4vw, 64px);
  letter-spacing: -0.05em;
  line-height: 0.96;
  margin: 18px 0 0;
}
.about-credit-small {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.about-row--disclaimer {
  background: #000;
  color: #fff;
  min-height: 88px;
}
.about-row--disclaimer .about-label {
  border-right-color: rgba(255,255,255,0.12);
}
.about-row--disclaimer .about-bullet span {
  background: rgba(255,255,255,0.4);
}
.about-row--disclaimer p {
  max-width: 620px;
  color: #fff;
}











/* Tutorial */

.tutorial-page {
  height: calc(100vh - var(--header-h) - var(--footer-h));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}

.tutorial-panel {
  position: relative;
  height: 100%;
  border-right: 0.5px solid #000;
  border-top: 0.5px solid #000;
  background: var(--bg);
  overflow: hidden;
}

.tutorial-panel:last-child {
  border-right: none;
}

.tutorial-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: #000000;
}

.tutorial-video::-webkit-media-controls {
  display: none !important;
}


body.tutorial-lock {
  overflow: hidden;
  margin: 0;
}





/* Landing */
.landing-page {
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
}

/* Hero */
.landing-hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.landing-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform: translateY(-18%);
}

.landing-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 44px 78px;
}

.hero-br { display: inline; }
@media (max-width: 960px) {
  .hero-br { display: none; }
}

.landing-hero-title {
  font-family: var(--sans);
  font-size: clamp(32px, 3.2vw, 70px);
  line-height: 1.0;
  letter-spacing: -0.05em;
  font-weight: 700;
  color: #a1a1a1;
  margin: 0;
  padding-top: 20px;
  display: block;
  transition: color 0.5s ease;
}

.landing-hero-title.is-scrolled {
  color: #fff;
}

.landing-hero-inline-btns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
  margin: 0 10px;
  position: relative;
  top: -4px;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: #000;
  color: #fff;
  border: 0.5px solid rgba(255,255,255,0.6);
  transition: background 0.15s, border-color 0.15s;
}

.landing-pill:hover {
  background: #111;
}

.landing-pill--primary {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 8px 16px;
  transition: box-shadow 0.5s ease;
}

.landing-pill--primary:hover {
  background: rgba(255,255,255,0.88);
}

.landing-pill--primary.is-scrolled {
  box-shadow: 0 0 0 3px rgb(0, 0, 0), 0 0 0 4px rgba(255,255,255,0.9);
}

.landing-pill--primary.do-pulse {
  animation: pillPulse 0.6s ease-out forwards;
}

@keyframes pillPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Intro row */
.landing-intro {
  display: grid;
  grid-template-columns: 0.62fr 1fr;
  background: var(--bg);
  color: var(--text);
  border-bottom: 0.5px solid var(--line);
}

.landing-intro-left {
  padding: 48px 48px;
  border-right: 0.5px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 48px;
}

.landing-intro-right {
  padding: 0;
}

.landing-kicker {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--muted-2);
  font-family: var(--mono);
}

.landing-copy {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

/* Process cards — 2x2 grid inside intro-right */
.landing-process {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
}

.landing-card {
  padding: 36px 40px;
  border-left: 0.5px solid var(--line);
  border-bottom: 0.5px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.landing-card:nth-child(3),
.landing-card:nth-child(4) {
  border-bottom: none;
}

.landing-card-num {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.landing-card-title {
  font-family: var(--sans);
  font-size: 22px;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.landing-card-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.landing-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}







/* Capture */
.capture-main {
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}


.capture-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex: 1 1 0;
  min-height: 0;
  border-bottom: 0.5px solid var(--line-strong);
}


.capture-panel {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-right: 0.5px solid var(--line-strong);
}

.capture-input {
  background: #fff;
}

.capture-panel:last-child { border-right: none; }
.panel-title {
  position: absolute;
  top: 20px;
  left: 18px;
  z-index: 4;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.readout-legend {
  position: absolute;
  top: 54px;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.readout-legend div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.pressure { background: #e944e8; }
.dot.reorientation { background: #b7ea1e; }
.dot.hesitation { background: #67c0f3; }

.glyph-section {
  flex: 0 0 auto;
  background: var(--bg);
  border-top: 0.5px solid var(--line);
}


.canvas-box {
  position: absolute;
  inset: 0;
}

.glyph-section-label {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--muted);
  padding: 14px 18px 8px;
}
.glyph-grid {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  border-top: 0.5px solid var(--line);
  border-left: 0.5px solid var(--line);
}
.glyph-cell {
  min-height: 104px;
  background: var(--bg);
  border-right: 0.5px solid var(--line);
  border-bottom: 0.5px solid var(--line);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  color: #999;
}



.glyph-cell.done {
  background: var(--bg);
  color: #000;
}

.glyph-cell.active {
  background: #000;
  color: #fff;
  box-shadow: inset 0 0 0 0.5px #000;
  z-index: 4;
}



.download-letter-tray .glyph-cell.active {
  background: #fff;
  color: #000;
  box-shadow: inset 0 0 0 1px #000;
}

.download-letter-tray .glyph-cell.active .glyph-letter {
  color: #000;
}

.download-letter-tray .glyph-cell.active .glyph-thumb {
  filter: none;
}

.glyph-letter {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}
.glyph-shape {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.glyph-thumb {
  width: 82%;
  height: 82%;
  object-fit: contain;
  display: block;
}


.glyph-cell.done .glyph-thumb {
  filter: invert(1);
}

.glyph-cell.active .glyph-thumb {
  filter: none;
}



.glyph-empty {
  width: 32px;
  height: 4px;
  background: currentColor;
  opacity: 0.28;
  border-radius: 999px;
}


.download-letter-tray .glyph-cell.active .glyph-shape {
  background: transparent;
}

.download-letter-tray .glyph-cell.active .glyph-empty {
  background: rgba(255,255,255,0.35);
}





/* Customise */
.customise-page {
  height: calc(100vh - var(--header-h) - var(--footer-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.customise-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "sidebar preview"
    "sidebar tray";
}
.customise-sidebar {
  grid-area: sidebar;
  grid-row: 1 / -1;
  border-right: 0.5px solid var(--line-strong);
  padding: 10px 25px 10px 25px;
  background: #fff;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.control-block { margin-bottom: 16px; }
.control-group-title {
  display: inline-block;
  padding: 8px 10px;
  background: #000;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  font-family: 'Courier Prime', monospace;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  margin-bottom: 16px;
  border-radius: 4px;
}
.customise-sidebar label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: #666;
}
.customise-sidebar select,
.customise-sidebar input[type="range"] {
  width: 100%;
  margin-bottom: 12px;
}
.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.slider-row input[type="range"] {
  flex: 1;
  width: auto;
  margin-bottom: 0;
}
.slider-value {
  font-size: 10px;
  font-family: var(--sans);
  letter-spacing: 0.04em;
  color: #888;
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}
.customise-sidebar select {
  appearance: none;
  border: 0.5px solid rgba(0,0,0,0.25);
  border-radius: 4px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 10px center;
  padding: 8px 26px 8px 10px;
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #111;
  cursor: pointer;
}
input[type="range"] {
  appearance: none;
  height: 1px;
  background: #111;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  background: #000;
  border: 0.5px solid #000;
}
.customise-preview-wrap {
  grid-area: preview;
  border-bottom: 0.5px solid var(--line-strong);
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.customise-note {
  grid-area: readme;
  border-bottom: 0.5px solid var(--line);
  padding: 18px 24px;
  font-size: 12px;
  line-height: 1.6;
  max-width: 74ch;
}
.customise-tray {
  grid-area: tray;
  position: sticky;
  bottom: 0;
  background: var(--bg);
}







.capture-panel,
.canvas-box,
#canvas-input,
#canvas-readout,
#canvas-recon,
.p5Canvas,
canvas {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.panel-title,
.readout-legend {
  pointer-events: none;
}






/* Type tester */


.type-input-panel {
  display: block;
  padding: 0 24px 6px;
}




.type-sticky-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 0.5px solid var(--line);
}




.type-text-input {
  width: 100%;
  min-height: 22px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: grey;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  padding: 0;
}





.type-slider-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text);
}



.type-slider-group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 18px;
  background: transparent;
}

.type-slider-group input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: #000;
}

.type-slider-group input[type="range"]::-moz-range-track {
  height: 1px;
  background: #000;
  border: 0;
}

.type-slider-group span {
  display: inline-block;
  width: 54px;
  text-align: right;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}



.type-slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  background: #000;
  border: 0;
  cursor: pointer;
  margin-top: -4.5px;
}

.type-slider-group input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: #000;
  border: 0;
  cursor: pointer;
}



.type-page {
  padding: 0 20px;
  min-height: calc(100vh - var(--header-h));
  display: block;
  background: var(--bg);
}


.tool-stage {
  height: calc(100vh - var(--header-h) - var(--footer-h) - 52px);
  padding: 14px 18px 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  background: var(--bg);
}






.type-canvas-shell {
  flex: 1;
  min-height: 0;
  padding: 0 24px 0;

  border-top: 0.5px solid var(--line);
  background: var(--bg);
}

.type-bottom-input-wrap {
  border-top: 0.5px solid var(--line);
  padding: 10px 24px 12px;
  margin-top: auto;
}

.type-text-strip {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 0;
}




/* Archive */
.archive-page {
  min-height: calc(100vh - var(--header-top-h));
  display: grid;
  grid-template-columns: 320px 1fr;
}
.archive-sidebar {
  border-right: 0.5px solid var(--line-strong);
  padding: 24px 18px;
  background: #fff;
}
.archive-stage {
  padding: 24px;
  background: #fff;
}
.archive-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.archive-card {
  border: 0.5px solid var(--line-strong);
  min-height: 120px;
  padding: 12px;
  background: var(--bg);
}
.archive-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.archive-card span {
  font-size: 12px;
  color: var(--muted);
}
.archive-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 58ch;
}










/* Download */

/* Download */
.download-shell {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  align-items: start;
  background: var(--bg);
  padding-bottom: 0;
}

.download-stage {
  border-right: 0.5px solid var(--line-strong);
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-height: calc(100vh - var(--header-h));
}


.download-stage.is-letter-mode {
  height: calc(100vh - var(--header-h) - 40px);
  min-height: 0;
  overflow: hidden;
}

.download-stage.is-letter-mode .download-stage-top {
  position: relative;
  top: 0;
  z-index: 5;
}


.download-stage-top {
  position: sticky;
  top: calc(var(--header-h));
  z-index: 25;

  height: 38px;
  min-height: 0;
  border-bottom: 0.5px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
  background: var(--bg);
}


.download-format-card.is-active .download-format-row strong,
.download-format-card.is-active .download-format-row span,
.download-format-card.is-active .download-format-copy {
  color: #111;
}


.download-stage-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: none;
}



.download-stage-kicker,
.download-stage-dash {
  color: var(--muted);
}

#download-stage-name {
  font-weight: 700;
  color: var(--text);
}

.download-stage-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-letter-counter {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: lowercase;
}

.download-view-toggle {
  display: inline-flex;
  border: 0.5px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}

.download-toggle-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  min-width: 60px;
  height: 28px;
  padding: 0 14px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-transform: lowercase;
  font-weight: 500;
}

.download-toggle-btn + .download-toggle-btn {
  border-left: 0.5px solid var(--line-strong);
}

.download-toggle-btn.is-active {
  background: #000;
  color: #fff;
}


.download-panel-block--footer {
  margin-top: auto;
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom: none;
}




.download-grid-view {
  display: none;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--bg);
  align-content: start;
}


.download-grid-view.is-active {
  display: grid;
}

.download-grid-cell {
  aspect-ratio: 1 / 1;
  border-right: 0.5px solid rgba(0,0,0,0.08);
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
  position: relative;
  background: var(--bg);
  padding: 10px 10px 24px;
  overflow: hidden;
}

.download-grid-cell:nth-child(6n + 1) {
  border-left: 0;
}

.download-grid-index {
  position: absolute;
  top: 8px;
  right: 10px;
  font-family: var(--sans);
  font-size: 8px;
  color: #ccc;
  letter-spacing: 0.06em;
}

.download-grid-glyph {
  width: 100%;
  height: calc(100% - 22px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-grid-glyph img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.download-grid-caption {
  position: absolute;
  left: 14px;
  bottom: 10px;
  font-family: var(--sans);
  font-size: 9px;
  color: #c0c0c0;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.download-letter-view {
  display: none;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--bg);
  overflow: hidden;
}


.download-letter-view.is-active {
  display: flex;
  align-items: stretch;
}

.download-letter-canvas-wrap {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-letter-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-letter-canvas canvas {
  display: block;
}
.download-nav-arrow {
  width: 48px;
  border: 0;
  background: transparent;
  color: #bdbdbd;
  font-family: inherit;
  font-size: 20px;
  cursor: pointer;
}

.download-nav-arrow:hover {
  color: #000;
}

.download-letter-tray-wrap {
  display: none;
  border-top: 0.5px solid var(--line-strong);
  background: var(--bg);
  flex: 0 0 auto;
}

.download-letter-tray-wrap.is-active {
  display: block;
}

.download-letter-tray {
  display: grid;
  grid-template-columns: repeat(26, minmax(0, 1fr));
  align-items: stretch;
}

.download-letter-tray .glyph-cell {
  aspect-ratio: 1 / 1;
  min-height: 0;
  border-right: 0.5px solid var(--line);
  border-bottom: 0;
  background: var(--bg);
}

.download-letter-tray .glyph-cell.active .glyph-thumb {
  filter: invert(1);
}

.download-letter-tray .glyph-cell.active .glyph-letter {
  color: #fff;
}

.download-letter-tray .glyph-cell.active .glyph-thumb {
  filter: invert(1);
}

.download-panel {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg);
  height: calc(100vh - var(--header-h) - 40px);
  overflow: hidden;
}


.download-panel-block {
  border-bottom: 0.5px solid var(--line-strong);
  padding: 18px 20px;
}


.download-panel-label {
  display: inline-block;
  padding: 8px 10px;
  background: #000;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  font-family: 'Courier Prime', monospace;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  margin-bottom: 16px;
  border-radius: 4px;
}



  .download-name-input {
    width: 100%;
    height: 40px;
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    padding: 0 2px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    color: #999;
    letter-spacing: 0.01em;
    outline: none;
    transition: border-color 0.2s;
  }

  .download-name-input:focus {
    border-bottom-color: #111;
  }


  .download-panel-note {
    margin-top: 8px;
    color: #bbb;
    font-size: 10px;
    letter-spacing: 0.01em;
    font-family: var(--sans);
  }



  .download-format-card {
    width: 100%;
    border: 0.5px solid #ddd;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    margin-bottom: 7px;
    cursor: pointer;
    font-family: var(--mono);
    color: #b3b3b3;
    min-height: 0;
  }


  .download-format-card.is-active {
    border: 2px solid #111;
    color: #111;
  }

  .download-format-card.is-active .download-format-row strong,
  .download-format-card.is-active .download-format-row span,
  .download-format-card.is-active .download-format-copy {
    color: #111;
  }



  .download-format-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
  }

  .download-format-row strong {
    font-size: 12px;
    font-weight: 700;
    text-transform: lowercase;
    color: inherit;
  }

  .download-format-row span {
    color: inherit;
    font-size: 10px;
    letter-spacing: -0.01em;
    font-weight: 600;

    font-family: var(--sans);
  }


  .download-format-copy {
    display: block;
    color: inherit;
    font-size: 9px;
    line-height: 1.45;

  }


    .download-meta-list {
      display: grid;
      gap: 16px;
      margin-top: 6px;
    }

.download-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.download-meta-row span {
  color: #b5b5b5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.download-meta-row strong {
  font-size: 11px;
  color: #6a6a6a;
  font-weight: 700;
}




.download-primary-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 6px;
  background: #000;
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  cursor: pointer;
  transition: box-shadow 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.download-primary-btn:hover {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 4px rgb(61, 61, 61);
}




.download-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.download-label {
  display: inline-block;
}



.download-secondary-btn {
  width: 100%;
  margin-top: 10px;
  border: 0.5px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  height: 42px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  cursor: pointer;
}









.download-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.download-modal.is-open {
  display: flex;
}

.download-modal-card {
  width: min(400px, calc(100vw - 32px));
  background: var(--bg);
  border: 0.5px solid #111;
  padding: 28px 28px 24px;
  position: relative;
  border-radius: 4px;
}

.download-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  font-family: var(--sans);
}

.download-modal-close:hover {
  color: #111;
}

.download-modal-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  margin-bottom: 8px;
  color: #111;
}

.download-modal-copy {
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.6;
  color: #888;
  margin-bottom: 20px;
}

.download-modal-input {
  width: 100%;
  height: 40px;
  border: 0.5px solid #111;
  background: transparent;
  padding: 0 14px;
  font-family: var(--sans);
  font-size: 12px;
  color: #111;
  margin-bottom: 10px;
  border-radius: 2px;
  outline: none;
}

.download-modal-input::placeholder {
  color: #bbb;
}

.download-modal-input:focus {
  border-color: #000;
}

.download-modal-btn {
  margin-top: 0;
}

.download-modal .download-secondary-btn {
  margin-top: 8px;
  font-family: var(--sans);
  border-radius: 2px;
  color: #888;
  border-color: #ddd;
  font-size: 11px;
}

.download-modal .download-secondary-btn:hover {
  color: #111;
  border-color: #111;
}











.download-bottom-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background: #000;
  color: #fff;
  overflow: hidden;
  border-top: 0.5px solid #000;
  z-index: 30;
}

.download-bottom-ticker__track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  min-width: max-content;
  padding-left: 0;
  line-height: 40px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  animation: downloadTicker 10s linear infinite;
}

.download-bottom-ticker__track span {
  display: inline-block;
  flex: 0 0 auto;
}

.download-bottom-ticker__gap {
  width: 140px;
}

@keyframes downloadTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}




.status-line {
  display: none;
}




.download-footer-note {
  margin-top: 10px;
  text-align: center;
  color: #c0c0c0;
  font-size: 10px;
  letter-spacing: 0.02em;
}






.hidden-input { display: none; }

@media (max-width: 1200px) {
  .about-row { grid-template-columns: 220px 1fr 28px; }
  .glyph-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  .archive-grid, .download-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}




@media (max-width: 960px) {











  .tutorial-page,
  .capture-row,
  .landing-intro,
  .archive-page,
  .download-page,
  .type-page,
  .customise-layout {
    grid-template-columns: 1fr;
  }

  .landing-intro-left {
    padding: 36px 24px;
    border-right: none;
    border-bottom: 0.5px solid var(--line);
  }

  .landing-intro-right {
    padding: 0;
  }

  .landing-card {
    border-left: none;
    border-bottom: 0.5px solid var(--line);
    padding: 28px 24px;
  }

  .landing-hero-content {
    padding: 0 24px 36px;
  }

  .landing-hero-inline-btns {
    margin: 4px 6px;
  }

  .landing-pill {
    font-size: 11px;
    padding: 8px 14px;
  }








  .capture-main {
    height: auto;
    min-height: calc(100vh - var(--header-h));
    overflow: visible;
  }

  .capture-row {
    flex: 0 0 auto;
    min-height: 44vh;
  }

  .capture-panel {
    height: 44vh;
  }




  .download-stage.is-letter-mode {
    height: auto;
    overflow: visible;
  }




  .customise-page {
    height: auto;
    min-height: calc(100vh - var(--header-h) - var(--footer-h));
    overflow: visible;
  }

  .customise-layout {
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "sidebar"
      "preview"
      "tray";
  }

  .customise-preview-wrap {
    min-height: 360px;
  }
  .type-page,
  .download-page {
    grid-template-areas:
      "sidebar"
      "stage"
      "tray";
  }
  .glyph-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .archive-grid, .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-sidebar,
  .archive-sidebar,
  .customise-sidebar {
    position: static;
    height: auto;
    max-height: none;
  }



  .download-shell {
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }

  .download-stage {
    border-right: 0;
    border-bottom: 0.5px solid var(--line-strong);
    height: auto;
    overflow: visible;
  }

  .download-grid-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .download-stage-top {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
  }

  .download-stage-controls {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .download-letter-canvas {
    min-height: 0;
  }

  .download-letter-tray {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .download-panel-block {
    padding: 14px 16px;
  }

  .download-letter-view {
    height: auto;
    min-height: 420px;
    overflow: visible;
  }
  
  .download-letter-tray .glyph-cell {
    aspect-ratio: 1 / 1;
  }

  .download-panel {
    position: static;
    height: auto;
    overflow: visible;
  }
  

  .download-letter-tray-wrap {
    margin-top: 0;
  }


  .download-format-card {
    padding: 12px 12px;
  }
  
  .download-primary-btn {
    height: 46px;
  }









}













@media (max-width: 640px) {
  .download-grid-view {
    grid-template-columns: 1fr;
  }

  .download-nav-arrow {
    width: 34px;
    font-size: 16px;
  }

  .download-letter-counter {
    font-size: 10px;
  }

  .download-toggle-btn {
    min-width: 58px;
    padding: 0 10px;
  }

  .download-panel-label {
    font-size: 11px;
    padding: 12px 16px;
  }

  .download-primary-btn {
    font-size: 12px;
    letter-spacing: 0.1em;
  }
}























.type-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  padding: 0 24px;
  gap: 18px;
  border-bottom: 0.5px solid var(--line-strong);
  background: var(--bg);
}

.type-label {
  font-family: var(--sans);
  color: var(--muted);
}


.type-controls-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: none;
}


.type-controls-right {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-family: var(--sans);
}


.type-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
  flex: 0 0 1px;
}


.type-mode-toggle {
  display: inline-flex;
  border: 0.5px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}

.type-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  min-width: 64px;
  height: 28px;
  padding: 0 14px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-transform: lowercase;
  font-weight: 500;
}

.type-toggle.is-active {
  background: #000;
  color: #fff;
}

.type-toggle + .type-toggle {
  border-left: 0.5px solid var(--line-strong);
}


.type-presets {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 10px 20px 12px;
}








.type-current-label {
  font-family: var(--sans);
  padding: 14px 24px 4px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}









.type-canvas-shell canvas {
  display: block;
  width: 100% !important;
  height: auto !important;

}






.type-input-panel {
  max-width: 100%;
  margin: 0;
  padding: 4px 20px 0;
}







.preset {
  appearance: none;
  border: 0.5px solid rgba(0,0,0,0.25);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  min-width: 0;
  height: 26px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}



.preset.active {
  background: #000;
  color: #fff;
  border-color: #000;
}


@media (max-width: 768px) {

  .type-current-label {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .type-specimen-thumb {
    width: 72px;
    height: 72px;
    margin-right: 6px;
  }
  
  .type-canvas-shell {
    flex: 1;
    min-height: 420px;
  }


  .type-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .type-controls-right {
    width: 100%;
    justify-content: space-between;
  }

  .type-presets {
    flex-wrap: wrap;
  }





}














/* =========================================
   ARCHIVE REBUILD
   append at very end of style.css
========================================= */

.archive-collection-page,
.archive-detail-page {
  min-height: calc(100vh - var(--header-top-h));
  background: var(--bg);
}

.archive-browser,
.archive-detail-shell {
  min-height: calc(100vh - var(--header-top-h));
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.archive-browser-bar,
.archive-detail-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--line-strong);
  padding: 0 18px;
  background: var(--bg);
}

.archive-browser-title,
.archive-detail-bar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.archive-browser-kicker,
.archive-detail-close,
.archive-detail-date,
.archive-browser-controls__label,
.archive-browser-controls__min,
.archive-browser-controls__max {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--muted);
}

.archive-browser-title strong,
.archive-detail-title,
#archive-detail-title {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.archive-browser-sep,
.archive-detail-sep {
  font-size: 12px;
  color: var(--muted);
}

.archive-detail-close {
  text-decoration: none;
}

.archive-detail-close:hover {
  color: #000;
}

.archive-browser-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.archive-browser-slider {
  width: 120px;
  accent-color: #000;
  cursor: pointer;
}

.archive-browser-controls__value {
  min-width: 12px;
  font-size: 12px;
}

.archive-letter-tabs {
  display: grid;
  grid-template-columns: repeat(26, minmax(0, 1fr));
  border-bottom: 0.5px solid var(--line-strong);
  background: var(--bg);
}

.archive-letter-tab {
  height: 46px;
  border: 0;
  border-right: 0.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  transition: background 120ms ease, color 120ms ease;
}

.archive-letter-tab:first-child {
  border-left: 0.5px solid transparent;
}

.archive-letter-tab.is-active {
  background: #000;
  color: #fff;
}

.archive-letter-tab:hover {
  color: #000;
}

.archive-browser-grid {
  --archive-cols: 6;
  display: grid;
  grid-template-columns: repeat(var(--archive-cols), minmax(0, 1fr));
  border-left: 0.5px solid var(--line);
  background: var(--bg);
}

.archive-participant-tile {
  min-height: 285px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 0.5px solid var(--line);
  border-bottom: 0.5px solid var(--line);
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  transition: background 120ms ease;
}

.archive-participant-tile:hover {
  background: rgba(0, 0, 0, 0.02);
}

.archive-participant-tile__glyph {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 18px;
}

.archive-glyph-image {
  width: min(66%, 170px);
  max-height: 170px;
  object-fit: contain;
  display: block;
  filter: grayscale(100%);
}

.archive-tile-placeholder {
  width: min(66%, 170px);
  aspect-ratio: 1 / 1;
}

.archive-participant-tile__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px 10px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--muted);
}

.archive-participant-tile__code {
  color: rgba(0, 0, 0, 0.62);
}

.archive-participant-tile__id {
  color: rgba(0, 0, 0, 0.25);
}

.archive-empty-state[hidden] {
  display: none !important;
}
.archive-empty-state {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  border-top: 0;
}

.archive-empty-state__inner {
  max-width: 560px;
  text-align: center;
}

.archive-empty-state__kicker {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--muted);
}

.archive-empty-state__title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.archive-empty-state__copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.62);
}

/* detail page */

.archive-detail-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-left: 0.5px solid var(--line);
  background: var(--bg);
}

.archive-detail-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  border-right: 0.5px solid var(--line);
  border-bottom: 0.5px solid var(--line);
  background: var(--bg);
}

.archive-detail-card__glyph {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px 12px;
}

.archive-detail-card__image {
  width: min(72%, 180px);
  max-height: 170px;
  object-fit: contain;
  display: block;
}

.archive-detail-card__empty {
  width: min(72%, 180px);
  aspect-ratio: 1 / 1;
}

.archive-detail-card__footer {
  padding: 0 0 10px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--muted);
}

.archive-detail-date {
  text-align: right;
}

@media (max-width: 1200px) {
  .archive-browser-grid {
    --archive-cols: 4;
  }

  .archive-detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .archive-browser-bar,
  .archive-detail-bar {
    min-height: auto;
    padding: 12px 14px;
    gap: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

  .archive-browser-controls {
    width: 100%;
  }

  .archive-browser-slider {
    flex: 1 1 auto;
    width: auto;
  }

  .archive-letter-tabs {
    grid-template-columns: repeat(13, minmax(0, 1fr));
  }

  .archive-browser-grid {
    --archive-cols: 3 !important;
  }

  .archive-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .archive-letter-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .archive-browser-grid {
    --archive-cols: 2 !important;
  }

  .archive-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-participant-tile {
    min-height: 220px;
  }

  .archive-detail-card {
    min-height: 210px;
  }
}







/* ===== LARGE MONITORS (1920×1080 and up) ===== */
@media (min-width: 1600px) {
  .bottom-actions { gap: 5px; }





  .site-header--top { height: 48px; padding: 0 28px; }
  .site-header--tool { padding-top: 14px; }
  .site-title { font-size: 11px; }
  .site-nav-flat a { font-size: 11px; }
  .progress-step { padding: 0 40px; }
  .progress-step__dot { width: 11px; height: 11px; }
  .progress-step__label { top: 16px; font-size: 10px; font-weight: 600; }
}

/* ===== iMAC (24" ≈ 2240px, 27" ≈ 2560px) ===== */
@media (min-width: 2100px) {
  :root {
    --header-h: 64px;
    --header-top-h: 48px;
    --footer-h: 60px;
  }

  /* Header + nav */
  .site-header--top { padding: 0 40px; }
  .site-header--tool { padding-top: 20px; }
  .site-title { font-size: 13px; }
  .site-nav-flat { gap: 36px; }
  .site-nav-flat a { font-size: 13px; padding: 6px 20px; }
  .progress-step { padding: 0 56px; }
  .progress-step__dot { width: 12px; height: 12px; }
  .progress-step__label { top: 19px; font-size: 9px; }

  /* Footer / bottom bar */
  .bottom-bar { padding: 0 36px; }
  .bottom-bar button,
  .bottom-text { font-size: 12px; }

  /* Glyph grid — taller cells */
  .glyph-cell { min-height: 130px; }
  .glyph-letter { font-size: 12px; }

  /* Landing hero */
  .landing-hero-content { padding: 0 80px 100px; }
  .landing-hero-title { 
    font-size: clamp(84.5px, 3.3vw, 62px); }
  .landing-copy { font-size: 20px; }
  .landing-card-copy { font-size: 14px; }
  .landing-kicker { font-size: 12px; }

  /* Type tester controls */
  .type-controls { padding: 0 36px; height: 60px; }
  .type-controls-left,
  .type-controls-right { gap: 28px; font-size: 12px; }
  .type-slider-group span { font-size: 12px; width: 62px; }
  .type-slider-group input[type="range"] { width: 180px; }

  /* Tool stage */
  .tool-stage { padding: 20px 32px 24px; }

  /* Panel labels on capture/customise */
  .panel-title { font-size: 10px; top: 24px; left: 22px; }
  .readout-legend { top: 60px; left: 22px; font-size: 11px; gap: 12px; }
  .glyph-section-label { font-size: 10px; padding: 18px 22px 10px; }
}

/* Short-screen: compress glyph tray so capture panels keep enough height */
@media (max-height: 820px) and (min-width: 769px) {
  .glyph-cell {
    min-height: 72px;
  }
  .glyph-section-label {
    padding: 8px 18px 4px;
  }
}

@media (max-height: 660px) and (min-width: 769px) {
  .glyph-cell {
    min-height: 52px;
  }
  .glyph-section-label {
    padding: 4px 18px 2px;
  }
}