/* BLS Reasonable Compensation Calculator Styles */

:root {
  /* Brand (mirrors reasonable-comp-mainsite) */
  --navy: #0d2b55;
  --navy-dark: #081b38;
  --navy-light: #1a3f6f;
  --gold: #c8a84b;
  --gold-light: #e0c068;
  --primary: var(--navy);
  --primary-dark: var(--navy-dark);
  --primary-soft: #eef2f8;
  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --error: #dc2626;
  --error-soft: #fef2f2;

  /* Neutrals (legacy gray names kept so every page inherits) */
  --gray-50: #f7f8fa;
  --gray-100: #f0f2f5;
  --gray-200: #e2e6ea;
  --gray-300: #d3d9df;
  --gray-400: #9aa4ad;
  --gray-500: #6c757d;
  --gray-700: #3d4b5c;
  --gray-900: #1a2433;

  /* Type */
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* Surfaces & shape */
  --surface: #ffffff;
  --page-bg: #f7f8fa;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-raised: 0 8px 32px rgba(13, 43, 85, 0.13);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--page-bg);
  min-height: 100vh;
}

.account-nav { display: flex; justify-content: flex-end; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.account-nav a { color: var(--primary); font-weight: 600; text-decoration: none; }
.account-shell header { text-align: left; }
.clerk-root {
  width: 100%;
  min-height: auto;
  padding: 0;
  box-shadow: none;
}
.clerk-root [data-clerk-modal],
.clerk-root .cl-modalBackdrop {
  background: transparent !important;
  inset: auto !important;
  position: static !important;
}
.clerk-root .cl-card,
.clerk-root .cl-cardBox,
.clerk-root .cl-rootBox {
  width: 100% !important;
  max-width: 100% !important;
  box-shadow: none !important;
  margin: 0 !important;
}
/* Hide Clerk development badge and "Secured by Clerk" footer only — not MFA/TOTP controls */
.clerk-root .cl-footer,
.clerk-root [class*="cl-internal-"][class*="badge"],
.clerk-root .cl-internal-b3fm6y {
  display: none !important;
}
.platform-page { max-width: 1050px; }
.pricing-grid, .dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.platform-card { background: var(--surface); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-card); margin-bottom: 1.5rem; position: relative; }
.platform-card.featured { border: 2px solid var(--navy); box-shadow: var(--shadow-raised); }
.platform-card h2 { margin-bottom: 1rem; }
.platform-card ul { margin: 1rem 0 1.5rem 1.25rem; }
.price { font-family: var(--font-serif); font-size: 2.75rem; color: var(--navy); font-weight: 700; line-height: 1.2; }.price span { font-family: var(--font-sans); font-size: 1rem; color: var(--gray-500); font-weight: 400; }
.platform-card button { width: auto; padding: .75rem 1rem; border-radius: .5rem; cursor: pointer; font-weight: 600; }
.platform-notice { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: .5rem; padding: 1rem; margin-bottom: 1.5rem; }
.button-row, .section-heading { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.section-heading h2 { margin-bottom: 0; }
.credit-total strong { font-size: 2.25rem; font-weight: 750; letter-spacing: -0.02em; color: var(--primary); }
.record-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem .6rem; margin-inline: -.6rem; border-bottom: 1px solid var(--gray-200); border-radius: var(--radius-sm); color: inherit; text-decoration: none; transition: background-color .15s; }
.record-row:hover { background: var(--gray-50); }
.record-row:hover strong { color: var(--primary); }
.record-row:last-child { border-bottom: 0; }.record-row > span { display: grid; }.record-row small, .record-row time { color: var(--gray-500); font-size: .875rem; }
.record-side { justify-items: end; gap: .4rem; }
@media (max-width: 600px) { .record-row { flex-direction: column; gap: .25rem; } .account-nav { justify-content: flex-start; } }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--gray-500);
  font-size: 1rem;
}

/* Form */
form {
  background: white;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

input[type="text"], input[type="email"], input[type="url"], input[type="file"],
input[type="number"], textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="file"]:focus,
input[type="number"]:focus, textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea { width: 100%; min-height: 120px; resize: vertical; }
.checkbox-row label { font-weight: 400; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; margin-top: 1rem; }
.metric-grid p { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: .5rem; padding: 1rem; display: grid; }
.metric-grid strong { color: var(--primary); font-size: 1.5rem; }.metric-grid span { color: var(--gray-500); font-size: .875rem; }
.policy-content h2 { margin: 1.5rem 0 .5rem; }.policy-content h2:first-child { margin-top: 0; }.policy-content p { color: var(--gray-700); }
.admin-page { max-width: 1250px; }.admin-list { display: grid; gap: .75rem; margin: 1rem 0 1.5rem; }
.admin-row { border: 1px solid var(--gray-200); border-radius: .5rem; padding: 1rem; display: grid; gap: .5rem; }
.admin-row p { color: var(--gray-500); overflow-wrap: anywhere; }.table-scroll { overflow-x: auto; margin-top: 1rem; }
.admin-table { border-collapse: collapse; min-width: 1100px; width: 100%; }.admin-table th, .admin-table td { border-bottom: 1px solid var(--gray-200); padding: .65rem; text-align: left; vertical-align: top; font-size: .875rem; }.admin-table th { background: var(--gray-50); }
.reverification-dialog { width: min(32rem, calc(100vw - 2rem)); border: 1px solid var(--gray-200); border-radius: 1rem; padding: 1.5rem; color: var(--gray-900); background: white; box-shadow: 0 24px 80px rgba(15, 23, 42, .28); }
.reverification-dialog::backdrop { background: rgba(15, 23, 42, .62); }
.reverification-methods { display: grid; gap: .85rem; margin: 1rem 0; }
.reverification-form { display: grid; gap: .65rem; padding: .85rem; border: 1px solid var(--gray-200); border-radius: .625rem; }
.reverification-form label { display: grid; gap: .4rem; font-weight: 600; }
.btn-danger { background: var(--error); border: 0; border-radius: .5rem; color: white; cursor: pointer; font-weight: 600; padding: .65rem .85rem; }

input[type="checkbox"] {
  margin-right: 0.5rem;
}

.hint {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

button[type="submit"] {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

button[type="submit"]:hover {
  background: var(--primary-dark);
}

button[type="submit"]:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
}

.soc-override {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

/* Error */
.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--error);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

/* Results */
#results {
  background: white;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-100);
}

.result-section {
  margin-bottom: 2rem;
}

.result-section:last-child {
  margin-bottom: 0;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.result-item {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: 0.5rem;
}

.result-item.full-width {
  grid-column: 1 / -1;
}

.result-item .label {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.result-item .value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-900);
}

/* Wage Table */
.wage-table {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--gray-200);
}

th {
  font-weight: 600;
  background: var(--gray-50);
  color: var(--gray-700);
}

th:first-child,
td:first-child {
  text-align: left;
}

td.highlight {
  background: #ecfdf5;
  font-weight: 600;
  color: var(--success);
}

/* Audit Info */
.audit-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-500);
  font-size: 0.875rem;
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.disclaimer {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* Loading State */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
  }

  .container {
    padding: 1rem;
  }

  form, #results {
    padding: 1.5rem;
  }

  table {
    font-size: 0.8125rem;
  }

  th, td {
    padding: 0.5rem;
  }

  .welcome-hero,
  .resume-card {
    grid-template-columns: 1fr;
  }

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

  .tool-card {
    min-height: 0;
  }

  .welcome-actions,
  .resume-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button-link {
    width: 100%;
  }
}

/* Fallback level badges */
.fallback-msa {
  color: var(--success);
}

.fallback-state {
  color: var(--warning);
}

.fallback-national {
  color: var(--gray-500);
}

/* Settings Button */
header {
  position: relative;
}

.settings-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

.settings-btn:hover {
  background: var(--gray-100);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 0;
}

.modal-header h2 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 1.25rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-500);
  padding: 0.25rem;
  line-height: 1;
}

.close-btn:hover {
  color: var(--gray-900);
}

.modal-body {
  padding: 1.5rem;
}

.modal-body .form-group {
  margin-bottom: 1rem;
}

input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Status Indicator */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-300);
}

.status-dot.available {
  background: var(--success);
}

.status-dot.unavailable {
  background: var(--error);
}

.status-text {
  font-size: 0.875rem;
  color: var(--gray-700);
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
}

/* Clickable Alternative Matches */
.alternatives-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.alt-match {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.alt-match:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.alt-match .soc-code {
  font-weight: 600;
  margin-right: 0.25rem;
}

.alt-match .soc-title {
  color: inherit;
}

.alt-match.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.no-alternatives {
  color: var(--gray-500);
  font-style: italic;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--gray-200);
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.nav-tabs a {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--gray-500);
  border-radius: 4px 4px 0 0;
  transition: all 0.2s;
}

.nav-tabs a:hover {
  color: var(--primary);
  background: var(--gray-100);
}

.nav-tabs a.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  margin-bottom: -2px;
}

/* Shared guidance and accessibility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

:where(button, .button-link, .nav-tabs a, summary) {
  min-height: 44px;
}

.eyebrow {
  color: var(--gold);
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.nav-badge,
.recommended-badge {
  background: var(--gold);
  border-radius: 999px;
  color: var(--navy);
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0.35rem 0.75rem;
  text-transform: uppercase;
}

.nav-badge {
  margin-left: 0.25rem;
  vertical-align: middle;
}

.screen-intro,
.advanced-section {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
}

.screen-intro h2,
.advanced-section h2,
.welcome-hero h2,
.resume-card h2 {
  border: 0;
  margin-bottom: 0.5rem;
  padding: 0;
}

.help-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 1rem;
}

.help-panel {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  margin-top: 0.75rem;
}

.help-panel summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 650;
  padding: 0.75rem 1rem;
}

.help-panel summary::after {
  content: '+';
  font-size: 1.25rem;
  margin-left: auto;
}

.help-panel[open] summary::after {
  content: '−';
}

.help-panel-content {
  border-top: 1px solid var(--gray-200);
  color: var(--gray-700);
  padding: 0.8rem 1rem 1rem;
}

.help-panel-content p + p {
  margin-top: 0.65rem;
}

.form-instruction {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
}

.required-key,
.required-mark,
.optional-mark {
  font-size: 0.75rem;
  font-weight: 700;
}

.required-key,
.required-mark {
  color: #9f1239;
}

.optional-mark {
  color: var(--gray-500);
}

.required-mark,
.optional-mark {
  margin-left: 0.35rem;
}

.field-error {
  color: var(--error);
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

[aria-invalid="true"] {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

.meaning-box {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
}

.meaning-box h3 {
  color: #065f46;
  margin-bottom: 0.35rem;
}

.table-scroll,
.results-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

/* Welcome */
.welcome-page {
  max-width: 1040px;
}

.welcome-hero,
.resume-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  margin-bottom: 1.5rem;
  padding: 1.5rem;
}

.welcome-actions,
.resume-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  margin-top: 1.25rem;
}

.button-link {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
  width: auto;
}

.time-estimate {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.prep-card {
  background: var(--gray-50);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.prep-card ul {
  padding-left: 1.2rem;
}

.prep-card li + li {
  margin-top: 0.35rem;
}

.resume-card {
  border-left: 5px solid var(--primary);
  box-shadow: none;
  grid-template-columns: minmax(0, 1fr) auto;
}

.resume-actions {
  align-items: stretch;
  flex-direction: column;
  margin: 0;
}

.text-link {
  color: var(--primary);
  font-weight: 600;
  text-align: center;
}

.tool-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1.25rem;
}

.tool-card {
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  color: inherit;
  display: block;
  min-height: 185px;
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.tool-card h3 {
  color: var(--gray-900);
  font-size: 1.1rem;
}

.tool-card span {
  color: var(--primary);
  display: inline-block;
  font-weight: 650;
  margin-top: 1rem;
}

.alt-match {
  font: inherit;
  min-height: 36px;
}

/* Secondary Button */
.btn-secondary {
  padding: 0.75rem 1rem;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
}

.btn-secondary:disabled {
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: not-allowed;
}

/* CSS Variables for Many Hats page */
:root {
  --bg: white;
  --bg-secondary: var(--gray-50);
  --border: var(--gray-300);
  --text-secondary: var(--gray-500);
  --primary-light: #eff6ff;
}

/* Reasonable Compensation Report */
.report-page {
  max-width: 1100px;
}

.report-editor,
.report-paper {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  padding: 1.5rem;
}

.report-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font: inherit;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.report-toggle-row,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
}

.report-toggle-row label {
  align-items: center;
  display: inline-flex;
  margin: 0;
  min-height: 44px;
}

.preview-guidance {
  background: #eff6ff;
  border-radius: 0.5rem;
  color: #1e3a8a;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
}

.method-explanation {
  background: var(--gray-50);
  border-left: 3px solid var(--primary);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  padding: 0.65rem;
}

.assumption-fields {
  display: grid;
  gap: 0.75rem;
}

.assumption-field-row {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.report-header {
  align-items: start;
  border-bottom: 2px solid var(--gray-100);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.report-header h1 {
  margin-bottom: 0.25rem;
  text-align: left;
}

.report-meta {
  display: flex;
  gap: 0.75rem;
}

.report-meta div,
.report-fact,
.report-summary > div {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.report-meta span,
.report-fact span,
.report-kicker {
  color: var(--gray-500);
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.report-summary strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.2;
  margin-top: 0.25rem;
}

.report-summary small {
  color: var(--gray-500);
}

.report-section {
  margin-bottom: 1.5rem;
}

.report-section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.report-fact-grid,
.report-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.report-method-card {
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1rem;
}

.report-method-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
  background: #f8fbff;
}

.report-method-card.muted {
  color: var(--gray-500);
}

.report-method-amount {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.report-method-card dl {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.report-method-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.report-method-card dt {
  color: var(--gray-500);
}

.report-method-card dd {
  font-weight: 600;
}

.report-table {
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  width: 100%;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid var(--gray-200);
  padding: 0.35rem;
  text-align: left;
}

.report-assumptions,
.report-warnings {
  padding-left: 1.25rem;
}

.report-warnings {
  color: var(--warning);
  margin-top: 0.75rem;
}

.advisor-notes {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  padding: 1rem;
}

@media (max-width: 640px) {
  .nav-tabs {
    gap: 0.25rem;
  }

  .nav-tabs a {
    padding-inline: 0.75rem;
  }

  .report-header {
    align-items: stretch;
    flex-direction: column;
  }

  .report-meta {
    flex-wrap: wrap;
    width: 100%;
  }

  .report-meta > div {
    flex: 1 1 120px;
  }

  .report-method-card {
    min-width: 0;
    overflow-x: auto;
  }

  .welcome-hero,
  .resume-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome-hero > *,
  .resume-card > * {
    min-width: 0;
  }

  .tool-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-card {
    min-height: 0;
  }

  .welcome-actions,
  .resume-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button-link {
    max-width: 100%;
    white-space: normal;
    width: 100%;
  }
}

@media print {
  body {
    background: white;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .no-print,
  header:not(.report-header),
  .site-header,
  .page-hero,
  footer {
    display: none !important;
  }

  .report-paper {
    box-shadow: none;
    margin: 0;
    padding: 0;
  }

  .report-section,
  .report-method-card {
    break-inside: avoid;
  }

  .report-header,
  .report-summary,
  .report-method-grid {
    break-inside: avoid;
  }
}

/* ===== Design system: shared components (brand mirrors reasonable-comp-mainsite) ===== */

/* Site header */
.site-header {
  background: var(--navy);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1100px;
  min-height: 68px;
  padding: 0.4rem 24px;
}

.logo {
  align-items: center;
  display: flex;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  align-items: center;
  background: var(--gold);
  border-radius: 4px;
  color: var(--navy);
  display: flex;
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  letter-spacing: -1px;
  width: 42px;
}

.logo-text {
  color: var(--surface);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.logo-text span {
  color: rgba(255, 255, 255, 0.65);
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.site-nav a {
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  padding: 6px 12px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--surface);
}

.site-nav .btn-nav {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  padding: 8px 18px;
}

.site-nav .btn-nav:hover {
  background: var(--gold-light);
  color: var(--navy);
}

/* Page hero band */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  color: var(--surface);
  padding: 52px 24px 46px;
}

.page-hero-inner {
  margin: 0 auto;
  max-width: 1100px;
}

.page-hero .eyebrow {
  color: var(--gold-light);
}

.page-hero h1 {
  color: var(--surface);
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 10px;
}

.page-hero .subtitle,
.page-hero p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  max-width: 560px;
}

/* Serif section headings */
.section-title {
  border: 0;
  color: var(--navy);
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
  padding: 0;
}

/* Gold CTA */
.btn-gold {
  background: var(--gold);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(200, 168, 75, 0.3);
  color: var(--navy);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.75rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

/* Subscription plan cards */
.plan-label {
  color: var(--gray-500);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan-price {
  color: var(--navy);
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.5rem;
}

.plan-period {
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.plan-badge {
  background: var(--gold);
  border-radius: 20px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  left: 50%;
  letter-spacing: 0.1em;
  padding: 5px 14px;
  position: absolute;
  text-transform: uppercase;
  top: -13px;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Status pills */
.pill {
  align-items: center;
  background: var(--gray-100);
  border-radius: 999px;
  color: var(--gray-700);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 0.4rem;
  line-height: 1;
  padding: 0.38rem 0.75rem;
  white-space: nowrap;
}

.pill::before {
  background: currentColor;
  border-radius: 50%;
  content: '';
  flex: 0 0 auto;
  height: 0.45rem;
  width: 0.45rem;
}

.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warning { background: var(--warning-soft); color: var(--warning); }
.pill-danger { background: var(--error-soft); color: var(--error); }

/* Skeleton loading */
.skeleton {
  animation: shimmer 1.4s ease infinite;
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  min-height: 1rem;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.skeleton-rows {
  display: grid;
  gap: 0.85rem;
  padding: 0.5rem 0;
}

.skeleton-rows .skeleton { height: 1.35rem; }
.skeleton-rows .skeleton:nth-child(2n) { width: 70%; }

.clerk-skeleton {
  display: grid;
  gap: 0.9rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}

.clerk-skeleton .skeleton:nth-child(1) { height: 1.9rem; width: 55%; }
.clerk-skeleton .skeleton:nth-child(2) { height: 1rem; width: 80%; }
.clerk-skeleton .skeleton:nth-child(3) { height: 2.6rem; }
.clerk-skeleton .skeleton:nth-child(4) { height: 2.6rem; }

/* Banners */
.banner-warning {
  background: var(--warning-soft);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  color: #78350f;
  margin-bottom: 1.5rem;
  padding: 1rem;
}

.banner-success {
  background: var(--success-soft);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  color: #065f46;
  margin-top: 1.25rem;
  padding: 1rem;
}

.banner-success a {
  color: #047857;
  font-weight: 700;
}

/* Empty states */
.empty-state {
  color: var(--gray-500);
  padding: 1.5rem 1rem;
  text-align: center;
}

.empty-state a {
  color: var(--primary);
  font-weight: 600;
}

/* Auth layout (auth.html serves /sign-in, /sign-up, /account) */
.auth-shell { margin: 0 auto; }
body.auth-narrow .auth-shell { max-width: 500px; }
body.auth-narrow .page-hero-inner { text-align: center; }
body.auth-narrow .page-hero .subtitle { margin: 0 auto; }
body.auth-wide .auth-shell { max-width: 940px; }

/* Dashboard affiliate id row */
.affiliate-id {
  align-items: center;
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

