:root {
  --navy-900: #0a1f3c;
  --navy-800: #0f2645;
  --gold: #f5c64b;
  --gold-ink: #3a2c06; /* text color used ON gold, for contrast */
  --blue: #2563eb;
  --teal: #0e9594;
  --green: #16a34a;
  --orange: #ea6a1e;
  --page: #ffffff;
  --section: #f4f4f4;
  --body: #5a6472;
  --line: #e3e5e8;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--section);
  color: var(--navy-900);
  font-family: var(--font);
  line-height: 1.6;
}

a { color: var(--blue); }

/* ---------- Shared type helpers ---------- */

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.eyebrow::before { content: ""; display: block; width: 24px; height: 2px; background: currentColor; flex: none; }
.eyebrow-gold { color: var(--gold); }
.eyebrow-blue { color: var(--blue); }

/* ---------- Site header ---------- */

.site-header { background: var(--navy-800); }
.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 64px;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 0.7rem; color: #fff; }
.mark { display: inline-flex; width: 22px; height: 22px; color: var(--gold); flex: none; }
.wordmark {
  font-family: var(--font);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  line-height: 1.25;
  color: #fff;
}
.footer-wordmark { text-transform: none; letter-spacing: 0; font-size: 1rem; }

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--navy-800);
  background-size: cover;
  background-position: center;
  z-index: -2;
}
/* The overlay is what the brief calls "a dark navy overlay at roughly 70%
   opacity" -- a tint over whatever photo sits in .hero-bg, swappable
   independently of it, so white text stays readable regardless of what
   image eventually replaces the placeholder. */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 31, 60, 0.82), rgba(15, 38, 69, 0.7));
  z-index: -1;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-headline {
  color: #fff;
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 1.25rem;
}
.hero-sub {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  font-weight: 400;
  max-width: 34em;
  margin: 0;
}

.hero-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 2rem;
}

.hero-card label {
  color: #fff;
  font-weight: 500;
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.hero-card textarea {
  width: 100%;
  font: inherit;
  color: #fff;
  background: rgba(10, 20, 38, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  resize: vertical;
  margin-bottom: 1.25rem;
}
.hero-card textarea::placeholder { color: rgba(255, 255, 255, 0.55); }

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

.select-shell {
  position: relative;
  background: rgba(10, 20, 38, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}
.select-shell select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 500;
  font-size: 0.93rem;
  color: #fff;
  padding: 0.65rem 2.2rem 0.65rem 0.8rem;
  cursor: pointer;
}
.select-shell select option { color: var(--navy-900); }
.select-shell::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid rgba(255, 255, 255, 0.7);
  border-bottom: 2px solid rgba(255, 255, 255, 0.7);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ---------- Buttons ---------- */

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--gold-ink);
  border: 1px solid var(--gold);
}
.btn-primary:hover { background: #f0b82e; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* .btn-secondary is used in the (light) results section, not on the dark
   hero, so it's an outline in navy rather than the brief's white-on-dark
   version -- same idea (quiet, outlined, next to a solid primary), adapted
   to sit on a white card instead of the photo. */
.btn-secondary {
  background: transparent;
  color: var(--navy-800);
  border: 1px solid var(--navy-800);
}
.btn-secondary:hover { background: var(--navy-800); color: #fff; }

@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; padding: 3rem 1.5rem 3.5rem; }
}

/* ============================================================
   Page shell + results view
   ============================================================ */

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

.status {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  font-size: 0.95rem;
}
.status.loading { background: #e8f0fe; color: var(--navy-800); }
.status.error { background: #fdece3; color: #9a3412; }

.result {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(10, 20, 40, 0.05);
}

.result-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.toolbar-hint { margin: 0; font-size: 0.82rem; color: var(--body); }

.pathway-title { color: var(--navy-900); margin: 0 0 0.25rem; font-size: 1.7rem; }
.one-line { color: var(--body); margin: 0; font-size: 1.05rem; font-weight: 400; }

/* The divider is a separate element from .block on purpose: a border-top
   or padding-top directly on a block that goes on to contain something
   tall enough to span multiple printed pages (the flowchart, a long build
   notes list) reliably makes Chrome's print pagination insert one wholly
   blank page before the content starts. Isolating the border onto its own
   thin sibling avoids that. */
.block-divider { border: none; border-top: 1px solid var(--line); margin: 2rem 0 1.5rem; }
.block { margin: 0 0 1.5rem; }
.block h3 { font-size: 1.05rem; margin-top: 0; }
.block h4 { margin-bottom: 0.4rem; }

.muted { color: var(--body); font-size: 0.92rem; }

#flowchart { width: 100%; overflow-x: auto; text-align: center; -webkit-overflow-scrolling: touch; }
#flowchart svg { max-width: 100%; }

/* Build notes: three accent cards (left border + icon tile), rotating
   through the palette, instead of one flat gray box -- the same three
   lists the app has always generated, just given the card treatment the
   reference design uses for supporting content. */
.note-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}
.note-card {
  background: var(--page);
  border: 1px solid var(--line);
  border-left: 4px solid var(--card-accent, var(--blue));
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 1px 3px rgba(10, 20, 40, 0.05);
}
.note-card.accent-blue { --card-accent: var(--blue); }
.note-card.accent-green { --card-accent: var(--green); }
.note-card.accent-teal { --card-accent: var(--teal); }
.note-card.accent-orange { --card-accent: var(--orange); }

.note-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--card-accent, var(--blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.note-card-icon svg { width: 18px; height: 18px; }
.note-card h4 { color: var(--navy-900); font-size: 0.98rem; }
.note-card ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.note-card li { margin-bottom: 0.4rem; color: var(--body); font-size: 0.92rem; }
.note-card li:last-child { margin-bottom: 0; }

/* ---------- Site footer ---------- */

.site-footer { background: var(--navy-800); color: rgba(255, 255, 255, 0.85); margin-top: 3rem; }
.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}
.footer-brand { max-width: 28em; }
.footer-description { margin: 0.9rem 0 0; font-size: 0.92rem; color: rgba(255, 255, 255, 0.65); }

.footer-links h5 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 0.9rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { color: rgba(255, 255, 255, 0.85); font-size: 0.92rem; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.footer-divider { max-width: 1180px; margin: 0 auto; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-fine-print {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 1.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   Print ("Download as PDF" -- see app.js for why this uses the
   browser's native print pipeline instead of a screenshot library)
   ============================================================ */

@media print {
  body { background: #fff; }
  .site-header, .hero, #status, .site-footer, .result-toolbar {
    display: none !important;
  }
  main { max-width: none; padding: 0; margin: 0; }
  .result { border: none; box-shadow: none; padding: 0; margin: 0; }
  /* Trying to keep the whole flowchart/build-notes block from splitting
     backfires once a block is taller than one page: Chrome can't honor
     "don't split" so it burns an entire blank page trying before giving up.
     Keep only small pieces (headings and list items) intact instead. */
  .block h3, .block h4 { break-after: avoid; }
  .block li, .note-card { break-inside: avoid; }
  #flowchart { overflow: visible; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 0.5in; }
}

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

@media (max-width: 480px) {
  .site-header-inner, .hero-inner, main, .site-footer-inner, .footer-divider, .footer-fine-print {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .site-nav { gap: 1rem; }
  .hero-card { padding: 1.25rem; }
  .result { padding: 1.1rem; }
  .result-toolbar { align-items: stretch; }
  #download-btn { width: 100%; justify-content: center; }
  .toolbar-hint { text-align: center; }
  .site-footer-inner { gap: 2rem; }
}
