/*
 * Updated Credit Tools — reference-inspired theme
 * Load AFTER the page's existing styles. No font downloads or image assets required.
 * Edit the semantic tokens below to customize the entire site.
 */

:root {
  color-scheme: light;
  --color-canvas: #ffffff;
  --color-surface: #ffffff;
  --color-surface-soft: #faf8fc;
  --color-text: #282331;
  --color-muted: #686170;
  --color-accent: #7656a7;
  --color-accent-soft: #f0eaf8;
  --color-action: #2b233b;
  --color-action-hover: #443456;
  --color-border: #e8e3ed;
  --color-focus: #7656a7;
  --font-heading: "Baskerville", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius-control: 8px;
  --radius-card: 14px;
  --radius-page: 24px;
  --shadow-card: 0 8px 28px rgb(52 36 76 / 6%);
  --shadow-page: 0 20px 65px rgb(52 36 76 / 12%);
  --space-section: clamp(64px, 8vw, 112px);

  /* Compatibility with both existing stylesheets. */
  --blue: var(--color-accent);
  --blue-dark: var(--color-action-hover);
  --blue-deep: var(--color-action-hover);
  --blue-soft: var(--color-accent-soft);
  --ink: var(--color-text);
  --slate: var(--color-muted);
  --mist: var(--color-surface-soft);
  --white: var(--color-surface);
  --mint: #e6eedf;
  --mint-dark: #466044;
  --mint-deep: #466044;
  --signal: #e5d9f4;
  --line: var(--color-border);
  --error: #b42318;
  --success: #28704b;
  --display: var(--font-heading);
  --body: var(--font-body);
  --max: 1120px;
  --gutter: clamp(20px, 4vw, 56px);
}

html { background: var(--color-canvas); }
body { background: var(--white); font-family: var(--body); line-height: 1.65; }
::selection { color: var(--ink); background: var(--signal); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
section[id] { scroll-margin-top: 96px; }
.shell > *, .form-grid > *, .hero-grid > *, .contact-layout > * { min-width: 0; }
.contact-line a, .policy-copy a { overflow-wrap: anywhere; }

/* Quiet navigation and the original brand mark in the new palette. */
.site-header {
  position: relative;
  color: var(--ink);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-page) var(--radius-page) 0 0;
}
.site-header.is-fixed { box-shadow: 0 4px 20px rgb(52 36 76 / 4%); }
.nav { min-height: 78px; gap: 24px; }
.brand { gap: 10px; font-size: 19px; font-weight: 400; line-height: 1.08; text-transform: none; }
.brand-mark { width: 36px; height: 36px; }
.brand-mark rect { fill: var(--color-accent-soft); }
.brand-mark path { stroke: var(--color-accent); }
.nav-links { gap: 23px; }
.nav-links a { color: var(--slate); font-size: 13px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--blue); }
.nav-links .nav-login { border-color: transparent; border-radius: var(--radius-control); background: var(--mist); }
.nav-links .nav-action {
  color: var(--white);
  background: var(--color-action);
  border: 1px solid var(--color-action);
  border-radius: var(--radius-control);
}
.nav-links .nav-action:hover { color: var(--white); background: var(--color-action-hover); }
.menu-button { color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-control); }

/* Light serif headings; compact sans-serif labels and body text. */
.page-title, .section-title, .hero h1, .auth-visual h1,
.auth-card h2, .signup-rail h2, .form-section h3,
.policy-copy h2, .modal h2, .planner-output h3,
.route-panel h3, .compare-row h3, .success-panel h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.035em;
  text-transform: none;
  text-wrap: balance;
}
.page-title { max-width: 850px; font-size: clamp(42px, 6.3vw, 78px); }
.section-title, .questions .section-title { font-size: clamp(34px, 4.4vw, 56px); }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.lead, .section-copy { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.7; }

/* Primary / secondary actions share the same treatment on every page. */
.button, .button-blue, .button-signal {
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--color-action);
  border-radius: var(--radius-control);
  color: var(--white);
  background: var(--color-action);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 3px 8px rgb(43 35 59 / 8%);
}
.button:hover, .button-blue:hover, .button-signal:hover {
  color: var(--white);
  border-color: var(--color-action-hover);
  background: var(--color-action-hover);
  box-shadow: 0 5px 14px rgb(43 35 59 / 14%);
  transform: translateY(-1px);
}
.button-ghost, .modal .button-ghost { color: var(--ink); border-color: var(--line); background: var(--white); box-shadow: none; }
.button-ghost:hover, .modal .button-ghost:hover { color: var(--color-action); border-color: var(--blue); background: var(--color-accent-soft); }
.button:disabled { opacity: .58; transform: none; box-shadow: none; }

/* Atmospheric washes echo the reference without requiring its landscape art. */
.hero {
  min-height: 580px;
  height: auto;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 16% 100%, #e8eadd 0, transparent 48%),
    radial-gradient(ellipse at 88% 95%, #e2d5ee 0, transparent 48%),
    linear-gradient(180deg, #fff 24%, #faf8fc 65%, #eee9f4);
}
.hero::before, .hero::after, .page-hero::after { display: none; }
.hero-inner { min-height: 580px; justify-content: center; padding-top: 80px; padding-bottom: 100px; }
.hero-copy { width: min(100%, 750px); text-align: center; }
.hero .eyebrow { color: var(--blue); }
.hero h1 { font-size: clamp(52px, 7.4vw, 92px); }
.hero h1 span { color: var(--slate); }
.hero-lead { max-width: 570px; margin: 24px auto 0; color: var(--slate); font-size: 17px; }
.hero-actions { justify-content: center; gap: 18px; margin-top: 28px; }
.hero-link { color: var(--color-action); font-size: 13px; font-weight: 500; }
.hero-note { right: var(--gutter); bottom: 22px; color: var(--slate); text-align: center; letter-spacing: 0; }
.page-hero { min-height: 360px; padding: var(--space-section) 0 64px; background: linear-gradient(135deg, #fff, var(--mist) 65%, #eee7f5); }
.hero-aside { border-left: 1px solid #b79bda; }
.planner, .routes, .compare, .questions, .contact, .content-section, .signup-main { padding-block: var(--space-section); }
.planner, .questions, .signup-main { background: var(--mist); }

/* Existing interactive components keep their layouts and state selectors. */
.planner-workspace { border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.planner-questions { padding: clamp(24px, 3.5vw, 44px); }
.choice { border-radius: var(--radius-control); font-weight: 500; }
.choice:hover { background: var(--mist); }
.choice[aria-pressed="true"] { color: var(--color-action); border-color: var(--blue); background: var(--color-accent-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.planner-output { color: var(--ink); background: var(--color-accent-soft); border-radius: 0 var(--radius-card) var(--radius-card) 0; }
.planner-output h3 { font-size: clamp(30px, 3.5vw, 44px); }
.planner-output p { color: var(--slate); }
.output-status { color: var(--blue); font-weight: 600; letter-spacing: .06em; }
.status-dot { border-color: var(--blue); }
.status-dot.ready { background: var(--blue); }
.output-steps li { border-color: #d9cce8; }
.output-steps li::before, .output-link { color: var(--blue); }
.question-label, .route-name, .route-checks li, .faq-button { font-weight: 500; }
.route-tab[aria-selected="true"] { color: var(--ink); background: var(--color-accent-soft); box-shadow: inset 3px 0 var(--blue); }
.route-tab[aria-selected="true"] .route-letter { color: var(--blue); }
.route-panel h3 { font-size: clamp(32px, 3.8vw, 48px); }
.check-box { border-color: #d9cce8; border-radius: 5px; }
.compare { color: var(--ink); background: var(--white); border-block: 1px solid var(--line); }
.compare .eyebrow, .compare-row strong { color: var(--blue); }
.compare .section-copy, .compare-row p { color: var(--slate); }
.compare-grid, .compare-row, .compare-row > * { border-color: var(--line); }
.compare-row > :last-child { background: var(--mist); }
.compare-row h3 { font-size: 26px; }
.faq-list, .contact-details { border-top: 1px solid var(--line); }
.faq-button svg { color: var(--blue); }

/* Forms, onboarding, and account views. */
.field label, .field-label { font-size: 12px; font-weight: 600; }
.field input, .field select, .field textarea { border-radius: var(--radius-control); background: #fefdfF; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 3px solid var(--color-accent-soft); outline-offset: 1px; }
.field [aria-invalid="true"], .field [aria-invalid="true"]:focus { border-color: var(--error); outline-color: #fee4e2; }
.field-help, .error-text, .form-status, .check-label, .auth-foot { font-size: 12px; }
.form-link, .check-label a, .auth-foot a, .contact-line a { font-weight: 600; }
.signup-form { border: 1px solid var(--line); border-top: 2px solid #b79bda; border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.signup-steps li { font-weight: 500; }
.signup-steps li::before { color: var(--blue); background: var(--color-accent-soft); border-radius: 50%; }
.privacy-strip, .policy-callout { border-radius: var(--radius-control); }
.policy-callout { border-left: 2px solid #b79bda; }
.policy-copy p, .policy-copy li { font-size: 15px; }
.auth-visual { color: var(--ink); background: linear-gradient(150deg, #fcfbfd 5%, #eee6f5 65%, #e6e9df); }
.auth-visual::before, .auth-visual::after { display: none; }
.auth-visual .eyebrow { color: var(--blue); }
.auth-visual h1 { font-size: clamp(46px, 5.5vw, 74px); }
.auth-visual p { color: var(--slate); }
.auth-points li { border-color: #d9cce8; font-weight: 500; }
.auth-points li::before { color: var(--blue); }
.auth-card h2 { font-size: clamp(36px, 4vw, 50px); }
.success-panel, .modal-panel { color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.success-panel { background: var(--mist); }
.success-panel p, .modal p { color: var(--slate); }
.success-icon, .modal-icon { color: var(--blue); background: var(--color-accent-soft); border-radius: 12px; }
.modal { background: rgb(40 35 49 / 40%); backdrop-filter: blur(6px); }
.modal-close { color: var(--ink); border-color: var(--line); border-radius: var(--radius-control); }
.modal-note { border-color: var(--line); border-radius: var(--radius-control); background: var(--mist); }

/* An airy white footer, like the reference. */
.site-footer { color: var(--ink); background: var(--white); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-page) var(--radius-page); }
.site-footer .brand { color: var(--ink); }
.footer-summary, .footer-links a, .footer-bottom p { color: var(--slate); }
.footer-links a { font-size: 12px; font-weight: 400; }
.footer-links a:hover { color: var(--blue); }
.footer-bottom { border-color: var(--line); }
.footer-bottom p { font-size: 11px; }

/* Reusable surfaces for future components. */
.theme-card { padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--white); box-shadow: var(--shadow-card); }
.theme-card-accent { border-top: 2px solid #b79bda; background: linear-gradient(180deg, var(--mist), var(--white)); }
.theme-muted { color: var(--slate); }

@media (max-width: 960px) {
  .site-header, .site-footer { border-radius: 0; }
  .menu-button { display: grid; }
  .nav-links {
    position: fixed;
    z-index: 45;
    inset: 78px 0 auto;
    display: grid;
    gap: 0;
    padding: 22px var(--gutter) 30px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-150%);
    transition: transform .25s ease, visibility .25s;
  }
  .nav-links.open { visibility: visible; pointer-events: auto; transform: none; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav-links .nav-action, .nav-links .nav-login { margin-top: 10px; padding: 12px 14px; text-align: center; }
}

@media (max-width: 900px) {
  .planner-output { border-radius: 0 0 var(--radius-card) var(--radius-card); }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .nav { min-height: 72px; }
  .brand { font-size: 17px; }
  .nav-links { top: 72px; }
  .hero { min-height: 560px; height: auto; }
  .hero-inner { min-height: 560px; align-items: center; padding-top: 54px; padding-bottom: 100px; }
  .hero h1 { font-size: clamp(44px, 12vw, 68px); }
  .hero-lead { max-width: 100%; font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-note { font-size: 10px; }
  .page-title { font-size: clamp(38px, 10vw, 58px); }
  .page-hero { min-height: 0; padding-block: 64px; }
  .planner-questions, .planner-output { padding: 28px 22px; }
  .auth-visual h1 { font-size: clamp(42px, 11vw, 62px); }
  .compare-row > :last-child { padding: 12px; border-radius: var(--radius-control); }
}

@media (prefers-reduced-motion: reduce) {
  .button:hover { transform: none; }
  .hero-copy > * { opacity: 1; transform: none; animation: none; }
}
