/* styles.css — doubletrouble.studio
   All visual variables come from CSS custom properties set on .dt-root by app.jsx,
   which interpolates between Berlin (0) and Melbourne (100) on every change.
*/

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg, #0e0e0e);
  color: var(--fg, #e8e2d5);
  font-family: var(--font, 'Inter Tight', system-ui, sans-serif);
  font-weight: 400;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: var(--track, -0.025em);
  transition: background .6s ease, color .6s ease;
}

::selection { background: var(--fg); color: var(--bg); }

button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }

.dt-root {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  position: relative;
  font-family: var(--font, 'Inter Tight', system-ui, sans-serif);
  transition: background .6s ease, color .6s ease;
}

/* film grain — opacity comes from --grain */
.dt-grain {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: var(--grain, 0.05);
  mix-blend-mode: overlay;
}

/* ── Status bar ───────────────────────────────────────────────── */
.dt-statusbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; gap: 10px; align-items: center;
  height: 28px;
  padding: 0 16px;
  font-size: 11px;
  font-feature-settings: "tnum";
  letter-spacing: 0;
  color: var(--fg-dim);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  text-transform: uppercase;
}
.dt-status-sep { opacity: .4; }
.dt-status-spacer { flex: 1; }
.dt-blink {
  color: var(--accent);
  animation: dt-blink 1.4s steps(2, start) infinite;
}
@keyframes dt-blink { 50% { opacity: 0; } }

/* ── Sidebar ──────────────────────────────────────────────────── */
/* Desktop: a collapsed rail (44px) reveals on edge-hover into a 280px panel.
   Mobile: a top bar + a slide-in drawer triggered by the hamburger. */
.dt-edge-hot {
  position: fixed; left: 0; top: 28px; bottom: 0;
  width: 24px;
  z-index: 39;
}
.dt-sidebar {
  position: fixed; top: 28px; bottom: 0; left: 0;
  z-index: 40;
  display: flex;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--rule);
  transition: width .35s cubic-bezier(.2,.7,.2,1),
              transform .35s cubic-bezier(.2,.7,.2,1),
              background .6s ease, border-color .6s ease;
  overflow: hidden;
}
.dt-sidebar.is-desktop { width: 44px; }
.dt-sidebar.is-desktop.is-open { width: 344px; box-shadow: 0 0 32px rgba(0,0,0,.18); }

/* Rail (collapsed) — vertical wordmark + ticks */
.dt-rail {
  width: 44px; flex: 0 0 44px;
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0 14px;
  gap: 14px;
  border-right: 1px solid var(--rule);
  transition: opacity .2s ease;
}
.dt-sidebar.is-open .dt-rail { opacity: 0; pointer-events: none; }
.dt-rail-mark {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--fg-dim);
  text-transform: uppercase;
  user-select: none;
}
.dt-rail-sep { width: 14px; height: 1px; background: var(--rule-strong); }
.dt-rail-ticks { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.dt-rail-tick {
  appearance: none; background: none; border: 0; padding: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-family: ui-monospace, monospace;
  font-size: 9.5px; letter-spacing: 0;
  color: var(--fg-dimmer);
  cursor: pointer;
  border-radius: 4px;
  transition: color .2s, background .2s;
}
.dt-rail-tick:hover { color: var(--fg); background: color-mix(in oklab, var(--fg) 6%, transparent); }
.dt-rail-tick.is-active { color: var(--accent); }
.dt-rail-morph {
  position: relative;
  margin-top: auto;
  width: 100%;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
}
/* The actual <input range> is rotated vertical and sits invisibly on top of
   the visible track so it captures pointer/keyboard input. */
.dt-rail-morph-input {
  position: absolute;
  top: 4px; left: 50%;
  width: 96px; height: 14px;
  margin: 0; padding: 0;
  transform: translateX(-50%) rotate(90deg);
  transform-origin: center;
  -webkit-appearance: none; appearance: none;
  background: transparent;
  cursor: ns-resize;
  opacity: 0;
  z-index: 2;
}
.dt-rail-morph-input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; }
.dt-rail-morph-input::-moz-range-thumb { width: 14px; height: 14px; border: 0; }

.dt-rail-morph-track {
  position: relative;
  width: 1px;
  height: 96px;
  background: var(--rule-strong);
  pointer-events: none;
}
.dt-rail-morph-track::before,
.dt-rail-morph-track::after {
  content: "";
  position: absolute; left: 50%;
  width: 5px; height: 1px;
  background: var(--rule-strong);
  transform: translateX(-50%);
}
.dt-rail-morph-track::before { top: 0; }
.dt-rail-morph-track::after { bottom: 0; }
.dt-rail-morph-dot {
  position: absolute;
  left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  transform: translate(-50%, -50%);
  transition: top .25s cubic-bezier(.2,.7,.2,1);
}
.dt-rail-morph-num {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.dt-rail-morph:hover .dt-rail-morph-dot {
  transform: translate(-50%, -50%) scale(1.25);
}

/* Panel (expanded) */
.dt-panel {
  width: 300px; flex: 0 0 300px;
  display: flex; flex-direction: column;
  padding: 28px 24px 20px;
  opacity: 0; transform: translateX(-12px);
  transition: opacity .25s ease .05s, transform .3s cubic-bezier(.2,.7,.2,1);
  overflow-y: auto;
}
.dt-sidebar.is-open .dt-panel { opacity: 1; transform: none; }
.dt-sidebar.is-collapsed.is-desktop .dt-panel { pointer-events: none; }
.dt-side-close {
  position: absolute; top: 18px; right: 18px;
  appearance: none; background: none; border: 0;
  color: var(--fg-dim); cursor: pointer;
  width: 24px; height: 24px; border-radius: 6px;
  font-size: 13px; line-height: 1;
}
.dt-side-close:hover { color: var(--fg); background: color-mix(in oklab, var(--fg) 6%, transparent); }
.dt-sidebar.is-desktop .dt-side-close { display: none; }

.dt-side-top { margin-bottom: 28px; position: relative; }
.dt-mark {
  display: inline-flex; align-items: baseline; gap: 0;
  text-decoration: none;
  color: var(--fg);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.dt-mark-a { font-style: normal; }
.dt-mark-b { font-style: italic; opacity: .92; }
.dt-mark-dot {
  display: inline-block; width: 6px; height: 6px;
  margin-left: 4px; margin-bottom: 1px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateY(-2px);
}
.dt-side-tag {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--fg-dim);
  max-width: 240px;
  letter-spacing: -0.005em;
}

/* Mobile top bar + drawer */
.dt-topbar {
  position: fixed; top: 28px; left: 0; right: 0;
  z-index: 45;
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px;
  height: 52px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--rule);
}
.dt-burger {
  appearance: none; background: none; border: 0;
  width: 32px; height: 32px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 0 6px;
  cursor: pointer;
}
.dt-burger span {
  display: block; height: 1.5px; background: var(--fg);
  transition: transform .25s, opacity .2s;
}
.dt-topbar-mark { flex: 1; }
.dt-topbar-side {
  display: flex; align-items: center; gap: 6px;
  font-family: ui-monospace, monospace; font-size: 11px;
  color: var(--fg-dim);
}

.dt-drawer-scrim {
  position: fixed; inset: 0;
  background: color-mix(in oklab, var(--bg) 70%, black 30%);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  z-index: 44;
  animation: dt-fade .2s ease;
}
.dt-sidebar.is-mobile {
  top: 0; bottom: 0;
  width: min(86vw, 320px);
  border-right: 1px solid var(--rule);
  transform: translateX(-110%);
  z-index: 60;
}
.dt-sidebar.is-mobile.is-open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.4); }
.dt-sidebar.is-mobile .dt-rail { display: none; }
.dt-sidebar.is-mobile .dt-panel {
  width: 100%; flex: 1;
  opacity: 1; transform: none;
  padding: 24px 22px 24px;
}
.dt-sidebar.is-mobile .dt-side-close { display: grid; place-items: center; }

/* nav */
.dt-side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dt-nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  text-decoration: none;
  color: var(--fg-dim);
  border-top: 1px solid var(--rule);
  font-size: 13px;
  letter-spacing: -0.01em;
  transition: color .25s ease, padding .25s ease;
}
.dt-nav-link:last-child { border-bottom: 1px solid var(--rule); }
.dt-nav-link:hover { color: var(--fg); padding-left: 4px; }
.dt-nav-n {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: var(--fg-dimmer);
  letter-spacing: 0;
}
.dt-nav-link.is-active { color: var(--fg); }
.dt-nav-link.is-active .dt-nav-n { color: var(--accent); }
.dt-nav-bar {
  position: absolute; right: 0; top: 50%;
  width: 0; height: 1px;
  background: var(--fg);
  transform: translateY(-50%);
  transition: width .3s cubic-bezier(.2,.7,.2,1);
}
.dt-nav-link.is-active .dt-nav-bar { width: 16px; }

/* morph slider in sidebar */
.dt-side-morph {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.dt-morph-hd {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-family: ui-monospace, monospace;
}
.dt-morph-pct { color: var(--accent); }
.dt-morph-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 1px;
  margin: 12px 0 8px;
  background: var(--rule-strong);
  outline: none;
}
.dt-morph-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px;
  background: var(--accent);
  border: 2px solid var(--bg);
  border-radius: 50%;
  cursor: ew-resize;
}
.dt-morph-slider::-moz-range-thumb {
  width: 12px; height: 12px;
  background: var(--accent);
  border: 2px solid var(--bg);
  border-radius: 50%;
  cursor: ew-resize;
}
.dt-morph-foot {
  font-size: 10.5px;
  color: var(--fg-dim);
  font-family: ui-monospace, monospace;
  letter-spacing: 0;
}

.dt-side-bottom {
  display: flex; align-items: center; gap: 6px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  font-family: ui-monospace, monospace;
  color: var(--fg-dim);
}
.dt-lang-btn {
  background: none; border: none; padding: 0;
  color: var(--fg-dim); cursor: pointer;
  font-family: inherit;
}
.dt-lang-btn.is-active { color: var(--fg); }
.dt-lang-sep { opacity: .4; }
.dt-side-coords { margin-left: auto; }

/* ── Main / sections ──────────────────────────────────────────── */
.dt-main {
  margin-left: 44px;        /* room for the collapsed rail on desktop */
  margin-top: 28px;
  padding-right: 0;
  position: relative;
  z-index: 2;
}
@media (max-width: 860px) {
  .dt-main { margin-left: 0; margin-top: calc(28px + 52px); }
}

.dt-section {
  position: relative;
  padding: var(--pad-y) 56px;
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.dt-section.is-shown { opacity: 1; transform: none; }
.dt-section-inner { max-width: 1240px; }

.dt-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  margin-bottom: 36px;
}
.dt-eyebrow-dot {
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}

.dt-h2 {
  margin: 0 0 24px;
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.dt-section-sub {
  font-size: 17px;
  line-height: 1.45;
  color: var(--fg-dim);
  max-width: 56ch;
  letter-spacing: -0.012em;
  margin: 0 0 48px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.dt-hero { padding: 24px 0 0; }
.dt-hero-eyebrow {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 36px;
}
.dt-coords { color: var(--accent); }
.dt-hero-display {
  margin: 0;
  font-size: var(--hero-size, 13vw);
  line-height: var(--hero-leading, 0.86);
  font-weight: 500;
  letter-spacing: -0.055em;
  display: flex; flex-direction: column;
  /* `gap` cannot be negative; rely on the line-height of each line for tight stacking. */
}
.dt-hero-line { display: block; }
.dt-hero-line-a {
  /* stays uppercase-ish through Berlin; lowercases through Melbourne via mix */
  font-style: normal;
}
.dt-hero-conj {
  font-style: italic;
  font-weight: 400;
  margin-left: calc(0.3em - 0.3em * var(--mix, 0.5));
  color: var(--accent);
  font-size: 0.92em;
}
.dt-hero-line-b {
  font-style: italic;
  margin-left: 0.5em;
}
.dt-hero-foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.dt-hero-sub {
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -0.013em;
  color: var(--fg);
  margin: 0;
  max-width: 50ch;
  text-wrap: pretty;
}
.dt-hero-meta {
  display: flex; flex-direction: column; gap: 14px;
  margin: 0;
  align-self: end;
}
.dt-meta-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
  font-size: 12.5px;
  font-family: ui-monospace, monospace;
  letter-spacing: 0;
  color: var(--fg);
}
.dt-meta-row dt { color: var(--fg-dim); text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.06em; padding-top: 2px; }
.dt-meta-row dd { margin: 0; }

/* ── Manifest ─────────────────────────────────────────────────── */
.dt-manifest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 60px;
  margin-top: 24px;
}
.dt-manifest-punch {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; gap: 4px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 0;
  margin-bottom: 12px;
}
.dt-punch-line {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.dt-punch-line:nth-child(2) { color: var(--fg-dim); }
.dt-punch-line:nth-child(3) { color: var(--accent); font-style: italic; }

.dt-manifest-essay { display: flex; flex-direction: column; gap: 22px; }
.dt-essay {
  position: relative;
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  padding-left: 100px;
  text-wrap: pretty;
}
.dt-essay-mark {
  position: absolute;
  left: 0; top: 6px;
  width: 84px;
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dt-essay-a .dt-essay-mark { color: var(--accent); }
.dt-essay-b .dt-essay-mark { color: var(--fg); }
.dt-essay-c .dt-essay-mark { color: var(--fg); }
.dt-essay-d .dt-essay-mark { color: var(--fg-dimmer); }
.dt-essay-mark { font-weight: 500; }

.dt-manifest-bullets {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--rule);
}
.dt-manifest-bullets li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  letter-spacing: -0.01em;
  align-items: baseline;
}
.dt-bullet-n {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--fg-dim);
}

/* ── Work ─────────────────────────────────────────────────────── */
.dt-work-hd { margin-bottom: 40px; }
.dt-work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 220px;
  gap: 20px;
}
.dt-work-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1), background .25s, border-color .25s;
}
.dt-work-card.is-shown { opacity: 1; transform: none; }
.dt-work-card:hover { background: var(--surface-alt); }
.dt-work-card.tone-berlin { --card-fg: var(--accent); }
.dt-work-card.tone-melbourne { --card-fg: var(--fg); }

.dt-work-thumb {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  border-bottom: 1px solid var(--rule);
}
.dt-work-thumb-grid {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr);
}
.dt-work-thumb-grid span {
  border-right: 1px solid color-mix(in oklab, var(--fg) 4%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--fg) 4%, transparent);
}
.dt-work-thumb-mark {
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  display: flex; justify-content: space-between;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}
.dt-work-card .dt-work-n { color: var(--card-fg); }
.dt-work-thumb-glyph {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-size: clamp(80px, 14vw, 240px);
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: var(--card-fg);
  opacity: 0.78;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .25s;
  transform: translateY(0);
}
.dt-work-card:hover .dt-work-thumb-glyph { transform: translateY(-4px) scale(1.02); }
.dt-work-meta {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.dt-work-title {
  font-size: 18px;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.dt-work-sub {
  font-size: 11.5px;
  font-family: ui-monospace, monospace;
  color: var(--fg-dim);
  display: flex; flex-wrap: wrap; gap: 6px;
  letter-spacing: 0;
}
.dt-dotsep { opacity: .5; }
.dt-work-open {
  position: absolute;
  bottom: 14px; right: 16px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--card-fg);
  opacity: 0; transform: translateX(-4px);
  transition: opacity .25s, transform .25s;
}
.dt-work-card:hover .dt-work-open { opacity: 1; transform: none; }

/* Work takeover */
.dt-takeover {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in oklab, var(--bg) 88%, black 40%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: block;
  overflow: hidden;
  animation: dt-fade .25s ease;
}
@keyframes dt-fade { from { opacity: 0; } to { opacity: 1; } }
.dt-takeover-inner {
  position: absolute; inset: 0;
  margin: 0;
  background: var(--bg);
  border: 0;
  border-radius: 0;
  min-height: 100vh;
  min-width: 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  animation: dt-rise .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes dt-rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.dt-takeover-hd {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.dt-takeover-hd-l { display: flex; gap: 14px; align-items: baseline; color: var(--fg-dim); }
.dt-takeover-hd-l .dt-work-n { color: var(--accent); }
.dt-takeover-slug { color: var(--fg); }
.dt-takeover-x {
  background: none; border: 1px solid var(--rule);
  color: var(--fg); padding: 6px 12px; border-radius: var(--radius);
  cursor: pointer; font-family: inherit; font-size: 11px;
  transition: background .2s, border-color .2s;
}
.dt-takeover-x:hover { background: var(--surface); border-color: var(--rule-strong); }

.dt-takeover-hero {
  position: relative;
  height: 56vh;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, color-mix(in oklab, var(--fg) 5%, transparent) 14px 15px),
    var(--surface);
  overflow: hidden;
  display: grid; place-items: center;
}
.dt-takeover-hero-grid {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr);
}
.dt-takeover-hero-grid span {
  border-right: 1px solid color-mix(in oklab, var(--fg) 4%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--fg) 4%, transparent);
}
.dt-takeover-hero-mark {
  position: relative;
  font-size: clamp(48px, 10vw, 180px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--accent);
  text-align: center;
  padding: 0 24px;
}
.dt-takeover-hero-stamp {
  position: absolute;
  bottom: 16px; left: 22px; right: 22px;
  display: flex; justify-content: space-between;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dt-takeover-body {
  padding: 56px 56px 80px;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.dt-takeover-title {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
  line-height: 1;
}
.dt-takeover-sum {
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.018em;
  color: var(--fg);
  max-width: 36ch;
  margin: 0 0 56px;
  text-wrap: pretty;
}
.dt-takeover-cols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.dt-takeover-cols p { margin: 0; font-size: 14.5px; line-height: 1.55; letter-spacing: -0.01em; color: var(--fg); }
.dt-takeover-lbl {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}
.dt-takeover-strip {
  margin-top: 56px;
  display: grid; grid-template-columns: 2fr 1fr 1.4fr;
  gap: 12px;
  height: 180px;
}
.dt-strip-a { background: var(--accent); border-radius: var(--radius); }
.dt-strip-b { background: var(--surface-alt); border: 1px solid var(--rule); border-radius: var(--radius); }
.dt-strip-c {
  background:
    repeating-linear-gradient(0deg, transparent 0 4px, color-mix(in oklab, var(--fg) 18%, transparent) 4px 5px),
    var(--surface);
  border-radius: var(--radius);
}

/* ── Lab ──────────────────────────────────────────────────────── */
.dt-lab-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 150px;
  gap: 16px;
}
.dt-lab-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), background .25s;
}
.dt-lab-card.is-shown { opacity: 1; transform: none; }
.dt-lab-card:hover { background: var(--surface-alt); }
.dt-lab-canvas {
  flex: 1;
  position: relative;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent) 18%, transparent) 0%, transparent 50%),
    var(--surface-alt);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.dt-lab-glyph {
  font-size: clamp(60px, 8vw, 120px);
  color: var(--accent);
  line-height: 1;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.dt-lab-card:hover .dt-lab-glyph { transform: rotate(45deg); }
.dt-lab-n {
  position: absolute;
  top: 12px; left: 14px;
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--fg-dim);
  letter-spacing: 0.06em;
}
.dt-lab-meta {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.dt-lab-tag {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}
.dt-lab-title { font-size: 15px; letter-spacing: -0.018em; font-weight: 500; }
.dt-lab-note { font-size: 12.5px; color: var(--fg-dim); letter-spacing: -0.005em; line-height: 1.4; }

/* ── Philosophy ───────────────────────────────────────────────── */
.dt-phi-list {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--rule);
}
.dt-phi-item {
  display: grid;
  grid-template-columns: 80px 1fr 2fr;
  gap: 28px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  opacity: 0; transform: translateY(16px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.dt-phi-item.is-shown { opacity: 1; transform: none; }
.dt-phi-n {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.dt-phi-title {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
.dt-phi-body {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--fg-dim);
  letter-spacing: -0.01em;
  max-width: 52ch;
  text-wrap: pretty;
}

/* ── Console / terminal ──────────────────────────────────────── */
.dt-term {
  margin-top: 32px;
  background: #0a0a0a;
  color: #e8e2d5;
  border: 1px solid #2a2924;
  border-radius: var(--radius);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  overflow: hidden;
  max-width: 880px;
  cursor: text;
  transition: box-shadow .25s;
}
.dt-term.is-focused { box-shadow: 0 0 0 1px var(--accent); }
.dt-term-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #141414;
  border-bottom: 1px solid #2a2924;
}
.dt-term-dot { width: 10px; height: 10px; border-radius: 50%; }
.dt-term-dot.dot-r { background: #ff5f56; }
.dt-term-dot.dot-y { background: #ffbd2e; }
.dt-term-dot.dot-g { background: #27c93f; }
.dt-term-title {
  margin-left: 12px;
  font-size: 11.5px;
  color: #8a857a;
  letter-spacing: 0;
}
.dt-term-body {
  padding: 16px 18px 18px;
  min-height: 280px; max-height: 360px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0;
}
.dt-term-line { display: flex; gap: 8px; }
.dt-term-line.dt-term-out { color: #c8c1b3; padding-left: 0; }
.dt-term-prompt { color: #5cd47a; flex-shrink: 0; }
.dt-term-sys { color: #8a857a; flex-shrink: 0; }
.dt-term-input { display: flex; flex: 1; }
.dt-term-input input {
  flex: 1;
  background: transparent;
  border: 0; outline: 0;
  color: #e8e2d5;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}
.dt-term-caret {
  width: 8px; height: 16px;
  background: var(--accent);
  margin-left: -2px;
  animation: dt-blink 1s steps(2, start) infinite;
  align-self: center;
}

/* ── Contact ──────────────────────────────────────────────────── */
.dt-contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.dt-contact-cta {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 8px 16px;
  padding: 32px 32px 36px;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius);
  text-decoration: none;
  align-content: center;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.dt-contact-cta:hover { transform: translateY(-2px); }
.dt-cta-dot {
  grid-row: 1 / span 2;
  width: 12px; height: 12px;
  background: var(--bg);
  border-radius: 50%;
  align-self: center;
}
.dt-cta-label {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}
.dt-cta-mail {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0;
  opacity: 0.7;
}

.dt-contact-list {
  margin: 0; display: flex; flex-direction: column;
}
.dt-contact-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  letter-spacing: -0.01em;
}
.dt-contact-row dt { color: var(--fg-dim); font-family: ui-monospace, monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.dt-contact-row dd { margin: 0; }

.dt-footer {
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0;
  flex-wrap: wrap; gap: 12px;
}
.dt-footer-r { display: flex; gap: 16px; }

/* ── PixelMelt thumbnail (work card) ─────────────────────────── */
.dt-pm-thumb {
  position: absolute; inset: 0;
  background: #0a0a0a;
  overflow: hidden;
  cursor: pointer;
}
.dt-pm-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  image-rendering: pixelated;
  transition: filter .35s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.dt-work-card:hover .dt-pm-canvas { filter: blur(2.5px); transform: scale(1.015); }
/* Subtle CRT-ish scanline texture */
.dt-pm-scan {
  pointer-events: none;
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,0.03) 0 1px,
      transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: 0.5;
}
.dt-pm-overlay {
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  display: flex; justify-content: space-between;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
  text-shadow: 0 1px 0 rgba(0,0,0,.55);
  pointer-events: none;
  mix-blend-mode: difference;
  z-index: 2;
}
.dt-pm-overlay .dt-pm-n { color: var(--accent); }
.dt-pm-glyph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: clamp(80px, 14vw, 220px);
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: var(--accent);
  opacity: 0.0;
  pointer-events: none;
  transition: opacity .35s ease;
  mix-blend-mode: difference;
}
.dt-work-card:hover .dt-pm-glyph { opacity: 0.55; }
.dt-work-card:hover .dt-pm-scan { opacity: 0.7; }

/* ── Gallery grid (inside takeover) ──────────────────────────── */
.dt-gal {
  margin-top: 64px;
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.dt-gal-hd {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  margin-bottom: 22px;
}
.dt-gal-lbl { color: var(--accent); }
.dt-gal-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 150px;
  gap: 12px;
  width: 100%;
}
.dt-gal-tile {
  position: relative;
  appearance: none; background: none; padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  min-width: 0;
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1),
              border-color .25s ease;
}
.dt-gal-tile.is-shown { opacity: 1; transform: none; }
.dt-gal-tile:hover { border-color: var(--accent); }

/* Two stacked images per tile: real (sharp) on top, pixelated below.
   On hover the real image dissolves out, revealing the pixelated layer +
   a faint scanline glitch — "image disintegrates into its own raster". */
.dt-gal-imgwrap {
  position: absolute; inset: 0;
  overflow: hidden;
  background: #0a0a0a;
}
.dt-gal-img,
.dt-gal-img-px {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.dt-gal-img {
  filter: grayscale(0.35) contrast(1.05);
  transition: filter .35s ease, opacity .55s ease, transform .8s cubic-bezier(.2,.7,.2,1), clip-path .55s ease;
  z-index: 2;
}
.dt-gal-img-px {
  image-rendering: pixelated;
  filter: saturate(1.1) contrast(1.15);
  transform: scale(1.03);
  opacity: 0;
  transition: opacity .45s ease;
  z-index: 1;
}
.dt-gal-tile:hover .dt-gal-img {
  filter: none;
  /* Dissolve: vertical scan-wipe combined with fade so it feels like the
     image disintegrates into its raster underneath. */
  opacity: 0;
  transform: scale(1.02);
}
.dt-gal-tile:hover .dt-gal-img-px {
  opacity: 1;
  transform: scale(1);
}
/* Animated dither veil over the pixel layer for a "decoding" feel */
.dt-gal-tile::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,0.07) 0 1px,
      transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: 3;
}
.dt-gal-tile:hover::after { opacity: 1; }
.dt-gal-tile-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
}
.dt-gal-tile-meta {
  position: absolute; left: 12px; right: 12px; bottom: 10px;
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: #f1ede2;
  text-shadow: 0 1px 0 rgba(0,0,0,.45);
  z-index: 2;
}
.dt-gal-tile-n { color: var(--accent); }
.dt-gal-tile-kind { opacity: 0.85; }
.dt-gal-tile-cap { opacity: 0.9; flex-basis: 100%; font-family: var(--font); font-size: 12px; letter-spacing: -0.005em; }
.dt-gal-play {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: grid; place-items: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2;
}

/* ── Lightbox ────────────────────────────────────────────────── */
.dt-lb {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,6,6,0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  animation: dt-fade .25s ease;
  color: #efeae0;
}
.dt-lb-hd {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.dt-lb-hd-l { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.dt-lb-n { color: var(--accent); }
.dt-lb-kind { color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
.dt-lb-cap { color: rgba(255,255,255,0.85); font-family: var(--font); letter-spacing: -0.005em; font-size: 13px; }
.dt-lb-x {
  background: none; border: 1px solid rgba(255,255,255,0.18);
  color: #efeae0; padding: 6px 12px; border-radius: 4px;
  cursor: pointer; font-family: inherit; font-size: 11px;
  transition: background .2s, border-color .2s;
}
.dt-lb-x:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.4); }
.dt-lb-stage {
  position: relative;
  display: grid; place-items: center;
  padding: 28px 80px;
  overflow: hidden;
  min-height: 0;
}
.dt-lb-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.dt-lb-video {
  position: relative;
  width: min(100%, calc((100vh - 240px) * 16 / 9));
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 200px);
  background: #000;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.dt-lb-video iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0;
}
.dt-lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  appearance: none; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  width: 48px; height: 48px;
  display: grid; place-items: center;
  color: #efeae0; cursor: pointer;
  font-size: 20px;
  border-radius: 50%;
  z-index: 5;
  transition: background .2s, border-color .2s, transform .2s;
}
.dt-lb-nav:hover { background: rgba(255,255,255,0.12); border-color: var(--accent); }
.dt-lb-prev { left: 22px; }
.dt-lb-next { right: 22px; }
.dt-lb-ft {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 22px;
}
.dt-lb-strip {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.dt-lb-strip-tile {
  position: relative;
  appearance: none; background: none;
  flex: 0 0 88px; height: 56px;
  border: 1px solid rgba(255,255,255,0.14);
  padding: 0; border-radius: 2px;
  overflow: hidden; cursor: pointer;
  opacity: 0.6;
  transition: opacity .2s, border-color .2s;
}
.dt-lb-strip-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dt-lb-strip-tile:hover { opacity: 1; }
.dt-lb-strip-tile.is-active { opacity: 1; border-color: var(--accent); }
.dt-lb-strip-play {
  position: absolute; bottom: 4px; right: 6px;
  font-size: 9px; color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,.6);
}

/* density modes */
.density-tight .dt-h2 { font-size: clamp(32px, 5vw, 64px); }
.density-tight .dt-section-sub { font-size: 15px; margin-bottom: 32px; }
.density-airy .dt-h2 { font-size: clamp(48px, 7vw, 104px); margin-bottom: 36px; }
.density-airy .dt-section-sub { font-size: 19px; margin-bottom: 64px; }

/* ─── Responsive ─────────────────────────────────────────────── */

/* Tablet / large phone */
@media (max-width: 1100px) {
  .dt-section { padding: clamp(70px, 12vw, 110px) 40px; }
  .dt-work-grid { grid-template-columns: repeat(8, 1fr); }
  .dt-work-card { grid-column: span 4 !important; grid-row: span 2 !important; }
  .dt-lab-grid { grid-template-columns: repeat(6, 1fr); }
  .dt-lab-card { grid-column: span 3 !important; grid-row: span 2 !important; }
  .dt-takeover-body { padding: 40px 32px 64px; }
}

/* Phone */
@media (max-width: 860px) {
  .dt-section { padding: clamp(56px, 10vw, 80px) clamp(18px, 5vw, 28px); }
  .dt-section-inner { max-width: 100%; }
  .dt-eyebrow { margin-bottom: 20px; font-size: 10.5px; }

  /* Status bar gets denser; keep WAW + lang + live; drop domain, est, DPS, morph */
  .dt-statusbar { font-size: 10px; gap: 8px; padding: 0 12px; height: 30px; }
  .dt-statusbar > :nth-child(1),   /* domain */
  .dt-statusbar > :nth-child(2),   /* sep */
  .dt-statusbar > :nth-child(3),   /* est */
  .dt-statusbar > :nth-child(4),   /* sep */
  .dt-statusbar > :nth-child(6),   /* sep after WAW */
  .dt-statusbar > :nth-child(7),   /* DPS time */
  .dt-statusbar > :nth-child(9),   /* morph counter */
  .dt-statusbar > :nth-child(10) { /* sep after morph */ display: none; }

  /* Mobile topbar — taller, touch-friendly */
  .dt-topbar { top: 30px; height: 56px; padding: 0 14px; gap: 12px; }
  .dt-burger { width: 44px; height: 44px; padding: 0; }
  .dt-burger span { width: 18px; margin: 0 auto; }
  .dt-topbar-mark { font-size: 18px; }
  .dt-topbar-side .dt-lang-btn { padding: 6px 8px; min-width: 28px; }

  /* Main offset: status (30) + topbar (56) */
  .dt-main { margin-top: calc(30px + 56px); }

  /* Hero */
  .dt-hero { padding-top: 8px; }
  .dt-hero-eyebrow { padding-bottom: 10px; margin-bottom: 24px; font-size: 10px; }
  .dt-hero-display { font-size: clamp(60px, 19vw, 124px); letter-spacing: -0.05em; line-height: 0.88; }
  .dt-hero-line-b { margin-left: 0.15em; }
  .dt-hero-conj { margin-left: 0; font-size: 0.85em; }
  .dt-hero-foot { grid-template-columns: 1fr; gap: 22px; margin-top: 32px; padding-top: 20px; }
  .dt-hero-sub { font-size: 16px; line-height: 1.42; }
  .dt-meta-row { grid-template-columns: 84px 1fr; gap: 10px; font-size: 12px; padding-bottom: 8px; }

  /* Headings + body */
  .dt-h2 { font-size: clamp(34px, 9vw, 56px); }
  .dt-section-sub { font-size: 15px; margin-bottom: 28px; }

  /* Manifest */
  .dt-manifest-grid { grid-template-columns: 1fr; gap: 28px; }
  .dt-punch-line { font-size: clamp(22px, 6.5vw, 32px); }
  .dt-essay { padding-left: 0; font-size: 15px; }
  .dt-essay-mark {
    position: static; display: block; width: auto;
    margin-bottom: 6px;
  }
  .dt-manifest-bullets li { grid-template-columns: 28px 1fr; font-size: 13px; }

  /* Work */
  .dt-work-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 14px; }
  .dt-work-card { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .dt-work-thumb { aspect-ratio: 16 / 10; flex: 0 0 auto; }
  .dt-work-meta { padding: 12px 14px 14px; }
  .dt-work-title { font-size: 16px; }
  .dt-work-sub { font-size: 11px; }
  .dt-work-open { display: none; }

  /* Takeover */
  .dt-takeover-inner { min-height: 100vh; }
  .dt-takeover-hd { padding: 12px 16px; font-size: 11px; }
  .dt-takeover-x { padding: 8px 12px; font-size: 11px; min-height: 36px; }
  .dt-takeover-hero { height: 42vh; min-height: 280px; }
  .dt-takeover-hero-mark { font-size: clamp(40px, 13vw, 80px); padding: 0 16px; }
  .dt-takeover-hero-stamp {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 4px;
    bottom: 14px; left: 16px; right: 16px;
    font-size: 10px;
  }
  .dt-takeover-body { padding: 32px 22px 56px; }
  .dt-takeover-title { font-size: clamp(28px, 7vw, 40px); }
  .dt-takeover-sum { font-size: 17px; margin-bottom: 28px; max-width: none; }
  .dt-takeover-cols { grid-template-columns: 1fr; gap: 22px; padding-top: 22px; }
  .dt-takeover-strip { height: 100px; margin-top: 40px; }

  /* Lab */
  .dt-lab-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; gap: 12px; }
  .dt-lab-card { grid-column: span 1 !important; grid-row: span 1 !important; }
  .dt-lab-canvas { aspect-ratio: auto; }
  .dt-lab-glyph { font-size: clamp(40px, 12vw, 64px); }
  .dt-lab-title { font-size: 14px; }
  .dt-lab-note { font-size: 11.5px; line-height: 1.35; }
  .dt-lab-tag { font-size: 9.5px; }

  /* Philosophy */
  .dt-phi-list { margin-top: 16px; }
  .dt-phi-item {
    grid-template-columns: 44px 1fr;
    gap: 14px 14px;
    padding: 24px 0;
  }
  .dt-phi-title { grid-column: 2; font-size: clamp(20px, 5vw, 28px); }
  .dt-phi-body { grid-column: 1 / -1; font-size: 14.5px; max-width: none; }

  /* Gallery + Lightbox */
  .dt-gal { margin-top: 36px; padding-top: 22px; }
  .dt-gal-hd { margin-bottom: 16px; font-size: 10px; }
  .dt-gal-grid { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 120px; gap: 8px; }
  .dt-gal-tile { grid-column: span 3 !important; grid-row: span 2 !important; }
  .dt-gal-tile-meta { left: 10px; right: 10px; bottom: 8px; font-size: 9.5px; gap: 4px 8px; }
  .dt-gal-tile-cap {
    display: block;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .dt-gal-play { width: 26px; height: 26px; top: 8px; right: 8px; }
  .dt-gal-play svg { width: 14px; height: 14px; }

  .dt-lb-stage { padding: 12px 8px; }
  .dt-lb-nav { width: 44px; height: 44px; font-size: 18px; }
  .dt-lb-prev { left: 8px; }
  .dt-lb-next { right: 8px; }
  .dt-lb-hd { padding: 10px 14px; font-size: 11px; flex-wrap: wrap; gap: 8px; }
  .dt-lb-hd-l { gap: 8px; }
  .dt-lb-cap { display: block; font-size: 11px; width: 100%; }
  .dt-lb-strip { gap: 6px; }
  .dt-lb-strip-tile { flex-basis: 56px; height: 38px; }
  .dt-lb-x { padding: 8px 12px; min-height: 36px; }

  /* Console */
  .dt-term { max-width: none; margin-top: 22px; }
  .dt-term-body { padding: 12px 14px; min-height: 220px; max-height: 300px; font-size: 12px; }
  .dt-term-title { font-size: 10px; }
  /* Shorten the prompt label so the input has room to type on narrow screens */
  .dt-term-prompt { font-size: 11px; }
  .dt-term-prompt::first-letter { text-transform: lowercase; }

  /* Contact */
  .dt-contact-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 22px; margin-top: 22px; }
  .dt-contact-cta { padding: 22px; }
  .dt-cta-label { font-size: clamp(24px, 7vw, 32px); }
  .dt-contact-row { grid-template-columns: 80px 1fr; font-size: 13px; }

  /* Footer */
  .dt-footer { flex-direction: column; align-items: flex-start; }
}

/* Very small phones */
@media (max-width: 420px) {
  .dt-section { padding: 44px 16px; }
  .dt-hero-display { font-size: clamp(52px, 17vw, 96px); }
  .dt-hero-eyebrow .dt-coords { font-size: 9.5px; }
  .dt-lab-grid { grid-template-columns: 1fr; grid-auto-rows: 150px; }
  .dt-meta-row { grid-template-columns: 1fr; }
  .dt-meta-row dt { padding-top: 0; }
  .dt-meta-row dd { padding-bottom: 4px; }
  .dt-gal-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .dt-gal-tile { grid-column: 1 / -1 !important; grid-row: span 1 !important; }
  .dt-takeover-hero { height: 38vh; min-height: 240px; }
  .dt-topbar-mark { font-size: 16px; }
}
