/* =========================================================================
   Job Search Agent — design system
   One source of truth for the app UI, the login screen, and (via the same
   tokens) the Django admin theme. Change the :root tokens to retheme.
   ========================================================================= */

:root {
  /* Palette */
  --bg: #f4f6fa;
  --bg-deep: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef3f8;
  --text: #101623;
  --text-secondary: #344054;
  --muted: #647082;
  --border: #dde3ec;
  --border-strong: #c8d2df;

  --accent: #2b5ce6;
  --accent-strong: #1e46c0;
  --accent-deep: #17368f;
  --accent-soft: #e9efff;
  --accent-border: #c5d5fb;
  --accent-text: #1745b8;

  --success: #087443;
  --success-soft: #ecfdf3;
  --success-border: #abefc6;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --danger-border: #fecdca;
  --warn: #9a5b00;
  --warn-soft: #fff7ed;
  --gold: #f5a400;

  --sidebar: #0b1120;
  --sidebar-2: #131d36;
  --sidebar-text: #cbd5e1;
  --sidebar-heading: #8595ad;

  /* Shape & depth */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow:
    0 1px 2px rgba(16, 24, 40, 0.05),
    0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-lift:
    0 2px 4px rgba(16, 24, 40, 0.06),
    0 16px 36px rgba(23, 37, 84, 0.12);
  --ring: 0 0 0 3px rgba(43, 92, 230, 0.18);

  /* Type */
  --font-sans: "Inter", "SF Pro Text", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 320px at 18% -60px, rgba(43, 92, 230, 0.07), transparent 70%),
    radial-gradient(900px 280px at 85% -80px, rgba(15, 118, 110, 0.05), transparent 70%),
    linear-gradient(180deg, #f8fafc 0, var(--bg) 300px),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(43, 92, 230, 0.18);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 120ms ease;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Slim, quiet scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #b9c3d2 transparent;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-thumb {
  background: #b9c3d2;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================================================================
   Shell & sidebar
   ========================================================================= */

.app-shell {
  display: grid;
  grid-template-columns: 254px minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
}

.app-shell.auth-shell {
  display: block;
}

.auth-page {
  background:
    radial-gradient(900px 460px at 15% -10%, rgba(43, 92, 230, 0.16), transparent 62%),
    radial-gradient(760px 420px at 88% 8%, rgba(15, 118, 110, 0.10), transparent 60%),
    radial-gradient(600px 380px at 55% 108%, rgba(245, 164, 0, 0.07), transparent 60%),
    linear-gradient(180deg, #f8fafc 0, var(--bg) 420px),
    var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  width: 254px;
  height: 100vh;
  background:
    radial-gradient(420px 220px at -20% -10%, rgba(43, 92, 230, 0.28), transparent 65%),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #f9fafb;
  padding: 22px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  min-width: 0;
  overflow: hidden;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 8px 20px;
  white-space: nowrap;
}

.brand::before {
  content: "◆";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 12px rgba(43, 92, 230, 0.45);
  color: #ffffff;
  font-size: 12px;
}

.brand:hover {
  color: #ffffff;
  text-decoration: none;
}

.nav {
  display: grid;
  gap: 4px;
  overflow-y: auto;
  padding-bottom: 16px;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: var(--sidebar-text);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.66;
  transition: opacity 120ms ease, color 120ms ease;
}

.nav a:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.nav a:hover .nav-icon {
  opacity: 1;
}

.nav a.active {
  background: linear-gradient(90deg, rgba(43, 92, 230, 0.32) 0%, rgba(43, 92, 230, 0.16) 100%);
  border-color: rgba(94, 136, 245, 0.35);
  color: #ffffff;
}

.nav a.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7ea4ff 0%, var(--accent) 100%);
  box-shadow: 0 0 10px rgba(94, 136, 245, 0.65);
}

.nav a.active .nav-icon {
  opacity: 1;
  color: #9db9ff;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group summary {
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group-links {
  display: grid;
  gap: 4px;
}

.nav-group-links a {
  padding-left: 18px;
}

.nav-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 12px 4px;
  color: var(--sidebar-heading);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  user-select: none;
}

.nav-section::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease;
}

.nav-group[open] .nav-section::after {
  transform: rotate(225deg) translateY(-2px);
}

.nav-section:hover {
  color: #e2e8f0;
}

/* Mobile top app bar + off-canvas drawer chrome (activated <= 920px) */
.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  align-items: center;
  gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: linear-gradient(180deg, rgba(11, 17, 32, 0.97) 0%, rgba(15, 23, 42, 0.94) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 8px 24px rgba(11, 17, 32, 0.28);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  transition: background 120ms ease;
}

.nav-toggle:hover {
  background: rgba(148, 163, 184, 0.14);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.topbar-brand {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.topbar-brand:hover {
  color: #ffffff;
}

.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(11, 17, 32, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.main {
  min-width: 0;
  padding: clamp(18px, 2.2vw, 30px) clamp(18px, 2.6vw, 36px) 48px;
}

/* =========================================================================
   Typography & page scaffolding
   ========================================================================= */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(24px, 1.9vw, 30px);
  line-height: 1.12;
  margin-bottom: 7px;
  font-weight: 800;
  letter-spacing: -0.022em;
}

h2 {
  font-size: 17px;
  margin-bottom: 14px;
  font-weight: 750;
  letter-spacing: -0.012em;
}

h3 {
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: -0.008em;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 6px 0 0;
}

/* =========================================================================
   Metrics & panels
   ========================================================================= */

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

/* The dashboard has six compact summary cards; keep them in one desktop row. */
.dashboard-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-metrics .metric {
  padding-inline: 12px;
}

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.metric {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 14px 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(43, 92, 230, 0));
  opacity: 0;
  transition: opacity 140ms ease;
}

.metric:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
  text-decoration: none;
}

.metric:hover::after {
  opacity: 1;
}

.metric .label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.metric .value {
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.panel {
  padding: clamp(16px, 1.6vw, 22px);
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

/* =========================================================================
   Dashboard activity chart
   ========================================================================= */

.activity-chart {
  display: grid;
  grid-template-columns: repeat(30, minmax(18px, 1fr));
  align-items: end;
  gap: 6px;
  min-height: 236px;
  padding: 14px 12px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%);
  overflow-x: auto;
}

.chart-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.chart-peak {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.activity-day {
  display: grid;
  grid-template-rows: 22px 160px 28px;
  min-width: 0;
  gap: 6px;
  text-align: center;
}

.activity-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.activity-bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  height: 160px;
  border-radius: 7px;
  background: var(--surface-3);
  overflow: hidden;
}

.activity-bar {
  width: 100%;
  min-height: 0;
  border-radius: 7px 7px 0 0;
  background: #d5dce7;
  transition: background 140ms ease;
}

.activity-bar.active {
  background: linear-gradient(180deg, #5b8bf7 0%, var(--accent) 60%, var(--accent-strong) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.activity-label {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
  transform: rotate(-35deg);
  transform-origin: top center;
}

.token-activity-chart .activity-count {
  font-size: 10px;
}

.token-activity-chart .activity-bar.active {
  background: linear-gradient(180deg, #8168f6 0%, #5b45d6 60%, #4330ad 100%);
}

/* =========================================================================
   Prompt engineering wizard
   ========================================================================= */

.wizard-panel {
  max-width: 980px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.wizard-steps span {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.wizard-steps span.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(43, 92, 230, 0.12);
}

.wizard-steps span.done {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}

.wizard-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  padding: 14px;
  margin-bottom: 18px;
}

.wizard-summary p {
  margin: 6px 0 0;
}

.wizard-summary-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.6fr) minmax(260px, 2fr);
  gap: 12px;
  margin-bottom: 18px;
}

.prompt-metadata {
  margin-bottom: 22px;
}

.description-examples {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.description-examples > strong {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.description-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  padding: 10px;
}

.description-example span {
  color: var(--text-secondary);
}

.wizard-summary-grid div {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  padding: 12px;
}

.wizard-summary-grid strong,
.wizard-summary-grid span {
  display: block;
}

.wizard-summary-grid strong {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.wizard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.wizard-actions.split {
  justify-content: space-between;
}

/* =========================================================================
   Companies
   ========================================================================= */

.company-verdict {
  font-size: 18px;
  line-height: 1.2;
}

.evidence-list {
  margin: 0 0 18px;
  padding-left: 20px;
}

.evidence-list li {
  margin-bottom: 8px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin-bottom: 4px;
}

.company-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.span-2 {
  grid-column: 1 / -1;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
}

/* =========================================================================
   Settings
   ========================================================================= */

.settings-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.settings-group {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
}

.settings-group legend {
  padding: 0 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.narrow-panel {
  max-width: 620px;
}

/* =========================================================================
   Candidate profile
   ========================================================================= */

.profile-summary {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
  max-width: 820px;
  border-color: #d7e0fa;
  background:
    radial-gradient(circle at 4% 5%, rgba(43, 92, 230, 0.15), transparent 220px),
    linear-gradient(135deg, #ffffff 0%, #f7f9ff 100%);
}

.membership-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 820px;
}

.membership-panel h2 {
  margin: 2px 0 6px;
}

.membership-action,
.membership-review-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.membership-action form,
.membership-review-actions form {
  margin: 0;
}

.profile-avatar-frame {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #8ba7ff);
  box-shadow: 0 12px 26px rgba(43, 92, 230, 0.2);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  background: #eef3ff;
}

.profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  color: #3157c9;
  font-size: 26px;
  font-weight: 800;
}

.profile-avatar-icon {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.profile-avatar-initial {
  line-height: 1;
}

.profile-avatar-large {
  width: 100%;
  height: 100%;
}

.profile-avatar-frame-large {
  width: 102px;
  height: 102px;
}

.profile-completion-label {
  margin: 0 0 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.profile-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.profile-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.profile-summary .muted {
  margin: 7px 0 0;
  font-size: 13px;
}

.profile-resume-status {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.profile-resume-status .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-form-panel {
  max-width: 820px;
  border-top: 3px solid var(--accent);
}

.password-panel {
  margin-top: 18px;
}

.password-form-grid {
  max-width: 760px;
}

.page-section-head {
  margin-bottom: 14px;
}

.page-section-head h2 {
  margin: 0;
}

.page-section-head p {
  margin-top: 6px;
}

.profile-form-panel .settings-group + .settings-group {
  margin-top: 16px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.profile-form-grid .field-wide {
  grid-column: 1 / -1;
}

.profile-avatar-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-avatar-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.profile-avatar-choice:has(input:checked) {
  border-color: var(--accent);
  background: #eef3ff;
  color: var(--accent);
}

.profile-avatar-choice input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.public-profile-intro {
  display: flex;
  align-items: center;
  gap: 18px;
}

.public-profile-intro h1 {
  margin-bottom: 4px;
}

.profile-headline {
  margin: 0 0 5px;
  color: var(--text-secondary);
  font-size: 17px;
}

.profile-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

@media (max-width: 640px) {
  .profile-summary {
    grid-template-columns: auto 1fr;
    gap: 14px;
  }

  .membership-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-resume-status {
    grid-column: 1 / -1;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-form-grid .field-wide {
    grid-column: auto;
  }
}

/* =========================================================================
   Social feed
   ========================================================================= */

.social-hero { position: relative; min-height: 300px; margin-bottom: 20px; overflow: hidden; border: 1px solid #d9e2f6; border-radius: 18px; background: #edf3ff; box-shadow: 0 16px 40px rgba(24, 55, 108, 0.12); }
.social-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.93) 36%, rgba(255,255,255,.18) 70%, rgba(255,255,255,0) 100%); pointer-events: none; }
.social-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; }
.social-hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; min-height: 300px; width: min(52%, 540px); padding: clamp(26px, 4vw, 48px); }
.social-hero-content h1 { margin: 3px 0 10px; color: #14213d; font-size: clamp(30px, 4vw, 48px); line-height: 1.03; letter-spacing: -0.035em; }
.social-hero-content > p:not(.eyebrow) { max-width: 470px; margin: 0; color: #52627a; font-size: 15px; line-height: 1.6; }
.social-search { display: flex; gap: 8px; align-items: center; width: min(100%, 480px); margin-top: 22px; padding: 6px; border: 1px solid #d8e0ee; border-radius: 12px; background: rgba(255,255,255,.95); box-shadow: 0 8px 22px rgba(26, 54, 93, .1); }
.social-search-icon { padding-left: 8px; color: #667085; font-size: 22px; }
.social-search input { min-width: 0; flex: 1; border: 0; background: transparent; box-shadow: none; }
.social-search input:focus { outline: 0; box-shadow: none; }
.social-layout { max-width: 900px; margin-inline: auto; }
.social-compose { border: 1px solid #dfe5ef; border-radius: 12px; box-shadow: 0 7px 24px rgba(29, 47, 79, .08); }
.social-compose-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.social-compose h2 { margin: 0; font-size: 17px; }
.social-compose-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.social-compose-avatar { width: 46px; height: 46px; }
.social-message-input { min-height: 96px; padding: 14px 16px; resize: vertical; border-color: #dbe3ef; border-radius: 12px; background: #f9fbff; font-size: 15px; line-height: 1.55; }
.social-message-input:focus { background: #fff; }
.social-create-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.social-create-action { display: flex; align-items: center; gap: 11px; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid #e0e7f1; border-radius: 13px; background: linear-gradient(145deg, #fff, #f7f9fd); color: #344054; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 4px 12px rgba(29, 47, 79, .05); transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.social-create-action:hover { border-color: #bfcce0; box-shadow: 0 8px 20px rgba(29, 47, 79, .1); transform: translateY(-1px); }
.social-create-action:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent); outline-offset: 2px; }
.social-create-action > span:last-child { display: grid; min-width: 0; gap: 1px; }
.social-create-action strong { color: #1d2939; font-size: 13px; }
.social-create-action small { overflow: hidden; color: #7a8699; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.social-create-visual { display: grid; flex: 0 0 auto; place-items: center; width: 48px; height: 40px; border-radius: 10px; }
.social-create-visual svg { width: 37px; height: 29px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.social-create-image .social-create-visual { background: #e9f8f1; color: #16835d; }
.social-create-video .social-create-visual { background: #fff0e8; color: #c85925; }
.social-create-article .social-create-visual { background: #eceeff; color: #4c5bd4; }
.social-file-inputs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.social-native-file-input { width: 1px; height: 1px; opacity: 0; }
.social-attachment { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-top: 12px; padding: 9px; border: 1px solid #dce5f1; border-radius: 12px; background: #f7faff; }
.social-attachment[hidden] { display: none; }
.social-attachment-preview { display: grid; place-items: center; width: 52px; height: 42px; overflow: hidden; border-radius: 8px; background: #e8eef8; color: #52627a; font-size: 20px; }
.social-attachment-preview img { width: 100%; height: 100%; object-fit: cover; }
.social-attachment > div:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.social-attachment strong { font-size: 12px; }
.social-attachment [data-attachment-name] { overflow: hidden; color: #667085; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.social-attachment button, .social-editor-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #667085; font-size: 22px; cursor: pointer; }
.social-attachment button:hover, .social-editor-close:hover { background: #e8edf5; color: #1d2939; }
.social-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #e7ebf1; }
.social-compose-footer > span { color: #7a8699; font-size: 12px; }
.social-publish { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; }
.social-article-editor { margin-top: 2px; overflow: hidden; border: 1px solid #ccd7e7; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(29, 47, 79, .08); }
.social-article-editor[hidden] { display: none; }
.social-editor-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 11px; background: linear-gradient(120deg, #f1f3ff, #f7faff); }
.social-editor-topline > div { display: grid; gap: 1px; }
.social-editor-topline strong { color: #202b46; font-size: 15px; }
.social-editor-kicker { color: #6875d6; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.social-editor-toolbar { display: flex; align-items: center; gap: 3px; overflow-x: auto; padding: 7px 9px; border-block: 1px solid #e5e9f0; background: #fbfcfe; }
.social-editor-toolbar button { flex: 0 0 auto; min-width: 32px; height: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: #475467; font: inherit; font-size: 12px; cursor: pointer; }
.social-editor-toolbar button:hover, .social-editor-toolbar button.is-active { background: #e9edff; color: #3646bd; }
.social-editor-divider { flex: 0 0 auto; width: 1px; height: 20px; margin: 0 3px; background: #dce2eb; }
.social-editor-canvas { min-height: 260px; max-height: 540px; overflow-y: auto; padding: 24px clamp(20px, 5vw, 58px); color: #253044; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.7; outline: 0; }
.social-editor-canvas:empty::before { content: attr(data-placeholder); color: #98a2b3; pointer-events: none; }
.social-editor-canvas h2 { margin: 8px 0 12px; color: #172033; font-size: 28px; line-height: 1.2; }
.social-editor-canvas h3 { margin: 18px 0 8px; color: #253044; font-size: 20px; }
.social-editor-canvas p { margin: 0 0 13px; }
.social-editor-canvas blockquote { margin: 16px 0; padding: 8px 0 8px 18px; border-left: 3px solid #7584ec; color: #526079; font-style: italic; }
.social-editor-canvas a { color: var(--accent); }
.social-editor-canvas ul, .social-editor-canvas ol { padding-left: 25px; }
.social-upload-row, .social-actions, .social-comment-form { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.social-post { padding: 0; overflow: hidden; border: 1px solid #dfe3e9; border-radius: 12px; box-shadow: 0 7px 24px rgba(29, 47, 79, .08); transition: box-shadow 160ms ease, transform 160ms ease; }
.social-post:hover { box-shadow: 0 12px 32px rgba(29, 47, 79, .12); transform: translateY(-1px); }
.social-post + .social-post { margin-top: 14px; }
.social-post-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 0; }
.social-post-head > form { margin-left: auto; }
.social-author-avatar { flex: 0 0 auto; width: 48px; height: 48px; overflow: hidden; border-radius: 50%; background: #eef3ff; }
.social-author-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.social-author-avatar .profile-avatar-icon { width: 21px; height: 21px; }
.social-author-avatar .profile-avatar-initial { font-size: 15px; }
.social-author-copy { display: grid; gap: 2px; min-width: 0; }
.social-author-copy strong { color: #111827; font-size: 14px; }
.social-author-copy span, .social-repost-label { color: #667085; font-size: 12px; }
.social-post-meta { display: inline-flex; align-items: center; gap: 3px; }
.social-post-meta svg { width: 12px; height: 12px; fill: currentColor; }
.social-follow { padding: 6px 10px; font-size: 12px; }
.social-more { padding: 0 2px; border: 0; background: transparent; color: #667085; font-size: 17px; line-height: 1; cursor: pointer; }
.social-repost-label { margin: 12px 16px 5px; font-weight: 700; }
.social-post-body { margin: 12px 16px; color: #1d2939; line-height: 1.55; }
.social-article-body { margin: 16px clamp(18px, 4vw, 42px) 20px; padding: clamp(18px, 3vw, 30px); border: 1px solid #e4e8f0; border-radius: 12px; background: linear-gradient(145deg, #fff, #fbfcff); }
.social-article-body.markdown-body { max-width: none; }
.social-article-body.markdown-body h2:first-child { margin-top: 0; }
.social-media { display: block; width: 100%; max-height: 560px; margin-top: 14px; border-block: 1px solid #e0e5ec; background: #101828; object-fit: contain; }
.social-image { min-height: 260px; aspect-ratio: 16 / 9; background: #f2f4f7; object-fit: contain; }
.social-video { aspect-ratio: 16 / 9; }
.social-engagement { display: flex; justify-content: space-between; gap: 10px; margin: 14px 16px 0; padding-bottom: 10px; color: #667085; font-size: 12px; border-bottom: 1px solid #e6e9ef; }
.social-reaction-summary { display: flex; align-items: center; }
.reaction-token { display: grid; place-items: center; width: 17px; height: 17px; margin-right: -3px; border: 2px solid #fff; border-radius: 50%; color: white; font-size: 9px; }
.reaction-token.like { background: #2675d7; }
.reaction-token.dislike { background: #c7394b; }
.social-reaction-summary > span:last-child { margin-left: 8px; }
.social-actions { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 8px; padding: 3px 0; }
.social-actions form { margin: 0; }
.social-action { display: inline-flex; justify-content: center; gap: 6px; align-items: center; min-height: 42px; padding: 5px 7px; border: 0; border-radius: 5px; background: transparent; color: #667085; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.social-action:hover { background: #f2f4f7; }
.social-action:hover, .social-action.is-active { color: var(--accent); text-decoration: none; }
.social-action-icon { font-size: 19px; font-weight: 400; line-height: 1; }
.social-comments { margin: 0 16px 14px; }
.social-comments p { margin: 7px 0; padding: 9px 11px; border-radius: 10px; background: #f2f4f7; color: #344054; font-size: 13px; }
.social-comment-form { margin-top: 10px; }
.social-comment-form input { flex: 1; min-width: 180px; }
.social-empty-state { display: grid; grid-template-columns: minmax(220px, 42%) 1fr; align-items: center; gap: 22px; overflow: hidden; padding: 0; }
.social-empty-state img { width: 100%; min-height: 210px; height: 100%; object-fit: cover; object-position: 72% center; }
.social-empty-state > div { padding: 24px 28px 24px 0; }
.social-empty-state h2 { margin-top: 0; }

@media (max-width: 640px) {
  .social-hero { min-height: 390px; }
  .social-hero::after { background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.9) 56%, rgba(255,255,255,.18) 100%); }
  .social-hero-art { object-position: 67% bottom; }
  .social-hero-content { justify-content: flex-start; min-height: 390px; width: 100%; padding: 24px 20px; }
  .social-search { width: 100%; margin-top: 16px; }
  .social-search input { min-width: 0; width: 100%; }
  .social-create-actions { grid-template-columns: 1fr; }
  .social-create-action { padding: 9px 11px; }
  .social-create-visual { width: 44px; height: 36px; }
  .social-compose-footer { align-items: stretch; flex-direction: column; }
  .social-publish { justify-content: center; width: 100%; }
  .social-editor-canvas { min-height: 230px; padding: 20px 18px; }
  .social-article-body { margin-inline: 12px; padding: 18px; }
  .social-actions { grid-template-columns: repeat(3, 1fr); }
  .social-empty-state { grid-template-columns: 1fr; }
  .social-empty-state img { min-height: 180px; }
  .social-empty-state > div { padding: 0 20px 24px; }
}

/* =========================================================================
   My Files ("drive")
   ========================================================================= */

.drive-shell {
  display: grid;
  gap: 14px;
}

.drive-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.drive-upload-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.drive-new-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 0 18px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow);
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.drive-new-button:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
}

.drive-new-button span {
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
  font-weight: 450;
}

.drive-new-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drive-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
}

.drive-summary strong {
  color: var(--text);
  font-size: 18px;
}

.drive-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 92px;
  padding: 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 140ms ease, background 140ms ease;
}

.drive-dropzone:hover {
  border-color: var(--accent-border);
  background: rgba(233, 239, 255, 0.4);
}

.drive-dropzone label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-width: 0;
  cursor: pointer;
}

.drive-dropzone strong,
.drive-dropzone small {
  display: block;
}

.drive-dropzone small {
  color: var(--muted);
  margin-top: 3px;
}

.drive-dropzone input {
  max-width: 240px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.upload-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 14px rgba(43, 92, 230, 0.35);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  font-weight: 450;
}

.drive-list {
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.drive-list-head,
.drive-file-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 96px 110px 190px 48px;
  gap: 14px;
  align-items: center;
}

.drive-list-head {
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.drive-file-row {
  min-height: 64px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 120ms ease;
}

.drive-file-row:last-child {
  border-bottom: 0;
}

.drive-file-row:hover {
  background: var(--surface-2);
}

.file-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

.file-name:hover {
  color: var(--accent);
  text-decoration: none;
}

.file-name strong,
.file-name small {
  display: block;
}

.file-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name small {
  color: var(--muted);
  margin-top: 2px;
}

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 38px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, transparent 0 72%, var(--accent-border) 72% 100%),
    var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 800;
}

.version-badge.has-history {
  background: var(--success-soft);
  color: var(--success);
}

.file-actions {
  position: relative;
  justify-self: end;
}

.file-actions summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  font-weight: 900;
  transition: background 120ms ease, color 120ms ease;
}

.file-actions summary span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.file-actions summary::-webkit-details-marker {
  display: none;
}

.file-actions summary:hover {
  background: var(--surface-3);
  color: var(--text);
}

.file-actions div {
  position: absolute;
  right: 0;
  z-index: 20;
  min-width: 210px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-lift);
}

.file-actions a,
.file-actions button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.file-actions a:hover,
.file-actions button:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.file-actions button {
  color: var(--danger);
}

.file-actions button.neutral-action {
  color: var(--text);
}

.table-actions {
  display: flex;
  justify-content: flex-end;
}

.table-actions[open] {
  z-index: 30;
}

/* =========================================================================
   Resume, spellcheck & reports
   ========================================================================= */

.resume-panel {
  max-width: 980px;
}

.resume-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.resume-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.resume-markdown {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.document-editor-form {
  display: grid;
  gap: 12px;
}

.document-editor-head,
.document-editor-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.document-editor-head label {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 15px;
}

.document-editor-head p,
.document-editor-footer p {
  margin: 0;
}

.document-editor-footer {
  align-items: center;
}

.document-editor-footer .muted {
  max-width: 680px;
  font-size: 12.5px;
}

.ai-editor-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid #cfd9f8;
  border-radius: 999px;
  background: #f4f7ff;
  color: var(--accent-strong);
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 800;
}

.ai-editor-badge svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.ai-editor-shell {
  position: relative;
}

.document-editor {
  display: block;
  min-height: 520px;
  border-color: #c6d0df;
  border-radius: 12px;
  background: #fcfdff;
  padding: 18px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  resize: vertical;
  tab-size: 2;
}

.document-editor:hover {
  border-color: #aebbd0;
}

.document-editor-cover-letter {
  min-height: 420px;
}

.document-rendered-preview {
  margin-top: 22px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.document-rendered-preview summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 750;
}

.document-rendered-preview[open] summary {
  margin-bottom: 20px;
}

.highlight-ai-toolbar {
  position: fixed;
  z-index: 1000;
  border: 1px solid rgba(38, 52, 74, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 42px rgba(25, 38, 62, 0.2), 0 3px 12px rgba(25, 38, 62, 0.1);
  color: var(--text);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 120ms ease, transform 120ms ease, width 160ms ease;
  backdrop-filter: blur(12px);
}

.highlight-ai-toolbar[hidden] {
  display: none;
}

.highlight-ai-toolbar-action {
  padding: 5px;
}

.highlight-ai-ask,
.highlight-ai-send,
.highlight-ai-icon-button,
.highlight-ai-preview-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.highlight-ai-ask {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #315fdc, #7656d9);
  color: #ffffff;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 5px 13px rgba(49, 95, 220, 0.25);
}

.highlight-ai-ask:hover {
  filter: brightness(1.05);
}

.highlight-ai-sparkle {
  color: #6b54d8;
  font-size: 16px;
  line-height: 1;
}

.highlight-ai-ask .highlight-ai-sparkle {
  color: #ffffff;
}

.highlight-ai-toolbar-prompt {
  width: min(410px, calc(100vw - 24px));
  padding: 8px;
}

.highlight-ai-prompt-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

.highlight-ai-input {
  min-height: 36px;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
}

.highlight-ai-send {
  min-height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}

.highlight-ai-icon-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.highlight-ai-icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.highlight-ai-hint,
.highlight-ai-error {
  margin: 6px 3px 0;
  font-size: 11.5px;
  line-height: 1.4;
}

.highlight-ai-hint {
  color: var(--muted);
}

.highlight-ai-error {
  color: var(--danger);
}

.highlight-ai-toolbar-loading {
  display: grid;
  width: min(280px, calc(100vw - 24px));
  gap: 8px;
  padding: 12px;
}

.highlight-ai-loading-label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
}

.highlight-ai-loading-bar {
  position: relative;
  display: block;
  height: 5px;
  border-radius: 999px;
  background: #e8edf7;
  overflow: hidden;
}

.highlight-ai-loading-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 45%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #7897ed, transparent);
  animation: highlight-ai-shimmer 1.15s ease-in-out infinite;
}

.highlight-ai-selection {
  position: fixed;
  z-index: 998;
  border: 1px solid rgba(66, 104, 218, 0.32);
  border-radius: 5px;
  background: linear-gradient(100deg, rgba(77, 113, 222, 0.12), rgba(121, 91, 219, 0.24), rgba(77, 113, 222, 0.12));
  background-size: 220% 100%;
  pointer-events: none;
  animation: highlight-ai-selection-shimmer 1.35s ease-in-out infinite;
}

.highlight-ai-toolbar-preview {
  display: grid;
  width: min(540px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 24px));
  gap: 10px;
  padding: 12px;
  overflow: auto;
}

.highlight-ai-preview-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
}

.highlight-ai-diff {
  display: grid;
  gap: 7px;
}

.highlight-ai-diff-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border-radius: 8px;
  padding: 9px;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.highlight-ai-diff-original {
  background: #fff5f4;
  color: #8d3029;
}

.highlight-ai-diff-proposal {
  background: #eefaf4;
  color: #176744;
}

.highlight-ai-diff-row del {
  text-decoration-color: #c24c43;
}

.highlight-ai-diff-row ins {
  text-decoration: none;
}

.highlight-ai-diff-label {
  color: inherit;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.highlight-ai-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.highlight-ai-preview-button {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-secondary);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.highlight-ai-preview-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.highlight-ai-preview-button.is-accept {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

@keyframes highlight-ai-shimmer {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(280%);
  }
}

@keyframes highlight-ai-selection-shimmer {
  0%,
  100% {
    background-position: 100% 0;
  }
  50% {
    background-position: 0 0;
  }
}

@media (max-width: 640px) {
  .document-editor-head,
  .document-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-editor-badge {
    align-self: flex-start;
  }

  .document-editor {
    min-height: 440px;
    padding: 14px;
  }

  .document-editor-cover-letter {
    min-height: 360px;
  }

  .document-editor-footer .button {
    width: 100%;
  }

  .highlight-ai-diff-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .highlight-ai-preview-actions {
    justify-content: stretch;
  }

  .highlight-ai-preview-button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .highlight-ai-loading-bar::after,
  .highlight-ai-selection {
    animation-duration: 2.5s;
  }
}

.spellcheck-panel {
  max-width: 980px;
}

.spellcheck-panel textarea {
  min-height: 360px;
}

.spellcheck-results {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 1180px;
}

.spellcheck-output {
  margin-bottom: 0;
}

.spellcheck-output summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 750;
}

.redline-output,
.corrected-output {
  margin: 0;
  white-space: pre-wrap;
  overflow-x: auto;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
}

.redline-output del {
  border-radius: 4px;
  background: #fdecec;
  color: #9f1f17;
  text-decoration-color: #d92d20;
  text-decoration-thickness: 2px;
}

.redline-output ins {
  border-radius: 4px;
  background: var(--success-soft);
  color: #067647;
  text-decoration: none;
}

/* =========================================================================
   Tables
   ========================================================================= */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover {
  background: #f7faff;
}

th {
  background: var(--surface-3);
  color: #3b4656;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.th-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3b4656;
  font-weight: 800;
}

.th-link span {
  color: var(--accent);
  font-size: 10px;
}

.status-filter {
  position: relative;
  display: inline-block;
}

.status-filter summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.status-filter summary::-webkit-details-marker {
  display: none;
}

.status-filter div {
  position: absolute;
  z-index: 20;
  min-width: 150px;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.status-filter a {
  display: block;
  padding: 9px 11px;
  color: var(--text);
  text-transform: none;
  font-size: 13px;
  letter-spacing: 0;
}

.status-filter a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

/* =========================================================================
   Buttons & forms
   ========================================================================= */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  padding: 7px 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease,
    transform 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  border-color: #a9b6c8;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  text-decoration: none;
}

.button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

.button.primary {
  background: linear-gradient(180deg, #3d6cf0 0%, var(--accent) 45%, var(--accent-strong) 100%);
  border-color: var(--accent-strong);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 12px rgba(43, 92, 230, 0.32);
}

.button.primary:hover {
  background: linear-gradient(180deg, #3563e3 0%, var(--accent-strong) 60%, var(--accent-deep) 100%);
  border-color: var(--accent-deep);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 18px rgba(43, 92, 230, 0.4);
}

.button.secondary {
  background: linear-gradient(180deg, #14867d 0%, #0f766e 100%);
  border-color: #0d655e;
  color: #ffffff;
}

.button.danger {
  background: #ffffff;
  border-color: #f4b4ae;
  color: var(--danger);
}

.button.danger:hover {
  background: var(--danger-soft);
  border-color: #eda69f;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #ffffff;
  padding: 8px 11px;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

input::placeholder,
textarea::placeholder {
  color: #98a4b5;
}

textarea {
  resize: vertical;
  font-family: var(--font-mono);
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.field {
  margin-bottom: 15px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-field input {
  width: auto;
  accent-color: var(--accent);
}

.errorlist {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 13px;
}

.actions,
.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filters input {
  max-width: 440px;
}

/* =========================================================================
   Jobs list & filters
   ========================================================================= */

.job-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.jobs-head {
  align-items: center;
}

.jobs-head h1 {
  margin-bottom: 6px;
}

.view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  background: #e7edf6;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.view-tabs a {
  color: #475467;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 750;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.view-tabs a:hover {
  text-decoration: none;
  color: var(--text);
}

.view-tabs a.active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.jobs-control-panel,
.jobs-table-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.jobs-control-panel {
  padding: 20px;
}

.jobs-table-panel {
  padding: 0;
  overflow: hidden;
}

.jobs-command-bar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto auto;
  gap: 14px;
  align-items: end;
}

.search-field label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 750;
}

.job-search {
  min-height: 46px;
  font-size: 15px;
}

.jobs-primary-actions,
.export-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.export-actions {
  justify-content: flex-end;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.export-actions .button.secondary {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.export-actions .button.secondary:hover {
  background: var(--surface-2);
  border-color: #a9b6c8;
  color: var(--text);
}

.quick-filters,
.active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-filters {
  margin-top: 16px;
}

.quick-filter-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quick-filters a,
.quick-filter-edit,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-secondary);
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.quick-filters a:hover,
.quick-filter-edit:hover,
.filter-chip:hover {
  border-color: var(--accent-border);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.quick-filter-edit {
  cursor: pointer;
  font-family: inherit;
}

.quick-filters a.is-highlight {
  border-color: #d4a900;
  background: linear-gradient(180deg, #fff9c9 0%, #ffe86f 100%);
  box-shadow: inset 0 -0.45em 0 rgba(255, 214, 10, 0.28);
  color: #594600;
}

.quick-filters a.is-highlight:hover {
  border-color: #a98400;
  background: #ffed7d;
  box-shadow: 0 0 0 3px rgba(255, 214, 10, 0.2);
}

.quick-filter-empty {
  color: var(--muted);
  font-size: 13px;
}

.quick-filter-dialog {
  width: min(860px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  color: var(--text);
}

.quick-filter-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}

.quick-filter-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.quick-filter-dialog-head h2 {
  margin: 0;
  font-size: 20px;
}

.quick-filter-dialog-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.dialog-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  padding: 0 3px;
}

.quick-filter-editor {
  display: grid;
  gap: 10px;
  padding: 18px 24px 4px;
}

.quick-filter-editor-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(170px, 1fr) minmax(160px, 1.2fr) auto;
  align-items: end;
  gap: 10px;
}

.quick-filter-editor-row label {
  display: grid;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.quick-filter-editor-row input,
.quick-filter-editor-row select {
  min-height: 40px;
  padding: 8px 10px;
}

.quick-filter-remove {
  min-height: 40px;
  border: 1px solid #efb8b8;
  border-radius: var(--radius-xs);
  background: #fff7f7;
  color: #9f2424;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 8px 12px;
}

.quick-filter-editor-empty {
  margin: 4px 0 10px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  padding: 20px;
  text-align: center;
}

.quick-filter-error {
  margin: 12px 24px 0;
  border-radius: var(--radius-xs);
  background: #fff0f0;
  color: #9f2424;
  padding: 10px 12px;
}

.quick-filter-editor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 18px 24px 22px;
}

.quick-filter-action-spacer {
  flex: 1;
}

.active-filters {
  margin-top: 12px;
}

.filter-chip {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-text);
}

.filter-chip span {
  color: #52627a;
  margin-left: 8px;
}

.advanced-filters {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  padding: 12px 14px 14px;
}

.advanced-filters summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 750;
  list-style: none;
}

.advanced-filters summary::-webkit-details-marker {
  display: none;
}

.advanced-filters summary strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.filter-grid .field {
  margin-bottom: 0;
}

.field.compact label {
  font-size: 12px;
}

.field.compact input,
.field.compact select {
  min-height: 38px;
  padding: 8px 10px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0, #fbfcfe 100%);
}

.jobs-table-wrap {
  border: 0;
  border-radius: 0;
}

.jobs-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f8fb;
  border-bottom-color: #ccd6e3;
}

.jobs-table td {
  padding-top: 15px;
  padding-bottom: 15px;
}

.jobs-table tbody tr:hover {
  background: #f5f9ff;
}

.jobs-table .role-cell {
  min-width: 300px;
  max-width: 520px;
}

.match-reason {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  margin-top: 5px;
}

.job-title {
  color: var(--accent-strong);
  font-weight: 750;
  line-height: 1.3;
}

.job-title:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.company-cell {
  color: var(--text);
  font-weight: 750;
  white-space: nowrap;
}

.location-cell {
  min-width: 160px;
}

.salary-cell {
  min-width: 190px;
  max-width: 320px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.nowrap {
  white-space: nowrap;
}

.empty-state {
  color: var(--muted);
  padding: 48px 20px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.5;
}

td.empty-state::before {
  content: "";
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a4b5' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 22px;
  box-shadow: var(--shadow-soft);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
}

/* =========================================================================
   Badges, pills & statuses
   ========================================================================= */

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  padding: 4px 10px;
  margin: 2px 4px 2px 0;
  font-size: 12px;
  font-weight: 700;
}

.pill.subtle {
  background: var(--surface-3);
  color: #475467;
  margin-left: 8px;
}

.score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.score-badge.excellent {
  background: var(--success-soft);
  color: var(--success);
  box-shadow: inset 0 0 0 1px var(--success-border);
}

.score-badge.strong {
  background: #eff8ff;
  color: #175cd3;
  box-shadow: inset 0 0 0 1px #cbe2ff;
}

.score-badge.standard {
  background: var(--surface-2);
  color: #475467;
  box-shadow: inset 0 0 0 1px var(--border);
}

.row-index {
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.score.good,
.status-completed {
  color: var(--success);
  font-weight: 800;
}

.score.warn {
  color: var(--warn);
}

.status-running {
  color: #175cd3;
  font-weight: 800;
}

.status-failed {
  color: var(--danger);
  font-weight: 800;
}

.status-aborted {
  color: #7a2e0e;
  font-weight: 800;
}

.run-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #f2f4f7;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.run-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.run-status.status-running {
  background: #eff8ff;
}

.run-status.status-completed {
  background: var(--success-soft);
}

.run-status.status-failed {
  background: var(--danger-soft);
}

.run-status.status-aborted {
  background: var(--warn-soft);
}

.run-status.status-open {
  background: var(--success-soft);
  color: var(--success);
}

.run-status.status-closed {
  background: #f2f4f7;
  color: var(--muted);
}

.run-status.status-unknown {
  background: var(--surface-2);
  color: var(--muted);
}

.work-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.work-badge {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.work-remote {
  background: var(--success-soft);
  color: var(--success);
}

.work-hybrid {
  background: var(--warn-soft);
  color: var(--warn);
}

.work-on-site,
.work-onsite {
  background: #f2f4f7;
  color: #475467;
}

.status-badge {
  background: var(--surface-2);
  color: var(--muted);
}

.status-badge.status-open {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.status-closed {
  background: #f2f4f7;
  color: #475467;
}

/* =========================================================================
   Support portal
   ========================================================================= */

.support-metrics {
  grid-template-columns: repeat(4, minmax(118px, 1fr));
}

.run-status.status-in_progress {
  background: #eff8ff;
  color: #175cd3;
}

.run-status.status-resolved {
  background: var(--success-soft);
  color: var(--success);
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-secondary);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.priority-badge.priority-high {
  background: var(--warn-soft);
  color: var(--warn);
}

.priority-badge.priority-urgent {
  background: var(--danger-soft);
  color: var(--danger);
}

.support-create-layout,
.support-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.support-create-layout > .panel {
  margin-bottom: 0;
}

.support-create-layout textarea,
.staff-reply-panel textarea {
  font-family: var(--font-sans);
}

.support-guidance {
  background: linear-gradient(145deg, #f8faff 0%, #ffffff 78%);
}

.support-guidance ul {
  padding-left: 20px;
  color: var(--text-secondary);
}

.support-guidance li {
  margin-bottom: 9px;
}

.support-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
  font-weight: 850;
}

.ticket-summary-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.ticket-summary-line .pill {
  margin: 0;
}

.support-thread {
  display: grid;
  gap: 14px;
}

.support-message {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.support-message.staff-message {
  border-color: var(--accent-border);
}

.support-message header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.support-message.staff-message header {
  background: var(--accent-soft);
  border-bottom-color: var(--accent-border);
}

.support-message header strong,
.support-message header span {
  display: block;
}

.support-message header span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.message-avatar {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  font-weight: 850;
}

.message-avatar.staff {
  background: var(--accent);
  color: #fff !important;
}

.support-message-body {
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.support-awaiting {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px dashed var(--accent-border);
  border-radius: var(--radius);
  background: rgba(233, 239, 255, 0.45);
  color: var(--text-secondary);
}

.support-awaiting span {
  color: var(--muted);
}

.ticket-metadata,
.staff-reply-panel {
  margin-bottom: 16px;
}

.support-filters {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(145px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.support-filters .field {
  margin: 0;
}

.support-filters .filter-actions {
  flex-wrap: nowrap;
}

@media (max-width: 1100px) {
  .support-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-filters .filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .support-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-create-layout,
  .support-detail-layout {
    grid-template-columns: 1fr;
  }

  .support-detail-layout > aside {
    grid-row: 1;
  }

  .support-filters,
  .support-filters .filter-actions {
    grid-template-columns: 1fr;
  }

  .support-filters .filter-actions {
    display: grid;
  }
}

/* =========================================================================
   Flash messages, detail lists & logs
   ========================================================================= */

.messages {
  margin-bottom: 18px;
}

.message {
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-soft);
}

.message.error {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  border-left-color: var(--danger);
}

.message.info {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  border-left-color: var(--accent);
}

.detail-list {
  display: grid;
  gap: 12px;
}

.detail-list div {
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.detail-list strong {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.log-viewer,
.code-block {
  background: #0e1424;
  color: #f9fafb;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 13px;
}

.log-viewer {
  max-height: 380px;
  line-height: 1.5;
}

.log-line {
  display: grid;
  grid-template-columns: 76px 72px minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.log-time {
  color: #98a2b3;
}

.log-level {
  color: #bfdbfe;
  font-weight: 800;
}

.log-error .log-level {
  color: #fda29b;
}

.log-warning .log-level {
  color: #fedf89;
}

/* =========================================================================
   Sidebar account
   ========================================================================= */

.sidebar-account {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
}

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 8px rgba(43, 92, 230, 0.4);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.account-email {
  color: var(--sidebar-text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.button-subtle {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
}

.button-subtle:hover {
  border-color: rgba(148, 163, 184, 0.6);
  background: rgba(30, 41, 59, 0.75);
  color: #ffffff;
}

.full-width {
  width: 100%;
}

/* =========================================================================
   Auth (login) screen
   ========================================================================= */

.auth-panel {
  width: min(100% - 32px, 448px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0;
}

.auth-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(199, 208, 221, 0.8);
  border-radius: var(--radius-lg);
  box-shadow:
    0 30px 80px rgba(23, 37, 84, 0.16),
    0 1px 2px rgba(16, 24, 40, 0.06);
  padding: 34px 32px 32px;
  backdrop-filter: blur(8px);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #6d8ff5 45%, #12a594 100%);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.auth-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(150deg, #16223f 0%, var(--sidebar) 55%, var(--accent-deep) 130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px rgba(13, 21, 42, 0.4);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  color: #111827;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.auth-brand small {
  color: var(--muted);
  margin-top: 2px;
}

.auth-heading {
  margin-bottom: 22px;
}

.auth-heading h1 {
  margin-bottom: 8px;
}

.auth-heading p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.auth-fields {
  display: grid;
  gap: 14px;
}

.auth-form input {
  width: 100%;
  min-height: 42px;
}

.auth-submit {
  margin-top: 20px;
  min-height: 42px;
  font-size: 14.5px;
}

.field-error {
  display: block;
  margin-top: 6px;
  color: var(--danger);
  font-size: 13px;
}

.auth-footnote {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  text-align: center;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-height: 780px) and (min-width: 921px) {
  body {
    font-size: 13px;
  }

  .main {
    padding-top: 16px;
    padding-bottom: 26px;
  }

  .page-head {
    margin-bottom: 14px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    margin-bottom: 10px;
  }

  .panel {
    padding: 14px;
    margin-bottom: 14px;
  }

  .metric {
    padding: 11px 12px;
  }

  .metric .value {
    font-size: 24px;
  }

  th,
  td {
    padding-top: 7px;
    padding-bottom: 7px;
  }
}

@media (max-width: 1100px) {
  .metrics:not(.dashboard-metrics) {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .dashboard-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-metrics .metric {
    padding: 10px 8px;
  }

  .dashboard-metrics .metric .label {
    font-size: 10px;
    letter-spacing: 0.045em;
  }

  .dashboard-metrics .metric .value {
    font-size: clamp(20px, 2.3vw, 24px);
  }

  .drive-list-head,
  .drive-file-row {
    grid-template-columns: minmax(240px, 1fr) 88px 100px 160px 44px;
  }

  .filter-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .jobs-command-bar {
    grid-template-columns: 1fr;
  }

  .jobs-primary-actions,
  .export-actions {
    justify-content: flex-start;
  }

  .export-actions {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .mobile-topbar {
    display: flex;
  }

  .sidebar-scrim {
    display: block;
  }

  body.nav-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  /* Sidebar becomes an off-canvas drawer: content is what you land on. */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    width: min(300px, 85vw);
    height: 100dvh;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    transform: translateX(-104%);
    transition: transform 240ms cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 24px 0 60px rgba(11, 17, 32, 0.45);
    border-right: 1px solid rgba(148, 163, 184, 0.16);
  }

  body.nav-open .sidebar {
    transform: none;
  }

  .brand {
    margin-bottom: 14px;
  }

  /* Comfortable touch targets & no-zoom form fields. */
  .nav a {
    min-height: 44px;
  }

  .button {
    min-height: 44px;
    padding: 9px 16px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
    min-height: 44px;
  }

  textarea,
  input[type="checkbox"],
  input[type="radio"] {
    min-height: 0;
  }

  .metrics:not(.dashboard-metrics),
  .grid-2,
  .form-grid,
  .settings-groups,
  .wizard-steps,
  .wizard-summary-grid {
    grid-template-columns: 1fr;
  }

  .drive-command,
  .drive-dropzone {
    align-items: stretch;
    flex-direction: column;
  }

  .drive-list-head,
  .drive-file-row {
    grid-template-columns: minmax(0, 1fr) 72px 42px;
  }

  .drive-list-head > span:nth-child(3),
  .drive-list-head > span:nth-child(4),
  .drive-file-row > span:nth-child(3),
  .drive-file-row > span:nth-child(4) {
    display: none;
  }

  .main {
    padding: 18px 14px 32px;
  }

  .page-head {
    display: block;
  }

  .view-tabs {
    margin-top: 14px;
  }

  .jobs-command-bar {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .quick-filter-editor-row {
    grid-template-columns: 1fr;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
  }

  .quick-filter-remove {
    justify-self: start;
  }

  .quick-filter-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-filter-action-spacer {
    display: none;
  }

  .table-meta {
    display: block;
  }

  .wizard-actions,
  .wizard-actions.split {
    align-items: stretch;
    flex-direction: column;
  }

  .description-example {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================================
   Mobile card tables — list tables (.card-table) become tappable cards.
   Cell roles: .cell-primary (title), .cell-secondary (subtitle),
   .cell-badge (inline chip row), .cell-actions (kebab, pinned top-right),
   td[data-label] (labelled fact row). Desktop rendering is untouched.
   ========================================================================= */

@media (max-width: 700px) {
  .table-wrap:has(> .card-table) {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .card-table {
    background: transparent;
  }

  .card-table thead {
    display: none;
  }

  .card-table tbody {
    display: grid;
    gap: 12px;
  }

  .card-table tbody tr {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 14px 14px 12px;
  }

  .card-table tbody tr:hover {
    background: var(--surface);
  }

  .card-table td {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
  }

  .card-table td.cell-primary {
    order: -3;
    width: calc(100% - 40px);
    font-size: 15.5px;
    line-height: 1.35;
  }

  .card-table td.cell-secondary {
    order: -2;
    width: calc(100% - 40px);
    color: var(--text-secondary);
    white-space: normal;
  }

  .card-table td.cell-badge {
    order: -1;
    width: auto;
  }

  .card-table td[data-label] {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    font-size: 13px;
    min-width: 0;
  }

  .card-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .card-table td.cell-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    width: auto;
  }

  .card-table .row-index {
    display: none;
  }

  .card-table td.empty-state,
  .card-table td.muted[colspan] {
    padding: 18px 4px;
  }

  .card-table .role-cell {
    min-width: 0;
    max-width: none;
  }

  .card-table .location-cell,
  .card-table .salary-cell {
    min-width: 0;
    max-width: none;
  }

  .card-table .company-cell {
    white-space: normal;
  }

  /* The jobs list panel dissolves into the page so cards read as cards. */
  .jobs-table-panel {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .table-meta {
    border: 0;
    background: transparent;
    padding: 0 2px 12px;
  }

  .pagination {
    justify-content: center;
  }
}

/* =========================================================================
   Rendered Markdown reports (resume, skill gap reports)
   ========================================================================= */

.markdown-body {
  max-width: 920px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.7;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 28px 0 10px;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.markdown-body h1 {
  font-size: 23px;
}

.markdown-body h2 {
  position: relative;
  padding-bottom: 8px;
  font-size: 18px;
}

.markdown-body h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(43, 92, 230, 0));
}

.markdown-body h3 {
  font-size: 15.5px;
}

.markdown-body h4 {
  font-size: 14px;
}

.markdown-body p {
  margin: 0 0 12px;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 14px;
  padding-left: 24px;
}

.markdown-body li {
  margin: 4px 0;
}

.markdown-body li > ul,
.markdown-body li > ol {
  margin-bottom: 4px;
}

.markdown-body a {
  color: var(--accent);
  font-weight: 600;
}

.markdown-body hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.markdown-body blockquote {
  margin: 0 0 14px;
  padding: 10px 16px;
  border-left: 3px solid var(--accent-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: var(--text-secondary);
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.markdown-body pre {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow-x: auto;
}

.markdown-body pre code {
  padding: 0;
  background: none;
}

.markdown-body table {
  margin: 4px 0 18px;
  border: 1px solid var(--border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.markdown-body th {
  white-space: nowrap;
}

/* Severity badges & demand bars (added by report-visuals.js) */

.md-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.md-badge-high {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger);
}

.md-badge-medium {
  background: var(--warn-soft);
  border-color: #fed7aa;
  color: var(--warn);
}

.md-badge-low {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}

.md-meter-cell {
  min-width: 130px;
}

.md-meter {
  position: relative;
  display: flex;
  align-items: center;
  height: 24px;
  border-radius: 7px;
  background: var(--surface-3);
  overflow: hidden;
}

.md-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 7px;
  background: linear-gradient(90deg, #5b8bf7 0%, var(--accent) 100%);
  opacity: 0.28;
}

.md-meter-label {
  position: relative;
  padding-left: 10px;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Listing analysis panel: colored highlights for label lead-ins and side notes */

.listing-analysis .markdown-body h3 {
  color: var(--accent-deep);
}

.listing-analysis .markdown-body li > strong:first-child,
.listing-analysis .markdown-body p > strong:first-child {
  color: var(--accent-text);
}

.listing-analysis .markdown-body blockquote {
  background: var(--warn-soft);
  border-left-color: var(--gold);
  color: var(--text);
}

.listing-analysis .markdown-body blockquote strong {
  color: var(--warn);
}

/* While a row menu or status filter is open, let it escape the table frame
   instead of being clipped by the scroll container. */

.table-wrap:has(.file-actions[open]),
.table-wrap:has(.status-filter[open]) {
  overflow: visible;
}

/* =========================================================================
   Public landing page
   ========================================================================= */

.landing-page {
  font-size: 15px;
}

.landing-container {
  width: min(100% - 48px, 1080px);
  margin: 0 auto;
}

.landing-page h1,
.landing-page h2,
.landing-page h3 {
  color: var(--text);
  letter-spacing: -0.02em;
}

/* --- top nav --- */

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.landing-nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.landing-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(150deg, #16223f 0%, var(--sidebar) 55%, var(--accent-deep) 130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 6px 14px rgba(13, 21, 42, 0.35);
  color: #ffffff;
  font-size: 12px;
}

.landing-nav-links {
  display: flex;
  gap: 22px;
  margin-right: auto;
}

.landing-nav-links a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13.5px;
}

.landing-nav-links a:hover {
  color: var(--accent-strong);
}

.landing-nav-actions {
  display: flex;
  gap: 10px;
}

.landing-nav-actions .button,
.landing-brand b {
  white-space: nowrap;
}

.landing-brand b {
  font-weight: inherit;
}

/* --- hero --- */

.landing-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}

.landing-hero::before,
.landing-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.landing-hero::before {
  width: 560px;
  height: 560px;
  top: -260px;
  right: -140px;
  background: radial-gradient(circle, rgba(43, 92, 230, 0.16), transparent 65%);
}

.landing-hero::after {
  width: 480px;
  height: 480px;
  bottom: -260px;
  left: -160px;
  background: radial-gradient(circle, rgba(18, 165, 148, 0.13), transparent 65%);
}

.landing-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.landing-hero-copy h1 {
  margin: 10px 0 16px;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.08;
  font-weight: 800;
}

.landing-lede {
  margin: 0 0 26px;
  color: var(--text-secondary);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.6;
  max-width: 46ch;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.landing-hero-actions .button {
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
}

.landing-hero-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.landing-hero-visual svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --- value strip --- */

.landing-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.landing-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 26px 0;
}

.landing-strip-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.landing-strip-grid span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* --- sections --- */

.landing-section {
  padding: clamp(56px, 7vw, 88px) 0;
}

.landing-section-alt {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.landing-section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.landing-section-head h2 {
  margin: 8px 0 12px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  font-weight: 800;
}

.landing-section-head p:last-child {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15.5px;
}

/* --- steps --- */

.landing-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.landing-steps li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 26px 26px 24px;
}

.landing-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 15px;
}

.landing-steps h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.landing-steps p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* --- feature grid --- */

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.landing-features article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.landing-features article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.landing-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
}

.landing-feature-icon svg {
  width: 22px;
  height: 22px;
}

.landing-features h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.landing-features p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

/* --- privacy (dark) band --- */

.landing-dark {
  background:
    radial-gradient(700px 300px at 85% -80px, rgba(43, 92, 230, 0.25), transparent 70%),
    linear-gradient(160deg, #101a33 0%, var(--sidebar) 60%);
  color: var(--sidebar-text);
  padding: clamp(56px, 7vw, 88px) 0;
}

.landing-dark-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.landing-dark .eyebrow {
  color: #7ea2ff;
}

.landing-dark h2 {
  margin: 8px 0 12px;
  color: #ffffff;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
}

.landing-dark p {
  margin: 0;
  color: var(--sidebar-text);
  font-size: 15px;
  line-height: 1.6;
}

.landing-dark-points {
  display: grid;
  gap: 18px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.landing-dark-points li {
  position: relative;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
}

.landing-dark-points strong {
  color: #ffffff;
}

/* --- final CTA + footer --- */

.landing-final {
  padding: clamp(56px, 7vw, 88px) 0;
  text-align: center;
}

.landing-final h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
}

.landing-final p {
  margin: 0 0 26px;
  color: var(--text-secondary);
  font-size: 16px;
}

.landing-final-actions {
  justify-content: center;
}

.landing-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.landing-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.landing-footer nav {
  display: flex;
  gap: 22px;
}

.landing-footer nav a {
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
}

.landing-footer nav a:hover {
  color: var(--accent-strong);
}

/* --- landing responsive --- */

@media (max-width: 920px) {
  .landing-hero-grid,
  .landing-dark-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero-visual {
    max-width: 560px;
  }

  .landing-strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-nav-links {
    display: none;
  }

  .landing-nav-actions {
    margin-left: auto;
  }
}

@media (max-width: 600px) {
  .landing-strip-grid,
  .landing-features,
  .landing-steps {
    grid-template-columns: 1fr;
  }

  .landing-footer-inner {
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }
}

@media (max-width: 480px) {
  /* Static on small screens: a sticky bar costs too much vertical space. */
  .landing-nav {
    position: static;
  }

  .landing-nav-inner {
    gap: 14px;
  }

  /* Icon-only brand: the wordmark doesn't fit next to two buttons. */
  .landing-brand b {
    display: none;
  }
}

/* =========================================================================
   Dashboard onboarding widget (React, built from frontend/)
   Bridges the app's design tokens to the component's --color-* names.
   ========================================================================= */

#onboarding-root {
  --color-accent: var(--accent);
  --color-accent-soft: var(--accent-soft);
  --color-muted: var(--muted);
  --color-surface: var(--surface);
  --color-text: var(--text);
  --color-border: var(--border-strong);
  padding: 8px 2px 12px;
}
