/* ============== THEMES ============== */
:root {
  /* default = claude theme */
  --bg: #f6f0e4;
  --bg-deep: #ebe2cf;
  --bg-soft: #fffdf8;
  --surface: #ffffff;
  --ink: #191818;
  --ink-soft: #3a3632;
  --muted: #78726a;
  --line: #d9cfb8;
  --accent: #cc785c;
  --accent-deep: #a85a43;
  --accent-hot: #ff4d2e;
  --pill: #ffe14d;
  --pill-ink: #191818;
  --pop-1: #ff7ab6;
  --pop-2: #7ee8ff;
  --pop-3: #c6ff4d;
  --pop-4: #b19cff;
  --danger: #e54325;
  --safe: #3fa06a;
  --bg-grad-a: rgba(255, 122, 182, 0.10);
  --bg-grad-b: rgba(126, 232, 255, 0.10);
  --doom-track: linear-gradient(90deg, #2fbf71 0%, #e8d24a 40%, #e28a3a 65%, #cc3b2a 85%, #1a0808 100%);
  --hero-grad: linear-gradient(90deg, var(--accent-hot), var(--pop-1), var(--accent-hot));
  --val-bg: #ffe14d;
  --val-ink: #191818;
  --head-bg: #7ee8ff;
  --head-ink: #191818;
  --tag-ink: var(--accent-deep);

  --serif: "Fraunces", ui-serif, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --display: "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

[data-theme="openai"] {
  --bg: #fafaf9;
  --bg-deep: #f0f0ee;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --ink: #0d0d0d;
  --ink-soft: #2c2c2c;
  --muted: #6e6e6e;
  --line: #e3e3e1;
  --accent: #10a37f;
  --accent-deep: #0b8669;
  --accent-hot: #19c37d;
  --pill: #d1f5e9;
  --pill-ink: #064e3b;
  --pop-1: #74aa9c;
  --pop-2: #c2e8d8;
  --pop-3: #ffe8b5;
  --pop-4: #d6c7ee;
  --danger: #ef4444;
  --safe: #10a37f;
  --bg-grad-a: rgba(16, 163, 127, 0.08);
  --bg-grad-b: rgba(116, 170, 156, 0.10);
  --doom-track: linear-gradient(90deg, #10a37f 0%, #b8e6c8 35%, #ffd57a 60%, #f59e0b 80%, #b91c1c 100%);
  --hero-grad: linear-gradient(90deg, #10a37f, #19c37d, #10a37f);
  --val-bg: #f0f9f5;
  --val-ink: #064e3b;
  --head-bg: #f0f9f5;
  --head-ink: #064e3b;
  --tag-ink: #0b8669;

  --serif: "Söhne", "Inter", ui-sans-serif, system-ui, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --display: "Inter", ui-sans-serif, system-ui, sans-serif;
}

[data-theme="google"] {
  --bg: #ffffff;
  --bg-deep: #f8f9fa;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --ink: #202124;
  --ink-soft: #3c4043;
  --muted: #5f6368;
  --line: #dadce0;
  --accent: #1a73e8;
  --accent-deep: #1558b3;
  --accent-hot: #ea4335;
  --pill: #fef7e0;
  --pill-ink: #1a73e8;
  --pop-1: #ea4335;
  --pop-2: #fbbc04;
  --pop-3: #34a853;
  --pop-4: #1a73e8;
  --danger: #ea4335;
  --safe: #34a853;
  --bg-grad-a: rgba(26, 115, 232, 0.08);
  --bg-grad-b: rgba(234, 67, 53, 0.06);
  --doom-track: linear-gradient(90deg, #34a853 0%, #fbbc04 40%, #f29900 65%, #ea4335 90%, #b31412 100%);
  --hero-grad: linear-gradient(90deg, #4285f4, #ea4335, #fbbc04, #34a853, #4285f4);
  --val-bg: #e8f0fe;
  --val-ink: #1558b3;
  --head-bg: #fce8e6;
  --head-ink: #b31412;
  --tag-ink: #1a73e8;

  --serif: "Google Sans", "Product Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  --sans: "Google Sans Text", "Roboto", "Inter", ui-sans-serif, system-ui, sans-serif;
  --display: "Google Sans", "Product Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  transition: background-color .25s ease, color .25s ease;
}

body {
  background:
    radial-gradient(1200px 700px at 85% -10%, var(--bg-grad-a), transparent 60%),
    radial-gradient(900px 600px at -10% 100%, var(--bg-grad-b), transparent 60%),
    var(--bg);
  padding-bottom: 210px;
}

/* ============== THEME SWITCHER ============== */
.theme-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.theme-bar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.theme-bar__brand {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--muted);
}
.theme-bar__brand b { color: var(--accent-deep); font-weight: 700; }
.theme-switcher {
  display: inline-flex;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.theme-switcher__btn {
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 7px 13px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, color .15s, transform .12s;
}
.theme-switcher__btn:hover { color: var(--ink); }
.theme-switcher__btn[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.theme-switcher__dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.theme-switcher__dot--claude { background: linear-gradient(135deg, #cc785c, #ff7ab6); }
.theme-switcher__dot--openai { background: linear-gradient(135deg, #10a37f, #74aa9c); }
.theme-switcher__dot--google { background: conic-gradient(from 0deg, #4285f4, #ea4335, #fbbc04, #34a853, #4285f4); }

/* ============== DOOM METER (fixed bottom) ============== */
.doom-meter {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 14px 20px 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 0%, transparent) 0%, color-mix(in srgb, var(--bg) 94%, transparent) 22%, var(--bg) 60%);
  backdrop-filter: blur(8px);
  z-index: 50;
  pointer-events: auto;
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.doom-meter__head {
  max-width: 1100px;
  margin: 0 auto 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.doom-meter__heading { display: flex; flex-direction: column; gap: 2px; }
.doom-meter__title {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
[data-theme="claude"] .doom-meter__title,
:root:not([data-theme]) .doom-meter__title {
  font-family: var(--serif);
  text-transform: none;
  letter-spacing: -0.01em;
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
}
.doom-meter__sample {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: lowercase;
}
.doom-meter__sample b { color: var(--ink); font-weight: 700; }
.doom-meter__readout {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--display);
  color: var(--ink);
}
.doom-meter__value {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  background: var(--hero-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hue 7s ease-in-out infinite;
}
[data-theme="claude"] .doom-meter__value,
:root:not([data-theme]) .doom-meter__value {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
}
.doom-meter__denom {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  margin-right: 8px;
}
.doom-meter__vibe {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--accent-deep);
  font-weight: 700;
  text-transform: lowercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
}
.doom-meter__track {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  height: 22px;
  background: var(--doom-track);
  border-radius: 999px;
  overflow: visible;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), inset 0 -6px 14px rgba(0,0,0,0.10), 0 2px 12px rgba(0,0,0,0.06);
}
.doom-meter__fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.10) 100%);
  border-right: 2px solid rgba(255,255,255,0.85);
  transition: width 1.1s cubic-bezier(.2,.9,.2,1);
  mix-blend-mode: multiply;
  border-radius: 999px 0 0 999px;
}
.doom-meter__marker {
  position: absolute;
  top: -8px;
  bottom: -8px;
  width: 0;
  transition: left 1.1s cubic-bezier(.2,.9,.2,1);
  pointer-events: none;
  z-index: 3;
}
.doom-meter__marker-dot {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 18px; height: 18px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.30);
}
.doom-meter__scale {
  max-width: 1100px;
  margin: 6px auto 0;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 4px;
}

/* ============== LAYOUT ============== */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

/* ============== HERO ============== */
.hero {
  text-align: center;
  margin-bottom: 40px;
}
.hero__kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--accent-deep);
  margin-bottom: 24px;
}
.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(52px, 11vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--ink);
}
[data-theme="claude"] .hero__title,
:root:not([data-theme]) .hero__title {
  font-family: var(--serif);
  font-weight: 500;
}
.hero__title em {
  font-style: italic;
  font-weight: 700;
  background: var(--hero-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hue 7s ease-in-out infinite;
  /* italic glyphs overshoot their advance width; padding stops -webkit-background-clip:text
     from chopping off the final letter's slope */
  display: inline-block;
  padding-right: 0.12em;
  margin-right: -0.04em;
}
[data-theme="claude"] .hero__title em,
:root:not([data-theme]) .hero__title em { font-weight: 600; }
.hero__line { display: block; }
.hero__layout { display: block; }
.hero__layout--mobile { display: none; }
.hero__question {
  display: inline-block;
  color: var(--accent-hot);
  animation: wobble 2.6s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes hue {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes wobble {
  0%, 100% { transform: rotate(0) translateY(0); }
  25% { transform: rotate(-5deg) translateY(-2px); }
  75% { transform: rotate(6deg) translateY(1px); }
}
.hero__sub {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.hero__wink {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--pill);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--pill-ink);
  font-weight: 700;
}

/* ============== INPUT ============== */
.input-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  margin: 32px auto 0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 24px 60px -30px rgba(0,0,0,0.14);
}
.input-label {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.input-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.input-field {
  flex: 1;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
[data-theme="claude"] .input-field,
:root:not([data-theme]) .input-field {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
}
.input-field::placeholder { color: var(--muted); opacity: .65; font-style: italic; }
.input-field:focus {
  border-color: var(--accent);
  background: var(--bg-soft);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.cta {
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 14px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .12s ease, background .15s, box-shadow .2s;
  box-shadow: 0 8px 24px -10px rgba(0,0,0,0.35);
}
.cta:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta:disabled { opacity: .55; cursor: progress; }
.cta__emoji { font-size: 18px; filter: drop-shadow(0 0 6px rgba(255,255,255,0.35)); }
.input-hint {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ============== SUGGESTION CHIPS ============== */
.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}
.suggestion-row__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 2px;
  font-weight: 700;
}
.suggestion-chip {
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  transition: transform .12s, background .15s, border-color .15s, color .15s;
}
.suggestion-chip:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent-deep);
  transform: translateY(-1px);
}
.suggestion-chip--lucky {
  background: color-mix(in srgb, var(--pop-3) 25%, var(--bg));
  border-color: color-mix(in srgb, var(--pop-3) 60%, var(--line));
  color: var(--ink);
}
.suggestion-chip--lucky:hover {
  background: var(--pop-3);
  border-color: var(--ink);
  color: var(--ink);
}

/* ============== LOADING ============== */
.loading {
  margin: 48px auto 0;
  text-align: center;
}
.loading__dots { display: inline-flex; gap: 8px; margin-bottom: 12px; }
.loading__dots span {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  animation: bounce 1.1s ease-in-out infinite;
}
.loading__dots span:nth-child(2) { background: var(--pop-1); animation-delay: .12s; }
.loading__dots span:nth-child(3) { background: var(--pop-2); animation-delay: .24s; }
@keyframes bounce { 0%,80%,100% { transform: translateY(0); opacity: .6;} 40% { transform: translateY(-12px); opacity: 1;} }
.loading__text {
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  font-weight: 500;
}
[data-theme="claude"] .loading__text,
:root:not([data-theme]) .loading__text { font-family: var(--serif); font-weight: 400; }
.loading__bar {
  position: relative;
  width: min(360px, 78%);
  height: 6px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-soft) 14%, transparent);
  overflow: hidden;
}
.loading__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--pop-1), var(--pop-2));
  background-size: 200% 100%;
  transition: width .4s cubic-bezier(.2,.9,.2,1);
  animation: loadingBarShimmer 2.2s linear infinite;
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 50%, transparent);
}
@keyframes loadingBarShimmer {
  from { background-position: 0% 0; }
  to   { background-position: 200% 0; }
}

/* ============== RESULT ============== */
.result { margin-top: 40px; animation: pop .6s cubic-bezier(.2,.9,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(16px);} to { opacity: 1; transform: translateY(0);} }

.verdict {
  position: relative;
  border-radius: 26px;
  padding: 34px 30px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.18);
  overflow: hidden;
}
.verdict::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--verdict-bg, linear-gradient(135deg, var(--bg-grad-a), var(--bg-grad-b)));
  z-index: 0;
  pointer-events: none;
}
.verdict > * { position: relative; z-index: 1; }

.verdict__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.verdict__tier {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
}
.verdict__cache {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: lowercase;
  color: var(--muted);
}
.verdict__reroll {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--accent-deep);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.verdict__reroll:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Bolded product/tool names inside prose */
.prose-bold {
  font-weight: 800;
  color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 0 3px;
  border-radius: 4px;
  white-space: nowrap;
}
[data-theme="claude"] .prose-bold,
:root:not([data-theme]) .prose-bold {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
}
.verdict--t1 .verdict__tier { background: var(--danger); }
.verdict--t2 .verdict__tier { background: color-mix(in srgb, var(--danger) 70%, var(--pop-2) 30%); }
.verdict--t3 .verdict__tier { background: color-mix(in srgb, var(--accent) 60%, var(--pop-2) 40%); }
.verdict--t4 .verdict__tier { background: color-mix(in srgb, var(--accent) 80%, #888 20%); }
.verdict--t5 .verdict__tier { background: var(--safe); }

.verdict__headline {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--ink);
}
[data-theme="claude"] .verdict__headline,
:root:not([data-theme]) .verdict__headline {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.verdict--t1 .verdict__headline,
.verdict--t2 .verdict__headline { color: var(--danger); }

.verdict__body {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 700px;
  font-weight: 500;
}

.verdict__months {
  margin-top: 26px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 24px 24px;
  text-align: center;
  background:
    radial-gradient(600px 180px at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 72%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 18px 40px -28px rgba(0,0,0,0.22);
}
.verdict__months-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 700;
}
.verdict__months-headline {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  flex-wrap: nowrap;
  width: 100%;
  line-height: 1;
}
.verdict__months-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(88px, 18vw, 168px);
  line-height: 0.9;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  background: var(--hero-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hue 7s ease-in-out infinite;
}
[data-theme="claude"] .verdict__months-num,
:root:not([data-theme]) .verdict__months-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
}
.verdict__months-word {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.015em;
  color: var(--ink);
}
[data-theme="claude"] .verdict__months-word,
:root:not([data-theme]) .verdict__months-word {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
}
.verdict__months-sub {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 560px;
  font-weight: 500;
}

/* ============== SECTION ============== */
.section-head { margin: 44px 0 16px; text-align: center; }
.section-head__tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--tag-ink);
  text-transform: lowercase;
}
.section-head h3 {
  font-family: var(--display);
  font-weight: 700;
  font-style: normal;
  font-size: 30px;
  margin: 6px 0 0;
  letter-spacing: -0.02em;
  color: var(--ink);
}
[data-theme="claude"] .section-head h3,
:root:not([data-theme]) .section-head h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 32px;
  letter-spacing: -0.01em;
}

/* ============== TOOL CARDS ============== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .2s ease, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -20px rgba(0,0,0,0.18); }
.tool-card::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 90px; height: 90px;
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--pop-1) 25%, transparent), transparent 70%);
  pointer-events: none;
}
.tool-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.tool-card__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink);
}
[data-theme="claude"] .tool-card__name,
:root:not([data-theme]) .tool-card__name {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tool-card__country {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.tool-card__company {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* collapsible tool cards */
.tool-card--collapsible { padding-bottom: 20px; }
.tool-card__header {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.tool-card__head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.tool-card__head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.tool-card__chevron {
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
  transition: transform .2s ease;
}
.tool-card.is-open .tool-card__chevron { transform: rotate(180deg); }
.tool-card__body { display: none; }
.tool-card.is-open > .tool-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  animation: toolBodyIn .22s ease;
}
@keyframes toolBodyIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* labeled stat chips with tooltips */
.tool-card__stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.stat-chip {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: help;
}
.stat-chip__label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.stat-chip__value {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.stat-chip--val { background: var(--val-bg); border-color: color-mix(in srgb, var(--val-ink) 15%, var(--line)); }
.stat-chip--val .stat-chip__label { color: color-mix(in srgb, var(--val-ink) 70%, var(--muted)); }
.stat-chip--val .stat-chip__value { color: var(--val-ink); }
.stat-chip--head { background: var(--head-bg); border-color: color-mix(in srgb, var(--head-ink) 15%, var(--line)); }
.stat-chip--head .stat-chip__label { color: color-mix(in srgb, var(--head-ink) 70%, var(--muted)); }
.stat-chip--head .stat-chip__value { color: var(--head-ink); }
.stat-chip--cat { background: var(--bg-deep); }

/* tooltip */
.stat-chip[data-tip]:hover::before,
.stat-chip[data-tip]:focus::before {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 7px 10px;
  border-radius: 8px;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  line-height: 1.4;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.4);
}
.stat-chip[data-tip]:hover::after,
.stat-chip[data-tip]:focus::after {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
  z-index: 20;
  pointer-events: none;
}

.tool-card__desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 4px;
}

/* The ACTUAL feature replacing this person */
.tool-card__feature {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-left: 3px solid var(--accent);
}
.tool-card__feature-label {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 700;
  margin-bottom: 4px;
}
.tool-card__feature-body {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
}

.tool-card__replaces {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.tool-card__replaces b { color: var(--accent-deep); font-weight: 700; }

/* ============== CHAIN / RELEASES ============== */
.chain, .releases {
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.chain { background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--accent) 6%, var(--surface))); }
.releases { background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--pop-2) 14%, var(--surface))); }
.chain__tag, .releases__tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--tag-ink);
  text-transform: lowercase;
  margin-bottom: 8px;
  font-weight: 700;
}
.chain__body, .releases__body {
  font-family: var(--sans);
  font-style: normal;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.55;
}
[data-theme="claude"] .chain__body,
[data-theme="claude"] .releases__body,
:root:not([data-theme]) .chain__body,
:root:not([data-theme]) .releases__body {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
}

/* ============== FLOATING RESCUE BUTTON ============== */
.rescue-float {
  position: fixed;
  left: 50%;
  bottom: 168px;
  transform: translateX(-50%);
  z-index: 70;
  cursor: pointer;
  min-height: 62px;
  padding: 0 26px 0 22px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--accent-hot) 55%, var(--ink));
  background: linear-gradient(135deg, var(--accent-hot), var(--accent-deep));
  color: #fff;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  transition: transform .14s ease, box-shadow .2s ease, filter .2s ease, background .2s;
  box-shadow:
    0 22px 44px -18px rgba(0,0,0,0.55),
    0 0 0 8px color-mix(in srgb, var(--accent) 16%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.35);
  animation: rescueBob 3.4s ease-in-out infinite;
}
.rescue-float__pulse {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-hot) 45%, transparent);
  z-index: -1;
  animation: rescuePulse 2.4s ease-out infinite;
  pointer-events: none;
}
.rescue-float__icon { font-size: 20px; filter: drop-shadow(0 0 8px rgba(255,255,255,0.35)); }
.rescue-float__text { line-height: 1; }
.rescue-float__chev {
  font-size: 18px;
  font-weight: 800;
  opacity: 0.9;
  transform: translateX(0);
  transition: transform .2s ease;
}
.rescue-float:hover {
  transform: translateX(-50%) translateY(-3px);
  filter: saturate(1.08);
  box-shadow:
    0 28px 52px -18px rgba(0,0,0,0.6),
    0 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.4);
}
.rescue-float:hover .rescue-float__chev { transform: translateX(4px); }
@keyframes rescueBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}
/* hide the floating rescue CTA whenever a modal is open so it doesn't
   leak through the backdrop or compete with modal content */
body:has(.share-modal:not([hidden])) .rescue-float,
body:has(.classified-modal:not([hidden])) .rescue-float,
body:has(.rank-modal:not([hidden])) .rescue-float {
  visibility: hidden;
  pointer-events: none;
}
@keyframes rescuePulse {
  0% { transform: scale(1); opacity: 0.55; }
  70% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}

/* ============== CLASSIFIED CREDIT LINE (inside doom meter) ============== */
.classified-credit {
  max-width: 1100px;
  margin: 10px auto 0;
  padding: 6px 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: color-mix(in srgb, var(--ink) 55%, var(--muted));
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  font-weight: 500;
  opacity: 0.7;
  border-top: 1px dashed color-mix(in srgb, var(--line) 70%, transparent);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.classified-credit:hover,
.classified-credit:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
  outline: none;
}
.classified-credit__mark {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: currentColor;
}
.classified-credit__mark svg { width: 100%; height: 100%; display: block; }
.classified-credit__wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: -0.01em;
  text-transform: none;
  color: color-mix(in srgb, var(--ink) 70%, var(--muted));
}
.classified-credit__ai { color: #dc2626; font-weight: 500; }
.classified-credit__sep { opacity: 0.5; }
.classified-credit__line { opacity: 0.95; }

/* ============== SHARE CTA (between months and tools) ============== */
.share-cta {
  margin: 48px auto;
  padding: 40px 0 44px;
  border: none;
  background: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
}
.share-cta__rule {
  width: min(420px, 70%);
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 22%, transparent), transparent);
  margin: 0 auto 10px;
}
.share-cta__rule--bottom { margin: 14px auto 0; }
.share-cta__tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 700;
}
.share-cta__heading {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
[data-theme="claude"] .share-cta__heading,
:root:not([data-theme]) .share-cta__heading {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
}
.share-cta__btn {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22px, 3.6vw, 30px);
  padding: 20px 38px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.01em;
  margin-top: 6px;
  box-shadow: 0 18px 36px -16px color-mix(in srgb, var(--accent) 75%, transparent), 0 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .15s ease, background .15s;
  position: relative;
  animation: shareCtaPulse 2.4s ease-in-out infinite;
}
.share-cta__btn:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--accent-deep);
  box-shadow: 0 22px 40px -16px color-mix(in srgb, var(--accent-deep) 80%, transparent), 0 2px 0 var(--ink);
}
.share-cta__btn:active { transform: translateY(0) scale(0.99); }
.share-cta__btn:focus { outline: none; }
.share-cta__btn:focus-visible {
  outline: none;
  box-shadow:
    0 14px 30px -14px color-mix(in srgb, var(--accent) 90%, transparent),
    0 2px 0 var(--ink),
    0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent);
}
.share-cta__icon { font-size: 1.05em; }
.share-cta__arrow { transition: transform .15s ease; }
.share-cta__btn:hover .share-cta__arrow { transform: translateX(4px); }
.share-cta__hint {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}
@keyframes shareCtaPulse {
  0%, 100% { box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accent) 70%, transparent), 0 2px 0 var(--ink); }
  50%      { box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accent) 95%, transparent), 0 2px 0 var(--ink), 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
}

/* ============== RANK FRIENDS CTA ============== */
.rank-cta {
  margin: 8px auto 28px;
  padding: 28px 24px 30px;
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(520px 220px at 50% 0%, color-mix(in srgb, var(--pop-3) 16%, transparent), transparent 75%),
    linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid color-mix(in srgb, var(--ink) 8%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 18px 40px -28px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.rank-cta__tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 700;
}
.rank-cta__heading {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(24px, 3.8vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
[data-theme="claude"] .rank-cta__heading,
:root:not([data-theme]) .rank-cta__heading {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
}
.rank-cta__sub {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-soft);
  margin: 4px 0 6px;
  max-width: 540px;
  line-height: 1.5;
}
.rank-cta__btn {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(18px, 2.8vw, 22px);
  padding: 16px 28px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 26px -14px rgba(0,0,0,0.45), 0 2px 0 color-mix(in srgb, var(--ink) 70%, transparent);
  transition: transform .12s, background .15s, box-shadow .15s;
}
.rank-cta__btn:hover { transform: translateY(-2px); background: var(--accent-deep); border-color: var(--accent-deep); }
.rank-cta__btn:focus { outline: none; }
.rank-cta__btn:focus-visible {
  outline: none;
  box-shadow:
    0 12px 26px -14px rgba(0,0,0,0.45),
    0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent);
}
.rank-cta__arrow { transition: transform .15s ease; }
.rank-cta__btn:hover .rank-cta__arrow { transform: translateX(4px); }

/* ============== RANK MODAL ============== */
.rank-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--ink) 60%, transparent);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px 16px;
  overflow-y: auto;
}
.rank-modal[hidden] { display: none; }
.rank-modal__card {
  position: relative;
  background: var(--surface);
  border-radius: 24px;
  padding: 32px 28px 28px;
  width: min(640px, 100%);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.6);
  border: 1px solid var(--line);
}
.rank-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-size: 28px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.rank-modal__close:hover { background: var(--bg-soft); color: var(--ink); }
.rank-modal__kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 700;
  margin-bottom: 8px;
}
.rank-modal__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(24px, 4vw, 32px);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink);
}
[data-theme="claude"] .rank-modal__title,
:root:not([data-theme]) .rank-modal__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
}
.rank-modal__sub {
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 18px;
  line-height: 1.5;
}
.rank-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.rank-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 130px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 8px 6px 4px;
  transition: border-color .12s, background .12s;
}
.rank-row--you {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-soft));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.rank-row:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}
.rank-row__num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  text-align: center;
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 4px;
}
.rank-row--you .rank-row__num {
  color: #fff;
  background: var(--accent);
}
.rank-row__name,
.rank-row__job {
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  padding: 10px 6px;
  outline: none;
  color: var(--ink);
  min-width: 0;
}
.rank-row__name::placeholder,
.rank-row__job::placeholder { color: var(--muted); }
.rank-row__job { font-weight: 600; }
.rank-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.rank-modal__btn {
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  transition: transform .12s, background .15s, color .15s, border-color .15s;
}
.rank-modal__btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-size: 16px;
  padding: 14px 26px;
}
.rank-modal__btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }
.rank-modal__btn--primary:disabled { opacity: 0.55; cursor: wait; transform: none; }
.rank-modal__btn--ghost { background: transparent; }
.rank-modal__btn--ghost:hover { background: var(--bg-deep); border-color: var(--accent); color: var(--accent-deep); }
.rank-modal__hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  letter-spacing: 0.05em;
}

/* ============== RANK LOADING ============== */
.rank-loading {
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.rank-loading__dots {
  display: inline-flex;
  gap: 8px;
}
.rank-loading__dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  animation: rankBounce 1.1s ease-in-out infinite;
}
.rank-loading__dots span:nth-child(2) { animation-delay: 0.15s; }
.rank-loading__dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes rankBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.55; }
  40%           { transform: scale(1.1); opacity: 1; }
}
.rank-loading__text {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

/* ============== RANK BOARD (leaderboard, screenshotable) ============== */
.rank-board {
  border-radius: 22px;
  padding: 28px 24px 22px;
  background:
    radial-gradient(700px 240px at 50% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-soft), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 26px 60px -30px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}
.rank-board::after {
  content: "";
  position: absolute;
  inset: -20% -50% auto auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
.rank-board__header {
  text-align: center;
  margin-bottom: 18px;
  position: relative;
}
.rank-board__kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 700;
}
.rank-board__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
  color: var(--ink);
}
[data-theme="claude"] .rank-board__title,
:root:not([data-theme]) .rank-board__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
}
.rank-board__sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--ink-soft);
}
.rank-board__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.rank-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 6%, var(--line));
  border-radius: 16px;
  box-shadow: 0 4px 12px -10px rgba(0,0,0,0.2);
  position: relative;
}
.rank-item--you {
  background: linear-gradient(95deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface) 60%);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.rank-item--top {
  background: linear-gradient(95deg, color-mix(in srgb, var(--danger, #dc2626) 14%, var(--surface)), var(--surface) 60%);
  border-color: color-mix(in srgb, var(--danger, #dc2626) 40%, var(--line));
}
.rank-item__pos {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  text-align: center;
  color: var(--ink);
  letter-spacing: -0.04em;
}
.rank-item--top .rank-item__pos {
  color: var(--danger, #dc2626);
}
.rank-item__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rank-item__name {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rank-item__badge {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.rank-item__job {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-item__quip {
  font-family: var(--sans);
  font-size: 12.5px;
  font-style: italic;
  color: var(--muted);
  margin-top: 4px;
}
.rank-item__months {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
}
.rank-item__months-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--danger, #dc2626);
}
[data-theme="claude"] .rank-item__months-num,
:root:not([data-theme]) .rank-item__months-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
}
.rank-item__months-word {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.rank-item__tier {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.rank-board__footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed color-mix(in srgb, var(--ink) 18%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  position: relative;
}
.rank-board__tag {
  font-family: var(--sans);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 560px;
  letter-spacing: 0;
  text-transform: none;
}
.rank-board__brand {
  font-family: var(--mono);
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
}

/* ============== SHARE ============== */
.share {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}
.share__btn {
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  transition: transform .12s, background .15s;
}
.share__btn:hover { transform: translateY(-1px); background: var(--accent-deep); border-color: var(--accent-deep); }
.share__btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.share__btn--ghost:hover { background: var(--bg-deep); border-color: var(--accent); color: var(--accent-deep); }

/* ============== ERROR ============== */
.error {
  margin: 32px auto;
  padding: 18px 22px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line));
  color: var(--accent-deep);
  text-align: center;
}
.error__title { font-family: var(--display); font-weight: 700; font-size: 22px; margin-bottom: 6px; color: var(--danger); }
[data-theme="claude"] .error__title,
:root:not([data-theme]) .error__title { font-family: var(--serif); font-weight: 500; }
.error__body { font-size: 14px; color: var(--ink-soft); }

/* ============== FOOTER ============== */
.foot {
  margin: 60px auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.foot__brand { color: var(--accent-deep); font-weight: 700; }
.foot__note { margin-top: 8px; max-width: 640px; margin-left: auto; margin-right: auto; line-height: 1.6; text-transform: lowercase; }

/* ============== SHARE MODAL ============== */
[hidden] { display: none !important; }
.share-modal {
  position: fixed; inset: 0;
  background: rgba(25,24,24,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadein .2s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.share-modal__card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.35);
}
.share-modal__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 14px;
  color: var(--ink);
}
[data-theme="claude"] .share-modal__title,
:root:not([data-theme]) .share-modal__title {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: 26px;
}
.share-modal__preview {
  width: auto;
  max-width: 100%;
  max-height: 360px;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin: 0 auto 14px;
  display: block;
  background: var(--bg-deep);
}
.share-modal__text {
  width: 100%;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  resize: none;
}
.share-modal__hint {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: lowercase;
}
.share-modal__actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; justify-content: flex-end;
}
.share-modal__btn {
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}
.share-modal__btn--x { background: #000; border-color: #000; }
.share-modal__btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }

/* ============== CLASSIFIED MODAL ============== */
.classified-modal {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 600px at 50% 40%, rgba(220, 38, 38, 0.18), transparent 70%),
    rgba(15, 14, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 110;
  padding: 20px;
  animation: fadein .25s ease;
}
.classified-modal__card {
  position: relative;
  width: min(680px, 100%);
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  padding: 34px 30px 28px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 3px,
      rgba(0,0,0,0.012) 3px,
      rgba(0,0,0,0.012) 4px
    ),
    radial-gradient(640px 280px at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(520px 240px at 0% 100%, color-mix(in srgb, var(--accent-hot) 14%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--bg-deep)), var(--surface));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent),
    0 60px 120px -40px rgba(0,0,0,0.55),
    0 0 80px -20px color-mix(in srgb, var(--accent-hot) 35%, transparent);
  overflow: hidden;
  animation: classifiedPop .42s cubic-bezier(0.16, 1, 0.3, 1);
}

/* glowing top accent bar */
.classified-modal__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent-hot) 18%,
    #dc2626 50%,
    var(--accent-hot) 82%,
    transparent 100%);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent-hot) 70%, transparent);
  animation: classifiedScan 3.2s ease-in-out infinite;
}

/* corner bracket — top-left + bottom-right (intercept aesthetic) */
.classified-modal__card::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 16px;
  width: 22px;
  height: 22px;
  border-top: 2px solid color-mix(in srgb, var(--accent-hot) 80%, var(--ink));
  border-left: 2px solid color-mix(in srgb, var(--accent-hot) 80%, var(--ink));
  border-top-left-radius: 6px;
  pointer-events: none;
}

.classified-modal__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 18px;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-hot) 12%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent-hot) 40%, var(--line));
}
.classified-modal__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  box-shadow: 0 0 12px #dc2626, 0 0 0 0 rgba(220, 38, 38, 0.7);
  animation: classifiedBlink 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
.classified-modal__kicker-text {
  font-weight: 700;
  color: var(--ink);
}
.classified-modal__kicker-meta {
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  font-weight: 500;
  letter-spacing: 0.16em;
}

.classified-modal__title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(30px, 5.4vw, 52px);
  line-height: 0.96;
  letter-spacing: -0.038em;
  color: var(--ink);
  font-weight: 800;
}
[data-theme="claude"] .classified-modal__title,
:root:not([data-theme]) .classified-modal__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
}
.classified-modal__body {
  margin: 0;
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 56ch;
}
.classified-modal__points {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}
.classified-modal__point {
  position: relative;
  padding: 13px 16px 13px 38px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.45;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.classified-modal__point::before {
  content: "►";
  position: absolute;
  left: 14px;
  top: 13px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent-hot);
  line-height: 1.45;
}
.classified-modal__point:hover {
  transform: translateX(2px);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.classified-modal__actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.classified-modal__btn {
  position: relative;
  cursor: pointer;
  text-decoration: none;
  min-height: 60px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, var(--ink));
  background: linear-gradient(135deg, var(--accent-hot), var(--accent-deep));
  color: #fff;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: 0.015em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  transition: transform .12s ease, box-shadow .18s ease;
  box-shadow:
    0 18px 40px -16px color-mix(in srgb, var(--accent-hot) 55%, rgba(0,0,0,0.4)),
    inset 0 1px 0 rgba(255,255,255,0.18);
  animation: classifiedPulse 2.4s ease-in-out infinite;
  overflow: hidden;
}
/* shine sweep across the primary button */
.classified-modal__btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 30%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-18deg);
  animation: classifiedShine 3.8s ease-in-out infinite;
}
.classified-modal__btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 50px -16px color-mix(in srgb, var(--accent-hot) 70%, rgba(0,0,0,0.5)),
    inset 0 1px 0 rgba(255,255,255,0.22);
}
.classified-modal__btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
  animation: none;
  font-weight: 600;
  flex: 0 0 auto;
}
.classified-modal__btn--ghost::after { display: none; }
.classified-modal__btn--ghost:hover {
  background: var(--bg-deep);
  color: var(--accent-deep);
  border-color: var(--accent);
  transform: none;
}

@keyframes classifiedPop {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes classifiedBlink {
  0%, 100% { box-shadow: 0 0 12px #dc2626, 0 0 0 0 rgba(220, 38, 38, 0.7); opacity: 1; }
  50%      { box-shadow: 0 0 18px #dc2626, 0 0 0 8px rgba(220, 38, 38, 0); opacity: 0.85; }
}
@keyframes classifiedScan {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}
@keyframes classifiedPulse {
  0%, 100% {
    box-shadow:
      0 18px 40px -16px color-mix(in srgb, var(--accent-hot) 55%, rgba(0,0,0,0.4)),
      0 0 0 0 color-mix(in srgb, var(--accent-hot) 35%, transparent),
      inset 0 1px 0 rgba(255,255,255,0.18);
  }
  50% {
    box-shadow:
      0 22px 50px -16px color-mix(in srgb, var(--accent-hot) 70%, rgba(0,0,0,0.45)),
      0 0 0 10px color-mix(in srgb, var(--accent-hot) 0%, transparent),
      inset 0 1px 0 rgba(255,255,255,0.22);
  }
}
@keyframes classifiedShine {
  0%, 60% { left: -40%; }
  100%    { left: 130%; }
}

/* ============== MOBILE ============== */
@media (max-width: 640px) {
  body { padding-bottom: 215px; }

  /* theme bar — single row, compact */
  .theme-bar__inner {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 12px;
    align-items: center;
  }
  .theme-bar__brand {
    font-size: 10px;
    letter-spacing: 0.10em;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .theme-bar__brand .theme-bar__brand-tag { display: none; }
  .theme-switcher { padding: 2px; gap: 1px; flex-shrink: 0; }
  .theme-switcher__btn { padding: 6px 9px; font-size: 11.5px; gap: 4px; }
  .theme-switcher__dot { width: 8px; height: 8px; }

  /* wrap */
  .wrap { padding: 32px 16px 24px; }

  /* hero */
  .hero { margin-bottom: 24px; }
  .hero__kicker { font-size: 10.5px; letter-spacing: 0.14em; margin-bottom: 14px; }
  .hero__title { font-size: clamp(44px, 13vw, 62px); letter-spacing: -0.045em; line-height: 0.94; }
  .hero__layout--desktop { display: none; }
  .hero__layout--mobile { display: block; }
  .hero__sub { font-size: 16px; margin-top: 16px; line-height: 1.45; }
  .hero__wink { font-size: 13px; }

  /* input card */
  .input-card { padding: 18px; border-radius: 18px; margin-top: 24px; }
  .input-row { flex-direction: column; gap: 10px; }
  .input-field { font-size: 17px; padding: 13px 14px; border-radius: 12px; }
  [data-theme="claude"] .input-field,
  :root:not([data-theme]) .input-field { font-size: 19px; }
  .cta { padding: 14px 20px; justify-content: center; font-size: 15px; border-radius: 12px; }
  .input-hint { font-size: 10.5px; margin-top: 8px; }

  /* suggestion chips */
  .suggestion-row { gap: 6px; margin-top: 12px; }
  .suggestion-row__label { font-size: 10px; letter-spacing: 0.10em; }
  .suggestion-chip { padding: 6px 10px; font-size: 12px; }

  /* doom meter — compact, fewer pixels vertical */
  .doom-meter { padding: 10px 14px 12px; }
  .doom-meter__head { gap: 6px; margin-bottom: 6px; align-items: center; flex-wrap: wrap; }
  .doom-meter__heading { flex: 1 1 auto; min-width: 0; gap: 0; }
  .doom-meter__title { font-size: 11px; letter-spacing: 0.06em; }
  [data-theme="claude"] .doom-meter__title,
  :root:not([data-theme]) .doom-meter__title { font-size: 14px; }
  .doom-meter__sample { font-size: 9.5px; letter-spacing: 0.06em; }
  .doom-meter__readout { gap: 4px; flex-wrap: wrap; }
  .doom-meter__value { font-size: 24px; }
  .doom-meter__denom { font-size: 11px; margin-right: 4px; }
  .doom-meter__vibe { font-size: 10px; padding: 3px 7px; letter-spacing: 0.04em; }
  .doom-meter__track { height: 14px; }
  .doom-meter__marker { top: -5px; bottom: -5px; }
  .doom-meter__marker-dot { width: 14px; height: 14px; border-width: 2px; }
  .doom-meter__scale { font-size: 8.5px; letter-spacing: 0.08em; margin-top: 4px; padding: 0 2px; }

  /* verdict */
  .verdict { padding: 24px 20px 20px; border-radius: 20px; }
  .verdict__topline { gap: 8px; margin-bottom: 14px; }
  .verdict__tier { font-size: 10.5px; padding: 5px 8px; letter-spacing: 0.12em; }
  .verdict__cache { font-size: 10px; }
  .verdict__reroll { font-size: 10px; padding: 4px 8px; letter-spacing: 0.05em; }
  .verdict__headline { font-size: 28px; line-height: 1.05; }
  .verdict__body { font-size: 15.5px; }
  .verdict__months {
    padding: 22px 16px 18px;
    margin-top: 18px;
    border-radius: 20px;
    gap: 8px;
  }
  .verdict__months-kicker { font-size: 9.5px; letter-spacing: 0.16em; }
  .verdict__months-headline { gap: 10px; }
  .verdict__months-num { font-size: clamp(72px, 22vw, 112px); letter-spacing: -0.05em; }
  .verdict__months-word { font-size: clamp(22px, 6vw, 30px); }
  .verdict__months-sub { font-size: 13px; max-width: 320px; }

  /* share cta */
  .share-cta { margin: 32px auto; padding: 26px 0 30px; gap: 10px; }
  .share-cta__rule { width: 70%; }
  .share-cta__tag { font-size: 10.5px; letter-spacing: 0.18em; }
  .share-cta__heading { font-size: 22px; }
  .share-cta__btn { font-size: 19px; padding: 16px 24px; gap: 12px; margin-top: 4px; }
  .share-cta__hint { font-size: 12px; }

  /* rank cta */
  .rank-cta { padding: 22px 18px 24px; margin: 4px auto 22px; gap: 8px; border-radius: 20px; }
  .rank-cta__heading { font-size: 22px; }
  .rank-cta__sub { font-size: 13.5px; }
  .rank-cta__btn { font-size: 16px; padding: 14px 22px; gap: 10px; }

  /* rank modal */
  .rank-modal { padding: 20px 12px; }
  .rank-modal__card { padding: 22px 18px; border-radius: 20px; }
  .rank-modal__title { font-size: 22px; }
  .rank-modal__sub { font-size: 13.5px; }
  .rank-row { grid-template-columns: 36px 1fr; gap: 6px; padding: 6px; }
  .rank-row__name { grid-column: 2 / 3; }
  .rank-row__job { grid-column: 2 / 3; border-top: 1px dashed var(--line); padding-top: 8px; }
  .rank-row__num { padding: 6px 4px; font-size: 10px; }
  .rank-modal__btn { font-size: 13.5px; padding: 10px 18px; }
  .rank-modal__btn--primary { font-size: 15px; padding: 12px 22px; }

  /* rank board */
  .rank-board { padding: 22px 16px 18px; border-radius: 18px; }
  .rank-board__title { font-size: 24px; }
  .rank-item {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    align-items: start;
  }
  .rank-item__pos { font-size: 22px; padding-top: 2px; }
  .rank-item__main { gap: 4px; }
  .rank-item__name { font-size: 14.5px; gap: 6px; }
  .rank-item__badge { font-size: 9px; padding: 1px 6px; letter-spacing: 0.12em; }
  .rank-item__job {
    font-size: 12.5px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.3;
  }
  .rank-item__quip { font-size: 11.5px; line-height: 1.4; margin-top: 6px; }
  .rank-item__months-num { font-size: 24px; }
  .rank-item__months-word { font-size: 9px; letter-spacing: 0.12em; }
  .rank-item__tier { display: none; }

  /* section heads */
  .section-head { margin: 28px 0 12px; }
  .section-head h3 { font-size: 22px; }
  [data-theme="claude"] .section-head h3,
  :root:not([data-theme]) .section-head h3 { font-size: 24px; }

  /* tool cards — single column, tighter */
  .tools-grid { grid-template-columns: 1fr; gap: 12px; }
  .tool-card { padding: 16px; border-radius: 14px; gap: 8px; }
  .tool-card__name { font-size: 19px; }
  [data-theme="claude"] .tool-card__name,
  :root:not([data-theme]) .tool-card__name { font-size: 20px; }
  .tool-card__desc { font-size: 13px; }
  .tool-card__feature { padding: 10px 12px; border-radius: 10px; }
  .tool-card__feature-body { font-size: 13.5px; }
  .tool-card__feature-label { font-size: 9px; }
  .tool-card__replaces { font-size: 10.5px; }

  /* stat chips — tighter, tap-friendly */
  .tool-card__stats { gap: 6px; }
  .stat-chip { padding: 5px 9px; border-radius: 8px; }
  .stat-chip__label { font-size: 9px; }
  .stat-chip__value { font-size: 11.5px; }
  /* tooltip on mobile: render below (tap toggles) so it doesn't clip off top */
  .stat-chip[data-tip]:hover::before,
  .stat-chip[data-tip]:focus::before,
  .stat-chip[data-tip]:active::before {
    max-width: 200px;
    font-size: 11px;
    padding: 6px 9px;
  }

  /* chain / releases */
  .chain, .releases { padding: 16px 18px; border-radius: 14px; margin-top: 14px; }
  .chain__tag, .releases__tag { font-size: 10.5px; letter-spacing: 0.12em; }
  .chain__body, .releases__body { font-size: 15px; }
  [data-theme="claude"] .chain__body,
  [data-theme="claude"] .releases__body,
  :root:not([data-theme]) .chain__body,
  :root:not([data-theme]) .releases__body { font-size: 16px; }

  /* share actions */
  .share { gap: 8px; margin-top: 22px; }
  .share__btn { padding: 11px 16px; font-size: 14px; flex: 1 1 auto; justify-content: center; }

  /* share modal */
  .share-modal { padding: 14px; align-items: flex-start; padding-top: 30px; }
  .share-modal__card { padding: 18px; border-radius: 18px; max-width: 100%; }
  .share-modal__title { font-size: 20px; margin-bottom: 10px; }
  [data-theme="claude"] .share-modal__title,
  :root:not([data-theme]) .share-modal__title { font-size: 22px; }
  .share-modal__preview { max-height: 260px; border-radius: 10px; margin: 0 auto 10px; }
  .share-modal__text { font-size: 12px; padding: 10px; }
  .share-modal__hint { font-size: 9.5px; }
  .share-modal__actions { gap: 6px; justify-content: stretch; }
  .share-modal__btn { padding: 9px 10px; font-size: 12.5px; flex: 1 1 40%; min-width: 0; text-align: center; justify-content: center; }

  /* classified modal */
  .classified-modal { padding: 14px; align-items: flex-start; padding-top: 30px; }
  .classified-modal__card { padding: 26px 18px 22px; border-radius: 20px; }
  .classified-modal__card::after { top: 12px; left: 12px; width: 16px; height: 16px; }
  .classified-modal__kicker { font-size: 10px; padding: 6px 10px 6px 8px; gap: 8px; letter-spacing: 0.18em; }
  .classified-modal__kicker-meta { display: none; }
  .classified-modal__title { font-size: 28px; }
  .classified-modal__body { font-size: 15px; }
  .classified-modal__point { font-size: 13.5px; padding: 11px 12px 11px 32px; }
  .classified-modal__point::before { left: 12px; top: 11px; }
  .classified-modal__btn { flex: 1 1 220px; min-height: 50px; font-size: 14.5px; padding: 0 20px; }
  .rescue-float {
    bottom: 172px;
    min-height: 54px;
    width: calc(100% - 24px);
    max-width: 360px;
    padding: 0 18px;
    gap: 10px;
    font-size: 13px;
    letter-spacing: 0.03em;
  }
  .rescue-float__icon { font-size: 16px; }
  .rescue-float__chev { font-size: 15px; }

  /* classified credit footer — a touch tighter on mobile */
  .classified-credit {
    padding: 10px 12px 14px;
    font-size: 8.5px;
    letter-spacing: 0.10em;
    gap: 5px;
  }
  .classified-credit__wordmark { font-size: 9.5px; }
  .classified-credit__mark { width: 12px; height: 12px; }

  /* footer */
  .foot { margin-top: 40px; padding-top: 22px; font-size: 10.5px; }
  .foot__note { font-size: 10px; line-height: 1.5; }

  /* loading */
  .loading { margin-top: 32px; }
  .loading__text { font-size: 17px; }

  /* error */
  .error { margin: 24px auto; padding: 14px 18px; }
  .error__title { font-size: 18px; }
}

/* tighter on very narrow phones (iPhone SE, Android small) */
@media (max-width: 380px) {
  .wrap { padding: 28px 14px 24px; }
  .theme-bar__brand { font-size: 9px; letter-spacing: 0.08em; }
  .theme-switcher__btn { padding: 5px 8px; font-size: 10.5px; }
  .hero__kicker { font-size: 10px; }
  .input-card { padding: 16px; }
  .input-field { font-size: 15px; padding: 12px 13px; }
  [data-theme="claude"] .input-field,
  :root:not([data-theme]) .input-field { font-size: 17px; }
  .doom-meter__value { font-size: 22px; }
  .doom-meter__vibe { font-size: 9.5px; padding: 2px 6px; }
  .hero__title { font-size: 40px; }
  .verdict { padding: 20px 16px 18px; }
  .verdict__headline { font-size: 24px; }
  .verdict__months-num { font-size: 36px; }
  .tool-card { padding: 14px; }
  .share-modal__btn { font-size: 11.5px; padding: 8px 8px; }
  .rescue-float {
    bottom: 162px;
    font-size: 12px;
    min-height: 50px;
    padding: 0 14px;
    gap: 8px;
  }
  .rescue-float__icon { font-size: 15px; }
  .rescue-float__chev { font-size: 14px; }
  .classified-credit { padding: 8px 10px 12px; font-size: 8px; }
  .classified-credit__wordmark { font-size: 9px; }
}
