@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap");

@font-face {
  font-family: "EditorUI";
  src: url("../fonts/EditorUI.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ===================== Design tokens ===================== */
:root {
  --bg: #ffffff;
  --bg-soft: #F8F9FA;
  --surface: #ffffff;
  --ink: #333333;
  --ink-muted: #666666;
  --ink-faint: #999999;
  --line: #E0E0E0;
  --line-soft: #EEEEEE;
  --hover: #F8F9FA;

  --brand: #1FB891;
  --brand-dark: #15936F;
  --brand-soft: #E8F4F0;
  --purple: #5B3CE0;
  --purple-hover: #4A2FBD;
  --purple-soft: #EDE5F7;
  --purple-edge: #B291D9;
  --cyan: #29abe2;
  --amber: #F5A623;
  --amber-soft: #FFF3E0;
  --danger: #E74C3C;
  --danger-soft: #fdecea;
  --info-soft: #DCF0FF;

  --radius: 12px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --ease: 0.16s ease;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --max: 1360px;
  --header-h: 64px;
  --footer-h: 2.4rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body:not(.editor-body) {
  display: flex;
  flex-direction: column;
}
body:not(.editor-body) > main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, h4 { font-family: var(--font); letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(var(--max), calc(100% - 5rem)); margin: 0 auto; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }

/* ===================== App header ===================== */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid var(--line);
}
.app-nav { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.app-logo { display: inline-flex; align-items: center; color: var(--brand); flex-shrink: 0; }
.app-logo .logo-owl { width: 34px; height: 34px; display: block; }
.app-logo .logo-word { margin-left: .5rem; font-weight: 700; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.02em; }
.app-menu { display: flex; align-items: center; gap: 0; flex: 1; overflow: visible; }
.app-menu > a,
.app-menu-drop-btn {
  color: var(--ink-muted); font-size: 14px; font-weight: 500; white-space: nowrap;
  padding: 0 20px; height: var(--header-h); display: inline-flex; align-items: center;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.app-menu-drop-btn {
  border: 0; border-bottom: 3px solid transparent; background: none; font: inherit;
  cursor: pointer; gap: 0.3rem;
}
.app-menu-drop-btn svg { width: 14px; height: 14px; }
.app-menu > a:hover,
.app-menu-drop-btn:hover { color: var(--ink); }
.app-menu > a.active,
.app-menu-drop-btn.active,
.app-menu-drop.is-active .app-menu-drop-btn {
  border-bottom-color: var(--brand); color: var(--brand-dark); font-weight: 500;
}
.app-menu-drop { position: relative; display: inline-flex; align-items: center; }
.app-submenu {
  position: absolute; top: calc(100% - 2px); left: 0; min-width: 188px;
  padding: 0.4rem 0; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: var(--shadow-md); z-index: 120;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}
.app-menu-drop:hover .app-submenu,
.app-menu-drop:focus-within .app-submenu,
.app-menu-drop.is-open .app-submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.app-submenu a {
  display: flex; align-items: center; padding: 0.65rem 1rem;
  font-size: 0.9rem; color: var(--ink); text-decoration: none;
}
.app-submenu a:hover { background: var(--hover); }
.app-submenu a.active { color: var(--brand-dark); font-weight: 600; }
.app-menu-feature { animation: ats-pulse 1.7s ease-in-out infinite; }
@keyframes ats-pulse {
  0% { color: var(--purple); }
  33% { color: var(--brand); }
  66% { color: var(--ink-muted); }
  100% { color: var(--purple); }
}
.app-menu-feature:hover,
.app-menu-feature.active { animation: none; }
.nav-drawer-heading {
  margin: 0.85rem 0 0.15rem; padding: 0 20px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-faint);
}
.nav-drawer-sub { padding-left: 32px !important; }
@media (prefers-reduced-motion: reduce) {
  .app-menu-feature,
  .app-submenu { animation: none !important; transition: none !important; }
}
.app-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; margin-left: auto; }
.avatar-wrap { display: inline-flex; align-items: center; gap: .25rem; color: var(--ink-faint); }
.token-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
}
.token-chip:hover { background: var(--hover); color: var(--purple); }
.token-chip svg { width: 16px; height: 16px; color: var(--purple); flex-shrink: 0; }
.avatar-btn {
  width: 40px; height: 40px; border-radius: 50%; background: #666666; color: #fff;
  display: grid; place-items: center; border: 0; overflow: hidden;
}
.avatar-btn svg { width: 22px; height: 22px; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-caret { width: 16px; height: 16px; color: var(--ink-faint); }
.lang-form { display: inline-flex; margin: 0; }
.lang-select {
  border: 1px solid var(--line); border-radius: 9px; padding: .4rem .6rem;
  font: inherit; font-size: .88rem; background: #fff; color: var(--ink-muted); width: auto;
}
.nav-drawer-lang { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.nav-drawer-lang .lang-select { width: 100%; }
.editor-user-group .lang-select { font-size: .82rem; padding: .3rem .45rem; }
.nav-burger {
  display: none; width: 32px; height: 32px; border: 0; background: transparent;
  color: var(--ink); cursor: pointer; padding: 0; border-radius: 6px;
}
.nav-burger:hover { background: var(--hover); }
.nav-burger svg { width: 22px; height: 22px; display: block; }
.nav-drawer-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 150;
}
.nav-drawer {
  position: fixed; top: 0; right: 0; width: min(320px, 100%); height: 100vh;
  background: #fff; z-index: 200; transform: translateX(100%);
  transition: transform .3s ease; overflow-y: auto; padding: 20px;
  box-shadow: -4px 0 24px rgba(0,0,0,.08);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-backdrop.open { display: block; }
.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line);
}
.nav-drawer-close {
  width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer;
  border-radius: 6px; color: var(--ink); display: grid; place-items: center;
}
.nav-drawer-close:hover { background: var(--hover); }
.nav-drawer-menu { display: flex; flex-direction: column; }
.nav-drawer-menu a {
  padding: 12px 20px; font-size: 14px; font-weight: 400; color: var(--ink);
  border-radius: 6px;
}
.nav-drawer-menu a:hover { background: var(--hover); }
.nav-drawer-menu a.active { color: var(--brand-dark); font-weight: 500; }
body.nav-open { overflow: hidden; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: 10px; padding: .68rem 1.15rem;
  font: inherit; font-size: .95rem; font-weight: 500; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-purple { background: var(--brand); color: #fff; }
.btn-purple:hover {
  background: var(--brand-dark); color: #fff;
  box-shadow: 0 4px 12px rgba(31, 184, 145, 0.3);
}
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--hover); }
.btn-outline-brand {
  background: #fff; color: var(--brand); border: 1.5px solid var(--brand);
}
.btn-outline-brand:hover {
  background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-dark);
}
.btn-ghost { background: transparent; color: var(--ink-muted); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #c0392b; color: #fff; }
.btn-sm { padding: .45rem .8rem; font-size: .88rem; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1rem; }
.btn-round { border-radius: 999px; }

/* ===================== Cards, chips, badges ===================== */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem;
}
.card-lg { border-radius: var(--radius-lg); padding: 1.5rem; }
.card-hover { transition: border-color .15s ease, box-shadow .15s ease; }
.card-hover:hover { border-color: #d3d7db; box-shadow: var(--shadow-sm); }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.section-head h2 { margin: 0; font-size: 1.3rem; font-weight: 600; }
.section-head h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.link-more { color: var(--purple); font-weight: 500; text-decoration: none; font-size: 14px; }
.link-more:hover { text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: .45rem .95rem; font-size: .9rem; color: var(--ink); cursor: pointer;
}
.chip:hover { background: var(--hover); }
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .7rem; border-radius: 999px;
  font-size: .82rem; font-weight: 500;
  background: var(--brand-soft); color: var(--brand-dark);
}
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-amber { background: var(--amber-soft); color: #b9700f; }
.badge-grey { background: var(--hover); color: var(--ink-muted); }

.stack { display: grid; gap: 1rem; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.page { padding: 2rem 0 4rem; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.page-header h1 { font-size: 1.85rem; font-weight: 600; margin: 0; }
.page-header-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.documents-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.documents-toolbar .tabs {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
  border-bottom: 0;
}
.documents-search {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 0 1 280px;
  min-width: 200px;
  max-width: 320px;
  margin-bottom: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.15rem 0.25rem 0.15rem 0.55rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.documents-search:focus-within {
  border-color: var(--brand, #5B3CE0);
  box-shadow: 0 0 0 3px rgba(91, 60, 224, 0.12);
}
.documents-search.htmx-request {
  border-color: rgba(91, 60, 224, 0.45);
  box-shadow: 0 0 0 3px rgba(91, 60, 224, 0.1);
}
.documents-search.htmx-request .documents-search-btn {
  color: var(--brand, #5B3CE0);
  animation: documents-search-pulse 0.9s ease-in-out infinite;
}
@keyframes documents-search-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.94); }
}
.documents-search input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0.4rem 0.25rem;
  font: inherit;
  font-size: 0.9rem;
  background: transparent;
  color: var(--ink);
}
.documents-search input[type="search"]::-webkit-search-decoration,
.documents-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.documents-search-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.documents-search-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.documents-search-btn svg { width: 17px; height: 17px; }
.documents-results {
  transition: opacity 0.2s ease;
}
.documents-results.htmx-swapping {
  opacity: 0;
  transition: opacity 0.16s ease;
}
.documents-results.htmx-settling {
  opacity: 0;
}
.documents-results.htmx-added {
  opacity: 1;
  transition: opacity 0.22s ease;
}
.documents-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.85rem 0.25rem 0.15rem;
  border-top: 1px solid var(--line);
  margin-top: 0.15rem;
}
.documents-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.55rem;
  border-radius: 6px;
  font-size: 0.86rem;
  color: var(--ink-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.documents-page-link:hover:not(.is-disabled):not(.is-current) {
  background: var(--hover);
  color: var(--ink);
}
.documents-page-link.is-current {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}
.documents-page-link.is-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
.documents-page-ellipsis {
  color: var(--ink-muted);
  padding: 0 0.2rem;
  font-size: 0.86rem;
}
@media (max-width: 720px) {
  .documents-search {
    flex-basis: 100%;
    max-width: none;
    order: 2;
  }
  .documents-pagination { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .documents-results,
  .documents-results.htmx-swapping,
  .documents-results.htmx-added,
  .documents-search.htmx-request .documents-search-btn {
    transition: none !important;
    animation: none !important;
  }
}
.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;
}

/* ===================== Tabs ===================== */
.tabs { display: flex; align-items: center; gap: .4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; flex-wrap: wrap; }
.tabs a {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .7rem 1rem; font-size: .95rem; color: var(--ink-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.tabs svg { width: 16px; height: 16px; }

/* ===================== Data table ===================== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 16px 20px; font-size: 12px; font-weight: 600;
  color: var(--ink-muted); border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--bg-soft); text-transform: uppercase; letter-spacing: .5px;
}
.data-table td { padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.data-table tbody tr:hover { background: var(--hover); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .cell-name { display: flex; align-items: center; gap: .6rem; font-weight: 500; color: var(--ink); }
.data-table .cell-name svg { width: 16px; height: 16px; color: var(--ink-muted); flex-shrink: 0; }
.data-table .cell-idr { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table .cell-time { min-width: 11rem; white-space: nowrap; }
.data-table .cell-activity { min-width: 16.5rem; }
.data-table .cell-activity small { white-space: nowrap; }
.data-table .cell-status { min-width: 12.5rem; white-space: nowrap; }
.data-table .is-loss { color: var(--danger); font-weight: 600; }
.data-table tr.is-revoked td { opacity: 0.62; }
.admin-inline-form { display: inline; margin: 0; }
.admin-chip-btn,
.admin-revoke-btn,
.admin-restore-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  background: #fff;
  color: var(--ink-muted);
  cursor: pointer;
}
.admin-chip-btn.is-on { background: var(--brand-soft); color: var(--brand-dark); border-color: transparent; }
.admin-revoke-btn { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.admin-restore-btn { color: var(--brand-dark); border-color: var(--brand-soft); background: var(--brand-soft); }
.table-card { border: 1px solid var(--line); border-radius: 8px; overflow: auto; background: #fff; }
.ats-checker-page .table-card {
  transition: box-shadow .2s ease, border-color .2s ease;
}
.ats-checker-page .table-card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}
.ats-score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.4rem;
  padding: .22rem .7rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.ats-score-chip.is-low {
  background: var(--danger-soft);
  color: #b42318;
}
.ats-score-chip.is-mid {
  background: var(--amber-soft);
  color: #b9700f;
}
.ats-score-chip.is-high {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 6px; border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--ink-muted); cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn-download { color: var(--brand); }
.icon-btn-download:hover { color: var(--brand-dark); background: var(--brand-soft); }
.completion-badge {
  display: inline-flex; align-items: center; padding: .2rem .55rem;
  border-radius: 6px; background: var(--hover); color: var(--ink-muted);
  font-size: 12px; font-weight: 600;
}

/* ===================== Forms ===================== */
.form-grid { display: grid; gap: .9rem; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 500; color: var(--ink-muted); }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: .72rem .9rem; font: inherit; font-size: .95rem;
  background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
textarea { min-height: 110px; resize: vertical; }
.messages { list-style: none; padding: 0; margin: 1rem 0 0; }
.messages li {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  padding: .75rem 1rem; border-radius: 10px; margin-bottom: .5rem;
  background: var(--brand-soft); color: var(--brand-dark); font-size: .92rem;
}
.messages li.error { background: var(--danger-soft); color: var(--danger); }
.message-close {
  flex-shrink: 0; display: grid; place-items: center;
  width: 28px; height: 28px; margin: -.2rem -.35rem -.2rem 0;
  border: 0; border-radius: 8px; background: transparent; color: inherit;
  cursor: pointer; opacity: .7;
}
.message-close:hover { opacity: 1; background: rgba(0, 0, 0, .06); }

/* ===================== Modal step pages ===================== */
.modal-backdrop { background: rgba(31, 33, 36, .55); min-height: 100vh; padding: 3rem 1.5rem; }
.modal-card {
  background: #fff; border-radius: 18px; max-width: 860px; margin: 0 auto;
  padding: 2.25rem 2.5rem 2rem; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.2);
}
.modal-close {
  position: absolute; top: 1.5rem; right: 1.75rem; width: 34px; height: 34px;
  border: 0; background: transparent; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
}
.modal-close svg { width: 22px; height: 22px; }
.modal-step { color: var(--ink-muted); font-size: .97rem; margin: 0 0 .35rem; }
.modal-card h1 { font-size: 1.85rem; font-weight: 600; margin: 0 0 1.5rem; }
.modal-divider { height: 1px; background: var(--line); margin: 1.5rem 0; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.back-link { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.05rem; font-weight: 500; color: var(--ink); }
.back-link svg { width: 20px; height: 20px; }

/* ===================== Hero search (Find jobs) ===================== */
.search-hero { text-align: center; padding: 3.5rem 0 1rem; }
.search-hero h1 { font-size: 2.5rem; font-weight: 600; margin: 0 0 .6rem; }
.search-hero .lede { color: var(--purple); font-size: 1.05rem; margin: 0 auto 2rem; max-width: 40rem; }
.search-box {
  display: flex; align-items: center; gap: .6rem; max-width: 780px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem .45rem .45rem 1.5rem; box-shadow: var(--shadow);
}
.search-box input { border: 0; padding: .7rem 0; font-size: 1rem; }
.search-box input:focus { outline: none; }
.search-box .search-divider { width: 1px; height: 30px; background: var(--line); flex-shrink: 0; }
.search-submit {
  width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff;
  border: 0; display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.search-submit:hover { background: var(--brand-dark); }
.search-submit svg { width: 21px; height: 21px; }
.try-row { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; margin: 1.5rem 0 0; }
.try-label { font-size: .82rem; font-weight: 600; letter-spacing: .08em; color: var(--ink-faint); }

/* ===================== Job cards ===================== */
.job-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: #fff; }
.job-card:hover { border-color: #d3d7db; box-shadow: var(--shadow-sm); }
.job-card h3 { margin: 0 0 .2rem; font-size: 1.12rem; font-weight: 600; }
.job-logo {
  width: 56px; height: 56px; border-radius: 12px; background: #1e293b; color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 1.15rem; flex-shrink: 0;
  overflow: hidden;
}
.job-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.match-score { font-size: 1.35rem; font-weight: 600; color: var(--brand-dark); }
.reasons { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.reasons span { background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: .25rem .7rem; font-size: .84rem; }
.progress { height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); }
.stat { font-size: 1.9rem; font-weight: 600; }

/* ===================== Auth ===================== */
.auth-card {
  max-width: 440px; margin: 4rem auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 2.25rem; box-shadow: var(--shadow-sm);
}
.auth-card h1 { font-size: 1.6rem; margin: 0 0 .4rem; }
.social-stack { display: grid; gap: .75rem; margin-top: 1.5rem; }
.btn-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  min-height: 48px;
  padding: .75rem 1rem;
  background: #fff;
  color: #3d3d3d;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn-sso:hover:not(:disabled) {
  background: var(--bg-soft);
  border-color: #d0d0d0;
}
.btn-sso:disabled { opacity: .65; cursor: wait; }
.btn-sso-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.btn-sso-icon svg { display: block; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin: 1.35rem 0 1.15rem;
  color: var(--ink-faint);
  font-size: .85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-divider span { white-space: nowrap; }
.firebase-auth-error { color: #b42318; margin: 0; font-size: .9rem; }
.btn-auth-submit {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  font-weight: 600;
}
.auth-card .form-grid input[type="email"],
.auth-card .form-grid input[type="password"] {
  border-radius: 10px;
}

/* ===================== Profile edit ===================== */
.page.profile-page { padding: 1.25rem 0 3rem; }
.profile-card {
  max-width: 1120px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
}
.profile-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 2rem;
  align-items: start;
}
.profile-sidebar {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}
.profile-sidebar .form-grid { width: 100%; text-align: left; }
.profile-avatar {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--hover);
  flex-shrink: 0;
}
.profile-avatar img,
.profile-avatar-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.profile-avatar img {
  object-fit: cover;
  display: block;
}
.profile-avatar img[hidden],
.profile-avatar-placeholder[hidden] {
  display: none;
}
.profile-avatar-placeholder {
  background: url("../img/avatar-default.svg") center / cover no-repeat var(--brand-soft);
}
.profile-avatar-placeholder svg,
.profile-avatar-placeholder .profile-initials { display: none; }
.profile-main h1 { font-size: 1.6rem; margin: 0 0 1.25rem; }
.profile-bio-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .35rem .75rem;
  margin-top: .35rem;
  font-size: .82rem;
  font-weight: 400;
  color: var(--ink-faint);
}
.profile-bio-meta .profile-bio-over { color: var(--danger); }
.profile-photo-label {
  display: block;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: .35rem;
}
.profile-photo-dropzone {
  position: relative;
  display: grid;
  gap: .3rem;
  place-items: center;
  text-align: center;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 1.1rem .85rem;
  background: linear-gradient(180deg, #f7fbfa 0%, #fff 70%);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
  font-weight: 400;
}
.profile-photo-dropzone:hover,
.profile-photo-dropzone.is-drag {
  border-color: var(--brand);
  background: #f3fbf8;
}
.profile-photo-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.profile-photo-title { font-weight: 600; color: var(--ink); font-size: .9rem; }
.profile-photo-hint { font-size: .82rem; color: var(--ink-faint); margin: 0; font-weight: 400; }
.profile-photo-error { color: var(--danger); font-size: .85rem; margin: .35rem 0 0; min-height: 1.2em; }
.profile-sidebar .btn { width: 100%; justify-content: center; }
.profile-sidebar textarea { min-height: 160px; }

@media (max-width: 800px) {
  .profile-card { padding: 1.35rem 1.15rem; }
  .profile-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .profile-sidebar { justify-items: center; }
  .profile-main h1 { margin-bottom: 1rem; }
}

/* ===================== Account settings shell ===================== */
.page.settings-page { padding: 1.25rem 0 3rem; }
.settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
  max-width: 1360px;
  margin: 0 auto;
  align-items: start;
}
.settings-nav-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 0.45rem 0.4rem;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0.95rem;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background var(--ease), color var(--ease);
}
.settings-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--ink-faint);
  stroke: currentColor;
}
.settings-nav-item.is-active svg {
  color: var(--purple);
  stroke: currentColor;
}
.settings-nav-item:hover { background: var(--hover); }
.settings-nav-item.is-active {
  background: var(--brand-soft);
  font-weight: 600;
}
.settings-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.settings-nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--purple-soft, #f3eefc);
  color: var(--purple);
  font-size: 0.75rem;
  font-weight: 700;
  font-style: normal;
}
.settings-nav-section {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}
.settings-nav-heading {
  margin: 0 0 0.2rem;
  padding: 0.35rem 0.95rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.settings-nav-item.settings-nav-sub {
  padding-left: 1.15rem;
  font-size: 0.9rem;
}
.settings-content { min-width: 0; }
.settings-page .profile-card {
  max-width: none;
  margin: 0;
  box-shadow: var(--shadow-md);
}

.token-page-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-md);
}
.token-balance-head {
  margin-bottom: 1.75rem;
  padding: 1.1rem 1.2rem 1rem;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(237, 229, 247, 0.55) 0%, #fff 72%);
}
.token-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.token-balance {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.token-balance span { color: var(--purple); margin-right: 0.35rem; }
.token-section { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft); }
.token-section h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
.token-section h3 { font-size: 0.92rem; margin: 0 0 0.5rem; color: var(--ink-muted); }
.token-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.token-list { margin: 0; padding-left: 1.15rem; color: var(--ink); }
.token-list li { margin: 0.3rem 0; }
.token-pack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.token-pack {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.1rem 1.1rem;
  display: grid;
  gap: 0.35rem;
  transition: transform var(--ease), box-shadow var(--ease);
}
.token-pack:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.token-pack.popular {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46, 199, 166, 0.16);
}
.token-pack.popular:hover {
  box-shadow: 0 0 0 3px rgba(46, 199, 166, 0.16), var(--shadow-md);
}
.token-pack .badge { position: absolute; top: -10px; left: 1rem; }
.token-pack-name { font-weight: 600; }
.token-pack-price { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.token-pack-unit { color: var(--ink-muted); font-size: 0.88rem; margin-bottom: 0.6rem; }
.token-pack .btn { width: 100%; justify-content: center; margin-top: 0.35rem; }
.token-pack .btn:disabled { opacity: 0.65; cursor: not-allowed; }
.token-buy { margin-top: 1.15rem; }
.token-buy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: 1.35rem;
  align-items: start;
}
.token-buy-main,
.token-pay-pending {
  display: grid;
  gap: 1.1rem;
}
.token-slider-card,
.token-pay-options,
.token-cost-card,
.token-pay-visual,
.token-pay-result {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.3rem 1.35rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.token-slider-head,
.token-slider-ends,
.token-cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.token-slider-head label,
.token-pay-options legend,
.token-phone,
.token-cost-card h3 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.token-qty-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}
.token-qty-value strong {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--purple);
  transition: transform var(--ease), color var(--ease);
  display: inline-block;
}
.token-qty-value strong.is-bumped { transform: scale(1.12); }
.token-qty-value small { color: var(--ink-muted); font-size: 0.85rem; }
.token-slider-card input[type="range"] {
  margin: 1rem 0 0.5rem;
  height: 8px;
  background: linear-gradient(
    to right,
    var(--purple) 0%,
    var(--purple) var(--fill, 0%),
    var(--line) var(--fill, 0%),
    var(--line) 100%
  );
  transition: background 0.08s linear;
}
.token-slider-card input[type="range"]::-webkit-slider-thumb {
  background: #fff;
  border: 3px solid var(--purple);
  box-shadow: 0 2px 10px rgba(91, 60, 224, 0.35);
  transition: transform var(--ease), box-shadow var(--ease);
}
.token-slider-card input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }
.token-slider-card input[type="range"]::-moz-range-thumb {
  background: #fff;
  border: 3px solid var(--purple);
  box-shadow: 0 2px 10px rgba(91, 60, 224, 0.35);
  transition: transform var(--ease), box-shadow var(--ease);
}
.token-slider-ends { font-size: 0.78rem; color: var(--ink-faint); }
.token-pay-options { display: grid; gap: 0.85rem; }
.token-pay-group {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.token-pay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.token-pay-card {
  position: relative;
  display: block;
  cursor: pointer;
}
.token-pay-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.token-pay-card-body {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  text-align: center;
  padding: 1rem 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease), transform var(--ease);
}
.token-pay-card:hover .token-pay-card-body {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.token-pay-card input:checked + .token-pay-card-body {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(31, 184, 145, 0.18);
}
.token-pay-card input:focus-visible + .token-pay-card-body {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.token-pay-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
}
.token-pay-logo img {
  max-height: 30px;
  max-width: 84px;
  object-fit: contain;
  display: block;
}
.token-pay-card strong { font-size: 0.92rem; color: var(--ink); }
.token-pay-card small { color: var(--ink-muted); font-size: 0.78rem; }
.token-pay-check {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--ease), transform var(--ease);
  pointer-events: none;
}
.token-pay-check svg { width: 12px; height: 12px; }
.token-pay-card input:checked ~ .token-pay-check {
  opacity: 1;
  transform: scale(1);
}
.token-va-box {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}
.token-va-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.token-va-box code {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  word-break: break-all;
  text-align: center;
}
.token-phone { display: grid; gap: 0.45rem; }
.token-phone input {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.token-phone input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(91, 60, 224, 0.12);
}
.token-phone small { font-weight: 400; text-transform: none; letter-spacing: 0; }
.token-cost-card {
  display: grid;
  gap: 0.9rem;
  position: sticky;
  top: 84px;
}
.token-cost-rows { display: grid; gap: 0.65rem; }
.token-cost-row { font-size: 0.92rem; align-items: baseline; }
.token-cost-row > span { color: var(--ink-muted); }
.token-cost-row em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.token-cost-row strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: color var(--ease);
}
.token-cost-total {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-soft);
  font-size: 1rem;
}
.token-cost-total > span { color: var(--ink); font-weight: 600; }
.token-cost-total strong {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.token-cost-card .btn {
  width: 100%;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  font-size: 0.98rem;
  border-radius: 12px;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.token-cost-card .btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31, 184, 145, 0.35);
}
.token-cost-card .btn:disabled { opacity: 0.65; cursor: not-allowed; }
.token-pay-submit span { font-variant-numeric: tabular-nums; }
.token-cost-note {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.token-cost-note a {
  color: #00AEEF;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.token-cost-note a:hover { color: #008FC4; }
.token-pay-pending {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
}
.token-qr {
  width: 240px;
  height: 240px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.token-pay-visual { display: grid; gap: 0.85rem; justify-items: start; }
.token-pay-channel-logo { max-height: 34px; max-width: 130px; object-fit: contain; }
.token-pay-result { display: grid; gap: 0.7rem; align-content: start; }
.token-pay-result.is-success { border-color: var(--brand); background: var(--brand-soft); }
.token-pay-result.is-expired { border-color: var(--amber); background: var(--amber-soft); }
.token-activity-link {
  display: grid;
  gap: 0.15rem;
  color: inherit;
  font-weight: 600;
}
.token-activity-link:hover { color: var(--purple); }
.token-activity-link small { font-weight: 400; }
@media (prefers-reduced-motion: reduce) {
  .token-pay-card-body,
  .token-pay-check,
  .token-qty-value strong,
  .token-cost-card .btn { transition: none !important; }
  .token-pay-card:hover .token-pay-card-body { transform: none; }
}
.token-ledger table { width: 100%; border-collapse: collapse; }
.token-plus { color: var(--brand-dark); font-weight: 600; }
.token-minus { color: var(--ink); font-weight: 600; }
.token-history-head { position: relative; }
.token-history-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.token-history-compact {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.95rem;
  color: var(--ink-muted);
  transition: max-width 0.22s ease, opacity 0.18s ease;
}
.token-history-compact strong {
  font-size: 1.15rem;
  color: var(--purple);
}
.token-history-compact-sep { color: var(--ink-faint); }
.token-history-chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--ink-faint);
  transition: transform 0.22s ease, color var(--ease);
}
.token-history-toggle:hover .token-history-chevron { color: var(--ink); }
.token-history-head.is-collapsed .token-history-chevron { transform: rotate(-90deg); }
.token-history-head.is-collapsed .token-history-compact {
  max-width: 18rem;
  opacity: 1;
}
.token-history-head-body {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: 0.55rem;
  transition: grid-template-rows 0.24s ease, margin 0.24s ease, opacity 0.2s ease;
}
.token-history-head-inner { overflow: hidden; }
.token-history-head.is-collapsed .token-history-head-body {
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
}
.token-history-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.token-history-stat {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: #fff;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.token-history-stat:hover {
  border-color: var(--purple-edge);
  box-shadow: var(--shadow-sm);
}
.token-history-stat span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.token-history-stat strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.token-history-section { padding-top: 1.35rem; }
.token-history-toolbar {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.token-history-toolbar h2 { margin: 0; }
.token-history-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: stretch;
  gap: 0.65rem;
}
.token-history-search,
.token-history-range,
.token-history-export {
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease), transform var(--ease);
}
.token-history-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.9rem;
}
.token-history-search svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink-faint);
  transition: color var(--ease);
}
.token-history-search:focus-within,
.token-history-range:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(91, 60, 224, 0.12);
}
.token-history-search:focus-within svg { color: var(--purple); }
.token-history-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0.7rem 0;
  font: inherit;
  font-size: 0.92rem;
  background: transparent;
  color: var(--ink);
}
.token-history-search input:focus { outline: none; }
.token-history-search input::placeholder { color: var(--ink-faint); }
.token-history-range {
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.token-history-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.35rem 0.85rem 0.4rem;
}
.token-history-date span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.token-history-date input {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 8.4rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
}
.token-history-date input:focus { outline: none; }
.token-history-range-sep {
  width: 1px;
  margin: 0.55rem 0;
  background: var(--line);
}
.token-history-date input::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
}
.token-history-filters .token-history-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 1.05rem;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
}
.token-history-filters .token-history-export svg {
  width: 16px;
  height: 16px;
  color: var(--purple);
}
.token-history-filters .token-history-export:hover {
  border-color: var(--purple-edge);
  background: var(--purple-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.token-history-error {
  margin: -0.25rem 0 0.85rem;
  color: var(--danger);
  font-size: 0.88rem;
}
.token-history-section .table-card {
  border-radius: 8px;
}
.token-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  background: var(--hover);
  color: var(--ink-muted);
  transition: transform var(--ease), box-shadow var(--ease);
}
.token-status.is-paid,
.token-status.is-settled { background: var(--brand-soft); color: var(--brand-dark); }
.token-status.is-pending { background: #FFF4D6; color: #9A6B00; }
.token-status.is-expired,
.token-status.is-failed { background: var(--danger-soft); color: var(--danger); }
.token-status[href]:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.data-table td small { display: block; margin-top: 0.15rem; font-size: 0.78rem; }
@media (max-width: 900px) {
  .token-history-filters { grid-template-columns: 1fr 1fr; }
  .token-history-search { grid-column: 1 / -1; }
  .token-history-export { justify-self: stretch; }
}
@media (max-width: 800px) {
  .token-history-stats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .token-history-filters { grid-template-columns: 1fr; }
  .token-history-date input { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .token-history-head-body,
  .token-history-compact,
  .token-history-chevron,
  .token-history-search,
  .token-history-range,
  .token-history-export,
  .token-status { transition: none !important; }
}
.token-insufficient {
  padding: 0.75rem 1rem;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 10px;
  font-size: 0.9rem;
}
.token-insufficient a { color: var(--purple); font-weight: 600; text-decoration: underline; }

.admin-page-card h1 { margin: 0; font-size: 1.35rem; font-weight: 700; flex: 0 0 auto; }
.admin-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}
.admin-search {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  min-width: 0;
  margin-left: auto;
}
.admin-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.45rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: #fff;
  cursor: pointer;
  user-select: none;
  flex: 0 0 auto;
  white-space: nowrap;
}
.admin-filter-chip:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.admin-filter-chip input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--brand);
}
.admin-search input[type="search"],
.admin-search input[type="email"],
.admin-search input[type="number"],
.admin-search input[type="text"],
.admin-search select {
  width: 16.5rem;
  max-width: 100%;
  height: 2.45rem;
  flex: 0 1 16.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
}
.admin-grant {
  margin: -0.35rem 0 1.15rem;
  padding: 0.75rem 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}
.admin-grant-label {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.admin-grant-label::-webkit-details-marker { display: none; }
.admin-grant-label::after {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-top: -4px;
}
.admin-grant[open] .admin-grant-label::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}
.admin-grant-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}
.admin-grant-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  background: #fff;
}
.admin-grant-form input[name="email"] { min-width: 14rem; }
.admin-grant-form input[name="amount"] { width: 6.5rem; }
.admin-grant-form input[name="note"] { min-width: 10rem; flex: 1; }
.admin-stat-group {
  margin: 1.4rem 0 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.admin-stat-group:first-of-type { margin-top: 0.25rem; }
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}
.admin-stat-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: #fff;
}
.admin-stat-card strong {
  display: block;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.admin-stat-card span {
  display: block;
  margin-top: 0.3rem;
  color: var(--ink-muted);
  font-size: 0.84rem;
}
.admin-stat-card.is-kpi strong { font-size: 1.25rem; }
.admin-stat-card.is-negative strong { color: var(--danger, #b42318); }
.admin-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding-top: 0.85rem;
}
.admin-pager-meta {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.86rem;
}
.admin-pager .documents-pagination {
  border-top: 0;
  margin: 0;
  padding: 0;
}
.table-card .admin-pager {
  padding: 0.85rem 1.25rem 1rem;
  border-top: 1px solid var(--line);
}
.admin-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 0.4rem 0 0.4rem;
}
.admin-chart-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem 0.85rem;
  background: #fff;
  min-width: 0;
}
.admin-chart-card.wide { grid-column: 1 / -1; }
.admin-chart-card h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.admin-chart-card canvas { width: 100%; max-height: 260px; }
.admin-chart-note {
  margin: 0.45rem 0 0;
  color: var(--ink-faint);
  font-size: 0.8rem;
}
.admin-footnote {
  margin: 1.25rem 0 0;
  color: var(--ink-faint);
  font-size: 0.8rem;
  line-height: 1.45;
}
@media (max-width: 900px) {
  .admin-chart-grid { grid-template-columns: 1fr; }
  .admin-chart-card.wide { grid-column: auto; }
}

@media (max-width: 800px) {
  .settings-shell { grid-template-columns: 1fr; gap: 1rem; }
  .token-split,
  .token-pack-grid,
  .token-buy-grid,
  .token-pay-pending { grid-template-columns: 1fr; }
  .token-page-card { padding: 1.35rem 1.15rem; }
  .token-cost-card { position: static; }
  .token-pay-grid { gap: 0.55rem; }
  .token-pay-card-body { padding: 0.8rem 0.5rem 0.75rem; }
  .admin-search {
    width: 100%;
    margin-left: 0;
  }
  .admin-search input[type="search"],
  .admin-search input[type="email"],
  .admin-search input[type="number"],
  .admin-search input[type="text"],
  .admin-search select {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 440px) {
  .token-pay-grid { grid-template-columns: 1fr; }
  .token-pay-card-body {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    justify-items: start;
    text-align: left;
    column-gap: 0.75rem;
    padding: 0.7rem 0.9rem;
  }
  .token-pay-card-body small { grid-column: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .settings-nav-item,
  .token-pack {
    transition: none !important;
  }
  .token-pack:hover,
  .token-pack.popular:hover {
    transform: none;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 0.85rem 0 0.9rem;
  color: var(--ink-faint);
  font-size: .8125rem;
  text-align: center;
  flex-shrink: 0;
  margin-top: auto;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.site-footer p { margin: 0; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  line-height: 1.3;
}
.footer-legal a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
}
.footer-legal-sep {
  margin: 0 0.65rem;
  color: var(--line);
  font-weight: 400;
  pointer-events: none;
  user-select: none;
}
.footer-legal a:hover,
.footer-legal a[aria-current="page"] {
  color: var(--purple);
}

@media (max-width: 900px) {
  .container { width: calc(100% - 2rem); }
  .form-row { grid-template-columns: 1fr; }
  .app-menu { gap: 1.2rem; }
  .app-logo .logo-word { display: none; }
  .search-hero h1 { font-size: 1.9rem; }
  .modal-card { padding: 1.75rem 1.25rem; }
}

/* ===================== Resume Editor (matches spec reference) ===================== */

.editor-body {
  --ed-line: #e6e8eb;
  --ed-line-soft: #f0f1f3;
  --ed-text: #1f2124;
  --ed-muted: #6b7178;
  --ed-teal: #2ec7a6;
  --ed-cyan: #29abe2;
  --ed-hover: #f4f6f7;
  margin: 0;
  background: #ffffff;
  color: var(--ed-text);
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.editor-body a { color: inherit; text-decoration: none; }
.editor-body h1, .editor-body h2, .editor-body h3, .editor-body h4 { font-family: inherit; }

.editor-messages { list-style: none; margin: 0; padding: 0.5rem 1.25rem; }
.editor-messages li {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  font-size: 0.86rem; color: var(--ed-muted);
}
.editor-messages li.error { color: #b42318; }

/* Builder shell: lock to viewport; scroll only inside panels/canvas */
body.editor-body:has(.editor-layout) {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ---------- Top bar ---------- */
.editor-topbar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: 60px;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--ed-line);
  background: #fff;
}
.ck-logo { display: inline-flex; align-items: center; color: var(--ed-teal); flex-shrink: 0; }
.ck-logo .logo-owl { width: 32px; height: 32px; display: block; }
.editor-home {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-weight: 600; font-size: 1.02rem; color: var(--ed-text);
  padding: 0.3rem 0.2rem; border-radius: 8px;
}
.editor-home .caret { width: 15px; height: 15px; stroke-width: 2.4; }
.topbar-divider { width: 1px; height: 28px; background: var(--ed-line); }
.editor-doc-group { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }
.doc-file-icon {
  width: 26px; height: 26px; border-radius: 6px; background: #e8f7f2;
  display: grid; place-items: center; flex-shrink: 0;
}
.doc-file-icon svg { width: 15px; height: 15px; color: #1aa683; }
.doc-title-form { display: inline-flex; min-width: 0; }
.doc-title-input {
  border: 1px solid transparent; background: transparent; font: inherit;
  font-weight: 500; color: var(--ed-text); padding: 0.25rem 0.4rem;
  border-radius: 7px; width: 260px; max-width: 40vw;
}
.doc-title-input:hover { background: var(--ed-hover); }
.doc-title-input:focus { border-color: var(--ed-line); background: #fff; outline: none; }
.doc-status { color: #9aa1a8; font-size: 0.92rem; white-space: nowrap; }
.editor-user-group { display: inline-flex; align-items: center; gap: 0.35rem; flex-shrink: 0; }
.editor-user-group .token-chip { padding: 0.22rem 0.55rem; font-size: 0.78rem; }
.editor-user {
  width: 40px; height: 40px; border-radius: 50%; background: #8b9199;
  color: #fff; display: grid; place-items: center; border: 0;
}
.editor-user svg { width: 24px; height: 24px; }
.editor-user-group .caret { width: 18px; height: 18px; color: var(--ed-text); stroke-width: 2.4; }

/* ---------- Action bar ---------- */
.editor-actionbar {
  display: flex; align-items: center; gap: 0.1rem;
  height: 48px; padding: 0 1.1rem;
  border-bottom: 1px solid var(--ed-line);
  background: #fff; overflow-x: auto;
  font-family: "EditorUI", "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 0.84rem;
}
.action-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: transparent; border: 0; color: var(--ed-text);
  font-family: inherit; font-size: 0.84rem; font-weight: 400;
  cursor: pointer; padding: 0.4rem 0.6rem; border-radius: 8px; white-space: nowrap;
}
.action-btn svg { width: 18px; height: 18px; stroke-width: 1.7; flex-shrink: 0; }
.action-btn:hover { background: var(--ed-hover); }
.action-btn.active { background: var(--ed-hover); font-weight: 500; }
.action-btn.icon-only { padding: 0.45rem; color: #b7bcc2; }
.action-btn.icon-only.is-disabled,
.action-btn.is-disabled,
.action-btn:disabled {
  opacity: 0.45; cursor: not-allowed; pointer-events: none;
}
.action-btn.is-busy {
  opacity: 0.7; cursor: wait; pointer-events: none;
}
.action-sep { width: 1px; height: 26px; background: var(--ed-line); margin: 0 0.55rem; flex-shrink: 0; }
.actionbar-spacer { flex: 1; min-width: 0.5rem; }
.ats-badge {
  width: 21px; height: 21px; border-radius: 50%; border: 1.7px solid var(--ed-text);
  display: grid; place-items: center; font-size: 8.5px; font-weight: 600; letter-spacing: -0.02em;
}
.ats-score-badge {
  min-width: 34px; height: 22px; padding: 0 0.4rem; border-radius: 999px;
  display: inline-grid; place-items: center; font-size: 0.72rem; font-weight: 700;
  background: #fdefdc; color: #8a4b00; border: 1px solid #f3d2a3;
}
.ats-score-badge.ats-band-strong { background: #e8f7f2; color: #16624c; border-color: #b7e9d8; }
.ats-score-badge.ats-band-poor { background: #fdecea; color: #b42318; border-color: #f6c6c0; }
.ats-score-badge.ats-band-partial {
  background: #F5A623; color: #fff; border-color: #F5A623;
  border-radius: 6px; height: 22px; padding: 0 0.45rem; font-weight: 700;
}

/* ---------- 3 column layout ---------- */
.editor-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr) 88px;
  height: calc(100vh - 108px);
  height: calc(100dvh - 108px);
  min-height: 0;
  overflow: hidden;
  background: #fff;
}
/* Pin columns so a hidden left panel never shifts canvas into the 0-width track. */
.editor-layout > .editor-left-panel { grid-column: 1; }
.editor-layout > .editor-canvas-wrap { grid-column: 2; min-width: 0; }
.editor-layout > .editor-right-rail { grid-column: 3; }
.editor-layout.panel-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) 88px;
}
/* Keep the left panel as a grid item (visibility only). display:none would
   remove it from the grid and auto-place the canvas into the 0px first track. */
.editor-layout.panel-collapsed .editor-left-panel {
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  width: 0;
  max-width: 0;
  min-width: 0;
  padding: 0;
  border: 0;
}
.editor-layout:not(.panel-collapsed) > .editor-left-panel {
  min-width: 380px;
}
.editor-left-panel {
  border-right: 1px solid var(--ed-line);
  padding: 1rem 1rem 1.4rem;
  width: 380px;
  max-width: 380px;
  overflow: hidden;
  min-width: 0;
}
.side-panel { display: none; width: 100%; height: 100%; }
.side-panel.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* ---------- AI assistant panel ---------- */
.ai-chat {
  display: flex; flex-direction: column; width: 100%; max-width: 380px;
  font-size: 0.84rem; height: 100%; min-height: 0; padding: 0.15rem 0.1rem;
}
.ai-chat-illustration {
  display: flex; justify-content: center; align-items: center;
  padding: 0.55rem 0.5rem 0.85rem; flex-shrink: 0;
}
.ai-owl {
  position: relative;
  width: 132px; height: 132px;
  display: grid; place-items: center;
  animation: ai-owl-float 4.2s ease-in-out infinite;
}
.ai-owl-glow {
  position: absolute; inset: 12% 10% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 199, 166, 0.28) 0%, rgba(91, 60, 224, 0.12) 45%, transparent 72%);
  filter: blur(2px);
  animation: ai-owl-glow 3.6s ease-in-out infinite;
  pointer-events: none;
}
.ai-owl-img {
  position: relative; z-index: 1;
  width: 108px; height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(31, 33, 36, 0.14));
  animation: ai-owl-tilt 5.5s ease-in-out infinite;
  transform-origin: 50% 70%;
}
.ai-owl-spark {
  position: absolute; z-index: 2;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2ec7a6;
  box-shadow: 0 0 0 2px rgba(46, 199, 166, 0.18);
  animation: ai-owl-spark 2.8s ease-in-out infinite;
  pointer-events: none;
}
.ai-owl-spark-a { top: 14%; right: 16%; background: #5B3CE0; box-shadow: 0 0 0 2px rgba(91, 60, 224, 0.18); }
.ai-owl-spark-b { bottom: 22%; left: 12%; animation-delay: 1.1s; width: 6px; height: 6px; }

@keyframes ai-owl-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes ai-owl-tilt {
  0%, 100% { transform: rotate(-2.5deg) scale(1); }
  40% { transform: rotate(2.5deg) scale(1.03); }
  70% { transform: rotate(-1deg) scale(1.01); }
}
@keyframes ai-owl-glow {
  0%, 100% { opacity: 0.7; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes ai-owl-spark {
  0%, 100% { opacity: 0.15; transform: scale(0.6) translateY(0); }
  45% { opacity: 1; transform: scale(1) translateY(-3px); }
  70% { opacity: 0.4; transform: scale(0.85) translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  .ai-owl, .ai-owl-img, .ai-owl-glow, .ai-owl-spark { animation: none !important; }
}
.ai-chat-greeting { padding: 0 0.35rem; flex-shrink: 0; }
.ai-chat-greeting p { margin: 0 0 0.55rem; font-size: 0.84rem; color: var(--ed-text); }
.ai-chat-greeting h4 { margin: 0 0 0.85rem; font-size: 0.88rem; font-weight: 500; color: var(--ed-text); line-height: 1.35; }
.ai-chat-chips { display: grid; gap: 0.45rem; padding: 0 0.35rem; flex-shrink: 0; }
.ai-chat.has-conversation .ai-chat-chips { display: none; }
.ai-chat.has-conversation .ai-chat-illustration,
.ai-chat.has-conversation .ai-chat-greeting { display: none; }
.ai-chip-btn {
  display: flex; align-items: flex-start; gap: 0.4rem; width: 100%; text-align: left;
  border: 1px solid var(--ed-line); background: #fff; border-radius: 8px;
  padding: 0.55rem 0.75rem; font: inherit; font-size: 0.78rem; line-height: 1.35;
  color: var(--ed-text); cursor: pointer;
}
.ai-chip-btn::before { content: "\21B3"; color: #9aa1a8; font-size: 0.78rem; margin-top: 0.05rem; }
.ai-chip-btn:hover { background: var(--ed-hover); border-color: #d9dde1; }

.ai-chat-log {
  display: flex; flex-direction: column; gap: 1.15rem;
  flex: 1; min-height: 0; overflow-y: auto;
  margin: 0.35rem 0 0.55rem; padding: 0.2rem 0.2rem 0.35rem;
}
.ai-chat-log:empty { display: none; }
.chat-turn { display: flex; flex-direction: column; gap: 0.85rem; }
.chat-msg.user {
  align-self: flex-end; max-width: 92%;
  display: flex; flex-direction: column; align-items: flex-end;
}
.chat-msg.assistant { align-self: stretch; }
.chat-bubble {
  border-radius: 16px; padding: 0.7rem 0.9rem; font-size: 0.82rem; line-height: 1.5;
  word-wrap: break-word; overflow-wrap: anywhere;
}
.chat-bubble.user {
  background: #e6edf3; color: #1f2124; font-weight: 400;
}
.chat-time {
  display: block; margin-top: 0.28rem; font-size: 0.68rem; color: #9aa1a8;
}
.chat-status {
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 0.4rem; color: #9aa1a8; font-size: 0.75rem;
}
.chat-status svg { width: 14px; height: 14px; flex-shrink: 0; }
.chat-bubble.assistant {
  background: transparent; border: 0; padding: 0; color: var(--ed-text);
}
.chat-bubble.assistant strong { font-weight: 700; color: #1f2124; }
.chat-bubble.assistant.chat-result-box {
  border: 1px solid var(--ed-line); border-radius: 12px; padding: 0.75rem 0.85rem;
  background: #fff;
}
.chat-bubble.error { background: #fdecea; color: #b42318; border: 1px solid #f6c6c0; }
.chat-bubble.error a { color: inherit; font-weight: 600; text-decoration: underline; margin-left: 0.35em; }
.ai-next { margin-top: 1rem; }
.ai-next-title {
  margin: 0 0 0.55rem; font-size: 0.92rem; font-weight: 600; color: #3a3f45;
}
.ai-next-list { display: grid; gap: 0.45rem; }
.ai-next-btn {
  display: flex; align-items: center; gap: 0.45rem; width: 100%; text-align: left;
  border: 1px solid var(--ed-line); background: #fff; border-radius: 10px;
  padding: 0.62rem 0.8rem; font: inherit; font-size: 0.8rem; line-height: 1.35;
  color: var(--ed-text); cursor: pointer;
}
.ai-next-btn::before { content: "\21B3"; color: #9aa1a8; font-size: 0.82rem; }
.ai-next-btn:hover { background: var(--ed-hover); border-color: #d9dde1; }
.ai-chat-toolbar {
  display: flex; justify-content: flex-end; padding: 0 0.15rem 0.45rem;
  flex-shrink: 0;
}
.ai-export-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--ed-line); background: #fff; color: var(--ed-text);
  border-radius: 8px; padding: 0.32rem 0.65rem; font: inherit; font-size: 0.74rem;
  cursor: pointer;
}
.ai-export-btn svg { width: 13px; height: 13px; }
.ai-export-btn:hover:not(:disabled) { background: var(--ed-hover); border-color: #d9dde1; }
.ai-export-btn:disabled { opacity: 0.45; cursor: default; }

.ai-chat-input,
#ai-chat-form {
  margin-top: auto; margin-bottom: 0.9rem;
  border: 1px solid var(--ed-line); border-radius: 18px;
  padding: 0.7rem 0.75rem 0.65rem; display: flex; gap: 0.55rem; align-items: flex-end;
  background: #fff; min-height: 0; flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(31, 33, 36, 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.ai-chat-input:focus-within {
  border-color: rgba(46, 199, 166, 0.55);
  box-shadow: 0 4px 18px rgba(31, 33, 36, 0.08), 0 0 0 3px rgba(46, 199, 166, 0.16);
}
.ai-chat-input textarea {
  flex: 1; border: 0; outline: none; resize: none; padding: 0.35rem 0.15rem; font: inherit;
  font-size: 0.8rem; line-height: 1.45; color: var(--ed-text); background: transparent;
  min-height: 44px; max-height: 132px; overflow-y: auto;
}
.ai-chat-input textarea::placeholder { color: #9aa1a8; }
.ai-chat-send {
  width: 34px; height: 34px; border-radius: 50%; background: #eceef0; color: #6b7178;
  border: 0; display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
  transition: background 0.16s ease, color 0.16s ease;
}
.ai-chat-send:disabled { cursor: default; opacity: 0.72; }
.ai-chat-send:not(:disabled):hover { background: #e0e3e6; }
.ai-chat-send.is-ready {
  background: var(--ed-teal); color: #fff; opacity: 1;
}
.ai-chat-send.is-ready:not(:disabled):hover { background: #26b396; color: #fff; }
.ai-chat-send svg { width: 15px; height: 15px; }

/* ---------- Template gallery panel ---------- */
.template-panel {
  display: flex; flex-direction: column; gap: 0.5rem;
  height: 100%; overflow-y: auto; padding: 0.25rem 0.1rem 1rem;
  width: 100%; max-width: 380px;
}
.template-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; width: 100%; max-width: 380px; }
.template-thumb { cursor: pointer; position: relative; }
.template-thumb .thumb-preview {
  aspect-ratio: 3/4; border-radius: 4px; border: 1px solid var(--ed-line);
  background: #fff; padding: 0.7rem; overflow: hidden;
}
.template-thumb:hover .thumb-preview { border-color: #c8ccd0; }
.template-thumb.selected .thumb-preview { border-color: var(--ed-teal); box-shadow: 0 0 0 2px rgba(46,199,166,.35); }
.template-thumb .thumb-name { text-align: center; font-size: 0.95rem; margin-top: 0.6rem; }
.template-thumb.selected .thumb-name { color: #1aa683; }
.template-thumb .thumb-check {
  position: absolute; right: 8px; bottom: 44px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ed-teal); color: #fff; display: none; place-items: center; font-size: 0.75rem;
}
.template-thumb.selected .thumb-check { display: grid; }
.template-gallery-footer { margin-top: 1.25rem; width: 100%; max-width: 380px; }
.template-continue-btn {
  display: block; width: 100%; margin-top: 1.1rem; padding: 0.85rem 1rem;
  border: 0; border-radius: 10px; background: var(--ed-teal); color: #fff;
  font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-align: center;
}
.template-continue-btn:hover { background: #1aa683; }
.doc-size-toggle { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.doc-size-toggle span { font-size: 0.9rem; }
.doc-size-switch { display: inline-flex; border: 1px solid var(--ed-line); border-radius: 10px; overflow: hidden; }
.size-btn {
  border: 0; background: #eceef0; color: var(--ed-muted); padding: 0.55rem 1.25rem;
  font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer;
}
.size-btn.active { background: #fff; color: var(--ed-text); }

/* ---------- Canvas ---------- */
.editor-canvas-wrap {
  padding: 1.5rem 15px 2rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #eceef1;
}
#resume-canvas {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  min-height: 12rem;
  min-width: 0;
}
.resume-sheet-2col {
  background: #fff; width: 100%; max-width: 100%;
  min-height: var(--rs-page-h, 297mm);
  border: 1px solid var(--ed-line); border-radius: 2px;
  font-size: var(--rs-fs, 13.5px);
  --rs-accent: var(--ed-cyan);
  --rs-font: inherit;
  --rs-pad: 2.4rem;
  --rs-gap: 1.25rem;
  --rs-lh: 1.45;
  --rs-page-w: 210mm;
  --rs-page-h: 297mm;
  font-family: var(--rs-font);
  line-height: var(--rs-lh);
  padding: var(--rs-pad);
  position: relative;
  box-sizing: border-box;
}
.resume-sheet-2col.paper-a4,
.resume-sheet-2col.letter-size.paper-a4 {
  width: var(--rs-page-w, 210mm);
  max-width: var(--rs-page-w, 210mm);
  box-sizing: border-box;
}
.resume-sheet-2col.paper-letter,
.resume-sheet-2col.letter-size {
  width: var(--rs-page-w, 8.5in);
  max-width: var(--rs-page-w, 8.5in);
  box-sizing: border-box;
}
.resume-canvas-paged {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0.25rem 0 1rem;
}
.resume-page-stack {
  position: relative;
  width: var(--rs-page-w, 210mm);
  margin: 0 auto;
  transform-origin: top center;
}
.resume-pages-host {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 0;
}
.resume-page-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.06),
    0 12px 32px rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}
.resume-page-slice {
  width: 100%;
  will-change: transform;
  background: #fff;
}
.resume-page-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 0;
  color: #8b9198;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  user-select: none;
  pointer-events: none;
  flex-shrink: 0;
}
.resume-page-separator-line {
  flex: 1;
  height: 0;
  border-top: 1px solid #c5cacf;
}
.resume-page-separator-label {
  flex: 0 0 auto;
  padding: 0 0.15rem;
  white-space: nowrap;
}
#resume-canvas .resume-sheet-2col {
  position: relative;
  z-index: 1;
  border: 0;
  box-shadow: none;
  width: var(--rs-page-w, 210mm);
  max-width: var(--rs-page-w, 210mm);
  min-height: var(--rs-page-h, 297mm);
  border-radius: 0;
  padding: var(--rs-pad);
}
#resume-canvas .resume-sheet-2col.resume-sheet-clone {
  pointer-events: auto;
  cursor: inherit;
  padding: var(--rs-pad);
}
#resume-canvas .resume-sheet-clone .section-drag-handle {
  display: none;
}
.rs-exp-item {
  break-inside: auto;
  page-break-inside: auto;
}
.rs-edu-item, .rs-skill-row {
  break-inside: avoid;
  page-break-inside: avoid;
}
.rs-section-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.rs-section-table thead {
  display: table-header-group;
}
.rs-section-table thead th,
.rs-section-table td {
  padding: 0;
  border: 0;
  text-align: left;
  font-weight: inherit;
  vertical-align: top;
}
.rs-section-table .rs-section-label {
  display: block;
}
.rs-section-label[data-rs-continued] {
  break-after: avoid;
  page-break-after: avoid;
  pointer-events: none;
}
.rs-section-label[data-rs-continued] + ul[data-rs-split-ul],
.rs-section-label[data-rs-continued] + ul.rs-bullets {
  margin-top: 0;
}
.rs-bullets > li {
  break-inside: avoid;
  page-break-inside: avoid;
}
.rs-exp-item .rs-exp-title,
.rs-exp-item .rs-line,
.rs-exp-item .rs-metablock {
  break-after: avoid;
  page-break-after: avoid;
}
.rs-section-label {
  break-after: avoid;
  page-break-after: avoid;
}
.resume-sheet-2col .rs-section { margin-bottom: var(--rs-gap); }
.resume-sheet-2col .rs-title,
.resume-sheet-2col .rs-exp-company { color: var(--rs-accent); }
.resume-sheet-2col.layout-1 .rs-body { grid-template-columns: 1fr 0.55fr; }
.resume-sheet-2col.layout-2 .rs-body { grid-template-columns: 1.32fr 1fr; }
.resume-sheet-2col.layout-3 .rs-body { grid-template-columns: 1fr 1fr; }
.resume-sheet-2col.layout-4 .rs-body { grid-template-columns: 1fr 1fr 1fr; }
.resume-sheet-2col.bg-1 { background: #fff; }
.resume-sheet-2col.bg-2 {
  background-color: #fff;
  background-image: radial-gradient(#d7dbdf 1px, transparent 1px);
  background-size: 14px 14px;
}
.resume-sheet-2col.bg-3 {
  background-color: #fff;
  background-image: repeating-linear-gradient(45deg, #f3f5f7 0, #f3f5f7 8px, #fff 8px, #fff 16px);
}
.resume-sheet-2col.bg-4 {
  background-color: #fafbfc;
  background-image: linear-gradient(135deg, #f0f4f7 25%, transparent 25%),
    linear-gradient(225deg, #f0f4f7 25%, transparent 25%);
  background-size: 28px 28px;
}
.rs-branding {
  display: none !important;
  position: absolute; bottom: 0.75rem; right: 1rem;
  font-size: 0.7rem; color: #9aa1a8; opacity: 0.85;
}
.rs-signature { margin-top: 1.5rem; max-width: 180px; }
.rs-signature img { max-height: 64px; width: auto; }

/* Resume type scale in px (16px root) so Web UI == PDF WeasyPrint output */
.rs-name { font-size: 29.6px; font-weight: 700; letter-spacing: -0.01em; margin: 0; text-transform: uppercase; line-height: 1.15; }
.rs-title { color: var(--rs-accent, var(--ed-cyan)); font-weight: 500; font-size: 16.8px; margin: 4px 0 10.4px; }
.rs-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--ed-text); font-size: 11.5px; line-height: 1.35; }
.rs-contact span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0; max-width: none; }
.rs-contact svg { width: 11px; height: 11px; color: #4b5157; flex-shrink: 0; }

.rs-body { display: grid; grid-template-columns: 1.32fr 1fr; gap: 28px; margin-top: 22.4px; min-width: 0; }
.rs-main, .rs-sidebar {
  min-width: 0;
  overflow-wrap: break-word;
  overflow: visible;
}
.rs-section.editable-section {
  overflow: visible;
}
.section-drag-handle {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  background: #eef1f4;
  color: #565c62;
  display: inline-grid;
  place-items: center;
  opacity: 0;
  cursor: grab;
  transform: translateY(2px);
  transition: opacity .16s ease, transform .16s ease, background .15s ease, color .15s ease;
  z-index: 3;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.section-drag-handle:active { cursor: grabbing; }
.editable-section:hover .section-drag-handle {
  opacity: 1;
  transform: translateY(0);
}
.editable-section:has(.edit-hint) .section-drag-handle {
  right: 2.45rem;
}
.editable-section:has(.edit-hint):has(.rs-section-remove) .section-drag-handle {
  right: 4.55rem;
}
.editable-section:has(.rs-section-remove):not(:has(.edit-hint)) .section-drag-handle {
  right: 2.45rem;
}
.editable-section.section-dragging {
  opacity: 0.55;
  outline: 2px dashed var(--brand, #29abe2);
}
.rs-main.column-drag-over,
.rs-sidebar.column-drag-over {
  outline: 2px dashed rgba(41, 171, 226, 0.55);
  outline-offset: 4px;
  border-radius: 6px;
}
.rs-section { margin-bottom: 1.25rem; }
.rs-section-label {
  text-transform: uppercase; letter-spacing: 0.04em; font-size: 12.48px; font-weight: 500;
  color: #565c62; border-bottom: 1px solid #b9bec3; padding-bottom: 4.8px; margin: 0 0 10.4px;
}
.rs-summary { margin: 0; font-size: 14.08px; line-height: 1.55; }
.rs-exp-item, .rs-edu-item { margin-bottom: 16px; min-width: 0; }
.rs-exp-item:last-child, .rs-edu-item:last-child { margin-bottom: 0; }
.rs-exp-title { font-weight: 600; font-size: 15.68px; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
.rs-exp-company { color: var(--rs-accent, var(--ed-cyan)); font-weight: 500; font-size: 14.4px; }
.rs-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 4px;
  min-width: 0;
  max-width: 100%;
}
.rs-exp-company {
  flex: 1 1 10rem;
  min-width: 0;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
}
.rs-edu-item .rs-exp-company,
.rs-sidebar .rs-exp-company {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.rs-meta {
  color: #3d4247;
  font-size: 12.8px;
  line-height: 1.35;
  display: inline-flex;
  align-items: center;
  column-gap: 4px;
  flex: 0 1 auto;
  white-space: nowrap;
  max-width: 100%;
}
.rs-meta svg {
  width: 12px; height: 12px; min-width: 12px; min-height: 12px;
  color: #4b5157; flex: 0 0 12px; display: block;
}
.rs-meta-text {
  display: inline-block;
  white-space: nowrap;
  font-size: inherit;
  line-height: inherit;
}
.rs-meta-desc {
  white-space: normal;
  width: auto;
  max-width: 100%;
  align-items: flex-start;
}
.rs-meta-desc .rs-meta-text { white-space: normal; }
.rs-metablock {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 4px; align-items: flex-start;
}
.rs-bullets { margin: 6.4px 0 0; padding-left: 16.8px; }
.rs-bullets li { font-size: 13.76px; line-height: 1.45; margin-bottom: 3.2px; }
.rs-skill-row { border-bottom: 1px solid #d7dbdf; padding: 6.4px 0; font-size: 13.76px; }
.rs-skill-row:first-of-type { padding-top: 2.4px; }
.rs-empty { color: #9aa1a8; font-size: 13.76px; margin: 0; }

.editable-section {
  cursor: pointer; border-radius: 8px; position: relative;
  padding: 0.5rem; margin: -0.5rem -0.5rem 1.4rem;
}
.editable-section .edit-hint {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: inline-grid;
  place-items: center;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .16s ease, transform .16s ease, background .15s ease, color .15s ease;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.editable-section .edit-hint svg { width: 14px; height: 14px; }
.editable-section:hover .edit-hint {
  opacity: 1;
  transform: translateY(0);
}
.editable-section:has(.rs-section-remove) .edit-hint {
  right: 2.45rem;
}
.editable-section:hover .edit-hint:hover {
  background: var(--brand);
  color: #fff;
}
.edit-hint[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  background: #1f2937;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 5;
}
.edit-hint[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateY(0);
}
.rs-section-remove {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  margin: 0;
  z-index: 3;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .16s ease, transform .16s ease;
}
.editable-section:hover .rs-section-remove,
.rs-section-remove:focus-within {
  opacity: 1;
  transform: translateY(0);
}
.rs-section-remove-btn {
  position: relative;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.rs-section-remove-btn svg { width: 14px; height: 14px; }
.rs-section-remove-btn:hover {
  background: var(--danger);
  color: #fff;
}
.rs-section-remove-btn:active { transform: scale(0.96); }
.rs-section-remove-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  background: #1f2937;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 5;
}
.rs-section-remove-btn[data-tooltip]:hover::after,
.rs-section-remove-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

/* Soft flash after AI Improve Text / Generate updates a section */
.rs-just-changed {
  position: relative;
  background: rgba(46, 199, 166, 0.12) !important;
  box-shadow: 0 0 0 2px rgba(46, 199, 166, 0.55) inset,
              0 8px 28px rgba(46, 199, 166, 0.18) !important;
  animation: rsChangeFlash 4.2s ease forwards;
  border-radius: 8px;
  z-index: 1;
}
.rs-ai-pulse {
  animation: rsAiPulse 1.1s ease-in-out 2;
}
.rs-summary.rs-ai-pulse,
.rs-just-changed .rs-summary {
  border-radius: 6px;
  background: rgba(46, 199, 166, 0.16);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0.15em 0.2em;
  margin: -0.15em -0.2em;
}
.rs-ai-improved-badge {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #2ec7a6, #1aa683);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(26, 166, 131, 0.35);
  pointer-events: none;
  animation: rsBadgeIn 0.35s ease, rsBadgeOut 0.4s ease 3.6s forwards;
}
@keyframes rsChangeFlash {
  0% {
    background: rgba(46, 199, 166, 0.28);
    box-shadow: 0 0 0 2.5px rgba(46, 199, 166, 0.75) inset,
                0 10px 32px rgba(46, 199, 166, 0.28);
  }
  45% {
    background: rgba(46, 199, 166, 0.12);
    box-shadow: 0 0 0 2px rgba(46, 199, 166, 0.45) inset,
                0 6px 18px rgba(46, 199, 166, 0.14);
  }
  100% {
    background: transparent;
    box-shadow: 0 0 0 0 transparent inset, 0 0 0 transparent;
  }
}
@keyframes rsAiPulse {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(0 0 10px rgba(46, 199, 166, 0.45)); }
}
@keyframes rsBadgeIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
@keyframes rsBadgeOut {
  to { opacity: 0; transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .rs-just-changed,
  .rs-ai-pulse,
  .rs-ai-improved-badge { animation: none; }
}

/* ---------- Right rail ---------- */
.editor-right-rail { padding: 1.5rem 0; display: flex; justify-content: center; align-items: flex-start; margin-left: 0; }
.rail-card {
  display: flex; flex-direction: column; gap: 0.3rem; background: #fff;
  border: 1px solid var(--ed-line); border-radius: 12px; padding: 0.35rem;
  box-shadow: 0 2px 10px rgba(31,33,36,.06); position: sticky; top: 1.5rem;
}
.rail-btn {
  width: 44px; height: 44px; border-radius: 9px; border: 0; background: transparent;
  display: grid; place-items: center; color: #3d4247; cursor: pointer;
  font: inherit; text-decoration: none; padding: 0;
}
.rail-btn svg { width: 21px; height: 21px; stroke-width: 1.8; }
.rail-btn:hover { background: var(--ed-hover); color: #1aa683; }

/* ---------- Design & Font panel ---------- */
.design-panel {
  display: flex; flex-direction: column; gap: 0.35rem;
  height: 100%; overflow-y: auto; padding: 0.35rem 0.25rem 1.5rem;
  width: 100%; max-width: 380px;
}
.design-panel-head h3 {
  margin: 0 0 0.85rem; font-size: 1.05rem; font-weight: 600;
}
.design-form { display: flex; flex-direction: column; gap: 1.15rem; }
.design-block { display: flex; flex-direction: column; gap: 0.55rem; }
.design-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: #565c62;
}
.design-slider-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.55rem; align-items: center;
}
.design-slider-row input[type="range"] { width: 100%; accent-color: var(--ed-teal); }
.design-hint { font-size: 0.72rem; color: #9aa1a8; white-space: nowrap; }
.design-a-sm { font-size: 0.7rem; font-weight: 600; color: #6b7178; }
.design-a-lg { font-size: 1.05rem; font-weight: 600; color: #6b7178; }
.design-swatches { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.design-swatch {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; padding: 0; position: relative;
}
.design-swatch.selected { box-shadow: 0 0 0 2px #1f2124; }
.design-swatch-custom {
  display: grid; place-items: center; background: #f4f6f7; color: #6b7178;
  font-size: 1rem; border: 1px dashed #c8ccd0; overflow: hidden;
}
.design-swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.design-select {
  width: 100%; border: 1px solid var(--ed-line); border-radius: 8px;
  padding: 0.55rem 0.7rem; font: inherit; background: #fff;
}
.design-layout-grid, .design-bg-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem;
}
.design-layout-thumb, .design-bg-thumb {
  border: 1.5px solid var(--ed-line); border-radius: 8px; padding: 0.35rem;
  cursor: pointer; background: #fff; display: grid; gap: 0.25rem; place-items: center;
}
.design-layout-thumb.selected, .design-bg-thumb.selected {
  border-color: var(--ed-teal); box-shadow: 0 0 0 1px rgba(46,199,166,.35);
}
.layout-preview {
  width: 100%; aspect-ratio: 3/4; border-radius: 3px; background: #f4f6f7;
  display: grid; gap: 2px; padding: 4px;
}
.layout-preview.layout-1 { grid-template-columns: 1.4fr 0.6fr; }
.layout-preview.layout-2 { grid-template-columns: 1.2fr 1fr; }
.layout-preview.layout-3 { grid-template-columns: 1fr 1fr; }
.layout-preview.layout-4 { grid-template-columns: 1fr 1fr 1fr; }
.layout-preview::before, .layout-preview::after {
  content: ""; background: #d7dbdf; border-radius: 2px; min-height: 100%;
}
.layout-preview.layout-2::after { background: #2ec7a6; }
.layout-num { font-size: 0.7rem; color: #9aa1a8; }
.bg-preview {
  width: 100%; aspect-ratio: 1; border-radius: 4px; border: 1px solid #e6e8eb;
}
.bg-preview.bg-1 { background: #fff; }
.bg-preview.bg-2 {
  background-color: #fff;
  background-image: radial-gradient(#c8ccd0 1px, transparent 1px);
  background-size: 6px 6px;
}
.bg-preview.bg-3 {
  background: repeating-linear-gradient(45deg, #eef1f4 0, #eef1f4 4px, #fff 4px, #fff 8px);
}
.bg-preview.bg-4 {
  background: linear-gradient(135deg, #e8eef3 25%, #fff 25%, #fff 50%, #e8eef3 50%, #e8eef3 75%, #fff 75%);
  background-size: 10px 10px;
}
.design-signature-add {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 1px dashed #c8ccd0; border-radius: 10px; padding: 1.1rem;
  background: #eef7fb; color: #3d4247; cursor: pointer; font-size: 0.9rem; position: relative;
}
.design-signature-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.design-signature-preview {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.design-signature-preview img { max-height: 48px; max-width: 140px; }
.design-branding-row {
  display: none;
  flex-direction: row; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--ed-line); padding-top: 0.85rem;
}
.design-branding-left { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ed-teal); font-weight: 500; }
.design-toggle { position: relative; width: 44px; height: 24px; display: inline-block; }
.design-toggle input { opacity: 0; width: 0; height: 0; }
.design-toggle-ui {
  position: absolute; inset: 0; background: #d7dbdf; border-radius: 999px; cursor: pointer; transition: .15s;
}
.design-toggle-ui::after {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .15s;
}
.design-toggle input:checked + .design-toggle-ui { background: var(--ed-teal); }
.design-toggle input:checked + .design-toggle-ui::after { transform: translateX(20px); }

/* ---------- Additional sections (left panel) ---------- */
.sections-panel {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  height: 100%;
  overflow-y: auto;
  padding: 0.5rem 0.25rem 1.5rem;
  width: 100%;
  max-width: 380px;
}
.sections-catalog h4,
.sections-add-grid { margin: 0; }
.sections-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.sections-add-btn {
  width: 100%; border: 1px solid var(--ed-line); background: #fff; border-radius: 8px;
  padding: 0.55rem 0.6rem; font: inherit; font-size: 0.8rem; cursor: pointer; text-align: left;
}
.sections-add-btn:hover { border-color: var(--ed-teal); background: #f7fcfb; }
.sections-item-preview { margin: 0.25rem 0 0; font-size: 0.78rem; }
.sections-panel-head h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
}
.sections-panel-head .muted {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}
.sections-block {
  border: 1px solid var(--ed-line);
  border-radius: 12px;
  background: #fff;
  padding: 1rem 1rem 1.1rem;
}
.sections-block h4 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.sections-empty { margin: 0 0 0.85rem; font-size: 0.88rem; }
.sections-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.sections-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ed-muted);
}
.sections-form input,
.sections-form select,
.sections-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--ed-line);
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--ed-text);
  background: #fff;
}
.sections-form textarea { min-height: 72px; resize: vertical; }
.btn-block { width: 100%; justify-content: center; }
.drawer-item-main { min-width: 0; line-height: 1.4; }
.editor-body .btn { border-radius: 10px; font-weight: 500; }
.editor-body .btn-primary { background: var(--ed-teal); box-shadow: none; color: #fff; }
.editor-body .btn-secondary { background: #fff; border: 1px solid var(--ed-line); color: var(--ed-text); }
.editor-body input, .editor-body select, .editor-body textarea {
  border-radius: 10px; border: 1px solid var(--ed-line); font-family: inherit;
}
.editor-body label { color: var(--ed-muted); font-weight: 500; }
.editor-body .muted { color: var(--ed-muted); }

/* ---------- Edit drawer ---------- */
.edit-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(31,33,36,0.3); z-index: 45;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.edit-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.edit-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 640px; max-width: 96vw;
  background: #fff; box-shadow: -12px 0 30px rgba(31,33,36,0.14); z-index: 50;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease;
}
.edit-drawer.open { transform: translateX(0); }
.edit-drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--ed-line); flex-shrink: 0;
}
.edit-drawer-header h3 { margin: 0; font-size: 1.08rem; font-weight: 600; }
.edit-drawer-close {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--ed-hover);
  color: var(--ed-text); cursor: pointer; font-size: 1.05rem; display: grid; place-items: center;
}
.edit-drawer-body { padding: 1.4rem; overflow-y: auto; flex: 1; }

/* Summary WYSIWYG (Quill) inside the edit drawer */
.summary-editor-label { display: flex; flex-direction: column; gap: 0.45rem; }
.summary-textarea-sync { display: none !important; }
.summary-quill {
  background: #fff;
  border: 1px solid var(--ed-line);
  border-radius: 10px;
  overflow: hidden;
}
.summary-quill .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid var(--ed-line);
  background: #f7f8f9;
  padding: 0.4rem 0.55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
}
.summary-quill .ql-toolbar.ql-snow .ql-formats {
  margin-right: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.05rem;
  padding: 0.15rem 0.25rem;
  background: #fff;
  border: 1px solid var(--ed-line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.summary-quill .ql-toolbar.ql-snow .ql-formats:last-child { margin-right: 0; }
.summary-quill .ql-toolbar.ql-snow button {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.summary-quill .ql-toolbar.ql-snow button:hover,
.summary-quill .ql-toolbar.ql-snow button.ql-active {
  background: #eef2f6;
}
.summary-quill .ql-container.ql-snow {
  border: 0;
  font-family: inherit;
  font-size: 0.92rem;
  min-height: 220px;
}
.summary-quill .ql-editor {
  min-height: 220px;
  line-height: 1.55;
  color: var(--ed-text);
  transition: opacity .2s ease;
}
.summary-quill .ql-editor.ql-blank::before {
  color: #9aa1a8;
  font-style: normal;
}
.summary-quill .ql-editor.is-updating {
  opacity: 0.35;
}
.drawer-ai-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.btn-ai-generate,
.btn-ai-improve {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  font-weight: 560;
  letter-spacing: 0.01em;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.btn-ai-generate svg,
.btn-ai-improve svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.btn-ai-generate svg {
  stroke-width: 2.45;
}
.btn-ai-generate {
  background: var(--purple);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(91, 60, 224, 0.22);
}
.btn-ai-generate:hover {
  background: var(--purple-hover);
  color: #fff;
  box-shadow: 0 4px 12px rgba(91, 60, 224, 0.28);
}
.btn-ai-improve {
  background: #eefaf6;
  color: #1a7a64;
  border: 1px solid rgba(46, 199, 166, 0.45);
}
.btn-ai-improve:hover {
  background: #e2f6f0;
  color: #146554;
  border-color: var(--ed-teal);
}
.btn-ai-generate:active,
.btn-ai-improve:active {
  transform: translateY(1px);
}

/* Canvas fade after HTMX preview swap */
#resume-canvas.canvas-fade-in .resume-page-stack {
  animation: canvasFadeIn .22s ease;
}
@keyframes canvasFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #resume-canvas.canvas-fade-in .resume-page-stack { animation: none; }
  .summary-quill .ql-editor { transition: none; }
  .btn-ai-generate,
  .btn-ai-improve { transition: none; }
}
.rs-summary strong, .rs-summary b { font-weight: 600; }
.rs-summary em, .rs-summary i { font-style: italic; }
.rs-summary u { text-decoration: underline; }
.rs-summary a { color: inherit; text-decoration: underline; }
.rs-summary p { margin: 0 0 0.55em; }
.rs-summary p:last-child { margin-bottom: 0; }
.rs-summary .ql-align-center { text-align: center; }
.rs-summary .ql-align-right { text-align: right; }
.rs-summary .ql-align-justify { text-align: justify; }
.rs-summary .ql-align-left { text-align: left; }
.rs-summary ul,
.rs-summary ol {
  margin: 0.2em 0 0.55em;
  padding-left: 1.25em;
}
.rs-summary li { margin: 0.15em 0; }
.rs-summary li[data-list="bullet"] { list-style-type: disc; }
.rs-summary ol { list-style: none; padding-left: 1.25em; }
.rs-summary ol > li[data-list="bullet"] {
  list-style-type: disc;
  display: list-item;
}

.drawer-section-title { font-weight: 600; margin: 0 0 0.9rem; }
.drawer-item-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--ed-line);
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 0.7rem;
  background: #fafbfb;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.drawer-item-card.is-editing {
  flex-direction: column;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.drawer-item-body {
  flex: 1;
  min-width: 0;
  width: 100%;
}
.drawer-item-main { min-width: 0; }
.drawer-item-summary {
  overflow: hidden;
  max-height: 12rem;
  opacity: 1;
  transition: max-height .2s ease, opacity .16s ease, margin .16s ease;
}
.drawer-item-edit {
  display: grid;
  gap: .9rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height .22s ease, opacity .16s ease, margin .16s ease;
  margin: 0;
}
.drawer-item-card.is-editing .drawer-item-summary {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}
.drawer-item-card.is-editing .drawer-item-edit {
  max-height: 80rem;
  opacity: 1;
  pointer-events: auto;
  margin-top: 0.15rem;
}
.drawer-item-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.drawer-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
  transition: opacity .16s ease;
}
.drawer-item-card.is-editing .drawer-item-actions {
  display: none;
}
.drawer-item-icon-row {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.drawer-icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.drawer-icon-btn svg { width: 16px; height: 16px; }
.drawer-icon-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.drawer-icon-btn:active { transform: scale(0.96); }
.drawer-icon-btn-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}
.drawer-icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  background: #1f2937;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 5;
}
.drawer-icon-btn[data-tooltip]:hover::after,
.drawer-icon-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.drawer-divider { height: 1px; background: var(--ed-line); margin: 1.25rem 0; }
.error-text { color: #b42318; font-size: 0.88rem; margin: 0.5rem 0; }

@media (max-width: 1400px) {
  .editor-layout { grid-template-columns: 360px minmax(0, 1fr) 80px; }
  .editor-left-panel { width: 360px; max-width: 360px; }
}
@media (max-width: 1180px) {
  .editor-layout { grid-template-columns: 320px minmax(0, 1fr) 72px; }
  .editor-left-panel { width: 320px; max-width: 320px; }
  .resume-sheet-2col { --rs-pad: 1.9rem; padding: 2rem var(--rs-pad); }
  .rs-name { font-size: 1.65rem; }
  .ai-chat { max-width: 100%; }
  .ai-owl { width: 118px; height: 118px; }
  .ai-owl-img { width: 96px; height: 96px; }
}
@media (max-width: 900px) {
  .rs-line { flex-wrap: wrap; }
  body.editor-body:has(.editor-layout) {
    height: auto;
    overflow: auto;
  }
  .editor-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .editor-layout > .editor-left-panel,
  .editor-layout > .editor-canvas-wrap,
  .editor-layout > .editor-right-rail {
    grid-column: auto;
  }
  .editor-layout.panel-collapsed { grid-template-columns: 1fr; }
  .editor-layout.panel-collapsed .editor-left-panel {
    display: none;
    visibility: visible;
    pointer-events: auto;
    width: 100%;
    max-width: none;
    padding: 1rem 1rem 1.4rem;
    border: 0;
  }
  .editor-left-panel { width: 100%; max-width: none; border-right: 0; border-bottom: 1px solid var(--ed-line); }
  .side-panel.active { height: auto; max-height: 70vh; }
  .ai-chat, .template-gallery, .template-gallery-footer { max-width: none; }
  .ai-owl { width: 140px; height: 140px; }
  .ai-owl-img { width: 114px; height: 114px; }
  .editor-right-rail { padding: 0 0 1.5rem; }
  .rail-card { flex-direction: row; position: static; }
  .rs-body { grid-template-columns: 1fr; gap: 1.5rem; }
  .editor-canvas-wrap {
    padding: 1rem 15px 2rem;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .resume-sheet-2col { min-height: auto; --rs-pad: 1.25rem; padding: 1.5rem var(--rs-pad); }
  .rs-name { font-size: 1.45rem; }
  .edit-drawer { width: 100%; max-width: 100%; }
}

/* ===================== Dashboard ===================== */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  gap: 24px;
  align-items: start;
}
.dash-main { min-width: 0; }
.dash-aside {
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: calc(var(--header-h) + 16px);
}
.dash-aside > h2 { font-size: 20px; font-weight: 700; margin: 0; color: var(--ink); }
.dash-block { margin-bottom: 32px; }
.dash-block h2 { font-size: 20px; font-weight: 700; margin: 0; color: var(--ink); }

.job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.new-job-card {
  position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.new-job-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.new-job-card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-bottom: 12px;
}
.new-job-time {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-faint); font-size: 12px; font-weight: 400;
}
.new-job-time svg { width: 14px; height: 14px; }
.new-job-save { flex-shrink: 0; }
.new-job-save .icon-btn { border-radius: 50%; }
.new-job-save .icon-btn.is-saved { color: #E74C3C; }
.new-job-body { display: flex; gap: 12px; align-items: flex-start; }
.new-job-body h3 {
  margin: 0 0 8px; font-size: 16px; font-weight: 600; line-height: 1.3;
  max-width: 90%; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.new-job-body h3 a:hover { color: var(--purple); }
.new-job-meta { color: var(--ink-muted); font-size: 14px; margin: 0 0 4px; }
.job-logo {
  width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0;
  background: var(--purple); color: #fff; font-weight: 700; font-size: 18px;
  display: grid; place-items: center;
  overflow: hidden;
}
.apply-stack { display: flex; flex-direction: column; gap: 16px; }
.apply-card {
  position: relative;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--purple-edge);
  border-radius: 8px; padding: 20px; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease);
}
.apply-card:hover { box-shadow: var(--shadow); }
.apply-card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.apply-card .muted { margin: 4px 0 0; font-size: 14px; }
.apply-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.apply-actions a, .apply-actions button.linkish {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: 14px; font-weight: 500; color: var(--purple); text-decoration: underline;
  background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit;
}
.apply-actions a:hover, .apply-actions button.linkish:hover { color: var(--purple-hover); }
.apply-actions svg { width: 16px; height: 16px; }
.apply-resume-name {
  font-size: 12px; font-weight: 400; color: var(--ink-muted); text-decoration: none !important;
}
.add-job-strip {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 16px;
  border: 2px dashed var(--brand); background: #fff;
  border-radius: 8px; padding: 24px; margin: 24px 0;
}
.add-job-strip strong { font-size: 16px; font-weight: 600; color: var(--ink); }

.tips-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease);
}
.tips-card:hover { box-shadow: var(--shadow); }
.dash-main .table-card { box-shadow: var(--shadow-sm); }
.tips-card h3 {
  margin: 0 0 8px; font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.tips-card > p { margin: 0 0 12px; color: var(--ink-muted); font-size: 14px; }
.tips-inner { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.tips-inner h4 { margin: .6rem 0 .15rem; font-size: 14px; font-weight: 600; }
.tips-inner p { margin: 0; color: var(--ink-muted); font-size: 12px; }
.promo-card {
  border-radius: 12px; padding: 20px;
  background: var(--info-soft); border: 1px solid transparent;
}
.promo-card h3 { margin: 12px 0 12px; font-size: 16px; font-weight: 600; }
.promo-card p { margin: 0 0 16px; color: var(--ink-muted); font-size: 14px; line-height: 1.5; }
.promo-art { display: flex; justify-content: center; gap: 1.5rem; font-size: 24px; }

@media (prefers-reduced-motion: reduce) {
  .dash-grid .new-job-card,
  .dash-grid .apply-card,
  .dash-grid .tips-card {
    transition: none;
  }
  .dash-grid .new-job-card:hover { transform: none; }
}

/* Dropdown menus (bookmark, doc row, create) */
.menu-wrap { position: relative; display: inline-flex; }
.menu-panel {
  display: none; position: absolute; top: calc(100% + 4px); right: 0;
  min-width: 200px; background: #fff; border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.12); z-index: 10;
  padding: .35rem 0;
}
.menu-panel.open { display: block; }
/* When JS pins the panel with position:fixed, keep it above clipped table cards */
.menu-panel.open[style*="fixed"] {
  z-index: 200;
}
.table-card .doc-actions,
.table-card .menu-wrap {
  position: relative;
  z-index: 1;
}
.table-card tr:has(.menu-panel.open) td {
  position: relative;
  z-index: 5;
}
.menu-panel.align-left { left: 0; right: auto; }
.menu-panel button, .menu-panel a {
  display: flex; width: 100%; align-items: center; gap: .5rem;
  padding: 12px 16px; border: 0; background: transparent; font: inherit;
  font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; text-decoration: none;
}
.menu-panel button:hover, .menu-panel a:hover { background: var(--hover); }
.menu-panel form { margin: 0; }
.menu-panel .menu-sep { height: 1px; background: var(--line); margin: .25rem 0; }
.badge-dropdown { cursor: pointer; border: 0; font: inherit; }
.doc-actions { display: inline-flex; align-items: center; gap: .25rem; justify-content: flex-end; }
.confirm-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  width: min(420px, calc(100% - 2rem));
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
  font-family: var(--font);
  color: var(--ink);
}
.confirm-dialog::backdrop {
  background: rgba(31, 33, 36, 0.45);
}
.confirm-dialog-form { margin: 0; padding: 1.75rem 1.85rem 1.5rem; }
.confirm-dialog-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--danger-soft); color: var(--danger);
  margin-bottom: 1rem;
}
.confirm-dialog-icon svg { width: 22px; height: 22px; }
.confirm-dialog-title {
  margin: 0 0 .45rem; font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em;
}
.confirm-dialog-body {
  margin: 0 0 1.5rem; color: var(--ink-muted); font-size: .95rem; line-height: 1.55;
}
.confirm-dialog-actions {
  display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap;
}
.rename-dialog {
  border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem;
  box-shadow: var(--shadow); max-width: 360px; width: calc(100% - 2rem);
}
.rename-dialog::backdrop { background: rgba(0,0,0,.35); }
.rename-dialog h3 { margin: 0 0 .75rem; font-size: 1rem; }
.rename-dialog input { width: 100%; margin-bottom: 1rem; }
.rename-dialog .row { justify-content: flex-end; }

@media (max-width: 1024px) {
  .container { width: calc(100% - 2.5rem); }
  .app-menu { display: none; }
  .nav-burger { display: grid; place-items: center; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-aside { position: static; }
  .job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 2rem); }
  .job-grid { grid-template-columns: 1fr; }
  .job-logo { width: 36px; height: 36px; font-size: 14px; }
  .dash-block h2, .dash-aside > h2 { font-size: 16px; }
  .section-head { flex-wrap: wrap; }
}

/* ===================== Job browse (list + detail) ===================== */
.jobs-browse {
  --jobs-search-h: 6.25rem;
  background: #f3f4f6;
  height: auto;
  min-height: calc(100dvh - var(--header-h) - var(--footer-h));
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  overflow: visible;
}
.jobs-find-header {
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
  padding: 1.35rem 1.25rem 1rem;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  z-index: 40;
}
.jobs-find-search-wrap {
  position: relative;
  flex: 0 1 720px;
  width: 100%;
  max-width: 720px;
}
.jobs-find-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: #fff;
  border: 1px solid #d7dbe0;
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 1.35rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.jobs-find-search input[type="search"] {
  border: 0;
  padding: 0.75rem 0;
  font-size: 1rem;
  background: transparent;
  flex: 1;
  min-width: 0;
}
.jobs-find-search input[type="search"]:focus { outline: none; }
.jobs-find-search .search-submit {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.jobs-filters {
  margin: 0.85rem auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}
.jobs-filters summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink-muted);
}
.jobs-detail-empty {
  display: grid;
  place-content: center;
  text-align: center;
  min-height: 320px;
  padding: 2rem;
}
.jobs-detail-empty h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.jobs-tip-banner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.45rem;
  background: #dceefc;
  color: #1f4b6e;
  text-align: center;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #c7e0f5;
  flex-shrink: 0;
}
.jobs-tip-banner[hidden] {
  display: none;
}
.jobs-tip-banner-copy {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 0;
}
.jobs-tip-text {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.jobs-tip-text:not([data-tip-append]),
.jobs-tip-text[data-tip-append=""] {
  cursor: default;
  text-decoration: none;
}
.jobs-tip-banner svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.jobs-tip-banner-purple {
  background: #efe8fb;
  color: #5b3ce0;
  border-bottom-color: #e0d4f7;
}
.jobs-browse > .jobs-tip-banner + .jobs-split {
  padding-top: 1rem;
}
.jobs-split {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 1rem;
  flex: 1 0 auto;
  min-height: calc(100dvh - 16rem);
  align-items: stretch;
  padding-top: 1rem;
  padding-bottom: 0.75rem;
}
.jobs-list-pane,
.jobs-detail-pane {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 0;
  max-height: none;
}
.jobs-list-pane {
  padding: 1rem 0.85rem;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + var(--jobs-search-h) + 0.75rem);
  max-height: calc(100dvh - var(--header-h) - var(--jobs-search-h) - 1.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.jobs-detail-pane {
  overflow: visible;
  min-height: calc(100dvh - var(--header-h) - 9rem);
}
.jobs-count {
  position: sticky;
  top: -15px;
  z-index: 2;
  margin: -1rem -0.85rem 10px;
  padding: 1rem 1.2rem 0.75rem;
  background: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
.jobs-list { display: grid; gap: 0.65rem; }
.jobs-list-item {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  background: #fff;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.jobs-list-item:hover {
  border-color: #cfd4da;
  box-shadow: var(--shadow-sm);
}
.jobs-list-item.is-active {
  border-color: #b8bec6;
  box-shadow: 0 0 0 1px #b8bec6, var(--shadow-sm);
  background: #fafbfc;
}
.jobs-list-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.jobs-list-time {
  color: var(--ink-faint);
  font-size: 0.78rem;
}
.ghost-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.ghost-pill svg { width: 12px; height: 12px; }
.ghost-low { color: #1aa683; }
.ghost-low svg { fill: #1aa683; }
.ghost-moderate { color: #d97706; }
.ghost-moderate svg { fill: #d97706; }
.ghost-high { color: #dc2626; }
.ghost-high svg { fill: #dc2626; }
.jobs-list-item-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}
.jobs-list-item-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.jobs-list-item-copy strong {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
}
.jobs-list-company {
  color: var(--ink-muted);
  font-size: 0.86rem;
}
.jobs-list-meta {
  color: var(--ink-faint);
  font-size: 0.8rem;
  line-height: 1.35;
}
.jobs-list-saved {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--ink-faint);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.jobs-list-saved svg { width: 14px; height: 14px; }
.job-logo-sm {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1rem;
  background: #111827;
}
.job-logo-lg {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  font-size: 1.45rem;
  background: #111827;
}

.jobs-detail-pane { padding: 1.5rem 1.75rem 2.5rem; }
.jobs-detail-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.jobs-detail-head-copy { min-width: 0; flex: 1; }
.jobs-detail-head h1 {
  margin: 0 0 0.2rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.jobs-company-link {
  display: inline-block;
  color: #2563eb;
  font-size: 0.98rem;
  font-weight: 500;
  margin: 0 0 0.45rem;
}
.jobs-company-link:hover { text-decoration: underline; }
.jobs-company-link.is-plain { color: var(--ink-muted); }
.jobs-detail-meta {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}
.jobs-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.jobs-detail-actions .btn { min-width: 140px; }
.jobs-apply-tracked {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.85rem;
}
.jobs-apply-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  padding: 0.4rem 0.65rem;
  background: var(--purple-soft);
  border: 1px solid var(--purple-edge);
  border-radius: 8px;
}
.jobs-apply-confirm[hidden] { display: none; }
.jobs-apply-confirm p {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
}
.jobs-apply-confirm p svg {
  width: 15px;
  height: 15px;
  color: var(--purple);
  flex-shrink: 0;
}
.jobs-apply-confirm-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
.jobs-apply-confirm-actions .btn {
  min-width: 0;
  padding: 0.22rem 0.55rem;
  font-size: 0.75rem;
  border-radius: 6px;
  line-height: 1.2;
}
.btn-apply-yes {
  background: var(--purple);
  color: #fff;
  border: 1px solid var(--purple);
}
.btn-apply-yes:hover { background: var(--purple-hover); }

.ghost-analysis {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: #fff;
}
.ghost-analysis summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.ghost-analysis summary::-webkit-details-marker { display: none; }
.ghost-analysis summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg);
  transition: transform .15s ease;
  margin-right: 0.25rem;
}
.ghost-analysis[open] summary::after { transform: rotate(-135deg); }
.ghost-analysis-label {
  margin-left: auto;
  margin-right: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.86rem;
  font-weight: 500;
}
.ghost-analysis p { margin: 0.75rem 0 0; font-size: 0.9rem; }

.jobs-match-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: #fff;
}
.jobs-match-badge {
  --badge: #9a8cde;
  background: var(--badge);
  border-radius: 12px;
  padding: 1.15rem 0.7rem 0.95rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: #fff;
}
.jobs-match-ring {
  --match-pct: 30%;
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: conic-gradient(#fff var(--match-pct), rgba(255, 255, 255, 0.28) 0);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.jobs-match-ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--badge);
}
.jobs-match-badge strong {
  position: relative;
  z-index: 1;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.jobs-match-badge span {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.jobs-match-copy h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 600;
}
.jobs-match-copy p {
  margin: 0 0 0.85rem;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.55;
}
.jobs-tailor-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 0.75rem;
  color: inherit;
}
.jobs-tailor-link strong {
  display: block;
  color: #2563eb;
  font-size: 0.92rem;
  font-weight: 600;
}
.jobs-tailor-link small {
  display: block;
  color: var(--ink-muted);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}
.jobs-tailor-link svg {
  width: 18px;
  height: 18px;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.jobs-tailor-link:hover strong { text-decoration: underline; }

.jobs-detail-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
}
.jobs-detail-body > :first-child {
  margin-top: 0;
}
.jobs-detail-body h2,
.jobs-detail-body h3,
.jobs-detail-body h4,
.job-section-title {
  margin: 1.75rem 0 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.jobs-detail-body h2 {
  font-size: 1.15rem;
}
.jobs-detail-body h3,
.jobs-detail-body h4,
.job-section-title {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.jobs-detail-body p {
  margin: 0 0 1rem;
  color: var(--ink);
}
.jobs-detail-body ul,
.jobs-detail-body ol {
  margin: 0 0 1.35rem;
  padding-left: 1.25rem;
}
.jobs-detail-body li {
  margin: 0.4rem 0;
  padding-left: 0.15rem;
}
.jobs-detail-body li::marker {
  color: var(--ink-muted);
}
.jobs-detail-body a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.jobs-detail-body a:hover {
  color: var(--purple-hover);
}
.jobs-detail-body strong,
.jobs-detail-body b {
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 980px) {
  .jobs-browse {
    height: auto;
    overflow: visible;
  }
  .jobs-split {
    grid-template-columns: 1fr;
    flex: none;
    min-height: 0;
  }
  .jobs-list-pane,
  .jobs-detail-pane {
    min-height: 0;
    max-height: none;
    position: static;
    align-self: stretch;
    overflow: visible;
  }
  .jobs-match-card { grid-template-columns: 1fr; }
  .jobs-match-badge { padding: 0.85rem; }
}
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.detail-grid h1 { font-size: 1.75rem; font-weight: 600; margin: .2rem 0 1rem; }
.detail-grid h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

/* ===================== Cover letter wizard ===================== */
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.method-card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.4rem; position: relative; transition: border-color .15s ease, box-shadow .15s ease;
}
.method-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.method-card.recommended { border-color: var(--purple); }
.method-card .badge { position: absolute; top: 1rem; right: 1rem; }
.method-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem; }
.method-icon svg { width: 23px; height: 23px; }
.method-icon.purple { background: var(--purple-soft); color: var(--purple); }
.method-icon.teal { background: var(--brand-soft); color: var(--brand-dark); }
.method-icon.grey { background: var(--hover); color: var(--ink-muted); }
.method-card h3 { margin: 0 0 .4rem; font-size: 1.08rem; font-weight: 600; }
.method-card p { margin: 0; color: var(--ink-muted); font-size: .92rem; }

.pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.pick-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: stretch;
  border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem;
  background: var(--bg-soft); cursor: pointer; position: relative;
}
.pick-card input { position: absolute; opacity: 0; pointer-events: none; }
.pick-card.selected { background: var(--brand-soft); border-color: var(--brand); }
.pick-thumb {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: .5rem; overflow: hidden; aspect-ratio: 3/4;
}
.pt-name { display: block; font-size: .42rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.pt-title { display: block; font-size: .36rem; color: var(--cyan); margin-bottom: .25rem; }
.pt-rule { display: block; height: 1px; background: var(--line); margin: .25rem 0; }
.pt-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: .3rem; }
.pt-cols i { display: block; height: 2px; background: #dfe3e7; border-radius: 1px; margin-bottom: 2px; }
.pt-cols i.short { width: 65%; }
.pick-body { display: flex; flex-direction: column; justify-content: space-between; padding: .3rem .2rem; }
.pick-title { font-weight: 600; font-size: 1rem; }
.pick-sub { color: var(--ink-muted); font-size: .9rem; }
.pick-time { color: var(--ink-muted); font-size: .88rem; }
.pick-check { position: absolute; top: 1rem; right: 1rem; color: var(--brand-dark); opacity: 0; }
.pick-check svg { width: 20px; height: 20px; }
.pick-card.selected .pick-check { opacity: 1; }

.field-label { font-size: .82rem; font-weight: 600; letter-spacing: .06em; color: var(--ink-muted); margin: 0 0 .6rem; }
.paste-job { display: flex; align-items: center; gap: .75rem; border: 1px solid var(--ink); border-radius: 10px; padding: .35rem .35rem .35rem 1rem; }
.paste-job input { border: 0; padding: .6rem 0; }
.paste-job input:focus { outline: none; }
.paste-hint { border: 1px solid var(--ink); border-radius: 8px; padding: .5rem 1rem; font-size: .92rem; font-weight: 500; white-space: nowrap; }
.saved-job-list { display: grid; gap: .6rem; max-height: 340px; overflow-y: auto; }
.saved-job-row {
  display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 1rem;
  border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; cursor: pointer;
  font-weight: 400; color: var(--ink);
}
.saved-job-row:hover { background: var(--hover); }
.saved-job-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.saved-job-row:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.sj-title { font-size: 1rem; }
.sj-company { color: var(--purple); font-size: .95rem; }

/* ===================== Cover letter editor ===================== */
.letter-layout { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: start; }
.letter-sheet {
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  width: 100%; max-width: 860px; margin: 1.5rem auto 4rem; padding: 3.2rem 3.4rem; text-align: left;
}
.letter-sheet .rs-name { text-align: left; }
.letter-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.letter-body {
  width: 100%; border: 0; padding: 0; min-height: 55vh;
  font: inherit; font-size: 1.02rem; line-height: 1.75; resize: vertical;
}
.letter-body:focus { outline: none; }
@media (max-width: 900px) {
  .method-grid, .pick-grid, .letter-meta { grid-template-columns: 1fr; }
  .letter-layout { grid-template-columns: 1fr; }
  .letter-sheet { padding: 1.75rem 1.5rem; }
  .saved-job-row { grid-template-columns: 22px 1fr; }
}

/* =========================================================================
   RESUME TEMPLATES — 30 designs sharing one markup (.resume-sheet-2col)
   Each .tpl-* restyles typography, colour, rules and column arrangement.
   ========================================================================= */
.resume-sheet-2col { --t-accent: var(--cyan); --t-rule: #b9bec3; --t-label: #565c62; }

/* ---------- 1. Modern — cyan accent, clean two column (default) ---------- */
.tpl-modern { --t-accent: #29abe2; }

/* ---------- 2. Classic — centred serif header, single column ---------- */
.tpl-classic {
  --t-accent: #1f2124; --t-rule: #1f2124;
  font-family: Georgia, "Times New Roman", serif;
}
.tpl-classic .rs-name { font-size: 1.7rem; letter-spacing: .06em; text-align: center; }
.tpl-classic .rs-title { text-align: center; font-style: italic; font-weight: 400; color: #3d4247; }
.tpl-classic .rs-contact { justify-content: center; gap: 1rem; }
.tpl-classic header { border-bottom: 2px solid #1f2124; padding-bottom: 1.1rem; }
.tpl-classic .rs-body { grid-template-columns: 1fr; gap: 0; }
.tpl-classic .rs-section-label {
  text-align: center; border-bottom: 1px solid #1f2124; letter-spacing: .18em; font-weight: 700; color: #1f2124;
}
.tpl-classic .rs-exp-company { font-style: italic; }
.tpl-classic .rs-skill-row { border-bottom: 0; padding: .2rem 0; display: inline-block; margin-right: 1.2rem; }

/* ---------- 3. Minimal — hairlines, generous space, no colour ---------- */
.tpl-minimal { --t-accent: #1f2124; --t-rule: #e6e8eb; --t-label: #9aa1a8; }
.tpl-minimal .rs-name { font-weight: 500; letter-spacing: .12em; font-size: 1.55rem; }
.tpl-minimal .rs-title { color: #6b7178; font-weight: 400; }
.tpl-minimal .rs-section-label { letter-spacing: .16em; font-size: .72rem; border-bottom-color: #e6e8eb; }
.tpl-minimal .rs-exp-title { font-weight: 500; font-size: .95rem; }
.tpl-minimal .rs-exp-company { color: #6b7178; }
.tpl-minimal .rs-section { margin-bottom: 2.4rem; }
.tpl-minimal .rs-skill-row { border-bottom: 0; padding: .3rem 0; color: #3d4247; }

/* ---------- 4. Executive — navy header band, authoritative ---------- */
.tpl-executive { --t-accent: #16324f; --t-rule: #16324f; --t-label: #16324f; padding-top: 0; }
.tpl-executive header {
  background: #16324f; color: #fff;
  margin: 0 calc(-1 * var(--rs-pad)) 2rem;
  padding: 2.6rem var(--rs-pad) 2rem;
  border-radius: 0;
}
.tpl-executive .rs-name { font-family: Georgia, serif; font-size: 1.85rem; }
.tpl-executive .rs-title { color: #8fd0f0; font-weight: 500; }
.tpl-executive .rs-contact { color: #dbe6ef; }
.tpl-executive .rs-contact svg { color: #8fd0f0; }
.tpl-executive .rs-section-label { color: #16324f; border-bottom: 2px solid #16324f; font-weight: 600; }
.tpl-executive .rs-exp-company { color: #16324f; font-weight: 600; }

/* ---------- 5. Compact — dense, ATS friendly, fits more ---------- */
.tpl-compact { --t-accent: #2f6f4e; font-size: 12.5px; padding: 2rem 2.2rem; }
.tpl-compact .rs-name { font-size: 1.5rem; }
.tpl-compact .rs-title { font-size: .95rem; margin: .2rem 0 .45rem; }
.tpl-compact .rs-body { gap: 1.35rem; margin-top: 1.1rem; }
.tpl-compact .rs-section { margin-bottom: .95rem; }
.tpl-compact .rs-section-label { font-size: .72rem; padding-bottom: .2rem; margin-bottom: .45rem; }
.tpl-compact .rs-exp-item, .tpl-compact .rs-edu-item { margin-bottom: .75rem; }
.tpl-compact .rs-exp-title { font-size: .92rem; }
.tpl-compact .rs-exp-company { font-size: .85rem; }
.tpl-compact .rs-bullets li { font-size: .82rem; margin-bottom: .12rem; }
.tpl-compact .rs-skill-row { padding: .25rem 0; font-size: .82rem; }

/* ---------- 6. Elegant — serif display name, amber hairline accents ---------- */
.tpl-elegant { --t-accent: #b5893b; --t-rule: #e2d3b6; --t-label: #8a6d3b; }
.tpl-elegant .rs-name {
  font-family: Georgia, serif; font-weight: 400; font-size: 1.9rem;
  letter-spacing: .1em; text-transform: uppercase;
}
.tpl-elegant .rs-title { font-family: Georgia, serif; font-style: italic; font-weight: 400; color: #b5893b; }
.tpl-elegant header { border-bottom: 1px solid #e2d3b6; padding-bottom: 1.2rem; }
.tpl-elegant .rs-section-label { letter-spacing: .2em; font-size: .8rem; border-bottom-color: #e2d3b6; }
.tpl-elegant .rs-exp-title { font-family: Georgia, serif; font-weight: 600; }
.tpl-elegant .rs-exp-company { color: #b5893b; }
.tpl-elegant .rs-skill-row { border-bottom-color: #eee3cd; }

/* ---------- 7. Crest — dark sidebar on the left ---------- */
.tpl-crest { --t-accent: #2ec7a6; padding: 0; overflow: hidden; }
.tpl-crest header { padding: 2.6rem 2.8rem 1.6rem; }
.tpl-crest .rs-name { font-size: 1.65rem; }
.tpl-crest .rs-body { grid-template-columns: 1fr 1.5fr; gap: 0; margin-top: 0; }
.tpl-crest .rs-sidebar {
  order: -1; background: #17222c; color: #e7edf2;
  padding: 2rem 1.8rem; min-height: 100%;
}
.tpl-crest .rs-main { padding: 0 2.8rem 2.6rem; }
.tpl-crest .rs-sidebar .rs-section-label { color: #7fe3cb; border-bottom-color: #33414d; }
.tpl-crest .rs-sidebar .rs-exp-title { color: #fff; font-size: .92rem; }
.tpl-crest .rs-sidebar .rs-exp-company { color: #7fe3cb; }
.tpl-crest .rs-sidebar .rs-meta { color: #b3c1cc; }
.tpl-crest .rs-sidebar .rs-meta svg { color: #7fe3cb; }
.tpl-crest .rs-sidebar .rs-skill-row { border-bottom-color: #2b3a46; }
.tpl-crest .rs-sidebar .rs-empty { color: #93a3af; }

/* ---------- 8. Imprint — bold colour block behind the name ---------- */
.tpl-imprint { --t-accent: #0f6b4d; --t-rule: #0f6b4d; --t-label: #0f6b4d; padding-top: 0; }
.tpl-imprint header {
  background: #0f6b4d; color: #fff;
  margin: 0 calc(-1 * var(--rs-pad)) 2.2rem;
  padding: 2.8rem var(--rs-pad) 2.1rem;
}
.tpl-imprint .rs-name { font-weight: 700; font-size: 1.85rem; letter-spacing: -.02em; }
.tpl-imprint .rs-title { color: #b6f0dc; font-weight: 600; }
.tpl-imprint .rs-contact { color: #d7f0e6; }
.tpl-imprint .rs-contact svg { color: #b6f0dc; }
.tpl-imprint .rs-section-label {
  background: #eaf6f1; color: #0f6b4d; border-bottom: 0; font-weight: 600;
  padding: .4rem .7rem; border-radius: 4px; letter-spacing: .06em;
}
.tpl-imprint .rs-exp-company { color: #0f6b4d; font-weight: 600; }
.tpl-imprint .rs-skill-row { border-bottom-color: #d8e8e1; }

/* ---------- 9. Timeline — vertical rail with dots on experience ---------- */
.tpl-timeline { --t-accent: #6c5ce7; --t-rule: #d9d4f7; --t-label: #6c5ce7; }
.tpl-timeline .rs-name { font-weight: 600; }
.tpl-timeline .rs-title { color: #6c5ce7; }
.tpl-timeline header { border-bottom: 2px solid #6c5ce7; padding-bottom: 1.1rem; }
.tpl-timeline .rs-section-label { border-bottom-color: #d9d4f7; font-weight: 600; }
.tpl-timeline .rs-main .rs-exp-item {
  position: relative; padding-left: 1.6rem; border-left: 2px solid #e4e0fa; padding-bottom: .4rem;
}
.tpl-timeline .rs-main .rs-exp-item::before {
  content: ""; position: absolute; left: -7px; top: .45rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid #6c5ce7;
}
.tpl-timeline .rs-main .rs-exp-item:last-child { border-left-color: transparent; }
.tpl-timeline .rs-exp-company { color: #6c5ce7; }
.tpl-timeline .rs-skill-row { border-bottom-color: #e4e0fa; }

/* ---------- 10. Slate — soft grey sidebar, calm corporate ---------- */
.tpl-slate { --t-accent: #4a5568; --t-rule: #cbd2d9; --t-label: #4a5568; padding: 0; overflow: hidden; }
.tpl-slate header { padding: 2.8rem 3rem 1.6rem; border-bottom: 1px solid #e2e6ea; }
.tpl-slate .rs-name { font-weight: 600; letter-spacing: .04em; }
.tpl-slate .rs-title { color: #4a5568; font-weight: 500; }
.tpl-slate .rs-body { grid-template-columns: 1.5fr 1fr; gap: 0; margin-top: 0; }
.tpl-slate .rs-main { padding: 2rem 2.4rem 2.6rem 3rem; }
.tpl-slate .rs-sidebar { background: #f4f6f8; padding: 2rem 2.2rem; }
.tpl-slate .rs-section-label {
  text-transform: uppercase; letter-spacing: .16em; font-size: .76rem;
  font-weight: 600; color: #4a5568; border-bottom-color: #cbd2d9;
}
.tpl-slate .rs-exp-company { color: #4a5568; font-weight: 600; }
.tpl-slate .rs-skill-row { border-bottom-color: #dde3e8; }

/* ---------- 11. Clinical — healthcare / nursing (teal, clean) ---------- */
.tpl-clinical { --t-accent: #0d9488; --t-rule: #99f6e4; --t-label: #0f766e; }
.tpl-clinical .rs-name { font-weight: 600; letter-spacing: .02em; }
.tpl-clinical .rs-title { font-weight: 500; }
.tpl-clinical header { border-bottom: 2px solid #0d9488; padding-bottom: 1rem; }
.tpl-clinical .rs-section-label { font-weight: 600; letter-spacing: .1em; }
.tpl-clinical .rs-skill-row { border-bottom-color: #ccfbf1; }

/* ---------- 12. Ledger — accounting / finance (tight ATS) ---------- */
.tpl-ledger { --t-accent: #1e3a5f; --t-rule: #cbd5e1; --t-label: #1e3a5f; font-size: 12.75px; }
.tpl-ledger .rs-name { font-size: 1.55rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tpl-ledger .rs-title { font-size: .92rem; margin: .15rem 0 .4rem; }
.tpl-ledger header { border-bottom: 1px solid #1e3a5f; padding-bottom: .85rem; }
.tpl-ledger .rs-section { margin-bottom: 1rem; }
.tpl-ledger .rs-section-label { font-size: .7rem; letter-spacing: .14em; border-bottom-width: 1px; }
.tpl-ledger .rs-body { grid-template-columns: 1fr; gap: 0; }
.tpl-ledger .rs-skill-row { display: inline-block; margin-right: 1rem; border-bottom: 0; padding: .15rem 0; }

/* ---------- 13. Counsel — legal (serif, single column) ---------- */
.tpl-counsel {
  --t-accent: #1c1917; --t-rule: #1c1917; --t-label: #1c1917;
  font-family: Georgia, "Times New Roman", serif;
}
.tpl-counsel .rs-name { font-size: 1.75rem; letter-spacing: .04em; text-align: center; font-weight: 400; }
.tpl-counsel .rs-title { text-align: center; font-style: italic; color: #44403c; font-weight: 400; }
.tpl-counsel .rs-contact { justify-content: center; }
.tpl-counsel header { border-bottom: 2px solid #1c1917; padding-bottom: 1rem; }
.tpl-counsel .rs-body { grid-template-columns: 1fr; gap: 0; }
.tpl-counsel .rs-section-label {
  text-align: center; letter-spacing: .2em; font-weight: 700; border-bottom: 1px solid #1c1917;
}
.tpl-counsel .rs-skill-row { border-bottom: 0; display: inline-block; margin-right: 1.1rem; }

/* ---------- 14. Faculty — education (warm neutral) ---------- */
.tpl-faculty { --t-accent: #9a3412; --t-rule: #e7e5e4; --t-label: #78716c; }
.tpl-faculty .rs-name { font-weight: 600; color: #292524; }
.tpl-faculty .rs-title { color: #9a3412; font-weight: 500; }
.tpl-faculty header { border-bottom: 1px solid #d6d3d1; padding-bottom: 1rem; }
.tpl-faculty .rs-section-label { letter-spacing: .12em; font-weight: 600; }
.tpl-faculty .rs-exp-company { font-weight: 600; }

/* ---------- 15. Harbor — office / business manager ---------- */
.tpl-harbor { --t-accent: #0e7490; --t-rule: #0e7490; --t-label: #155e75; padding-top: 0; }
.tpl-harbor header {
  background: #ecfeff;
  margin: 0 calc(-1 * var(--rs-pad)) 1.8rem;
  padding: 2.4rem var(--rs-pad) 1.6rem;
  border-bottom: 3px solid #0e7490;
}
.tpl-harbor .rs-name { font-weight: 700; font-size: 1.7rem; }
.tpl-harbor .rs-body { grid-template-columns: 1fr; gap: 0; }
.tpl-harbor .rs-section-label { font-weight: 700; letter-spacing: .08em; }
.tpl-harbor .rs-skill-row { border-bottom-color: #cffafe; }

/* ---------- 16. Apex — compact navy ATS ---------- */
.tpl-apex { --t-accent: #1e3a8a; --t-rule: #bfdbfe; --t-label: #1e3a8a; font-size: 12.5px; padding: 2rem 2.2rem; }
.tpl-apex .rs-name { font-size: 1.48rem; font-weight: 700; }
.tpl-apex .rs-title { font-size: .92rem; }
.tpl-apex header { border-bottom: 2px solid #1e3a8a; padding-bottom: .85rem; }
.tpl-apex .rs-section { margin-bottom: .9rem; }
.tpl-apex .rs-section-label { font-size: .7rem; letter-spacing: .12em; font-weight: 700; }
.tpl-apex .rs-bullets li { font-size: .82rem; margin-bottom: .1rem; }

/* ---------- 17. Pulse — pharmacy / health tech ---------- */
.tpl-pulse { --t-accent: #0369a1; --t-rule: #bae6fd; --t-label: #0369a1; }
.tpl-pulse .rs-name { font-weight: 700; }
.tpl-pulse .rs-section-label {
  background: #f0f9ff; border-bottom: 0; padding: .35rem .55rem; border-radius: 3px;
  font-weight: 700; letter-spacing: .06em;
}
.tpl-pulse header { border-bottom: 2px solid #0369a1; padding-bottom: 1rem; }
.tpl-pulse .rs-section { margin-bottom: 1.35rem; }

/* ---------- 18. Folio — classic ATS readability ---------- */
.tpl-folio {
  --t-accent: #292524; --t-rule: #a8a29e; --t-label: #44403c;
  font-family: Georgia, "Times New Roman", serif;
}
.tpl-folio .rs-name { font-size: 1.65rem; font-weight: 400; letter-spacing: .05em; }
.tpl-folio .rs-title { font-style: italic; font-weight: 400; color: #57534e; }
.tpl-folio header { border-bottom: 1px solid #78716c; padding-bottom: 1rem; }
.tpl-folio .rs-body { grid-template-columns: 1fr; gap: 0; }
.tpl-folio .rs-section-label { letter-spacing: .16em; font-size: .78rem; border-bottom-width: 1px; }
.tpl-folio .rs-skill-row { border-bottom: 0; display: inline-block; margin-right: 1rem; }

/* ---------- 19. North — corporate blue-grey soft sidebar ---------- */
.tpl-north { --t-accent: #334155; --t-rule: #cbd5e1; --t-label: #334155; padding: 0; overflow: hidden; }
.tpl-north header { padding: 2.6rem 2.8rem 1.4rem; border-bottom: 1px solid #e2e8f0; }
.tpl-north .rs-name { font-weight: 600; }
.tpl-north .rs-body { grid-template-columns: 1.45fr 1fr; gap: 0; margin-top: 0; }
.tpl-north .rs-main { padding: 1.8rem 2.2rem 2.4rem 2.8rem; }
.tpl-north .rs-sidebar { background: #f1f5f9; padding: 1.8rem 1.9rem; }
.tpl-north .rs-section-label { letter-spacing: .14em; font-weight: 600; font-size: .74rem; }

/* ---------- 20. Summit — soft leadership header ---------- */
.tpl-summit { --t-accent: #1e293b; --t-rule: #94a3b8; --t-label: #1e293b; padding-top: 0; }
.tpl-summit header {
  background: #f8fafc;
  margin: 0 calc(-1 * var(--rs-pad)) 1.8rem;
  padding: 2.5rem var(--rs-pad) 1.7rem;
  border-bottom: 3px solid #1e293b;
}
.tpl-summit .rs-name { font-family: Georgia, serif; font-size: 1.8rem; font-weight: 400; }
.tpl-summit .rs-title { color: #475569; font-weight: 500; }
.tpl-summit .rs-section-label { border-bottom: 2px solid #1e293b; font-weight: 700; }

/* ---------- 21. Signal — tech / engineering ---------- */
.tpl-signal { --t-accent: #2563eb; --t-rule: #bfdbfe; --t-label: #1d4ed8; }
.tpl-signal .rs-name { font-weight: 700; letter-spacing: -.01em; }
.tpl-signal .rs-section-label {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 600;
}
.tpl-signal header { border-bottom: 2px solid #2563eb; padding-bottom: 1rem; }
.tpl-signal .rs-skill-row { border-bottom-color: #dbeafe; }

/* ---------- 22. Quota — sales / BD ---------- */
.tpl-quota { --t-accent: #b45309; --t-rule: #fcd34d; --t-label: #92400e; padding-top: 0; }
.tpl-quota header {
  background: #fffbeb;
  margin: 0 calc(-1 * var(--rs-pad)) 1.8rem;
  padding: 2.4rem var(--rs-pad) 1.6rem;
  border-bottom: 3px solid #b45309;
}
.tpl-quota .rs-name { font-weight: 800; font-size: 1.75rem; letter-spacing: -.02em; }
.tpl-quota .rs-title { font-weight: 600; }
.tpl-quota .rs-body { grid-template-columns: 1fr; gap: 0; }
.tpl-quota .rs-exp-title { font-weight: 700; }

/* ---------- 23. Beacon — marketing / communications ---------- */
.tpl-beacon { --t-accent: #ea580c; --t-rule: #fed7aa; --t-label: #c2410c; }
.tpl-beacon .rs-name { font-weight: 700; }
.tpl-beacon .rs-title { font-weight: 500; }
.tpl-beacon header { border-bottom: 2px solid #ea580c; padding-bottom: 1rem; }
.tpl-beacon .rs-section-label { letter-spacing: .1em; font-weight: 700; }
.tpl-beacon .rs-skill-row { border-bottom-color: #ffedd5; }

/* ---------- 24. Grove — hospitality / service ---------- */
.tpl-grove { --t-accent: #4d7c0f; --t-rule: #d9f99d; --t-label: #3f6212; }
.tpl-grove .rs-name { font-weight: 600; letter-spacing: .03em; }
.tpl-grove .rs-title { color: #4d7c0f; }
.tpl-grove header { border-bottom: 1px solid #a3e635; padding-bottom: 1.1rem; }
.tpl-grove .rs-section { margin-bottom: 1.6rem; }
.tpl-grove .rs-section-label { letter-spacing: .12em; }

/* ---------- 25. Civic — government / public sector ---------- */
.tpl-civic { --t-accent: #1f2937; --t-rule: #1f2937; --t-label: #111827; }
.tpl-civic .rs-name { font-size: 1.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.tpl-civic .rs-title { text-align: center; color: #374151; font-weight: 500; }
.tpl-civic .rs-contact { justify-content: center; }
.tpl-civic header { border-bottom: 3px solid #1f2937; padding-bottom: 1rem; }
.tpl-civic .rs-body { grid-template-columns: 1fr; gap: 0; }
.tpl-civic .rs-section-label {
  text-align: center; letter-spacing: .18em; font-weight: 700; border-bottom: 2px solid #1f2937;
}
.tpl-civic .rs-skill-row { border-bottom: 0; display: inline-block; margin-right: 1rem; }

/* ---------- 26. Cart — retail / operations ---------- */
.tpl-cart { --t-accent: #0f766e; --t-rule: #99f6e4; --t-label: #115e59; font-size: 12.6px; }
.tpl-cart .rs-name { font-size: 1.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tpl-cart .rs-section-label { font-size: .68rem; letter-spacing: .18em; font-weight: 700; }
.tpl-cart .rs-section { margin-bottom: .95rem; }
.tpl-cart header { border-bottom: 1px solid #0f766e; padding-bottom: .8rem; }

/* ---------- 27. Lab — science / research ---------- */
.tpl-lab { --t-accent: #4338ca; --t-rule: #c7d2fe; --t-label: #3730a3; }
.tpl-lab .rs-name { font-weight: 600; letter-spacing: .02em; }
.tpl-lab .rs-section-label {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .7rem; letter-spacing: .05em;
}
.tpl-lab header { border-bottom: 1px solid #6366f1; padding-bottom: 1rem; }
.tpl-lab .rs-exp-company { font-weight: 600; }
.tpl-lab .rs-skill-row { border-bottom-color: #e0e7ff; }

/* ---------- 28. Hearth — nonprofit / social impact ---------- */
.tpl-hearth { --t-accent: #9f1239; --t-rule: #fecdd3; --t-label: #881337; }
.tpl-hearth .rs-name { font-family: Georgia, serif; font-weight: 400; font-size: 1.75rem; letter-spacing: .04em; }
.tpl-hearth .rs-title { font-style: italic; font-weight: 400; color: #9f1239; }
.tpl-hearth header { border-bottom: 1px solid #fb7185; padding-bottom: 1.1rem; }
.tpl-hearth .rs-section-label { letter-spacing: .14em; }

/* ---------- 29. Route — logistics / supply chain ---------- */
.tpl-route { --t-accent: #3f6212; --t-rule: #a3a3a3; --t-label: #365314; }
.tpl-route .rs-name { font-weight: 700; }
.tpl-route header { border-bottom: 2px solid #3f6212; padding-bottom: .95rem; }
.tpl-route .rs-section-label { font-weight: 700; letter-spacing: .1em; border-bottom-width: 2px; }
.tpl-route .rs-body { gap: 1.4rem; }
.tpl-route .rs-skill-row { border-bottom-color: #d4d4d4; }

/* ---------- 30. People — HR / recruiting ---------- */
.tpl-people { --t-accent: #0f766e; --t-rule: #e9d5ff; --t-label: #6b21a8; }
.tpl-people .rs-name { font-weight: 600; }
.tpl-people .rs-title { color: #0f766e; }
.tpl-people header { border-bottom: 2px solid #a855f7; padding-bottom: 1rem; }
.tpl-people .rs-section-label { color: #6b21a8; border-bottom-color: #e9d5ff; letter-spacing: .1em; }
.tpl-people .rs-exp-company { color: #0f766e; font-weight: 600; }
.tpl-people .rs-skill-row { border-bottom-color: #f3e8ff; }

/* ---------- shared hooks so every template picks up its accent ---------- */
.resume-sheet-2col .rs-title,
.resume-sheet-2col .rs-exp-company { color: var(--t-accent); }
.resume-sheet-2col .rs-section-label { color: var(--t-label); border-bottom-color: var(--t-rule); }

/*
 * Template column locks beat Design → Layout picker (.layout-1…4).
 * Without this, layout-* (higher specificity) forces 2–3 columns on
 * single-column templates like Counsel / Classic / Ledger.
 */
.resume-sheet-2col.tpl-classic .rs-body,
.resume-sheet-2col.tpl-ledger .rs-body,
.resume-sheet-2col.tpl-counsel .rs-body,
.resume-sheet-2col.tpl-harbor .rs-body,
.resume-sheet-2col.tpl-folio .rs-body,
.resume-sheet-2col.tpl-quota .rs-body,
.resume-sheet-2col.tpl-civic .rs-body {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}
.resume-sheet-2col.tpl-crest .rs-body {
  grid-template-columns: 1fr 1.5fr !important;
  gap: 0 !important;
  margin-top: 0 !important;
}
.resume-sheet-2col.tpl-slate .rs-body {
  grid-template-columns: 1.5fr 1fr !important;
  gap: 0 !important;
  margin-top: 0 !important;
}
.resume-sheet-2col.tpl-north .rs-body {
  grid-template-columns: 1.45fr 1fr !important;
  gap: 0 !important;
  margin-top: 0 !important;
}

/* ---------- print ---------- */
@media print {
  .editor-topbar, .editor-actionbar, .editor-left-panel, .editor-right-rail,
  .additional-panel, .edit-drawer, .edit-drawer-backdrop, .app-header, .site-footer,
  .resume-page-separator, .resume-sheet-clone,
  .resume-page-card:not(:first-child) { display: none !important; }
  .resume-page-card:first-child {
    overflow: visible !important;
    height: auto !important;
    box-shadow: none !important;
  }
  .resume-page-slice { transform: none !important; }
  .editor-layout, .letter-layout { grid-template-columns: 1fr; }
  .editor-canvas-wrap { padding: 0; height: auto; max-height: none; overflow: visible; }
  .resume-page-stack { width: 100% !important; }
  .resume-sheet-2col, .letter-sheet {
    border: 0; margin: 0; border-radius: 0; box-shadow: none;
    width: 100% !important; max-width: none !important;
    padding: var(--rs-pad, 2.4rem) !important;
    font-size: var(--rs-fs, 13.5px) !important;
    min-height: auto !important;
  }
  .rs-name { font-size: 1.85rem !important; }
  .rs-body { gap: 1.75rem !important; margin-top: 1.4rem !important; }
  .resume-sheet-2col.layout-1 .rs-body { grid-template-columns: 1fr 0.55fr !important; }
  .resume-sheet-2col.layout-2 .rs-body { grid-template-columns: 1.32fr 1fr !important; }
  .resume-sheet-2col.layout-3 .rs-body { grid-template-columns: 1fr 1fr !important; }
  .resume-sheet-2col.layout-4 .rs-body { grid-template-columns: 1fr 1fr 1fr !important; }
  /* Re-assert template locks after layout !important above */
  .resume-sheet-2col.tpl-classic .rs-body,
  .resume-sheet-2col.tpl-ledger .rs-body,
  .resume-sheet-2col.tpl-counsel .rs-body,
  .resume-sheet-2col.tpl-harbor .rs-body,
  .resume-sheet-2col.tpl-folio .rs-body,
  .resume-sheet-2col.tpl-quota .rs-body,
  .resume-sheet-2col.tpl-civic .rs-body {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .resume-sheet-2col.tpl-crest .rs-body {
    grid-template-columns: 1fr 1.5fr !important;
    gap: 0 !important;
    margin-top: 0 !important;
  }
  .resume-sheet-2col.tpl-slate .rs-body {
    grid-template-columns: 1.5fr 1fr !important;
    gap: 0 !important;
    margin-top: 0 !important;
  }
  .resume-sheet-2col.tpl-north .rs-body {
    grid-template-columns: 1.45fr 1fr !important;
    gap: 0 !important;
    margin-top: 0 !important;
  }
  .editable-section { padding: 0 !important; margin: 0 0 1.4rem !important; }
  .editable-section:hover { background: none; box-shadow: none; }
  .edit-hint { display: none; }
  .rs-section-remove { display: none !important; }
  .rs-exp-item {
    break-inside: auto;
    page-break-inside: auto;
  }
  .rs-edu-item, .rs-skill-row {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .rs-section-table thead {
    display: table-header-group;
  }
  .rs-section-label {
    break-after: avoid;
    page-break-after: avoid;
  }
}

/* ===================== Template thumbnails (miniature resumes) =====================
   Every internal dimension is expressed in `em`, so a single font-size on
   .mini-sheet scales the whole miniature. That lets the same markup serve the
   small editor thumbnails and the larger picker/landing previews.
   ================================================================================= */
.thumb-preview { position: relative; }
.mini-sheet {
  --t-accent: var(--cyan); --t-rule: #c9ced3; --t-label: #6b7178;
  position: absolute; inset: 0; background: #fff; overflow: hidden;
  padding: 2.2em 2.5em; font-size: 4.4px; line-height: 1.5; color: #1f2124;
  display: flex; flex-direction: column;
}
/* spans must lay out as blocks — the same markup is written with both
   <div> (editor panel) and <span> (picker / landing) elements */
.mini-header, .mini-main, .mini-side,
.mini-name, .mini-title, .mini-label, .mini-role, .mini-company { display: block; }

.mini-header { flex-shrink: 0; }
.mini-name { font-size: 2.19em; font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.1; }
.mini-title { font-size: 1.375em; color: var(--t-accent); font-weight: 500; margin-top: .3em; }
.mini-contact { display: flex; gap: .94em; margin: .94em 0 1.56em; }
.mini-contact i { display: block; height: .5em; width: 5em; background: #d7dbdf; border-radius: 1px; }
.mini-body { display: grid; grid-template-columns: 1.35fr 1fr; gap: 2.19em; flex: 1; min-height: 0; overflow: hidden; }
.mini-label {
  font-size: 1.06em; text-transform: uppercase; letter-spacing: .06em; color: var(--t-label);
  border-bottom: .22em solid var(--t-rule); padding-bottom: .35em; margin: 1.25em 0 .75em;
}
.mini-body i { display: block; height: .47em; background: #e2e6ea; border-radius: 1px; margin-bottom: .5em; }
.mini-body i.short { width: 62%; }
.mini-role { font-size: 1.31em; font-weight: 600; margin-top: .63em; }
.mini-company { font-size: 1.13em; color: var(--t-accent); margin-bottom: .5em; }
.mini-skill { display: block; height: .47em; background: #e2e6ea; border-bottom: .22em solid #eceff2; margin-bottom: .81em; }

/* per-template thumbnail treatments */
.mini-sheet.tpl-classic { font-family: Georgia, serif; --t-accent: #1f2124; --t-rule: #1f2124; }
.mini-sheet.tpl-classic .mini-header { text-align: center; border-bottom: .3em solid #1f2124; padding-bottom: .6em; }
.mini-sheet.tpl-classic .mini-contact { justify-content: center; }
.mini-sheet.tpl-classic .mini-body { grid-template-columns: 1fr; }
.mini-sheet.tpl-classic .mini-label { text-align: center; letter-spacing: .16em; }

.mini-sheet.tpl-minimal { --t-accent: #1f2124; --t-rule: #e6e8eb; --t-label: #9aa1a8; }
.mini-sheet.tpl-minimal .mini-name { font-weight: 500; letter-spacing: .1em; font-size: 1.9em; }

.mini-sheet.tpl-executive { padding: 0; }
.mini-sheet.tpl-executive .mini-header { background: #16324f; color: #fff; padding: 2.2em 2.5em 1.5em; }
.mini-sheet.tpl-executive .mini-title { color: #8fd0f0; }
.mini-sheet.tpl-executive .mini-contact i { background: rgba(255,255,255,.45); }
.mini-sheet.tpl-executive .mini-body { padding: 1.25em 2.5em 2.2em; --t-accent: #16324f; --t-label: #16324f; --t-rule: #16324f; }

.mini-sheet.tpl-compact { --t-accent: #2f6f4e; }
.mini-sheet.tpl-compact .mini-name { font-size: 1.9em; }
.mini-sheet.tpl-compact .mini-label { margin: .8em 0 .5em; }
.mini-sheet.tpl-compact .mini-body { gap: 1.7em; }

.mini-sheet.tpl-elegant { --t-accent: #b5893b; --t-rule: #e2d3b6; --t-label: #8a6d3b; }
.mini-sheet.tpl-elegant .mini-name { font-family: Georgia, serif; font-weight: 400; letter-spacing: .1em; }
.mini-sheet.tpl-elegant .mini-title { font-style: italic; }
.mini-sheet.tpl-elegant .mini-header { border-bottom: .22em solid #e2d3b6; padding-bottom: .6em; }

.mini-sheet.tpl-crest { padding: 0; --t-accent: #2ec7a6; }
.mini-sheet.tpl-crest .mini-header { padding: 2.2em 2.5em 1.25em; }
.mini-sheet.tpl-crest .mini-body { grid-template-columns: 1fr 1.4fr; gap: 0; }
.mini-sheet.tpl-crest .mini-side {
  order: -1; background: #17222c; padding: 1.9em 1.9em 2.5em;
  --t-accent: #7fe3cb; --t-label: #7fe3cb; --t-rule: #33414d;
}
.mini-sheet.tpl-crest .mini-side .mini-role { color: #fff; }
.mini-sheet.tpl-crest .mini-side .mini-skill { background: #33414d; border-bottom-color: #2b3a46; }
.mini-sheet.tpl-crest .mini-main { padding: 0 2.5em 2.5em; }

.mini-sheet.tpl-imprint { padding: 0; --t-accent: #0f6b4d; }
.mini-sheet.tpl-imprint .mini-header { background: #0f6b4d; color: #fff; padding: 2.2em 2.5em 1.5em; }
.mini-sheet.tpl-imprint .mini-title { color: #b6f0dc; }
.mini-sheet.tpl-imprint .mini-contact i { background: rgba(255,255,255,.45); }
.mini-sheet.tpl-imprint .mini-body { padding: 1.25em 2.5em 2.2em; --t-label: #0f6b4d; }
.mini-sheet.tpl-imprint .mini-label { background: #eaf6f1; border-bottom: 0; padding: .35em .6em; border-radius: 1px; }

.mini-sheet.tpl-timeline { --t-accent: #6c5ce7; --t-rule: #d9d4f7; --t-label: #6c5ce7; }
.mini-sheet.tpl-timeline .mini-header { border-bottom: .3em solid #6c5ce7; padding-bottom: .6em; }
.mini-sheet.tpl-timeline .mini-main { border-left: .25em solid #e4e0fa; padding-left: .95em; }
.mini-sheet.tpl-timeline .mini-main .mini-role { position: relative; padding-left: 1.25em; }
.mini-sheet.tpl-timeline .mini-main .mini-role::before {
  content: ""; position: absolute; left: 0; top: .35em; width: .6em; height: .6em;
  border-radius: 50%; background: #6c5ce7;
}

.mini-sheet.tpl-slate { padding: 0; --t-accent: #4a5568; --t-rule: #cbd2d9; --t-label: #4a5568; }
.mini-sheet.tpl-slate .mini-header { padding: 2.2em 2.5em 1.25em; border-bottom: .22em solid #e2e6ea; }
.mini-sheet.tpl-slate .mini-body { grid-template-columns: 1.5fr 1fr; gap: 0; }
.mini-sheet.tpl-slate .mini-main { padding: 1.25em 2.2em 2.5em 2.5em; }
.mini-sheet.tpl-slate .mini-side { background: #f4f6f8; padding: 1.25em 1.9em 2.5em; }
.mini-sheet.tpl-slate .mini-label { letter-spacing: .14em; }

.mini-sheet.tpl-clinical { --t-accent: #0d9488; --t-rule: #99f6e4; --t-label: #0f766e; }
.mini-sheet.tpl-clinical .mini-header { border-bottom: .3em solid #0d9488; padding-bottom: .55em; }

.mini-sheet.tpl-ledger { --t-accent: #1e3a5f; --t-rule: #cbd5e1; --t-label: #1e3a5f; }
.mini-sheet.tpl-ledger .mini-name { text-transform: uppercase; letter-spacing: .06em; font-size: 1.85em; }
.mini-sheet.tpl-ledger .mini-body { grid-template-columns: 1fr; }
.mini-sheet.tpl-ledger .mini-header { border-bottom: .22em solid #1e3a5f; padding-bottom: .5em; }

.mini-sheet.tpl-counsel { font-family: Georgia, serif; --t-accent: #1c1917; --t-rule: #1c1917; }
.mini-sheet.tpl-counsel .mini-header { text-align: center; border-bottom: .3em solid #1c1917; padding-bottom: .55em; }
.mini-sheet.tpl-counsel .mini-contact { justify-content: center; }
.mini-sheet.tpl-counsel .mini-body { grid-template-columns: 1fr; }
.mini-sheet.tpl-counsel .mini-label { text-align: center; letter-spacing: .16em; }

.mini-sheet.tpl-faculty { --t-accent: #9a3412; --t-rule: #e7e5e4; --t-label: #78716c; }
.mini-sheet.tpl-faculty .mini-header { border-bottom: .22em solid #d6d3d1; padding-bottom: .55em; }

.mini-sheet.tpl-harbor { padding: 0; --t-accent: #0e7490; --t-label: #155e75; }
.mini-sheet.tpl-harbor .mini-header {
  background: #ecfeff; padding: 2.2em 2.5em 1.35em; border-bottom: .4em solid #0e7490;
}
.mini-sheet.tpl-harbor .mini-body { grid-template-columns: 1fr; padding: 1.2em 2.5em 2.2em; }

.mini-sheet.tpl-apex { --t-accent: #1e3a8a; --t-rule: #bfdbfe; --t-label: #1e3a8a; }
.mini-sheet.tpl-apex .mini-name { font-size: 1.85em; }
.mini-sheet.tpl-apex .mini-header { border-bottom: .3em solid #1e3a8a; padding-bottom: .5em; }

.mini-sheet.tpl-pulse { --t-accent: #0369a1; --t-rule: #bae6fd; --t-label: #0369a1; }
.mini-sheet.tpl-pulse .mini-header { border-bottom: .3em solid #0369a1; padding-bottom: .55em; }
.mini-sheet.tpl-pulse .mini-label { background: #f0f9ff; border-bottom: 0; padding: .3em .5em; }

.mini-sheet.tpl-folio { font-family: Georgia, serif; --t-accent: #292524; --t-rule: #a8a29e; --t-label: #44403c; }
.mini-sheet.tpl-folio .mini-title { font-style: italic; }
.mini-sheet.tpl-folio .mini-body { grid-template-columns: 1fr; }
.mini-sheet.tpl-folio .mini-header { border-bottom: .22em solid #78716c; padding-bottom: .55em; }

.mini-sheet.tpl-north { padding: 0; --t-accent: #334155; --t-rule: #cbd5e1; --t-label: #334155; }
.mini-sheet.tpl-north .mini-header { padding: 2.2em 2.5em 1.2em; border-bottom: .22em solid #e2e8f0; }
.mini-sheet.tpl-north .mini-body { grid-template-columns: 1.45fr 1fr; gap: 0; }
.mini-sheet.tpl-north .mini-main { padding: 1.2em 2.1em 2.4em 2.5em; }
.mini-sheet.tpl-north .mini-side { background: #f1f5f9; padding: 1.2em 1.8em 2.4em; }

.mini-sheet.tpl-summit { padding: 0; --t-accent: #1e293b; --t-rule: #94a3b8; --t-label: #1e293b; }
.mini-sheet.tpl-summit .mini-header {
  background: #f8fafc; padding: 2.2em 2.5em 1.4em; border-bottom: .4em solid #1e293b;
}
.mini-sheet.tpl-summit .mini-name { font-family: Georgia, serif; font-weight: 400; }
.mini-sheet.tpl-summit .mini-body { padding: 1.2em 2.5em 2.2em; }

.mini-sheet.tpl-signal { --t-accent: #2563eb; --t-rule: #bfdbfe; --t-label: #1d4ed8; }
.mini-sheet.tpl-signal .mini-header { border-bottom: .3em solid #2563eb; padding-bottom: .55em; }
.mini-sheet.tpl-signal .mini-label { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }

.mini-sheet.tpl-quota { padding: 0; --t-accent: #b45309; --t-label: #92400e; }
.mini-sheet.tpl-quota .mini-header {
  background: #fffbeb; padding: 2.2em 2.5em 1.35em; border-bottom: .4em solid #b45309;
}
.mini-sheet.tpl-quota .mini-name { font-weight: 800; }
.mini-sheet.tpl-quota .mini-body { grid-template-columns: 1fr; padding: 1.2em 2.5em 2.2em; }

.mini-sheet.tpl-beacon { --t-accent: #ea580c; --t-rule: #fed7aa; --t-label: #c2410c; }
.mini-sheet.tpl-beacon .mini-header { border-bottom: .3em solid #ea580c; padding-bottom: .55em; }

.mini-sheet.tpl-grove { --t-accent: #4d7c0f; --t-rule: #d9f99d; --t-label: #3f6212; }
.mini-sheet.tpl-grove .mini-header { border-bottom: .22em solid #a3e635; padding-bottom: .55em; }

.mini-sheet.tpl-civic { --t-accent: #1f2937; --t-rule: #1f2937; --t-label: #111827; }
.mini-sheet.tpl-civic .mini-header { text-align: center; border-bottom: .4em solid #1f2937; padding-bottom: .55em; }
.mini-sheet.tpl-civic .mini-name { letter-spacing: .08em; }
.mini-sheet.tpl-civic .mini-contact { justify-content: center; }
.mini-sheet.tpl-civic .mini-body { grid-template-columns: 1fr; }
.mini-sheet.tpl-civic .mini-label { text-align: center; letter-spacing: .16em; }

.mini-sheet.tpl-cart { --t-accent: #0f766e; --t-rule: #99f6e4; --t-label: #115e59; }
.mini-sheet.tpl-cart .mini-name { letter-spacing: .06em; font-size: 1.85em; }
.mini-sheet.tpl-cart .mini-label { letter-spacing: .16em; }
.mini-sheet.tpl-cart .mini-header { border-bottom: .22em solid #0f766e; padding-bottom: .5em; }

.mini-sheet.tpl-lab { --t-accent: #4338ca; --t-rule: #c7d2fe; --t-label: #3730a3; }
.mini-sheet.tpl-lab .mini-header { border-bottom: .22em solid #6366f1; padding-bottom: .55em; }
.mini-sheet.tpl-lab .mini-label { font-family: ui-monospace, Menlo, Consolas, monospace; }

.mini-sheet.tpl-hearth { --t-accent: #9f1239; --t-rule: #fecdd3; --t-label: #881337; }
.mini-sheet.tpl-hearth .mini-name { font-family: Georgia, serif; font-weight: 400; }
.mini-sheet.tpl-hearth .mini-title { font-style: italic; }
.mini-sheet.tpl-hearth .mini-header { border-bottom: .22em solid #fb7185; padding-bottom: .55em; }

.mini-sheet.tpl-route { --t-accent: #3f6212; --t-rule: #a3a3a3; --t-label: #365314; }
.mini-sheet.tpl-route .mini-header { border-bottom: .3em solid #3f6212; padding-bottom: .55em; }

.mini-sheet.tpl-people { --t-accent: #0f766e; --t-rule: #e9d5ff; --t-label: #6b21a8; }
.mini-sheet.tpl-people .mini-header { border-bottom: .3em solid #a855f7; padding-bottom: .55em; }
.mini-sheet.tpl-people .mini-title { color: #0f766e; }

/* ===================== Template picker page ===================== */
.tpl-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1.5rem; }
.tpl-picker-card { display: block; cursor: pointer; font-weight: 400; color: var(--ink); }
.tpl-picker-card input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-picker-preview {
  display: block; position: relative; aspect-ratio: 3/4; border: 2px solid var(--line);
  border-radius: 8px; overflow: hidden; background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.tpl-picker-card:hover .tpl-picker-preview { border-color: #c8ccd0; box-shadow: var(--shadow-sm); }
.tpl-picker-card.selected .tpl-picker-preview { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46,199,166,.25); }
/* one lever: bumping the root font-size scales the whole miniature */
.tpl-picker-preview .mini-sheet { font-size: 4.6px; }
.tpl-picker-meta { display: block; margin-top: .75rem; }
.tpl-picker-meta strong { display: block; font-size: .98rem; font-weight: 600; }
.tpl-picker-meta .muted { display: block; font-size: .86rem; line-height: 1.45; margin-top: .15rem; }
.tpl-picker-card.selected .tpl-picker-meta strong { color: var(--brand-dark); }

.preview-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.5rem; border-bottom: 1px solid var(--line); background: #fff;
  position: sticky; top: 0; z-index: 10;
}
.preview-canvas-wrap {
  height: auto;
  max-height: none;
  overflow: visible;
}
body.editor-body:has(.preview-bar) .section-drag-handle,
body.editor-body:has(.preview-bar) .edit-hint,
body.editor-body:has(.preview-bar) .rs-section-remove {
  display: none !important;
}
@media print { .preview-bar { display: none; } }

/* =========================================================================
   LANDING PAGE
   ========================================================================= */
.lp { overflow-x: hidden; }
.lp section { position: relative; }
.lp-wrap { width: min(1200px, calc(100% - 3rem)); margin: 0 auto; }
.lp h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 600; line-height: 1.15; margin: 0 0 .8rem; }
.lp .lp-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand-dark);
  background: var(--brand-soft); border-radius: 999px; padding: .4rem .9rem; margin-bottom: 1rem;
}
.lp .lp-eyebrow.purple { color: var(--purple); background: var(--purple-soft); }
.lp .lp-lede { font-size: 1.08rem; color: var(--ink-muted); max-width: 42rem; margin: 0 auto; }
.lp-center { text-align: center; }
.lp-center .lp-lede { margin-left: auto; margin-right: auto; }
.lp-section { padding: 5.5rem 0; }
.lp-section.tinted { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.lp-hero { padding: 4.5rem 0 5rem; }
.lp-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 4rem; align-items: center; }
.lp-hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.9rem); font-weight: 600; line-height: 1.08; margin: .4rem 0 1.1rem; letter-spacing: -.02em; }
.lp-hero h1 .grad {
  background: linear-gradient(100deg, var(--brand-dark), var(--cyan) 45%, var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-hero p.sub { font-size: 1.15rem; color: var(--ink-muted); max-width: 34rem; margin: 0; }
.lp-hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin: 2rem 0 1.25rem; }
.lp-trustline { display: flex; flex-wrap: wrap; gap: 1.25rem; color: var(--ink-muted); font-size: .92rem; }
.lp-trustline span { display: inline-flex; align-items: center; gap: .4rem; }
.lp-trustline svg { width: 16px; height: 16px; color: var(--brand); }

.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; z-index: -1; }
.blob-1 { width: 460px; height: 460px; background: #b9f0e2; top: -140px; right: -120px; animation: float1 16s ease-in-out infinite; }
.blob-2 { width: 380px; height: 380px; background: #d9d4fb; bottom: -160px; left: -110px; animation: float2 19s ease-in-out infinite; }
.blob-3 { width: 300px; height: 300px; background: #cfeafd; top: 40%; left: 45%; animation: float1 22s ease-in-out infinite reverse; }
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px, 34px) scale(1.08); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(36px,-28px) scale(1.06); } }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-sheet {
  width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 1.9rem; box-shadow: 0 26px 60px rgba(31,33,36,.13);
  animation: sheetIn .8s ease both;
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
.hs-name { font-size: 1.35rem; font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; }
.hs-title { color: var(--cyan); font-weight: 500; font-size: .95rem; margin-bottom: .9rem; }
.hs-rule { height: 1px; background: var(--line); margin: .9rem 0; }
.hs-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: .45rem; }
.hs-typed { font-size: .88rem; line-height: 1.6; color: #3d4247; min-height: 4.6em; }
.hs-caret { display: inline-block; width: 2px; height: 1em; background: var(--brand); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hs-lines i { display: block; height: 6px; background: var(--line-soft); border-radius: 3px; margin-bottom: .4rem; }
.hs-lines i.short { width: 68%; }

.float-card {
  position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: .8rem 1rem; box-shadow: 0 12px 30px rgba(31,33,36,.12); font-size: .86rem;
}
.float-card strong { display: block; font-size: 1.05rem; font-weight: 600; }
.float-card.fc-1 { top: 8%; left: -6%; animation: bob 5s ease-in-out infinite; }
.float-card.fc-2 { bottom: 12%; right: -4%; animation: bob 6.5s ease-in-out infinite .8s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.fc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); display: inline-block; margin-right: .4rem; }

/* ---------- trust strip ---------- */
.lp-strip {
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.lp-strip-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}
.lp-strip-row span {
  color: var(--ink-muted);
  font-size: .93rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  line-height: 1;
}
.lp-strip-row a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
.lp-strip-row a:hover { color: var(--purple); }
.lp-strip-row strong { color: var(--ink); font-weight: 600; }

/* ---------- feature cards ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3rem; }
.feat-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.75rem; background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feat-card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(31,33,36,.09); border-color: #d5d9dd; }
.feat-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem; }
.feat-icon svg { width: 25px; height: 25px; }
.feat-icon.teal { background: var(--brand-soft); color: var(--brand-dark); }
.feat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.feat-icon.cyan { background: #e2f4fd; color: #1c85b4; }
.feat-card h3 { margin: 0 0 .5rem; font-size: 1.15rem; font-weight: 600; }
.feat-card p { margin: 0; color: var(--ink-muted); font-size: .95rem; }

/* ---------- tailoring demo ---------- */
.tailor-panel {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.75rem; align-items: center;
  border: 1px solid var(--line); border-radius: 20px; padding: 2rem; background: #fff; margin-top: 2.5rem;
}
.tailor-col { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; background: var(--bg-soft); }
.tailor-col h4 { margin: 0 0 .7rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.tailor-col p { margin: 0; font-size: .9rem; line-height: 1.65; color: #3d4247; }
.kw {
  border-radius: 4px; padding: 0 .2rem; background: transparent;
  transition: background .45s ease, color .45s ease;
}
.tailor-panel.playing .kw { background: #fde9c9; }
.tailor-panel.playing .tailor-col.out .kw { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.tailor-arrow { display: grid; place-items: center; color: var(--brand); }
.tailor-arrow svg { width: 34px; height: 34px; }
.tailor-arrow .pulse { animation: slide 1.8s ease-in-out infinite; }
@keyframes slide { 0%,100% { transform: translateX(-5px); opacity: .5; } 50% { transform: translateX(5px); opacity: 1; } }
.score-ring { display: flex; align-items: center; gap: 1rem; margin-top: 1.75rem; justify-content: center; }
.score-ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.score-ring .track { stroke: var(--line); }
.score-ring .bar { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 1.6s cubic-bezier(.22,.9,.3,1); }
.score-num { font-size: 1.6rem; font-weight: 600; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 3rem; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 26px; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--cyan), var(--purple)); opacity: .35;
}
.step { text-align: center; position: relative; }
.step-num {
  width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 2px solid var(--brand);
  color: var(--brand-dark); font-weight: 600; font-size: 1.15rem;
  display: grid; place-items: center; margin: 0 auto 1rem; position: relative; z-index: 1;
}
.step h4 { margin: 0 0 .35rem; font-size: 1.03rem; font-weight: 600; }
.step p { margin: 0; color: var(--ink-muted); font-size: .92rem; }

/* ---------- pricing / calculator ---------- */
.calc-panel {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center;
  border: 1px solid var(--line); border-radius: 20px; padding: 2.25rem; background: #fff; margin-top: 3rem;
}
.calc-controls label { display: block; font-weight: 500; color: var(--ink); margin-bottom: 1.5rem; }
.calc-controls .lbl-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .55rem; }
.calc-controls .lbl-row b { font-size: 1.1rem; color: var(--brand-dark); font-weight: 600; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: var(--line); padding: 0; border: 0; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(46,199,166,.5); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--brand);
  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(46,199,166,.5); cursor: pointer;
}
.calc-out { display: grid; gap: .9rem; }
.calc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.25rem;
}
.calc-row.win { border-color: var(--brand); background: var(--brand-soft); }
.calc-row .label { font-size: .95rem; color: var(--ink-muted); }
.calc-row.win .label { color: var(--brand-dark); font-weight: 500; }
.calc-row .amount { font-size: 1.45rem; font-weight: 600; }
.calc-row.strike .amount { color: var(--ink-faint); text-decoration: line-through; }
.calc-save { text-align: center; font-size: .95rem; color: var(--brand-dark); font-weight: 500; }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.price-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.75rem; background: #fff; position: relative; transition: transform .2s ease, box-shadow .2s ease; }
.price-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(31,33,36,.09); }
.price-card.popular { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46,199,166,.16); }
.price-card .badge { position: absolute; top: -12px; left: 1.75rem; }
.price-tokens { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.price-amount { font-size: 2.1rem; font-weight: 600; margin: .4rem 0 .1rem; }
.price-unit { color: var(--ink-muted); font-size: .92rem; }
.price-list { list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; display: grid; gap: .55rem; }
.price-list li { display: flex; gap: .55rem; font-size: .93rem; color: #3d4247; }
.price-list svg { width: 17px; height: 17px; color: var(--brand); flex-shrink: 0; margin-top: 2px; }

/* ---------- comparison ---------- */
.compare-card { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-top: 3rem; background: #fff; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 1.1rem 1.4rem; text-align: left; border-bottom: 1px solid var(--line-soft); }
.compare-table thead th { font-size: .95rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.compare-table thead th:nth-child(2) { color: var(--brand-dark); background: var(--brand-soft); }
.compare-table td:nth-child(2) { background: rgba(46,199,166,.05); font-weight: 500; }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table .yes { color: var(--brand-dark); }
.compare-table .no { color: var(--ink-faint); }
.compare-table svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: .35rem; }

/* ---------- template gallery ---------- */
.tpl-strip { display: flex; gap: 1.25rem; overflow-x: auto; padding: 2.5rem .25rem 1.5rem; scroll-snap-type: x mandatory; }
.tpl-strip::-webkit-scrollbar { height: 6px; }
.tpl-strip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.tpl-strip-item { flex: 0 0 200px; scroll-snap-align: center; }
.tpl-strip-item .tpl-picker-preview { border-width: 1px; transition: transform .25s ease, box-shadow .25s ease; }
.tpl-strip-item:hover .tpl-picker-preview { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px rgba(31,33,36,.14); }
.tpl-strip-item .name { text-align: center; margin-top: .7rem; font-size: .95rem; font-weight: 500; }

/* ---------- match example ---------- */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.match-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.match-list li { display: flex; gap: .7rem; align-items: flex-start; color: #3d4247; }
.match-list svg { width: 20px; height: 20px; color: var(--brand); flex-shrink: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 3rem auto 0; display: grid; gap: .8rem; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.faq details[open] { border-color: var(--brand); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 1.4rem; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 10px; height: 10px; flex-shrink: 0;
  border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg); transition: transform .25s ease; margin-top: -4px;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq .faq-body { padding: 0 1.4rem 1.25rem; color: var(--ink-muted); font-size: .95rem; animation: faqIn .3s ease; }
.faq .faq-body a { color: var(--purple); }
.faq-more { margin: 1.5rem auto 0; text-align: center; }
.faq-more a { color: var(--purple); font-weight: 600; text-decoration: none; }
.faq-more a:hover { text-decoration: underline; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.legal-page .lp-section { padding: 2.75rem 0 2.25rem; }
.legal-page .lp-eyebrow {
  font-size: .6875rem;
  letter-spacing: .16em;
  padding: .32rem .75rem;
  margin-bottom: .85rem;
}
.legal-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
}
.legal-updated {
  color: var(--ink-faint);
  font-size: .8125rem;
  letter-spacing: .01em;
  margin: .5rem 0 0;
}
.legal-prose {
  max-width: 680px;
  margin: 2.15rem auto 0;
}
.lp .legal-prose h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  margin: 1.85rem 0 .45rem;
  color: var(--ink);
}
.legal-prose p,
.legal-prose li {
  color: var(--ink-muted);
  line-height: 1.7;
  font-size: .9375rem;
}
.legal-page .faq { margin-top: 2.15rem; max-width: 680px; }
.legal-page .faq summary { font-size: .9375rem; font-weight: 500; }
.legal-page .faq .faq-body { font-size: .9375rem; line-height: 1.7; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 640px;
  margin: 2.15rem auto 0;
}
.contact-form {
  display: grid;
  gap: 1.1rem;
  padding: 1.5rem 1.55rem 1.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.contact-form label { gap: .4rem; }
.contact-form .contact-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
}
.contact-form .req {
  color: var(--brand);
  font-weight: 600;
}
.contact-form input,
.contact-form textarea {
  border-radius: 12px;
  background: #fafbfc;
}
.contact-form input:focus,
.contact-form textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.contact-form textarea { min-height: 140px; }
.contact-form .errorlist {
  list-style: none;
  margin: .15rem 0 0;
  padding: 0;
  color: var(--danger);
  font-size: .8125rem;
  font-weight: 400;
}
.contact-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.contact-form .btn { justify-self: start; min-width: 10rem; }
@media (max-width: 800px) {
  .contact-form-row { grid-template-columns: 1fr; }
}
.legal-prose p { margin: 0 0 .9rem; }
.legal-prose ul { padding-left: 1.15rem; margin: .2rem 0 .95rem; }
.legal-prose li + li { margin-top: .4rem; }
.legal-prose a { color: var(--purple); }

/* ---------- final CTA ---------- */
.lp-cta {
  border-radius: 24px; padding: 4rem 2rem; text-align: center; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(125deg, #0f6b4d, #16a085 45%, #1c85b4);
}
.lp-cta h2 { color: #fff; margin-bottom: .7rem; }
.lp-cta p { color: rgba(255,255,255,.85); max-width: 34rem; margin: 0 auto 2rem; font-size: 1.05rem; }
.lp-cta .btn-primary { background: #fff; color: #0f6b4d; }
.lp-cta .btn-primary:hover { background: #eafff8; color: #0f6b4d; }
.lp-cta .btn-secondary { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.lp-cta .btn-secondary:hover { background: rgba(255,255,255,.12); }
.lp-cta::after {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255,255,255,.08); top: -180px; right: -120px;
}

@media (max-width: 980px) {
  .lp-hero-grid, .calc-panel, .match-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .feat-grid, .price-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .tailor-panel { grid-template-columns: 1fr; }
  .tailor-arrow { transform: rotate(90deg); }
  .float-card.fc-1 { left: 0; }
  .float-card.fc-2 { right: 0; }
  .lp-section { padding: 3.5rem 0; }
  .compare-table th, .compare-table td { padding: .85rem .9rem; font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .float-card, .hero-sheet, .tailor-arrow .pulse, .hs-caret { animation: none !important; }
  .score-ring .bar { transition: none; }
}

/* ===================== ATS Check & Tailor ===================== */
body.ats-modal-open { overflow: hidden; }
.ats-modal-root {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 1.5rem;
}
.ats-modal-root[hidden] { display: none !important; }
.ats-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(31, 33, 36, 0.45);
  backdrop-filter: blur(2px);
}
.ats-modal-body { position: relative; z-index: 1; width: min(860px, 100%); max-height: calc(100vh - 3rem); overflow: auto; }
.ats-modal-card {
  background: #fff; border-radius: 16px; padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 18px 50px rgba(31, 33, 36, 0.18); position: relative;
}
.ats-modal-close {
  position: absolute; top: 0.85rem; right: 0.95rem;
  border: 0; background: transparent; font-size: 1.5rem; line-height: 1;
  color: #6b7178; cursor: pointer;
}
.ats-modal-card h2 {
  margin: 0 1.5rem 0.75rem 0; font-size: 1.35rem; font-weight: 600; line-height: 1.3;
}
.ats-modal-lead { margin: 0 0 1.25rem; color: #6b7178; font-size: 0.95rem; line-height: 1.5; }
.ats-btn-primary {
  background: var(--ed-teal, #2ec7a6); color: #fff; border: 0; border-radius: 10px;
  padding: 0.75rem 1.35rem; font: inherit; font-weight: 600; cursor: pointer;
}
.ats-btn-primary:disabled { background: #d7dbdf; color: #9aa1a8; cursor: not-allowed; }
.ats-btn-primary:not(:disabled):hover { background: #1aa683; }
.ats-btn-secondary {
  background: #fff; color: var(--ed-text, #1f2124); border: 1px solid #c8ccd0;
  border-radius: 10px; padding: 0.75rem 1.2rem; font: inherit; font-weight: 500; cursor: pointer;
}
.ats-btn-secondary:hover { background: #f4f6f7; }
.btn-block { width: 100%; }

.ats-onboarding-visual {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.75rem; align-items: center;
  margin: 1.25rem 0 1.35rem; padding: 1rem; border-radius: 12px; background: #eef7fb;
}
.ats-viz-label { font-size: 0.72rem; color: #6b7178; margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: .04em; }
.ats-viz-card {
  background: #fff; border: 1px solid #e6e8eb; border-radius: 10px; padding: 0.75rem;
  display: grid; gap: 0.35rem; min-height: 110px;
}
.ats-viz-card i, .ats-job-sample i {
  display: block; height: 6px; border-radius: 99px; background: #e6e8eb;
}
.ats-viz-card i.short, .ats-job-sample i.short { width: 55%; }
.ats-viz-hl { display: block; height: 10px; border-radius: 4px; background: #fde9c9; }
.ats-viz-plus {
  width: 18px; height: 18px; border-radius: 50%; background: #6c5ce7; color: #fff;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 700;
}
.ats-viz-arrow { color: #9aa1a8; font-size: 1.25rem; }
.ats-steps-list { margin: 0 0 1.4rem; padding-left: 1.2rem; color: #3d4247; font-size: 0.92rem; line-height: 1.55; }
.ats-steps-list li { margin-bottom: 0.45rem; }

.ats-job-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.ats-job-step { font-size: 0.86rem; color: #3d4247; line-height: 1.45; margin: 0 0 0.75rem; }
.ats-job-sample {
  border: 1px solid #e6e8eb; border-radius: 12px; padding: 1rem; background: #fafbfb;
  display: grid; gap: 0.35rem;
}
.ats-sample-badge {
  width: 28px; height: 28px; border-radius: 8px; background: #e8f7f2; color: #1aa683;
  display: grid; place-items: center; font-size: 0.7rem; font-weight: 700;
}
#ats-job-description {
  width: 100%; border: 1px solid #e6e8eb; border-radius: 10px; padding: 0.75rem;
  font: inherit; font-size: 0.88rem; resize: vertical; min-height: 160px;
}
.ats-job-select {
  display: grid;
  gap: 0.45rem;
  margin: 0.85rem 0 1rem;
  font-size: 0.86rem;
  color: #3d4247;
}
.ats-job-select-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ats-save-job-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ats-save-job-link:hover { color: var(--purple-hover); }
.ats-job-select select {
  border: 1px solid #e6e8eb; border-radius: 8px; padding: 0.55rem 0.7rem; font: inherit; background: #fff;
}
.ats-job-select-label {
  display: grid; gap: 0.35rem; margin: 0.85rem 0 1rem; font-size: 0.86rem; color: #3d4247;
}
.ats-job-select-label select {
  border: 1px solid #e6e8eb; border-radius: 8px; padding: 0.55rem 0.7rem; font: inherit; background: #fff;
}
.ats-job-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; align-items: center; }
.ats-loading {
  margin-top: 0.75rem; font-size: 0.86rem; color: #1aa683; display: none;
}
.htmx-request .ats-loading, .ats-loading.htmx-request { display: block; }

.ats-score-modal { text-align: center; max-width: 480px; margin: 0 auto; }
.ats-gauge {
  --ats-score: 0;
  width: 140px; height: 140px; margin: 0.5rem auto 1rem; border-radius: 50%;
  background: conic-gradient(#f0a04b calc(var(--ats-score) * 1%), #eceef0 0);
  display: grid; place-items: center; position: relative;
}
.ats-gauge::before {
  content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff;
}
.ats-gauge svg { display: none; }
.ats-gauge-value {
  position: relative; z-index: 1; font-size: 1.75rem; font-weight: 700; color: #1f2124;
}
.ats-gauge.ats-band-poor { background: conic-gradient(#b42318 calc(var(--ats-score) * 1%), #eceef0 0); }
.ats-gauge.ats-band-partial { background: conic-gradient(#f0a04b calc(var(--ats-score) * 1%), #eceef0 0); }
.ats-gauge.ats-band-good { background: conic-gradient(#f0a04b calc(var(--ats-score) * 1%), #eceef0 0); }
.ats-gauge.ats-band-strong { background: conic-gradient(#2ec7a6 calc(var(--ats-score) * 1%), #eceef0 0); }
.ats-error {
  background: #fdecea; color: #b42318; border: 1px solid #f6c6c0;
  border-radius: 10px; padding: 0.85rem 1rem; margin-bottom: 1rem; text-align: left; font-size: 0.9rem;
}

.ats-panel {
  display: flex; flex-direction: column; gap: 1rem;
  height: 100%; overflow-y: auto; padding: 0.35rem 0.2rem 1.4rem;
  width: 100%; max-width: 380px;
}
.ats-panel-head h3 { margin: 0 0 0.55rem; font-size: 1.05rem; font-weight: 600; }
.ats-panel-score {
  display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap;
  padding: 0.65rem 0.75rem; border-radius: 10px; background: #f4f6f7; font-size: 0.82rem;
}
.ats-panel-score strong { font-size: 1.15rem; }
.ats-panel-score.ats-band-strong { background: #e8f7f2; color: #16624c; }
.ats-panel-score.ats-band-good,
.ats-panel-score.ats-band-partial { background: #fdefdc; color: #8a4b00; }
.ats-panel-score.ats-band-poor { background: #fdecea; color: #b42318; }
.ats-kw-block h4, .ats-suggestions h4, .ats-format-checks h4 {
  margin: 0 0 0.45rem; font-size: 0.78rem; letter-spacing: .04em; text-transform: uppercase; color: #6b7178;
}
.ats-kw-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ats-kw {
  font-size: 0.75rem; padding: 0.25rem 0.5rem; border-radius: 999px; border: 1px solid #e6e8eb;
}
.ats-kw.missing { background: #fdecea; border-color: #f6c6c0; color: #b42318; }
.ats-kw.matched { background: #e8f7f2; border-color: #b7e9d8; color: #16624c; }
.ats-sug-card {
  border: 1px solid #e6e8eb; border-radius: 10px; padding: 0.75rem 0.85rem;
  background: #fff; margin-bottom: 0.55rem;
}
.ats-sug-card.status-applied { opacity: 0.72; background: #f7fcfb; }
.ats-sug-top { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.35rem; }
.ats-sug-top strong { font-size: 0.88rem; }
.ats-sug-card p { margin: 0 0 0.55rem; font-size: 0.8rem; color: #6b7178; line-height: 1.4; }
.ats-sug-priority {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: .04em;
  padding: 0.12rem 0.4rem; border-radius: 999px; background: #eceef0; color: #6b7178;
}
.ats-sug-priority.high { background: #fdecea; color: #b42318; }
.ats-sug-priority.medium { background: #fdefdc; color: #8a4b00; }
.ats-sug-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.ats-sug-done { font-size: 0.78rem; color: #1aa683; font-weight: 600; }
.ats-format-checks ul { list-style: none; margin: 0; padding: 0; }
.ats-format-checks li {
  display: flex; gap: 0.45rem; align-items: flex-start;
  font-size: 0.82rem; margin-bottom: 0.35rem; color: #3d4247;
}
.ats-format-checks li.pass span { color: #1aa683; }
.ats-format-checks li.fail span { color: #b42318; }
.ats-recheck-form { margin-top: 0.35rem; }

@media (max-width: 800px) {
  .ats-job-grid { grid-template-columns: 1fr; }
  .ats-onboarding-visual { grid-template-columns: 1fr; }
  .ats-viz-arrow { transform: rotate(90deg); justify-self: center; }
}

/* ---------- Editor modals (preview / download) ---------- */
body.editor-modal-open { overflow: hidden; }
.editor-modal-root {
  position: fixed; inset: 0; z-index: 75;
  display: grid; place-items: center; padding: 1.25rem;
}
.editor-modal-root[hidden] { display: none !important; }
.editor-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(31, 33, 36, 0.45);
  backdrop-filter: blur(2px);
}
.editor-modal-card {
  position: relative; z-index: 1; width: min(480px, 100%);
  background: #fff; border-radius: 16px; padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: 0 18px 50px rgba(31, 33, 36, 0.18); max-height: calc(100vh - 2.5rem); overflow: auto;
}
.editor-modal-card.editor-modal-wide { width: min(920px, 100%); }
.editor-modal-card h2 {
  margin: 0 1.5rem 1rem 0; font-size: 1.25rem; font-weight: 600;
}
.preview-tabs {
  display: flex; gap: 0.35rem; margin-bottom: 0.85rem; flex-wrap: wrap;
}
.preview-tab {
  border: 1px solid #e6e8eb; background: #fff; border-radius: 999px;
  padding: 0.4rem 0.85rem; font: inherit; font-size: 0.84rem; cursor: pointer; color: #3d4247;
}
.preview-tab.active { background: #e8f7f2; border-color: #b7e9d8; color: #16624c; font-weight: 600; }
.preview-iframe {
  width: 100%; height: min(70vh, 720px); border: 1px solid #e6e8eb; border-radius: 12px; background: #f4f6f7;
}
.preview-ats-text {
  margin: 0; padding: 1rem 1.1rem; border: 1px solid #e6e8eb; border-radius: 12px;
  background: #fafbfb; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem; line-height: 1.5; white-space: pre-wrap; max-height: min(70vh, 720px); overflow: auto;
}
.download-filename-label {
  display: grid; gap: 0.4rem; font-size: 0.88rem; color: #3d4247; margin-bottom: 0.35rem;
}
.download-filename-label input {
  border: 1px solid #e6e8eb; border-radius: 10px; padding: 0.7rem 0.85rem; font: inherit;
}
.download-filename-hint { margin: 0 0 1.1rem; font-size: 0.8rem; }
.download-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.download-actions .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

.editor-toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%) translateY(12px);
  background: #1f2124; color: #fff; padding: 0.7rem 1.1rem; border-radius: 10px;
  font-size: 0.86rem; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.editor-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.editor-toast[hidden] { display: none !important; }
.editor-toast.show[hidden] { display: block !important; }

/* ---------- ATS panel extras ---------- */
.ats-score-bar {
  height: 6px; border-radius: 99px; background: #eceef0; overflow: hidden; margin: 0.45rem 0 0.35rem;
}
.ats-score-bar span {
  display: block; height: 100%; border-radius: 99px; background: #f0a04b;
}
.ats-panel-score.ats-band-strong + .ats-score-bar span,
.ats-band-strong ~ .ats-score-bar span { background: #2ec7a6; }
.ats-panel-score.ats-band-poor + .ats-score-bar span { background: #b42318; }
.ats-score-note { margin: 0 0 0.25rem; font-size: 0.75rem; line-height: 1.4; }
.ats-job-card {
  border: 1px solid #e6e8eb; border-radius: 12px; padding: 0.85rem;
  display: grid; gap: 0.65rem; background: #fafbfb;
}
.ats-job-card-top {
  display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start;
}
.ats-job-card-top strong { font-size: 0.9rem; display: block; }
.ats-kw-table-wrap h4 {
  margin: 0 0 0.45rem; font-size: 0.78rem; letter-spacing: .04em; text-transform: uppercase; color: #6b7178;
}
.ats-kw-table {
  width: 100%; border-collapse: collapse; font-size: 0.78rem;
}
.ats-kw-table th, .ats-kw-table td {
  border-bottom: 1px solid #eceef0; padding: 0.4rem 0.35rem; text-align: left; vertical-align: top;
}
.ats-kw-table th { color: #6b7178; font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: .03em; }
.ats-kw-table td.ok { color: #1aa683; font-weight: 700; text-align: center; }
.ats-kw-table td.missing { color: #b42318; font-weight: 700; text-align: center; }

/* ---------- Rearrange panel ---------- */
.rearrange-locked,
.rearrange-item {
  display: flex; align-items: center; gap: 0.55rem;
  border: 1px solid #e6e8eb; border-radius: 10px; padding: 0.65rem 0.75rem;
  background: #fff; margin-bottom: 0.45rem; font-size: 0.88rem;
}
.rearrange-locked { background: #f4f6f7; color: #6b7178; }
.rearrange-handle {
  color: #9aa1a8; cursor: grab; user-select: none; font-size: 0.9rem; line-height: 1;
}
.rearrange-handle.locked { cursor: default; }
.rearrange-list { list-style: none; margin: 0 0 1.1rem; padding: 0; }
.rearrange-item.dragging { opacity: 0.55; }
.rearrange-item.drag-over { border-color: #2ec7a6; background: #f3fbf8; }
.rearrange-form { margin-bottom: 0.35rem; }

/* ---------- Resume Score (guest) ---------- */
.rs-page { padding: 3.5rem 0 5rem; min-height: 70vh; }
.rs-upload { max-width: 40rem; }
.lp-wrap.rs-upload {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 2rem 2.1rem 2.25rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: box-shadow .2s ease, border-color .2s ease;
}
@media (max-width: 640px) {
  .lp-wrap.rs-upload { padding: 1.35rem 1.15rem 1.5rem; }
}
.rs-upload h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin: .35rem 0 0.75rem; letter-spacing: -.02em; }
.rs-upload .sub { color: var(--ink-muted); font-size: 1.05rem; margin: 0 0 1.75rem; }
.rs-error {
  background: #fdecea; color: #b42318; border: 1px solid #f5c2c0;
  border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1.25rem;
}
.rs-form { display: grid; gap: 1.1rem; }
.rs-dropzone {
  position: relative; display: grid; gap: .35rem; place-items: center; text-align: center;
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 2.4rem 1.25rem;
  background: linear-gradient(180deg, #f7fbfa 0%, #fff 70%); cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.rs-dropzone:hover, .rs-dropzone.is-drag { border-color: var(--brand); background: #f3fbf8; }
.rs-dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.rs-drop-title { font-weight: 600; color: var(--ink); }
.rs-drop-hint { font-size: .9rem; color: var(--ink-muted); }
.rs-field { display: grid; gap: .4rem; font-size: .92rem; color: var(--ink-muted); }
.rs-field input {
  border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem;
  font: inherit; color: var(--ink); background: #fff;
}
.rs-loading { display: flex; align-items: center; gap: .75rem; margin-top: 1.25rem; color: var(--ink-muted); }
.rs-loading[hidden] { display: none !important; }
.rs-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--brand);
  animation: rsSpin .7s linear infinite;
}
@keyframes rsSpin { to { transform: rotate(360deg); } }

.rs-result-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 3rem; align-items: start; }
.rs-score-col .ats-gauge { margin: 0 auto 1.25rem; }
.rs-score-col h1 { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.25; margin: 0 0 .75rem; }
.rs-filename { margin: 0 0 1.25rem; }
.rs-side-title { font-size: .95rem; margin: 0 0 .85rem; }
.rs-categories { margin: 0 0 1.25rem; display: grid; gap: .85rem; }
.rs-cat-head { display: flex; justify-content: space-between; gap: .75rem; font-size: .9rem; margin-bottom: .35rem; }
.rs-cat-name { font-weight: 600; }
.rs-cat-score { font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.rs-cat-bar {
  height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden;
}
.rs-cat-bar i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
}
.rs-cat-meta { margin: .35rem 0 0; font-size: .78rem; }
.rs-parse-card {
  margin: 0 0 1.5rem; padding: 1rem 1.1rem; border: 1px solid var(--line);
  border-radius: 12px; background: #f7fbfa;
}
.rs-parse-head {
  display: flex; justify-content: space-between; gap: .75rem; margin-bottom: .45rem; font-size: .92rem;
}
.rs-parse-card > .muted { margin: .55rem 0 0; font-size: .8rem; line-height: 1.45; }
.rs-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.rs-detail-col h2 { font-size: 1.05rem; margin: 0 0 .85rem; }
.rs-detail-col h2 + .rs-suggestions { margin-top: 0; }
.rs-check-group { margin-bottom: 1.5rem; }
.rs-check-group h3 {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-muted); margin: 0 0 .35rem;
}
.rs-checks, .rs-suggestions { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .65rem; }
.rs-checks li, .rs-suggestions li {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .85rem 0; border-bottom: 1px solid var(--line-soft);
}
.rs-check-mark {
  width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
}
.rs-checks li.pass .rs-check-mark { background: #e8f8f3; color: #0f8a6c; }
.rs-checks li.fail .rs-check-mark { background: #fff4e8; color: #c47a12; }
.rs-checks small { display: block; text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; margin-top: .15rem; }
.rs-check-detail { margin: .3rem 0 0; color: var(--ink-muted); font-size: .86rem; line-height: 1.45; }
.rs-pri {
  display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 700; padding: .2rem .45rem; border-radius: 6px; flex-shrink: 0; margin-top: .15rem;
}
.rs-pri-high { background: #fdecea; color: #b42318; }
.rs-pri-medium { background: #fff4e8; color: #a86410; }
.rs-pri-low { background: #eef2f4; color: #5c656d; }
.rs-suggestions p { margin: .25rem 0 0; color: var(--ink-muted); font-size: .92rem; line-height: 1.5; }

@media (max-width: 860px) {
  .rs-result-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- owl mark ---------- */
.logo-owl { object-fit: contain; user-select: none; -webkit-user-drag: none; }
.design-branding-left .logo-owl { width: 24px; height: 24px; }

/* =========================================================================
   OWL LOADER — one sprite, three waiting states
   Motion follows spec/loader-design-philosophy.md: 620ms cycle, fast
   downstroke, body lagging the wing by half a beat.
   ========================================================================= */
:root { --owl-cycle: 620ms; }

.owl-fly {
  background-image: url("../img/owl-fly-sprite.png");
  background-repeat: no-repeat;
  background-size: 800% 100%;      /* 8 frames in the strip */
  background-position: 0 0;
  animation: owlWing var(--owl-cycle) steps(7) infinite,
             owlBob  var(--owl-cycle) ease-in-out infinite;
  flex-shrink: 0;
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
  .owl-fly { background-image: url("../img/owl-fly-sprite@2x.png"); }
}
@keyframes owlWing { from { background-position: 0 0; } to { background-position: 100% 0; } }
@keyframes owlBob  { 0%, 100% { transform: translateY(3px); } 45% { transform: translateY(-4px); } }

/* strokes of air trailing the bird — readable flight direction to the right */
.owl-fly-wrap { position: relative; display: inline-flex; }
.owl-fly-wrap .speed-lines {
  position: absolute; right: 100%; top: 52%; width: 52px; height: 18px;
  margin-right: 6px; pointer-events: none;
}
.owl-fly-wrap .speed-lines i {
  position: absolute; right: 0; height: 2.5px; border-radius: 2px;
  background: var(--brand); opacity: 0;
  animation: owlDash 1.15s ease-out infinite;
}
.owl-fly-wrap .speed-lines i:nth-child(1) { top: 0;   width: 28px; animation-delay: 0s; }
.owl-fly-wrap .speed-lines i:nth-child(2) { top: 7px; width: 42px; animation-delay: .18s; }
.owl-fly-wrap .speed-lines i:nth-child(3) { top: 14px; width: 22px; animation-delay: .36s; }
@keyframes owlDash {
  0%   { transform: translateX(14px) scaleX(.4); opacity: 0; }
  30%  { opacity: .85; }
  100% { transform: translateX(-26px) scaleX(1); opacity: 0; }
}

/* ---------- full page overlay ---------- */
.owl-overlay {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(3px);
  opacity: 1; transition: opacity .15s ease, visibility .15s ease;
}
@media (prefers-reduced-motion: reduce) {
  .owl-overlay { transition: none; }
}
.owl-overlay[hidden] { display: none; }
.owl-overlay.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.owl-overlay .owl-fly { width: 132px; height: 132px; }
.owl-overlay-text { font-size: .96rem; color: var(--ink-muted); margin: 0; letter-spacing: .01em; }

/* ---------- inline (buttons, small panels) ---------- */
.owl-inline { display: inline-flex; align-items: center; gap: .5rem; vertical-align: middle; }
.owl-inline .owl-fly { width: 30px; height: 30px; }
.owl-inline-text { font-size: .9rem; color: var(--ink-muted); }
button .owl-inline .owl-fly, .btn .owl-inline .owl-fly { width: 26px; height: 26px; margin: -6px 0; }

/* ---------- thinking (LLM inference) ---------- */
.owl-thinking {
  display: flex; flex-direction: column; align-items: center; gap: .85rem;
  padding: 1.75rem 1.25rem; text-align: center;
}
.owl-thinking .owl-fly { width: 78px; height: 78px; }
.owl-thinking-text {
  font-size: .93rem; color: var(--ink-muted); margin: 0; min-height: 1.4em;
  animation: owlTextIn .35s ease;
}
@keyframes owlTextIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* host element that has a loader injected into it */
.owl-busy { position: relative; }
.owl-busy > .owl-thinking-veil {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .82); border-radius: inherit;
  animation: owlVeilIn .2s ease;
}
/* Keep owl near mid-viewport on the tall resume canvas */
#resume-canvas.owl-busy > .owl-thinking-veil {
  align-items: flex-start;
  padding-top: min(42vh, 280px);
}
@keyframes owlVeilIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- accessibility & print ---------- */
@media (prefers-reduced-motion: reduce) {
  .owl-fly {
    background-image: url("../img/owl-fly-still.png");
    background-size: 100% 100%;
    animation: owlBreathe 2.4s ease-in-out infinite;
  }
  .owl-fly-wrap .speed-lines { display: none; }
  @keyframes owlBreathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
}
@media print { .owl-overlay, .owl-thinking-veil, .owl-inline { display: none !important; } }

.from-score-importing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  text-align: center;
}

/* =========================================================================
   RESUME SCORE RESULT
   ========================================================================= */
.score-shell {
  --sc-purple: #5b53bf;
  --sc-purple-dark: #4a43a6;
  --sc-panel: #e3e8f3;
  --sc-inner: #fafbfd;
  --sc-green: #21a179;
  --sc-green-soft: #d8f2e7;
  --sc-amber: #e8912b;
  --sc-amber-soft: #fdeacf;
  --sc-red: #e0455e;
  --sc-red-soft: #fbdde2;
  background: #f5f7fb;
  min-height: 100vh;
}

/* ---------- top bar ---------- */
.score-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 2rem; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; flex-wrap: wrap;
}
.score-brand { display: inline-flex; align-items: center; gap: .55rem; }
.score-brand .logo-owl { width: 34px; height: 34px; }
.score-brand span { font-size: 1.35rem; font-weight: 600; color: var(--brand-dark); letter-spacing: -.02em; }
.score-topbar-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.btn-outline-purple, .btn-solid-purple {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 38px; padding: 0 16px; border-radius: 6px;
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1;
  letter-spacing: -.01em; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-outline-purple { background: #fff; color: var(--sc-purple); border: 2px solid var(--sc-purple); }
.btn-outline-purple:hover { background: #f1f0fa; color: var(--sc-purple); }
.btn-outline-purple svg { width: 22px; height: 22px; }
.btn-solid-purple { background: var(--sc-purple); color: #fff; border: 2px solid var(--sc-purple); }
.btn-solid-purple:hover { background: var(--sc-purple-dark); border-color: var(--sc-purple-dark); color: #fff; }
.btn-compact { min-height: 32px; padding: 0 14px; font-size: 13px; }
.btn-lg-purple { min-height: 46px; padding: 0 26px; font-size: 16px; }

/* ---------- layout ---------- */
.score-body {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.75rem;
  padding: 2rem; align-items: start; max-width: 1500px; margin: 0 auto;
}

/* ---------- sidebar ---------- */
.score-sidebar { position: sticky; top: 88px; }
.score-card {
  background: #fff; border-radius: 14px; padding: 1.6rem 1.4rem;
  box-shadow: 0 2px 14px rgba(31, 33, 36, .07);
}
.score-card-title { font-size: 1.5rem; font-weight: 600; text-align: center; margin: 0 0 .5rem; }
.score-value { text-align: center; font-size: 2.4rem; font-weight: 700; margin: 0; line-height: 1.1; }
.score-value span { font-size: 2.4rem; }
.score-value.score-band-high { color: var(--sc-green); }
.score-value.score-band-mid  { color: var(--sc-amber); }
.score-value.score-band-low  { color: var(--sc-red); }
.score-issues { text-align: center; color: var(--ink-muted); margin: .2rem 0 1.1rem; font-size: 1rem; }

.score-cat-list { border-top: 1px solid var(--line); }
.score-cat { border-bottom: 1px solid var(--line-soft); }
.score-cat > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem;
  padding: 1rem .2rem; font-size: .86rem; font-weight: 600; letter-spacing: .04em; color: #3d4247;
}
.score-cat > summary::-webkit-details-marker { display: none; }
.score-cat-name { flex: 1; }
.score-chevron { width: 17px; height: 17px; color: var(--ink-muted); transition: transform .2s ease; flex-shrink: 0; }
.score-cat[open] > summary .score-chevron { transform: rotate(180deg); }

.score-pill {
  border-radius: 999px; padding: .18rem .6rem; font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.score-pill.score-band-high { background: var(--sc-green-soft); color: #147a58; }
.score-pill.score-band-mid  { background: var(--sc-amber-soft); color: #a2610f; }
.score-pill.score-band-low  { background: var(--sc-red-soft);   color: #b02c43; }

.score-check-list { list-style: none; margin: 0 0 .9rem; padding: 0; display: grid; gap: .75rem; }
.score-check-list li { display: flex; align-items: center; gap: .55rem; font-size: .95rem; }
.score-check-icon { width: 17px; height: 17px; flex-shrink: 0; }
.score-check-list li.is-pass .score-check-icon { color: var(--sc-green); }
.score-check-list li.is-fail .score-check-icon { color: var(--sc-red); }
.score-check-label { flex: 1; color: #2f3438; }
.score-mini-pill {
  border: 1px solid var(--line); border-radius: 999px; padding: .12rem .55rem;
  font-size: .76rem; color: var(--ink-muted); white-space: nowrap; background: #fff;
}
.score-mini-pill.ok { background: var(--sc-green-soft); border-color: transparent; color: #147a58; }
.score-empty { color: var(--ink-faint); font-size: .9rem; }
.score-filename {
  margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--ink-faint); word-break: break-word;
}

/* ---------- detail panel ---------- */
.score-detail {
  background: var(--sc-panel); border-radius: 18px; padding: 1.75rem;
  display: grid; gap: 1.5rem;
}
.score-headline { margin: 0; font-size: 1.02rem; color: #3d4247; padding: 0 .4rem; }

.score-panel { background: #fff; border-radius: 14px; padding: 1.5rem 1.6rem; scroll-margin-top: 96px; }
.score-panel-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.25rem; }
.score-hex { color: var(--sc-purple); display: inline-flex; }
.score-hex svg { width: 30px; height: 30px; }
.score-panel-head h2 { flex: 1; margin: 0; font-size: 1.45rem; font-weight: 600; letter-spacing: .01em; }
.score-found-pill {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .55rem 1.1rem; font-size: .93rem; color: #3d4247; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(31,33,36,.06);
}
.score-panel-body { display: grid; gap: .9rem; }

.score-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--sc-inner); }
.score-item > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .7rem;
  padding: 1.1rem 1.25rem; font-size: 1rem; font-weight: 600; color: #2f3438;
}
.score-item > summary::-webkit-details-marker { display: none; }
.score-item-bar { width: 4px; height: 20px; border-radius: 2px; background: var(--sc-purple); flex-shrink: 0; }
.score-item.is-fail .score-item-bar { background: var(--sc-red); }
.score-item.is-pass .score-item-bar { background: var(--sc-green); }
.score-item-title { flex: 1; letter-spacing: .02em; }
.score-item-body { padding: 0 1.25rem 1.35rem; color: #3d4247; font-size: .97rem; line-height: 1.65; }
.score-item-body > p { margin: 0 0 .75rem; }
.score-item-body > p:last-child { margin-bottom: 0; }

/* ---------- parse rate ---------- */
.parse-box { border: 1px solid var(--line); border-radius: 12px; padding: 2.2rem 1.5rem 1.5rem; margin-top: 1.1rem; background: var(--sc-inner); }
.parse-track {
  position: relative; height: 15px; border-radius: 999px;
  background: #eef0f3; border: 1px solid #dfe3e7; max-width: 620px; margin: 0 auto;
}
.parse-fill {
  position: absolute; inset: 2px auto 2px 2px; height: calc(100% - 4px);
  border-radius: 999px; background: linear-gradient(90deg, #21a179, #2bbd8c);
  transition: width .8s cubic-bezier(.22,.9,.3,1);
}
.parse-pin {
  position: absolute; bottom: 100%; transform: translate(-50%, 4px);
  color: var(--sc-green); line-height: 0;
}
.parse-pin svg { width: 26px; height: 26px; }
.parse-verdict { text-align: center; font-size: 1.22rem; line-height: 1.5; margin: 1.4rem 0 .4rem; color: #2f3438; }
.parse-note { text-align: center; font-size: .86rem; color: var(--ink-faint); margin: 0 0 1.4rem; }

.parse-promo { border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem 1.5rem; }
.parse-promo > p { text-align: center; font-size: 1.15rem; font-weight: 600; margin: 0 0 1.1rem; }
.parse-promo-row {
  display: flex; align-items: center; gap: .7rem;
  border-top: 1px solid var(--line); padding-top: 1.1rem; flex-wrap: wrap;
}
.parse-promo-row svg { width: 20px; height: 20px; color: var(--ink-muted); flex-shrink: 0; }
.parse-promo-row span { flex: 1; font-size: 1rem; min-width: 0; word-break: break-word; }

/* ---------- suggestions inside a panel ---------- */
.score-sug-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.score-sug-list li { display: flex; gap: .8rem; align-items: flex-start; }
.score-sug-list strong { display: block; margin-bottom: .15rem; }
.score-sug-list p { margin: 0; color: var(--ink-muted); font-size: .93rem; }
.score-pri {
  border-radius: 999px; padding: .16rem .6rem; font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0;
}
.score-pri-high { background: var(--sc-red-soft); color: #b02c43; }
.score-pri-medium { background: var(--sc-amber-soft); color: #a2610f; }
.score-pri-low { background: var(--sc-green-soft); color: #147a58; }

.score-footer-cta { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; padding: .5rem 0 1rem; }

@media (max-width: 1080px) {
  .score-body { grid-template-columns: 1fr; padding: 1.25rem; }
  .score-sidebar { position: static; }
  .score-detail { padding: 1.1rem; }
  .score-panel { padding: 1.2rem; }
  .score-topbar { padding: .75rem 1rem; }
  .score-panel-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .parse-fill { transition: none; }
  .score-chevron { transition: none; }
}
.score-panel.is-target { box-shadow: 0 0 0 2px rgba(108, 92, 231, .4); transition: box-shadow .3s ease; }

/* `.editor-body a { color: inherit }` (0,1,1) outranks the plain button
   classes (0,1,0), so the score-page buttons inherited the dark body colour.
   Scoping under .score-shell restores the intended colours. */
.score-shell .btn-solid-purple,
.score-shell .btn-solid-purple:hover,
.score-shell .btn-solid-purple:visited { color: #fff; }
.score-shell .btn-solid-purple.owl-busy {
  pointer-events: none;
}
.score-shell .btn-solid-purple.owl-busy > .owl-thinking-veil {
  background: rgba(74, 67, 166, .92);
  border-radius: inherit;
}
.score-shell .btn-solid-purple.owl-busy .owl-fly { width: 22px; height: 22px; }
.score-shell .btn-solid-purple.owl-busy .owl-inline-text { color: #fff; }
.score-shell .btn-outline-purple,
.score-shell .btn-outline-purple:hover,
.score-shell .btn-outline-purple:visited { color: var(--sc-purple); }

/* Job search MVP enhancements */
.jobs-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  z-index: 20;
  padding: 0.35rem 0 0.45rem;
  max-height: min(22rem, 70vh);
  overflow: auto;
}
.jobs-search-dropdown[hidden] { display: none; }
.jobs-search-dropdown-heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.55rem 1rem 0.35rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.jobs-search-dropdown-heading svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.jobs-search-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.jobs-search-suggest {
  display: block;
  padding: 0.62rem 1rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.4;
}
.jobs-search-suggest:hover,
.jobs-search-suggest:focus {
  background: #f5f6f8;
  outline: none;
}
.jobs-tip-dismiss {
  grid-column: 3;
  justify-self: end;
  margin: 0;
  padding: 0 0.15rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.7;
}
.jobs-clear-q {
  margin-left: auto;
  text-decoration: none;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.7;
}
.jobs-find-search { position: relative; }
.jobs-clear-q {
  position: absolute;
  right: calc(46px + 1.15rem);
  top: 50%;
  transform: translateY(-50%);
}
.jobs-meta-pill {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: #eef2ff;
  color: #3730a3;
  text-transform: lowercase;
}
.jobs-relax-note { margin: 0.5rem auto 0; font-size: 0.9rem; flex-shrink: 0; }
.jobs-load-more { padding: 1rem 0 1.5rem; text-align: center; }
.jobs-skeleton-card {
  height: 96px;
  border-radius: 12px;
  margin-bottom: 0.65rem;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
  background-size: 400% 100%;
  animation: jobs-shimmer 1.2s ease-in-out infinite;
}
@keyframes jobs-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
.ghost-signal-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.ghost-signal {
  display: grid;
  gap: 0.1rem;
  font-size: 0.88rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: #f8fafc;
}
.ghost-signal-positive { border-left: 3px solid #1aa683; }
.ghost-signal-warning { border-left: 3px solid #d97706; }
.ghost-signal-neutral { border-left: 3px solid #94a3b8; }
.salary-estimated { color: var(--ink-muted); font-size: 0.8em; }
.jobs-match-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.jobs-match-tabs { display: flex; gap: 0.35rem; }
.jobs-match-tabs .btn {
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  min-height: 0;
  gap: 0.25rem;
}
.jobs-match-checklist { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.jobs-match-checklist .is-matched { color: #0f6b4d; }
.jobs-match-checklist .is-gap { color: #b45309; }

/* ===================== Job Tracker ===================== */
.tracker-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 0 1.25rem;
  background: #fff;
}
.tracker-toolbar {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.tracker-title {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-shrink: 0;
  color: var(--ink);
}
.tracker-title h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.tracker-title-icon { width: 22px; height: 22px; color: var(--ink); }
.tracker-search {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 .85rem;
  background: #fff;
  height: 40px;
  color: var(--ink-muted);
}
.tracker-search svg { width: 16px; height: 16px; flex-shrink: 0; }
.tracker-search input {
  border: 0;
  padding: 0;
  height: 38px;
  border-radius: 0;
  font-size: 14px;
  background: transparent;
}
.tracker-search input:focus { outline: none; border-color: transparent; box-shadow: none; }
.tracker-search input::placeholder { color: #b0b0b0; }
.tracker-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.tracker-chip:hover { background: var(--hover); }
.tracker-chip svg { width: 16px; height: 16px; color: var(--ink-muted); }
.tracker-caret { width: 12px !important; height: 12px !important; transition: transform .2s ease; }
.tracker-chip.is-open .tracker-caret { transform: rotate(180deg); }
.tracker-new-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  white-space: nowrap;
}
.tracker-menu-btn svg { width: 16px; height: 16px; color: var(--ink); }
.tracker-check {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.tracker-check input { width: auto; margin: 0; }
.tracker-stats-menu { min-width: 220px; padding: .5rem 0; }
.tracker-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--ink);
}
.tracker-stat-row strong { font-weight: 600; }
.tracker-status-menu button.is-active { background: var(--hover); font-weight: 600; }

.tracker-table-wrap { width: 100%; overflow-x: auto; overflow-y: visible; }
.tracker-table .menu-panel.open {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.tracker-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.tracker-table th,
.tracker-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tracker-table th {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--bg-soft);
}
.tracker-col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
}
.tracker-col-resizer::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 3px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
}
.tracker-col-resizer:hover::after,
.tracker-col-resizer.is-active::after {
  background: var(--purple);
}
body.is-col-resizing {
  cursor: col-resize;
  user-select: none;
}
body.is-col-resizing * { cursor: col-resize !important; }
.tracker-table tbody tr:hover td { background: var(--hover); }
.tracker-add-row td { background: #fff; overflow: visible; }
.tracker-add-row:hover td { background: #fff; }
.tracker-col-check { width: 36px; padding-left: 4px !important; padding-right: 4px !important; }
.tracker-col-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--purple); cursor: pointer; }
.tracker-col-position { width: 14%; }
.tracker-col-company { width: 10%; }
.tracker-col-status { width: 14%; }
.tracker-col-date_saved,
.tracker-col-date_applied { width: 8%; color: var(--ink); }
.tracker-col-link,
.tracker-col-icon { width: 40px; text-align: center; }
.tracker-table th.tracker-col-icon svg {
  width: 16px; height: 16px; color: var(--purple); display: block; margin: 0 auto;
}
.tracker-col-type { width: 10%; }
.tracker-col-resume,
.tracker-col-cover { width: 12%; }
.tracker-col-location,
.tracker-col-salary,
.tracker-col-custom {
  width: 10%;
  min-width: 110px;
}
.tracker-table .is-col-hidden {
  display: none !important;
}
.tracker-table th.tracker-col-type,
.tracker-table td.tracker-col-type {
  padding-right: 18px;
}
.tracker-table th.tracker-col-resume,
.tracker-table td.tracker-col-resume {
  padding-left: 16px;
}
.tracker-table th.tracker-col-notes,
.tracker-table td.tracker-col-notes {
  width: 12%;
  min-width: 120px;
  overflow: visible;
}
.tracker-table th.tracker-col-add,
.tracker-table td.tracker-col-add {
  width: 48px;
  min-width: 48px;
  text-align: center;
  overflow: visible;
}
.tracker-table th.tracker-col-status,
.tracker-table td.tracker-col-status,
.tracker-table th.tracker-col-type,
.tracker-table td.tracker-col-type,
.tracker-table th.tracker-col-check,
.tracker-table td.tracker-col-check,
.tracker-table th.tracker-col-link,
.tracker-table td.tracker-col-link {
  overflow: visible;
}
.tracker-table td.tracker-col-resume,
.tracker-table td.tracker-col-cover {
  overflow: visible;
}
.tracker-table td.tracker-col-resume:has(.menu-panel.open),
.tracker-table td.tracker-col-cover:has(.menu-panel.open) {
  position: relative;
  z-index: 6;
}
.tracker-col-resume .menu-wrap,
.tracker-col-cover .menu-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.tracker-position {
  display: block;
  font-weight: 600;
  color: var(--ink);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tracker-position:hover { color: var(--purple); }
.tracker-company {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tracker-date { color: var(--ink); font-size: 14px; }
.tracker-add-link {
  border: 0;
  background: transparent;
  color: #b0b0b0;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.tracker-col-cover .tracker-add-link,
.tracker-col-resume .tracker-add-link {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tracker-add-row input {
  border: 0;
  padding: 0;
  height: auto;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  font-style: italic;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
.tracker-add-row input::placeholder { color: #c0c0c0; font-style: italic; }
.tracker-add-row input:focus { outline: none; box-shadow: none; }

.tracker-status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: 100%;
  border: 0;
  border-radius: 999px;
  padding: .42rem .78rem .42rem .7rem;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.tracker-status svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke-width: 2.6;
  stroke: currentColor;
}
.tracker-status .tracker-caret {
  width: 11px !important;
  height: 11px !important;
  margin-left: .05rem;
  stroke-width: 2.6;
  opacity: .75;
}
.tracker-status-bookmarked { background: #D9C8F5; color: #4A2FBD; }
.tracker-status-applied { background: #BFE4F7; color: #0F6F9C; }
.tracker-status-rejected { background: #F5C4BE; color: #C0392B; }
.tracker-status-interview { background: #F8D7A0; color: #9A5A0A; }
.tracker-status-offer { background: #B7E9D8; color: #0F6B4D; }
.tracker-status-withdrawn { background: #D8D8D8; color: #444444; }
.tracker-status:hover { filter: brightness(0.97); }

.tracker-type {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .28rem .65rem;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.tracker-type.is-empty { color: var(--ink-muted); }
.tracker-type svg { width: 14px; height: 14px; color: var(--ink-muted); }

.tracker-link {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--purple);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.tracker-link svg { width: 16px; height: 16px; }
.tracker-link:hover { color: var(--purple-hover); }
.tracker-link.is-disabled { color: #d0d0d0; cursor: default; }

.tracker-date-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.tracker-date-wrap input[type="date"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
}

.tracker-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.tracker-resume-score {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: .15rem .4rem;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.tracker-resume-score.is-mid { background: #F5A623; }
.tracker-resume-score.is-high { background: #1FB891; }
.tracker-resume-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}
.tracker-doc-pill {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  padding: .28rem .7rem;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.tracker-doc-pill.is-mid { background: var(--amber-soft); color: #c47a12; }
.tracker-doc-pill.is-high { background: var(--brand-soft); color: var(--brand-dark); }
.tracker-doc-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 14px;
}
.tracker-caret-btn {
  border: 0;
  background: transparent;
  padding: 0 0 0 .2rem;
  cursor: pointer;
  color: var(--ink-muted);
}
.tracker-note {
  border: 0 !important;
  padding: 0 !important;
  height: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 14px;
  width: 100%;
}
.tracker-note:focus { outline: none; box-shadow: none; }
.tracker-note::placeholder { color: #c0c0c0; font-style: italic; }

.tracker-add-col {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}
.tracker-add-col:hover { background: var(--hover); color: var(--ink); }

.tracker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 0;
}
.tracker-count { color: var(--ink-muted); font-size: 14px; }
.tracker-explore {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--purple);
  font-size: 14px;
  font-weight: 500;
}
.tracker-explore:hover { text-decoration: underline; }
.tracker-explore svg { width: 16px; height: 16px; }

.tracker-row.is-hidden { display: none; }
.tracker-table .menu-panel { z-index: 30; min-width: 180px; }

.tracker-activity {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
  transition: max-height .35s ease, opacity .25s ease, margin .35s ease;
}
.tracker-activity.is-open {
  max-height: 560px;
  opacity: 1;
  margin: 0 0 1rem;
  pointer-events: auto;
}
.tracker-activity-inner {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 1.1rem 1.15rem 1.2rem;
}
.tracker-activity-title {
  margin: 0 0 .9rem;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.tracker-activity-statuses {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .6rem;
  margin-bottom: .85rem;
}
.tracker-activity-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
  min-width: 0;
  padding: .65rem .7rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}
.tracker-activity-status-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.tracker-activity-status-icon svg { width: 16px; height: 16px; }
.tracker-activity-status-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.tracker-activity-status strong {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--ink);
}
.tracker-activity-status.is-bookmarked .tracker-activity-status-icon {
  background: var(--purple-soft);
  color: var(--purple);
}
.tracker-activity-status.is-applied .tracker-activity-status-icon {
  background: var(--info-soft);
  color: #1a8fc2;
}
.tracker-activity-status.is-interview .tracker-activity-status-icon {
  background: var(--amber-soft);
  color: #b9700f;
}
.tracker-activity-status.is-offer .tracker-activity-status-icon {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.tracker-activity-status.is-rejected .tracker-activity-status-icon {
  background: var(--danger-soft);
  color: var(--danger);
}
.tracker-activity-status.is-withdrawn .tracker-activity-status-icon {
  background: var(--hover);
  color: var(--ink-muted);
}
.tracker-activity-metrics {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.tracker-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .75rem 1rem;
  min-height: 72px;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.tracker-activity-metric {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
}
.tracker-activity-metric-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--ink-muted);
  background: var(--hover);
  flex-shrink: 0;
}
.tracker-activity-metric-icon svg { width: 20px; height: 20px; }
.tracker-activity-metric.is-applied .tracker-activity-metric-icon {
  background: var(--info-soft);
  color: #1a8fc2;
}
.tracker-activity-metric.is-interview .tracker-activity-metric-icon {
  background: var(--amber-soft);
  color: #b9700f;
}
.tracker-activity-metric.is-bookmarked .tracker-activity-metric-icon {
  background: var(--purple-soft);
  color: var(--purple);
}
.tracker-activity-metric.is-offer .tracker-activity-metric-icon {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.tracker-activity-metric p {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.35;
}
.tracker-activity-metric strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.tracker-sparkline {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: #F3F4F6;
  color: #c8c8c8;
}
.tracker-sparkline svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tracker-sparkline.is-up { color: var(--brand); }
.tracker-sparkline.is-down { color: #E36B6B; }
.tracker-sparkline.is-flat { color: #B8B8B8; }

@media (max-width: 1024px) {
  .tracker-activity-statuses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tracker-activity-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .tracker-sparkline { justify-self: start; }
}
@media (max-width: 640px) {
  .tracker-activity-statuses { grid-template-columns: 1fr 1fr; }
}

.tracker-modal {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
  max-width: 420px;
  width: calc(100% - 2rem);
}
.tracker-modal::backdrop { background: rgba(0, 0, 0, .35); }
.tracker-modal h3 { margin: 0 0 1rem; font-size: 1.1rem; }
.tracker-modal label { margin-bottom: .85rem; }
.tracker-modal-actions { justify-content: flex-end; margin-top: .5rem; }

@media (max-width: 1024px) {
  .tracker-toolbar { gap: .5rem; }
  .tracker-search { min-width: 140px; flex-basis: 100%; order: 3; }
  .tracker-new-btn { margin-left: auto; }
  .tracker-table th,
  .tracker-table td { padding: 10px 8px; font-size: 13px; }
}

/* ===================== Landing — ATS explainer ===================== */
.ats-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
  margin-top: 3rem; position: relative;
}
.ats-step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.75rem 1.6rem; position: relative;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ats-step:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(31,33,36,.09); border-color: #d5d9dd; }
.ats-step-num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-weight: 600; font-size: 1.05rem; margin-bottom: 1rem;
}
.ats-step h3 { margin: 0 0 .5rem; font-size: 1.12rem; font-weight: 600; }
.ats-step p { margin: 0; color: var(--ink-muted); font-size: .95rem; }

.ats-help {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem;
  align-items: center; margin-top: 4rem;
}
.ats-help-title { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 600; margin: .6rem 0 1.5rem; }
.ats-help .match-list li { align-items: flex-start; }
.ats-help .match-list strong { font-weight: 600; }

/* mock score card */
.ats-mock {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: 0 18px 44px rgba(31,33,36,.1);
}
.ats-mock-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ats-mock-label { font-size: .88rem; color: var(--ink-muted); }
.ats-mock-score { font-size: 2.1rem; font-weight: 600; color: var(--brand-dark); line-height: 1; }
.ats-mock-score small { font-size: 1.1rem; font-weight: 500; }
.ats-mock-bar {
  height: 9px; border-radius: 999px; background: var(--line-soft);
  overflow: hidden; margin: .85rem 0 1.5rem;
}
.ats-mock-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #27b894); }
.ats-mock-sub {
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 .55rem;
}
.ats-mock .reasons { margin: 0 0 1.35rem; }
.ats-mock .reasons.missing span { background: var(--hover); color: var(--ink-muted); }
.ats-mock-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--line); padding-top: 1.1rem; flex-wrap: wrap;
}
.ats-mock-parse { font-size: .92rem; color: var(--ink-muted); }
.ats-mock-parse strong { color: var(--ink); font-weight: 600; }

@media (max-width: 980px) {
  .ats-steps { grid-template-columns: 1fr; }
  .ats-help { grid-template-columns: 1fr; gap: 2.5rem; margin-top: 2.5rem; }
}

/* ===================== Onboarding guided tour ===================== */
.tour-fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1400;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1rem .7rem .75rem; border: none; border-radius: 999px;
  background: var(--brand); color: #fff; cursor: pointer;
  font-family: var(--font); font-size: .88rem; font-weight: 600;
  box-shadow: 0 10px 28px rgba(31, 184, 145, .38);
  transition: transform .18s ease, background .15s ease, box-shadow .18s ease, opacity .2s ease;
}
.tour-fab[hidden] { display: none !important; }
.tour-fab:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(31, 184, 145, .45); }
.tour-fab:active { transform: translateY(0); }
.tour-fab-label { line-height: 1; }

#onboarding-tour {
  position: fixed; inset: 0; z-index: 1500;
  opacity: 0; transition: opacity .22s ease;
}
#onboarding-tour.is-open { opacity: 1; }
#onboarding-tour[hidden] { display: none; }

.tour-spotlight {
  position: fixed; z-index: 1; border-radius: 12px; pointer-events: none;
  box-shadow:
    0 0 0 9999px rgba(31, 33, 36, .55),
    0 0 0 3px rgba(31, 184, 145, .55),
    0 0 30px 6px rgba(31, 184, 145, .35);
  transition: top .35s ease, left .35s ease, width .35s ease, height .35s ease, box-shadow .35s ease;
}
.tour-spotlight.is-centered {
  border-radius: 0;
  box-shadow: 0 0 0 9999px rgba(31, 33, 36, .55);
}

.tour-hand {
  position: fixed; z-index: 3; width: 52px; height: 52px; pointer-events: none;
  transition: top .35s ease, left .35s ease;
}
.tour-hand svg {
  display: block;
  filter: drop-shadow(0 4px 10px rgba(31, 33, 36, .45));
  animation: tour-hand-bob 1.3s ease-in-out infinite;
}
.tour-hand.is-flipped { transform: rotate(180deg); }
.tour-hand-ripple {
  position: absolute; top: 0; left: 14px; width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, .95); border-radius: 50%;
  animation: tour-hand-ripple 1.3s ease-out infinite;
}
@keyframes tour-hand-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes tour-hand-ripple {
  0% { transform: scale(.4); opacity: 0; }
  40% { opacity: .9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.tour-card {
  position: fixed; z-index: 4; width: min(410px, calc(100vw - 32px));
  background: #fff; border-radius: 16px; padding: 1.4rem 1.5rem 1.15rem;
  box-shadow: 0 24px 64px rgba(31, 33, 36, .3);
  outline: none;
  transition: top .35s ease, left .35s ease;
}
.tour-card.is-centered {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  transition: none;
}

.tour-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-dark);
}
.tour-eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.tour-title { margin: .55rem 0 .4rem; font-size: 1.28rem; font-weight: 600; color: #1f2124; }
.tour-text { margin: 0; color: var(--ink-muted); font-size: .95rem; }

.tour-list { list-style: none; margin: .85rem 0 0; padding: 0; display: grid; gap: .45rem; }
.tour-list li {
  position: relative; padding-left: 1.6rem; font-size: .92rem; color: var(--ink);
}
.tour-list li::before {
  content: ""; position: absolute; left: 0; top: .18rem; width: 16px; height: 16px;
  border-radius: 50%; background: var(--brand-soft);
}
.tour-list li::after {
  content: ""; position: absolute; left: 4px; top: .42rem; width: 8px; height: 4.5px;
  border-left: 2px solid var(--brand-dark); border-bottom: 2px solid var(--brand-dark);
  transform: rotate(-45deg);
}

.tour-cta { margin-top: 1.1rem; }
.tour-cta .btn { width: 100%; justify-content: center; }

.tour-nav { display: flex; align-items: center; gap: .75rem; margin-top: 1.2rem; }
.tour-arrow {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: none; border-radius: 50%; cursor: pointer;
  background: var(--brand); color: #fff;
  transition: background .15s ease, transform .15s ease;
}
.tour-arrow:hover:not(:disabled) { background: var(--brand-dark); transform: scale(1.06); }
.tour-arrow:disabled { background: var(--line-soft); color: var(--ink-faint); cursor: default; }
.tour-arrow.is-done { background: var(--brand-dark); }
.tour-arrow.is-done:hover { background: #117a5c; }
.tour-dots { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; }
.tour-dot {
  width: 7px; height: 7px; border-radius: 999px; background: var(--line);
  transition: background .2s ease, width .2s ease;
}
.tour-dot.is-active { width: 20px; background: var(--brand); }
.tour-counter { font-size: .8rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; flex: none; }

.tour-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1.1rem; padding-top: .85rem; border-top: 1px solid var(--line-soft);
}
.tour-dontshow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .84rem; color: var(--ink-muted); cursor: pointer; user-select: none;
}
.tour-dontshow input { accent-color: var(--brand); width: 15px; height: 15px; margin: 0; }
.tour-skip {
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: .4rem 1.1rem; font-family: var(--font); font-size: .88rem; font-weight: 600;
  color: var(--ink); cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.tour-skip:hover { background: var(--hover); border-color: #cfd4d9; }

@media (max-width: 640px) {
  .tour-card { width: calc(100vw - 24px); padding: 1.2rem 1.2rem 1rem; }
  .tour-title { font-size: 1.15rem; }
  .tour-fab { right: 1rem; bottom: 1rem; padding: .72rem; }
  .tour-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

.seo-page .seo-prose { max-width: 760px; margin: 0 auto; }
.seo-lede { margin: 0.75rem auto 0; max-width: 640px; }
.seo-section { margin: 2rem auto 0; max-width: 760px; }
.seo-section h2 { font-size: 1.25rem; margin: 0 0 0.75rem; }
.seo-section p { color: var(--ink-muted); line-height: 1.7; margin: 0 0 0.85rem; }
.seo-section ul { margin: 0 0 1rem 1.2rem; color: var(--ink-muted); line-height: 1.7; }
.seo-cta { text-align: center; margin: 2.5rem 0 0; }
.seo-related { margin: 3rem auto 0; max-width: 760px; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.seo-related h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }
.seo-related ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.seo-related a { color: var(--purple); font-weight: 600; text-decoration: none; }
.seo-related a:hover { text-decoration: underline; }
.seo-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
}
.seo-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.seo-hub-card:hover { border-color: var(--brand); }
.seo-hub-card strong { font-size: 1.02rem; }
.seo-hub-card span { color: var(--ink-muted); font-size: 0.92rem; line-height: 1.5; }
.seo-more { text-align: center; margin: 1.5rem 0 0; }
.seo-more a { color: var(--purple); font-weight: 600; text-decoration: none; }
.seo-more a:hover { text-decoration: underline; }
.seo-list-heading { margin: 2.5rem 0 1rem; font-size: 1.2rem; }
.seo-guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.seo-guide-list li { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.seo-guide-list a { color: var(--ink); font-weight: 650; text-decoration: none; }
.seo-guide-list a:hover { color: var(--purple); }
.seo-guide-list p { margin: 0.35rem 0 0; color: var(--ink-muted); font-size: 0.92rem; }
.rs-mini-faq { margin: 2.75rem auto 0; text-align: left; }
.rs-mini-faq h2 { font-size: 1.15rem; margin: 0 0 0.85rem; }
.rs-seo-links { margin: 1.5rem 0 0; text-align: center; }
.rs-seo-links a { color: var(--purple); font-weight: 600; text-decoration: none; }
.rs-seo-links a:hover { text-decoration: underline; }
.rs-share { margin: 0.35rem 0 1.25rem; font-size: 0.92rem; }
.site-footer .footer-legal + .footer-legal { margin-top: 0.65rem; }
