/* ============================================================
   MAC DEPT. - The Atelier canvas, Living Shelf edition
   Near-black canvas, ambient glow, film grain, glass nav,
   champagne accent, icon physics, stretchy controls,
   ticker-flip prices.
   ============================================================ */

/* Self-hosted fonts (SIL OFL), served same-origin from /macdept/fonts/ so the
   hub's strict CSP (font-src 'self') allows them with no third-party request. */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/macdept/fonts/instrument-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/macdept/fonts/instrument-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/macdept/fonts/instrument-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/macdept/fonts/instrument-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/macdept/fonts/instrument-sans-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/macdept/fonts/instrument-serif-400.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/macdept/fonts/instrument-serif-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/macdept/fonts/geist-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/macdept/fonts/geist-mono-500.woff2") format("woff2"); }

:root {
  --font-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "Geist Mono", "SF Mono", ui-monospace, monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-glide: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-swap: cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1);

  --radius-card: 22px;
  --radius-icon: 14px;
  --max-width: 1180px;

  --t-fast: 0.2s;
  --t-travel: 0.28s;
}

html[data-theme="dark"] {
  color-scheme: dark;
  /* Cool engineered near-black canvas + cool neutral ramp (Blueprint) */
  --bg: #08090b;
  --bg-elevated: #0d0e11;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.145);
  --ink: #f3f4f6;
  --ink-secondary: #9a9ea8;
  --ink-tertiary: #61646e;
  /* Muted sage accent */
  --accent: #93b3a4;
  --accent-deep: #6e9484;
  --accent-soft: rgba(147, 179, 164, 0.12);
  --accent-ink: #08090b;
  --glass: rgba(11, 12, 15, 0.62);
  --glass-border: rgba(255, 255, 255, 0.09);
  /* Material elevation (Atelier Depth): multi-tier shadows, inner top highlight, soft top-to-bottom card gradient */
  --card-grad-top: rgba(255, 255, 255, 0.055);
  --card-grad-bot: rgba(255, 255, 255, 0.012);
  --inner-hi: rgba(255, 255, 255, 0.07);
  --media-bg: #0d0e11;
  --shadow-e1: 0 1px 1px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3), 0 8px 16px -8px rgba(0, 0, 0, 0.5);
  --shadow-e2: 0 1px 1px rgba(0, 0, 0, 0.45), 0 4px 10px -3px rgba(0, 0, 0, 0.5), 0 18px 44px -18px rgba(0, 0, 0, 0.7);
  --shadow-e3: 0 2px 4px rgba(0, 0, 0, 0.5), 0 12px 28px -8px rgba(0, 0, 0, 0.6), 0 40px 80px -28px rgba(0, 0, 0, 0.85);
  --shadow-card: var(--shadow-e1);
  --glow-a: rgba(147, 179, 164, 0.06);
  --glow-b: rgba(90, 120, 150, 0.05);
  --icon-outline: rgba(148, 152, 160, 0.14);
  --kbd-bg: rgba(255, 255, 255, 0.06);
  --thumb-bg: rgba(255, 255, 255, 0.1);
  --palette-bg: rgba(14, 15, 20, 0.92);
  --field-bg: rgba(255, 255, 255, 0.04);
  --grid-line: rgba(255, 255, 255, 0.028);
  --drift-opacity: 0.15;
}

html[data-theme="light"] {
  color-scheme: light;
  /* Clean cool off-white canvas */
  --bg: #fbfbfc;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-hover: #ffffff;
  --hairline: rgba(12, 14, 22, 0.09);
  --hairline-strong: rgba(12, 14, 22, 0.17);
  --ink: #14161b;
  --ink-secondary: #565a64;
  --ink-tertiary: #8b8f99;
  /* Muted sage accent */
  --accent: #4c7b67;
  --accent-deep: #3b6353;
  --accent-soft: rgba(76, 123, 103, 0.1);
  --accent-ink: #ffffff;
  --glass: rgba(251, 251, 252, 0.72);
  --glass-border: rgba(12, 14, 22, 0.08);
  --card-grad-top: rgba(255, 255, 255, 0.9);
  --card-grad-bot: rgba(255, 255, 255, 0.5);
  --inner-hi: rgba(255, 255, 255, 0.9);
  --media-bg: #eceef2;
  --shadow-e1: 0 1px 2px rgba(20, 22, 30, 0.05), 0 4px 10px -4px rgba(20, 22, 30, 0.1);
  --shadow-e2: 0 1px 2px rgba(20, 22, 30, 0.06), 0 8px 20px -6px rgba(20, 22, 30, 0.12), 0 22px 48px -20px rgba(20, 22, 30, 0.16);
  --shadow-e3: 0 2px 4px rgba(20, 22, 30, 0.07), 0 16px 36px -10px rgba(20, 22, 30, 0.14), 0 44px 84px -30px rgba(20, 22, 30, 0.2);
  --shadow-card: var(--shadow-e1);
  --glow-a: rgba(76, 123, 103, 0.08);
  --glow-b: rgba(120, 150, 175, 0.07);
  --icon-outline: rgba(12, 14, 22, 0.1);
  --kbd-bg: rgba(12, 14, 22, 0.05);
  --thumb-bg: #ffffff;
  --palette-bg: rgba(251, 251, 252, 0.94);
  --field-bg: #ffffff;
  --grid-line: rgba(12, 14, 22, 0.03);
  --drift-opacity: 0.14;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100dvh;
}

/* Faint engineered blueprint grid, fixed and inert, radially masked so it fades
   out away from the top. Sits behind all content on every page (Blueprint). */
.grid-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
}

/* Ambient glow field, fixed so it never repaints on scroll */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 12% -8%, var(--glow-a), transparent 65%),
    radial-gradient(1100px 700px at 92% 12%, var(--glow-b), transparent 62%),
    radial-gradient(800px 900px at 50% 118%, var(--glow-a), transparent 60%);
}

/* Film grain, fixed and inert */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page { position: relative; z-index: 2; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { max-width: 100%; }

::selection { background: var(--accent); color: var(--accent-ink); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Theme cross-fade: applied briefly by JS during a toggle */
html.theme-fading body,
html.theme-fading .nav,
html.theme-fading .app-card,
html.theme-fading .feat-card,
html.theme-fading .window-card,
html.theme-fading .collection-card,
html.theme-fading .rail-btn,
html.theme-fading .tabs,
html.theme-fading footer,
html.theme-fading .search-btn,
html.theme-fading .cta-submit,
html.theme-fading .curator-note,
html.theme-fading .feature-item,
html.theme-fading .form-card,
html.theme-fading .og-banner,
html.theme-fading .icon-tile,
html.theme-fading .guide-table-wrap,
html.theme-fading .pick-card,
html.theme-fading .faq-item {
  transition:
    background-color 0.55s var(--ease-swap),
    color 0.55s var(--ease-swap),
    border-color 0.55s var(--ease-swap),
    box-shadow 0.55s var(--ease-swap);
}
html.theme-fading .ambient { transition: opacity 0.55s var(--ease-swap); }

/* ============================================================
   NAV - floating glass island
   ============================================================ */
.nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1080px, calc(100% - 28px));
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 10px 9px 22px;
  border-radius: 100px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-e2);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.wordmark .dept {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 21px;
  color: var(--accent);
  letter-spacing: 0;
  display: inline-block;
  transition: transform var(--t-fast) var(--ease-spring);
}
.wordmark:hover .dept { transform: rotate(-4deg) translateY(-1px); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: color var(--t-fast) var(--ease-glide), background-color var(--t-fast) var(--ease-glide);
}
.nav-links a:hover { color: var(--ink); background: var(--surface-hover); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 8px 0 14px;
  border-radius: 100px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color var(--t-fast) var(--ease-glide), color var(--t-fast) var(--ease-glide), transform var(--t-fast) var(--ease-glide);
}
.search-btn:hover { color: var(--ink); border-color: var(--hairline-strong); }
.search-btn:active { transform: scale(0.96); }
.search-btn svg { opacity: 0.7; }
.search-btn kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--kbd-bg);
  border: 1px solid var(--hairline);
  color: var(--ink-tertiary);
  letter-spacing: 0.04em;
}

.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 100px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t-fast) var(--ease-glide), transform var(--t-fast) var(--ease-glide);
}
.theme-toggle:hover { border-color: var(--hairline-strong); }
.theme-toggle:active { transform: scale(0.96); }
.theme-toggle svg {
  position: absolute;
  transition: opacity 0.4s var(--ease-swap), transform 0.4s var(--ease-swap), filter 0.4s var(--ease-swap);
}
html[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0; transform: scale(0.25); filter: blur(4px); }
html[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: scale(1); filter: blur(0); }
html[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; transform: scale(1); filter: blur(0); }
html[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: scale(0.25); filter: blur(4px); }

.cta-submit {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-glide), color var(--t-fast) var(--ease-glide), transform var(--t-fast) var(--ease-glide);
}
.cta-submit:hover { background: var(--accent-deep); color: var(--accent-ink); }
.cta-submit:active { transform: scale(0.96); }

/* ============================================================
   HERO with floating icon depth field and the window card
   ============================================================ */
.hero {
  position: relative;
  padding-top: clamp(150px, 18vh, 200px);
  padding-bottom: clamp(24px, 4vh, 48px);
}
.hero .wrap { position: relative; }

/* Floating app-icon cluster: four real icons fanned along a semicircular arc in
   the upper-right of the hero, sitting above and around the featured window card
   like a peacock fan. Desktop only, reduced-motion + touch safe. The whole
   cluster drifts gently (clusterBob on the container via translate/rotate) and
   each tile bobs a touch (tileFloat), while the JS pointer parallax writes to the
   CONTAINER's transform only, so nothing clobbers the per-tile fan angle. */
.depth-field {
  position: absolute;
  top: -58px;
  right: -8px;
  width: 340px;
  height: 160px;
  z-index: -1;
  pointer-events: none;
  overflow: visible;
  will-change: transform, translate, rotate;
}
.depth-tile {
  position: absolute;
  border-radius: 26%;
  box-shadow: var(--shadow-e2);
  opacity: 1;
  /* Static fan angle lives on transform; the float animation drives the separate
     translate + rotate properties, so the two never fight. */
  transform: rotate(var(--angle, 0deg));
  will-change: translate, rotate;
}
.depth-tile img { width: 100%; height: 100%; display: block; border-radius: inherit; }
html[data-theme="light"] .depth-tile { opacity: 1; }

/* Gentle continuous ambient drift. Container bobs slowly as one; each tile adds a
   subtle staggered drift on top. All on translate/rotate so transform stays free
   for the static fan angle and the JS container parallax. */
@media (prefers-reduced-motion: no-preference) {
  .depth-field { animation: clusterBob 22s ease-in-out infinite; }
  .depth-tile { animation: tileFloat var(--fdur, 14s) ease-in-out var(--fdelay, 0s) infinite; }
}
@keyframes clusterBob {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50%      { translate: 0 -8px; rotate: 0.6deg; }
}
@keyframes tileFloat {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50%      { translate: var(--fx, 0) var(--fy, -6px); rotate: var(--fr, 1deg); }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 400px);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
/* Grid items default to min-width auto; the rail's max-content width must not stretch them */
.hero-copy { min-width: 0; }

.kicker {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--accent);
  letter-spacing: 0.01em;
  display: block;
  margin-bottom: 20px;
}
.page-head .kicker { margin-bottom: 0; }

.hero h1 {
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.02;
  font-weight: 620;
  letter-spacing: -0.032em;
  max-width: 15ch;
  text-wrap: balance;
}
.hero h1 em, .page-title em, .section-title em, .detail-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.page-head {
  padding-top: clamp(140px, 16vh, 190px);
  padding-bottom: clamp(36px, 5vh, 60px);
}

.page-title {
  margin-top: 22px;
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 620;
  line-height: 1.04;
  letter-spacing: -0.034em;
  max-width: 18ch;
  text-wrap: balance;
}

.lede {
  margin-top: 26px;
  font-size: clamp(16.5px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: 52ch;
  text-wrap: pretty;
}
.lede strong { color: var(--ink); font-weight: 600; }
.page-head .lede { margin-top: 20px; max-width: 62ch; }

/* Hero items: blur-up fade reveal (Gallery Wall), staggered by --d.
   JS adds .risen on load. Blur-to-sharp + fade + slight rise, graceful. */
.js .fade-item { opacity: 0; }
.js .fade-item.risen { animation: fade-up 0.72s var(--ease-out-expo) var(--d, 0s) both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ============================================================
   CATEGORY RAIL - travelling, stretching underline
   ============================================================ */
.rail-scroll { margin-top: 36px; }
.rail {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.rail-btn {
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-tertiary);
  background: transparent;
  border: 0;
  padding: 2px 0;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease-glide);
}
.rail-btn:hover { color: var(--ink-secondary); }
.rail-btn[aria-pressed="true"] { color: var(--accent); font-weight: 600; }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-tertiary);
}
.crumbs a { color: var(--ink-tertiary); transition: color var(--t-fast) var(--ease-glide); }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before {
  content: "/";
  margin-right: 10px;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-tertiary);
  opacity: 0.6;
}
.crumbs [aria-current="page"] { color: var(--ink-secondary); }
.page-head .crumbs { margin-bottom: 28px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.apps-section { padding-top: clamp(36px, 5vh, 60px); padding-bottom: clamp(56px, 8vh, 96px); }
.page-head + .apps-section, .page-head + main .apps-section { padding-top: 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.section-title {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 620;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.section-sub {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-tertiary);
}

/* Hot / Latest: a physical slider (thumb animated by JS with squash) */
.tabs {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 100px;
  border: 1px solid var(--hairline);
  background: var(--surface);
}
.tabs button {
  position: relative;
  z-index: 1;
  width: 84px;
  min-height: 36px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-tertiary);
  transition: color var(--t-fast) var(--ease-glide);
}
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button:active { transform: scale(0.96); }
.tabs .thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 84px;
  height: calc(100% - 8px);
  border-radius: 100px;
  background: var(--thumb-bg);
  border: 1px solid var(--hairline);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  will-change: transform;
}

/* ============================================================
   THE SHELF - app grid
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 18px;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
  transition:
    background-color var(--t-fast) var(--ease-glide),
    border-color var(--t-fast) var(--ease-glide),
    transform 0.5s var(--ease-out-expo),
    box-shadow 0.5s var(--ease-out-expo);
}
.app-card:hover { background: var(--surface-hover); border-color: var(--hairline-strong); }
.app-card:active .app-icon { transform: scale(0.96); }
.app-card.is-hidden { display: none; }

/* JS-applied card entrance: blur-up fade (Gallery Wall), staggered. */
.js .prep { opacity: 0; }
/* backwards (not both): the entrance holds the pre-animation state during the
   stagger delay, but releases transform/filter back to the base afterwards so
   the accent :hover lift is not pinned by the finished animation. The final
   keyframe is identity, so releasing causes no visual jump. */
.js .placed { animation: place 0.62s var(--ease-out-expo) var(--d, 0s) backwards; }
@keyframes place {
  from { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.icon-stage { perspective: 340px; }
.app-icon {
  width: 58px;
  height: 58px;
  display: block;
  border-radius: var(--radius-icon);
  will-change: transform;
  transition: transform 0.45s var(--ease-spring);
}
.app-icon.tilting { transition: none; }

/* Typographic freshness marker, no badges */
.badge-fresh {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.01em;
  padding-top: 2px;
  white-space: nowrap;
}

.app-name { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.app-desc {
  margin-top: 5px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  min-height: 34px;
}
.cat-tag {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  white-space: nowrap;
}

/* Price ticker: chars flip up on hover, one by one.
   Prices stay visible on touch devices and under reduced motion. */
.price {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price .ch { display: inline-block; will-change: transform, opacity; }
@media (hover: hover) {
  .js .app-card .price .ch,
  .js .feat-card .price .ch,
  .js .og-card .price .ch,
  .js .window-card .price .ch { opacity: 0; transform: translateY(0.55em); filter: blur(3px); }
  .js .app-card:hover .price .ch,
  .js .app-card:focus-visible .price .ch,
  .js .feat-card:hover .price .ch,
  .js .feat-card:focus-visible .price .ch,
  .js .og-card:hover .price .ch,
  .js .og-card:focus-visible .price .ch,
  .js .window-card:hover .price .ch,
  .js .window-card:focus-visible .price .ch {
    animation: tick 0.24s var(--ease-swap) calc(var(--ci) * 0.018s) both;
  }
}
@keyframes tick {
  from { opacity: 0; transform: translateY(0.55em); filter: blur(3px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ============================================================
   FEATURED - On Display cards + shared og media
   ============================================================ */
.featured { padding-top: clamp(36px, 5vh, 64px); }
.featured-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 760px) { .featured-row { grid-template-columns: 1fr; } }

.feat-card, .window-card, .og-card {
  position: relative;
  display: block;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
  overflow: hidden;
  transition:
    background-color var(--t-fast) var(--ease-glide),
    border-color var(--t-fast) var(--ease-glide),
    transform 0.5s var(--ease-out-expo),
    box-shadow 0.5s var(--ease-out-expo);
}
.feat-card:hover, .window-card:hover, .og-card:hover { background: var(--surface-hover); border-color: var(--hairline-strong); }

/* ============================================================
   ACCENT HOVER - Echo "Theodore HQ collection" feel
   Every app card lifts, draws a 1.5px ring in the app's own
   colour and casts a soft glow of the same hue. --ring / --glow
   are set inline per card from the icon's dominant colour.
   ============================================================ */
.app-card, .feat-card, .og-card, .window-card {
  --ring: var(--accent);
  --glow: var(--accent-soft);
}
@media (hover: hover) {
  .app-card:hover, .feat-card:hover, .og-card:hover, .window-card:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-e3), 0 0 0 1.5px var(--ring), 0 22px 54px -18px var(--glow);
  }
}

.feat-media {
  position: relative;
  aspect-ratio: 40 / 21;
  overflow: hidden;
  border-radius: calc(var(--radius-card) - 5px);
  margin: 5px 5px 0;
  background: var(--bg-elevated);
}
.feat-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  will-change: transform;
  transition: transform 0.55s var(--ease-spring);
}
.feat-img.tilting { transition: none; }
/* Inner hairline so bright OG art keeps a defined edge */
.feat-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--icon-outline);
  pointer-events: none;
}
/* Graceful fallback when an OG image is missing */
.no-og .feat-img { display: none; }
.feat-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 140% at 20% 0%, var(--accent-soft), transparent 60%), var(--bg-elevated);
}
.no-og .feat-fallback { display: flex; }
.feat-fallback img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
}

.feat-caption {
  display: flex;
  align-items: center; /* icon centres optically against the full two-line text block */
  gap: 14px;
  padding: 16px 20px 18px;
}
.feat-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 11px;
  margin-top: 0; /* centred against the text lines (window card overrides for its spine-label overlap) */
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.4);
  will-change: transform;
  transition: transform 0.45s var(--ease-spring);
}
.feat-card:hover .feat-icon, .window-card:hover .feat-icon { transform: translateY(-3px) rotate(-2deg); }
/* og-card icons follow the cursor (3D tilt) so they need no smoothing while tracking */
.feat-icon.tilting { transition: none; }
/* Text block takes the full remaining width so the row spans the whole card and
   the price (or category) reads as a deliberate right-hand anchor, not dead space. */
.feat-text { flex: 1 1 auto; min-width: 0; }
.feat-name { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
/* Tagline is hard-capped at two lines so no caption ever runs to three */
.feat-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.45;
  text-wrap: pretty;
}
.feat-caption .price { flex-shrink: 0; }
@media (max-width: 600px) {
  .feat-caption { padding: 14px 16px 16px; }
  .feat-card .feat-caption .price { display: none; }
}

/* ============================================================
   OG SHELF CARDS - the large image card used across every grid
   ============================================================ */
/* 3-up desktop so the larger cards breathe, 2-up tablet, 1-up mobile.
   Compound selector keeps it winning over the base .grid at every width. */
.grid.grid-og {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 900px) { .grid.grid-og { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid.grid-og { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

.og-card { display: block; }
.og-card.is-hidden { display: none; }

/* Icon sits in a perspective stage so it tilts toward the cursor like the shelf icons */
.og-icon-stage {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* "Just In" typographic mark, floated over the image corner */
.og-card .feat-media .badge-fresh {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  padding: 3px 10px 4px;
  border-radius: 100px;
  background: rgba(10, 10, 13, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  font-size: 13px;
  padding-top: 3px;
}
html[data-theme="light"] .og-card .feat-media .badge-fresh {
  background: rgba(252, 251, 248, 0.62);
  border-color: rgba(22, 20, 28, 0.14);
}

/* ============================================================
   ON DISPLAY - framed as a display case so the weekly spotlight
   stays clearly larger than the main grid below it
   ============================================================ */
.display-case {
  padding: clamp(12px, 1.6vw, 18px);
  border: 1px solid var(--hairline);
  border-radius: calc(var(--radius-card) + 8px);
  background: var(--bg-elevated);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
}

/* ============================================================
   IN THE WINDOW - the hero's featured card
   A larger, more premium grid card. A fine ruled header carries the
   eyebrow and status label; the OG art shows whole in its natural
   landscape ratio (object-fit: cover, no crop); a generous caption
   beneath holds the icon, name, tagline and a self-drawing "View App".
   ============================================================ */
.hero-window { position: relative; }
.window-card { display: block; background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--bg-elevated); }

/* Ruled header */
.window-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 20px 13px;
  border-bottom: 1px solid var(--hairline);
}
.window-eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 0.01em;
}
/* "In the Window" status label carries the sage accent + a soft signal pulse */
.window-pick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.window-pulse {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: winpulse 2.4s var(--ease-out-expo) infinite;
}
@keyframes winpulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Landscape media: whole image in its natural ratio, no per-app crop */
.window-media {
  aspect-ratio: 40 / 21;
  margin: 5px 5px 0;
  border-radius: calc(var(--radius-card) - 5px);
}
.window-media .feat-img {
  transform: scale(1.02);
  transform-origin: 50% 50%;
  object-position: 50% 50%;
}
.window-media::after {
  box-shadow: inset 0 0 0 1px var(--icon-outline);
  border-bottom: none;
}

/* Caption */
.window-body {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 20px 6px;
}
.window-icon-stage { flex: none; }
.window-icon { width: 52px; height: 52px; border-radius: 13px; }
.window-text { flex: 1 1 auto; min-width: 0; }
.window-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
/* Small typographic beta mark set beside the name */
.window-beta {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.01em;
  transform: translateY(-1px);
}
.window-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

/* Foot: category on the left, self-drawing "View App" on the right */
.window-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 13px 20px 16px;
}
.window-foot .cat-tag { color: var(--ink-tertiary); }
.window-view {
  position: relative;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.window-ul {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0.34);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
}
.window-card:hover .window-ul,
.window-card:focus-visible .window-ul { transform: scaleX(1); }

/* ============================================================
   OG BANNER - app pages with a good marketing image
   ============================================================ */
.og-banner-section { padding-top: clamp(8px, 2vh, 20px); }
.og-banner {
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
  padding: 5px;
}
.og-banner .feat-media { margin: 0; aspect-ratio: 21 / 9; }
@media (max-width: 700px) { .og-banner .feat-media { aspect-ratio: 40 / 21; } }

/* ============================================================
   APP DETAIL PAGE
   ============================================================ */
.detail-head {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 34px);
  flex-wrap: wrap;
}
.detail-icon {
  width: clamp(88px, 10vw, 116px);
  height: clamp(88px, 10vw, 116px);
  flex: none;
  display: block;
  border-radius: 24px;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.5);
  will-change: transform;
  transition: transform 0.45s var(--ease-spring);
}
.detail-title-group { min-width: 0; }
.detail-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.detail-title-row .badge-fresh { font-size: 19px; padding-top: 0; }
.detail-head h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 620;
  line-height: 1.05;
  letter-spacing: -0.034em;
}
.detail-tagline {
  margin-top: 10px;
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.3;
  text-wrap: balance;
}

.meta-row {
  margin-top: 26px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 0;
  font-size: 14px;
  color: var(--ink-secondary);
}
.meta-row > * { display: inline-flex; align-items: center; }
.meta-row .sep {
  margin: 0 12px;
  width: 1px;
  height: 14px;
  background: var(--hairline-strong);
  flex: none;
}
.meta-row .meta-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-right: 8px;
}
.meta-row a { border-bottom: 1px solid var(--hairline-strong); transition: color var(--t-fast) var(--ease-glide), border-color var(--t-fast) var(--ease-glide); }
.meta-row a:hover { color: var(--ink); border-color: var(--accent); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background-color var(--t-fast) var(--ease-glide), color var(--t-fast) var(--ease-glide), transform var(--t-fast) var(--ease-glide);
}
.btn-primary:hover { background: var(--accent-deep); color: var(--accent-ink); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary svg { transition: transform var(--t-travel) var(--ease-spring); }
.btn-primary:hover svg { transform: translate(2px, -2px); }

.detail-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.detail-body {
  padding-top: clamp(40px, 6vh, 72px);
  padding-bottom: clamp(70px, 9vh, 120px);
}
.detail-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 880px) { .detail-cols { grid-template-columns: 1fr; } }

.prose p {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-secondary);
  text-wrap: pretty;
}
.prose p + p { margin-top: 20px; }

.detail-h {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 18px;
}

.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  border-radius: 15px;
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
  font-size: 14.5px;
  font-weight: 550;
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
  transition: border-color var(--t-fast) var(--ease-glide), background-color var(--t-fast) var(--ease-glide);
}
.feature-item:hover { border-color: var(--hairline-strong); background: var(--surface-hover); }
/* Each Details line carries a relevant inline-SVG icon in the sage accent,
   chosen per feature by the resolver in site-src/icons.mjs. */
.feature-item .feat-ic {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--accent);
  opacity: 0.9;
  transition: opacity var(--t-fast) var(--ease-glide);
}
.feature-item:hover .feat-ic { opacity: 1; }
.feature-item .feat-label { flex: 1; }

.curator-note {
  margin-top: 34px;
  position: relative;
  padding: 26px 28px 28px;
  border-radius: var(--radius-card);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  box-shadow: var(--shadow-card);
}
.curator-note .detail-h { color: var(--accent); margin-bottom: 12px; }
.curator-note blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}
.curator-note .sig {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-tertiary);
  font-weight: 500;
}

.related { padding-bottom: clamp(80px, 10vh, 140px); }

/* ============================================================
   COLLECTIONS - fanned stacks
   ============================================================ */
.collections { padding-bottom: clamp(64px, 9vh, 110px); }

.collections-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 980px) { .collections-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .collections-grid { grid-template-columns: 1fr; } }

.collection-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
  transition: background-color var(--t-fast) var(--ease-glide), border-color var(--t-fast) var(--ease-glide);
}
.collection-card:hover { background: var(--surface-hover); border-color: var(--hairline-strong); }

.mini-stack { display: flex; flex-shrink: 0; }
.mini-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  transition: transform 0.4s var(--ease-spring);
  will-change: transform;
}
.mini-icon + .mini-icon { margin-left: -14px; }
.mini-icon:nth-child(1) { transform: rotate(-5deg); }
.mini-icon:nth-child(2) { z-index: 1; }
.mini-icon:nth-child(3) { transform: rotate(5deg); }
.collection-card:hover .mini-icon:nth-child(1) { transform: rotate(-11deg) translate(-5px, -2px); }
.collection-card:hover .mini-icon:nth-child(2) { transform: translateY(-5px); }
.collection-card:hover .mini-icon:nth-child(3) { transform: rotate(11deg) translate(5px, -2px); }

.collection-name {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.collection-meta { margin-top: 4px; font-size: 12.5px; color: var(--ink-tertiary); }
.collection-meta .num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.collections-all {
  display: inline-block;
  margin-top: 26px;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 2px;
  transition: color var(--t-fast) var(--ease-glide), border-color var(--t-fast) var(--ease-glide);
}
.collections-all:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   ICON ROOM
   ============================================================ */
.icon-room { padding-bottom: clamp(80px, 10vh, 140px); }
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}
.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  border-radius: 18px;
  border: 1px solid transparent;
  transition:
    background-color var(--t-fast) var(--ease-glide),
    border-color var(--t-fast) var(--ease-glide);
}
.icon-tile img {
  width: 60px;
  height: 60px;
  display: block;
  border-radius: 14px;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.45);
  will-change: transform;
  transition: transform 0.45s var(--ease-spring), box-shadow 0.45s var(--ease-glide);
}
.icon-tile:hover { background: var(--surface); border-color: var(--hairline); }
.icon-tile:hover img {
  transform: scale(1.12) rotate(-2deg);
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, 0.55);
}
.icon-tile:active img { transform: scale(1.04); }

/* ============================================================
   SUBMIT PAGE
   ============================================================ */
.submit-section { padding-bottom: clamp(80px, 10vh, 140px); }
.submit-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 880px) { .submit-cols { grid-template-columns: 1fr; } }

.guidelines {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guidelines .feature-item { align-items: flex-start; font-weight: 500; }
.guidelines .feature-item strong { font-weight: 600; }
.guidelines .feature-item div { font-size: 14.5px; line-height: 1.55; }
.guidelines .feature-item p { margin-top: 3px; font-size: 13.5px; font-weight: 400; color: var(--ink-secondary); }

.form-card {
  padding: 28px;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }
.field input,
.field textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  border-radius: 13px;
  padding: 13px 15px;
  outline: none;
  transition: border-color var(--t-fast) var(--ease-glide), background-color var(--t-fast) var(--ease-glide);
}
.field textarea { resize: vertical; min-height: 88px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-tertiary); }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.form-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-tertiary);
  text-wrap: pretty;
}

/* ============================================================
   404
   ============================================================ */
.err-hero {
  min-height: 72dvh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-top: 140px;
  padding-bottom: 80px;
}
.err-code {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(90px, 16vw, 180px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  margin-top: clamp(64px, 9vh, 104px);
  border-top: 1px solid var(--hairline);
  padding: 56px 0 40px;
}
.foot-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.foot-brand { max-width: 300px; }
.foot-brand .wordmark { font-size: 22px; }
.foot-brand .wordmark .dept { font-size: 24px; }
.foot-tag {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-tertiary);
  line-height: 1.6;
  text-wrap: pretty;
}
.foot-sign {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  margin-top: 20px;
}
.foot-cols { display: flex; gap: clamp(32px, 6vw, 88px); flex-wrap: wrap; }
.foot-col h4 {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 16px;
}
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.foot-col a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  font-size: 14px;
  color: var(--ink-secondary);
  transition: color var(--t-fast) var(--ease-glide);
}
.foot-col a:hover { color: var(--ink); }

.foot-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.disclosure {
  font-size: 12.5px;
  color: var(--ink-tertiary);
  line-height: 1.55;
  max-width: 60ch;
  text-wrap: pretty;
}
.disclosure a { color: var(--ink-secondary); border-bottom: 1px solid var(--hairline-strong); transition: color var(--t-fast) var(--ease-glide); }
.disclosure a:hover { color: var(--ink); }
.copyright {
  font-size: 12.5px;
  color: var(--ink-tertiary);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ============================================================
   COMMAND PALETTE (cmd+K)
   ============================================================ */
.palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 15vh 20px 20px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-swap);
}
html[data-theme="light"] .palette-overlay { background: rgba(30, 26, 40, 0.25); }
.palette-overlay.open { opacity: 1; pointer-events: auto; }

.palette {
  width: min(560px, 100%);
  border-radius: 20px;
  background: var(--palette-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
  transform: translateY(10px) scale(0.97);
  transition: transform 0.35s var(--ease-glide);
}
.palette-overlay.open .palette { transform: translateY(0) scale(1); }

.palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--hairline);
}
.palette-input-row svg { flex: none; color: var(--ink-tertiary); }
.palette input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
}
.palette input::placeholder { color: var(--ink-tertiary); }
.palette-input-row kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--kbd-bg);
  border: 1px solid var(--hairline);
  color: var(--ink-tertiary);
}

.palette-list { max-height: 320px; overflow-y: auto; padding: 8px; }
.palette-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 13px;
  text-align: left;
  transition: background-color 0.2s var(--ease-swap);
}
.palette-item:hover, .palette-item:focus-visible, .palette-item.active { background: var(--surface-hover); outline: none; }
.palette-item .p-icon {
  width: 26px;
  height: 26px;
  display: block;
  border-radius: 8px;
  flex: none;
}
.palette-item .p-name { font-size: 14.5px; font-weight: 550; }
.palette-item .p-cat { margin-left: auto; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-tertiary); font-weight: 600; white-space: nowrap; }
.palette-empty {
  padding: 32px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-tertiary);
}

/* ============================================================
   REVEALS (scroll-triggered, non-card page furniture)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(6px);
    transition:
      opacity 0.7s var(--ease-out-expo),
      transform 0.7s var(--ease-out-expo),
      filter 0.7s var(--ease-out-expo);
    transition-delay: calc(var(--i, 0) * 65ms);
  }
  .reveal.in {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-window { max-width: 460px; }
  .depth-field { display: none; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .search-btn .label, .search-btn kbd { display: none; }
  .search-btn { padding: 0 13px; }
}
@media (max-width: 600px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .cta-submit { display: none; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .app-card { padding: 16px; }
  .app-icon { width: 48px; height: 48px; }
  .app-desc { display: none; }
  .card-foot { padding-top: 10px; justify-content: flex-end; }
  .cat-tag { display: none; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .detail-head { align-items: flex-start; flex-direction: column; }
  .meta-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .meta-row .sep { display: none; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 430px) {
  .grid { grid-template-columns: 1fr; }
  .app-desc { display: block; }
  .cat-tag { display: inline; }
  .card-foot { justify-content: space-between; }
}
/* The window card keeps its footer labels at every size */
.window-foot .cat-tag { display: inline; }

/* ============================================================
   GUIDES - comparison table, ranked pick cards, FAQ accordion
   ============================================================ */
.guide-body { padding-top: clamp(8px, 2vh, 20px); padding-bottom: clamp(70px, 9vh, 120px); }

.guide-context { max-width: 68ch; }
.guide-context p { font-size: 16.5px; line-height: 1.75; color: var(--ink-secondary); text-wrap: pretty; }

.guide-table-wrap {
  margin-top: 44px;
  overflow-x: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
}
.guide-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.guide-table th, .guide-table td { padding: 16px 18px; text-align: left; white-space: nowrap; }
.guide-table td:nth-child(3), .guide-table td:nth-child(5) { white-space: normal; }
.guide-table thead th {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  border-bottom: 1px solid var(--hairline);
}
.guide-table tbody tr + tr { border-top: 1px solid var(--hairline); }
.guide-table .gt-rank { font-family: var(--font-mono); color: var(--ink-tertiary); font-size: 13px; width: 1%; }
.guide-table .gt-app a { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); transition: color var(--t-fast) var(--ease-glide); }
.guide-table .gt-app a:hover { color: var(--accent); }
.guide-table .gt-icon { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.guide-table .gt-ref-row { display: flex; align-items: center; gap: 10px; }
.guide-table .gt-ref-name { font-weight: 600; color: var(--ink-secondary); }
.guide-table tr.is-top { background: var(--accent-soft); }
.guide-table tr.is-top .gt-rank { color: var(--accent); }
.guide-table tr.gt-reference { opacity: 0.76; }
@media (max-width: 600px) {
  .guide-table { font-size: 13px; }
  .guide-table th, .guide-table td { padding: 12px 14px; }
}

.pick-grid { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }

.pick-card {
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
  transition: border-color var(--t-fast) var(--ease-glide);
}
.pick-card:hover { border-color: var(--hairline-strong); }
.pick-card.is-top {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--hairline));
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), color-mix(in srgb, var(--accent) 5%, transparent);
}

.pick-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pick-rank {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  background: var(--surface-hover);
  border: 1px solid var(--hairline);
  color: var(--ink-secondary);
}
.pick-card.is-top .pick-rank { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pick-icon-stage img { width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.4); display: block; }
.pick-title { min-width: 0; flex: 1 1 auto; }
.pick-title h3 { font-size: 19px; font-weight: 620; letter-spacing: -0.015em; }
.pick-tagline { margin-top: 2px; font-size: 13.5px; color: var(--ink-secondary); }
.pick-head .price { flex: none; }

.pick-verdict { margin-top: 18px; font-size: 15.5px; line-height: 1.65; color: var(--ink-secondary); text-wrap: pretty; }

.pick-pros {
  margin-top: 16px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}
.pick-pros li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; font-weight: 550; }
.pick-pros svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--accent); }
@media (max-width: 640px) { .pick-pros { grid-template-columns: 1fr; } }

.pick-actions { margin-top: 22px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pick-link, .pick-visit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline-strong);
  transition: color var(--t-fast) var(--ease-glide), border-color var(--t-fast) var(--ease-glide);
}
.pick-link:hover, .pick-visit:hover { color: var(--accent); border-color: var(--accent); }
.pick-link svg, .pick-visit svg { width: 12px; height: 12px; }

.guide-faq { margin-top: clamp(56px, 7vh, 90px); }
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.faq-item {
  border: 1px solid var(--hairline);
  border-radius: 15px;
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
  padding: 4px 20px;
  transition: border-color var(--t-fast) var(--ease-glide);
}
.faq-item:hover { border-color: var(--hairline-strong); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-toggle {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-tertiary);
  border: 1px solid var(--hairline);
  transition: transform var(--t-fast) var(--ease-glide), color var(--t-fast) var(--ease-glide);
}
.faq-item[open] .faq-toggle { transform: rotate(45deg); color: var(--accent); }
.faq-item p { padding-bottom: 20px; font-size: 14.5px; line-height: 1.65; color: var(--ink-secondary); text-wrap: pretty; }

@media (max-width: 600px) {
  .pick-head { gap: 12px; }
  .pick-actions { gap: 14px; }
}

/* ============================================================
   REDUCED MOTION - everything settles instantly
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .fade-item, .js .prep, .js .placed { opacity: 1; transform: none; filter: none; }
  .js .price .ch { opacity: 1 !important; transform: none !important; filter: none !important; }
  /* Keep the fanned arrangement (transform holds the fan angle) but freeze all
     drift and any pointer parallax. */
  .depth-field { transform: none !important; translate: none !important; rotate: none !important; }
  .depth-tile { translate: none !important; rotate: none !important; }
  .window-ul { transform: scaleX(1); }
  /* Ring + glow still appear on hover, but nothing lifts or translates */
  .app-card:hover, .feat-card:hover, .og-card:hover, .window-card:hover { transform: none !important; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ============================================================
   LEGAL PAGES (Privacy, Terms) - long-form prose on the same
   near-black canvas, reusing .prose for paragraphs and .guidelines
   for check lists. Only headings, plain lists and the info card
   below need their own rules.
   ============================================================ */
.legal-updated {
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-tertiary);
  margin-top: 16px;
}
.legal-body { margin-top: 8px; }
.legal-body h2 {
  font-size: clamp(20px, 2.6vw, 24px);
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 56px;
  margin-bottom: 16px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 {
  font-size: 16px;
  font-weight: 650;
  color: var(--ink);
  margin-top: 30px;
  margin-bottom: 10px;
}
.legal-body ul:not(.guidelines) {
  margin: 16px 0 22px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-body ul:not(.guidelines) li {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-secondary);
  list-style: disc;
  text-wrap: pretty;
}
.legal-body li strong,
.legal-body p strong { color: var(--ink); font-weight: 600; }
.legal-body a { color: var(--accent); text-underline-offset: 2px; }
.legal-body .guidelines { margin: 18px 0 22px; }

.legal-info {
  margin: 22px 0;
  padding: 24px 26px;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
  box-shadow: inset 0 1px 0 var(--inner-hi), var(--shadow-card);
}
.legal-info p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin: 0;
}
.legal-info p + p { margin-top: 4px; }
.legal-info .li-name { font-size: 15.5px; font-weight: 650; color: var(--ink); margin-bottom: 6px; }

.legal-optout {
  margin: 18px 0 22px;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--card-grad-top), var(--card-grad-bot)), var(--surface);
}
.legal-optout-btn {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  padding: 10px 18px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.legal-optout-btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.legal-optout-btn[data-on="1"] { background: var(--accent); color: var(--surface); }
.legal-optout-status { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-tertiary); }

.legal-hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 52px 0 26px;
}
.legal-see-also { font-size: 13.5px; color: var(--ink-tertiary); }
.legal-see-also a { color: var(--accent); }

@media (max-width: 600px) {
  .legal-body h2 { margin-top: 42px; }
}
