:root {
  /* tekRESCUE AI design tokens, copied from the tekrescue.ai stylesheet so this page
     matches the site.  Every color on the page is one of these, or white / amber at
     partial opacity, the same way the site uses them. */
  --base: #0A1E2E;     /* page background */
  --surf2: #0F2A3F;    /* raised surface: header, cards */
  --dark: #06161F;     /* deepest navy: pop-up backdrop */
  --steel: #1B6A99;    /* logo mark gradient start */
  --accent: #F59E0B;   /* the single brand accent */
  --on-accent: #06212F; /* text on amber (the site's button text) */
  --tx-head: #F3F8FB;  /* headings */
  --tx-emph: #CDD9E1;  /* labels, emphasis */
  --tx-sub: #AEC3D0;   /* intro text */
  --tx-body: #9FB6C2;  /* body text */
  --tx-nav: #B9CCD8;   /* header and footer links */
  --tx-muted: #7E98A8; /* quiet notes */
  --tx-fine: #6F8A99;  /* fine print */
  --done: #6CC070;     /* completed step (the site's booking stepper uses it) */
  --error: #F0786B;    /* the site's form error color */

  --line: rgba(255, 255, 255, 0.09);      /* card borders */
  --line-input: rgba(255, 255, 255, 0.15); /* input borders */
  --line-soft: rgba(255, 255, 255, 0.07); /* dividers */
  --accent-wash: rgba(245, 158, 11, 0.08);  /* amber panels */
  --accent-tint: rgba(245, 158, 11, 0.10);  /* selected options */
  --accent-line: rgba(245, 158, 11, 0.35);  /* amber panel borders */
  --hero-grad: radial-gradient(120% 130% at 80% -10%, #15425E 0%, #0F2A3F 45%, #0A1E2E 100%);

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--base);
  scroll-padding-top: 96px; /* keeps a field the form jumps to clear of the sticky header */
}

body {
  margin: 0;
  background: var(--base) var(--hero-grad) no-repeat;
  background-size: 100% 820px;
  color: var(--tx-body);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Header (the tekrescue.ai nav bar) ---------- */
.masthead {
  background: var(--surf2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}
.masthead-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* The tekRESCUE AI logo: the original tekRESCUE circle and plus with the AI sparkles
   (inline SVG, same drawing as favicon.svg), next to the site's wordmark */
.logo { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.logo .mark { width: 30px; height: 30px; flex: none; display: block; }
.logo .word { font: 600 17px var(--font-head); color: #fff; letter-spacing: -0.01em; }
.logo .ai { color: var(--accent); }
.masthead-title { margin: 0; font-size: 14.5px; color: var(--tx-nav); }
.progress { height: 3px; background: rgba(255, 255, 255, 0.08); }
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.35s ease;
}

/* ---------- Layout ---------- */
.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 40px 72px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* ---------- Stepper (the site's booking stepper, stacked) ---------- */
.rail { position: sticky; top: 110px; }
.stepper { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.stepper li { counter-increment: step; }
.step-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  background: none;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  color: var(--tx-muted);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.step-btn::before {
  content: counter(step);
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  font: 600 12px var(--font-mono);
}
.step-btn:disabled { cursor: default; opacity: 0.6; }
.step-btn.is-done { color: var(--tx-sub); }
.step-btn.is-done::before { content: "\2713"; color: var(--done); }
.step-btn.is-current { color: var(--tx-head); font-weight: 600; }
.step-btn.is-current::before { color: var(--accent); background: var(--accent-tint); }
.step-btn:not(:disabled):hover { background: rgba(255, 255, 255, 0.05); color: var(--tx-head); }

/* ---------- Page ---------- */
#page-container:focus { outline: none; }
.page-head { margin-bottom: 36px; max-width: 64ch; }
/* "Step 1 of 5" in the site's eyebrow style, with its amber tick */
.page-count {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font: 600 13px var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-count::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.page-title {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.25rem, 4.2vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: #fff;
}
.page-intro { margin: 0; font-size: 1.125rem; line-height: 1.65; color: var(--tx-sub); }

.section {
  background: var(--surf2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 36px;
  margin-bottom: 24px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 6px;
}
.section-title {
  margin: 0;
  font: 600 1.375rem var(--font-head);
  letter-spacing: -0.01em;
  color: var(--tx-head);
}
.section-intro { margin: 0 0 8px; color: var(--tx-body); }
.section-score {
  flex: none;
  font: 600 13px var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- Fields ---------- */
.field { padding: 20px 0; border-top: 1px solid var(--line-soft); }
.section-head + .field,
.section-intro + .field,
.section > .field:first-child { border-top: 0; }

.field-label {
  display: block;
  font-weight: 600;
  color: var(--tx-head);
  margin-bottom: 10px;
  max-width: 72ch;
}
.field-label .req { color: var(--accent); }
.field-hint { margin: -6px 0 12px; color: var(--tx-muted); font-size: 0.95rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--tx-head);
  background: var(--base);
  border: 1px solid var(--line-input);
  border-radius: 9px;
  padding: 13px 14px;
  transition: border-color 0.15s;
}
textarea { min-height: 104px; resize: vertical; }
::placeholder { color: var(--tx-fine); opacity: 1; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
/* Keep browser autofill on brand instead of a pale yellow or blue box */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--tx-head);
  caret-color: var(--tx-head);
  box-shadow: 0 0 0 1000px var(--base) inset;
  transition: background-color 9999s;
}
.field.has-error input,
.field.has-error textarea { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field-error {
  margin: 8px 0 0;
  padding-left: 10px;
  border-left: 3px solid var(--error);
  color: var(--error);
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}
.contact-grid .field { border-top: 0; padding: 10px 0; }
.contact-grid .field-label { font-size: 0.95rem; color: var(--tx-emph); margin-bottom: 8px; }

/* Composite rows */
.parts { display: grid; gap: 12px; }
.parts.row { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); align-items: end; }
.parts.row .part.wide { grid-column: span 2; }
.parts.stack .part { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; }
.part-label { display: block; font-size: 0.9rem; color: var(--tx-sub); margin-bottom: 6px; }
.parts.stack .part-label { margin: 0; font: 600 13px var(--font-mono); color: var(--accent); text-align: right; }

/* Choice buttons (yes/no and 0-3 ratings): the site's option cards, small */
.choices { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 44px;
  padding: 0 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: var(--base);
  font: 600 1rem var(--font-head);
  color: var(--tx-emph);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.choice span:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--tx-head); }
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.rating-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rating-meaning { color: var(--tx-sub); font-size: 0.95rem; min-height: 1.5em; }

/* Scoring key on the checklist page (the site's amber card) */
.scale {
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  padding: 22px 26px 24px;
  margin-bottom: 24px;
}
.scale-title {
  margin: 0 0 16px;
  font: 600 13px var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.scale-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.scale-grid div { display: flex; gap: 10px; align-items: flex-start; line-height: 1.35; }
.scale-grid dt {
  flex: none;
  font: 600 1.625rem var(--font-head);
  line-height: 1;
  color: var(--accent);
}
.scale-grid dd { margin: 0; font-size: 0.95rem; color: var(--tx-emph); }

/* Scoreboard */
.scoreboard {
  background: var(--base);
  border: 1.5px solid var(--accent);
  border-radius: 18px;
  padding: 28px 32px;
  margin-bottom: 24px;
}
.scoreboard h3 { margin: 0 0 14px; font: 600 1.25rem var(--font-head); color: var(--tx-head); }
.score-line {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--tx-emph);
}
.score-line span:last-child { font: 500 0.95rem var(--font-mono); color: var(--tx-head); }
.score-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 16px;
  color: var(--tx-head);
  font-weight: 600;
}
.score-total strong { font: 600 2.75rem var(--font-head); letter-spacing: -0.02em; color: var(--accent); line-height: 1; }
.score-note { margin: 12px 0 0; font-size: 0.95rem; color: var(--tx-body); }

/* Estimate block on deep dive */
.field.estimate {
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 8px;
}

/* ---------- Nav bar ---------- */
.nav-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
}
.save-note { flex: 1; text-align: center; color: var(--tx-muted); font-size: 14px; }
.nav-bar .btn-primary { margin-left: auto; } /* stays on the right when Back is hidden */
.btn {
  font: 700 16px var(--font-body);
  border-radius: 10px;
  padding: 15px 28px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.2s, border-color 0.15s, color 0.15s;
}
/* The site's amber button: dark navy text on amber (white on amber is unreadable) */
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; filter: none; }
.btn-ghost { background: none; color: var(--tx-emph); border-color: rgba(255, 255, 255, 0.2); font-weight: 600; padding: 15px 24px; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); color: var(--tx-head); }
.btn[hidden] { display: none; }

.form-status { min-height: 1.5em; margin: 16px 0 0; text-align: right; font-weight: 600; }
.form-status.is-error { color: var(--error); border-right: 3px solid var(--error); padding-right: 10px; }
.form-status.is-ok { color: var(--tx-head); }

/* ---------- Scheduling pop-up (the site's confirmation card) ---------- */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 22, 31, 0.82);
}
.modal[hidden] { display: none; }
.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--base);
  border: 1.5px solid var(--accent);
  border-radius: 18px;
  padding: 40px 36px 30px;
  text-align: center;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
}
.modal-title {
  margin: 0 0 12px;
  font: 600 1.75rem var(--font-head);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--tx-head);
}
.modal-message { margin: 0 0 24px; white-space: pre-wrap; text-align: left; color: var(--tx-body); line-height: 1.65; }
.countdown { position: relative; width: 84px; height: 84px; margin: 0 auto 10px; }
.countdown-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 5; }
.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 175.93;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.countdown-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 600 1.75rem var(--font-head);
  color: var(--tx-head);
}
.modal-note { margin: 0 0 20px; color: var(--tx-muted); font-size: 0.95rem; }
.modal-card .btn { width: 100%; }
.modal-fallback { margin: 16px 0 0; font-size: 0.9rem; color: var(--tx-muted); }
.modal-fallback a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer (the site's Footer.astro, without the link columns) ---------- */
.footer { border-top: 1px solid var(--line-soft); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 70px 40px 40px; }
.footer-tagline { font: 500 22px var(--font-head); letter-spacing: -0.01em; color: #CFE0EA; margin: 18px 0 6px; }
.footer-contact { font-style: normal; font-size: 14.5px; line-height: 1.7; color: var(--tx-muted); margin: 14px 0 0; }
.footer a { text-decoration: none; transition: color 0.15s; }
.footer-contact a { color: var(--tx-nav); }
.footer a:hover { color: #fff; }
.footer-bar {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  color: var(--tx-fine);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.nowrap { white-space: nowrap; }
/* Link to the parent company, styled like the site's info cards */
.footer .footer-parent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--tx-sub);
  transition: border-color 0.15s, color 0.15s;
}
.footer-parent strong { color: var(--accent); font-weight: 600; }
.footer .footer-parent:hover { border-color: var(--accent-line); color: var(--tx-head); }
.footer-legal a { color: #8FA7B5; }

/* Skip link, as on every tekrescue.ai page */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .masthead-inner { padding: 16px 24px; }
  .shell { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 28px 24px 48px; }
  .rail { position: static; }
  .stepper { display: flex; gap: 4px; overflow-x: auto; }
  .step-btn { flex-direction: column; gap: 6px; font-size: 0.8rem; text-align: center; padding: 6px; min-width: 76px; }
  .scale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { padding: 56px 24px 32px; }
}
@media (max-width: 600px) {
  .masthead-title { display: none; }
  .shell { padding: 24px 16px 40px; }
  .page-head { margin-bottom: 28px; }
  .section { padding: 24px 18px; border-radius: 14px; }
  .scoreboard { padding: 22px 20px; }
  .contact-grid { grid-template-columns: 1fr; }
  .scale-grid { grid-template-columns: 1fr; }
  .parts.row .part.wide { grid-column: auto; }
  .save-note { display: none; }
  .nav-bar { justify-content: space-between; }
  .modal-card { padding: 30px 22px 24px; }
  .modal-title { font-size: 1.5rem; }
  .footer-inner { padding: 48px 16px 28px; }
  .footer .footer-parent { border-radius: 12px; } /* a capsule looks odd once the line wraps */
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar { transition: none; }
  .ring-fill { transition: none; }
}
