/* =========================================================================
   You Can Be Anything — design system
   Warm paper base, ink type, and one vivid colour world per career field.
   Category colours arrive per element as --c (vivid) and --c-deep (shade).
   ========================================================================= */

@property --ambient {
  syntax: '<color>';
  inherits: true;
  initial-value: #ff5a36;
}

:root {
  --paper: #fff7ec;
  --paper-2: #fbeedb;
  --card: #ffffff;
  --ink: #1d1531;
  --ink-2: #463e5c;
  --muted: #776f8c;
  --line: #eee1cd;
  --line-2: #e0cfb4;
  --brand: #ff5a36;
  --sun: #ffd23f;
  --love: #ff3d6e;

  --f-display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --f-body: 'DM Sans', system-ui, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;

  --r-xl: 36px;
  --r-lg: 28px;
  --r: 22px;
  --r-sm: 14px;

  --out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --top-h: 72px;
  --gutter: 32px;

  color-scheme: light;
  transition: --ambient 1.4s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.detail-open { overflow: hidden; }
body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 10px; }
kbd {
  font-family: var(--f-body); font-size: .72rem; font-weight: 700;
  padding: .12rem .45rem; border-radius: 6px;
  background: var(--paper-2); border: 1px solid var(--line-2); border-bottom-width: 2px;
  color: var(--muted);
}

/* Film grain — makes flat colour feel printed rather than generated */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .3  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Ambient colour field ===== */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient i {
  position: absolute; border-radius: 50%;
  will-change: transform;
}
.ambient i:nth-child(1) {
  width: 62vmax; height: 62vmax; top: -24vmax; right: -18vmax;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--ambient) 30%, transparent), transparent);
  animation: drift1 26s ease-in-out infinite alternate;
}
.ambient i:nth-child(2) {
  width: 48vmax; height: 48vmax; bottom: -22vmax; left: -16vmax;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--sun) 32%, transparent), transparent);
  animation: drift2 32s ease-in-out infinite alternate;
}
.ambient i:nth-child(3) {
  width: 30vmax; height: 30vmax; top: 40%; left: 38%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--ambient) 14%, transparent), transparent);
  animation: drift3 22s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(-10vmax, 8vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(12vmax, -6vmax) scale(1.15); } }
@keyframes drift3 { to { transform: translate(-14vmax, -10vmax) scale(.85); } }

/* ===== Top bar ===== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--top-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 var(--gutter);
  transition: background .3s, box-shadow .3s;
  view-transition-name: topbar;
}
.topbar.scrolled, body:not([data-screen="welcome"]) .topbar {
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-display); font-weight: 700; font-size: 1.12rem;
  letter-spacing: -0.02em; white-space: nowrap;
}
.logo em {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: 1.4em; letter-spacing: 0; line-height: 0;
}
.logo-mark {
  width: 26px; height: 26px; flex: none;
  border-radius: 42% 58% 60% 40% / 45% 45% 55% 55%;
  background: conic-gradient(from 0deg, #ff5a36, #ffd23f, #1fb56e, #2f6bff, #b53cff, #ff3d7f, #ff5a36);
  animation: spin 14s linear infinite, morph 7s ease-in-out infinite alternate;
}
.logo:hover .logo-mark { animation-duration: 2s, 7s; }
@keyframes spin { to { rotate: 360deg; } }
@keyframes morph { to { border-radius: 60% 40% 38% 62% / 58% 38% 62% 42%; } }

.top-search {
  flex: 1; min-width: 0; max-width: 420px; margin-left: 8px;
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 10px 0 16px;
  background: var(--card); border: 1.5px solid var(--line-2); border-radius: 999px;
  color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.top-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ink) 10%, transparent); color: var(--ink); }
.top-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: .95rem; color: var(--ink); }
.top-search input::placeholder { color: var(--muted); }
.top-search input::-webkit-search-cancel-button { display: none; }
body[data-screen="welcome"] .top-search { visibility: hidden; }

.top-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.top-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  font-family: var(--f-display); font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: background .2s, color .2s;
}
.top-link:hover { background: color-mix(in oklab, var(--ink) 7%, transparent); }
.top-link.active { background: var(--ink); color: var(--paper); }

.saved-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--love); color: #fff;
  font-family: var(--f-body); font-size: .7rem; font-weight: 700;
}
.saved-count:empty { display: none; }
.saved-count.bump { animation: bump .5s var(--spring); }
@keyframes bump { 40% { scale: 1.5; } }

/* ===== Screens ===== */
.app { position: relative; z-index: 1; padding-top: var(--top-h); overflow-x: clip; }
.screen { display: none; min-height: calc(100vh - var(--top-h)); }
.screen.active { display: block; }
@supports not (view-transition-name: none) {
  .screen.active { animation: screenIn .5s var(--out); }
}
@keyframes screenIn { from { opacity: 0; translate: 0 16px; } }

/* View transitions: screens cross-fade, card art morphs into the detail hero */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; }
::view-transition-group(hero-art) {
  animation-duration: .6s;
  animation-timing-function: cubic-bezier(.2, .85, .25, 1);
  overflow: clip; border-radius: 24px;
}
::view-transition-old(hero-art), ::view-transition-new(hero-art) {
  width: 100%; height: 100%; object-fit: cover;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: 54px; padding: 0 1.5rem; border-radius: 999px;
  font-family: var(--f-display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em;
  white-space: nowrap;
  transition: translate .25s var(--spring), box-shadow .25s var(--spring), background .2s, color .2s;
}
.btn-primary {
  background: var(--ink); color: var(--paper);
  box-shadow: 4px 4px 0 var(--brand);
}
.btn-primary:hover { translate: -2px -2px; box-shadow: 6px 6px 0 var(--brand); }
.btn-primary:active { translate: 3px 3px; box-shadow: 0 0 0 var(--brand); }
.btn-primary .ic { transition: translate .3s var(--spring); }
.btn-primary:hover .ic { translate: 4px 0; }
.btn-ghost {
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-ghost:hover { background: var(--sun); }
.btn-ghost:hover .ic { animation: wiggle .5s var(--spring); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { translate: 0 -2px; }
.btn-onink { background: var(--ink); color: #fff; }
.btn-onink:hover { translate: 0 -2px; }
@keyframes wiggle { 30% { rotate: -14deg; } 60% { rotate: 10deg; } }

.link-arrow {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--f-display); font-weight: 700; font-size: .95rem;
  border-bottom: 2px solid currentColor; padding-bottom: 1px;
}
.link-arrow .ic { transition: translate .25s var(--spring); }
.link-arrow:hover .ic { translate: 3px 0; }

/* ===== Welcome: hero ===== */
.hero {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(24px, 5vh, 64px) var(--gutter) 24px;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 32px; align-items: center;
  min-height: min(760px, calc(100svh - var(--top-h) - 150px));
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--line);
  font-weight: 600; font-size: .9rem; color: var(--ink-2);
  animation: rise .7s var(--out) backwards;
}
.kicker-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand) 60%, transparent);
  animation: ping 2s ease-out infinite;
}
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 10px transparent; } }

.hero-title {
  font-size: clamp(2.7rem, 5.6vw, 5.6rem);
  line-height: .98; letter-spacing: -0.04em;
  margin: 24px 0 22px;
}
.hero-line { display: block; animation: rise .8s var(--out) .08s backwards; }
.hero-article { color: var(--muted); font-weight: 600; }
.hero-word {
  display: block; white-space: nowrap;
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: 1.14em; letter-spacing: -0.02em; line-height: 1.02;
  color: color-mix(in oklab, var(--c) 82%, black);
  transition: color .5s;
}
.hero-rot {
  display: inline-block; padding: 0 .08em;
  background: linear-gradient(transparent 58%, color-mix(in oklab, var(--c) 26%, transparent) 58%, color-mix(in oklab, var(--c) 26%, transparent) 88%, transparent 88%);
}
.ltr { display: inline-block; animation: ltrIn .7s var(--spring) backwards; animation-delay: var(--d); }
@keyframes ltrIn { from { opacity: 0; transform: translateY(.55em) rotate(10deg); } }

.hero-sub {
  font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: var(--ink-2);
  max-width: 36ch; animation: rise .8s var(--out) .16s backwards;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 26px;
  animation: rise .8s var(--out) .24s backwards;
}
.hero-search {
  display: flex; align-items: center; gap: 10px;
  max-width: 440px; height: 52px; padding: 0 6px 0 18px;
  background: var(--card); border: 1.5px solid var(--line-2); border-radius: 999px;
  color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
  animation: rise .8s var(--out) .32s backwards;
}
.hero-search:focus-within { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ink) 10%, transparent); }
.hero-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: 1rem; }
.hero-search input::placeholder { color: var(--muted); }
.hero-search-go {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  transition: scale .25s var(--spring);
}
.hero-search-go:hover { scale: 1.08; }
@keyframes rise { from { opacity: 0; translate: 0 24px; } }

/* Stack of trading cards */
.hero-stack {
  --px: 0; --py: 0;
  position: relative; height: clamp(440px, 58vh, 560px);
  perspective: 1400px;
  animation: stackIn 1s var(--out) .2s backwards;
}
@keyframes stackIn { from { opacity: 0; translate: 60px 20px; rotate: 6deg; } }
.stack-card {
  position: absolute; left: 50%; top: 50%;
  width: min(360px, 86%);
  padding: 10px 10px 16px; border-radius: 30px;
  background: var(--card);
  box-shadow: 0 2px 0 var(--line), 0 30px 60px -24px color-mix(in oklab, var(--c-deep) 70%, transparent);
  transition: transform .8s var(--out), opacity .6s var(--out), box-shadow .4s;
  transform-style: preserve-3d;
}
.stack-card.s0 {
  z-index: 3;
  transform: translate(-50%, -50%) rotateY(calc(var(--px) * 14deg)) rotateX(calc(var(--py) * -10deg)) rotate(-3deg);
}
.stack-card.s1 {
  z-index: 2;
  transform: translate(calc(-50% + 56px), calc(-50% - 22px)) rotate(6deg) scale(.92);
}
.stack-card.s2 {
  z-index: 1; opacity: .85;
  transform: translate(calc(-50% + 100px), calc(-50% - 40px)) rotate(13deg) scale(.84);
}
.stack-card.leave {
  z-index: 4; opacity: 0; pointer-events: none;
  transform: translate(calc(-50% - 120%), calc(-50% + 30px)) rotate(-26deg) scale(.9);
}
.stack-card.no-anim { transition: none; }
.stack-card.s0:hover { box-shadow: 0 2px 0 var(--line), 0 40px 70px -24px color-mix(in oklab, var(--c) 80%, transparent); }
.stack-art {
  aspect-ratio: 1; border-radius: 22px; overflow: hidden;
  background: var(--c-deep);
}
.stack-art svg { width: 100%; height: 100%; }
.stack-label { display: flex; flex-direction: column; gap: 2px; padding: 14px 8px 0; }
.stack-cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: .8rem;
  color: color-mix(in oklab, var(--c) 70%, black);
}
.stack-name { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em; line-height: 1.1; }
.stack-next {
  position: absolute; z-index: 5; right: 4%; bottom: 2%;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sun); color: var(--ink); border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: translate .25s var(--spring), box-shadow .25s var(--spring), rotate .4s var(--spring);
}
.stack-next:hover { translate: -2px -2px; box-shadow: 5px 5px 0 var(--ink); rotate: 12deg; }
.stack-next:active { translate: 2px 2px; box-shadow: 0 0 0 var(--ink); }
.stack-pause {
  position: absolute; z-index: 5; right: calc(4% + 62px); bottom: calc(2% + 4px);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); color: var(--ink); border: 2px solid var(--ink);
}
.stack-pause:hover { background: var(--paper-2); }

/* ===== Welcome: fields marquee ===== */
.fields { padding: 24px 0 88px; }
.fields-head {
  max-width: 1280px; margin: 0 auto 22px; padding: 0 var(--gutter);
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.fields-head h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.marquee {
  overflow: hidden; padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 60s linear infinite; }
.marquee.reverse .marquee-track { animation-direction: reverse; animation-duration: 70s; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 6px)); } }

.field-chip {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 8px 18px 8px 8px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--line);
  font-family: var(--f-display); font-weight: 700; font-size: 1.05rem;
  white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s, rotate .35s var(--spring), scale .35s var(--spring);
}
.field-chip-icon {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); color: #fff;
  transition: background .25s, color .25s, rotate .5s var(--spring);
}
.field-chip-count { font-family: var(--f-body); font-size: .8rem; font-weight: 600; color: var(--muted); }
.field-chip:hover { background: var(--c-deep); color: #fff; border-color: var(--c-deep); rotate: -2deg; scale: 1.05; }
.field-chip:hover .field-chip-icon { background: var(--c); rotate: -20deg; }
.field-chip:hover .field-chip-count { color: rgba(255, 255, 255, .7); }

/* ===== Explore ===== */
.explore { max-width: 1320px; margin: 0 auto; padding: 28px var(--gutter) 110px; }
.explore-head { padding: 12px 0 8px; animation: rise .6s var(--out) backwards; }
.explore-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); letter-spacing: -0.04em; }
.explore-head p { margin-top: 10px; color: var(--muted); font-size: 1.05rem; }
.search-notice { display: flex; gap: 8px; align-items: flex-start; max-width: 62ch; padding: 10px 14px; border-radius: var(--r); background: var(--paper-2); color: var(--ink-2) !important; font-size: .95rem !important; }
.search-notice svg { flex: none; margin-top: 2px; }
.hook-why { color: var(--c-deep, var(--ink)); font-weight: 700; }
.hook-why::after { content: ' ·'; color: var(--muted); font-weight: 400; }
.explore-head .link-arrow { color: var(--ink); }

.chipbar {
  position: sticky; top: var(--top-h); z-index: 20;
  margin: 12px calc(-1 * var(--gutter)) 0; padding: 12px var(--gutter);
  display: flex; align-items: center;
  transition: background .2s, box-shadow .2s;
}
.chipbar-scroll {
  position: relative; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  /* soft fades at whichever edge has more to see */
  --fl: 0px; --fr: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
}
.chipbar-scroll.can-left { --fl: 40px; }
.chipbar-scroll.can-right { --fr: 48px; }
.chipbar-scroll::-webkit-scrollbar { display: none; }
.chip-arrow {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; z-index: 1;
  background: var(--card); border: 1.5px solid var(--line-2);
  transition: border-color .2s, background .2s;
}
.chip-arrow.prev { margin-right: 6px; }
.chip-arrow.next { margin-left: 6px; }
.chip-arrow:hover { border-color: var(--ink); background: var(--sun); }
.chip-arrow[hidden] { display: none; }
@media (hover: none), (pointer: coarse) { .chip-arrow { display: none; } }
/* Touch screens: small controls get a bigger invisible hit area (at least 44px), same look */
@media (pointer: coarse) {
  .heart::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; }
  .link-arrow, .famous-link { position: relative; }
  .link-arrow::after, .famous-link::after { content: ''; position: absolute; inset: -11px -6px; }
}
/* Dragging with a mouse: no snapping or text selection mid-drag */
.dragging { scroll-snap-type: none !important; cursor: grabbing; user-select: none; }
.dragging a, .dragging .card { pointer-events: none; }
.chipbar-sentinel { height: 0; }
/* Stuck under the top bar: a full-width surface so cards don't show through (set in browse.js) */
.chipbar.stuck {
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  box-shadow: 0 0 0 100vmax color-mix(in oklab, var(--paper) 92%, transparent), 0 1px 0 100vmax var(--line);
  clip-path: inset(0 -100vmax -1px);
}
.chipbar-track { display: flex; gap: 8px; width: max-content; padding-right: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 15px 0 12px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--line);
  font-family: var(--f-display); font-weight: 600; font-size: .92rem;
  white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s, translate .25s var(--spring);
}
.chip .ic { color: color-mix(in oklab, var(--c, var(--ink)) 85%, black); }
.chip:hover { border-color: var(--c, var(--ink)); translate: 0 -2px; }
.chip.on { background: var(--c-deep, var(--ink)); border-color: var(--c-deep, var(--ink)); color: #fff; }
.chip.on .ic { color: #fff; }

.cat-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 24px;
  padding: clamp(24px, 4vw, 44px); border-radius: var(--r-xl);
  background: var(--c-deep); color: #fff;
  animation: rise .6s var(--out) backwards;
}
.cat-hero::after {
  content: ''; position: absolute; z-index: -1;
  width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%;
  background: var(--c); opacity: .55;
  animation: floaty 9s ease-in-out infinite alternate;
}
.cat-hero::before {
  content: ''; position: absolute; z-index: -1;
  width: 160px; height: 160px; right: 22%; bottom: -90px; border-radius: 50%;
  border: 18px solid var(--c); opacity: .35;
  animation: floaty 7s ease-in-out infinite alternate-reverse;
}
@keyframes floaty { to { translate: -30px 24px; } }
.cat-hero-icon {
  width: 76px; height: 76px; flex: none; border-radius: 24px;
  display: grid; place-items: center;
  background: var(--c); color: #fff; rotate: -6deg;
  animation: popIn .7s var(--spring) .15s backwards;
}
@keyframes popIn { from { scale: 0; rotate: -40deg; } }
.cat-hero h1 { font-size: clamp(1.9rem, 4vw, 3.2rem); letter-spacing: -0.035em; }
.cat-hero p { margin-top: 6px; opacity: .8; font-weight: 500; }

/* Rows */
.row { margin-top: 44px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.row-title {
  display: inline-flex; align-items: center; gap: 14px; min-width: 0;
  font-family: var(--f-display); font-weight: 800; font-size: clamp(1.2rem, 2vw, 1.55rem); letter-spacing: -0.025em;
}
.row-title > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-icon {
  width: 42px; height: 42px; flex: none; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--c); color: #fff; rotate: -5deg;
  transition: rotate .45s var(--spring), scale .45s var(--spring);
}
.row-title:hover .row-icon { rotate: 8deg; scale: 1.1; }
.row-count {
  font-family: var(--f-body); font-size: .8rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in oklab, var(--c) 16%, white);
  color: color-mix(in oklab, var(--c) 60%, black);
}
.row-nav { display: flex; align-items: center; gap: 8px; flex: none; }
.row-nav .link-arrow { margin-left: 8px; }
.row-arrow {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 1.5px solid var(--line-2);
  transition: border-color .2s, background .2s, opacity .2s;
}
.row-arrow:hover:not(:disabled) { border-color: var(--ink); background: var(--sun); }
.row-arrow:disabled { opacity: .3; cursor: default; }
.row-scroll {
  display: flex; gap: 18px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  margin: 0 calc(-1 * var(--gutter)); padding: 14px var(--gutter) 30px;
  scrollbar-width: none;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll .card { flex: 0 0 236px; scroll-snap-align: start; }

/* Grids */
.grid {
  display: grid; gap: 22px; margin-top: 28px;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
}
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* ===== Card ===== */
.card {
  --rx: 0deg; --ry: 0deg; --lift: 0px;
  position: relative;
  display: flex; flex-direction: column;
  padding: 8px; border-radius: 26px;
  background: var(--card); border: 1.5px solid var(--line);
  transform: perspective(900px) translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--out), box-shadow .35s, border-color .35s;
  animation: cardIn .7s var(--out) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes cardIn { from { opacity: 0; translate: 0 28px; scale: .96; } }
.card:hover {
  --lift: -6px;
  border-color: color-mix(in oklab, var(--c) 45%, white);
  box-shadow: 0 26px 44px -18px color-mix(in oklab, var(--c) 65%, transparent);
  transition: transform .15s linear, box-shadow .35s, border-color .35s;
}
.card:has(.card-link:focus-visible) { outline: 3px solid var(--c); outline-offset: 3px; }
.card-art {
  position: relative; overflow: hidden;
  aspect-ratio: 5 / 4; border-radius: 19px;
  background: radial-gradient(circle at 50% 38%, var(--c-deep), color-mix(in oklab, var(--c-deep) 65%, black));
}
.card-art svg { width: 100%; height: 100%; transition: scale .7s var(--out); }
.card-art .famous-badge { display: none; } /* cropped at card size; shown on the detail page */
.card-art.is-painted svg { animation: artIn .5s ease; }
@keyframes artIn { from { opacity: 0; } }
.card:hover .card-art svg { scale: 1.07; }
.card-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .32), transparent 55%);
  opacity: 0; transition: opacity .35s;
  mix-blend-mode: soft-light;
}
.card:hover .card-art::after { opacity: 1; }
.card-badge {
  position: absolute; z-index: 2; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--sun); color: var(--ink);
  font-weight: 700; font-size: .72rem;
}
.card-body { padding: 12px 8px 6px; display: flex; flex-direction: column; flex: 1; }
.card-cat {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 700; font-size: .75rem;
  color: color-mix(in oklab, var(--c) 68%, black);
  margin-bottom: 4px;
}
.card-name { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.card-hook {
  margin-top: 6px; font-size: .86rem; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Heart */
.heart {
  position: absolute; z-index: 2; top: 10px; right: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .3);
  transition: scale .3s var(--spring), color .2s;
}
.heart:hover { scale: 1.12; }
.heart[aria-pressed="true"] { color: var(--love); }
.heart[aria-pressed="true"] .ic { fill: currentColor; }
.heart.pop { animation: heartPop .5s var(--spring); }
@keyframes heartPop { 35% { scale: 1.45; rotate: -10deg; } }

/* ===== Quiz ===== */
.quiz {
  max-width: 860px; margin: 0 auto;
  padding: 28px var(--gutter) 64px;
  min-height: calc(100svh - var(--top-h));
  display: flex; flex-direction: column;
}
.quiz.from-right { animation: slideR .55s var(--out); }
.quiz.from-left { animation: slideL .55s var(--out); }
@keyframes slideR { from { opacity: 0; translate: 48px 0; } }
@keyframes slideL { from { opacity: 0; translate: -48px 0; } }
.quiz-top { display: flex; align-items: center; justify-content: space-between; }
.quiz-back {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px 0 10px; border-radius: 999px;
  font-weight: 600; color: var(--ink-2);
  transition: background .2s;
}
.quiz-back:hover { background: color-mix(in oklab, var(--ink) 7%, transparent); }
.quiz-count { font-family: var(--f-display); color: var(--muted); font-weight: 600; }
.quiz-count strong { color: var(--ink); font-size: 1.5rem; font-weight: 800; }
.quiz-bar { display: grid; grid-template-columns: repeat(var(--n, 12), 1fr); gap: 5px; margin: 16px 0 36px; }
.quiz-seg { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; position: relative; }
.quiz-seg.done::after, .quiz-seg.current::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
}
.quiz-seg.done::after { background: var(--seg); }
.quiz-seg.current::after { background: var(--line-2); animation: breathe 1.6s ease-in-out infinite; }
.quiz-seg.just::after { transform-origin: left; animation: segFill .6s var(--out) .1s backwards; }
@keyframes segFill { from { transform: scaleX(0); } }
@keyframes breathe { 50% { opacity: .3; } }
.quiz-prompt { font-size: clamp(2.1rem, 5.2vw, 3.7rem); letter-spacing: -0.04em; line-height: 1.02; }

.quiz-key { position: absolute; top: 16px; right: 16px; }
.quiz-hint { margin-top: auto; padding-top: 36px; text-align: center; color: var(--muted); font-size: .92rem; }

/* ===== Activity cards (quiz) ===== */
.quiz-ask { font-family: var(--f-display); font-weight: 700; color: var(--muted); font-size: 1.1rem; margin-bottom: 14px; }
.acard {
  display: flex; align-items: center; gap: 22px; padding: 30px 28px; border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--tile) 12%, var(--card)); border: 2px solid color-mix(in oklab, var(--tile) 45%, var(--line));
  box-shadow: 6px 6px 0 color-mix(in oklab, var(--tile) 60%, transparent);
}
.acard.from-right { animation: slideR .45s var(--out); }
.acard.from-left { animation: slideL .45s var(--out); }
.acard-icon { flex: none; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: var(--tile); color: #fff; }
.acard-text { font-size: clamp(1.5rem, 3.6vw, 2.3rem); letter-spacing: -0.03em; line-height: 1.1; }
.acard-answers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.aans {
  position: relative; min-height: 64px; padding: 12px 10px; border-radius: var(--r);
  background: var(--card); border: 2px solid var(--line); font-weight: 700; font-size: 1rem;
  transition: transform .25s var(--spring), border-color .2s, background .2s, color .2s;
}
.aans:hover { transform: translateY(-2px); border-color: var(--ink); }
.aans .quiz-key { top: 6px; right: 8px; font-size: .7rem; }
.aans-love[aria-pressed="true"], .aans-love.picked { background: #1fb56e; border-color: #1fb56e; color: #fff; }
.aans-maybe[aria-pressed="true"], .aans-maybe.picked { background: #ffd23f; border-color: #e0b400; }
.aans-no[aria-pressed="true"], .aans-no.picked { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.aans-never { color: var(--muted); border-style: dashed; }
.aans-never[aria-pressed="true"], .aans-never.picked { background: var(--paper-2); color: var(--ink); }
.quiz-panel { margin-top: 24px; }
.quiz-lead { font-size: 1.1rem; color: var(--ink-2); max-width: 60ch; margin: 14px 0 24px; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.qchips { display: flex; flex-wrap: wrap; gap: 10px; }
.qchips .rchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ===== Persona (quiz results) ===== */
.persona {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(28px, 5vw, 60px); border-radius: var(--r-xl);
  background: linear-gradient(125deg, var(--a), var(--b));
  color: #fff;
}
.persona.reveal { animation: personaIn 1s var(--spring); }
@keyframes personaIn { from { opacity: 0; scale: .86; rotate: -2deg; } }
.persona-shapes i { position: absolute; z-index: -1; border-radius: 50%; }
.persona-shapes i:nth-child(1) { width: 380px; height: 380px; right: -110px; top: -140px; background: rgba(255, 255, 255, .14); animation: floaty 8s ease-in-out infinite alternate; }
.persona-shapes i:nth-child(2) { width: 150px; height: 150px; right: 26%; bottom: -70px; border: 20px solid rgba(255, 255, 255, .16); animation: floaty 6s ease-in-out infinite alternate-reverse; }
.persona-shapes i:nth-child(3) { width: 36px; height: 36px; right: 14%; bottom: 30%; background: var(--sun); animation: floaty 4s ease-in-out infinite alternate; }
.persona-label { font-weight: 600; opacity: .9; }
.persona-name { font-size: clamp(2.5rem, 7vw, 5.6rem); letter-spacing: -0.045em; line-height: .95; margin: 8px 0 28px; max-width: 14ch; }
.persona.reveal .persona-name { animation: rise .8s var(--out) .25s backwards; }
.persona-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; max-width: 760px; }
.ptype { padding: 18px 20px; border-radius: var(--r); background: rgba(255, 255, 255, .16); }
.persona.reveal .ptype { animation: rise .7s var(--out) backwards; }
.persona.reveal .ptype:nth-child(1) { animation-delay: .45s; }
.persona.reveal .ptype:nth-child(2) { animation-delay: .6s; }
.ptype strong { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-size: 1.3rem; letter-spacing: -0.02em; }
.ptype strong::before { content: ''; width: 12px; height: 12px; border-radius: 4px; background: #fff; rotate: 45deg; }
.ptype span { display: block; margin-top: 4px; opacity: .92; }
.persona-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.section-head { margin-top: 56px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.035em; }
.section-head p { margin-top: 6px; color: var(--muted); }

/* ===== Empty state ===== */
.empty { text-align: center; padding: 72px 16px; animation: rise .6s var(--out) backwards; }
.empty-icon {
  width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 30px;
  display: grid; place-items: center; rotate: -6deg;
  background: var(--sun); color: var(--ink);
}
.empty-heart { background: color-mix(in oklab, var(--love) 18%, white); color: var(--love); animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 15% { scale: 1.1; } 30% { scale: 1; } 45% { scale: 1.08; } 60% { scale: 1; } }
.empty p { font-size: 1.15rem; color: var(--ink-2); max-width: 40ch; margin: 0 auto; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

/* ===== Detail overlay ===== */
.detail-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: none; overflow-y: auto; overscroll-behavior: contain;
  background:
    radial-gradient(1200px 520px at 20% -10%, color-mix(in oklab, var(--c) 22%, transparent), transparent 70%),
    var(--paper);
}
.detail-overlay.active { display: block; }
.detail-overlay { overflow-x: hidden; }
.detail-overlay.swap .detail { animation: detailSwap .4s var(--out); }
@keyframes detailSwap { from { opacity: 0; translate: 0 18px; } }
/* While a career is open the page's bars sit behind it, so they must not join the transition
   (a named element is drawn above everything while it runs) */
html.detail-open .topbar, html.detail-open .tabbar { view-transition-name: none; }
@supports not (view-transition-name: none) {
  .detail-overlay.active { animation: rise .45s var(--out); }
}
.detail-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--gutter);
  background: color-mix(in oklab, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.detail-bar-right { display: flex; gap: 8px; }
.detail-pos { font-weight: 600; color: var(--muted); font-size: .9rem; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 1.5px solid var(--line-2);
  transition: border-color .2s, background .2s, scale .3s var(--spring);
}
.icon-btn:hover:not(:disabled) { border-color: var(--ink); scale: 1.06; }
.icon-btn:disabled { opacity: .3; cursor: default; }
.heart.heart-lg { position: static; width: 46px; height: 46px; box-shadow: none; border: 1.5px solid var(--line-2); background: var(--card); }

.detail { max-width: 1180px; margin: 0 auto; padding: 12px var(--gutter) 110px; }
.detail-hero {
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.detail-art {
  aspect-ratio: 1; border-radius: 30px; overflow: hidden;
  background: var(--c-deep);
  box-shadow: 0 50px 90px -40px color-mix(in oklab, var(--c-deep) 90%, transparent);
}
.detail-art svg { width: 100%; height: 100%; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 11px; border-radius: 999px;
  background: color-mix(in oklab, var(--c) 18%, white);
  color: color-mix(in oklab, var(--c) 55%, black);
  font-weight: 700; font-size: .88rem;
  transition: background .2s, translate .25s var(--spring);
}
.cat-pill:hover { background: color-mix(in oklab, var(--c) 30%, white); translate: 0 -2px; }
.detail-name { font-size: clamp(2.4rem, 5.2vw, 4.6rem); letter-spacing: -0.045em; line-height: .96; margin: 18px 0 18px; }
.detail-lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.5; color: var(--ink-2); max-width: 38ch; }
.detail-intro > * { animation: rise .7s var(--out) backwards; }
.detail-intro > :nth-child(2) { animation-delay: .06s; }
.detail-intro > :nth-child(3) { animation-delay: .12s; }
.detail-intro > :nth-child(4) { animation-delay: .18s; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
/* Long career names wrap instead of being cut off */
.detail-actions .btn-ghost { max-width: 100%; height: auto; min-height: 54px; padding-block: 10px; white-space: normal; line-height: 1.25; text-align: left; }
#detail-save.is-on { background: var(--love); box-shadow: 4px 4px 0 var(--ink); }
#detail-save.is-on .ic { fill: currentColor; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 64px; }
.tile {
  grid-column: span 3;
  padding: 28px; border-radius: var(--r-lg);
  background: var(--card); border: 1.5px solid var(--line);
}
.tile-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.tile-fact {
  grid-column: span 4; position: relative; overflow: hidden;
  background: var(--c-deep); color: #fff; border: none;
}
.tile-fact::before {
  content: '“'; position: absolute; right: 28px; top: 4px;
  font-family: var(--f-serif); font-size: 11rem; line-height: .8;
  color: var(--c); opacity: .55;
}
.tile-fact .tile-label { color: rgba(255, 255, 255, .75); }
.fact { position: relative; font-family: var(--f-serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; }
.tile-famous { grid-column: span 2; background: var(--sun); border: none; }
.tile-famous .tile-label { color: color-mix(in oklab, var(--ink) 70%, var(--sun)); }
.tile-famous { display: flex; flex-direction: column; }
.tile-famous.has-local { grid-column: span 3; }
.bento:has(.tile-famous.has-local) .tile-fact { grid-column: span 3; }
.famous-people { display: grid; gap: 22px; }
.tile-famous.has-local .famous-person + .famous-person { padding-top: 20px; border-top: 1.5px dashed color-mix(in oklab, var(--ink) 25%, var(--sun)); }
.famous-tag { display: inline-block; margin-bottom: 6px; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in oklab, var(--ink) 65%, var(--sun)); }
.famous-name { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.03em; line-height: 1.02; }
.famous-why { margin-top: 10px; font-size: .98rem; line-height: 1.45; color: color-mix(in oklab, var(--ink) 85%, var(--sun)); }
.famous-note { color: var(--muted); font-size: .88rem; font-style: italic; }
.famous-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-weight: 700; font-size: .92rem; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.famous-link .ic { transition: translate .25s var(--spring); }
.famous-link:hover .ic { translate: 3px 0; }
.famous-region {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 20px;
  font-size: .84rem; color: color-mix(in oklab, var(--ink) 70%, var(--sun));
}
.famous-region select {
  font: inherit; font-weight: 700; color: var(--ink);
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  background: color-mix(in oklab, white 55%, var(--sun));
  border: 1.5px solid color-mix(in oklab, var(--ink) 30%, var(--sun));
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tile-note { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.tile-subjects { grid-column: span 4; }
.tile-countries { grid-column: span 2; }
.subj-group + .subj-group { margin-top: 18px; }
.subj-kind { font-family: var(--f-body); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-deep); margin-bottom: 8px; }
.subj-list { list-style: none; display: grid; gap: 12px; }
.subj { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
.subj-builds { font-size: .82rem; color: var(--muted); }
.subj-why { grid-column: 1 / -1; margin-top: 4px; font-size: .95rem; line-height: 1.45; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center;
  padding: 8px 15px; border-radius: 999px;
  background: color-mix(in oklab, var(--c) 14%, white);
  color: color-mix(in oklab, var(--c) 52%, black);
  border: 1.5px solid transparent;
  font-weight: 700; font-size: .92rem;
  transition: border-color .2s, translate .25s var(--spring), rotate .25s var(--spring);
}
.tag:hover { border-color: currentColor; translate: 0 -2px; rotate: -2deg; }
.tag-soft { background: var(--paper-2); color: var(--ink-2); }
.detail-safety { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: .92rem; color: var(--ink-2); }
.detail-safety svg { flex: none; margin-top: 2px; color: var(--c-deep); }
.tryit {
  margin-top: 18px; padding: 32px; border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--c) 10%, var(--card)); border: 1.5px solid color-mix(in oklab, var(--c) 30%, var(--line));
}
.tryit h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -0.03em; margin-bottom: 20px; }
.tryit h3 { font-family: var(--f-body); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-deep); margin-bottom: 10px; }
.tryit-body { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 28px; }
.tryit-need ul { list-style: none; display: grid; gap: 6px; }
.tryit-need li::before { content: '•'; color: var(--c-deep); margin-right: 8px; }
.tryit-adult { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.tryit-steps { display: grid; gap: 12px; padding-left: 0; list-style: none; counter-reset: step; }
.tryit-steps li { position: relative; padding-left: 40px; line-height: 1.5; counter-increment: step; }
.tryit-steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-deep); color: #fff; font-weight: 700; font-size: .85rem;
}
.tryit-job { display: flex; gap: 8px; align-items: flex-start; margin-top: 22px; padding-top: 18px; border-top: 1.5px dashed color-mix(in oklab, var(--c) 35%, var(--line)); color: var(--ink-2); }
.tryit-job svg { flex: none; margin-top: 3px; color: var(--c-deep); }
.tryit-source { margin-top: 8px; font-size: .82rem; color: var(--muted); }
.tryit-source a { text-decoration: underline; text-underline-offset: 2px; }
.tryit-reflect { margin-top: 22px; }
.tryit-taster { margin: -12px 0 18px; font-size: .9rem; color: var(--muted); }
.tryit-card { margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1.5px solid color-mix(in oklab, var(--c) 30%, var(--line)); }
.tryit-card figcaption { font-weight: 700; font-size: .92rem; margin-bottom: 8px; }
.tryit-card table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tryit-card th, .tryit-card td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tryit-card th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-deep); }
.tryit-card p { margin: 4px 0; font-size: .92rem; }
.tryit-card-note { color: var(--muted); font-style: italic; font-size: .85rem !important; margin-top: 8px !important; }
.tryit-switch { margin-top: 16px; font-size: .92rem; color: var(--muted); }
.tryit-other {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: 6px; padding: 8px 14px;
  border-radius: 999px; border: 2px solid color-mix(in oklab, var(--c) 45%, var(--line)); background: var(--card);
  color: var(--ink); font-weight: 600;
}
.tryit-other:hover { border-color: var(--c-deep); }
.tryit-reflect h3 + .rchips { margin-bottom: 16px; }
.rchips { display: flex; flex-wrap: wrap; gap: 8px; }
.rchip {
  min-height: 44px; padding: 8px 16px; border-radius: 999px;
  background: var(--card); border: 2px solid var(--line-2); font-weight: 600;
  transition: background .2s, border-color .2s, color .2s;
}
.rchip:hover { border-color: var(--c-deep); }
.rchip[aria-pressed="true"] { background: var(--c-deep); border-color: var(--c-deep); color: #fff; }
.tryit-note { font-size: .92rem; color: var(--muted); }
.tryit-clear { margin-left: 8px; text-decoration: underline; color: var(--muted); font-size: .88rem; }
.tried { margin-top: 56px; }
.tried h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -0.03em; }
.tried-sub { color: var(--muted); margin: 6px 0 18px; }
.tried-list { list-style: none; display: grid; gap: 10px; }
.tried-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px 20px; border-radius: var(--r-md, 18px); background: var(--card); border: 1.5px solid var(--line); }
.tried-item a { flex: 1 1 260px; }
.tried-item a span { color: var(--muted); }
.tried-feel { padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--paper-2); }
.tried-loved { background: #d9f5e6; color: #0c6b3d; }
.tried-no { background: #f3e8e8; color: #7a3434; }
.tried-parts { flex-basis: 100%; font-size: .9rem; color: var(--ink-2); }
.detail-related { margin-top: 72px; }
.detail-related h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.035em; }
.detail-related-note { color: var(--muted); margin: 6px 0 18px; }

/* Scroll-driven reveals (progressive enhancement) */
@supports (animation-timeline: view()) {
  .reveal-on-scroll {
    animation: scrollReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 70%;
  }
  .tile-fact.reveal-on-scroll { animation-name: scrollRevealTilt; }
}
@keyframes scrollReveal { from { opacity: 0; translate: 0 48px; scale: .96; } }
@keyframes scrollRevealTilt { from { opacity: 0; translate: 0 48px; rotate: -3deg; scale: .94; } }

/* ===== Effects layer ===== */
.fx-layer { position: fixed; inset: 0; z-index: 400; pointer-events: none; overflow: hidden; }
.fx-layer span { position: absolute; }

/* ===== Mobile tab bar ===== */
.tabbar { display: none; }

/* ===== Responsive ===== */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-stack { height: 440px; max-width: 520px; width: 100%; margin: 0 auto; }
  .detail-hero { grid-template-columns: minmax(0, 1fr); }
  .detail-art { max-width: 560px; }
  .tryit-body { grid-template-columns: 1fr; gap: 20px; }
  .tile, .tile-fact, .tile-famous, .tile-famous.has-local, .tile-subjects, .tile-countries,
  .bento:has(.tile-famous.has-local) .tile-fact { grid-column: span 6; }
  .top-link[data-surprise] { display: none; }
  /* Tablets: mark only and tighter links, so search and nav fit */
  .logo > span:last-child { display: none; }
  .topbar { gap: 12px; }
  .top-link { padding: 0 12px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; --top-h: 64px; }
  /* Buttons wrap rather than run off narrow screens */
  .btn { height: auto; min-height: 54px; padding-block: 10px; white-space: normal; line-height: 1.25; text-align: center; }
  .top-links { display: none; }
  .logo > span:last-child { display: none; }
  .top-search { max-width: none; margin-left: 4px; }
  .top-search kbd { display: none; }
  body[data-screen="welcome"] .top-search { visibility: visible; }
  .app { padding-bottom: 96px; }

  .tabbar {
    position: fixed; z-index: 150;
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
    padding: 6px; border-radius: 24px;
    background: var(--ink); color: var(--paper);
    box-shadow: 0 18px 40px -12px rgba(29, 21, 49, .55);
    view-transition-name: tabbar;
  }
  .tab {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 4px; border-radius: 18px;
    font-weight: 600; font-size: .72rem; opacity: .65;
    transition: background .2s, opacity .2s;
  }
  .tab.active { background: rgba(255, 255, 255, .14); opacity: 1; }
  .tab .saved-count { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: .62rem; }

  .hero { padding-top: 20px; gap: 8px; }
  .hero-title { font-size: clamp(2.5rem, 11vw, 3.4rem); margin: 18px 0 16px; }
  .hero-word { font-size: 1em; }
  .hero-actions .btn { flex: 1; padding-inline: 14px; font-size: .95rem; }
  .hero-search { display: none; } /* the top bar search covers it on phones */
  .hero-stack { height: 400px; }
  .stack-card { width: min(270px, 70%); }
  .stack-card.s1 { transform: translate(calc(-50% + 36px), calc(-50% - 16px)) rotate(6deg) scale(.92); }
  .stack-card.s2 { transform: translate(calc(-50% + 64px), calc(-50% - 30px)) rotate(12deg) scale(.84); }
  .stack-name { font-size: 1.15rem; }
  .field-chip { font-size: .95rem; }

  .row-arrow { display: none; }
  .row-scroll .card { flex-basis: 200px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { padding: 6px; border-radius: 22px; }
  .card-art { border-radius: 17px; }
  .card-name { font-size: .98rem; }
  .card-hook { font-size: .8rem; }
  .heart { width: 34px; height: 34px; top: 8px; right: 8px; }

  .quiz-key { display: none; }
  .quiz { min-height: calc(100svh - var(--top-h) - 96px); padding-bottom: 24px; }
  .quiz-bar { margin-bottom: 30px; }

  .cat-hero { gap: 16px; }
  .cat-hero-icon { width: 58px; height: 58px; border-radius: 18px; }
  .detail-bar { padding: 10px var(--gutter); }
  .detail-pos { display: none; }
  .bento { margin-top: 36px; gap: 12px; }
  .tile, .tryit { padding: 22px; }
}

/* ===== Quiz results: profile bars, fields, next steps, summary ===== */
.persona-name-sm { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 22ch; }
.pbars { list-style: none; display: grid; gap: 10px; max-width: 760px; margin: 8px 0 20px; }
.pbar { display: grid; grid-template-columns: minmax(150px, 1.1fr) 2fr auto; align-items: center; gap: 14px; }
.pbar-name { font-size: .95rem; opacity: .92; }
.pbar-name strong { font-family: var(--f-display); font-size: 1.05rem; margin-right: 4px; }
.pbar-track { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.pbar-fill { display: block; height: 100%; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 2px var(--t); }
.persona.reveal .pbar-fill { animation: barGrow 1s var(--out) .4s backwards; transform-origin: left; }
@keyframes barGrow { from { transform: scaleX(0); } }
.pbar-value { font-weight: 700; font-size: .9rem; min-width: 5.5em; text-align: right; }
.persona-values { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; font-weight: 600; }
.field-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.field-chips .chip b { margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--c); color: #fff; font-size: .8rem; }
.more-wrap { margin-top: 28px; }
.more-wrap .grid { margin-top: 18px; }
.next-steps { margin-top: 48px; padding: 28px; border-radius: var(--r-lg); background: var(--card); border: 1.5px solid var(--line); }
.next-steps h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -0.03em; }
.next-list { margin: 16px 0 22px; padding-left: 22px; display: grid; gap: 8px; line-height: 1.5; }
.next-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.credit { margin-top: 28px; font-size: .78rem; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 10px; }
.summary-sheet { display: none; }
@media (max-width: 640px) {
  .acard { padding: 22px 18px; gap: 16px; }
  .acard-icon { width: 60px; height: 60px; border-radius: 18px; }
  .acard-answers { grid-template-columns: repeat(2, 1fr); }
  .pbar { grid-template-columns: 1fr auto; }
  .pbar-track { grid-column: 1 / -1; grid-row: 2; }
}
@media print {
  /* results.js copies the sheet into <body> while printing; print only that */
  html, body { background: #fff !important; }
  body::before, body::after, body > :not(.summary-print) { display: none !important; }
  .summary-print { display: block !important; padding: 0; color: #000; background: #fff; font: 12pt/1.5 Georgia, serif; }
  .summary-print h1 { font-size: 22pt; margin: 0; }
  .summary-print h2 { font-size: 13pt; margin: 16px 0 4px; }
  .summary-date, .summary-note { color: #444; font-size: 10pt; }
}

/* ===== Pre-rendered page copy (careers/*): for crawlers and no-JS readers; the app replaces it ===== */
.js .static-page { display: none; }
.static-page { max-width: 760px; margin: 32px auto; padding: 0 16px; line-height: 1.6; }
.static-page h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; margin: 12px 0; }
.static-page h2 { font-size: 1.25rem; margin: 28px 0 8px; }
.static-page ul, .static-page ol { padding-left: 22px; }
.static-page a { color: var(--ink); text-decoration: underline; }
.static-crumbs { font-size: .9rem; color: var(--muted); }
.static-lead { font-size: 1.15rem; }

/* ===== Paused by the viewer (js/motion.js) ===== */
.motion-paused .marquee-track,
.motion-paused svg [class^="a-"],
.motion-paused svg [class*=" a-"] { animation-play-state: paused !important; }
.motion-paused .marquee { overflow-x: auto; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee { overflow-x: auto; }
}
