:root {
  --red: #b22326;
  --red-deep: #8e1b1e;
  --cream: #fbf7ef;
  --parchment: #f4ebdc;
  --card: #fffdf8;
  --ink: #2e2119;
  --ink-soft: #6b5847;
  --line: #e3d6c2;
  --gold: #c98a2e;
  --gold-soft: #f3e6c9;
  --green: #39715b;
  --green-soft: #edf6f0;
  --blue: #416b75;
  --blue-soft: #edf5f6;
  --danger-soft: #fff0f0;
  --shadow: 0 18px 50px rgba(63, 39, 23, .11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0, rgba(201, 138, 46, .14), transparent 27rem),
    linear-gradient(180deg, #fffdf8 0, var(--cream) 24rem, #f7efe3 100%);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.55;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

a { color: var(--red); }
[hidden] { display: none !important; }

.preview-ribbon {
  background: var(--ink);
  color: #fff7e8;
  padding: .55rem 1rem;
  text-align: center;
  font: 700 .76rem/1.3 Arial, sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 2.4rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img { width: 58px; height: 58px; object-fit: contain; }
.brand strong { display: block; font-size: 1.22rem; line-height: 1.05; }
.brand small, .portal-label {
  display: block;
  color: var(--red);
  font: 800 .67rem/1.3 Arial, sans-serif;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.header-home {
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  font: 800 .78rem/1.2 Arial, sans-serif;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.header-home:hover { border-color: var(--gold); color: var(--red); }

.page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-copy { padding: clamp(2rem, 6vw, 4.8rem); }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr); }
.hero-photo {
  min-height: 470px;
  background: linear-gradient(rgba(35, 20, 12, .08), rgba(35, 20, 12, .28)), url('/site/assets/privacy/patio-hero-no-people.jpg') center/cover;
}

.eyebrow {
  color: var(--gold);
  font: 800 .75rem/1.3 Arial, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; }
h1 { margin: .55rem 0 1rem; font-size: clamp(2.35rem, 7vw, 4.7rem); letter-spacing: -.035em; }
h2 { margin: .35rem 0 .7rem; font-size: clamp(1.65rem, 4vw, 2.5rem); }
h3 { margin: .25rem 0 .55rem; font-size: 1.28rem; }
h4 { margin: .2rem 0 .45rem; }
p { margin: .45rem 0 1rem; }
.lead { max-width: 42rem; color: var(--ink-soft); font-size: clamp(1.04rem, 2vw, 1.22rem); }
.muted, .help { color: var(--ink-soft); }
.fine { font: .82rem/1.45 Arial, sans-serif; color: var(--ink-soft); }

.button-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.35rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--red);
  color: #fffdf8;
  cursor: pointer;
  font: 800 .82rem/1.2 Arial, sans-serif;
  letter-spacing: .075em;
  padding: .85rem 1.25rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn:hover { background: var(--red-deep); box-shadow: 0 8px 20px rgba(142, 27, 30, .18); transform: translateY(-1px); }
.btn.secondary { background: var(--ink); }
.btn.secondary:hover { background: #4b392d; }
.btn.ghost { border: 1px solid var(--line); background: var(--card); color: var(--red); }
.btn.ghost:hover { background: var(--parchment); }
.btn.green { background: var(--green); }
.btn.small { min-height: 38px; padding: .6rem .85rem; font-size: .74rem; }
.btn:disabled { cursor: not-allowed; opacity: .48; transform: none; box-shadow: none; }

.boundary {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  margin: 1.2rem 0;
  border: 1px solid #e4c88d;
  border-radius: 12px;
  background: #fff7e6;
  padding: .9rem 1rem;
  color: #624716;
  font: .88rem/1.45 Arial, sans-serif;
}
.boundary b { display: block; margin-bottom: .14rem; }
.boundary-icon { flex: none; font-size: 1.2rem; }

.section { padding: clamp(2rem, 5vw, 3.8rem) 0 0; }
.section-head { max-width: 720px; margin-bottom: 1.25rem; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 253, 248, .96);
  padding: clamp(1.15rem, 3vw, 1.65rem);
  box-shadow: 0 9px 28px rgba(67, 40, 21, .07);
}
.card.lift { transition: transform .18s ease, box-shadow .18s ease; }
.card.lift:hover { transform: translateY(-4px); box-shadow: 0 16px 35px rgba(67, 40, 21, .12); }
.card-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: .8rem;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font: 900 .9rem Arial, sans-serif;
}

.journey {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
}
.journey-step { position: relative; min-height: 104px; padding: 1rem; border-right: 1px solid var(--line); }
.journey-step:last-child { border-right: 0; }
.journey-step strong { display: block; color: var(--red); }
.journey-step small { color: var(--ink-soft); font-family: Arial, sans-serif; }

.stage-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.3rem;
  background: var(--red);
  color: white;
}
.stage-head strong { font-size: 1.05rem; }
.stage-head span { font: 700 .72rem Arial, sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.stage-body { padding: clamp(1.3rem, 5vw, 3rem); }

.progress { height: 8px; overflow: hidden; border-radius: 99px; background: #eee2d2; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--red); transition: width .25s ease; }
.upload-guidance {
  display: grid;
  gap: .25rem;
  margin: .8rem 0;
  border: 1px solid #d9c293;
  border-radius: 10px;
  background: #fff8e9;
  padding: .8rem .9rem;
  color: #59401a;
  font: .9rem/1.45 Arial, sans-serif;
}
.upload-guidance strong { color: var(--ink); }
.upload-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem .8rem;
  align-items: center;
  margin: 1rem 0;
  border: 1px solid #c7dfe3;
  border-radius: 12px;
  background: var(--blue-soft);
  padding: .9rem 1rem;
  color: var(--ink);
  font: .9rem/1.45 Arial, sans-serif;
}
.upload-status strong, .upload-status span { display: block; }
.upload-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(65, 107, 117, .22);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: upload-spin .8s linear infinite;
}
.upload-meter {
  grid-column: 1 / -1;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: #dbe8e9;
  accent-color: var(--blue);
}
.upload-meter::-webkit-progress-bar { border-radius: 99px; background: #dbe8e9; }
.upload-meter::-webkit-progress-value { border-radius: 99px; background: var(--blue); }
.upload-meter::-moz-progress-bar { border-radius: 99px; background: var(--blue); }
.upload-percent { grid-column: 1 / -1; color: var(--blue); font-weight: 800; }
@keyframes upload-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .upload-spinner { animation: none; border-color: var(--blue); } }
.question { max-width: 760px; margin: 1.8rem auto 0; }
.question h2 { font-size: clamp(1.65rem, 5vw, 2.55rem); }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 1.35rem; }
.choice {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  padding: .9rem 1rem;
  text-align: left;
  font-weight: 700;
  transition: border .16s ease, background .16s ease, transform .16s ease;
}
.choice:hover, .choice.selected { border-color: var(--red); background: #fff5f2; transform: translateY(-1px); }
.choice strong, .choice small { display: block; }
.choice small { margin-top: .22rem; color: var(--ink-soft); font: .8rem/1.35 Arial, sans-serif; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field.full { grid-column: 1 / -1; }
.field label, fieldset legend { display: block; margin-bottom: .38rem; color: var(--ink); font: 800 .82rem/1.25 Arial, sans-serif; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid #cfbeaa;
  border-radius: 9px;
  background: #fffefa;
  color: var(--ink);
  padding: .78rem .85rem;
}
.field textarea { min-height: 118px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.field.invalid input, .field.invalid select, .field.invalid textarea,
.choice-grid.invalid .choice { border-color: var(--red); background: var(--danger-soft); box-shadow: 0 0 0 2px rgba(168, 41, 45, .12); }
fieldset.field { margin: 0; border: 0; padding: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: .65rem; }
.radio-pill { display: flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 999px; padding: .62rem .85rem; background: #fff; font: 700 .82rem Arial, sans-serif; }
.radio-pill input { width: auto; }

.notice {
  margin: 1rem 0;
  border-left: 5px solid var(--gold);
  border-radius: 11px;
  background: #fff5df;
  padding: .9rem 1rem;
}
.notice strong { display: block; margin-bottom: .2rem; }
.notice.green { border-color: var(--green); background: var(--green-soft); }
.notice.red { border-color: var(--red); background: var(--danger-soft); }
.notice.blue { border-color: var(--blue); background: var(--blue-soft); }
.success-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font: 900 1.55rem Arial, sans-serif;
}
.stop-mark { background: var(--red); }

.upload-placeholder {
  border: 2px dashed #ccbba4;
  border-radius: 13px;
  background: #fbf5eb;
  padding: 1.2rem;
  text-align: center;
}
.upload-placeholder .icon { display: block; font-size: 2rem; }

.tabs { display: flex; gap: .4rem; overflow-x: auto; padding: .4rem; border: 1px solid var(--line); border-radius: 13px; background: #f4eadb; }
.tab {
  flex: 1 0 auto;
  min-height: 43px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: .65rem .9rem;
  font: 800 .78rem Arial, sans-serif;
}
.tab.active { background: var(--card); color: var(--red); box-shadow: 0 3px 12px rgba(50, 30, 18, .09); }
.tab-panel { padding-top: 1.2rem; }

.filter-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; }
.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  padding: .5rem .75rem;
  font: 800 .72rem Arial, sans-serif;
}
.filter-chip.active { border-color: var(--red); background: var(--red); color: white; }
.dose-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dose-card.wide { grid-column: 1 / -1; }
.dose-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.pill { display: inline-flex; border-radius: 999px; background: var(--gold-soft); color: #6c4815; padding: .35rem .55rem; font: 800 .65rem Arial, sans-serif; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; font-size: .91rem; }
th, td { border-bottom: 1px solid var(--line); padding: .62rem .5rem; text-align: left; }
th { color: var(--ink-soft); font: 800 .72rem Arial, sans-serif; text-transform: uppercase; }
td strong { color: var(--red); }
.source-rule { border-radius: 9px; background: #f5eee2; padding: .7rem; color: var(--ink-soft); font: .78rem/1.4 Arial, sans-serif; }

.flash-card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #fffdf8, #f5ead8);
  padding: clamp(1.4rem, 5vw, 3rem);
  text-align: center;
  box-shadow: var(--shadow);
}
.flash-answer { margin-top: 1rem; border-radius: 12px; background: var(--green-soft); padding: 1rem; color: var(--green); font-weight: 700; }
.flash-nav { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-top: 1rem; }

.test-shell { max-width: 780px; margin: 0 auto; }
.test-choice { display: block; width: 100%; margin-top: .65rem; }
.test-meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; color: var(--ink-soft); font: 800 .75rem Arial, sans-serif; }
.result-score {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: conic-gradient(var(--red) 0 0%, #eee2d2 0);
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 900;
}
.result-score::before { content: ''; position: absolute; }
.weak-list { display: grid; gap: .55rem; margin-top: 1rem; }
.weak-row { display: flex; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-radius: 9px; padding: .75rem; }
.weak-row small { color: var(--ink-soft); font-family: Arial, sans-serif; }

.timeline { display: grid; gap: .8rem; }
.timeline-item { display: grid; grid-template-columns: 34px 1fr; gap: .75rem; }
.timeline-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: white; font: 900 .75rem Arial, sans-serif; }
.timeline-item small { display: block; color: var(--ink-soft); font-family: Arial, sans-serif; }

.decision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.decision { min-height: 145px; text-align: left; }
.decision.accept { background: var(--ink); color: white; border-color: var(--ink); }
.decision.accept small { color: #ddcfc0; }
.decision.accept:hover, .decision.accept.selected { background: #16110d; color: white; border-color: var(--ink); }
.decision.decline { background: var(--card); color: var(--red); }
.decision.decline small { color: var(--ink-soft); }
.decision.decline:hover, .decision.decline.selected { border-color: var(--red); background: #fff5f2; color: var(--red); }

.site-footer { background: var(--ink); color: #d8c8b4; text-align: center; padding: 2.2rem 1rem; font: .84rem Arial, sans-serif; }
.site-footer strong { display: block; margin-bottom: .3rem; color: #fff5e6; font: 1.1rem Georgia, serif; }

@media (max-width: 800px) {
  .hero-split, .grid.two, .grid.three, .dose-grid { grid-template-columns: 1fr; }
  .hero-photo { min-height: 270px; order: -1; }
  .journey { grid-template-columns: 1fr; }
  .journey-step { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .journey-step:last-child { border-bottom: 0; }
}

@media (max-width: 620px) {
  .preview-ribbon { font-size: .66rem; }
  .site-header { align-items: flex-start; }
  .brand img { width: 47px; height: 47px; }
  .brand strong { font-size: 1rem; }
  .header-home { margin-top: .45rem; font-size: .7rem; }
  .page { width: min(100% - 1rem, 1120px); padding-top: .3rem; }
  .hero, .stage-shell { border-radius: 18px; }
  .form-grid, .choice-grid, .decision-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .button-row .btn { width: 100%; }
  .flash-nav { flex-wrap: wrap; }
  .flash-nav .btn { flex: 1; }
  .weak-row { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* The door to the other app (Kori, 09-17): apply/training and the team app are
   still two sites, so the footer carries one plain link across. */
.site-footer .other-app { display: block; margin-top: .7rem; color: #fff5e6; font-weight: 700; text-decoration: underline; }
