:root {
  color-scheme: light;
  --forest: #123d2e;
  --forest-soft: #285443;
  --cream: #f5f0e4;
  --cream-light: #fffaf0;
  --sage: #d7dec9;
  --orange: #f68a25;
  --orange-text: #a84f00;
  --ink: #17231d;
  --muted: #637069;
  --white: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 4%, rgba(215, 222, 201, .82), transparent 27rem),
    var(--cream);
}

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 99;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  transform: translateY(-150%);
  border-radius: .65rem;
  color: var(--white);
  background: var(--forest);
}

.skip-link:focus { transform: translateY(0); }

.site-header,
.route-layout,
footer {
  width: min(980px, calc(100% - 36px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  color: var(--forest);
  font-size: 1.22rem;
  font-weight: 850;
  letter-spacing: -.03em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(18, 61, 46, .18);
}

.brand-mark img { display: block; width: 100%; height: 100%; }

.shared-badge {
  padding: .52rem .82rem;
  border: 1px solid rgba(18, 61, 46, .15);
  border-radius: 999px;
  color: var(--forest-soft);
  background: rgba(255, 250, 240, .55);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.route-layout {
  display: grid;
  min-height: calc(100vh - 176px);
  padding: clamp(1.5rem, 5vw, 4rem) 0 5rem;
  place-items: center;
}

.page-layout {
  width: min(860px, calc(100% - 36px));
  min-height: calc(100vh - 176px);
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 4rem) 0 5rem;
}

.content-card {
  overflow: hidden;
  border: 1px solid rgba(18, 61, 46, .1);
  border-radius: 34px;
  background: var(--cream-light);
  box-shadow: 0 28px 70px rgba(18, 61, 46, .12);
}

.content-card__body { padding: clamp(1.6rem, 6vw, 4rem); }
.content-card__body > .eyebrow { color: var(--orange-text); }
.content-card__intro { max-width: 690px; margin: 1rem 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.7; }

.auth-card { max-width: 690px; margin-inline: auto; }
.auth-state { display: grid; gap: .75rem; margin-top: 2rem; padding: 1.4rem; border-radius: 22px; color: var(--forest); background: rgba(215, 222, 201, .55); }
.auth-state[data-state="loading"] { border-left: 5px solid var(--orange); }
.auth-state[data-state="success"] { border-left: 5px solid #2f7758; }
.auth-state[data-state="error"] { border-left: 5px solid #b84f32; background: #f8e9e1; }
.auth-state h2 { margin: 0; color: var(--forest); font-size: 1.28rem; letter-spacing: -.02em; }
.auth-state p { margin: 0; color: var(--muted); line-height: 1.55; }
.auth-state__line { display: flex; gap: .85rem; align-items: flex-start; }
.auth-state__mark { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--cream-light); background: var(--forest); font-weight: 900; }
.auth-state[data-state="loading"] .auth-state__mark { color: var(--forest); background: var(--orange); }
.auth-state[data-state="error"] .auth-state__mark { background: #b84f32; }
.auth-card__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }

.password-form { display: grid; gap: 1rem; margin-top: 2rem; }
.form-field { display: grid; gap: .45rem; }
.form-field label { color: var(--forest); font-weight: 800; }
.form-field input { width: 100%; min-height: 52px; padding: .8rem 1rem; border: 1px solid rgba(18, 61, 46, .22); border-radius: 15px; color: var(--ink); background: var(--white); font: inherit; }
.form-field input:focus { border-color: var(--orange); outline: 3px solid rgba(246, 138, 37, .2); }
.form-hint { margin: -.25rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.form-error { margin: 0; color: #983d27; font-size: .82rem; font-weight: 700; }
.password-form .button { cursor: pointer; font: inherit; }
.password-form .button:disabled { cursor: wait; opacity: .58; }

.legal-content { color: var(--ink); line-height: 1.72; }
.legal-content h1 { max-width: 760px; }
.legal-content h2 { margin: 2.4rem 0 .7rem; color: var(--forest); font-size: clamp(1.3rem, 3vw, 1.75rem); line-height: 1.2; letter-spacing: -.025em; }
.legal-content h3 { margin: 1.4rem 0 .45rem; color: var(--forest-soft); font-size: 1rem; }
.legal-content p { margin: .7rem 0; color: var(--muted); }
.legal-content address { margin: .7rem 0; color: var(--muted); font-style: normal; }
.legal-content ul { display: grid; gap: .55rem; margin: .8rem 0; padding-left: 1.25rem; color: var(--muted); }
.legal-content strong { color: var(--forest); }
.legal-content a { color: var(--forest); font-weight: 750; text-underline-offset: .18em; }
.legal-meta { margin: 1rem 0 0; color: var(--muted); font-size: .8rem; }

.faq-section { margin-top: 2.4rem; }
.faq-section > h2 { margin-top: 0; }
.faq-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; margin-top: 1rem; }
.faq-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(18, 61, 46, .13);
  border-radius: 18px;
  background: var(--white);
}
.faq-item summary {
  padding: 1rem 1.15rem;
  color: var(--forest);
  cursor: pointer;
  font-weight: 850;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.faq-item summary:hover { background: rgba(215, 222, 201, .3); }
.faq-item summary:focus-visible {
  outline: 3px solid var(--orange-text);
  outline-offset: -3px;
}
.faq-item[open] summary {
  border-bottom: 1px solid rgba(18, 61, 46, .1);
  background: rgba(215, 222, 201, .38);
}
.faq-answer { min-width: 0; padding: .35rem 1.15rem 1rem; overflow-wrap: anywhere; }
.faq-answer > :first-child { margin-top: .65rem; }
.faq-answer > :last-child { margin-bottom: 0; }
.faq-contact {
  margin-top: 2.4rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(18, 61, 46, .12);
  border-radius: 18px;
  color: var(--forest-soft);
  background: rgba(215, 222, 201, .55);
}
.faq-contact > :first-child { margin-top: 0; }
.faq-contact > :last-child { margin-bottom: 0; }
.faq-contact p { color: inherit; }

.footer-links { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.footer-links a { color: var(--forest); font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: .2em; }

.route-card {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(18, 61, 46, .1);
  border-radius: 38px;
  background: var(--cream-light);
  box-shadow: 0 28px 70px rgba(18, 61, 46, .14);
}

.route-visual {
  position: relative;
  height: clamp(190px, 33vw, 310px);
  overflow: hidden;
  background: linear-gradient(145deg, #dce5d3, #bfceb7);
}

.route-visual svg { width: 100%; height: 100%; }
.route-visual__land { fill: rgba(18, 61, 46, .08); }
.route-visual__line { fill: none; stroke: var(--orange); stroke-linecap: round; stroke-width: 7; }
.route-visual__line--planned { stroke-dasharray: 13 12; stroke-width: 5; }

.route-visual__pin {
  fill: var(--orange);
  stroke: var(--cream-light);
  stroke-width: 6;
  filter: drop-shadow(0 5px 6px rgba(18, 61, 46, .23));
}

.route-visual__pin--finish { fill: var(--forest); }
.route-visual__via { fill: var(--cream-light); stroke: var(--forest); stroke-width: 3; }
.route-visual__neutral { fill: var(--forest-soft); font-size: 18px; font-weight: 800; }
.route-visual__label { position: absolute; top: 1.2rem; left: 1.2rem; padding: .48rem .72rem; border-radius: 999px; color: var(--forest); background: rgba(255, 250, 240, .92); font-size: .72rem; font-weight: 850; }

.route-card__body { min-height: 360px; padding: clamp(1.6rem, 5vw, 3.5rem); }

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--forest-soft);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, p, dd { overflow-wrap: break-word; }

h1 {
  margin: 0;
  color: var(--forest);
  font-size: clamp(2.1rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.route-region {
  margin: .9rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.route-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
  margin: 2rem 0 0;
}

.route-facts div {
  padding: 1rem;
  border: 1px solid rgba(18, 61, 46, .1);
  border-radius: 19px;
  background: var(--white);
}

.route-facts dt { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.route-facts dd { margin: .35rem 0 0; color: var(--forest); font-size: clamp(1.05rem, 3vw, 1.45rem); font-weight: 850; }

.geometry-summary { margin: 1rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }

.route-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: .82rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 17px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.button:hover { transform: translateY(-2px); }
.button:focus-visible, .brand:focus-visible { outline: 3px solid var(--orange-text); outline-offset: 4px; }
.button--primary { color: var(--white); background: var(--forest); box-shadow: 0 13px 28px rgba(18, 61, 46, .2); }
.button--secondary { border-color: rgba(18, 61, 46, .16); color: var(--forest); background: var(--sage); }

.privacy-note { max-width: 680px; margin: 1.2rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }

.route-state {
  display: flex;
  min-height: 280px;
  gap: 1.2rem;
  align-items: center;
}

.route-state p:not(.eyebrow) { margin: .9rem 0 0; color: var(--muted); line-height: 1.6; }

.loader {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 4px solid var(--sage);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.error-mark { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 16px; color: var(--cream-light); background: var(--orange); font-size: 1.45rem; font-weight: 900; }
.route-state--error .button { margin-top: 1.25rem; }

footer {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(18, 61, 46, .12);
  color: var(--muted);
  font-size: .78rem;
}

footer a { color: var(--forest); font-weight: 800; }

[hidden] { display: none !important; }

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

@media (max-width: 620px) {
  .site-header, .route-layout, .page-layout, footer { width: min(100% - 24px, 980px); }
  .site-header { min-height: 76px; }
  .brand { max-width: 70%; gap: .55rem; font-size: .83rem; line-height: 1.12; }
  .brand-mark { width: 39px; height: 39px; border-radius: 12px; }
  .shared-badge { font-size: .62rem; }
  .faq-item summary { padding: .9rem 1rem; }
  .faq-answer { padding-inline: 1rem; }
  .faq-contact { padding: 1rem; }
  .route-layout { padding-top: .8rem; }
  .route-card { border-radius: 27px; }
  .route-facts { grid-template-columns: 1fr; }
  .route-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
  .route-facts dd { margin: 0; text-align: right; }
  .route-actions { display: grid; }
  .route-state { align-items: flex-start; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
  .footer-links { font-size: .72rem; }
}

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