/* ATSMeter — "Report Card" design system.
   Deliberately different skeleton from SpendPattern/QueryDoctor: paper +
   red-pen grading metaphor instead of glass/mesh cards. Self-hosted display
   type (matching the Bank-Statement-Analyser usage guide's font system) and
   a rotated rubber-stamp grade badge instead of a ring gauge. All motion is
   transform/opacity only. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage.woff2') format('woff2');
  font-weight: 600 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 500; font-style: normal; font-display: swap;
}

:root {
  --paper: #fcfbf8;
  --paper-2: #f4f2ec;
  --ink: #221f1a;
  --muted: #6d6a63;
  --line: rgba(30, 28, 22, .11);
  --card: #ffffff;
  --card-brd: rgba(30, 28, 22, .12);
  --red: #b7362f;      /* red pen */
  --red-ink: #8c2a24;
  --green: #2f7d4f;     /* pass stamp */
  --amber: #a9700a;
  --blue: #2563eb;      /* auth pill accent */
  --orange: #c2650a;    /* private toggle */
  --teal: #0c8a7a;      /* transparency reveal, distinct from every other accent */
  --shadow: 0 10px 30px rgba(30, 28, 22, .08);
  --radius: 14px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --f-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* Dark mode: warm charcoal — deliberately neither brown nor navy (both
   already used across our other apps / earlier drafts of this one). */
:root[data-theme="dark"] {
  --paper: #18181b;
  --paper-2: #202024;
  --ink: #eeeeef;
  --muted: #9c9ca3;
  --line: rgba(238, 238, 239, .12);
  --card: #212125;
  --card-brd: rgba(238, 238, 239, .13);
  --red: #ff6b5b;
  --red-ink: #ff8a7a;
  --green: #58c98a;
  --amber: #e0a94a;
  --blue: #5b8def;
  --orange: #e0913a;
  --teal: #3ecfbb;
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #18181b; --paper-2: #202024; --ink: #eeeeef; --muted: #9c9ca3;
    --line: rgba(238, 238, 239, .12);
    --card: #212125; --card-brd: rgba(238, 238, 239, .13);
    --red: #ff6b5b; --red-ink: #ff8a7a; --green: #58c98a; --amber: #e0a94a;
    --blue: #5b8def;
    --orange: #e0913a;
    --teal: #3ecfbb;
    --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px; line-height: 1.55; min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2147483646; }
::view-transition-old(root) { z-index: 1; }

/* ── chrome ── */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px clamp(16px, 4vw, 40px);
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; font-family: var(--f-display);
  border-radius: 8px; transition: background-color .2s ease;
}
a.brand { padding: 5px 8px; margin: -5px -8px; }
a.brand:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.brand-mark { color: var(--red); font-size: 22px; }
.brand-in {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; font-family: var(--f-body); color: #fff;
  background: linear-gradient(120deg, var(--green), #1f8a4d); padding: 2px 8px; border-radius: 4px;
}
.privacy-pill {
  font-size: 13.5px; font-weight: 600; color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  padding: 6px 13px; border-radius: 999px; white-space: nowrap;
}
.blog-back {
  font-size: 14px; font-weight: 700; color: var(--red-ink); text-decoration: none;
  padding: 6px 9px; margin: -6px -9px; border-radius: 7px;
  transition: background-color .2s ease;
}
.blog-back:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.other-guides { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.other-guides li a {
  display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none;
  background: var(--paper-2); border: 1px solid var(--card-brd); transition: background .2s ease;
}
.other-guides li a:hover { background: color-mix(in srgb, var(--ink) 6%, var(--paper-2)); }
.other-guides li a b { color: var(--ink); }
.other-guides li a small { display: block; color: var(--muted); margin-top: 2px; }
.auth-pill {
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted);
  background: var(--paper-2); border: 1px solid var(--card-brd);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
}
.auth-pill { transition: border-color .2s ease, color .2s ease, background-color .2s ease, transform .15s ease; }
.auth-pill:hover { border-color: var(--blue); color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, var(--paper-2)); }
.auth-pill-round { width: 34px; height: 34px; padding: 0; border-radius: 50%; justify-content: center; }
.auth-pill-round:hover { transform: scale(1.06); }
.auth-pill-round .avatar { width: 100% !important; height: 100% !important; font-size: 13px !important; }

.auth-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .5); padding: 20px; box-sizing: border-box;
  animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-8px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-modal-card {
  position: relative; width: 100%; max-width: 360px;
  background: var(--card); border: 1px solid var(--card-brd); border-radius: 16px;
  box-shadow: var(--shadow); padding: 28px 24px 24px;
  animation: modal-in .35s var(--spring) both;
}
.history-modal-card { max-width: 560px; }
.auth-modal-close {
  position: absolute; top: 12px; right: 12px; width: 28px; height: 28px;
  border-radius: 50%; border: 0; background: var(--paper-2); color: var(--muted);
  cursor: pointer; font-size: 13px; transition: background-color .2s ease;
}
.auth-modal-close:hover { background: color-mix(in srgb, var(--red) 12%, var(--paper-2)); color: var(--red-ink); }
.auth-modal-card h3 { font-family: var(--f-display); font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border-radius: 50%; color: #fff; font-weight: 700; font-family: var(--f-display);
  line-height: 1;
}
.profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.avatar-upload-btn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; flex-shrink: 0; }
.avatar-upload-hint {
  position: absolute; bottom: -2px; right: -2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--card-brd); display: flex; align-items: center;
  justify-content: center; font-size: 10px; color: var(--muted);
}
.avatar-upload-btn:hover .avatar-upload-hint { color: var(--blue); border-color: var(--blue); }
.spinner {
  display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ink) 20%, transparent); border-top-color: var(--blue);
  animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.crop-viewport {
  margin: 12px auto; border-radius: 50%; overflow: hidden; background: var(--paper-2);
  border: 1px solid var(--card-brd); cursor: grab; touch-action: none;
}
.crop-viewport:active { cursor: grabbing; }
.crop-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.crop-controls input[type="range"] { flex: 1; }
.profile-header h3 { margin-bottom: 2px; }
.profile-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 14px 0 18px; }
.profile-actions { display: flex; flex-direction: column; gap: 8px; }
#account-history-list { max-height: 320px; overflow-y: auto; margin-top: 4px; }
.auth-modal-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.auth-modal-input {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--paper-2); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 12px;
}
.auth-modal-input:focus { outline: none; border-color: var(--blue); }
.auth-modal-send { width: 100%; }
.auth-modal-msg { font-size: 13px; margin-top: 12px; text-align: center; }
.auth-modal-ok { color: var(--green); }
.auth-modal-err { color: var(--red-ink); }
.topbar-nav { display: flex; align-items: center; gap: 16px; }
.topbar-nav a { font-size: 14px; font-weight: 700; color: var(--red-ink); text-decoration: none; white-space: nowrap; }
.topbar-nav a:hover { text-decoration: underline; }
.nav-short { display: none; }
@media (max-width: 560px) {
  .topbar-nav { gap: 10px; }
  .nav-full { display: none; }
  .nav-short { display: inline; }
  .privacy-pill { padding: 6px 10px; }
  .new-theme-btn { padding: 6px 10px; font-size: 12.5px; }
}
@media (max-width: 420px) {
  /* narrowest phones: brand + IN badge + auth icon + Tools + lock + this
     button is too many items for one row even with every label shortened —
     drop the privacy lock pill first (it repeats what the footer/FAQ already
     say), since the new-theme button is the one thing on this page that is
     actually new and worth the space. */
  .privacy-pill { display: none; }
}

.screen { max-width: 1000px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 48px; }

.hero { text-align: center; padding: clamp(14px, 3vw, 32px) 0 16px; animation: rise .6s ease both; }
.hero h1 { font-family: var(--f-display); font-size: clamp(30px, 5.6vw, 50px); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.hero em {
  font-style: normal;
  background: linear-gradient(100deg, var(--red) 0%, #e0765e 45%, var(--amber) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { max-width: 660px; margin: 14px auto 0; color: var(--muted); font-size: 17.5px; }
.li-brand {
  font-weight: 700;
  background: linear-gradient(100deg, #0a66c2 0%, #378fe9 55%, #70b5f9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.in-flag {
  background: linear-gradient(100deg, #e2913d 0%, #d3ccb0 50%, #2fac6d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="light"] .in-flag {
  background: linear-gradient(100deg, #c9670d 0%, #8a7a3f 50%, #12864c 100%);
  -webkit-background-clip: text; background-clip: text;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .in-flag {
    background: linear-gradient(100deg, #c9670d 0%, #8a7a3f 50%, #12864c 100%);
    -webkit-background-clip: text; background-clip: text;
  }
}

.promo-banner {
  display: block; text-align: center; text-decoration: none;
  font-size: 14.5px; color: var(--ink);
  background: var(--paper-2); border: 1px dashed var(--card-brd);
  border-radius: 10px; padding: 12px 16px; margin: 22px 0;
  transition: transform .3s var(--spring), border-color .25s ease;
}
.promo-banner b { color: var(--red-ink); }
.promo-banner:hover { transform: translateY(-1px); border-color: var(--red-ink); }

/* ── paper cards (replaces glass) ── */
.desk { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 800px) { .desk { grid-template-columns: 1fr; } }

.paper-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-brd);
  border-radius: var(--radius);
  padding: 24px clamp(12px, 3vw, 26px) clamp(16px, 3vw, 24px);
  margin-top: 22px;
  box-shadow: var(--shadow);
  animation: rise .5s ease both;
}
.paper-tab {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  font-family: var(--f-display); font-style: normal; font-size: 13px; font-weight: 700;
  letter-spacing: .01em; white-space: nowrap;
  padding: 5px 16px; border-radius: 4px;
  box-shadow: 0 3px 8px rgba(0,0,0,.2);
}
.paper-card h3 { font-size: 17px; margin-bottom: 10px; font-family: var(--f-display); font-weight: 600; text-align: center; }

/* upload */
.dropzone {
  border: 2px dashed var(--line); border-radius: 10px;
  padding: clamp(22px, 4vw, 36px); text-align: center; cursor: pointer;
  transition: transform .3s var(--spring), border-color .25s ease, background .25s ease;
}
.dropzone:hover, .dropzone:focus-visible {
  transform: translateY(-2px); border-color: var(--red);
  background: color-mix(in srgb, var(--red) 5%, transparent); outline: none;
}
.dropzone.dragover {
  transform: translateY(-2px) scale(1.01); border-color: var(--green); border-style: solid;
  background: color-mix(in srgb, var(--green) 8%, transparent);
}
/* 3D tilt rig. Perspective lives on the outer stage; the rAF loop writes
   rotateX/rotateY onto .dz-tilt only — never onto .dropzone itself, whose own
   hover transform has a CSS transition that a per-frame write would fight.
   NOTE: no overflow:hidden anywhere in this subtree — combining it with
   transform-style: preserve-3d flickers badly in Safari. The impact ring and
   landing pad are left to bleed past their box instead of being clipped. */
.dz-persp { perspective: 500px; }  /* short distance = strong, obvious foreshortening */
.dz-tilt {
  transform-style: preserve-3d;
  will-change: transform;
}
/* A rotated flat outline reads as almost nothing on its own — the lean only
   becomes legible with depth cues, so while tilting the box lifts toward the
   viewer and casts a real shadow. */
.dz-tilt .dropzone { transition: box-shadow .25s ease, border-color .25s ease, background .25s ease; }
.dz-tilt.is-tilting .dropzone {
  box-shadow: 0 22px 45px rgba(0,0,0,.38), 0 4px 12px rgba(0,0,0,.22);
  background: color-mix(in srgb, var(--red) 6%, transparent);
  border-color: var(--red);
}

.dz-title { font-size: 20px; font-weight: 700; margin-top: 12px; font-family: var(--f-display); }
.dz-hint { color: var(--muted); margin-top: 3px; font-size: 14.5px; }

/* Falling-file loop — its own 2.8s cycle, independent of the tilt. */
.dz-stage { position: relative; height: 64px; margin: 0 auto 4px; width: 64px; }
.dz-pad {
  position: absolute; left: 50%; bottom: -4px; width: 46px; height: 10px;
  transform: translateX(-50%) scaleX(.5); border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(124,58,237,.55), transparent 70%);
  opacity: 0;
  animation: dz-pad-pulse 2.8s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes dz-pad-pulse {
  0%, 34% { opacity: 0; transform: translateX(-50%) scaleX(.5); }
  40%     { opacity: .9; transform: translateX(-50%) scaleX(1.15); }
  55%, 80% { opacity: .35; transform: translateX(-50%) scaleX(.85); }
  100%    { opacity: 0; transform: translateX(-50%) scaleX(.5); }
}
.dz-file {
  position: absolute; left: 50%; top: 0; width: 34px; height: 42px;
  transform: translate(-50%, -34px) rotate(-6deg) scale(.7);
  opacity: 0;
  animation: dz-file-fall 2.8s cubic-bezier(.4,0,.2,1) infinite;
}
.dz-file svg { width: 100%; height: 100%; display: block; }
@keyframes dz-file-fall {
  0%   { transform: translate(-50%, -34px) rotate(-10deg) scale(.7); opacity: 0; }
  8%   { opacity: 1; }
  38%  { transform: translate(-50%, 10px) rotate(2deg) scale(1.04); opacity: 1; }
  46%  { transform: translate(-50%, 2px) rotate(-1deg) scale(.97); opacity: 1; }
  54%  { transform: translate(-50%, 7px) rotate(0deg) scale(1); opacity: 1; }
  80%  { transform: translate(-50%, 7px) rotate(0deg) scale(1); opacity: 1; }
  92%  { opacity: 0; }
  100% { transform: translate(-50%, -34px) rotate(-10deg) scale(.7); opacity: 0; }
}
.dz-impact {
  position: absolute; left: 50%; bottom: 2px; width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid #e879f9; transform: translate(-50%, 50%) scale(0); opacity: 0;
  animation: dz-impact-ring 2.8s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes dz-impact-ring {
  0%, 36% { opacity: 0; transform: translate(-50%, 50%) scale(0); }
  38%     { opacity: .8; transform: translate(-50%, 50%) scale(.3); }
  52%     { opacity: 0; transform: translate(-50%, 50%) scale(2.6); }
  100%    { opacity: 0; transform: translate(-50%, 50%) scale(2.6); }
}
@media (prefers-reduced-motion: reduce) {
  .dz-file, .dz-pad, .dz-impact { animation: none !important; opacity: 1; transform: translate(-50%, 7px); }
}
.btn-sample {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--teal);
  background: color-mix(in srgb, var(--teal) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; margin-top: 12px;
  transition: background .2s ease, transform .15s ease;
}
.btn-sample:hover { background: color-mix(in srgb, var(--teal) 18%, transparent); transform: scale(1.03); }

.target-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.target-label { font-weight: 700; font-size: 15px; color: var(--muted); }
.segment {
  position: relative; display: flex; background: var(--paper-2); border-radius: 10px;
  padding: 4px; border: 1.5px solid var(--card-brd);
}
.seg-indicator {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 7px; z-index: 0; pointer-events: none;
  background: color-mix(in srgb, var(--orange) 14%, var(--card));
  border: 2px solid var(--orange);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--orange) 25%, transparent);
  transition: transform .4s var(--spring), background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.segment[data-active="govt"] .seg-indicator {
  transform: translateX(100%);
  background: color-mix(in srgb, var(--green) 14%, var(--card));
  border-color: var(--green);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--green) 25%, transparent);
}
.seg-btn {
  position: relative; z-index: 1; flex: 1;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--muted);
  background: none; border: 2px solid transparent; border-radius: 7px; padding: 7px 16px; cursor: pointer;
  transition: color .3s ease; white-space: nowrap;
}
.seg-btn.active { color: var(--orange); }
.segment[data-active="govt"] .seg-btn.active { color: var(--green); }
.target-reason { text-align: center; font-size: 12.5px; color: var(--muted); max-width: 46ch; margin: 10px auto 0; }

.jd-details { margin-top: 16px; text-align: center; }
.jd-details summary {
  cursor: pointer; font-weight: 700; font-size: 15px; color: var(--red-ink);
  list-style: none; padding: 8px 0;
  user-select: none; -webkit-user-select: none;
}
.jd-details summary::-webkit-details-marker { display: none; }
.optional { color: var(--muted); font-weight: 500; font-size: 13px; }
.jd-details[open] { text-align: left; }
textarea {
  width: 100%; font: 500 14.5px/1.55 var(--f-mono);
  color: var(--ink); background: var(--paper-2);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 12px; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--red); }
.jd-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
#btn-rematch { margin-top: 10px; }

.why-list { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.why-list li {
  display: flex; align-items: flex-start; gap: 8px; text-align: left;
  font-size: 15px; color: var(--muted); max-width: 34ch;
}
.why-list li::before { content: "✎"; color: var(--red); flex: none; margin-top: 2px; }
.why-list li span { flex: 1 1 auto; min-width: 0; }
.why-list b { color: var(--ink); }

.error {
  margin-top: 14px; color: var(--red); font-weight: 600; text-align: center;
  background: color-mix(in srgb, var(--red) 10%, transparent);
  border-radius: 8px; padding: 12px 16px; animation: shake .4s ease;
}

/* loading */
.loading { display: grid; place-items: center; gap: 14px; padding: 40px; text-align: center; }
.scan-doc { font-size: 50px; position: relative; width: 90px; height: 90px; display: grid; place-items: center; overflow: hidden; }
.scan-beam {
  position: absolute; left: 6%; right: 6%; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  animation: scan 1.3s ease-in-out infinite;
}
#loading-msg { color: var(--muted); font-weight: 600; }

/* ── graded result ── */
.attached-file {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--card); border: 1px solid var(--card-brd); border-radius: 12px;
  padding: 12px 20px; margin-top: 22px; box-shadow: var(--shadow);
  animation: rise .45s ease both;
}
.attached-file-icon { font-size: 22px; }
.attached-file-text { text-align: center; }
.attached-file-text small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.attached-file-text b { font-size: 15.5px; font-family: var(--f-body); }

.report { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; align-items: start; }
@media (max-width: 800px) { .report { grid-template-columns: 1fr; } }
@media (min-width: 801px) {
  /* Grade stays in view while the (often longer) remarks column scrolls. */
  .graded-sheet { position: sticky; top: 84px; }
}

.graded-sheet { text-align: center; }
.stamp-wrap { position: relative; display: flex; flex-direction: column; align-items: center; margin: 18px 0 8px; }
.score-ring { position: absolute; top: -20px; left: 50%; transform: translateX(-50%) rotate(-90deg); }
.score-ring-bg { fill: none; stroke: var(--line); stroke-width: 6; }
.score-ring-fg {
  fill: none; stroke: var(--grade-color, var(--green)); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 427; stroke-dashoffset: 427;
  transition: stroke-dashoffset 1.1s .2s cubic-bezier(.22, 1, .36, 1), stroke .3s ease;
}
.stamp {
  width: 110px; height: 110px; border-radius: 50%;
  border: 1.5px solid var(--line);
  color: var(--grade-color, var(--green));
  display: grid; place-items: center;
  transform: rotate(-9deg) scale(0);
  animation: stamp-in .55s .15s var(--spring) forwards;
}
.stamp-grade { font-family: var(--f-serif); font-weight: 400; font-size: 56px; line-height: 1; }
.stamp-score {
  margin-top: 30px; display: inline-flex; align-items: baseline; gap: 4px;
  color: var(--muted); font-weight: 700; font-size: 14px;
  padding: 7px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--grade-color, var(--green)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--grade-color, var(--green)) 32%, transparent);
}
.stamp-score b { color: var(--grade-color, var(--ink)); font-size: 21px; font-variant-numeric: tabular-nums; }
.graded-sheet h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(19px, 3vw, 23px); margin-top: 12px; text-align: center; }
.muted { color: var(--muted); font-size: 14.5px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; justify-content: center; }
.score-caption { font-size: 12.5px; margin-top: 14px; max-width: 34ch; margin-left: auto; margin-right: auto; }
.badge {
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--muted);
}

/* job-description chips */
.jd-card { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); text-align: center; }
.chip-block { margin-top: 8px; }
.chip-label { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.chip-label.ok { color: var(--green); } .chip-label.miss { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.chip {
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--paper-2); border: 1px solid var(--line);
}
.chip.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.chip.miss { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }

/* findings as red-pen margin remarks */
.findings { list-style: none; }
.findings li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 10px 12px 12px; margin-bottom: 2px; border-bottom: 1px dashed var(--line);
  border-left: 3px solid var(--line); border-radius: 0 6px 6px 0;
  animation: rise .45s ease both;
}
.findings li.sev-high { border-left-color: var(--red); }
.findings li.sev-medium { border-left-color: var(--amber); }
.findings li.sev-low { border-left-color: var(--muted); }
.findings li:last-child { border-bottom: 0; }
.findings li::before { content: "✎"; color: var(--red); font-size: 16px; margin-top: 2px; flex: none; }
.sev {
  flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 4px; margin-top: 2px; text-transform: uppercase;
  border: 1px solid currentColor;
}
.sev.high { color: var(--red); }
.sev.medium { color: var(--amber); }
.sev.low { color: var(--muted); }
.findings b { display: block; margin-bottom: 2px; font-family: var(--f-display); font-weight: 600; }
.findings p { color: var(--muted); font-size: 14.5px; white-space: pre-line; }

.jd-copy-block {
  margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center;
  background: var(--paper-2); border-radius: 8px; padding: 10px 12px;
}
.jd-copy-block b { color: var(--ink); }

.verb-panel { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); }
.verb-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.verb-list li { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.verb-list code {
  font-family: var(--f-mono); font-size: 12.5px; color: var(--red-ink);
  background: var(--paper-2); padding: 2px 6px; border-radius: 4px;
}
.verb-arrow { color: var(--green); font-weight: 700; }

.actions-row { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; flex-wrap: wrap; gap: 10px; }
.btn-ghost {
  font: inherit; font-weight: 700; color: var(--red-ink); background: none; border: 0;
  cursor: pointer; padding: 10px 0; display: inline-block;
  transition: transform .15s ease;
}
.btn-ghost:hover { transform: scale(1.06); }
.btn-ghost:active { transform: scale(.92); }
.btn-mini {
  font: inherit; font-size: 14px; font-weight: 700; color: var(--card);
  background: var(--ink);
  border: 0; border-radius: 999px; padding: 9px 18px; cursor: pointer;
  transition: transform .3s var(--spring);
}
.btn-mini:hover { transform: scale(1.06); }
.btn-mini:active { transform: scale(.92); }
.btn-mini-outline {
  color: var(--ink); background: transparent; border: 1.5px solid var(--card-brd);
}
.download-group { display: flex; gap: 8px; flex-wrap: wrap; }
.rewrite-note { text-align: center; font-size: 13px; margin-top: 10px; }

.history-card { text-align: center; }
.history-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; max-width: 620px; margin-left: auto; margin-right: auto; }
.history-head {
  display: grid; grid-template-columns: 110px 1fr 90px 70px; align-items: center; gap: 10px;
  padding: 0 12px; max-width: 620px; margin: 0 auto; font-size: 11.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: left;
}
.history-head span:nth-child(3), .history-head span:last-child { text-align: right; }
.history-item {
  display: grid; grid-template-columns: 110px 1fr 90px 70px; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px; background: var(--paper-2);
  font-size: 14px; text-align: left; width: 100%;
}
.history-item .h-kind { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .h-file { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .h-date { color: var(--muted); font-size: 12.5px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.history-item .h-score { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 480px) {
  .history-head, .history-item { grid-template-columns: 70px 1fr 62px 56px; gap: 6px; }
  .history-head { font-size: 10px; }
}
.history-hint { font-size: 12px; margin-top: 10px; }
.history-toggle {
  display: block; margin: 10px auto 0; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--teal); background: none; border: 1px dashed color-mix(in srgb, var(--teal) 40%, transparent);
  padding: 6px 16px; border-radius: 999px; cursor: pointer; transition: background .2s ease;
}
.history-toggle:hover { background: color-mix(in srgb, var(--teal) 10%, transparent); }

.checklist { list-style: none; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.checklist li { display: flex; gap: 10px; align-items: baseline; justify-content: center; font-size: 15px; font-weight: 700; }
.checklist li span { font-weight: 500; color: var(--ink); }
.ck-ok { color: var(--green); }
.ck-fix { color: var(--red); }
.ck-fix span { color: var(--muted); }

.compare-summary { text-align: center; font-size: 15px; margin-bottom: 12px; }
.compare-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .compare-cols { grid-template-columns: 1fr; } }
.compare-cols h4 { margin-bottom: 6px; }
.diff-list { list-style: none; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.diff-list li { background: var(--paper-2); border-radius: 6px; padding: 4px 8px; word-break: break-word; }

.raw-text-card summary {
  cursor: pointer; font-weight: 700; font-size: 15px; color: var(--teal);
  list-style: none; text-align: center;
  width: fit-content; margin: 0 auto; padding: 8px 18px; border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent);
  transition: background .2s ease;
  user-select: none; -webkit-user-select: none;
}
.raw-text-card summary:hover { background: color-mix(in srgb, var(--teal) 20%, transparent); }
.raw-text-card summary::-webkit-details-marker { display: none; }
.raw-text-hint { font-size: 13px; text-align: center; margin-top: 10px; }
.raw-text {
  margin-top: 12px; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; max-height: 360px; overflow-y: auto;
}
.rt-ok { background: color-mix(in srgb, var(--green) 22%, transparent); color: var(--green); border-radius: 3px; padding: 0 2px; }
.rt-bad { background: color-mix(in srgb, var(--red) 22%, transparent); color: var(--red-ink); border-radius: 3px; padding: 0 2px; }

/* trust + FAQ + footer */
.trust { display: flex; justify-content: center; gap: clamp(16px, 4vw, 44px); flex-wrap: wrap; margin-top: 38px; }
.t-item { display: flex; gap: 10px; align-items: center; font-size: 22px; }
.t-item b { display: block; font-size: 16px; font-family: var(--f-display); font-weight: 700; } .t-item small { display: block; color: var(--muted); font-size: 13.5px; }
@media (max-width: 620px) { .trust { flex-direction: column; align-items: center; gap: 14px; } .t-item { width: 265px; } }

.faq h2 { font-family: var(--f-display); font-weight: 700; font-size: 21px; margin-bottom: 12px; text-align: center; }
.faq-item { border-bottom: 1px dashed var(--line); padding: 12px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
  cursor: pointer; font-weight: 700; font-size: 15.5px; list-style: none;
  padding: 4px 0 4px 24px; position: relative;
  user-select: none; -webkit-user-select: none; /* stops fast repeated clicks from selecting nearby text */
}
.faq-item summary::-webkit-details-marker { display: none; }
/* Animated plus->minus: a fixed horizontal bar + a vertical bar that
   scales to zero height on open — smooth transform animation instead of
   an instant `content` swap (content changes can't be animated at all). */
.faq-item summary::before, .faq-item summary::after {
  content: ""; position: absolute; left: 2px; top: 50%; background: var(--red);
  transition: transform .35s var(--spring);
}
.faq-item summary::before { width: 12px; height: 2px; transform: translateY(-50%); }
.faq-item summary::after { left: 7px; width: 2px; height: 12px; transform: translateY(-50%); }
.faq-item[open] summary::after { transform: translateY(-50%) scaleY(0); }
.faq-item p { color: var(--muted); font-size: 14.5px; margin-top: 8px; line-height: 1.6; }
.findings-group { text-align: left; }
.findings-group summary { display: flex; align-items: center; gap: 8px; }
.findings-count {
  font-size: 11.5px; font-weight: 800; color: var(--muted); background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px;
}
.findings-group .findings { margin-top: 10px; }

.foot { text-align: center; color: var(--muted); font-size: 13.5px; padding: 26px 0 10px; }
.foot-products, .foot-legal { margin-top: 12px; }
.foot-products a, .foot-legal a {
  font-weight: 700; text-decoration: none; white-space: nowrap;
  padding: 5px 10px; border-radius: 7px; transition: background-color .2s ease;
}
.foot-products a { color: var(--green); }        /* products: distinct from legal links */
.foot-legal a { color: var(--red-ink); }
.foot-products a:hover, .foot-legal a:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }

/* Cross-links to my other tools. Deliberately the quietest row in the
   footer — smaller and muted rather than brand-coloured like .foot-products
   — because these are trust-first tools and a prominent row of outbound
   links reads as an ad. flex-wrap so the long descriptive anchors (kept
   descriptive on purpose: they're the anchor text search engines read) wrap
   cleanly on a phone instead of forcing a horizontal scroll. */
.foot-tools {
  margin-top: 12px; font-size: 12.5px;
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: baseline; gap: 2px 6px;
  /* Subtle tint so the row reads as its own block without shouting — these
     are sibling products, not an ad. */
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 16px; width: fit-content; max-width: 100%;
  margin-left: auto; margin-right: auto;
}
.foot-tools a {
  color: var(--muted); font-weight: 600; text-decoration: underline;
  text-underline-offset: 2px; text-decoration-thickness: 1px;
  padding: 2px 4px; border-radius: 6px;
  transition: color .2s ease, background-color .2s ease;
}
.foot-tools a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }

/* ── products dropdown (topbar) ── */
.products-menu { position: relative; }
.products-btn {
  font: inherit; font-size: 14px; font-weight: 700; color: var(--red-ink);
  background: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: 3px;
  padding: 6px 9px; margin: -6px -9px; border-radius: 7px;
  transition: background-color .2s ease;
}
.products-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.products-btn .caret { font-size: 11px; transition: transform .25s ease; }
.products-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.products-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0; left: auto;
  width: min(260px, calc(100vw - 24px)); background: var(--card); border: 1px solid var(--card-brd);
  border-radius: 12px; box-shadow: var(--shadow); padding: 8px; z-index: 20;
  transform-origin: top right;
  animation: dropdown-in .4s var(--spring) both;
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-8px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.products-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-size: 20px;
  transition: background .2s ease, transform .2s var(--spring);
  animation: rise .3s ease both;
}
.products-item:nth-child(1) { animation-delay: .04s; }
.products-item:nth-child(2) { animation-delay: .09s; }
.products-item:nth-child(3) { animation-delay: .14s; }
.products-item:hover, .products-item:focus-visible { background: var(--paper-2); outline: none; transform: translateX(2px); }
.products-item span { display: flex; flex-direction: column; }
.products-item b { font-size: 14px; font-family: var(--f-display); font-weight: 700; }
.products-item small { font-size: 12px; color: var(--muted); }
.products-item.active { background: color-mix(in srgb, var(--green) 12%, transparent); }
.products-item.active b { color: var(--green); }

/* legal pages */
.legal { max-width: 720px; }
.legal h1 { font-family: var(--f-display); font-weight: 700; font-size: 32px; margin-bottom: 4px; }
.legal h2 { font-family: var(--f-display); font-weight: 700; font-size: 19px; margin-top: 26px; margin-bottom: 8px; }
.legal p, .legal ul { color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.legal ul { padding-left: 22px; margin-top: 6px; }
.legal a { color: var(--red-ink); font-weight: 700; text-decoration: none; }

/* theme FAB */
.btn-theme {
  position: fixed; z-index: 50; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid var(--card-brd); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer; display: grid; place-items: center;
  transition: transform .35s var(--spring);
}
.btn-theme:hover { transform: scale(1.1); }
.btn-theme:active { transform: scale(.88); }
.btn-theme svg { position: absolute; transition: transform .5s var(--spring), opacity .3s ease; }
.ico-sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
.ico-moon { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="light"] .ico-sun { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="light"] .ico-moon { opacity: 0; transform: rotate(90deg) scale(.4); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .ico-sun { opacity: 1; transform: rotate(0) scale(1); }
  :root:not([data-theme="dark"]) .ico-moon { opacity: 0; transform: rotate(90deg) scale(.4); }
}

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes scan { 0%,100% { top: 10%; } 50% { top: 86%; } }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes stamp-in { 0% { transform: rotate(-9deg) scale(0); } 60% { transform: rotate(-9deg) scale(1.15); } 100% { transform: rotate(-9deg) scale(1); } }

/* ── section map (parser's view of resume structure) ── */
.section-map-card { text-align: left; }
.section-map-hint { font-size: 12.5px; line-height: 1.5; margin-bottom: 14px; text-align: center; }
.smap-row {
  border-left: 3px solid var(--green); background: var(--paper-2);
  border-radius: 0 8px 8px 0; padding: 10px 14px; margin-bottom: 8px;
}
.smap-row.smap-warn { border-left-color: var(--amber); }
.smap-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.smap-head b { font-size: 14.5px; }
.smap-as { font-size: 12px; color: var(--muted); font-family: var(--f-mono); }
.smap-count { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-left: auto; white-space: nowrap; }
.smap-preview {
  font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.smap-flag { font-size: 12px; color: var(--amber); margin-top: 5px; font-weight: 600; }
.smap-missing {
  font-size: 13px; color: var(--muted); margin-top: 12px; padding: 10px 14px;
  border: 1px dashed color-mix(in srgb, var(--red) 40%, transparent); border-radius: 8px;
}
.smap-missing b { color: var(--red-ink); }

/* ── mobile density: the tool should be reachable without reading an essay ── */
.note-summary { display: none; }
@media (max-width: 800px) {
  .hero-lede { display: none; }                 /* generic opener; keyword sentence stays visible */
  .hero { padding: 10px 0 12px; }
  .hero .sub { font-size: 16px; margin-top: 10px; }
  .note-card .paper-tab { display: none; }      /* the summary carries the label when collapsible */
  .note-summary {
    display: block; cursor: pointer; list-style: none; text-align: center;
    font-family: var(--f-display); font-weight: 700; font-size: 14.5px;
    user-select: none; -webkit-user-select: none;
  }
  .note-summary::-webkit-details-marker { display: none; }
  .note-card[open] .note-summary { margin-bottom: 12px; }
  .faq { padding-top: 18px; }
}

/* ── ATS preview: resume as the parser rebuilt it, beside a sticky score ── */
.rp-grid { display: grid; grid-template-columns: 1fr 210px; gap: 18px; align-items: start; }
@media (max-width: 800px) { .rp-grid { grid-template-columns: 1fr; } }
.rp-doc {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 0; max-height: 460px; overflow-y: auto;
}
.rp-section { border-left: 3px solid var(--green); margin: 8px 10px; padding: 8px 12px; background: var(--card); border-radius: 0 8px 8px 0; }
.rp-section.rp-warn { border-left-color: var(--amber); }
.rp-sec-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rp-sec-head b { font-size: 14px; font-family: var(--f-display); }
.rp-as { font-size: 11.5px; color: var(--muted); font-family: var(--f-mono); }
.rp-count { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: auto; white-space: nowrap; }
.rp-body { margin-top: 6px; }
.rp-body p { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.rp-flag { font-size: 11.5px; color: var(--amber); margin-top: 5px; font-weight: 600; }
.rp-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 800px) { .rp-side { position: static; } }
.rp-score { text-align: center; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; }
.rp-score-num { font-size: 34px; font-weight: 800; font-family: var(--f-display); }
.rp-score-den { font-size: 14px; color: var(--muted); }
.rp-score-grade { font-family: var(--f-serif); font-size: 22px; line-height: 1; margin-top: 2px; }
.rp-stat { font-size: 12.5px; color: var(--muted); background: var(--paper-2); border-radius: 8px; padding: 7px 10px; }
.rp-stat b { color: var(--ink); font-size: 14px; }
.rp-stat-warn b { color: var(--amber); }
.rp-missing { font-size: 12px; color: var(--muted); padding: 9px 10px; border: 1px dashed color-mix(in srgb, var(--red) 40%, transparent); border-radius: 8px; }
.rp-missing b { color: var(--red-ink); }
.rp-ok { font-size: 12px; color: var(--green); padding: 9px 10px; border: 1px dashed color-mix(in srgb, var(--green) 40%, transparent); border-radius: 8px; }

/* ── missing-keyword suggestion drawer ── */
.chip-actionable { cursor: pointer; font: inherit; border-style: dashed !important; transition: transform .15s ease, background .2s ease; }
.chip-actionable:hover { transform: scale(1.05); background: color-mix(in srgb, var(--red) 16%, transparent); }
.kw-drawer-overlay {
  position: fixed; inset: 0; z-index: 110; display: flex; justify-content: flex-end;
  background: rgba(0,0,0,.5); animation: fade-in .2s ease;
}
.kw-drawer {
  position: relative; width: min(420px, 100%); height: 100%; overflow-y: auto;
  background: var(--card); border-left: 1px solid var(--card-brd);
  padding: 28px 22px; animation: drawer-in .3s var(--spring) both;
}
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) {
  .kw-drawer-overlay { align-items: flex-end; justify-content: center; }
  .kw-drawer { width: 100%; height: auto; max-height: 85vh; border-radius: 16px 16px 0 0; border-left: 0; }
  @keyframes drawer-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.kw-drawer-cat { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.kw-drawer h3 { font-family: var(--f-display); font-size: 20px; font-weight: 700; margin: 2px 0 12px; }
.kw-drawer-where { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.kw-drawer-where b { color: var(--ink); }
.kw-drawer-label { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.kw-bullet { background: var(--paper-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.kw-bullet code { display: block; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.6; color: var(--ink); margin-bottom: 8px; }
.kw-drawer-warn { font-size: 12px; color: var(--amber); margin-top: 14px; line-height: 1.5; }

.chip-hint { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }

/* JD match percentage — colour-coded so a weak match is obvious at a glance. */
.jd-pct { font-family: var(--f-display); font-weight: 800; font-size: 1.25em; }
.jd-pct.ok { color: var(--green); }
.jd-pct.warn { color: var(--amber); }
.jd-pct.bad { color: var(--red); }
.jd-pct-label { font-family: var(--f-body); font-size: .58em; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.rp-stat .jd-pct { font-size: 14px; }
.rp-stat .jd-pct-label { display: none; }

/* ── "Check out new theme" ────────────────────────────────────────────────
   Links to the V3 redesign, mounted at /new. Deliberately uses that theme's
   own ember accent (#FF5A3C, not one of this site's own --red/--green/etc
   tokens) so the colour itself previews what's on the other side — its own
   /new pages return the favour with a button in THIS site's red, pointing
   back to "/". A small glow (not used elsewhere on this page) marks it as
   the one genuinely new thing in the header, meant to be noticed first. */
.topbar-nav a.new-theme-btn {
  /* .topbar-nav a alone (class+type, 0-1-1) outranks a bare .new-theme-btn
     (0-1-0) — its color: var(--red-ink) was winning over this rule's color
     entirely, which is how the white-text-was-actually-red-ink bug happened.
     .topbar-nav a.new-theme-btn (0-2-1) unambiguously outranks it instead.
     Near-black text is deliberate too, not a leftover: white on this exact
     ember is 3.1:1 and fails AA under 18.66px bold — near-black is the same
     fix V3 itself uses for the same fill (its --on-ember token), 6.26:1. */
  font-size: 13.5px; font-weight: 700; color: #150B08; text-decoration: none;
  background: #FF5A3C; padding: 6px 13px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(255,90,60,.5);
  animation: new-theme-glow 2.4s ease-in-out infinite;
  transition: transform .15s ease;
}
.new-theme-btn:hover { transform: translateY(-1px); }
@keyframes new-theme-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,90,60,.45); }
  50%      { box-shadow: 0 0 0 6px rgba(255,90,60,0); }
}
@media (prefers-reduced-motion: reduce) { .new-theme-btn { animation: none; } }
