/* ============================================================================
   Top the Stack - design system
   Light, editorial, professional. Ink + evergreen. No gradients/glows.
   ========================================================================== */

:root {
  /* neutrals */
  --ink: #181a1f;
  --ink-2: #333842;
  --muted: #646b76;
  --faint: #8a909a;
  --bg: #f3f4f1; /* warm paper neutral */
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --border: #e4e6e0;
  --border-strong: #d3d6cd;

  /* brand: evergreen */
  --brand: #14503b;
  --brand-strong: #0f3d2c;
  --brand-tint: #e8f0eb;
  --accent: #1e9e6a;

  /* semantic */
  --amber-ink: #8a5a12;
  --amber-bg: #f6edd9;
  --amber-border: #e7d4a6;
  --danger: #b23b3b;
  --danger-bg: #f7e5e3;

  /* type */
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(24, 26, 31, 0.04), 0 1px 3px rgba(24, 26, 31, 0.05);
  --shadow-sm: 0 1px 2px rgba(24, 26, 31, 0.05);
  --maxw: 900px;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: var(--brand);
}

/* ---- Header / nav / logo -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 30px;
  height: 26px;
  display: block;
  flex: none;
}
.brand-name {
  font-size: 18.5px;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-transform: lowercase;
}
.brand-name .wm {
  font-weight: 500;
}
.brand-name .wm.b {
  font-weight: 800;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.nav a:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.nav a.active {
  color: var(--brand);
}
.nav a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.auth-slot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}
.user-chip {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.linkbtn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  text-decoration: none;
}
.linkbtn:hover {
  text-decoration: underline;
}

/* compact user menu (app header) */
.user-menu {
  position: relative;
  margin-left: 8px;
}
.user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 2px;
  border-radius: 999px;
  cursor: pointer;
}
.user-btn .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
}
.user-btn:hover .avatar {
  border-color: #c4ddce;
}
.user-btn.active .avatar {
  background: var(--brand);
  color: #fff;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.12);
  padding: 6px;
  display: none;
  z-index: 60;
}
.user-dropdown.open {
  display: block;
}
.user-email {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 10px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.dropdown-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.dropdown-item.active {
  color: var(--brand);
  background: var(--brand-tint);
}
.dropdown-item.danger {
  color: var(--danger);
}
.dropdown-item.danger:hover {
  background: var(--danger-bg);
}
@media (max-width: 640px) {
  .user-chip {
    display: none;
  }
}

/* ---- Auth (account page) form -------------------------------------------- */
.auth-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 18px;
}
.auth-tabs button {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.auth-tabs button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.auth-form {
  max-width: 380px;
}
.auth-msg {
  font-size: 13.5px;
  margin-top: 12px;
}
.auth-msg.err {
  color: var(--danger);
}
.auth-msg.ok {
  color: var(--accent);
}
.auth-note {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber-ink);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13.5px;
}

/* ---- Auth gate: hide protected content until the session check resolves,
   so you never see a flash of the app before a redirect to sign in. ---------- */
.auth-splash {
  display: none;
}
body.gated main {
  display: none;
}
body.gated .auth-splash {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 55vh;
  color: var(--muted);
  font-size: 14px;
}
body.gated.ready main {
  display: flex;
}
body.gated.ready .auth-splash {
  display: none;
}
.mini-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

/* ---- Layout --------------------------------------------------------------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.page-intro {
  margin: 6px 2px 2px;
}
.page-intro h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.page-intro p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 62ch;
}

/* ---- Cards ---------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.card-header h2,
.card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

/* ---- Forms ---------------------------------------------------------------- */
.label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 2px 0 6px;
}
.label .optional {
  font-weight: 400;
  color: var(--faint);
}
.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 12px;
}
.input,
.textarea {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 14px;
  font-family: var(--font);
  line-height: 1.5;
}
.textarea {
  resize: vertical;
  min-height: 170px;
  font-family: var(--mono);
  font-size: 13px;
}
.textarea.mono-sm {
  min-height: 150px;
}
.textarea.pref {
  min-height: 84px;
}
.textarea.answer {
  min-height: 180px;
}
.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s ease, border-color 0.14s ease,
    transform 0.04s ease;
}
.btn:hover {
  background: var(--surface-2);
  border-color: var(--faint);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.btn-ghost {
  background: transparent;
}
.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn .ico {
  width: 15px;
  height: 15px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ---- Small status text ---------------------------------------------------- */
.status-text {
  font-size: 13px;
  color: var(--muted);
}
.status-text.ok {
  color: var(--accent);
}
.status-text.err {
  color: var(--danger);
}

/* ---- Progress steps ------------------------------------------------------- */
.hidden {
  display: none !important;
}
.steps {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.steps li {
  position: relative;
  padding: 9px 0 9px 28px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.steps li:first-child {
  border-top: none;
}
.steps li.done,
.steps li.active {
  color: var(--ink);
}
.steps li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 13px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface);
}
.steps li.done::before {
  border-color: var(--accent);
  background: var(--accent);
}
.steps li.active::before {
  border: 2px solid var(--brand-tint);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
  background: var(--surface);
}
.steps li.error {
  color: var(--danger);
}
.steps li.error::before {
  border-color: var(--danger);
  background: var(--danger);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Results -------------------------------------------------------------- */
.result-meta {
  color: var(--muted);
  font-size: 14.5px;
  margin: 2px 0 16px;
}
.result-meta strong {
  color: var(--ink);
}
.downloads {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.note {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: 13.5px;
}
.note h3 {
  margin: 0 0 7px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.note.warn {
  background: var(--amber-bg);
  border-color: var(--amber-border);
}
.note.warn h3 {
  color: var(--amber-ink);
}
.note ul {
  margin: 0;
  padding-left: 18px;
}
.note li {
  margin-bottom: 4px;
}
.note p {
  margin: 0;
}
.cover-area .card-header {
  margin-bottom: 6px;
}

/* ---- Tracking table ------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  margin-top: 6px;
}
.track-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 720px;
}
.track-table th,
.track-table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.track-table thead th {
  color: var(--faint);
  font-weight: 650;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-strong);
}
.track-table tbody tr:hover {
  background: var(--surface-2);
}
.track-table td.nowrap {
  white-space: nowrap;
  color: var(--muted);
}
.track-table td.company {
  font-weight: 600;
}
.track-table td.files a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 550;
}
.track-table td.files a:hover {
  text-decoration: underline;
}
.track-table .dot {
  color: var(--faint);
  padding: 0 5px;
}
.track-table td.rowdel {
  text-align: right;
  width: 42px;
}
.icon-btn {
  background: transparent;
  border: none;
  color: var(--faint);
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: inline-flex;
}
.icon-btn:hover {
  color: var(--danger);
  background: var(--danger-bg);
}
.icon-btn .ico {
  width: 15px;
  height: 15px;
}

/* status select styled as a pill */
.status-select {
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 5px 26px 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5L5 6.5L8 3.5' stroke='%23646b76' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
.status-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.status-select[data-status="Applied"] {
  color: #3a4a63;
  background-color: #eef2f8;
  border-color: #d6dfec;
}
.status-select[data-status="Following Up"] {
  color: var(--amber-ink);
  background-color: var(--amber-bg);
  border-color: var(--amber-border);
}
.status-select[data-status="Interviewing"] {
  color: var(--brand);
  background-color: var(--brand-tint);
  border-color: #c4ddce;
}
.status-select[data-status="Rejected"] {
  color: var(--danger);
  background-color: var(--danger-bg);
  border-color: #ecc9c5;
}
.status-select[data-status="Hired"] {
  color: #fff;
  background-color: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5L5 6.5L8 3.5' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.notes-input {
  width: 100%;
  min-width: 180px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  padding: 6px 8px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--ink);
  resize: vertical;
  min-height: 34px;
  line-height: 1.4;
}
.notes-input:hover {
  border-color: var(--border);
}
.notes-input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.empty-state {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 2px;
}

/* ---- User Context page ---------------------------------------------------- */
.context-q {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.context-q:first-of-type {
  border-top: none;
  padding-top: 4px;
}
.context-q .q-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}
.context-q .q-text {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 10px;
  color: var(--ink);
}
.context-q .textarea {
  min-height: 120px;
}

/* ---- Account stub --------------------------------------------------------- */
.stub-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 650;
  color: var(--amber-ink);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 14px;
}
.stub .input[disabled] {
  background: var(--surface-2);
  color: var(--faint);
  cursor: not-allowed;
}
.field {
  margin-bottom: 14px;
}

/* ---- Footer --------------------------------------------------------------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px 40px;
  color: var(--faint);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer .footer-mark {
  width: 18px;
  height: 16px;
}

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
    gap: 10px;
  }
  .brand-name {
    display: none;
  }
  .nav a {
    padding: 8px 9px;
    font-size: 13px;
  }
  .container {
    padding: 24px 16px 60px;
  }
  .notes-grid {
    grid-template-columns: 1fr;
  }
  .page-intro h1 {
    font-size: 23px;
  }
}

/* ============================================================================
   Marketing site (public pages)
   ========================================================================== */
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap.narrow {
  max-width: 720px;
}
.center {
  text-align: center;
}
div.center {
  margin-top: 28px;
}

.nav-cta-group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
/* Buttons in the nav keep their own colors - override .nav a { color: muted } */
.nav a.btn-primary,
.nav a.btn-primary:hover {
  color: #fff;
}
.nav a.btn:hover {
  background: var(--surface-2);
}
.nav a.btn-primary:hover {
  background: var(--brand-strong);
}
.btn-lg {
  padding: 13px 24px;
  font-size: 15.5px;
}

.hero {
  padding: 76px 0 58px;
  text-align: center;
}
.hero-title {
  font-size: clamp(32px, 5.2vw, 54px);
  letter-spacing: -0.035em;
  font-weight: 800;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  max-width: 640px;
  margin: 20px auto 0;
  line-height: 1.55;
}
.hero-cta {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-note {
  margin-top: 14px;
  color: var(--faint);
  font-size: 13.5px;
}

.mkt-section {
  padding: 58px 0;
}
.mkt-section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: clamp(23px, 3.2vw, 31px);
  letter-spacing: -0.02em;
  font-weight: 750;
  line-height: 1.18;
  margin: 0 0 16px;
}
.section-title.center {
  text-align: center;
  margin-bottom: 24px;
}
.prose {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.prose.center {
  max-width: 700px;
  margin-inline: auto;
  text-align: center;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}
.feature-card,
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
}
.feature-card h3,
.profile-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
.feature-card p,
.profile-card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
}

.steps-list {
  counter-reset: s;
  list-style: none;
  padding: 0;
  margin: 8px auto 28px;
  max-width: 640px;
}
.steps-list li {
  position: relative;
  padding: 13px 0 13px 46px;
  border-top: 1px solid var(--border);
  font-size: 16px;
  color: var(--ink-2);
}
.steps-list li:first-child {
  border-top: none;
}
.steps-list li::before {
  counter-increment: s;
  content: counter(s);
  position: absolute;
  left: 0;
  top: 12px;
  width: 28px;
  height: 28px;
  background: var(--brand-tint);
  color: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.steps-detailed {
  counter-reset: s;
  list-style: none;
  padding: 0;
  margin: 0 0 34px;
}
.steps-detailed li {
  position: relative;
  padding: 0 0 28px 54px;
}
.steps-detailed li::before {
  counter-increment: s;
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}
.steps-detailed h3 {
  margin: 4px 0 6px;
  font-size: 18px;
}
.steps-detailed p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.placeholder-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 650;
  color: var(--amber-ink);
  background: var(--amber-bg);
  border: 1px dashed var(--amber-border);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}
.center-tag {
  display: table;
  margin: 16px auto 0;
}
.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
}
.quote-card.is-placeholder {
  border-style: dashed;
  background: var(--surface-2);
}
.quote-card blockquote {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  font-style: italic;
}
.quote-card figcaption {
  font-size: 13.5px;
  color: var(--faint);
  font-weight: 600;
}
.logos-placeholder {
  text-align: center;
  margin-top: 28px;
  color: var(--faint);
  font-size: 13px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-sm);
  padding: 18px;
}

.faq-teaser {
  margin: 8px 0 18px;
}
.faq-teaser details {
  border-top: 1px solid var(--border);
}
.faq-teaser details:first-child {
  border-top: none;
}
.faq-teaser summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  padding: 15px 30px 15px 0;
  position: relative;
  list-style: none;
  color: var(--ink);
}
.faq-teaser summary::-webkit-details-marker {
  display: none;
}
.faq-teaser summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 20px;
  color: var(--muted);
  font-weight: 400;
}
.faq-teaser details[open] summary::after {
  content: "\2013";
}
.faq-teaser details p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.cta-band {
  background: var(--brand);
  color: #fff;
  padding: 62px 0;
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.cta-band p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
}
.cta-band .btn-primary {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
}
.cta-band .btn-primary:hover {
  background: #eef0ea;
  border-color: #eef0ea;
}

.page-hero {
  padding: 58px 0 10px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(28px, 4vw, 41px);
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 auto;
  max-width: 20ch;
}
.page-hero-sub {
  color: var(--muted);
  font-size: 18px;
  margin: 14px auto 0;
  max-width: 640px;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 44px;
  margin-bottom: 34px;
}
.feature-row h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.feature-row p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.price-card.featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1.5px var(--brand), var(--shadow);
  position: relative;
}
.price-badge {
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.price-card h3 {
  font-size: 19px;
  margin: 0 0 4px;
}
.price-for {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
}
.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  flex: 1;
}
.price-list li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 14.5px;
  color: var(--ink-2);
  border-top: 1px solid var(--border);
}
.price-list li:first-child {
  border-top: none;
}
.price-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 13px;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.price-card .btn {
  width: 100%;
}

.contact-form {
  max-width: 540px;
  margin-top: 18px;
}
.contact-form .field {
  margin-bottom: 14px;
}

.site-footer-full {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 26px;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;
}
.footer-tagline {
  color: var(--muted);
  margin: 12px 0 0;
  font-size: 14px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin: 0 0 10px;
}
.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 0;
}
.footer-col a:hover {
  color: var(--brand);
}
.footer-fine {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 24px 40px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 12.5px;
}

.errorpage {
  padding: 84px 0;
  text-align: center;
}
.error-code {
  font-size: 76px;
  font-weight: 800;
  color: var(--brand-tint);
  letter-spacing: -0.03em;
  line-height: 1;
}
.errorpage h1 {
  font-size: clamp(26px, 4vw, 36px);
  margin: 8px 0 12px;
  letter-spacing: -0.02em;
}
.center-cta {
  justify-content: center;
  margin-top: 24px;
}

@media (max-width: 780px) {
  .three-col,
  .pricing-grid,
  .feature-list {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
@media (max-width: 560px) {
  .marketing .nav > a {
    display: none;
  }
  .marketing .nav-cta-group {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
  }
  .marketing .nav-cta-group .linkbtn {
    display: none;
  }
  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================================
   Interview Prep
   ========================================================================== */
.select-table .radio-cell {
  width: 38px;
  text-align: center;
}
.select-table td {
  vertical-align: middle;
}
.select-table input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}
.select-table tbody tr:hover {
  background: var(--surface-2);
  cursor: pointer;
}

.saved-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.saved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  background: var(--surface);
}
.saved-row:hover {
  border-color: var(--border-strong);
}
.saved-company {
  font-weight: 650;
  font-size: 14.5px;
}
.saved-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.saved-sub .dot {
  color: var(--faint);
  padding: 0 4px;
}
.saved-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.prep-section {
  margin-bottom: 22px;
}
.prep-section h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin: 0 0 8px;
}
.prep-section .prose {
  font-size: 15px;
  margin: 0;
  line-height: 1.6;
}
.pitch-box {
  background: var(--brand-tint);
  border: 1px solid #c4ddce;
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  font-style: italic;
}
.qa-list {
  list-style: none;
  counter-reset: q;
  padding: 0;
  margin: 0;
}
.qa-list li {
  position: relative;
  padding: 12px 0 12px 30px;
  border-top: 1px solid var(--border);
}
.qa-list li:first-child {
  border-top: none;
}
.qa-list li::before {
  counter-increment: q;
  content: counter(q);
  position: absolute;
  left: 0;
  top: 13px;
  width: 20px;
  height: 20px;
  background: var(--brand-tint);
  color: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.qa-q {
  font-weight: 600;
  font-size: 14.5px;
}
.qa-a {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
  margin-top: 4px;
}
.prep-ul {
  margin: 0;
  padding-left: 20px;
}
.prep-ul li {
  margin-bottom: 6px;
  font-size: 14.5px;
  line-height: 1.5;
}
.warn-section h3 {
  color: var(--amber-ink);
}

/* URL import + fit check (generator) */
.import-row {
  display: flex;
  gap: 10px;
}
.import-row .input {
  flex: 1;
  margin-bottom: 0;
}
.import-row .btn {
  flex: none;
}

.fit-card {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 18px 20px;
}
.fit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.fit-rating {
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.fit-rating.strong {
  color: #fff;
  background: var(--accent);
}
.fit-rating.worth {
  color: var(--brand);
  background: var(--brand-tint);
}
.fit-rating.stretch {
  color: var(--amber-ink);
  background: var(--amber-bg);
}
.fit-rating.long {
  color: var(--danger);
  background: var(--danger-bg);
}
.fit-score {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.fit-score-max {
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
}
.fit-summary {
  font-size: 15px;
  margin: 0 0 14px;
  color: var(--ink-2);
}
.fit-rec {
  margin: 14px 0 0;
  font-size: 14.5px;
  color: var(--ink-2);
}

.cl-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checklist li {
  border-top: 1px solid var(--border);
}
.checklist li:first-child {
  border-top: none;
}
.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.checklist input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--brand);
  cursor: pointer;
  flex: none;
}
.checklist label.checked span {
  color: var(--faint);
  text-decoration: line-through;
}

/* ============================================================
   Mock interview modal
   ============================================================ */
.header-actions { display: flex; gap: 8px; align-items: center; }

.mi-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 20, 17, 0.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.mi-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 20, 17, 0.35);
  width: 100%; max-width: 560px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.mi-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.mi-role { font-weight: 650; color: var(--ink); font-size: 0.95rem; }
.mi-role .mi-dot { color: var(--faint); margin: 0 2px; }
.mi-top-actions { display: flex; align-items: center; gap: 10px; }
.mi-end {
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--muted); border-radius: 999px; padding: 5px 12px;
  font-size: 0.82rem; cursor: pointer;
}
.mi-end:hover { color: var(--danger); border-color: var(--danger); }
.mi-x {
  border: none; background: none; color: var(--faint);
  font-size: 1.1rem; cursor: pointer; line-height: 1; padding: 4px;
}
.mi-x:hover { color: var(--ink); }

.mi-stage {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 22px 18px 12px;
}
.mi-avatar { width: 108px; height: 108px; }
.mi-face { width: 100%; height: 100%; display: block; }
.mi-head { fill: var(--brand-tint); stroke: var(--brand); stroke-width: 2.5; }
.mi-eye { fill: var(--brand-strong); transform-origin: center; }
.mi-brow { stroke: var(--brand-strong); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.mi-mouth { fill: var(--brand-strong); transform-origin: 60px 82px; }

.mi-avatar.speaking .mi-mouth { animation: miTalk 0.26s ease-in-out infinite alternate; }
@keyframes miTalk { from { transform: scaleY(0.35); } to { transform: scaleY(1.15); } }
.mi-avatar.speaking .mi-head { animation: miGlow 1.4s ease-in-out infinite; }
@keyframes miGlow { 0%,100% { stroke: var(--brand); } 50% { stroke: var(--accent); } }

.mi-avatar.listening { position: relative; }
.mi-avatar.listening .mi-head { stroke: var(--accent); animation: miPulse 1.2s ease-in-out infinite; }
@keyframes miPulse {
  0%,100% { filter: drop-shadow(0 0 0 rgba(30,158,106,0)); }
  50% { filter: drop-shadow(0 0 10px rgba(30,158,106,0.55)); }
}
.mi-avatar.thinking .mi-eye { animation: miBlink 0.9s steps(1) infinite; }
@keyframes miBlink { 0%,80%,100% { transform: scaleY(1); } 88% { transform: scaleY(0.1); } }

.mi-status {
  min-height: 1.3em; text-align: center; color: var(--muted);
  font-size: 0.92rem; max-width: 90%;
}
.mi-debug {
  min-height: 1em; text-align: center; color: var(--faint);
  font-size: 0.72rem; font-family: var(--mono); letter-spacing: 0.01em;
}

.mi-transcript {
  flex: 1; overflow-y: auto;
  padding: 4px 18px 8px; margin: 0 2px;
  display: flex; flex-direction: column; gap: 10px;
}
.mi-turn { display: flex; flex-direction: column; gap: 2px; }
.mi-who { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); }
.mi-turn .mi-text {
  padding: 8px 12px; border-radius: 10px; font-size: 0.92rem; line-height: 1.45;
}
.mi-interviewer .mi-text { background: var(--surface-2); border: 1px solid var(--border); color: var(--ink); align-self: flex-start; }
.mi-candidate { align-items: flex-end; }
.mi-candidate .mi-who { align-self: flex-end; }
.mi-candidate .mi-text { background: var(--brand-tint); border: 1px solid var(--border); color: var(--brand-strong); align-self: flex-end; }

.mi-controls {
  padding: 14px 18px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--surface-2);
}
.mi-controls .btn { flex: 0 0 auto; }
.mi-input {
  width: 100%; min-height: 70px; resize: vertical;
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 10px 12px; font: inherit; font-size: 0.92rem;
}
.mi-btnrow { display: flex; gap: 10px; width: 100%; }
.mi-spinner { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; }

/* Feedback view */
.mi-feedback { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.mi-fb-score {
  align-self: flex-start; background: var(--brand-tint); color: var(--brand-strong);
  border-radius: 999px; padding: 5px 14px; font-size: 0.88rem;
}
.mi-fb-score strong { font-size: 1rem; }
.mi-fb-overall { color: var(--ink); line-height: 1.5; margin: 0; }
.mi-fb-line { color: var(--ink-2); font-size: 0.9rem; margin: 0; line-height: 1.45; }
.mi-fb-q { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }
.mi-fb-qh { font-weight: 600; color: var(--ink); font-size: 0.9rem; margin-bottom: 3px; }
.mi-fb-good { color: var(--brand); font-size: 0.86rem; line-height: 1.4; }
.mi-fb-imp { color: var(--muted); font-size: 0.86rem; line-height: 1.4; }

@media (max-width: 560px) {
  .mi-modal { max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
}

/* ============================================================
   Interview-defensibility check
   ============================================================ */
.defensibility-area { margin-top: 22px; }
.defend-item {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-top: 10px;
  background: var(--surface-2);
}
.defend-item-head { display: flex; align-items: baseline; gap: 10px; }
.defend-claim { font-weight: 600; color: var(--ink); line-height: 1.4; }
.defend-risk {
  flex: 0 0 auto;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 2px 8px; border-radius: 999px;
}
.risk-low { background: var(--brand-tint); color: var(--brand-strong); }
.risk-med { background: var(--amber-bg); color: var(--amber-ink); }
.risk-high { background: var(--danger-bg); color: var(--danger); }
.defend-concern, .defend-how { margin: 6px 0 0; font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); }
.defend-how { color: var(--brand-strong); }
.defend-clear { color: var(--brand); font-weight: 500; margin-top: 8px; }

/* ============================================================
   STAR / Achievement library (User Context)
   ============================================================ */
.story-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.story-card {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  background: var(--surface-2);
}
.story-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.story-card-head h4 { margin: 0; font-size: 1rem; color: var(--ink); }
.story-card-actions { display: flex; gap: 4px; flex: none; }
.star-row { display: flex; gap: 10px; margin-top: 4px; font-size: 0.9rem; line-height: 1.45; }
.star-k {
  flex: 0 0 74px; color: var(--brand); font-weight: 650; font-size: 0.76rem;
  text-transform: uppercase; letter-spacing: 0.03em; padding-top: 2px;
}
.star-v { color: var(--ink-2); }
.story-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.story-tag {
  font-size: 0.74rem; background: var(--brand-tint); color: var(--brand-strong);
  padding: 2px 9px; border-radius: 999px;
}

.story-form {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r);
  padding: 16px 18px;
  background: var(--surface);
}
.story-form h3 { margin: 0 0 12px; font-size: 1rem; }
.story-form .field { margin-bottom: 12px; }
.story-form label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.story-form .req { color: var(--danger); }
.hint-inline { font-weight: 400; color: var(--faint); }
.star-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.star-grid .textarea { min-height: 74px; }
@media (max-width: 640px) { .star-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Email generator modal
   ============================================================ */
.em-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 20, 17, 0.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.em-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 20, 17, 0.35);
  width: 100%; max-width: 620px; max-height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.em-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.em-title { font-weight: 650; color: var(--ink); }
.em-title .em-dot { color: var(--faint); margin: 0 3px; }
.em-x { border: none; background: none; color: var(--faint); font-size: 1.1rem; cursor: pointer; padding: 4px; }
.em-x:hover { color: var(--ink); }
.em-body { padding: 16px 18px; overflow-y: auto; }
.em-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.em-tab {
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--muted); border-radius: 999px; padding: 6px 14px;
  font-size: 0.85rem; font-weight: 550; cursor: pointer;
}
.em-tab:hover { color: var(--ink); }
.em-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.em-hint { color: var(--muted); font-size: 0.88rem; margin: 0 0 12px; }
.em-result { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.em-bodytext { min-height: 220px; font-size: 0.92rem; line-height: 1.5; }
.em-modal .field { margin-bottom: 12px; }
.em-modal label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
@media (max-width: 620px) { .em-modal { max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; } }

td.rowemail { white-space: nowrap; }

/* ============================================================
   Reminders alert bar
   ============================================================ */
.alert-bar {
  position: sticky; top: 60px; z-index: 45;
  background: var(--amber-bg);
  border-bottom: 1px solid var(--amber-border);
}
.alert-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 24px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem;
}
.alert-ico { flex: none; }
.alert-items { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1; }
.alert-item {
  color: var(--amber-ink); text-decoration: none; font-weight: 550;
}
.alert-item:hover { text-decoration: underline; }
.alert-item.overdue { color: var(--danger); }
.alert-sep { color: var(--amber-border); }
.alert-more { color: var(--amber-ink); text-decoration: underline; font-weight: 600; }
.alert-x {
  flex: none; border: none; background: none; color: var(--amber-ink);
  font-size: 0.95rem; cursor: pointer; padding: 2px 4px; opacity: 0.7;
}
.alert-x:hover { opacity: 1; }
td.rowdate, .date-input { white-space: nowrap; }
.date-input {
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  padding: 5px 8px; font: inherit; font-size: 0.82rem; color: var(--ink); background: var(--surface);
}

/* ============================================================
   Calendar
   ============================================================ */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav h2 { margin: 0; min-width: 190px; text-align: center; font-size: 1.15rem; }
.cal-nav .icon-btn { font-size: 1.3rem; line-height: 1; width: 34px; height: 34px; }
.cal-head-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cal-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.cal-key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cal-key.interview { background: var(--brand); }
.cal-key.followup { background: var(--amber-ink); }

.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-wd { text-align: center; font-size: 0.74rem; font-weight: 650; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell {
  min-height: 92px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface-2); padding: 6px; display: flex; flex-direction: column; gap: 4px;
}
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-cell.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-daynum { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.cal-cell.today .cal-daynum { color: var(--brand); }
.cal-events { display: flex; flex-direction: column; gap: 3px; }
.cal-chip {
  font-size: 0.72rem; line-height: 1.25; padding: 3px 6px; border-radius: 5px;
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-chip.interview { background: var(--brand-tint); color: var(--brand-strong); }
.cal-chip.followup { background: var(--amber-bg); color: var(--amber-ink); }
.cal-chip:hover { filter: brightness(0.97); }
@media (max-width: 640px) {
  .cal-cell { min-height: 64px; }
  .cal-chip { font-size: 0.64rem; }
  .cal-nav h2 { min-width: 130px; font-size: 1rem; }
}

/* ============================================================
   Pipeline analytics
   ============================================================ */
.an-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.an-stat { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px; background: var(--surface-2); }
.an-num { font-size: 1.7rem; font-weight: 700; color: var(--brand); line-height: 1; }
.an-label { font-size: 0.82rem; color: var(--ink-2); margin-top: 6px; font-weight: 550; }
.an-sub { font-size: 0.74rem; color: var(--faint); margin-top: 2px; }

.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.an-panel h3 { margin: 0 0 10px; font-size: 0.95rem; }
.an-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 0.84rem; }
.an-bar-label { flex: 0 0 96px; color: var(--ink-2); }
.an-bar-track { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; height: 14px; overflow: hidden; }
.an-bar-fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; min-width: 2px; }
.an-bar-fill.applied { background: var(--faint); }
.an-bar-fill.following-up { background: var(--amber-ink); }
.an-bar-fill.interviewing { background: var(--brand); }
.an-bar-fill.rejected { background: var(--danger); }
.an-bar-fill.hired { background: var(--accent); }
.an-bar-val { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.an-months { display: flex; align-items: flex-end; gap: 10px; height: 110px; padding-top: 6px; }
.an-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.an-col-bar { width: 60%; max-width: 34px; background: var(--brand-tint); border: 1px solid var(--brand); border-bottom: none; border-radius: 4px 4px 0 0; min-height: 0; }
.an-col-n { font-size: 0.74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.an-col-m { font-size: 0.72rem; color: var(--faint); }
@media (max-width: 720px) {
  .an-stats { grid-template-columns: repeat(2, 1fr); }
  .an-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Onboarding tour
   ============================================================ */
.tour-block {
  position: fixed; inset: 0; z-index: 2000;
  background: transparent; /* dim comes from the spotlight's box-shadow */
}
.tour-block.dim { background: rgba(15, 20, 17, 0.62); }
.tour-spot {
  position: fixed; z-index: 2001; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(15, 20, 17, 0.62), 0 0 0 2px var(--accent);
}
.tour-pop {
  position: fixed; z-index: 2002; width: 340px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 18px 46px rgba(15, 20, 17, 0.4);
  overflow: hidden;
}
.tour-pop.centered { transform: translate(-50%, -50%); }
.tour-pop-body { padding: 16px 18px 12px; }
.tour-pop-title { margin: 0 0 6px; font-size: 1.02rem; color: var(--ink); }
.tour-pop-text { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--ink-2); }
.tour-pop-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2);
}
.tour-step { font-size: 0.76rem; color: var(--faint); }
.tour-btns { display: flex; align-items: center; gap: 8px; }
.tour-skip { border: none; background: none; color: var(--muted); font: inherit; font-size: 0.82rem; cursor: pointer; }
.tour-skip:hover { color: var(--ink); }
.tour-back { border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2); border-radius: var(--r-sm); padding: 5px 12px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.tour-back:hover { background: var(--surface-2); }

/* ---- User Context: N/A + completeness + generator gate ---- */
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.na-btn {
  flex: none; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--muted); border-radius: 999px; padding: 3px 12px; font: inherit;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.na-btn:hover { color: var(--ink); }
.na-btn.active { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
textarea.na { opacity: 0.5; background: var(--surface-2); }
.ctx-complete { font-size: 0.78rem; font-weight: 600; color: var(--amber-ink); margin-left: 6px; }
.ctx-complete.ok { color: var(--accent); }
.ctx-gate {
  margin: 10px 0 0; padding: 10px 14px; font-size: 0.88rem;
  background: var(--amber-bg); border: 1px solid var(--amber-border);
  color: var(--amber-ink); border-radius: var(--r-sm);
}
.ctx-gate a { color: var(--amber-ink); font-weight: 700; }

/* ============================================================
   Tracking - card layout (replaces the wide table)
   ============================================================ */
.wide-page .header-inner,
.wide-page .container { max-width: 1040px; }

.track-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.track-card {
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface-2); padding: 14px 16px;
  transition: border-color 0.15s ease;
}
.track-card:hover { border-color: var(--border-strong); }
.tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.tc-company { font-weight: 700; font-size: 1.02rem; color: var(--ink); line-height: 1.2; }
.tc-role { color: var(--ink-2); font-size: 0.9rem; margin-top: 1px; }
.tc-applied { color: var(--faint); font-size: 0.78rem; margin-top: 3px; }
.tc-top .status-select { flex: none; margin-top: 2px; }

.tc-dates { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.date-cell {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 999px; padding: 5px 10px; font-size: 0.82rem; font-weight: 550;
  color: var(--muted); cursor: pointer;
}
.date-cell:hover { border-color: var(--brand); color: var(--ink); }
.date-cell.set { color: var(--brand-strong); border-color: #bcd8c8; background: var(--brand-tint); }
.date-cell .date-face { display: inline-flex; align-items: center; gap: 6px; pointer-events: none; }
.date-cell .ico { width: 14px; height: 14px; }
.date-input-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: none; margin: 0; padding: 0; cursor: pointer;
}
.date-clear {
  position: relative; z-index: 2; border: none; background: none; color: inherit;
  cursor: pointer; font-size: 0.78rem; line-height: 1; opacity: 0.55; padding: 0 1px;
}
.date-clear:hover { opacity: 1; }

.tc-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.tc-files { display: inline-flex; align-items: center; gap: 3px; font-size: 0.85rem; }
.tc-files a { color: var(--brand); text-decoration: none; font-weight: 550; }
.tc-files a:hover { text-decoration: underline; }
.tc-files .dot { color: var(--faint); padding: 0 3px; }
.notes-btn.has-notes { color: var(--brand); border-color: #bcd8c8; }
.notes-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin-left: 2px; }
.tc-actions .del { margin-left: auto; }

/* Notes modal */
.nt-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(15, 20, 17, 0.55);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px;
}
.nt-modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 20, 17, 0.35); width: 100%; max-width: 520px;
  display: flex; flex-direction: column; overflow: hidden;
}
.nt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.nt-title { font-weight: 650; color: var(--ink); font-size: 0.95rem; }
.nt-title .dot { color: var(--faint); padding: 0 3px; }
.nt-x { border: none; background: none; color: var(--faint); font-size: 1.05rem; cursor: pointer; padding: 4px; }
.nt-x:hover { color: var(--ink); }
.nt-text { border: none; margin: 0; padding: 16px 18px; min-height: 180px; resize: vertical; font: inherit; font-size: 0.92rem; line-height: 1.5; }
.nt-text:focus { outline: none; }
.nt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.nt-status { font-size: 0.82rem; color: var(--muted); }
.nt-status.err { color: var(--danger); }
.nt-btns { display: flex; gap: 8px; }

@media (max-width: 560px) {
  .tc-top { flex-direction: column; }
  .tc-top .status-select { align-self: flex-start; }
  .nt-modal { max-width: 100%; }
}

/* ============================================================
   Generate progress bar
   ============================================================ */
.gen-progress { margin-top: 16px; }
.gen-bar {
  height: 9px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden;
}
.gen-bar-fill {
  position: relative; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 999px; transition: width 0.35s ease;
}
.gen-bar-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: genShimmer 1.15s linear infinite;
}
.gen-bar-fill.error { background: var(--danger); }
.gen-bar-fill.error::after { animation: none; }
@keyframes genShimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
.gen-label {
  margin-top: 9px; font-size: 0.86rem; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}

/* ============================================================
   Pipeline funnel (Sankey) + intro row
   ============================================================ */
.intro-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.intro-row h1 { margin: 0; }

.sankey-wrap { overflow-x: auto; margin-top: 6px; }
.sankey { width: 100%; min-width: 560px; height: auto; display: block; }
.sk-label {
  font-size: 11px; fill: var(--ink);
  paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round;
}
.sk-label.b { font-weight: 700; }
.sk-val { fill: var(--muted); }

/* ============================================================
   Admin: dropdown section + support inbox
   ============================================================ */
.dropdown-sep {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--faint); font-weight: 700; padding: 8px 10px 2px; margin-top: 4px;
  border-top: 1px solid var(--border);
}
.support-list { display: flex; flex-direction: column; gap: 12px; }
.support-item { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface-2); }
.support-item.is-new { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.support-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.support-from { font-weight: 650; color: var(--ink); }
.support-email { color: var(--muted); font-size: 0.85rem; margin-left: 6px; }
.support-meta { font-size: 0.8rem; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.support-status { text-transform: uppercase; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; }
.support-status.s-new { background: var(--brand-tint); color: var(--brand-strong); }
.support-status.s-read { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.support-status.s-closed { background: var(--surface-2); color: var(--faint); border: 1px solid var(--border); }
.support-subject { font-weight: 600; margin-top: 6px; color: var(--ink); }
.support-body { margin-top: 6px; color: var(--ink-2); font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; }
.support-actions { display: flex; gap: 8px; margin-top: 10px; }
#adminUsers td.company { font-weight: 500; }

/* ============================================================
   Account: danger zone
   ============================================================ */
.btn-danger { background: var(--danger); color: #fff; border: 1px solid var(--danger); }
.btn-danger:hover { background: #9c3131; border-color: #9c3131; }
.danger-zone {
  margin-top: 24px; padding: 16px 18px;
  border: 1px solid var(--danger-bg); border-radius: var(--r);
  background: var(--danger-bg);
}
.danger-zone h3 { margin: 0 0 4px; color: var(--danger); font-size: 1rem; }
.danger-zone .hint { margin-top: 0; }

/* ============================================================
   Legal documents (privacy / terms)
   ============================================================ */
.legal-doc { color: var(--ink-2); line-height: 1.65; }
.legal-doc .legal-updated { color: var(--faint); font-size: 0.85rem; margin-bottom: 20px; }
.legal-doc h2 { font-size: 1.2rem; margin: 28px 0 8px; color: var(--ink); }
.legal-doc h3 { font-size: 1rem; margin: 18px 0 6px; color: var(--ink); }
.legal-doc p { margin: 0 0 12px; }
.legal-doc ul { margin: 0 0 14px; padding-left: 20px; }
.legal-doc li { margin-bottom: 6px; }
.legal-doc a { color: var(--brand); }

/* ============================================================
   Refine panel (tailored application tile)
   ============================================================ */
.refine-panel {
  margin: 14px 0 4px; padding: 14px 16px;
  border: 1px dashed var(--border-strong); border-radius: var(--r);
  background: var(--surface-2);
}
.refine-panel .label { margin-bottom: 2px; }
.refine-panel .textarea { min-height: 84px; }
.header-actions #refineBtn, .card-header #refineBtn { flex: none; }

/* ============================================================
   Pricing amounts + admin margin flags
   ============================================================ */
.price-amount { font-size: 2.2rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; margin: 4px 0 2px; }
.price-amount span { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price-sub { color: var(--muted); font-size: 0.85rem; margin: 0 0 10px; }
.an-flag { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.an-flag.risk-low { background: var(--brand-tint); color: var(--brand-strong); }
.an-flag.risk-med { background: var(--amber-bg); color: var(--amber-ink); }
.an-flag.risk-high { background: var(--danger-bg); color: var(--danger); }
select.plan-sel { font: inherit; font-size: 0.82rem; padding: 4px 6px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
#planTable td.company { font-weight: 600; }

/* ============================================================
   Account: plan & billing
   ============================================================ */
.billing-block { margin: 6px 0 4px; }
.bill-current { margin: 6px 0 2px; }
.bill-plans { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.bill-plan {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface-2);
}
.bill-btns { display: flex; gap: 8px; flex-wrap: wrap; }
