/*
 * FittedCV app layer — shared styles for the /setup, /profile and /tailor routes.
 * Sits on top of fittedcv-brand.css (tokens, reset, buttons, theme model). Website-only;
 * never goes to the extension. css/style.css (marketing layout) is NOT loaded on these pages.
 */

/* Design language follows the landing page (css/home.css): grayscale + the one accent hue,
   mono uppercase labels with a leading rule, tight-tracked headings, soft layered card shadows,
   a masked dot texture behind the top of the page, and every bit of motion switched off under
   prefers-reduced-motion. Status colours (ok / warn / danger) are tokens here, with dark-mode
   variants, instead of hex values scattered through the rules. */
:root {
  --app-radius: 16px;
  --app-radius-sm: 10px;
  --app-shadow-card: 0 1px 2px rgba(10, 10, 10, 0.04), 0 8px 24px rgba(10, 10, 10, 0.06);
  --app-shadow-pop: 0 1px 2px rgba(10, 10, 10, 0.05), 0 12px 32px rgba(10, 10, 10, 0.12);
  --app-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ok: #15803d;
  --warn: #b45309;
  --danger: #dc2626;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --app-shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 16px 40px rgba(0, 0, 0, 0.35);
    --app-shadow-pop: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 48px rgba(0, 0, 0, 0.5);
    --ok: #4ade80;
    --warn: #fbbf24;
    --danger: #f87171;
  }
}
:root[data-theme="dark"] {
  --app-shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 16px 40px rgba(0, 0, 0, 0.35);
  --app-shadow-pop: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 48px rgba(0, 0, 0, 0.5);
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.5;
}

/* Keyboard focus — one consistent ring across every interactive element on the app pages. */
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Masked dot texture behind the top of the page (same treatment as the landing hero). Opt-in via
   <body class="app-page">, so the job workspace and tailor pages are unaffected. */
.app-page { position: relative; isolation: isolate; }
.app-page::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 460px;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--fg) 12%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 100% at 75% 0%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse 60% 100% at 75% 0%, #000 10%, transparent 70%);
  opacity: 0.6;
}

.app-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 20px 112px;
}
.app-wrap.narrow { max-width: 620px; }
.app-wrap.tailor-wrap { max-width: 720px; }
.app-wrap.setup-wrap { max-width: 1060px; padding-top: 40px; }

/* --- shared marketing-style components used on setup ----------------------------- */
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--accent-subtle); color: var(--accent);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-badge-icon { width: 12px; height: 12px; flex-shrink: 0; }
.hero-em { color: var(--accent); }

/* --- setup page ------------------------------------------------------------------ */
.setup-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 48px;
  align-items: center;
}

.setup-h1 {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 16px 0 20px;
}

.setup-key-why {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--accent-subtle);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  margin-bottom: 28px;
}
.setup-key-why-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 18%, var(--accent-subtle));
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.setup-key-why-icon svg { width: 20px; height: 20px; }
.setup-key-why-body strong { display: block; font-size: 14px; font-weight: 700; color: var(--fg); margin-bottom: 4px; }
.setup-key-why-body p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* illustration */
.setup-illo {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.setup-illo::before {
  content: '';
  position: absolute;
  inset: -10% -5%;
  border-radius: 60% 70% 65% 55% / 55% 60% 70% 65%;
  background: radial-gradient(ellipse at 50% 55%, var(--accent-subtle) 40%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.sdoc {
  position: absolute;
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--border));
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
}
.sdoc-back {
  width: 220px;
  transform: rotate(-7deg) translate(-60px, 30px);
  z-index: 1;
}
.sdoc-front {
  width: 240px;
  transform: rotate(3deg) translate(44px, -22px);
  z-index: 2;
}
.sdoc-lines { display: flex; flex-direction: column; gap: 12px; }
.sdoc-lines span { display: block; height: 9px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 18%, var(--accent-subtle)); }
.sdoc-sparkle {
  position: absolute;
  top: 16px; right: 16px;
  width: 22px; height: 22px;
  color: var(--accent);
}

.setup-ai-badge {
  position: absolute;
  bottom: 10%; right: 6%;
  z-index: 3;
  display: flex; align-items: center; gap: 6px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 22px; font-weight: 800; letter-spacing: -0.01em;
  color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.09);
}

.setup-sparkle-deco {
  position: absolute;
  top: 5%; right: 2%;
  width: 44px; height: 36px;
  color: var(--accent);
  z-index: 3;
}

@media (max-width: 860px) {
  .setup-layout { grid-template-columns: 1fr; }
  .setup-illo { display: none; }
}

/* Button icon (sparkle) — sized here because css/style.css, which also defines it, is not loaded
   on the app pages; without this the SVG rendered at its intrinsic size. */
.hero-cta-icon { width: 15px; height: 15px; flex-shrink: 0; }

/* --- top bar ---------------------------------------------------------------------------- */
/* Full-width sticky bar (border and blur span the viewport); the padding keeps its content
   inside the same ~1060px column the pages use. */
.app-bar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 12px;
  padding: 12px max(20px, calc((100% - 1060px) / 2));
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
          backdrop-filter: saturate(1.4) blur(12px);
}
.app-bar .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -0.01em; color: var(--fg); text-decoration: none; }
.app-bar .brand img { width: 22px; height: 22px; }
.app-bar .brand-logo-dark { display: none; }
:root[data-theme="dark"] .app-bar .brand-logo-light { display: none; }
:root[data-theme="dark"] .app-bar .brand-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-bar .brand-logo-light { display: none; }
  :root:not([data-theme="light"]) .app-bar .brand-logo-dark { display: block; }
}
.app-bar nav { display: flex; gap: 6px; margin-left: auto; }
.app-bar nav a {
  position: relative;
  padding: 7px 12px; border-radius: 8px; font: 600 13.5px var(--font-sans);
  color: var(--muted); text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.app-bar nav a:hover { background: var(--subtle); color: var(--fg); }
.app-bar nav a[aria-current="page"] { color: var(--fg); }
/* current page: a short accent underline instead of a filled pill */
.app-bar nav a[aria-current="page"]::after {
  content: '';
  position: absolute; left: 12px; right: 12px; bottom: -13px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
@media (max-width: 480px) {
  .app-bar { gap: 8px; }
  .app-bar .brand { font-size: 0; gap: 0; }   /* logo only — keeps the three nav links on one row */
  .app-bar nav a { padding: 7px 9px; }
  .app-bar nav a[aria-current="page"]::after { left: 9px; right: 9px; }
}

/* theme toggle — far-right icon button in the app nav (same logic as style.css on the marketing site) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--fg); cursor: pointer; padding: 0;
  transition: border-color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}

/* --- headings ------------------------------------------------------------------------- */
.app-h1 {
  font-size: clamp(30px, 4vw, 40px); font-weight: 800; line-height: 1.1;
  margin: 0 0 10px; letter-spacing: -0.03em; text-wrap: balance;
}
.app-sub { color: var(--muted); margin: 0 0 36px; font-size: 16px; line-height: 1.6; max-width: 62ch; text-wrap: pretty; }
/* Small mono label with a leading rule — the landing page's .h-label. */
.app-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 12px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 16px;
}
.app-eyebrow::before { content: ''; width: 22px; height: 1.5px; background: currentColor; opacity: 0.6; }
.app-section-title {
  font: 600 12px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); margin: 32px 0 12px;
}
/* Sentence-case heading for a panel/card (profile sections, setup's key card). */
.panel-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 6px; }
.panel-desc { margin: 0 0 20px; font-size: 14.5px; line-height: 1.6; color: var(--muted); max-width: 62ch; text-wrap: pretty; }

/* --- cards / callouts --------------------------------------------------------------- */
.app-card {
  border: 1px solid var(--border); border-radius: var(--app-radius); padding: 20px; background: var(--bg);
  margin: 0 0 24px;
}
.app-callout {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--app-radius-sm); padding: 12px 14px; background: var(--subtle);
  font-size: 14px; color: var(--muted); margin: 0 0 16px;
}
.app-callout strong { color: var(--fg); }
.app-callout.warn { border-left-color: var(--warn); }
.app-callout.err {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, var(--bg));
  color: var(--fg);
}

/* AI key reminder banner — shown on Profile / My Jobs when no key is connected, hidden once verified */
.app-ai-banner[hidden] { display: none; }
.app-ai-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: var(--app-radius); margin: 0 0 32px;
  background: var(--accent-subtle);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
}
.app-ai-banner-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 18%, var(--accent-subtle));
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.app-ai-banner-icon svg { width: 22px; height: 22px; }
.app-ai-banner-body { flex: 1; min-width: 0; }
.app-ai-banner-body strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--fg); margin-bottom: 4px; }
.app-ai-banner-body p { margin: 0 0 2px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.app-ai-banner-note { color: var(--faint) !important; font-size: 12px !important; }
.app-ai-banner-btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 560px) {
  .app-ai-banner { flex-wrap: wrap; align-items: flex-start; }
  .app-ai-banner-body { flex-basis: calc(100% - 60px); }
  .app-ai-banner-btn { width: 100%; }
}

/* Fit chips next to the job title (tailor.js's renderFit()/fitChip()) — same stroke-only pill as
   .job-badge on the captured-jobs list below, just clickable: each opens the fit sheet (#fitSheet)
   with the full summary/strengths/gaps for that side. Deliberately small and secondary — the
   resume/cover-letter generation flow below is the primary CTA on this page, so the title shrinks
   and the chips read as ordinary metadata, not competing calls to action. */
.job-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-head .app-h1 { margin: 0; font-size: 20px; }
.fit-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.job-badge.fit-chip { cursor: pointer; font-size: 10.5px; font-weight: 600; padding: 2px 8px; }
.job-badge.fit-chip:hover { background: var(--subtle); }

/* Fit sheet — a right-hand drawer (tailor.js's openFitSheet()/closeFitSheet()) showing one chip's
   full detail. Toggled via [hidden] plus a `.open` class for the slide/fade transition. */
.sheet[hidden] { display: none; }
.sheet { position: fixed; inset: 0; z-index: 30; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.2s ease; }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%);
  background: var(--bg); color: var(--fg); border-left: 1px solid var(--border);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  transform: translateX(100%); transition: transform 0.2s ease;
  display: flex; flex-direction: column; padding: 20px; overflow-y: auto;
}
.sheet.open .sheet-panel { transform: translateX(0); }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.sheet-title { font: 800 16px var(--font-sans); flex: 1; }
.sheet-badge { font: 700 12px var(--font-sans); color: #fff; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.sheet-close { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 6px; }
.sheet-close:hover { background: var(--subtle); color: var(--fg); }
.sheet-body { font-size: 13.5px; }
.sheet-body .sheet-summary { color: var(--muted); margin: 0 0 10px; }
.sheet-body ul { margin: 8px 0 0 18px; padding: 0; font-size: 12.5px; color: var(--muted); }
.sheet-body li { margin: 2px 0; }

/* --- forms ------------------------------------------------------------------------- */
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.f-grid .f-wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .f-grid { grid-template-columns: 1fr; } }

.f-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.f-field > label, .f-field > .f-label { font-weight: 600; font-size: 13.5px; }

/* segmented control (job.html regenerate tailoring style) */
.seg { display: inline-flex; align-self: flex-start; border: 1px solid var(--border); border-radius: 8px; padding: 2px; gap: 2px; background: var(--subtle); }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: block; padding: 6px 12px; border-radius: 6px; font: 600 13px var(--font-sans); color: var(--muted); }
.seg-opt:hover span { color: var(--fg); }
.seg-opt input:checked + span { background: var(--bg); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.f-hint { font-size: 12.5px; line-height: 1.5; color: var(--faint); }
.f-hint a { color: var(--muted); }
.f-hint.import-status-err, .f-hint.is-error { color: var(--danger); font-weight: 600; }
.f-field input[type="text"],
.f-field input[type="email"],
.f-field input[type="tel"],
.f-field input[type="url"],
.f-field input[type="password"],
.f-field select,
.f-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--app-radius-sm);
  background: var(--bg); color: var(--fg); font: inherit; font-size: 14.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.f-field input::placeholder, .f-field textarea::placeholder { color: var(--faint); }
.f-field input:hover, .f-field select:hover, .f-field textarea:hover {
  border-color: color-mix(in srgb, var(--fg) 25%, var(--border));
}
.f-field textarea { min-height: 84px; resize: vertical; line-height: 1.55; }
.f-field textarea.f-tall { min-height: 252px; }
/* Focus: accent border + soft accent halo (reads as "active field" without a hard outline). */
.f-field input:focus, .f-field select:focus, .f-field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* File inputs are always `hidden` and triggered via a real <label class="btn" for="..."> (or a
   button that calls .click() on it) — a native visible file input's internal button+filename
   layout isn't fully controllable via author CSS (some browsers reserve invisible space for the
   filename text that throws off flex gaps between it and its siblings), so a real .btn element
   standing in for it sizes and spaces exactly like every other button. */
.btn.is-disabled-look { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Plain text link styled as a button (e.g. "Remove files" next to Build profile) — lower emphasis
   than .btn-outline, no border/background of its own. Standard weight per the design system's
   link convention: underline signals "link", bold is reserved for buttons/headings. */
.link-btn {
  background: none; border: 0; padding: 0; margin: 0;
  color: var(--muted); font: 400 13px var(--font-sans); text-decoration: underline; cursor: pointer;
  text-underline-offset: 2px; transition: color 0.15s ease;
}
.link-btn:hover { color: var(--fg); }
.link-btn[hidden] { display: none; }

/* --- captured-job list header (tailor.js's renderNoJob()) --------------------------- */
.job-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 12px; }
.job-list-head[hidden] { display: none; }
.job-list-head .app-section-title { margin: 0; }

/* --- captured-job list rows (tailor.js's jobRow()) --------------------------------- */
.job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 2px; }
/* Stroke-only fit badges (jobBadge()) — border + text colored per verdict, transparent fill, so
   the color still reads as the signal without the heavier solid-fill treatment. */
.job-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font: 700 11px var(--font-sans); padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--border); background: transparent;
}
/* Resume/cover-letter existence chips — outline only, no fill, so they read as a lighter-weight
   signal than the fit badges above. A dimmed/"disabled" stroke + label + x until a draft exists,
   then the whole chip (border, check, label) switches to green. */
.job-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font: 700 11px var(--font-sans); color: var(--faint);
  border: 1px solid var(--faint); border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.job-chip.done { color: var(--ok); border-color: var(--ok); }

/* --- confirm dialog (tailor.js's confirmDialog()) ---------------------------------- */
dialog.app-dialog {
  border: 1px solid var(--border); border-radius: var(--app-radius); padding: 22px;
  max-width: 400px; width: calc(100% - 40px);
  background: var(--bg); color: var(--fg); box-shadow: var(--app-shadow-pop);
}
dialog.app-dialog[open] { animation: app-pop 0.22s var(--app-ease); }
dialog.app-dialog::backdrop {
  background: rgba(10, 10, 10, 0.45);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
dialog.app-dialog p { margin: 0 0 20px; font-size: 14.5px; line-height: 1.55; }
@keyframes app-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* --- profile category sidebar (profile.html) --------------------------------------- */
.profile-layout { display: flex; gap: 32px; align-items: flex-start; }
.profile-nav { display: flex; flex-direction: column; gap: 2px; flex: 0 0 210px; position: sticky; top: 84px; }
.profile-nav-item {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; background: none; border: 0; border-radius: 8px;
  padding: 9px 12px; font: 500 14px var(--font-sans); color: var(--muted); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.profile-nav-item:hover { background: var(--subtle); color: var(--fg); }
.profile-nav-item[aria-current="true"] { background: var(--subtle); color: var(--fg); font-weight: 650; }
/* accent bar marks the open section */
.profile-nav-item[aria-current="true"]::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.profile-nav-count {
  flex: none; min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center;
  background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok);
  font: 700 11.5px var(--font-sans); font-variant-numeric: tabular-nums;
}
.profile-nav-count[hidden] { display: none; }
.profile-nav-check {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok);
  display: inline-flex; align-items: center; justify-content: center; font: 800 11px/1 var(--font-sans);
}
.profile-nav-check[hidden] { display: none; }
.profile-panels { flex: 1; min-width: 0; }
/* each section sits on its own card surface */
.profile-panel {
  border: 1px solid var(--border); border-radius: var(--app-radius);
  background: var(--bg); box-shadow: var(--app-shadow-card);
  padding: 28px;
}
.profile-panel[hidden] { display: none; }
.profile-panel:not([hidden]) { animation: app-fade 0.25s var(--app-ease); }
@keyframes app-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
.profile-panel > .panel-title { margin-bottom: 20px; }
.profile-panel > .panel-title + .panel-desc { margin-top: -12px; }

/* import area on the profile's first section */
.import-box {
  display: grid; grid-template-columns: auto 1fr; gap: 16px 14px; align-items: center;
  padding: 20px;
  border: 1.5px dashed color-mix(in srgb, var(--fg) 16%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--subtle) 55%, transparent);
}
.import-box-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-subtle); color: var(--accent);
}
.import-box-icon svg { width: 22px; height: 22px; }
.import-box-text strong { display: block; font-size: 14.5px; font-weight: 650; }
.import-box-text span { display: block; font-size: 13px; color: var(--muted); }
.import-actions { grid-column: 1 / -1; margin: 0; align-items: center; }

/* confirm-dialog button row */
.dlg-actions { justify-content: flex-end; margin: 0; }
/* note under the add-job URL field */
.dlg-note { margin: -6px 0 14px; }

@media (max-width: 720px) {
  .profile-layout { flex-direction: column; gap: 20px; }
  /* sections become a horizontally scrolling chip row instead of a wrapped block */
  .profile-nav {
    flex-direction: row; flex-wrap: nowrap; position: static; flex: 0 0 auto; gap: 6px;
    width: 100%; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none;
  }
  .profile-nav::-webkit-scrollbar { display: none; }
  .profile-nav-item { width: auto; flex: none; white-space: nowrap; border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; }
  .profile-nav-item[aria-current="true"] { border-color: var(--fg); }
  .profile-nav-item[aria-current="true"]::before { display: none; }
  .profile-panel { padding: 22px 18px; }
}

/* --- onboarding steps (get-started.html) ------------------------------------------- */
.onboard-steps { display: flex; flex-direction: column; }
.onboard-steps .app-card { margin-bottom: 0; border-radius: 0; border-bottom-width: 0; }
.onboard-steps .app-card:first-child { border-radius: 12px 12px 0 0; }
.onboard-steps .app-card:last-child { border-radius: 0 0 12px 12px; border-bottom-width: 1px; }
.onboard-step { display: flex; align-items: flex-start; gap: 16px; }
.onboard-num {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); flex: none;
  display: flex; align-items: center; justify-content: center;
  font: 800 13px var(--font-sans); color: var(--faint);
}
.onboard-step.done .onboard-num { border-color: var(--ok); color: var(--ok); }
.onboard-step.active .onboard-num { border-color: var(--accent); color: var(--accent); }
.onboard-body { flex: 1; }
.onboard-body strong { font-size: 15px; font-weight: 700; display: block; margin-bottom: 4px; }
.onboard-body p { font-size: 14px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.onboard-step.done .onboard-body p { color: var(--faint); }

/* --- repeatable section rows ------------------------------------------------------- */
.rz-rows { display: flex; flex-direction: column; gap: 12px; }
.rz-row {
  border: 1px solid var(--border); border-radius: 12px; padding: 16px; position: relative;
  transition: border-color 0.15s ease, box-shadow 0.2s ease;
}
.rz-row.rz-row-dim { background: var(--subtle); }
.rz-row .rz-remove {
  position: absolute; top: 8px; right: 8px; font: 600 12px var(--font-sans);
  background: none; border: 0; color: var(--faint); cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.rz-row .rz-remove:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.rz-add { margin-top: 14px; }

/* --- collapsible experience rows (profile.js buildRow + enableExpDragDrop) ---------- */
.exp-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.exp-section-head .app-section-title, .exp-section-head .panel-title { margin: 0 !important; }
.exp-section-controls { display: flex; gap: 10px; }

.rz-collapsible { padding: 0; overflow: hidden; }
.rz-collapsible:not(.rz-collapsed) { border-color: color-mix(in srgb, var(--fg) 20%, var(--border)); box-shadow: var(--app-shadow-card); }
.rz-row-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; cursor: pointer; user-select: none;
  transition: background 0.15s ease;
}
.rz-row-header:hover { background: var(--subtle); }
.rz-collapsible:not(.rz-collapsed) .rz-row-header { border-bottom: 1px solid var(--border); }
.rz-row-header .rz-remove { position: static; font: 700 12px var(--font-sans); }

.rz-drag-handle {
  flex: none; color: var(--faint); cursor: grab; display: flex; align-items: center; padding: 2px 2px;
}
.rz-drag-handle:hover { color: var(--muted); }
.rz-row-summary { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz-row-date { flex: 0 1 auto; min-width: 0; max-width: 45%; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz-chevron { flex: none; color: var(--muted); display: flex; align-items: center; transition: transform 0.2s var(--app-ease); }
.rz-collapsible:not(.rz-collapsed) .rz-chevron { transform: rotate(180deg); }

.rz-row-body { padding: 14px; position: relative; }
.rz-collapsed .rz-row-body { display: none; }

.rz-dragging { opacity: 0.4; }
.rz-drop-indicator { height: 2px; background: var(--accent); border-radius: 1px; margin: 0; pointer-events: none; }

/* --- sticky footer --------------------------------------------------------------- */
.app-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent); border-top: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
          backdrop-filter: saturate(1.4) blur(12px);
}
.app-foot .app-foot-inner {
  max-width: 880px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 12px; justify-content: flex-end;
}
.app-foot .app-foot-inner.tailor-wrap { max-width: 720px; }
.app-foot .save-state {
  margin-right: auto; font-size: 13px; color: var(--faint);
  display: inline-flex; align-items: center; gap: 8px;
}
/* status dot in front of the save state */
.app-foot .save-state::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.8;
}
.app-foot .save-state.dirty { color: var(--warn); }
.app-foot .save-state.saved { color: var(--ok); }

/* --- provider choice cards --------------------------------------------------- */
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0 8px; }
@media (max-width: 560px) { .pick-grid { grid-template-columns: 1fr; } }
.pick {
  text-align: left; border: 1px solid var(--border); border-radius: 12px; padding: 18px;
  background: var(--bg); cursor: pointer;
  display: flex; flex-direction: column; gap: 8px;
}
.pick:hover { border-color: var(--fg); }
.pick[aria-pressed="true"] { border-color: var(--accent); outline: 2px solid var(--accent); }
.pick h3 { margin: 0; font-size: 16px; }
.pick p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.pick .pick-tag { font: 700 11px var(--font-sans); color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }

/* --- tailoring style toggle (tailor.js/tailor.html, resumeIdle) --------------- */
/* Same bordered-card language as .pick/.pick-grid above, just a 2-up radio group instead of a
   button grid. */
.tstyle { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
@media (max-width: 560px) { .tstyle { grid-template-columns: 1fr; } }
.tstyle-opt {
  display: flex; flex-direction: column; gap: 4px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.tstyle-opt:has(input:checked) { border-color: var(--accent); outline: 2px solid var(--accent); }
.tstyle-opt input { margin: 0 0 2px; }
.tstyle-name { font: 700 14px var(--font-sans); }
.tstyle-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* --- tabs (tailor) ---------------------------------------------------------- */
.app-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 28px 0 28px; }
.app-tabs button {
  padding: 9px 14px; border: 0; background: none; font: 700 14px var(--font-sans);
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.app-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.app-tabpanel[hidden] { display: none; }

/* --- resume/cover editable page ------------------------------------------- */
/* Self-hosted Montserrat (SIL OFL, public/fonts/resume/ — see OFL.txt there), vendored as static
   per-weight files rather than the variable font: pdf-export.js embeds these same four TTFs
   directly into the generated PDF (jsPDF can't select a location on a variable font's design
   space, only a fixed instance), so the on-screen preview and the download need to match exactly
   — one static weight per role, not four cuts of one variable file. */
@font-face { font-family: 'Montserrat'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/resume/Montserrat-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/resume/Montserrat-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/resume/Montserrat-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/resume/Montserrat-Bold.woff2') format('woff2'); }

/* Green left border on tweak textareas when they contain text */
#resumeTweak:not(:placeholder-shown),
#coverTweak:not(:placeholder-shown) {
  box-shadow: inset 3px 0 0 var(--ok);
}

.doc-page {
  border: 1px solid var(--border); border-radius: 10px; padding: 40px 48px;
  background: #fff; color: #111; width: 100%;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif; font-weight: 400; font-size: 9.5pt;
  line-height: 1.5;
}
:root[data-theme="dark"] .doc-page { background: #f7f7f7; }
.doc-page:focus { outline: 2px solid var(--accent); }
/* Name (h1) is the dominant masthead line, per the near-universal resume convention — and not
   just style: an unlabeled bigger line above/over the name risks a real ATS parsing failure,
   since many parsers heuristically infer "candidate name" as the most prominent text at the top
   of page one. The target title (.doc-title) stays prominent right below it, just not bigger.
   See pdf-export.js for the matching PDF-side sizes/weights. */
.doc-page h1 { font-size: 25pt; font-weight: 700; margin-top: 0; margin-bottom: 5pt; }
.doc-page .doc-title {
  font-size: 13.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 0; margin-bottom: 8pt;
}
.doc-page .doc-contact { margin-top: 0; margin-bottom: 20pt; }
.doc-page h2 {
  font-size: 12pt; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 1px solid #ccc; padding-bottom: 2px; margin: 18px 0 8px;
}
.doc-page h3 { font-size: 10.5pt; font-weight: 600; margin: 10px 0 2px; }
.doc-page p, .doc-page li { font-size: 9.5pt; font-weight: 400; }
.doc-page ul { margin: 4px 0 4px 18px; }
/* Masthead (name/tagline/contact, resume-render.js's resumeDraftToHtml()) — centered and
   width-constrained (~70% of the page) per the common resume convention, so a long contact line
   wraps into a tighter column instead of stretching edge to edge; every other section stays
   left-aligned, full width. */
.doc-page .doc-center { text-align: center; max-width: 70%; margin-left: auto; margin-right: auto; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--fg); border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; margin-bottom: 16px; }

/* --- "My jobs" heading row with Add job button ------------------------------------------- */
.nojob-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.nojob-head .app-h1 { margin-bottom: 6px; }
.nojob-head-add svg { width: 15px; height: 15px; }
.nojob-head + .app-sub { margin-bottom: 32px; }
.nojob-head + .app-ai-banner { margin-top: 20px; }

/* --- empty state ------------------------------------------------------------------ */
.nojob-empty[hidden] { display: none; }
.nojob-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 56px 24px 52px;
  border: 1.5px dashed color-mix(in srgb, var(--fg) 16%, var(--border));
  border-radius: var(--app-radius);
  background: color-mix(in srgb, var(--subtle) 55%, transparent);
}
.nojob-empty-icon-wrap {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--accent-subtle);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.nojob-empty-icon-wrap svg { width: 26px; height: 26px; color: var(--accent); }
.nojob-empty-title {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg);
  margin: 0 0 8px;
}
.nojob-empty-desc {
  font-size: 14.5px; color: var(--muted); line-height: 1.6;
  max-width: 440px; margin: 0 0 24px; text-wrap: pretty;
}

/* --- compact spend line below "Your jobs" heading ---------------------------------------- */
.spend-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px;
  font-size: 13px; color: var(--muted); margin: 0;
  font-variant-numeric: tabular-nums;
}
.spend-line .sl-total { font-weight: 700; color: var(--fg); }
.spend-line .sl-sep { color: var(--faint); }

/* --- compact job card (tailor.js's jobRow()) --------------------------------------------- */
.rz-row.job-card {
  padding: 18px 20px; cursor: pointer; border-radius: 14px; background: var(--bg);
  transition: transform 0.2s var(--app-ease), box-shadow 0.2s ease, border-color 0.2s ease;
}
.rz-row.job-card:hover, .rz-row.job-card:focus-within {
  border-color: color-mix(in srgb, var(--fg) 20%, var(--border));
  box-shadow: var(--app-shadow-card);
  transform: translateY(-2px);
}
.rz-row.job-card:active { transform: translateY(0); }
/* The hover transform makes the card a stacking context; lift it so its "•••" menu popup isn't
   painted under the next card in the list. */
.rz-row.job-card:hover, .rz-row.job-card:focus-within, .rz-row.job-card:has(.card-menu-popup) { z-index: 2; }

/* Level 1: title row */
.job-card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.job-card-title {
  font-size: 16px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.35; flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.job-card-actions { display: flex; align-items: center; gap: 4px; flex: none; margin-top: -3px; }
.job-card-open {
  display: inline-flex; align-items: center; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font: 600 13px var(--font-sans); color: var(--fg); text-decoration: none; white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.rz-row.job-card:hover .job-card-open { border-color: var(--fg); }
.job-card-open:hover { background: var(--fg); color: var(--bg); }
.job-card-menu {
  background: none; border: 0; padding: 6px 8px; border-radius: 8px;
  font-size: 11px; color: var(--faint); cursor: pointer; letter-spacing: 2px; position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}
.job-card-menu:hover { background: var(--subtle); color: var(--fg); }
.card-menu-popup {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--app-shadow-pop); min-width: 140px; padding: 4px;
  animation: app-pop 0.16s var(--app-ease);
  letter-spacing: normal;
}
.card-menu-popup button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  border-radius: 7px; padding: 8px 10px; font: 500 13.5px var(--font-sans); color: var(--danger); cursor: pointer;
}
.card-menu-popup button:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }

/* Level 2: company · source */
.job-card-sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.job-card-extlink { color: var(--muted); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; transition: color 0.15s ease, text-decoration-color 0.15s ease; }
.job-card-extlink:hover { color: var(--fg); text-decoration-color: currentColor; }

/* Level 3: fit + costs */
.job-card-meta { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.job-card-fit { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.job-fit-item { font-size: 13px; color: var(--muted); }
.job-fit-item strong { font-weight: 650; }
.job-card-costs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px;
  padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums;
}
.jc-label { font: 600 11px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.jc-total { margin-left: auto; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* --- form dialog with fixed header/footer + scrollable body (tailor.html #addJobDialog) --- */
dialog.app-dialog.form-dialog {
  max-width: 560px; width: calc(100% - 32px); max-height: 85vh;
  padding: 0; overflow: hidden;
}
dialog.app-dialog.form-dialog[open] {
  display: flex; flex-direction: column;
}
.dlg-header {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.dlg-header strong { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.dlg-body { flex: 1; overflow-y: auto; padding: 22px; }
.dlg-footer {
  flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 14px 22px; border-top: 1px solid var(--border); background: var(--subtle);
}
.dialog-close {
  flex: none; background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 14px; width: 32px; height: 32px; border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.dialog-close:hover { background: var(--subtle); color: var(--fg); }

/* Tab switcher inside dialog body — segmented control */
.dlg-tabs {
  display: flex; gap: 2px; padding: 3px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--subtle);
  margin-bottom: 22px;
}
.dlg-tab {
  flex: 1; padding: 8px 14px; background: none; border: 0; border-radius: 7px; cursor: pointer;
  font: 500 13.5px var(--font-sans); color: var(--muted); text-align: center;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.dlg-tab[aria-selected="true"] { background: var(--bg); color: var(--fg); font-weight: 650; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.dlg-tab:hover:not([aria-selected="true"]) { color: var(--fg); }

.url-fetch-row { display: flex; gap: 8px; }
.url-fetch-row input { flex: 1; min-width: 0; }
.url-fetch-row .btn { flex: none; white-space: nowrap; }

/* =====================================================================================
   Shared page atmosphere — the landing hero's breathing accent glow, behind the top of the
   page (Profile + My Jobs opt in via <body class="app-page">).
   ===================================================================================== */
.app-page { overflow-x: clip; }
.app-page::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 720px; height: 720px;
  right: -220px; top: -260px;
  border-radius: 50%;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--accent) 20%, transparent) 0%, transparent 62%);
  filter: blur(10px);
  pointer-events: none;
  animation: app-breathe 10s ease-in-out infinite;
}
@keyframes app-breathe {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate(-36px, 26px) scale(1.06); opacity: 1; }
}
@keyframes app-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* =====================================================================================
   MY JOBS (jobs.html / jobs.js) — jb-* classes
   ===================================================================================== */
.app-wrap.jb-wrap { max-width: 1120px; padding-top: 52px; }

.jb-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: 36px;
  animation: app-rise 0.7s var(--app-ease) both;
}
.jb-h1 {
  font-size: clamp(42px, 5.6vw, 68px); font-weight: 800; line-height: 1;
  letter-spacing: -0.045em; margin: 0 0 16px;
}
.jb-lede { margin: 0; max-width: 54ch; font-size: 17px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.jb-add { padding: 14px 24px; font-size: 15px; border-radius: 12px; box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 35%, transparent); }
.jb-add svg { width: 16px; height: 16px; }
.jb-add:hover { transform: translateY(-1px); }
.jb-hero + .app-ai-banner { margin-bottom: 28px; }

/* --- stat tiles --- */
.jb-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  margin-bottom: 40px;
}
.jb-stats[hidden] { display: none; }
.jb-stat {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px 18px;
  border: 1px solid var(--border); border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: app-rise 0.6s var(--app-ease) both;
}
.jb-stat:nth-child(2) { animation-delay: 0.06s; }
.jb-stat:nth-child(3) { animation-delay: 0.12s; }
.jb-stat:nth-child(4) { animation-delay: 0.18s; }
.jb-stat-label { font: 600 11.5px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.jb-stat-value {
  font-size: clamp(34px, 3.6vw, 46px); font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.jb-stat-foot { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
/* the spend tile is the dark "receipt" — same inverted surface as the landing's honesty tile */
.jb-stat-invert { background: var(--invert-bg); border-color: var(--invert-bg); color: var(--invert-fg); }
.jb-stat-invert .jb-stat-label { color: var(--invert-faint); }
.jb-stat-invert .jb-stat-foot { color: var(--invert-muted); }
.jb-stat-invert::after {
  content: ''; position: absolute; width: 220px; height: 220px; right: -90px; top: -110px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), transparent 65%);
  pointer-events: none;
}

/* --- toolbar: filter chips + search --- */
.jb-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.jb-toolbar[hidden] { display: none; }
.jb-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.jb-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  font: 550 13.5px var(--font-sans); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.jb-chip:hover { color: var(--fg); border-color: color-mix(in srgb, var(--fg) 30%, var(--border)); }
.jb-chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.jb-chip-count {
  min-width: 20px; padding: 0 6px; border-radius: 999px; text-align: center;
  font: 700 11.5px/18px var(--font-sans); font-variant-numeric: tabular-nums;
  background: var(--subtle); color: var(--muted);
}
.jb-chip[aria-pressed="true"] .jb-chip-count { background: color-mix(in srgb, var(--bg) 20%, transparent); color: var(--bg); }
.jb-toolbar-end { display: flex; align-items: center; gap: 16px; }
.jb-search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px; height: 40px; min-width: 260px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.jb-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.jb-search svg { width: 16px; height: 16px; color: var(--faint); flex-shrink: 0; }
.jb-search input { border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 14px; width: 100%; }
.jb-search input::placeholder { color: var(--faint); }

/* --- card grid --- */
.jb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.jb-nomatch { padding: 40px 0; text-align: center; color: var(--muted); font-size: 14.5px; }
.jb-nomatch[hidden] { display: none; }

.jb-card {
  position: relative;
  display: flex; flex-direction: column; gap: 18px;
  padding: 22px 22px 18px;
  border: 1px solid var(--border); border-radius: 20px;
  background: var(--bg);
  cursor: pointer;
  transition: transform 0.25s var(--app-ease), box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.2s ease;
  animation: app-rise 0.55s var(--app-ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.jb-card:hover, .jb-card:focus-within {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--fg) 18%, var(--border));
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 14px 36px rgba(10, 10, 10, 0.1);
  z-index: 2;
}
.jb-card:has(.card-menu-popup) { z-index: 3; }
.jb-card.is-leaving { opacity: 0; transform: scale(0.97); }
/* strong-fit cards get a thin green top edge */
.jb-card.is-strong::before {
  content: ''; position: absolute; left: 22px; right: 22px; top: -1px; height: 3px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--ok), transparent);
}

.jb-card-head { display: flex; align-items: flex-start; gap: 14px; }
.jb-mono {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 13px;
  display: grid; place-items: center;
  font: 800 15px var(--font-sans); letter-spacing: -0.02em;
  color: var(--fg); background: var(--subtle); border: 1px solid var(--border);
}
.jb-card.is-strong .jb-mono { background: var(--accent-subtle); color: var(--accent); border-color: transparent; }
.jb-card-id { flex: 1; min-width: 0; padding-top: 1px; }
.jb-card-title {
  margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.jb-card-title a { color: inherit; text-decoration: none; }
.jb-card-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.jb-dot { margin: 0 6px; color: var(--faint); }
.jb-card-src { color: var(--faint); text-decoration: none; }
a.jb-card-src:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.jb-menu { margin: -4px -6px 0 0; }

.jb-ribbon {
  position: absolute; top: -11px; right: 56px;
  padding: 3px 10px; border-radius: 999px;
  font: 700 11px var(--font-sans); letter-spacing: 0.02em;
  color: #fff; background: var(--ok);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--ok) 35%, transparent);
}
:root[data-theme="dark"] .jb-ribbon { color: #052e16; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jb-ribbon { color: #052e16; } }

/* fit meters */
.jb-fit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jb-fit.is-empty { display: block; }
.jb-fit-empty {
  display: block; padding: 12px 14px; border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--fg) 16%, var(--border));
  font-size: 13px; color: var(--muted);
}
.jb-meter {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center;
  padding: 12px 14px; border-radius: 12px; background: var(--subtle);
}
.jb-meter-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.jb-meter-verdict { font-size: 12.5px; font-weight: 700; color: var(--meter); text-align: right; }
.jb-meter-bar { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.jb-meter-bar i { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--fg) 10%, transparent); }
.jb-meter-bar i.on { background: var(--meter); }

/* fit → resume → cover letter */
.jb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.jb-steps li {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 550; color: var(--faint); text-align: center;
}
/* connector line between dots */
.jb-steps li + li::before {
  content: ''; position: absolute; top: 10px; right: 50%; width: 100%; height: 2px;
  background: var(--border); z-index: 0;
}
.jb-steps li.done + li::before { background: var(--ok); }
.jb-step-dot {
  position: relative; z-index: 1;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--border);
}
.jb-step-dot svg { width: 12px; height: 12px; }
.jb-steps li.done { color: var(--fg); }
.jb-steps li.done .jb-step-dot { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.jb-steps li.next { color: var(--fg); }
.jb-steps li.next .jb-step-dot { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }

.jb-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.jb-foot-meta { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.jb-open {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  font: 650 13.5px var(--font-sans); color: var(--fg); text-decoration: none;
  background: var(--subtle);
  transition: background 0.15s ease, color 0.15s ease;
}
.jb-open span { display: inline-block; transition: transform 0.2s var(--app-ease); }
.jb-card:not(.is-static):hover .jb-open { background: var(--fg); color: var(--bg); }
.jb-card:not(.is-static):hover .jb-open span { transform: translateX(3px); }

/* --- empty state --- */
.jb-empty {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 48px; align-items: center;
  padding: 48px;
  border: 1px solid var(--border); border-radius: 28px;
  background:
    radial-gradient(ellipse 60% 80% at 85% 50%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--bg);
  animation: app-rise 0.7s var(--app-ease) 0.1s both;
}
.jb-empty[hidden] { display: none; }
.jb-empty-title { margin: 0 0 14px; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; text-wrap: balance; }
.jb-empty-desc { margin: 0 0 28px; font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 46ch; }
.jb-empty-steps { list-style: none; counter-reset: es; margin: 0 0 32px; padding: 0; display: grid; gap: 16px; }
.jb-empty-steps li { counter-increment: es; display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; }
.jb-empty-steps li::before {
  content: counter(es, decimal-leading-zero); grid-row: span 2;
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font: 700 12px var(--font-mono); color: var(--accent); background: var(--accent-subtle);
}
.jb-empty-steps b { font-size: 15px; font-weight: 650; }
.jb-empty-steps span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.jb-empty-preview { position: relative; isolation: isolate; padding: 24px 8px 28px; }
.jb-empty-preview .jb-card {
  cursor: default; transform: rotate(-2.5deg);
  box-shadow: 0 2px 4px rgba(10, 10, 10, 0.04), 0 24px 60px rgba(10, 10, 10, 0.14);
  animation: jb-float 7s ease-in-out infinite;
}
.jb-empty-preview .jb-card:hover { transform: rotate(-2.5deg); }
.jb-ghost {
  position: absolute; inset: 44px -6px 6px 30px; z-index: -1;
  border-radius: 20px; border: 1px solid var(--border);
  background: var(--subtle); transform: rotate(4deg);
}
.jb-example-tag {
  position: absolute; top: 0; left: 18px; z-index: 2;
  font: 600 11px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; color: var(--faint); background: var(--bg); border: 1px solid var(--border);
}
@keyframes jb-float {
  0%, 100% { transform: rotate(-2.5deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-8px); }
}

@media (max-width: 900px) {
  .jb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jb-grid { grid-template-columns: 1fr; }
  .jb-empty { grid-template-columns: 1fr; padding: 32px 24px; }
  .jb-empty-preview { max-width: 460px; }
}
@media (max-width: 560px) {
  .app-wrap.jb-wrap { padding-top: 32px; }
  .jb-add { width: 100%; }
  .jb-search { min-width: 0; flex: 1; }
  .jb-toolbar-end { width: 100%; }
  .jb-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
  .jb-chip { flex: none; }
  .jb-fit { grid-template-columns: 1fr; }
  .jb-stat { padding: 16px; }
}

/* =====================================================================================
   PROFILE (profile.html / profile-hero.js) — pf-* classes. Overrides the generic
   .profile-* rules above: wider page, open (un-boxed) sections, iconified side menu.
   ===================================================================================== */
.app-wrap.pf-wrap { max-width: 1180px; padding-top: 48px; }
.pf-page .app-foot .app-foot-inner { max-width: 1180px; }

/* --- hero --- */
/* Name + title on the left, the strength card in the upper right, level with them. */
.pf-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  margin-bottom: 36px;
  animation: app-rise 0.7s var(--app-ease) both;
}
.pf-hero .pf-id { grid-column: 1; grid-row: 1; }
.pf-hero .pf-strength { grid-column: 2; grid-row: 1; max-width: 300px; }
.pf-id { display: flex; align-items: center; gap: 24px; min-width: 0; }
.pf-avatar {
  width: 92px; height: 92px; flex-shrink: 0; border-radius: 28px;
  display: grid; place-items: center;
  background: var(--accent-subtle); color: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 8%, transparent);
  transition: background 0.3s ease;
}
.pf-avatar svg { width: 40px; height: 40px; }
.pf-avatar.has-initials {
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  color: #fff; font: 800 32px var(--font-sans); letter-spacing: -0.03em;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent), 0 14px 32px color-mix(in srgb, var(--accent) 35%, transparent);
}
.pf-id-text { min-width: 0; }
.pf-id-text .app-eyebrow { margin-bottom: 10px; }
.pf-name {
  margin: 0; font-size: clamp(36px, 4.6vw, 56px); font-weight: 800; line-height: 1.02;
  letter-spacing: -0.045em; overflow-wrap: anywhere;
}
.pf-meta { margin: 10px 0 0; font-size: 16px; color: var(--muted); white-space: pre-wrap; }

.pf-strength {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px 14px 14px;
  border: 1px solid var(--border); border-radius: 20px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: var(--app-shadow-card);
}
.pf-ring { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.pf-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pf-ring circle { fill: none; stroke-width: 7; }
.pf-ring-track { stroke: var(--subtle); }
.pf-ring-fill {
  stroke: var(--accent); stroke-linecap: round;
  stroke-dasharray: 213.6; stroke-dashoffset: 213.6;
  transition: stroke-dashoffset 0.9s var(--app-ease), stroke 0.3s ease;
}
.pf-strength.is-complete .pf-ring-fill { stroke: var(--ok); }
.pf-ring-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 800 17px var(--font-sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.pf-strength-text { min-width: 0; }
.pf-strength-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pf-strength-label { font: 600 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.pf-tier { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; }
.pf-next {
  margin-top: 4px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
  font: 600 12.5px/1.35 var(--font-sans); color: var(--accent);
}
.pf-next span { display: inline-block; transition: transform 0.2s var(--app-ease); }
.pf-next:hover span { transform: translateX(3px); }
.pf-next[hidden] { display: none; }

.pf-hero + .app-ai-banner { margin-bottom: 36px; }

/* --- layout + side menu --- */
.pf-wrap .profile-layout { gap: 48px; }
.pf-side .profile-nav {
  flex: 0 0 280px; top: 84px; gap: 2px;
  padding: 10px; border-radius: 20px;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--subtle) 60%, var(--bg));
  animation: app-rise 0.6s var(--app-ease) 0.08s both;
}
.pn-group {
  display: block; padding: 14px 12px 6px;
  font: 600 10.5px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint);
}
.pf-side .profile-nav-item { gap: 12px; padding: 7px 10px 7px 7px; border-radius: 12px; font-weight: 550; }
.pf-side .profile-nav-item::before { display: none; }
.pn-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-ico {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg); color: var(--muted); border: 1px solid var(--border);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pn-ico svg, .pf-sec-ico svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.pf-side .profile-nav-item:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.pf-side .profile-nav-item[aria-current="true"] {
  background: var(--bg); color: var(--fg); font-weight: 650;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.06), 0 4px 14px rgba(10, 10, 10, 0.06);
}
.pf-side .profile-nav-item[aria-current="true"] .pn-ico { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* --- sections: open, no box --- */
.pf-wrap .profile-panel {
  border: 0; border-radius: 0; background: none; box-shadow: none; padding: 0;
}
.pf-sec-head {
  display: flex; align-items: flex-start; gap: 18px;
  padding-bottom: 24px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.pf-sec-ico {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--accent-subtle); color: var(--accent);
}
.pf-sec-ico svg { width: 24px; height: 24px; stroke-width: 1.7; }
.pf-sec-head .panel-title { font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; letter-spacing: -0.035em; margin: 2px 0 6px; }
.pf-sec-head .panel-desc { margin: 0; font-size: 15px; }
.pf-wrap .profile-panel > .pf-sec-head + .panel-desc { margin-top: 0; }
/* the skills/experience heads also hold "Expand all" — keep it aligned with the title */
.pf-wrap .exp-section-head { align-items: flex-start; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.pf-wrap .exp-section-head .pf-sec-head { border-bottom: 0; margin-bottom: 0; }
.pf-wrap .exp-section-controls { padding-top: 10px; flex-shrink: 0; }

.pf-wrap .f-grid { gap: 4px 24px; }
.pf-wrap .rz-row { background: var(--bg); }
.pf-wrap .rz-rows { gap: 12px; }
.pf-wrap .import-box { padding: 32px; gap: 20px 18px; border-radius: 20px; }
.pf-wrap .import-box-icon { width: 56px; height: 56px; border-radius: 16px; }
.pf-wrap .import-box-icon svg { width: 26px; height: 26px; }
.pf-wrap .import-box-text strong { font-size: 16px; }
/* empty list sections: a soft placeholder instead of a lone "+ Add" button */
.pf-wrap .rz-rows:empty {
  display: grid; place-items: center; min-height: 140px;
  border: 1.5px dashed color-mix(in srgb, var(--fg) 14%, var(--border)); border-radius: 18px;
  background: color-mix(in srgb, var(--subtle) 50%, transparent);
}
.pf-wrap .rz-rows:empty::before {
  content: 'Nothing here yet. Add one, or import a resume to fill this in.';
  padding: 0 24px; text-align: center; font-size: 14px; color: var(--muted);
}
.pf-wrap .rz-add { margin-top: 16px; }

/* --- folder menu: entries listed under each list section (profile-tree.js) --- */
.pf-side .profile-nav { max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
.pn-caret {
  width: 22px; height: 22px; margin-right: -4px; flex-shrink: 0; border-radius: 6px;
  display: grid; place-items: center; color: var(--faint);
  transition: background 0.15s ease, color 0.15s ease;
}
.pn-caret svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s var(--app-ease); }
.pn-caret:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg); }
.pn-folder[aria-expanded="true"] .pn-caret svg { transform: rotate(90deg); }

.pn-tree {
  position: relative;
  display: flex; flex-direction: column; gap: 1px;
  margin: 2px 0 8px 23px; padding-left: 14px;
  animation: app-fade 0.2s var(--app-ease);
}
.pn-tree[hidden] { display: none; }
/* folder guide line */
.pn-tree::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1.5px; border-radius: 1px; background: var(--border); }
.pn-entry, .pn-add {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 9px;
  background: none; cursor: pointer; color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.pn-entry:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); color: var(--fg); }
.pn-entry-label { font: 550 13px/1.3 var(--font-sans); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-entry-sub { font-size: 11.5px; line-height: 1.3; color: var(--faint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-entry[aria-current="true"] { background: var(--bg); color: var(--fg); box-shadow: 0 1px 2px rgba(10, 10, 10, 0.06); }
.pn-entry[aria-current="true"] .pn-entry-label { font-weight: 650; }
/* accent tick on the guide line next to the open entry */
.pn-entry[aria-current="true"]::before {
  content: ''; position: absolute; left: -15px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent);
}
.pn-add { flex-direction: row; align-items: center; gap: 7px; font: 600 12.5px var(--font-sans); color: var(--accent); }
.pn-add svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.pn-add:hover { background: var(--accent-subtle); }

/* --- one entry at a time in the panel --- */
.rz-rows.pf-focus > .rz-row:not(.is-focused) { display: none; }
.rz-rows.pf-focus > .rz-row.is-focused {
  padding: 28px; border-radius: 20px;
  border-color: color-mix(in srgb, var(--fg) 12%, var(--border));
  box-shadow: var(--app-shadow-card);
  animation: app-fade 0.25s var(--app-ease);
}
.rz-rows.pf-focus > .rz-row.is-focused .rz-row-header,
.rz-rows.pf-focus > .rz-row.is-focused .rz-remove { display: none; }
.rz-rows.pf-focus > .rz-row.is-focused .rz-row-body { display: block; padding: 0; }
.pf-entry-mode .exp-section-controls,
.pf-entry-mode .rz-add { display: none; }

.pf-entry-bar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.pf-entry-bar[hidden] { display: none; }
.pf-entry-id { min-width: 0; }
.pf-entry-crumb { display: block; font: 600 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.pf-entry-title { margin: 0; font-size: 21px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.25; overflow-wrap: anywhere; }
.pf-entry-sub { display: block; margin-top: 3px; font-size: 14px; color: var(--muted); }
.pf-entry-sub:empty { display: none; }
.pf-entry-tools { display: flex; align-items: center; gap: 6px; }
.pf-entry-pos { font-size: 12.5px; color: var(--faint); margin-right: 4px; font-variant-numeric: tabular-nums; }
.pf-entry-nav {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--bg); color: var(--fg); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pf-entry-nav svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pf-entry-nav[data-dir="-1"] svg { transform: rotate(180deg); }
.pf-entry-nav:hover:not(:disabled) { border-color: var(--fg); }
.pf-entry-nav:disabled { opacity: 0.35; cursor: default; }
.pf-entry-remove {
  margin-left: 6px; padding: 8px 12px; border-radius: 10px; border: 0; background: none; cursor: pointer;
  font: 600 13px var(--font-sans); color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.pf-entry-remove:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }

@media (max-width: 720px) {
  .pf-side .profile-nav { max-height: none; overflow-y: visible; }
  .pn-caret, .pn-tree { display: none !important; }   /* phones: section chips only; entries use prev/next */
  .pf-entry-mode .rz-add { display: inline-flex; }     /* …so keep the panel's own "+ Add" button */
  .rz-rows.pf-focus > .rz-row.is-focused { padding: 20px 16px; }
}

@media (max-width: 720px) {
  /* single column: name first, strength card below it */
  .pf-hero { grid-template-columns: 1fr; gap: 20px; }
  .pf-hero .pf-id { grid-column: 1; grid-row: 1; }
  .pf-hero .pf-strength { grid-column: 1; grid-row: 2; max-width: none; }
}
@media (max-width: 720px) {
  .app-wrap.pf-wrap { padding-top: 32px; }
  .pf-id { gap: 16px; }
  .pf-avatar { width: 64px; height: 64px; border-radius: 20px; }
  .pf-avatar.has-initials { font-size: 22px; }
  .pf-side .profile-nav { padding: 6px; border-radius: 16px; flex: 0 0 auto; }
  .pn-group, .pn-ico { display: none; }
  .pf-side .profile-nav-item { padding: 7px 14px; }
  .pf-sec-ico { width: 44px; height: 44px; border-radius: 13px; }
}

/* =====================================================================================
   PROFILE — compaction pass. Keeps the editable fields high on the page: one-row header,
   lighter section heads, and no section head at all once an entry is open (the entry bar
   already names the section). Overrides the pf-* rules above.
   ===================================================================================== */
.app-wrap.pf-wrap { padding-top: 28px; }

/* header: one compact row */
.pf-hero { gap: 24px; margin-bottom: 24px; }
.pf-hero .app-eyebrow { display: none; }
.pf-id { gap: 16px; }
.pf-avatar { width: 56px; height: 56px; border-radius: 17px; box-shadow: none; }
.pf-avatar svg { width: 26px; height: 26px; }
.pf-avatar.has-initials {
  font-size: 20px;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent);
}
.pf-name { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.035em; line-height: 1.1; }
.pf-meta {
  margin-top: 4px; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-hero .pf-strength { padding: 8px 14px 8px 8px; gap: 12px; border-radius: 16px; box-shadow: none; }
.pf-ring { width: 52px; height: 52px; }
.pf-ring circle { stroke-width: 8; }
.pf-ring-num { font-size: 13px; }
.pf-strength-label { font-size: 10px; }
.pf-tier { font-size: 15px; }
.pf-next { margin-top: 2px; font-size: 12px; }
.pf-hero + .app-ai-banner { margin-bottom: 24px; }

/* side menu: scrolls with the page (no inner scrollbar), tighter rows */
.pf-wrap .profile-layout { gap: 40px; }
.pf-side .profile-nav {
  position: static; max-height: none; overflow: visible;
  flex-basis: 268px; padding: 8px;
}
.pf-side .profile-nav-item { padding: 6px 8px 6px 6px; font-size: 13.5px; }
.pn-ico { width: 28px; height: 28px; border-radius: 9px; }
.pn-ico svg { width: 15px; height: 15px; }
.pn-group { padding: 12px 10px 4px; }
.pn-tree { margin: 2px 0 6px 20px; }
.pn-entry { padding: 6px 10px; }

/* section heads: lighter */
.pf-sec-head { gap: 14px; padding-bottom: 16px; margin-bottom: 20px; align-items: center; }
.pf-sec-ico { width: 40px; height: 40px; border-radius: 12px; }
.pf-sec-ico svg { width: 20px; height: 20px; }
.pf-sec-head .panel-title { font-size: 21px; margin: 0 0 2px; letter-spacing: -0.025em; }
.pf-sec-head .panel-desc { font-size: 13.5px; }
.pf-wrap .exp-section-head { margin-bottom: 20px; align-items: center; }
.pf-wrap .exp-section-controls { padding-top: 0; }

/* entry open: drop the section head entirely; the entry bar carries the section name */
.pf-entry-mode > .pf-sec-head,
.pf-entry-mode > .exp-section-head { display: none; }
.pf-entry-bar { margin-bottom: 12px; align-items: center; }
.pf-entry-crumb { margin-bottom: 2px; }
.pf-entry-title { font-size: 20px; }
.pf-entry-sub { margin-top: 1px; font-size: 13.5px; }
.rz-rows.pf-focus > .rz-row.is-focused { padding: 22px 24px; }

@media (max-width: 720px) {
  .pf-hero .pf-strength { max-width: none; }
}

/* =====================================================================================
   JOB DETAIL (job.html / job.js) — jd-* classes. Header with spend + Actions, a Fit Evaluation
   card (two panels), a Documents card (rows); full documents open in a wide right-hand sheet.
   ===================================================================================== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
body.sheet-open { overflow: hidden; }

.app-wrap.jd-wrap { max-width: 1120px; padding-top: 24px; }
.jd-foot .app-foot-inner { max-width: 1120px; }
.jd-foot .save-state:empty { display: none; }

/* breadcrumb */
.jd-crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 13.5px; min-width: 0; }
.jd-crumb-back {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px 5px 6px; margin-left: -6px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-weight: 550;
  transition: background 0.15s ease, color 0.15s ease;
}
.jd-crumb-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s var(--app-ease); }
.jd-crumb-back:hover { background: var(--subtle); color: var(--fg); }
.jd-crumb-back:hover svg { transform: translateX(-2px); }
.jd-crumb-sep { color: var(--faint); }
.jd-crumb-here { color: var(--fg); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* sheets: wide variant for documents, sticky header */
.sheet.sheet-wide .sheet-panel { width: min(900px, 100%); padding: 0; }
.jd-sheet-head {
  position: sticky; top: 0; z-index: 2; margin: 0;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.jd-sheet-titles { flex: 1; min-width: 0; }
.jd-sheet-title { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.25; }
.jd-sheet-for { display: block; margin-top: 2px; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jd-sheet-for:empty { display: none; }
.jd-sheet-head .sheet-close { margin-left: auto; width: 34px; height: 34px; }
.jd-sheet-body { padding: 22px 28px 48px; font-size: 14px; }
#docSheet[data-kind="resume"] #coverDoc,
#docSheet[data-kind="cover"] #resumeDoc { display: none !important; }
.jd-sheet-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.jd-tweak { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.jd-tweak textarea {
  flex: 1; min-width: 0; min-height: 40px; resize: vertical;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--fg); font: inherit; font-size: 14px; line-height: 1.4;
}
.jd-tweak textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.jd-tweak .btn { height: 40px; flex-shrink: 0; }
.jd-edit-hint { margin: 14px 0 10px; font-size: 12.5px; color: var(--faint); }
.jd-sheet-body .doc-page { box-shadow: 0 1px 2px rgba(10, 10, 10, 0.05), 0 10px 30px rgba(10, 10, 10, 0.08); }
.jd-review { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.jd-review summary { cursor: pointer; font-weight: 650; font-size: 14px; }
.jd-review summary span { font-weight: 400; color: var(--faint); }
.jd-review > div { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
/* Download PDF: an extra-large floating button pinned to the sheet's lower-right corner. Sticky
   (not fixed) because the sheet panel is transformed, which would make `fixed` scroll with it;
   as the last item in the document it sticks to the bottom of the visible panel. */
/* body + open document fill the panel's height, so a short document still puts the button in
   the corner (margin-top: auto) and a long one keeps it pinned there while scrolling (sticky) */
.jd-sheet-body { flex: 1 0 auto; display: flex; flex-direction: column; }
#resumeDoc:not([hidden]), #coverDoc:not([hidden]) { flex: 1 0 auto; display: flex; flex-direction: column; }
/* minimum gap above the button when the document is long enough that margin-top: auto is 0 */
#resumeDoc::after, #coverDoc::after { content: ''; order: 1; flex: 0 0 28px; }
.jd-fab {
  order: 2;
  position: sticky; bottom: 28px; z-index: 3;
  display: flex; align-self: flex-end; width: max-content; margin: auto 0 0; transform: translateY(0);
  gap: 12px; padding: 20px 32px; border-radius: 999px;
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 42%, transparent), 0 4px 10px rgba(10, 10, 10, 0.12);
  transition: transform 0.2s var(--app-ease), box-shadow 0.2s ease, background 0.15s ease;
}
.jd-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.jd-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 50%, transparent), 0 6px 14px rgba(10, 10, 10, 0.14); }
.jd-fab:active { transform: translateY(0); }
@media (max-width: 640px) {
  .jd-fab { bottom: 16px; padding: 16px 24px; font-size: 16px; }
}
.jd-sheet-empty { padding: 48px 0; text-align: center; color: var(--muted); }
.jd-sheet-empty[hidden] { display: none; }
.jd-posting-text { margin-top: 12px; white-space: pre-wrap; font-size: 13.5px; line-height: 1.65; color: var(--fg); }

/* --- header: title + company/posting link, spend card + Actions --- */
.jd-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; animation: app-rise 0.6s var(--app-ease) both; }
.jd-mono { width: 64px; height: 64px; border-radius: 18px; font-size: 20px; }
.jd-head-id { flex: 1 1 360px; min-width: 0; }
.jd-title { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.12; text-wrap: balance; }
.jd-sub { margin: 6px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 15px; color: var(--muted); }
#jobCompany:empty, #jobCompany:empty + .jd-sub-dot, .jd-sub-dot:has(+ .jd-posting-link[hidden]) { display: none; }
.jd-sub-dot { color: var(--faint); }
.jd-posting-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--accent); text-decoration: none; }
.jd-posting-link[hidden] { display: none; }
.jd-posting-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jd-posting-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.jd-head-side { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.jd-spend {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 14px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--bg); box-shadow: var(--app-shadow-card);
}
.jd-spend-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-subtle); color: var(--accent); }
.jd-spend-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jd-spend-label { display: block; font-size: 12.5px; color: var(--muted); }
.jd-spend-row { display: flex; align-items: baseline; gap: 10px; }
.jd-cost { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.jd-cost-break { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.jd-head-rule { width: 1px; height: 40px; background: var(--border); }
.jd-actions-btn { gap: 8px; }
.jd-actions-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --- section cards (Fit Evaluation, Documents) --- */
.jd-card-sec {
  border: 1px solid var(--border); border-radius: 22px; background: var(--bg);
  box-shadow: var(--app-shadow-card); margin-bottom: 24px; overflow: hidden;
  animation: app-rise 0.6s var(--app-ease) 0.06s both;
}
.jd-card-sec + .jd-card-sec { animation-delay: 0.12s; }
.jd-sec-head {
  display: flex; align-items: center; gap: 16px; padding: 18px 24px;
  background: color-mix(in srgb, var(--subtle) 55%, var(--bg));
}
.jd-sec-ico { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; background: var(--accent-subtle); color: var(--accent); }
.jd-sec-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jd-sec-title { flex: 1; min-width: 0; }
.jd-sec-title h2 { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -0.02em; }
.jd-sec-title p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.jd-refit { gap: 8px; }
.jd-refit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.jd-note { margin: 0 24px 16px; }
.jd-note:empty { display: none; }

/* fit: empty state + the two panels */
.jd-fit-empty { margin: 16px; padding: 18px 20px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--fg) 14%, var(--border)); }
.jd-fit-empty[hidden] { display: none; }
.jd-fit-empty p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); max-width: 70ch; }
.jd-fit-empty strong { color: var(--fg); }
.jd-fit { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 4px 16px 16px; }
.jd-fit[hidden] { display: none; }
.jd-fit-panel {
  display: flex; flex-direction: column; gap: 14px; padding: 22px 24px;
  border-radius: 18px; border: 1px solid color-mix(in srgb, var(--fit) 22%, var(--border));
  background: linear-gradient(160deg, color-mix(in srgb, var(--fit) 9%, var(--bg)), color-mix(in srgb, var(--fit) 3%, var(--bg)) 70%);
}
.jd-fp-head { display: flex; align-items: flex-start; gap: 14px; }
.jd-fp-ico { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--fit) 16%, var(--bg)); color: var(--fit); }
.jd-fp-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jd-fp-head h3 { margin: 2px 0 2px; font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.jd-fp-head p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.jd-fp-verdict { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--fit); }
.jd-fp-bar { display: block; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 9%, transparent); overflow: hidden; margin-top: -4px; }
.jd-fp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--fit); transition: width 0.8s var(--app-ease); }
.jd-fp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jd-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--fg) 6%, var(--bg)); color: var(--fg);
}
.jd-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.jd-chip.is-good > span:first-child { color: var(--ok); font-weight: 800; }
.jd-chip.is-bad > span:first-child { color: var(--danger); font-weight: 800; }
.jd-chip.is-part > span:first-child { color: var(--warn); font-weight: 800; }
.jd-chip.is-neutral { color: var(--muted); font-weight: 500; }
.jd-fp-link {
  align-self: flex-start; margin-top: 2px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 650 14.5px var(--font-sans); color: var(--accent);
}
.jd-fp-link span { display: inline-block; transition: transform 0.2s var(--app-ease); }
.jd-fp-link:hover span { transform: translateX(3px); }

/* documents */
.jd-count {
  flex-shrink: 0; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 650; background: var(--accent-subtle); color: var(--accent);
}
.jd-count.is-done { background: color-mix(in srgb, var(--ok) 14%, var(--bg)); color: var(--ok); }
.jd-doc-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 4px 18px;
  padding: 18px 24px; border-top: 1px solid var(--border);
}
.jd-doc-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-subtle); color: var(--accent); }
.jd-doc-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jd-doc-row.has-doc .jd-doc-ico { background: color-mix(in srgb, var(--ok) 14%, var(--bg)); color: var(--ok); }
.jd-doc-id h3 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -0.02em; }
.jd-doc-status { margin: 3px 0 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.jd-ready { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 650; }
.jd-ready::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.jd-sep { color: var(--faint); }
.jd-doc-id .jd-note { margin: 8px 0 0; }
.jd-doc-act { display: flex; justify-content: flex-end; }
.jd-doc-idle { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.jd-doc-idle[hidden], .jd-doc-actions[hidden] { display: none; }
.jd-doc-actions { display: flex; align-items: center; gap: 10px; }
.jd-doc-act .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jd-create { background: var(--bg); color: var(--accent); border-color: var(--accent); }
.jd-create:hover { background: var(--accent-subtle); }
.jd-style .seg-opt span { padding: 7px 12px; }

/* popover menu (Actions / •••) */
.jd-menu {
  position: absolute; z-index: 40; min-width: 220px; padding: 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--app-shadow-pop);
  animation: app-pop 0.14s var(--app-ease);
}
.jd-menu-item {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 8px;
  background: none; color: var(--fg); font: 500 14px var(--font-sans); cursor: pointer;
}
.jd-menu-item:hover, .jd-menu-item:focus-visible { background: var(--subtle); outline: none; }
.jd-menu-item.is-danger { color: var(--danger); }
.jd-menu-item.is-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }

@media (max-width: 900px) {
  .jd-fit { grid-template-columns: 1fr; }
  .jd-head-side { width: 100%; justify-content: space-between; }
  .jd-head-rule { display: none; }
}
@media (max-width: 640px) {
  .jd-doc-row { grid-template-columns: 40px minmax(0, 1fr); }
  .jd-doc-ico { width: 40px; height: 40px; }
  .jd-doc-act { grid-column: 1 / -1; justify-content: flex-start; margin-top: 8px; }
  .jd-doc-idle { justify-content: flex-start; }
  .jd-sec-head { flex-wrap: wrap; padding: 16px; }
  .jd-sheet-body { padding: 18px 16px 40px; }
  .jd-sheet-body .doc-page { padding: 24px 20px; }
}

/* Fit sheet strengths/gaps: no bullets — a green plus or red minus disc per line. */
.sheet-body ul.fit-points { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; font-size: 13.5px; color: var(--fg); }
.fit-points li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; margin: 0; line-height: 1.5; }
.fit-mark { width: 20px; height: 20px; margin-top: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.fit-points .is-good .fit-mark { background: #16a34a; }
.fit-points .is-gap .fit-mark { background: #dc2626; }
.fit-mark svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* =====================================================================================
   FORMS — polish pass (applies to every .f-field on the app pages).
   Small mono all-caps labels (same voice as .app-eyebrow / card labels), "filled" inputs that
   turn white on hover/focus, a themed select arrow, brand-colored checkboxes, and textareas
   that grow with their content where the browser supports it.
   ===================================================================================== */
.f-field { gap: 8px; margin-bottom: 20px; }
.f-field > label, .f-field > .f-label {
  font: 600 11px/1.3 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
/* checkbox rows are sentences, not labels — keep them in normal case */
.f-field > label:has(input[type="checkbox"]) {
  font: 500 14px/1.45 var(--font-sans); letter-spacing: normal; text-transform: none; color: var(--fg);
  cursor: pointer;
}
/* inline notes inside a label (e.g. on "Key achievements") stay readable */
.f-field > label .f-hint { font: 400 12px var(--font-sans); letter-spacing: normal; text-transform: none; }
.f-field:focus-within > label:not(:has(input[type="checkbox"])) { color: var(--accent); }

.f-field input[type="text"],
.f-field input[type="email"],
.f-field input[type="tel"],
.f-field input[type="url"],
.f-field input[type="password"],
.f-field select,
.f-field textarea {
  padding: 11px 14px; border-radius: 10px;
  background-color: var(--bg);
  border: 1px solid color-mix(in srgb, var(--fg) 16%, var(--border));
  font-size: 14.5px; line-height: 1.45;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.f-field input:hover, .f-field select:hover, .f-field textarea:hover {
  background-color: var(--bg);
  border-color: color-mix(in srgb, var(--fg) 34%, var(--border));
}
.f-field input:focus, .f-field select:focus, .f-field textarea:focus {
  background-color: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.f-field input::placeholder, .f-field textarea::placeholder { color: var(--faint); opacity: 1; }

/* select: drop the native arrow for a themed chevron */
.f-field select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}

/* textareas grow with what's typed (Chromium 123+, Safari 18.4+); others keep the drag handle */
.f-field textarea { resize: vertical; min-height: 88px; }
@supports (field-sizing: content) {
  .f-field textarea { field-sizing: content; resize: none; max-height: 520px; }
}

/* checkboxes + radios in the brand color, a touch larger */
.f-field input[type="checkbox"], .tstyle-opt input[type="radio"], .seg-opt input[type="radio"] { accent-color: var(--accent); }

/* helper text sits tight under its field */
.f-field > .f-hint { margin-top: -2px; line-height: 1.5; }

/* a bit more air between grid rows now that labels are smaller */
.f-grid { row-gap: 2px; }

/* =====================================================================================
   FORM WIDGETS (form-widgets.js) — tag input, achievements list, month/year, segmented.
   Same "white field, visible border, purple focus ring" language as plain inputs.
   ===================================================================================== */
.fw-source { display: none !important; }
.f-field input[type="text"], .f-field input[type="email"], .f-field input[type="tel"],
.f-field input[type="url"], .f-field input[type="password"], .f-field select, .f-field textarea,
.f-tags, .f-list { box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.04); }

/* shared "field box" for the composite widgets */
.f-tags, .f-list {
  border: 1px solid color-mix(in srgb, var(--fg) 16%, var(--border));
  border-radius: 10px; background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.f-tags:hover, .f-list:hover { border-color: color-mix(in srgb, var(--fg) 34%, var(--border)); }
.f-tags:focus-within, .f-list:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* --- tag input --- */
.f-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 8px; min-height: 46px; cursor: text; }
.f-tags-list { display: contents; list-style: none; margin: 0; padding: 0; }
.f-tag {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 4px 4px 4px 10px; border-radius: 8px;
  background: var(--accent-subtle); color: var(--fg);
  font-size: 13.5px; font-weight: 550; line-height: 1.3;
  animation: app-fade 0.15s var(--app-ease);
}
.f-tag-x {
  width: 20px; height: 20px; border: 0; border-radius: 5px; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: none; color: var(--muted);
}
.f-tag-x svg, .f-list-x svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.f-tag-x:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--fg); }
.f-field .f-tags input.f-tags-input {
  flex: 1 1 140px; min-width: 120px; width: auto;
  border: 0; background: none; box-shadow: none; padding: 5px 6px; border-radius: 0;
  font-size: 14.5px;
}
.f-field .f-tags input.f-tags-input:focus { box-shadow: none; outline: none; }

/* --- achievements list --- */
.f-list { padding: 4px 0; }
.f-list-items { list-style: none; margin: 0; padding: 0; counter-reset: ach; }
.f-list-item {
  position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) 30px; align-items: start;
  padding: 2px 6px 2px 4px;
}
.f-list-item + .f-list-item { border-top: 1px solid var(--border); }
.f-list-item.is-dragging { opacity: 0.45; }
.f-list-handle {
  display: grid; place-items: center; height: 38px; cursor: grab; color: var(--faint);
  opacity: 0.5; transition: opacity 0.15s ease;
}
.f-list-handle svg { width: 14px; height: 14px; fill: currentColor; }
.f-list-item:hover .f-list-handle, .f-list-item:focus-within .f-list-handle { opacity: 1; }
.f-field .f-list textarea.f-list-text {
  border: 0; background: none; box-shadow: none; border-radius: 6px;
  padding: 9px 6px; min-height: 0; resize: none; line-height: 1.5; font-size: 14.5px;
  overflow: hidden;
}
@supports (field-sizing: content) { .f-field .f-list textarea.f-list-text { field-sizing: content; } }
.f-field .f-list textarea.f-list-text:focus { box-shadow: none; outline: none; }
.f-list-x {
  width: 26px; height: 26px; margin-top: 6px; border: 0; border-radius: 7px; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: none; color: var(--faint);
  opacity: 0; transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.f-list-item:hover .f-list-x, .f-list-item:focus-within .f-list-x { opacity: 1; }
.f-list-x:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.f-list-add {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 4px 8px 4px 10px; padding: 7px 10px; border: 0; border-radius: 8px; cursor: pointer;
  background: none; color: var(--accent); font: 600 13px var(--font-sans);
}
.f-list-add svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.f-list-add:hover { background: var(--accent-subtle); }
@media (hover: none) { .f-list-x, .f-list-handle { opacity: 1; } }

/* --- month / year --- */
/* Compact month + year selects (sized to their content, not the column). On role end dates the
   "I currently work here" switch sits to the right, wrapping below only if the column is narrow. */
.f-date { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.f-date-sel { display: flex; gap: 6px; flex: none; }
.f-field .f-date select { width: auto; padding: 10px 26px 10px 11px; background-position: right 8px center; background-size: 13px; }
.f-field .f-date select.f-date-month { width: 88px; }
.f-field .f-date select.f-date-year { width: 84px; }
.f-date.is-present .f-date-sel { opacity: 0.4; pointer-events: none; }
.f-date-note { flex-basis: 100%; margin: 0; }
.f-date-note[hidden] { display: none; }

/* "I currently work here" checkbox, beside the end-date selects */.f-present { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; color: var(--fg); white-space: nowrap; user-select: none; }




/* Checkboxes: native, in the brand color, a touch larger (profile's "Exclude from tailored resumes",   and the "I currently work here" option on role end dates). */.f-field input[type="checkbox"], .f-present input[type="checkbox"] {  width: 17px; height: 17px; margin: 0; flex-shrink: 0; cursor: pointer; accent-color: var(--accent);}.f-field > label:has(input[type="checkbox"]) { gap: 10px !important; align-items: center !important; }

/* side menu: eye-off icon on roles marked "emergency use only" */
.pn-entry-hidden { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: var(--faint); }
.pn-entry-hidden svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pn-entry.is-hidden-entry .pn-entry-label { color: var(--muted); }

/* Yes/No preferences shown as checkboxes: sit at input height so they line up with the grid */
.f-bool-field { justify-content: center; min-height: 0; margin-bottom: 14px; }
.f-bool-field > label[hidden] { display: none; }
.f-bool { font-size: 14.5px; white-space: normal; }

/* group heading inside a form grid (e.g. "Employment eligibility" on Job preferences) */
.f-group-head { margin: 8px 0 14px; padding-top: 22px; border-top: 1px solid var(--border); }
.f-group-label { font: 600 11px/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Target salary: minimum – maximum boxes with a $ prefix, plus "Open to discussion" */
.f-salary { display: flex; flex-direction: column; gap: 10px; }
.f-salary-row { display: flex; align-items: center; gap: 8px; }
.f-salary-dash { color: var(--faint); }
.f-money {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--fg) 16%, var(--border)); border-radius: 10px; background: var(--bg);
  box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.f-money:hover { border-color: color-mix(in srgb, var(--fg) 34%, var(--border)); }
.f-money:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.f-money-sign { color: var(--muted); font-size: 14.5px; }
.f-field .f-money input[type="text"] {
  border: 0; background: none; box-shadow: none; padding: 11px 0; border-radius: 0; width: 100%;
  font-variant-numeric: tabular-nums;
}
.f-field .f-money input[type="text"]:focus { box-shadow: none; outline: none; }
.f-salary.is-open .f-salary-row { opacity: 0.4; pointer-events: none; }

/* job page: the bottom status bar only appears when it has something to say */
.jd-foot:has(.save-state:empty) { display: none; }

/* =====================================================================================
   MY JOBS — list layout (overrides the earlier jb-* card grid): heading + four stat tiles,
   a toolbar (filters, search, sort, Add a job), and one full-width row per job.
   ===================================================================================== */
.app-wrap.jb-wrap { max-width: 1320px; }

.jb-hero { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr); align-items: center; gap: 32px; margin-bottom: 32px; }
.jb-eyebrow { display: block; margin-bottom: 14px; font: 650 12.5px var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.jb-h1 { font-size: clamp(40px, 4.6vw, 56px); margin: 0 0 12px; }
.jb-lede { font-size: 16px; max-width: 46ch; }

.jb-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; }
.jb-stat { flex-direction: row; align-items: flex-start; gap: 12px; padding: 18px 16px; border-radius: 18px; background: var(--bg); box-shadow: var(--app-shadow-card); }
.jb-stat-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--accent-subtle); color: var(--accent); }
.jb-stat-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.jb-stat-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jb-stat-label { font: 700 11.5px var(--font-sans); letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
.jb-stat-value { font-size: clamp(30px, 2.8vw, 40px); }
.jb-stat-value small { font-size: 0.55em; font-weight: 700; letter-spacing: -0.01em; }
.jb-stat-foot { font-size: 13px; white-space: nowrap; }
.jb-stat-invert {
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 55%, var(--invert-bg)) 0%, var(--invert-bg) 75%);
  border-color: transparent;
}
.jb-stat-invert .jb-stat-ico { background: rgba(255, 255, 255, 0.14); color: #fff; }
.jb-stat-invert .jb-stat-label { color: rgba(255, 255, 255, 0.75); }
.jb-stat-invert .jb-stat-foot { color: rgba(255, 255, 255, 0.8); }
.jb-stat-invert::after { display: none; }

/* toolbar */
.jb-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.jb-chips { flex: none; }
.jb-chip { padding: 9px 16px; font-size: 14.5px; }
.jb-chip-count { min-width: 24px; line-height: 22px; border: 1px solid var(--border); background: var(--bg); }
.jb-chip[aria-pressed="true"] .jb-chip-count { border-color: transparent; }
.jb-search { flex: 1 1 180px; min-width: 160px; height: 44px; }
.jb-sort select {
  height: 44px; padding: 0 40px 0 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); background-color: var(--bg); color: var(--fg); font: 600 14.5px var(--font-sans);
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 15px;
}
.jb-sort select:hover { border-color: color-mix(in srgb, var(--fg) 30%, var(--border)); }
.jb-sort select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jb-toolbar .jb-add { height: 44px; padding: 0 22px; }

/* job rows */
.jb-list { display: flex; flex-direction: column; gap: 14px; }
.jb-row {
  display: grid; align-items: center;
  grid-template-columns: minmax(220px, 1.35fr) minmax(300px, 1.25fr) minmax(200px, 0.95fr) auto;
  gap: 0; padding: 20px 22px 20px 26px;
  border: 1px solid var(--border); border-radius: 20px; background: var(--bg);
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.03); cursor: pointer;
  transition: transform 0.2s var(--app-ease), box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  animation: app-rise 0.5s var(--app-ease) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.jb-row:hover, .jb-row:focus-within { transform: translateY(-2px); border-color: color-mix(in srgb, var(--fg) 16%, var(--border)); box-shadow: var(--app-shadow-card); }
.jb-row.is-leaving { opacity: 0; transform: scale(0.98); }
.jb-row > div { min-width: 0; }
.jb-row > div + div { border-left: 1px solid var(--border); padding-left: 28px; margin-left: 28px; }
.jb-row > .jr-act { border-left: 0; padding-left: 0; }

.jr-title { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.3; }
.jr-title a { color: inherit; text-decoration: none; }
.jr-sub { margin: 4px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; font-size: 15px; color: var(--muted); }
.jr-dot { color: var(--faint); }
.jr-posting { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; color: var(--accent); text-decoration: none; }
.jr-posting svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jr-posting:hover { text-decoration: underline; text-underline-offset: 3px; }
.jr-added { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

.jr-fits { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.jr-fit { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.jr-fit-label { font-size: 14px; font-weight: 600; color: var(--fg); }
.jr-fit-verdict { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--fit); }
.jr-bar { display: block; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 9%, transparent); overflow: hidden; }
.jr-bar i { display: block; height: 100%; border-radius: inherit; background: var(--fit); }

.jr-docs { display: flex; align-items: center; gap: 14px; }
.jr-doc-ico { flex-shrink: 0; color: var(--muted); }
.jr-doc-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.jb-row.has-docs .jr-doc-ico { color: var(--ok); }
.jr-docs strong { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.jr-docs span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

.jr-act { display: flex; align-items: center; gap: 10px; padding-left: 20px; }
.jr-open { padding: 10px 22px; font-size: 15px; border-color: var(--border); border-width: 1px; }
.jb-row:hover .jr-open { border-color: var(--fg); }
.jr-more { position: relative; padding: 10px 13px; border-color: var(--border); border-width: 1px; letter-spacing: 1px; }
.jr-more .card-menu-popup { letter-spacing: normal; }


@media (max-width: 1180px) {
  .jb-hero { grid-template-columns: 1fr; }
  .jb-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 18px; }
  .jb-row > div + div { border-left: 0; padding-left: 0; margin-left: 0; }
  .jr-fits { grid-column: 1 / -1; order: 2; }
  .jr-docs { order: 3; }
  .jr-act { order: 4; justify-content: flex-end; }
}
@media (max-width: 720px) {
  .jb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jb-row { grid-template-columns: 1fr; padding: 18px; }
  .jr-act { justify-content: flex-start; padding-left: 0; }
  .jb-toolbar .jb-add { width: 100%; }
}

/* =====================================================================================
   APP SHELL — full-height left sidebar + main column, shared by My Jobs (jobs.html), the job
   detail page (job.html) and Profile (profile.html). <body class="has-shell">, then
   .shell > aside.shell-side + main.shell-main. The sidebar stays `hidden` until the page has
   loaded past the extension gate, and the grid collapses to one column while it is.
   ===================================================================================== */
:root { --side-w: 296px; --bar-h: 59px; }
body.has-shell .app-bar { padding-left: 24px; padding-right: 32px; }
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100vh - var(--bar-h)); }
.shell:has(> .shell-side[hidden]) { grid-template-columns: minmax(0, 1fr); }
.shell-side {
  position: sticky; top: var(--bar-h); align-self: start;
  height: calc(100vh - var(--bar-h)); overflow-y: auto; scrollbar-width: thin;
  padding: 28px 20px 32px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
  border-right: 1px solid color-mix(in srgb, var(--accent) 8%, var(--border));
  animation: app-fade 0.3s var(--app-ease);
}
.shell-side[hidden] { display: none; }
.shell-main { min-width: 0; width: 100%; max-width: 1320px; padding: 40px 40px 112px; }
body.has-shell:has(.shell-side:not([hidden])) .app-foot { left: var(--side-w); }
body.has-shell .app-foot .app-foot-inner { max-width: none; padding-left: 40px; padding-right: 40px; }

/* identity block at the top of the sidebar */
.side-id { padding: 0 8px 22px; }
.side-tile {
  width: 52px; height: 52px; margin-bottom: 14px; border-radius: 15px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-fg);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 28%, transparent);
}
.side-tile svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.side-mono {
  font: 800 19px var(--font-sans); letter-spacing: -0.02em; color: #fff;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #fff));
}
.side-title { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; overflow-wrap: anywhere; }
.side-desc { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.side-desc:empty { display: none; }
.side-rule { border: 0; border-top: 1px solid color-mix(in srgb, var(--accent) 10%, var(--border)); margin: 22px 8px; }

/* nav list (My Jobs filters; Profile sections reuse the look below) */
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 12px; background: none; cursor: pointer;
  color: var(--fg); font: 550 14.5px var(--font-sans); text-align: left;
  transition: background 0.15s ease;
}
.side-nav-item:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.side-nav-item[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 13%, var(--bg)); font-weight: 650; }
.side-nav-ico { width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center; color: var(--muted); }
.side-nav-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.side-nav-item[aria-pressed="true"] .side-nav-ico { color: var(--accent); }
.side-nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-count {
  min-width: 24px; padding: 0 7px; border: 0; border-radius: 999px; text-align: center;
  font: 700 12px/22px var(--font-sans); font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--fg) 7%, var(--bg)); color: var(--muted);
}

/* facts list + posting link (job detail sidebar) */
.side-facts { list-style: none; margin: 0 0 16px; padding: 0 8px; display: grid; gap: 12px; font-size: 14.5px; }
.side-facts:not(:has(li:not([hidden]))) { display: none; }
.side-facts li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.side-facts li[hidden] { display: none; }
.side-facts svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-link { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px; font: 650 14.5px var(--font-sans); color: var(--accent); text-decoration: none; }
.side-link[hidden] { display: none; }
.side-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* AI Spend card (app/spend-card.js) */
.spend-card {
  padding: 20px; border-radius: 18px; background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--border)); box-shadow: var(--app-shadow-card);
}
.spend-head { display: flex; align-items: center; gap: 10px; font-size: 15.5px; }
.spend-head strong { font-weight: 750; letter-spacing: -0.01em; }
.spend-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-subtle); color: var(--accent); }
.spend-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.spend-total { margin-top: 14px; font-size: 38px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.spend-sub { margin-top: 5px; font-size: 14px; color: var(--muted); }
.spend-sub:empty { display: none; }
.spend-bar { display: flex; height: 8px; margin: 14px 0 16px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--fg) 8%, transparent); }
.spend-bar i { display: block; height: 100%; transition: width 0.6s var(--app-ease); }
.spend-seg-0 { background: var(--accent); }
.spend-seg-1 { background: color-mix(in srgb, var(--accent) 58%, var(--bg)); }
.spend-seg-2 { background: color-mix(in srgb, var(--accent) 30%, var(--bg)); }
.spend-list { margin: 0; display: grid; gap: 8px; }
.spend-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.spend-list dt { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.spend-list dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.spend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.spend-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 8px 14px; border-radius: 10px;
  background: var(--accent-subtle); color: var(--accent); font: 650 14px var(--font-sans); text-decoration: none;
  transition: background 0.15s ease;
}
.spend-link:hover { background: color-mix(in srgb, var(--accent) 18%, var(--bg)); }
.spend-link span { display: inline-block; transition: transform 0.2s var(--app-ease); }
.spend-link:hover span { transform: translateX(3px); }

/* --- My Jobs in the shell --- */
.jb-main { container-type: inline-size; }
.jb-main .jb-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.jb-main .jb-hero .jb-add { margin-top: 28px; flex-shrink: 0; }
.jb-main .jb-toolbar { margin-bottom: 18px; }
.jr-id { display: flex; align-items: center; gap: 18px; }
.jr-id-text { min-width: 0; }
.jr-mono {
  width: 60px; height: 60px; flex-shrink: 0; border-radius: 15px; display: grid; place-items: center;
  background: var(--accent-subtle); color: var(--accent); font: 800 20px var(--font-sans); letter-spacing: -0.02em;
}
.jb-main .jb-row { grid-template-columns: minmax(260px, 1.4fr) minmax(280px, 1.2fr) minmax(190px, 0.9fr) auto; }
.jb-main .jb-row > div + div { padding-left: 24px; margin-left: 24px; }
.jb-main .jb-row > .jr-act { padding-left: 16px; margin-left: 0; }
/* rows with documents get a green left edge */
.jb-row.has-docs { box-shadow: inset 4px 0 0 var(--ok); }
.jb-row.has-docs:hover, .jb-row.has-docs:focus-within { box-shadow: inset 4px 0 0 var(--ok), var(--app-shadow-card); }
@container (max-width: 1100px) {
  .jb-main .jb-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 18px; }
  .jb-main .jb-row > div + div { border-left: 0; padding-left: 0; margin-left: 0; }
  .jb-main .jr-fits { grid-column: 1 / -1; order: 2; }
  .jb-main .jr-docs { order: 3; }
  .jb-main .jr-act { order: 4; justify-content: flex-end; }
}
@container (max-width: 640px) {
  .jb-main .jb-row { grid-template-columns: 1fr; padding: 18px; }
  .jb-main .jr-act { justify-content: flex-start; padding-left: 0; }
  .jr-mono { width: 48px; height: 48px; font-size: 16px; border-radius: 13px; }
}

/* --- job detail in the shell --- */
.jd-main { padding-top: 28px; }
.jd-head-id { flex: 1 1 360px; }
.jd-title { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.04em; }

/* --- Profile in the shell --- */
.pf-side .pf-avatar { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 14px; box-shadow: none; }
.pf-side .pf-avatar svg { width: 26px; height: 26px; }
.pf-side .pf-avatar.has-initials { font-size: 20px; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 28%, transparent); }
.pf-side .profile-nav {
  position: static; flex: none; max-height: none; overflow: visible;
  padding: 0; border: 0; border-radius: 0; background: none; animation: none; gap: 3px;
}
.pf-side .profile-nav-item { gap: 12px; padding: 9px 10px 9px 12px; border-radius: 12px; font: 550 14.5px var(--font-sans); color: var(--fg); }
.pf-side .pn-ico { width: 20px; height: 20px; border: 0; border-radius: 0; background: none; color: var(--muted); }
.pf-side .pn-ico svg { width: 18px; height: 18px; }
.pf-side .profile-nav-item:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.pf-side .profile-nav-item[aria-current="true"] { background: color-mix(in srgb, var(--accent) 13%, var(--bg)); box-shadow: none; font-weight: 650; }
.pf-side .profile-nav-item[aria-current="true"] .pn-ico { background: none; border: 0; color: var(--accent); }
.pf-side .profile-nav-count { min-width: 24px; padding: 0 7px; font: 700 12px/22px var(--font-sans); background: color-mix(in srgb, var(--fg) 7%, var(--bg)); color: var(--muted); }
.pf-side .profile-nav-check { width: 22px; height: 22px; }
.pf-side .pn-group { padding: 18px 12px 6px; }
.pf-side .pn-tree { margin-left: 21px; }

.pf-wrap { padding-top: 36px; }
.pf-wrap .pf-hero { margin-bottom: 28px; }
.pf-wrap .pf-name { font-size: clamp(32px, 3.8vw, 48px); letter-spacing: -0.045em; line-height: 1.05; }
.pf-wrap .pf-meta { margin-top: 8px; font-size: 16px; }
.pf-wrap .pf-hero .pf-strength { padding: 12px 20px 12px 12px; box-shadow: var(--app-shadow-card); }
.pf-wrap .profile-layout { display: block; }

/* each section is one card: tinted header band (icon, title, pager, + Add), then the entry */
.pf-wrap .profile-panel {
  border: 1px solid var(--border); border-radius: 20px; background: var(--bg);
  box-shadow: var(--app-shadow-card); padding: 0 28px 28px;
}
.pf-wrap .profile-panel > .pf-sec-head,
.pf-entry-mode > .pf-sec-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 16px;
  margin: 0 -28px 24px; padding: 16px 20px 16px 18px; border-radius: 20px 20px 0 0;
  background: color-mix(in srgb, var(--accent) 3%, var(--bg)); border-bottom: 1px solid var(--border);
}
.pf-sec-head > div:not([class]) { flex: 1 1 240px; min-width: 0; }
.pf-wrap .pf-sec-ico { width: 46px; height: 46px; border-radius: 14px; }
.pf-wrap .pf-sec-ico svg { width: 22px; height: 22px; }
.pf-wrap .pf-sec-head .panel-title { font-size: 20px; margin: 0 0 2px; }
.pf-wrap .pf-sec-head .panel-desc { font-size: 14px; }
.pf-sec-tools { display: flex; align-items: center; gap: 14px; flex-shrink: 0; margin-left: auto; }
.pf-entry-pager { display: flex; align-items: center; gap: 6px; }
.pf-entry-pager[hidden] { display: none; }
.pf-entry-pager .pf-entry-pos { font-size: 13.5px; color: var(--muted); margin-right: 4px; }
.pf-head-add { gap: 6px; background: var(--bg); color: var(--accent); border-color: var(--accent); }
.pf-head-add:hover { background: var(--accent-subtle); }
.pf-head-add svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
/* the panel's own "+ Add" is replaced by the header button (profile-tree.js still clicks it) */
.pf-wrap .rz-add { display: none !important; }

/* the open entry sits flat inside the card (no card-in-card) */
.rz-rows.pf-focus > .rz-row.is-focused { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.pf-entry-foot { display: flex; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.pf-entry-foot[hidden] { display: none; }
.pf-entry-foot .pf-entry-remove { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.pf-entry-foot .pf-entry-remove svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* --- shell on narrow screens: sidebar stacks above the content --- */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .shell-side {
    position: static; height: auto; overflow: visible; padding: 20px 16px;
    border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--accent) 8%, var(--border));
  }
  .shell-main { padding: 28px 16px 112px; }
  /* My Jobs / job detail: content first, the summary sidebar after it (Profile keeps its menu on top) */
  .shell-side:not(.pf-side) {
    order: 2; padding-bottom: 112px;
    border-bottom: 0; border-top: 1px solid color-mix(in srgb, var(--accent) 8%, var(--border));
  }
  .shell-side:not(.pf-side) + .shell-main { padding-bottom: 40px; }
  body.has-shell .app-bar { padding-left: 16px; padding-right: 16px; }
  body.has-shell:has(.shell-side:not([hidden])) .app-foot { left: 0; }
  body.has-shell .app-foot .app-foot-inner { padding-left: 16px; padding-right: 16px; }
  .side-id { padding: 0 0 16px; }
  .side-id .side-tile { margin-bottom: 10px; width: 44px; height: 44px; }
  .side-rule { margin: 16px 0; }
  /* My Jobs: the sidebar box dissolves (display: contents) so its pieces can sit around the
     list: filters as a scrolling chip row above it, the spend card below it. The heading is
     already in the page header. */
  .shell-side:has(#sideFilters) { display: contents; }
  .shell-side:has(#sideFilters) > .side-id,
  .shell-side:has(#sideFilters) > .side-rule { display: none; }
  .shell-side:has(#sideFilters) + .shell-main { order: 1; padding-top: 20px; padding-bottom: 32px; }
  #sideFilters {
    order: 0; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none;
    padding: 16px 16px 0;
  }
  #sideFilters .side-nav-item { flex: none; width: auto; padding: 7px 12px; border: 1px solid var(--border); }
  #sideFilters .side-nav-item[aria-pressed="true"] { border-color: transparent; }
  .shell-side:has(#sideFilters) > .spend-card { order: 2; margin: 0 16px 112px; }
  /* section menus scroll sideways instead of stacking */
  .pf-side .profile-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .pf-side .profile-nav-item { flex: none; width: auto; }
  .pf-side .pn-group, .pf-side .pn-caret, .pf-side .pn-tree { display: none !important; }
  .spend-card { padding: 16px; }
  .spend-total { font-size: 30px; }
}
@media (max-width: 640px) {
  .pf-wrap .profile-panel { padding: 0 16px 20px; }
  .pf-wrap .profile-panel > .pf-sec-head, .pf-entry-mode > .pf-sec-head { margin: 0 -16px 20px; padding: 14px 16px; }
  .pf-sec-tools { width: 100%; justify-content: space-between; }
}

/* --- reduced motion ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .rz-row.job-card:hover, .rz-row.job-card:focus-within { transform: none; }
  .spinner { animation-duration: 1.4s !important; animation-iteration-count: infinite !important; }
}

/* =====================================================================================
   SIDEBAR FOOT — a quiet action pinned to the bottom of the sidebar (job detail: Remove this
   job). The sidebar is a flex column so margin-top: auto can push the foot down.
   ===================================================================================== */
.shell-side { display: flex; flex-direction: column; }
.shell-side[hidden] { display: none; }
.shell-side > .side-link { align-self: flex-start; }
.side-foot { margin-top: auto; padding-top: 24px; }
.side-remove {
  display: inline-flex; align-items: center; gap: 8px; width: 100%; justify-content: center;
  padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border));
  background: transparent; color: var(--danger); cursor: pointer;
  font: 600 14px var(--font-sans);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.side-remove svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.side-remove:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); border-color: var(--danger); }

/* =====================================================================================
   JOB DETAIL — lighter pass. Sections read as quiet outlined groups instead of heavy cards:
   no shadow or tinted header band, smaller icons and headings, softer fit panels.
   ===================================================================================== */
.jd-title { font-size: clamp(26px, 2.8vw, 36px); }
.jd-head { margin-bottom: 24px; }

.jd-card-sec { border-radius: 16px; box-shadow: none; margin-bottom: 20px; }
.jd-sec-head { gap: 12px; padding: 14px 18px; background: none; border-bottom: 1px solid var(--border); }
.jd-sec-ico { width: 34px; height: 34px; border-radius: 10px; }
.jd-sec-ico svg { width: 17px; height: 17px; stroke-width: 1.9; }
.jd-sec-title h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.jd-sec-title p { font-size: 13px; }
.jd-count { padding: 3px 10px; font-size: 12px; }

/* fit panels: neutral surface, a thin verdict-colored accent, smaller type */
.jd-fit { gap: 12px; padding: 14px; }
.jd-fit-panel {
  gap: 10px; padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--fit) 3%, var(--bg));
}
.jd-fp-head { gap: 10px; }
.jd-fp-ico { width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--fit) 10%, var(--bg)); }
.jd-fp-ico svg { width: 16px; height: 16px; }
.jd-fp-head h3 { margin: 0 0 1px; font-size: 15px; font-weight: 700; }
.jd-fp-head p { font-size: 12.5px; }
.jd-fp-verdict { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; }
.jd-fp-bar { height: 6px; margin-top: -2px; }
.jd-chip { padding: 3px 9px; font-size: 12px; }
.jd-fp-link { font-size: 13.5px; }
.jd-fit-empty { margin: 14px; padding: 14px 16px; border-radius: 12px; }
.jd-fit-empty p { font-size: 14px; }

/* document rows */
.jd-doc-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 2px 14px; padding: 12px 18px; }
.jd-sec-head + .jd-doc-row { border-top: 0; }
.jd-doc-ico { width: 34px; height: 34px; border-radius: 10px; }
.jd-doc-ico svg { width: 17px; height: 17px; }
.jd-doc-id h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.jd-doc-status { margin-top: 1px; font-size: 13px; }
/* the posting row is source material, not a generated document: neutral icon */
.jd-doc-row.is-source .jd-doc-ico { background: var(--subtle); color: var(--muted); }
.jd-doc-act .btn-sm { padding: 7px 14px; font-size: 13px; }
.jd-doc-act .btn svg { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .jd-doc-row { grid-template-columns: 34px minmax(0, 1fr); }
  .jd-doc-ico { width: 34px; height: 34px; }
}

/* =====================================================================================
   MY JOBS — lighter pass (same treatment as the job detail page above): flat outlined rows,
   smaller monogram and type, a quieter header, toolbar and spend card.
   ===================================================================================== */
.jb-main .jb-h1 { font-size: clamp(30px, 3.2vw, 40px); margin-bottom: 8px; letter-spacing: -0.04em; }
.jb-main .jb-eyebrow { margin-bottom: 10px; font-size: 11.5px; }
.jb-main .jb-lede { font-size: 15px; }
.jb-main .jb-hero { margin-bottom: 24px; }
.jb-main .jb-hero .jb-add { margin-top: 18px; padding: 11px 20px; font-size: 14.5px; box-shadow: none; }
.jb-main .jb-hero .jb-add:hover { transform: none; }

.jb-main .jb-toolbar { gap: 10px; margin-bottom: 14px; }
.jb-main .jb-chip { padding: 6px 12px; font-size: 13.5px; }
.jb-main .jb-chip-count { min-width: 20px; line-height: 18px; font-size: 11px; }
.jb-main .jb-search { height: 38px; }
.jb-main .jb-sort select { height: 38px; font-size: 13.5px; font-weight: 550; }

.jb-main .jb-list { gap: 10px; }
.jb-main .jb-row { padding: 14px 18px; border-radius: 14px; box-shadow: none; }
.jb-main .jb-row:hover, .jb-main .jb-row:focus-within {
  transform: none; box-shadow: none; border-color: color-mix(in srgb, var(--fg) 22%, var(--border));
}
.jb-main .jb-row.has-docs { box-shadow: inset 3px 0 0 var(--ok); }
.jb-main .jb-row.has-docs:hover, .jb-main .jb-row.has-docs:focus-within { box-shadow: inset 3px 0 0 var(--ok); }
.jb-main .jb-row > div + div { padding-left: 20px; margin-left: 20px; }
.jb-main .jr-id { gap: 14px; }
.jr-mono { width: 42px; height: 42px; border-radius: 11px; font-size: 15px; }
.jb-main .jr-title { font-size: 16px; font-weight: 700; letter-spacing: -0.015em; }
.jb-main .jr-sub { font-size: 13.5px; margin-top: 2px; }
.jb-main .jr-posting { font-weight: 600; }
.jb-main .jr-posting svg { width: 13px; height: 13px; }
.jb-main .jr-added { font-size: 12.5px; margin-top: 3px; }
.jb-main .jr-fits { gap: 18px; }
.jb-main .jr-fit { gap: 4px; }
.jb-main .jr-fit-label { font-size: 12.5px; font-weight: 550; color: var(--muted); }
.jb-main .jr-fit-verdict { font-size: 16px; font-weight: 700; }
.jb-main .jr-bar { height: 5px; }
.jb-main .jr-docs { gap: 10px; }
.jb-main .jr-doc-ico svg { width: 20px; height: 20px; }
.jb-main .jr-docs strong { font-size: 14px; font-weight: 650; }
.jb-main .jr-docs span { font-size: 12.5px; }
.jb-main .jr-open { padding: 7px 16px; font-size: 13.5px; }
.jb-main .jr-more { padding: 7px 11px; }

/* sidebar spend card: outlined, no drop shadow (all three pages) */
.spend-card { box-shadow: none; padding: 18px; }
.spend-total { font-size: 32px; }

/* =====================================================================================
   ROUNDED BUTTONS — every button is a pill (text) or a circle (icon-only). .btn itself is
   rounded in fittedcv-brand.css; this block catches the app's own button-like controls whose
   earlier rules set squarer corners. Menu rows, sidebar nav rows and text links are not buttons
   in this sense and keep their shapes. Kept last so it wins over those earlier rules.
   ===================================================================================== */
.btn, .jb-add, .jr-open, .jr-more, .jd-actions-btn, .pf-head-add,
.seg, .seg-opt span, .dlg-tabs, .dlg-tab, .jb-sort select,
.spend-link, .pf-entry-remove, .rz-row .rz-remove, .f-list-add, .job-card-open, .side-remove {
  border-radius: 999px;
}
/* icon-only buttons: circles */
.theme-toggle, .pf-entry-nav, .sheet-close, .jd-sheet-head .sheet-close, .dialog-close, .f-tag-x {
  border-radius: 50%;
}

/* Download PDF FAB: a small bounce as it appears (each time the document sheet opens, or the
   sheet switches documents — both re-show it). `backwards` fill only holds the first frame
   during the delay, so the hover lift still works afterwards. Reduced motion skips it (above). */
.sheet.open .jd-fab { animation: fab-bounce 0.7s cubic-bezier(0.3, 0.7, 0.4, 1) 0.18s backwards; }
@keyframes fab-bounce {
  0%   { opacity: 0; transform: translateY(36px) scale(0.6); }
  50%  { opacity: 1; transform: translateY(-10px) scale(1.06); }
  70%  { transform: translateY(4px) scale(0.98); }
  85%  { transform: translateY(-2px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}
