/* HYPHR Studio — the archive.
   One system, shared with hyphr.net: Geist + Geist Mono, near-black ground,
   paper-white ink, one signal blue. Each project file wears its own brand
   colours on its title bar and inside its case; the chrome stays HYPHR. */

@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/geist-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url('/fonts/geist-mono-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #09090B;
  --bg-2: #0C0C0F;
  --raised: #101116;
  --raised-2: #15161C;
  --ink: #F4F5F6;
  --ink-2: #B9BEC4;
  --muted: #797F86;
  --faint: #4B5057;
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .20);
  --signal: #6274FF;
  --signal-2: #8D9BFF;
  --live: #39D98A;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1500px;
  --pad: clamp(20px, 3vw, 44px);
  --head: 64px;
  --radius: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--signal-2); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; }
.eyebrow { color: var(--muted); }

/* grain, like hyphr.studio v1 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip { position: fixed; z-index: 1000; top: 10px; left: -9999px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; font: 600 13px var(--sans); }
.skip:focus { left: 10px; }

.logo { font-weight: 700; font-size: 18px; letter-spacing: -.045em; display: inline-flex; align-items: center; line-height: 1; }
.fwd { width: .95em; height: .62em; margin-left: .16em; flex: 0 0 auto; }

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: var(--pad);
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(60% 50% at 50% 40%, rgba(98,116,255,.16), transparent 70%),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto, auto;
  transition: opacity .5s var(--ease), visibility .5s;
}
.boot.leaving { opacity: 0; visibility: hidden; }
.boot-inner { width: min(680px, 100%); }
.boot-head { display: flex; align-items: center; gap: 12px; color: var(--ink); margin-bottom: 40px; }
.boot-head .mono { color: var(--muted); }
.boot-lines { list-style: none; display: grid; gap: 8px; margin-bottom: 44px; color: var(--muted); }
.boot-lines li { display: grid; grid-template-columns: 90px 1fr; gap: 16px; opacity: 0; animation: bootline .4s var(--ease) forwards; }
.boot-lines li:nth-child(2) { animation-delay: .25s; }
.boot-lines li:nth-child(3) { animation-delay: .5s; }
.boot-lines b { font-weight: 500; color: var(--ink-2); }
.boot-lines b.ok { color: var(--live); }
@keyframes bootline { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.boot-title { font-size: clamp(44px, 8vw, 96px); font-weight: 600; letter-spacing: -.05em; line-height: .92; margin-bottom: 22px; opacity: 0; animation: bootline .6s var(--ease) .65s forwards; }
.boot-copy { color: var(--ink-2); font-size: clamp(16px, 1.6vw, 19px); max-width: 40ch; margin-bottom: 36px; opacity: 0; animation: bootline .6s var(--ease) .8s forwards; }
.boot-enter {
  display: inline-flex; align-items: center; gap: 18px; background: var(--ink); color: var(--bg);
  padding: 16px 20px 16px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  transition: transform .18s var(--ease), background .18s; opacity: 0; animation: bootline .5s var(--ease) 1s forwards;
}
.boot-enter .mono { color: var(--muted); }
.boot-enter:hover { transform: translateY(-2px); background: #fff; }
.boot-foot { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; color: var(--faint); }

/* ---------- bar ---------- */
.shell { position: relative; z-index: 2; }
.bar { position: sticky; top: 0; z-index: 40; background: rgba(9,9,11,.72); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.bar-inner { height: var(--head); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand .mono { color: var(--muted); }
.bar-hud { color: var(--muted); text-align: center; white-space: nowrap; }
.bar-right { display: flex; align-items: center; justify-content: flex-end; gap: 22px; }
.avail { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.avail i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 10px rgba(57,217,138,.7); }
.avail.off i { background: var(--muted); box-shadow: none; }
.navlink { font-size: 13.5px; color: var(--muted); transition: color .18s; white-space: nowrap; }
.navlink:hover { color: var(--ink); }

/* ---------- intro ---------- */
.intro { padding: clamp(64px, 9vw, 120px) var(--pad) 26px; position: relative; }
.intro-title { font-size: clamp(56px, 11.5vw, 176px); font-weight: 600; letter-spacing: -.055em; line-height: .86; margin-top: 18px; }
.intro-title em { font-style: normal; color: var(--signal); }
.intro-title span, .intro-title em { display: block; }
.intro-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-top: 34px; }
.intro-copy { color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); max-width: 46ch; }
.intro-meta { display: flex; align-items: center; gap: 22px; color: var(--muted); }
.intro-meta .hint { color: var(--faint); }

/* ---------- controls ---------- */
.controls { position: sticky; top: var(--head); z-index: 30; background: rgba(9,9,11,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.controls-inner { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.filters { display: flex; gap: 26px; flex-wrap: wrap; }
.fbtn { padding: 18px 0 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); position: relative; transition: color .18s; white-space: nowrap; }
.fbtn::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 12px; height: 1px; background: var(--ink); transition: right .3s var(--ease); }
.fbtn:hover, .fbtn[aria-pressed="true"] { color: var(--ink); }
.fbtn[aria-pressed="true"]::after { right: 0; }
.fbtn small { color: var(--faint); margin-left: 6px; font-size: 10px; letter-spacing: .08em; }
.views { display: flex; gap: 6px; }
.vbtn { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: background .18s, border-color .18s, color .18s; }
.vbtn:hover { border-color: var(--line-2); color: var(--ink); }
.vbtn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- the field ---------- */
.field {
  position: relative; overflow: hidden; height: clamp(1500px, 135vw, 2400px);
  background:
    radial-gradient(42% 32% at 18% 12%, rgba(98,116,255,.14), transparent 70%),
    radial-gradient(38% 30% at 82% 70%, rgba(98,116,255,.07), transparent 70%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    var(--bg-2);
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
  transition: height .3s var(--ease);
}
.field::after {
  content: "ARCHIVE"; position: absolute; right: -.5vw; bottom: -1vw; pointer-events: none;
  font-size: clamp(120px, 22vw, 360px); font-weight: 700; letter-spacing: -.07em; line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.06);
}
.field-hud { position: absolute; inset: 20px var(--pad) auto; display: flex; justify-content: space-between; color: var(--faint); z-index: 1; }
.field-hint { position: absolute; left: var(--pad); bottom: 22px; color: var(--faint); z-index: 1; text-transform: none; letter-spacing: .04em; font-size: 11px; }
.field-empty { position: absolute; inset: 50% var(--pad) auto; text-align: center; color: var(--muted); }
.layer { position: absolute; inset: 0; z-index: 2; }

.file {
  --p-bg: #101116; --p-fg: #F4F5F6; --p-accent: #6274FF; --w: 30; --x: 8; --y: 8; --r: 0;
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: min(calc(var(--w) * 1vw), 560px); min-width: 280px;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 40px 70px -40px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.04) inset;
  transform: rotate(calc(var(--r) * 1deg));
  transition: transform .35s var(--ease), box-shadow .3s, border-color .3s, opacity .3s, filter .3s, left .5s var(--ease), top .5s var(--ease);
  touch-action: none;
}
.file:hover, .file:focus-within { border-color: var(--line-2); box-shadow: 0 60px 90px -40px rgba(0,0,0,1), 0 0 0 1px rgba(255,255,255,.04); transform: rotate(calc(var(--r) * 1deg)) translateY(-4px); z-index: 60 !important; }
.file.dragging { transition: box-shadow .2s; transform: rotate(0deg) scale(1.02); cursor: grabbing; z-index: 70 !important; box-shadow: 0 80px 120px -40px rgba(0,0,0,1); }
.file.hidden-by-filter { opacity: 0; pointer-events: none; filter: blur(10px); }
.file.is-draft::after { content: "DRAFT"; position: absolute; top: 46px; right: 12px; z-index: 3; background: var(--signal); color: #fff; font: 500 9.5px var(--mono); letter-spacing: .14em; padding: 4px 8px; border-radius: 999px; }

.file-bar {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 12px 11px 14px; background: var(--p-bg); color: var(--p-fg); border-bottom: 1px solid rgba(0,0,0,.18);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; text-align: left; cursor: grab;
}
.file-bar:active { cursor: grabbing; }
.file-bar .grip { display: inline-flex; gap: 3px; opacity: .55; }
.file-bar .grip i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor; }
.file-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--p-accent); box-shadow: 0 0 0 2px rgba(255,255,255,.18); flex: 0 0 auto; }
.file-bar-left { display: inline-flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.file-open { display: block; width: 100%; text-align: left; }
.file-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--raised-2); }
.file-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.file:hover .file-media img { transform: scale(1.035); }
.file-media .ghost { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; font-weight: 600; font-size: clamp(26px, 3vw, 44px); letter-spacing: -.04em; color: var(--p-fg); background: var(--p-bg); }
.file-info { padding: 16px 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: end; }
.file-info h3 { font-size: clamp(22px, 1.8vw, 30px); font-weight: 600; letter-spacing: -.035em; line-height: 1.02; grid-column: 1; }
.file-info .meta { grid-column: 1; color: var(--muted); }
.file-info .open { grid-column: 2; grid-row: 1 / 3; color: var(--ink-2); opacity: .7; transition: opacity .2s, transform .2s; }
.file:hover .file-info .open { opacity: 1; transform: translateX(2px); }

/* index view */
.field.index { height: auto; overflow: visible; padding: 28px 0 60px; background: var(--bg); }
.field.index::after, .field.index .field-hint { display: none; }
.field.index .field-hud { position: relative; inset: auto; padding: 0 var(--pad) 14px; }
.field.index .layer { position: relative; inset: auto; display: block; padding: 0 var(--pad); max-width: var(--max); margin: 0 auto; }
.field.index .file {
  position: relative; left: auto; top: auto; width: auto; min-width: 0; transform: none; border-radius: 0; border: 0; border-top: 1px solid var(--line);
  background: transparent; box-shadow: none; overflow: visible;
}
.field.index .file:hover, .field.index .file:focus-within { transform: none; box-shadow: none; border-color: var(--line); }
.field.index .file.hidden-by-filter { display: none; }
.field.index .file-bar { display: none; }
.field.index .file-open { display: grid; grid-template-columns: 64px minmax(0, 1fr) 150px; gap: 24px; align-items: center; padding: 16px 0; }
.field.index .file-media { aspect-ratio: 4 / 3; width: 150px; border-radius: 10px; grid-column: 3; grid-row: 1; opacity: .9; transition: opacity .2s; }
.field.index .file:hover .file-media { opacity: 1; }
.field.index .file-info { grid-column: 2; grid-row: 1; padding: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; }
.field.index .file-info h3 { font-size: clamp(28px, 3.4vw, 52px); }
.field.index .file-info .open { display: block; grid-column: 2; grid-row: 1 / 3; opacity: 0; }
.field.index .file:hover .file-info .open, .field.index .file:focus-within .file-info .open { opacity: 1; }
.field.index .file-open::before { content: attr(data-num); grid-column: 1; grid-row: 1; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--muted); }
.field.index .file.is-draft::after { top: 22px; right: 170px; }

/* ---------- closing ---------- */
.closing { background: var(--signal); color: #fff; }
.closing-inner { padding: clamp(80px, 11vw, 160px) var(--pad); display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; }
.closing .eyebrow { color: rgba(255,255,255,.7); grid-column: 1 / -1; }
.closing h2 { font-size: clamp(44px, 7vw, 116px); font-weight: 600; letter-spacing: -.05em; line-height: .9; }
.closing p:not(.eyebrow) { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.4; max-width: 40ch; color: rgba(255,255,255,.86); }
.closing-actions { grid-column: 2; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cta { display: inline-flex; align-items: center; gap: 18px; background: var(--bg); color: var(--ink); padding: 15px 18px 15px 20px; border-radius: 12px; font-weight: 600; font-size: 15px; transition: transform .18s var(--ease); }
.cta .mono { color: var(--muted); }
.cta:hover { transform: translateY(-2px); }
.cta-secondary { font-size: 14px; font-weight: 500; color: #fff; border-bottom: 1px solid rgba(255,255,255,.5); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 26px 0; }
.foot-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.foot a:hover { color: var(--ink); }
.clock { font-variant-numeric: tabular-nums; }

/* ---------- case dialog ---------- */
.case { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; background: var(--bg); }
.case-bar { flex: 0 0 auto; height: var(--head); padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
.case-bar-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.case-bar-left .mono { color: var(--muted); white-space: nowrap; }
.case-bar-left b { font-weight: 600; font-size: 15px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-close { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px 9px 14px; font-size: 13px; font-weight: 500; transition: background .15s; }
.case-close .mono { color: var(--muted); }
.case-close:hover { background: var(--raised); }
.case-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.case-hero { --p-bg: #101116; --p-fg: #F4F5F6; --p-accent: #6274FF; background: var(--p-bg); color: var(--p-fg); }
.case-hero-inner { min-height: min(72vh, 760px); padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: 1.5fr .8fr; gap: 40px clamp(30px, 5vw, 80px); align-items: end; }
.case-kicker { color: inherit; opacity: .7; margin-bottom: 26px; }
.case-head h2 { font-size: clamp(52px, 9.5vw, 148px); font-weight: 600; letter-spacing: -.055em; line-height: .88; overflow-wrap: anywhere; }
.case-summary { font-size: clamp(18px, 1.9vw, 26px); font-weight: 500; letter-spacing: -.02em; line-height: 1.3; max-width: 34ch; margin-top: 30px; }
.case-specs { border-top: 1px solid currentColor; }
.case-specs div { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(127,127,127,.35); font-size: 14px; }
.case-specs dt { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; padding-top: 3px; }
.case-specs dd { font-weight: 500; }
.case-actions { grid-column: 2; }
.case-actions a { display: inline-flex; align-items: center; gap: 14px; border: 1px solid currentColor; border-radius: 12px; padding: 13px 16px; font-weight: 600; font-size: 14px; transition: background .18s, color .18s; }
.case-actions a:hover { background: var(--p-fg); color: var(--p-bg); }
.case-actions a .mono { opacity: .7; }

.case-gallery { background: var(--bg); }
.case-gallery-inner { padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(20px, 3vw, 40px); display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(12px, 1.6vw, 24px); }
.case-gallery figure { grid-column: span 12; border-radius: 14px; overflow: hidden; background: var(--raised); border: 1px solid var(--line); }
.case-gallery figure.half { grid-column: span 6; }
.case-gallery figure.third { grid-column: span 4; }
.case-gallery figure.tall { grid-column: span 5; }
.case-gallery figure.wide { grid-column: span 7; }
.case-gallery img { width: 100%; height: auto; }
.case-gallery figcaption { padding: 12px 14px; color: var(--muted); font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; border-top: 1px solid var(--line); }
.case-gallery .empty { grid-column: span 12; min-height: 40vh; display: grid; place-items: center; color: var(--muted); font-size: 15px; }

.case-body { padding-top: clamp(30px, 5vw, 70px); padding-bottom: clamp(40px, 6vw, 90px); display: grid; grid-template-columns: minmax(0, 68ch); gap: 18px; }
.case-body p { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--ink-2); }
.case-body p:first-child { color: var(--ink); }

.case-next { border-top: 1px solid var(--line); }
.case-next-inner { padding-top: 30px; padding-bottom: 60px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.next-file { display: grid; gap: 10px; text-align: left; }
.next-file .mono { color: var(--muted); }
.next-file .row { display: flex; align-items: center; gap: 18px; }
.next-file b { font-size: clamp(32px, 5vw, 72px); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.next-file .arrow { font-size: clamp(24px, 3vw, 40px); color: var(--muted); transition: transform .2s var(--ease), color .2s; }
.next-file:hover .arrow { transform: translateX(6px); color: var(--ink); }
.back-file { border: 1px solid var(--line); border-radius: 10px; padding: 11px 16px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.back-file:hover { background: var(--raised); color: var(--ink); }

/* ---------- toast + noscript ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 600; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 999px; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); max-width: calc(100vw - 40px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 30px; background: var(--bg); text-align: center; font-size: 17px; }
.noscript a { color: var(--signal-2); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .file { min-width: 260px; }
}

@media (max-width: 1080px) {
  #shuffleBtn { display: none; }
  .intro-meta .hint { display: none; }

  /* the editorial feed: no dragging on touch-sized screens, a deliberate column instead */
  .field, .field.index { height: auto; overflow: visible; padding: 8px 0 40px; background: var(--bg); }
  .field::after, .field-hint { display: none; }
  .field-hud { position: relative; inset: auto; padding: 14px var(--pad) 4px; }
  .layer, .field.index .layer { position: relative; inset: auto; display: block; padding: 0; }
  .file, .field.index .file { position: relative; left: auto; top: auto; width: auto; min-width: 0; transform: none; border-radius: 0; border: 0; border-top: 1px solid var(--line); background: transparent; box-shadow: none; overflow: visible; }
  .file:hover, .file:focus-within { transform: none; box-shadow: none; border-color: var(--line); }
  .file.hidden-by-filter, .field.index .file.hidden-by-filter { display: none; }
  .file-bar, .field.index .file-bar { display: flex; background: transparent; color: var(--muted); border: 0; padding: 18px var(--pad) 10px; cursor: default; }
  .file-bar .grip { display: none; }
  .file-open, .field.index .file-open { display: block; padding: 0; }
  .field.index .file-open::before { display: none; }
  .file-media, .field.index .file-media { width: auto; margin: 0 var(--pad); border-radius: 14px; aspect-ratio: 4 / 3; border: 1px solid var(--line); opacity: 1; }
  .file-info, .field.index .file-info { padding: 16px var(--pad) 26px; grid-template-columns: 1fr auto; }
  .file-info h3, .field.index .file-info h3 { font-size: clamp(30px, 9vw, 44px); }
  .file-info .open, .field.index .file-info .open { display: block; opacity: 1; }
  .file.is-draft::after, .field.index .file.is-draft::after { top: 16px; right: var(--pad); }

}

@media (min-width: 641px) and (max-width: 1080px) {
  .layer, .field.index .layer { display: grid; grid-template-columns: 1fr 1fr; column-gap: 0; }
  .file:nth-child(odd) .file-media { margin-right: calc(var(--pad) / 2); }
  .file:nth-child(even) .file-media { margin-left: calc(var(--pad) / 2); }
  .file:nth-child(even) .file-bar, .file:nth-child(even) .file-info { padding-left: calc(var(--pad) / 2); }
  .file:nth-child(odd) .file-bar, .file:nth-child(odd) .file-info { padding-right: calc(var(--pad) / 2); }
}

@media (max-width: 900px) {
  .bar-inner { grid-template-columns: 1fr auto; }
  .bar-hud { display: none; }
  .bar-right { gap: 14px; }
  .avail span { display: none; }
  .intro { padding-top: 56px; }
  .intro-title { font-size: clamp(56px, 16vw, 120px); }
  .controls-inner { align-items: stretch; flex-direction: column; gap: 0; }
  .filters { gap: 22px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding: 0 var(--pad); margin: 0 calc(-1 * var(--pad)); }
  .filters::-webkit-scrollbar { display: none; }
  .fbtn { padding: 16px 0 14px; }
  .fbtn::after { bottom: 10px; }
  .views { padding: 8px 0 10px; }
  .closing-inner { grid-template-columns: 1fr; }
  .closing-actions { grid-column: 1; }
  .case-hero-inner { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; }
  .case-actions { grid-column: 1; }
  .case-gallery figure.half, .case-gallery figure.third, .case-gallery figure.tall, .case-gallery figure.wide { grid-column: span 12; }
  .case-bar-left b { display: none; }
}

@media (max-width: 480px) {
  .boot-foot { flex-direction: column; gap: 6px; }
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .clock { order: 3; }
  .case-close span.mono { display: none; }
}

@media (hover: none) {
  .file-info .open { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .boot-lines li, .boot-title, .boot-copy, .boot-enter { opacity: 1; }
  .file:hover .file-media img { transform: none; }
}
