:root {
  color-scheme: light;
  --page: #f3f5ef;
  --surface: #ffffff;
  --surface-soft: #e9eee6;
  --ink: #19271f;
  --muted: #526458;
  --line: #d3ddd2;
  --accent: #d9f15b;
  --accent-hover: #cbe548;
  --shadow: 0 24px 80px rgba(25, 39, 31, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overflow-x: hidden; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button:active, .hero-cta:active, .nav-cta:active { transform: scale(.98); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, #map:focus-visible { outline: 3px solid #769922; outline-offset: 3px; }
[hidden] { display: none !important; }
.ui-icon { display: inline-block; flex: none; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.icon-arrow-circle { --icon: url('/assets/icons/arrow-circle-up-right.svg'); }
.icon-crosshair { --icon: url('/assets/icons/crosshair.svg'); }
.icon-path { --icon: url('/assets/icons/path.svg'); }
.icon-external { --icon: url('/assets/icons/arrow-square-out.svg'); }
.icon-map { --icon: url('/assets/icons/map-trifold.svg'); }
.icon-sun { --icon: url('/assets/icons/sun-horizon.svg'); }
.icon-backpack { --icon: url('/assets/icons/backpack.svg'); }
.icon-download { --icon: url('/assets/icons/download-simple.svg'); }

.site-header { height: 72px; padding: 0 clamp(22px, 4.5vw, 80px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #19271f; color: #f6f7f0; }
.logo { font-size: 29px; font-weight: 900; line-height: 1; letter-spacing: -.085em; text-decoration: none; white-space: nowrap; }
.logo span { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); }
.site-header nav a { font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav-link { opacity: .8; transition: opacity .25s ease; }
.nav-link:hover { opacity: 1; }
.nav-cta { display: inline-flex; align-items: center; gap: 25px; padding: 11px 14px 11px 18px; border: 1px solid rgba(255,255,255,.34); border-radius: 10px; transition: background .25s ease, transform .25s ease; }
.nav-cta:hover { background: rgba(255,255,255,.12); }
.nav-cta .ui-icon, .hero-cta .ui-icon { width: 24px; height: 24px; transition: transform .28s cubic-bezier(.16,1,.3,1); }
.nav-cta:hover .ui-icon, .hero-cta:hover .ui-icon { transform: translate(2px, -2px) rotate(12deg); }

.intro { position: relative; isolation: isolate; display: flex; align-items: center; min-height: min(660px, calc(100dvh - 72px)); overflow: hidden; background: #17231c; color: #f5f7ee; }
.intro::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,23,16,.93) 0%, rgba(10,23,16,.76) 28%, rgba(10,23,16,.33) 64%, rgba(10,23,16,.1) 100%), linear-gradient(0deg, rgba(10,23,16,.35), transparent 34%); pointer-events: none; }
.intro-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 50%; }
.intro-content { width: min(100%, 1400px); margin: 0 auto; padding: 50px clamp(22px, 4.5vw, 80px) 64px; }
.hero-kicker { margin: 0 0 28px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.intro h1 { max-width: 850px; margin: 0; font-size: clamp(58px, 7.5vw, 118px); font-weight: 800; line-height: .94; letter-spacing: -.075em; }
.intro h1 em { color: var(--accent); font-style: normal; }
.hero-copy { max-width: 400px; margin: 28px 0 28px; color: #e1e9df; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; }
.hero-cta { display: inline-flex; align-items: center; justify-content: space-between; gap: 54px; min-width: 210px; padding: 16px 18px 16px 20px; border-radius: 10px; background: var(--accent); color: #19271f; font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; transition: background .25s ease, transform .25s ease; }
.hero-cta:hover { background: var(--accent-hover); transform: translateY(-3px); }

.planner-section, .content-section { width: min(100% - 48px, 1392px); margin-inline: auto; }
.planner-section { padding-top: clamp(55px, 7vw, 100px); scroll-margin-top: 28px; }
.section-heading { max-width: 720px; margin-bottom: 30px; }
h2 { margin: 0; font-size: clamp(34px, 4.2vw, 56px); line-height: 1.05; letter-spacing: -.06em; }
.section-heading p { max-width: 620px; margin: 16px 0 0; color: var(--muted); font-size: 18px; }
.workspace { display: grid; grid-template-columns: minmax(315px, 370px) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.planner-panel { padding: 28px; border-right: 1px solid var(--line); min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 24px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.panel-heading strong { font-size: 20px; letter-spacing: -.035em; }
.badge { flex: none; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
label:not(.consent) { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-size: 13px; font-weight: 750; }
label > span { color: var(--muted); font-weight: 500; }
input:not([type="checkbox"]), select { width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid #aebcaf; border-radius: 9px; background: var(--surface); color: var(--ink); }
input::placeholder { color: #66776b; opacity: 1; }
.search-row { display: flex; gap: 7px; }
.search-row input { flex: 1; }
.search-row button { padding: 0 15px; border: 0; border-radius: 9px; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 700; transition: opacity .2s ease; }
.search-row button:hover { opacity: .8; }
#places { margin-top: 2px; }
#places button { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-top: 0; background: var(--surface-soft); color: var(--ink); text-align: left; font-size: 13px; }
#places button:hover { background: var(--accent); }
.text-button { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 4px 0; border: 0; background: none; color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.text-button .ui-icon { width: 18px; height: 18px; transition: transform .25s ease; }
.text-button:hover .ui-icon { transform: rotate(28deg); }
.small { color: var(--muted); font-size: 12px; line-height: 1.55; }
.map-hint { margin: 7px 0 16px; }
.start-label { margin: 0 0 25px; padding: 11px 13px; border-left: 3px solid #708e3a; border-radius: 0 7px 7px 0; background: var(--surface-soft); font-size: 13px; overflow-wrap: anywhere; }
.distance-row { display: flex; align-items: center; padding-right: 14px; border: 1px solid #aebcaf; border-radius: 9px; }
.distance-row input { border: 0; padding: 7px 12px; font-size: 28px; font-weight: 800; letter-spacing: -.04em; }
.distance-row span { font-size: 13px; color: var(--muted); }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 10px 0 23px; }
.presets button { min-width: 0; padding: 8px 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.presets button:hover, .presets button[aria-pressed="true"] { border-color: #b6ce4a; background: var(--accent); }
select { margin-bottom: 19px; }
.consent { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 17px; font-size: 12px; line-height: 1.5; }
.consent input { flex: none; margin-top: 3px; accent-color: #6f9126; }
.primary { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 16px; border: 0; border-radius: 9px; background: var(--accent); color: #19271f; font-size: 14px; font-weight: 800; white-space: nowrap; transition: background .2s ease, transform .2s ease; }
.primary:hover { background: var(--accent-hover); }
.primary .ui-icon { width: 23px; height: 23px; transition: transform .25s ease; }
.primary:hover .ui-icon { transform: translate(2px, -2px); }
#status { min-height: 28px; margin: 15px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }
#status.error { color: #a33e2b; }
.privacy-note { margin: 17px 0 0; padding-top: 15px; border-top: 1px solid var(--line); }
.privacy-note a { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; text-underline-offset: 3px; }
.privacy-note .ui-icon { width: 13px; height: 13px; }
.map-column { display: flex; flex-direction: column; min-width: 0; }
.map-toolbar, .map-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 22px; }
.map-toolbar { min-height: 60px; font-size: 13px; font-weight: 750; }
.map-toolbar button { padding: 4px 0; border: 0; background: none; color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
#map { flex: 1; min-height: 610px; z-index: 0; background: #dce6d9; }
.map-bottom { min-height: 54px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.map-bottom i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; background: #304a33; }
.leaflet-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.leaflet-control-zoom a { color: #19271f !important; }

.results { margin-top: clamp(55px, 7vw, 100px); }
.result-top { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
#route-label { color: var(--muted); overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions button, .saved-card button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.actions .ui-icon { width: 17px; height: 17px; }
.actions button:hover, .saved-card button:hover { border-color: #9db83c; background: var(--surface-soft); transform: translateY(-2px); }
.actions button:last-child { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.actions button:last-child:hover { opacity: .85; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin: 28px 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.stat { padding: 22px; background: var(--surface); }
.stat strong { display: block; font-size: clamp(23px, 2.5vw, 35px); font-weight: 800; letter-spacing: -.055em; }
.stat span { color: var(--muted); font-size: 12px; }
.notice { color: var(--muted); font-size: 13px; line-height: 1.6; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 36px; }
.details-grid h3 { margin-top: 0; font-size: 23px; letter-spacing: -.04em; }
.details-grid ul { padding-left: 22px; }
.details-grid li { margin-bottom: 10px; color: var(--muted); }
.details-grid details { align-self: start; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.details-grid summary { padding: 17px; font-weight: 700; cursor: pointer; }
.details-grid ol { max-height: 330px; overflow: auto; padding-right: 20px; }
#no-directions { padding: 0 17px; color: var(--muted); }
.saved-section { padding-top: clamp(70px, 8vw, 115px); padding-bottom: clamp(70px, 8vw, 115px); }
.saved-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 26px; }
.saved-heading p { margin: 12px 0 0; color: var(--muted); }
.saved-heading > .small { max-width: 240px; }
#saved { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#saved:not(:has(.saved-card)) { display: block; padding: 26px; border: 1px dashed #a6b9a6; border-radius: 12px; color: var(--muted); }
.saved-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.saved-card h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.saved-card p { color: var(--muted); }
.saved-card button { margin: 5px 8px 0 0; }
.field-guide { width: 100%; padding: clamp(70px, 8vw, 120px) max(24px, calc((100vw - 1392px) / 2)); border-top: 1px solid var(--line); background: var(--surface-soft); }
.guide-intro { max-width: 730px; }
.guide-intro p { color: var(--muted); font-size: 18px; }
.guide-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: clamp(22px, 4vw, 65px); margin-top: 60px; }
.guide-grid article { padding-top: 20px; border-top: 1px solid #9eae9e; }
.guide-mark { display: grid; place-items: center; width: 55px; height: 55px; border-radius: 14px; background: var(--accent); color: #19271f; transform-origin: bottom left; transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease; }
.guide-mark .ui-icon { width: 29px; height: 29px; }
.guide-grid article:hover .guide-mark { transform: translateY(-4px) rotate(-6deg); box-shadow: 5px 8px 0 rgba(25,39,31,.12); }
.guide-grid h3 { max-width: 300px; margin: 25px 0 14px; font-size: clamp(21px, 2vw, 27px); line-height: 1.15; letter-spacing: -.04em; }
.guide-grid p { max-width: 340px; color: var(--muted); font-size: 14px; line-height: 1.65; }
footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 30px clamp(24px, 4.5vw, 80px); background: #19271f; color: #d9e1d7; font-size: 12px; }
footer .logo { color: #f6f7f0; }
footer a:not(.logo) { text-underline-offset: 3px; }
footer a .ui-icon { width: 13px; height: 13px; vertical-align: -.1em; }

@media (prefers-reduced-motion: no-preference) {
  .intro-image { animation: image-arrive 1.6s cubic-bezier(.16,1,.3,1) both; }
  .hero-kicker { animation: rise-in .7s .08s both; }
  .intro h1 { animation: rise-in .85s .18s both; }
  .hero-copy { animation: rise-in .75s .35s both; }
  .hero-cta { animation: rise-in .75s .48s both; }
  .has-reveal .reveal { opacity: 0; transform: translateY(32px); transition: opacity .75s cubic-bezier(.16,1,.3,1), transform .75s cubic-bezier(.16,1,.3,1); }
  .has-reveal .reveal.is-visible { opacity: 1; transform: translateY(0); }
  .guide-grid article:nth-child(2) { transition-delay: .1s; }
  .guide-grid article:nth-child(3) { transition-delay: .2s; }
  #result:not([hidden]) { animation: rise-in .7s both; }
  #result:not([hidden]) .stat { animation: rise-in .6s both; }
  #result:not([hidden]) .stat:nth-child(2) { animation-delay: .08s; }
  #result:not([hidden]) .stat:nth-child(3) { animation-delay: .16s; }
  #result:not([hidden]) .stat:nth-child(4) { animation-delay: .24s; }
  .ridge-route-line { animation: route-appear .9s cubic-bezier(.16,1,.3,1) both; }
  @keyframes image-arrive { from { transform: scale(1.085); opacity: .75; } to { transform: scale(1); opacity: 1; } }
  @keyframes rise-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes route-appear { from { stroke-opacity: 0; stroke-width: 2; } to { stroke-opacity: .92; stroke-width: 6; } }
}
@media (max-width: 1000px) {
  .workspace { grid-template-columns: 330px minmax(0, 1fr); }
  .planner-panel { padding: 23px; }
  .result-top { align-items: start; flex-direction: column; }
  .guide-grid { grid-template-columns: repeat(3, 1fr); gap: 25px; }
}
@media (max-width: 760px) {
  .site-header { height: 64px; }
  .site-header .nav-link { display: none; }
  .nav-cta { gap: 10px; padding: 9px 11px; }
  .intro { min-height: min(630px, calc(100dvh - 64px)); align-items: end; }
  .intro::after { background: linear-gradient(0deg, rgba(10,23,16,.94) 0%, rgba(10,23,16,.73) 34%, rgba(10,23,16,.08) 100%); }
  .intro-image { object-position: 82% center; }
  .intro-content { padding: 44px 24px 52px; }
  .intro h1 { font-size: clamp(49px, 10.5vw, 74px); }
  .hero-kicker { margin-bottom: 20px; }
  .hero-copy { margin: 22px 0; font-size: 16px; }
  .planner-section, .content-section { width: min(100% - 32px, 1392px); }
  .planner-section { padding-top: 60px; }
  .workspace { grid-template-columns: 1fr; }
  .planner-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  #map { height: 430px; min-height: 430px; flex: none; }
  .map-bottom { flex-wrap: wrap; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .details-grid { grid-template-columns: 1fr; gap: 20px; }
  #saved { grid-template-columns: 1fr; }
  .saved-heading { align-items: start; flex-direction: column; gap: 4px; }
  .guide-grid { grid-template-columns: 1fr; margin-top: 35px; gap: 25px; }
  .guide-grid h3 { margin-top: 15px; }
  .guide-grid p { max-width: none; }
  footer { flex-direction: column; align-items: start; }
}
@media (max-width: 390px) {
  .logo { font-size: 25px; }
  .site-header nav a { font-size: 12px; }
  .intro h1 { font-size: 47px; }
  .actions { width: 100%; }
  .actions button { flex: 1 1 100%; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --page: #111b15; --surface: #1c2a20; --surface-soft: #223328; --ink: #f0f4eb; --muted: #bac7b8; --line: #405345; --shadow: 0 24px 80px rgba(0,0,0,.2); }
  input:not([type="checkbox"]), select, .distance-row { border-color: #879c89; }
  input::placeholder { color: #c2d0c1; }
  .search-row button { background: var(--accent); color: #19271f; }
  .primary, .presets button[aria-pressed="true"], .presets button:hover { color: #19271f; }
  .actions button:last-child { background: var(--accent); border-color: var(--accent); color: #19271f; }
  .field-guide { background: #223328; }
  #status.error { color: #ff9b86; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
