/* ============================================================================
   Job Hunting Tracker — Component Primitives
   Depends on tokens.css. Class-based, framework-free, Django-port friendly.
   Naming: .jt-<component>. State via [data-state] / .is-* modifiers.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: var(--lh-body);
  font-weight: var(--fw-read);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv05" 1, "ss01" 1;
}
::selection { background: var(--accent-soft); }
a { color: inherit; text-decoration: none; }

/* tabular numerals everywhere numbers matter */
.tnum, .jt-score, .jt-stat__num, .jt-metric, td.num, .num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* focus visibility — consistent ring across all interactive elements */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--r-sm);
}

/* ---- Type helpers -------------------------------------------------------- */
.eyebrow {
  font-size: var(--text-2xs);
  font-weight: var(--fw-strong);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}
.h-title { font-size: var(--text-2xl); font-weight: var(--fw-strong);
  letter-spacing: -0.02em; line-height: var(--lh-tight); margin: 0; }
.h-section { font-size: var(--text-lg); font-weight: var(--fw-strong);
  letter-spacing: -0.01em; margin: 0; }
.text-muted { color: var(--muted); }
.text-faint { color: var(--faint); }
.mono { font-family: var(--font-mono); }

/* ============================================================================
   Buttons
   ========================================================================== */
.jt-btn {
  --_bg: var(--surface-3);
  --_fg: var(--fg);
  --_bd: var(--border-strong);
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: 34px; padding: 0 var(--s-4);
  font-family: inherit; font-size: var(--text-sm); font-weight: var(--fw-medium);
  letter-spacing: 0.01em;
  color: var(--_fg); background: var(--_bg);
  border: 1px solid var(--_bd); border-radius: var(--r-md);
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.jt-btn:hover { background: var(--surface-4); }
.jt-btn:active { transform: translateY(1px); }
.jt-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.jt-btn .jt-ico { width: 15px; height: 15px; }

.jt-btn--primary {
  --_bg: var(--accent); --_fg: var(--accent-fg); --_bd: transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, var(--shadow-1);
}
.jt-btn--primary:hover { --_bg: var(--accent-hover); }
.jt-btn--primary:active { --_bg: var(--accent-press); }

.jt-btn--ghost { --_bg: transparent; --_bd: transparent; color: var(--muted); }
.jt-btn--ghost:hover { background: var(--surface-3); color: var(--fg); }

.jt-btn--subtle { --_bg: var(--accent-soft); --_fg: var(--accent-text);
  --_bd: var(--accent-line); }
.jt-btn--subtle:hover { background: rgba(99,102,241,0.20); }

.jt-btn--danger { --_fg: var(--danger); --_bd: var(--border-strong); }
.jt-btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); }

.jt-btn--sm { height: 28px; padding: 0 var(--s-3); font-size: var(--text-xs); }
.jt-btn--icon { width: 34px; padding: 0; justify-content: center; }
.jt-btn--icon.jt-btn--sm { width: 28px; }
.jt-btn--block { width: 100%; justify-content: center; }

/* ============================================================================
   Inputs / selects / search
   ========================================================================== */
.jt-field { display: flex; flex-direction: column; gap: var(--s-2); }
.jt-label { font-size: var(--text-xs); font-weight: var(--fw-medium);
  color: var(--muted); letter-spacing: 0.01em; }

.jt-input, .jt-select, .jt-textarea {
  width: 100%; height: 38px; padding: 0 var(--s-3);
  font-family: inherit; font-size: var(--text-md); color: var(--fg);
  background: var(--surface-3); border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.jt-textarea { height: auto; min-height: 84px; padding: var(--s-3); resize: vertical;
  line-height: var(--lh-body); }
.jt-input::placeholder, .jt-textarea::placeholder { color: var(--faint); }
.jt-input:focus, .jt-select:focus, .jt-textarea:focus {
  border-color: var(--accent); background: var(--surface-2); }
.jt-input[type="file"] {
  height: auto;
  padding: 7px var(--s-3);
}
.jt-input[type="file"]::file-selector-button {
  margin-right: var(--s-3);
  height: 24px;
  padding: 0 var(--s-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface-4);
  color: var(--fg);
  font: inherit;
  font-size: var(--text-xs);
  cursor: pointer;
}
.jt-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A0A6B4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 30px; cursor: pointer;
}

.jt-search {
  display: flex; align-items: center; gap: var(--s-2);
  height: 36px; padding: 0 var(--s-3);
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--faint);
}
.jt-search:focus-within { border-color: var(--border-strong); }
.jt-search input {
  flex: 1; border: 0; background: transparent; color: var(--fg);
  font-family: inherit; font-size: var(--text-sm); outline: none;
}
.jt-kbd {
  font-family: var(--font-mono); font-size: var(--text-2xs);
  color: var(--faint); background: var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--r-xs);
  padding: 1px 5px; line-height: 1.4;
}

/* segmented control (filter chips group) */
.jt-seg { display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r-md); }
.jt-seg button {
  height: 26px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--muted);
  font-family: inherit; font-size: var(--text-xs); font-weight: var(--fw-medium);
  cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.jt-seg button:hover { color: var(--fg); }
.jt-seg button[aria-pressed="true"], .jt-seg button.is-active {
  background: var(--surface-3); color: var(--fg); box-shadow: var(--shadow-1); }

/* ============================================================================
   Badges / tags / pills
   ========================================================================== */
.jt-tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 var(--s-2);
  font-size: var(--text-xs); font-weight: var(--fw-medium); letter-spacing: 0.01em;
  color: var(--muted); background: var(--surface-3);
  border: 1px solid var(--border); border-radius: var(--r-sm);
}
.jt-tag--accent { color: var(--accent-text); background: var(--accent-soft);
  border-color: var(--accent-line); }
.jt-tag--success { color: var(--success); background: var(--success-soft);
  border-color: transparent; }
.jt-tag--warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.jt-tag--danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.jt-tag .jt-ico { width: 13px; height: 13px; }

/* ---- Status pill: lifecycle states — distinguishable, not garish -------- */
.jt-status {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px 0 8px;
  font-size: var(--text-xs); font-weight: var(--fw-medium);
  border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--surface-3); color: var(--muted); white-space: nowrap;
}
.jt-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}
.jt-status[data-status="new"]        { color: #8E93B5; }
.jt-status[data-status="scored"]     { color: var(--info); }
.jt-status[data-status="shortlisted"]{ color: var(--accent-text); }
.jt-status[data-status="pursuing"]   { color: var(--accent); background: var(--accent-soft);
  border-color: var(--accent-line); }
.jt-status[data-status="interview"]  { color: var(--warn); background: var(--warn-soft);
  border-color: transparent; }
.jt-status[data-status="won"]        { color: var(--success); background: var(--success-soft);
  border-color: transparent; }
.jt-status[data-status="lost"]       { color: var(--faint); }
.jt-status[data-status="lost"]::before { box-shadow: none; }

/* ============================================================================
   Score pill — fit 1–10. High = accent/strong, low = muted.
   <span class="jt-score" data-band="high|mid|low">9.2</span>
   ========================================================================== */
.jt-score {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 28px; padding: 0 8px; gap: 3px;
  font-size: var(--text-sm); font-weight: var(--fw-strong);
  border-radius: var(--r-md); border: 1px solid transparent;
  letter-spacing: -0.01em;
}
.jt-score__max { font-size: var(--text-2xs); font-weight: var(--fw-read); opacity: 0.6; }
.jt-score[data-band="high"] { color: #C4C6FC; background: var(--score-high-soft);
  border-color: var(--accent-line); }
.jt-score[data-band="mid"]  { color: #C2C6DC; background: var(--score-mid-soft);
  border-color: var(--border); }
.jt-score[data-band="low"]  { color: var(--faint); background: var(--score-low-soft);
  border-color: var(--border-soft); }

/* large score, used on detail header */
.jt-score--lg { min-width: 64px; height: 56px; font-size: var(--text-3xl);
  border-radius: var(--r-lg); }
.jt-score--lg .jt-score__max { font-size: var(--text-sm); }

/* a slim score meter (optional, for detail) */
.jt-meter { height: 6px; border-radius: var(--r-pill); background: var(--surface-4);
  overflow: hidden; }
.jt-meter > i { display: block; height: 100%; border-radius: inherit;
  background: var(--accent); }

/* ============================================================================
   Cards / panels
   ========================================================================== */
.jt-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.jt-card__hd { display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border-soft); }
.jt-card__bd { padding: var(--s-5); }
.jt-card__ft { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border-soft); }

/* stat tile */
.jt-stat {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-4) var(--s-5);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.jt-stat__label { display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--text-xs); color: var(--muted); font-weight: var(--fw-medium); }
.jt-stat__num { font-size: var(--text-3xl); font-weight: var(--fw-strong);
  letter-spacing: -0.02em; line-height: 1; color: var(--fg-strong); }
.jt-stat__delta { font-size: var(--text-xs); color: var(--faint); }
.jt-stat__delta.is-up { color: var(--success); }
.jt-stat__accent .jt-stat__num { color: var(--accent-text); }

/* ============================================================================
   Data table + lead rows
   ========================================================================== */
.jt-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.jt-table thead th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; padding: var(--s-3) var(--s-4);
  font-size: var(--text-2xs); font-weight: var(--fw-strong);
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.jt-table tbody td { padding: var(--s-4); border-bottom: 1px solid var(--border-soft);
  vertical-align: middle; }
.jt-table tbody tr { transition: background var(--t-fast) var(--ease); cursor: pointer; }
.jt-table tbody tr:hover { background: var(--surface-3); }
.jt-table tbody tr:last-child td { border-bottom: 0; }
.jt-table td.num { text-align: right; }

.jt-lead__title { font-weight: var(--fw-medium); color: var(--fg);
  letter-spacing: -0.005em; }
.jt-lead__sub { display: flex; align-items: center; gap: var(--s-2);
  margin-top: 3px; font-size: var(--text-xs); color: var(--faint); }
.jt-lead__sub .dot { width: 3px; height: 3px; border-radius: 50%;
  background: var(--faint); }
.jt-flag { display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--text-xs); color: var(--warn); }
.jt-flag--ok { color: var(--success); }

/* ============================================================================
   Side nav
   ========================================================================== */
.jt-nav { width: var(--nav-w); flex: 0 0 var(--nav-w);
  background: var(--surface-1); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100vh;
  position: sticky; top: 0; }
.jt-nav__brand { display: flex; align-items: center; gap: var(--s-3);
  height: var(--topbar-h); padding: 0 var(--s-5);
  border-bottom: 1px solid var(--border-soft); }
.jt-nav__mark { width: 26px; height: 26px; border-radius: var(--r-sm);
  background: var(--accent); display: grid; place-items: center; color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset; flex: none; }
.jt-nav__name { font-weight: var(--fw-strong); letter-spacing: -0.01em;
  font-size: var(--text-md); }
.jt-nav__scroll { flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-3); }
.jt-nav__group { margin-bottom: var(--s-5); }
.jt-nav__gtitle { padding: 0 var(--s-3) var(--s-2);
  font-size: var(--text-2xs); font-weight: var(--fw-strong); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint); }
.jt-nav__item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 8px var(--s-3); border-radius: var(--r-md);
  color: var(--muted); font-size: var(--text-sm); font-weight: var(--fw-medium);
  cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.jt-nav__item .jt-ico { width: 17px; height: 17px; flex: none; }
.jt-nav__item:hover { background: var(--surface-3); color: var(--fg); }
.jt-nav__item.is-active { background: var(--accent-soft); color: var(--fg); }
.jt-nav__item.is-active .jt-ico { color: var(--accent-text); }
.jt-nav__count { margin-left: auto; font-size: var(--text-2xs);
  font-variant-numeric: tabular-nums; color: var(--faint);
  background: var(--surface-3); border-radius: var(--r-pill); padding: 1px 7px; }
.jt-nav__item.is-active .jt-nav__count { background: rgba(99,102,241,0.22);
  color: var(--accent-text); }
.jt-nav__ft { padding: var(--s-3); border-top: 1px solid var(--border-soft); }

/* context badge inside nav (Personal/Team/Firm) */
.jt-ctx-mini { display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-2xs); color: var(--muted); }
.jt-ctx-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

/* ============================================================================
   Top bar + context switcher
   ========================================================================== */
.jt-topbar {
  display: flex; align-items: center; gap: var(--s-4);
  height: var(--topbar-h); padding: 0 var(--s-6);
  background: color-mix(in srgb, var(--surface-1) 86%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.jt-topbar__spacer { flex: 1; }

.jt-ctx {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: 36px; padding: 0 10px 0 var(--s-3);
  background: var(--surface-3); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); cursor: pointer; color: var(--fg);
  font-size: var(--text-sm); font-weight: var(--fw-medium);
  transition: border-color var(--t-fast) var(--ease);
}
.jt-ctx:hover { border-color: var(--accent-line); }
.jt-ctx__kind { color: var(--faint); font-size: var(--text-xs); }
.jt-ctx .jt-ico--chev { width: 14px; height: 14px; color: var(--faint); }

.jt-avatar { width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: var(--text-xs);
  font-weight: var(--fw-strong); color: #fff;
  background: linear-gradient(180deg, #3A3D52, #272A38);
  border: 1px solid var(--border-strong); }

/* ============================================================================
   Layout shells
   ========================================================================== */
.jt-app { display: flex; min-height: 100vh; }
.jt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.jt-content { padding: var(--s-6); max-width: var(--maxw); width: 100%;
  margin: 0 auto; }
.jt-page-hd { display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap; }

.jt-grid-stats { display: grid; gap: var(--s-3);
  grid-template-columns: repeat(4, 1fr); margin-bottom: var(--s-5); }

.jt-toolbar { display: flex; align-items: center; gap: var(--s-3);
  flex-wrap: wrap; margin-bottom: var(--s-4); }
.jt-toolbar__spacer { flex: 1; }

.jt-divider { height: 1px; background: var(--border-soft); border: 0; margin: var(--s-5) 0; }
.jt-divider--v { width: 1px; height: 22px; background: var(--border); align-self: center; }

/* small generic icon sizing */
.jt-ico { display: inline-block; vertical-align: middle; stroke: currentColor; }

/* threaded comments (firm board) */
.jt-comment { display: flex; gap: var(--s-3); padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border-soft); }
.jt-comment:last-child { border-bottom: 0; }
.jt-comment__body { flex: 1; min-width: 0; }
.jt-comment__meta { display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--text-xs); margin-bottom: 4px; }
.jt-comment__author { font-weight: var(--fw-medium); color: var(--fg); }
.jt-comment__time { color: var(--faint); }
.jt-comment__text { font-size: var(--text-sm); color: var(--muted); line-height: var(--lh-body); }
.jt-comment--reply { margin-left: var(--s-10);
  border-left: 1px solid var(--border); padding-left: var(--s-4); }

/* vote control */
.jt-vote { display: inline-flex; border: 1px solid var(--border-strong);
  border-radius: var(--r-md); overflow: hidden; }
.jt-vote button { height: 32px; padding: 0 var(--s-3); border: 0;
  background: var(--surface-3); color: var(--muted);
  font-family: inherit; font-size: var(--text-xs); font-weight: var(--fw-medium);
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  border-right: 1px solid var(--border); transition: all var(--t-fast) var(--ease); }
.jt-vote button:last-child { border-right: 0; }
.jt-vote button:hover { background: var(--surface-4); color: var(--fg); }
.jt-vote button.is-go.is-on { background: var(--success-soft); color: var(--success); }
.jt-vote button.is-no.is-on { background: var(--danger-soft); color: var(--danger); }

/* vote tally bar */
.jt-tally { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-xs); }
.jt-tally__bar { flex: 1; height: 6px; border-radius: var(--r-pill);
  background: var(--danger-soft); overflow: hidden; min-width: 60px; }
.jt-tally__bar > i { display: block; height: 100%; background: var(--success); }

/* ---- utility ------------------------------------------------------------- */
.row { display: flex; align-items: center; }
.gap-1 { gap: var(--s-1);} .gap-2 { gap: var(--s-2);} .gap-3 { gap: var(--s-3);}
.gap-4 { gap: var(--s-4);}
.wrap { flex-wrap: wrap; }
.mt-2 { margin-top: var(--s-2);} .mt-3 { margin-top: var(--s-3);} .mt-4 { margin-top: var(--s-4);}
.mt-5 { margin-top: var(--s-5);} .mb-4 { margin-bottom: var(--s-4);}
.hide-sm { display: revert; }

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 1080px) {
  .jt-grid-stats { grid-template-columns: repeat(2, 1fr); }
}
/* Mobile nav drawer: the sidebar collapses below 860px and reopens as a
   fixed slide-over (toggled by the topbar hamburger) over a scrim. */
.jt-nav-toggle { display: none; }
.jt-nav-scrim { display: none; }
@media (max-width: 860px) {
  :root { --nav-w: 0px; }
  .jt-nav { display: none; }
  .jt-nav-toggle { display: inline-flex; }
  .jt-app.nav-open .jt-nav { display: flex; position: fixed;
    inset: 0 auto 0 0; width: min(280px, 82vw); z-index: 60;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55); }
  .jt-app.nav-open .jt-nav-scrim { display: block; position: fixed; inset: 0;
    z-index: 55; background: rgba(0, 0, 0, 0.5); }
  .hide-sm { display: none; }
  .jt-content { padding: var(--s-4); }
}
@media (max-width: 560px) {
  .jt-grid-stats { grid-template-columns: 1fr 1fr; }
  .jt-topbar { padding: 0 var(--s-4); gap: var(--s-3); }
}

/* ============================================================================
   Application checklist + documents
   ========================================================================== */
.jt-stack { display: flex; flex-direction: column; gap: var(--s-4); }

.jt-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.jt-checklist__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: end;
}

.jt-checklist__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--muted);
}

.jt-checklist__progress {
  min-width: 132px;
  text-align: right;
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.01em;
}

.jt-checklist__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-soft);
}

.jt-checklist__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: start;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border-soft);
}

.jt-checklist__item:last-child { border-bottom: 0; }

.jt-checklist__check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  color: transparent;
  flex: none;
}

.jt-checklist__check svg { width: 12px; height: 12px; }

.jt-checklist__copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.jt-checklist__text {
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--fg);
}

.jt-checklist__tags {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.jt-checklist__reason {
  font-size: var(--text-xs);
  color: var(--faint);
}

.jt-checklist__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  justify-content: flex-end;
}

.jt-checklist__item.is-done .jt-checklist__check {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.jt-checklist__item.is-done .jt-checklist__text {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--faint);
}

.jt-checklist__item.is-na {
  opacity: 0.8;
}

.jt-checklist__item.is-na .jt-checklist__check {
  border-style: dashed;
  background: transparent;
}

.jt-checklist__item.is-na .jt-checklist__text {
  color: var(--muted);
}

.jt-checklist__composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: center;
}

.jt-checklist__state {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-3) 70%, transparent);
}

.jt-checklist__state-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.jt-skeleton-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.jt-skeleton-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 72px;
  gap: var(--s-3);
  align-items: center;
  min-height: 42px;
}

.jt-skeleton-row > i {
  display: block;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--surface-4) 86%, var(--surface-3));
  animation: jt-pulse 1.5s var(--ease) infinite alternate;
}

.jt-skeleton-row > i:nth-child(1) { width: 18px; height: 18px; }
.jt-skeleton-row > i:nth-child(2) { width: 100%; height: 12px; }
.jt-skeleton-row > i:nth-child(3) { width: 72px; height: 20px; justify-self: end; }

.jt-docs {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.jt-docs__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-soft);
}

.jt-doc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border-soft);
  align-items: start;
}

.jt-doc-row:last-child { border-bottom: 0; }

.jt-doc-row__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.jt-doc-row__title {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.jt-doc-row__name {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--fg);
}

.jt-doc-row__meta,
.jt-doc-row__notes {
  font-size: var(--text-xs);
}

.jt-doc-row__meta { color: var(--faint); }
.jt-doc-row__notes { color: var(--muted); max-width: 70ch; }

.jt-doc-row__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.jt-docs__upload {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) 160px minmax(220px, 1fr) auto;
  gap: var(--s-3);
  align-items: start;
}

.jt-docs__empty {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-3) 60%, transparent);
}

.jt-inline-note {
  font-size: var(--text-xs);
  color: var(--faint);
}

.jt-surface-note {
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-3);
  font-size: var(--text-xs);
  color: var(--muted);
}

/* ============================================================================
   Notifications / assignment / team review
   ========================================================================== */
.jt-link {
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}
.jt-link:hover { color: var(--fg); }

.jt-notifications {
  position: relative;
}

.jt-notifications__trigger {
  position: relative;
}

.jt-notifications__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
  border: 1px solid var(--accent-line);
  color: var(--accent-text);
  font-size: 10px;
  font-weight: var(--fw-strong);
  line-height: 1;
}

.jt-notifications__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(392px, calc(100vw - 24px));
  display: none;
  background: color-mix(in srgb, var(--surface-2) 92%, var(--bg));
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  z-index: 60;
}

.jt-notifications.is-open .jt-notifications__panel { display: block; }

.jt-notifications__header,
.jt-notifications__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
}

.jt-notifications__header {
  border-bottom: 1px solid var(--border-soft);
}

.jt-notifications__title {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
}

.jt-notifications__list {
  max-height: 420px;
  overflow: auto;
}

.jt-notification {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border-soft);
  align-items: start;
}

.jt-notification:last-child { border-bottom: 0; }

.jt-notification.is-unread {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 68%);
}

.jt-notification__icon {
  width: 30px;
  height: 30px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.jt-notification__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jt-notification__message {
  font-size: var(--text-sm);
  color: var(--fg);
  line-height: 1.45;
}

.jt-notification__meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--faint);
}

.jt-notification__dot {
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: transparent;
}

.jt-notification.is-unread .jt-notification__dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.jt-notifications__empty {
  padding: var(--s-5);
  font-size: var(--text-sm);
  color: var(--muted);
}

.jt-review-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px 0 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}

.jt-review-state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.jt-review-state[data-state="pending"] {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.jt-review-state[data-state="reviewed"] {
  color: var(--success);
  background: var(--success-soft);
  border-color: color-mix(in srgb, var(--success) 28%, transparent);
}

.jt-review-state[data-state="not-eligible"] {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 28%, transparent);
}

.jt-assignment-current {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-3) 78%, transparent), transparent);
}

.jt-assignment-current__meta,
.jt-assignment-current__person {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.jt-assignment-current__person strong {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.jt-assignment-current__person span,
.jt-assignment-current__meta {
  font-size: var(--text-xs);
  color: var(--faint);
}

.jt-assignment-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface-3) 70%, transparent);
}

.jt-assignment-panel__summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jt-assignment-panel__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.jt-review-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}

.jt-review-form__head,
.jt-review-form__score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.jt-review-form__scorebox {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 7px var(--s-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--fg);
}

.jt-review-form__scorebox input {
  width: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--text-lg);
  font-weight: var(--fw-strong);
  text-align: right;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.jt-review-form__scorebox span {
  font-size: var(--text-xs);
  color: var(--faint);
}

.jt-review-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.jt-review-item {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-3);
}

.jt-review-item[data-state="pending"] {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface-3) 60%, transparent);
}

.jt-review-item__head,
.jt-review-item__body,
.jt-review-item__foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
}

.jt-review-item__who {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
}

.jt-review-item__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.jt-review-item__meta strong {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.jt-review-item__meta span,
.jt-review-item__body,
.jt-review-item__foot {
  font-size: var(--text-xs);
}

.jt-review-item__meta span,
.jt-review-item__foot { color: var(--faint); }

.jt-review-item__body {
  color: var(--muted);
  line-height: 1.5;
}

.jt-review-item__score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 0 var(--s-2);
  min-height: 24px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: var(--fw-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.jt-review-item__score small {
  font-size: var(--text-2xs);
  color: var(--faint);
  font-weight: var(--fw-read);
}

@keyframes jt-pulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

@media (max-width: 980px) {
  .jt-notifications__panel {
    right: -12px;
  }

  .jt-checklist__summary,
  .jt-docs__upload,
  .jt-doc-row { grid-template-columns: 1fr; }

  .jt-checklist__progress,
  .jt-doc-row__actions { text-align: left; justify-content: flex-start; }

  .jt-notification,
  .jt-assignment-current,
  .jt-review-item__head,
  .jt-review-item__body,
  .jt-review-item__foot {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .jt-docs__empty { flex-direction: column; }
}

/* ============================================================================
   Account menu / password change
   ========================================================================== */
.jt-account-menu {
  position: relative;
}

.jt-account-menu__trigger {
  padding: 0;
}

.jt-account-menu__trigger .jt-avatar {
  pointer-events: none;
}

.jt-account-menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 24px));
  display: none;
  background: color-mix(in srgb, var(--surface-2) 92%, var(--bg));
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  z-index: 60;
}

.jt-account-menu.is-open .jt-account-menu__panel {
  display: block;
}

.jt-account-menu__header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border-soft);
}

.jt-account-menu__header strong {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--fg);
}

.jt-account-menu__header span {
  font-size: var(--text-xs);
  color: var(--faint);
}

.jt-account-menu__divider {
  height: 1px;
  background: var(--border-soft);
}

.jt-account-menu__item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 42px;
  padding: 0 var(--s-5);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.jt-account-menu__item:hover {
  background: var(--surface-3);
  color: var(--fg);
}

.jt-account-menu__item .jt-ico {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.jt-settings {
  display: grid;
  gap: var(--s-5);
  max-width: 640px;
  margin: 0 auto;
}

.jt-settings__section {
  display: grid;
  gap: var(--s-3);
}

.jt-settings__section > h2 {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--fg);
}

.jt-stack-sm {
  display: grid;
  gap: var(--s-3);
}

.jt-stack-md {
  display: grid;
  gap: var(--s-4);
}

.jt-field__help {
  font-size: var(--text-xs);
  color: var(--faint);
}

.jt-input[aria-invalid="true"] {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger-soft) 24%, var(--surface-3));
}

.jt-pwreq {
  display: grid;
  gap: 10px;
  margin-top: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-3) 72%, transparent);
}

.jt-pwreq__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.jt-pwreq__item[data-state="met"] {
  color: var(--fg);
}

.jt-pwreq__icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: transparent;
}

.jt-pwreq__icon .jt-ico {
  width: 10px;
  height: 10px;
  stroke-width: 2.4;
}

.jt-pwreq__item[data-state="met"] .jt-pwreq__icon {
  border-color: transparent;
  background: var(--success-soft);
  color: var(--success);
}

.jt-pwreq__item[data-state="unmet"] .jt-pwreq__icon::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--faint);
}

.jt-banner-success {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
  border-radius: var(--r-lg);
  background: var(--success-soft);
  color: var(--success);
}

.jt-banner-success__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--success) 18%, transparent);
}

.jt-banner-success__icon .jt-ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.jt-banner-success__body {
  display: grid;
  gap: 3px;
}

.jt-banner-success__body strong {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--fg);
}

.jt-banner-success__body span {
  font-size: var(--text-xs);
  color: color-mix(in srgb, var(--success) 72%, var(--fg));
}

@media (max-width: 720px) {
  .jt-notifications__header,
  .jt-notifications__footer,
  .jt-review-form__head,
  .jt-review-form__score,
  .jt-assignment-panel__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .jt-checklist__item,
  .jt-checklist__composer { grid-template-columns: auto minmax(0, 1fr); }

  .jt-checklist__actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .jt-account-menu__header,
  .jt-account-menu__item {
    padding-left: var(--s-4);
    padding-right: var(--s-4);
  }

  .jt-settings {
    max-width: none;
  }
}
