:root {
  color-scheme: light;
  --ink: #18312e;
  --muted: #63736e;
  --paper: #f5f6f0;
  --line: #dce2d7;
  --green: #d9f880;
  --forest: #244e40;
  --white: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button, input, select { border-radius: 9px; }
button { color: inherit; }
a { color: inherit; }
button:disabled, fieldset:disabled button { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #548617; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 2000; padding: 12px; background: var(--green); }
.skip-link:focus { top: 10px; }
.site-header { height: 92px; display: flex; align-items: center; gap: 32px; padding: 0 5%; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; font: 800 32px 'Manrope', sans-serif; letter-spacing: -1.8px; text-decoration: none; }
.brand-icon { width: 38px; height: 38px; margin-right: 10px; }
.brand-icon rect { fill: var(--ink); }
.brand-icon path { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linecap: round; }
.brand-dot { color: #70993c; }
.header-tagline { flex: 1; font-size: 13px; color: var(--muted); }
.text-link { font-size: 13px; font-weight: 600; text-decoration: none; }
.text-link span { margin-left: 12px; }
.workspace { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px; max-width: 1520px; margin: 32px auto; padding: 0 4%; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.planner { padding: 30px; }
.eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 1.6px; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #7f9c45; margin-right: 6px; vertical-align: 1px; }
h1, h2, h3 { font-family: 'Manrope', system-ui, sans-serif; }
h1 { font-size: 42px; line-height: 1.15; letter-spacing: -2px; margin: 20px 0 15px; font-weight: 800; }
h1 em { font-style: normal; color: #5d793b; }
.intro { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 0 0 27px; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.place-field { margin-bottom: 19px; }
.input-row { display: flex; align-items: center; background: #fafbf8; border: 1px solid var(--line); border-radius: 9px; min-height: 46px; padding: 4px 5px 4px 13px; gap: 9px; }
.input-row:focus-within { border-color: #749849; box-shadow: 0 0 0 2px #d9f88060; }
.input-row input { min-width: 0; width: 100%; border: 0; background: none; font-size: 12px; padding: 8px 0; color: var(--ink); outline: none; }
input::placeholder { color: #77837c; }
.point-icon { display: inline-block; flex-shrink: 0; width: 10px; height: 10px; }
.point-icon.start { border: 2px solid #759344; border-radius: 50%; }
.point-icon.end { background: var(--ink); border: 2px solid #dce3dc; border-radius: 2px; }
.point-icon.via { border: 2px solid #bf9551; transform: rotate(45deg); }
.search-button { border: 0; background: #e9eee2; padding: 8px 10px; font-size: 11px; font-weight: 700; }
.search-button:hover { background: var(--green); }
.field-hint { display: block; margin-top: 6px; font-size: 10px; color: var(--muted); line-height: 1.4; }
.field-meta { display: flex; gap: 6px; justify-content: space-between; align-items: baseline; }
.link-button { padding: 0; border: 0; background: none; font-size: 10px; text-decoration: underline; white-space: nowrap; }
.place-choices { padding: 0; margin: 8px 0 0; list-style: none; border: 1px solid var(--line); border-radius: 8px; max-height: 210px; overflow-y: auto; }
.place-choices li + li { border-top: 1px solid var(--line); }
.place-choices button { padding: 10px; width: 100%; text-align: left; background: white; border: 0; font-size: 12px; line-height: 1.5; }
.place-choices button:hover { background: #f1f6e9; }
.scenic-stop { border-bottom: 1px solid var(--line); margin: 0 0 20px; padding-bottom: 17px; }
.scenic-stop summary { font-size: 12px; font-weight: 600; }
.scenic-stop summary span { color: var(--muted); font-size: 10px; font-weight: 400; margin-left: 8px; }
.scenic-stop .place-field { margin: 16px 0 0; }
.preferences { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-bottom: 22px; }
.explore-hint { margin: -10px 0 18px; }
.search-progress { margin-top: 17px; }
.search-progress label { display: flex; justify-content: space-between; font-size: 10px; }
.search-progress progress { width: 100%; height: 8px; accent-color: var(--forest); display: block; }
.search-stats { overflow-wrap: anywhere; }
select { width: 100%; border: 1px solid var(--line); padding: 11px 8px; background: #fafbf8; color: var(--ink); font-size: 12px; }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 15px 18px; border: 1px solid var(--green); border-radius: 9px; background: var(--green); text-decoration: none; font-size: 13px; font-weight: 800; }
.primary-button:hover { background: #cbed6b; border-color: #cbed6b; }
.primary-button span { font-size: 20px; line-height: 16px; }
.secondary-button { padding: 11px 12px; border: 1px solid var(--line); background: white; font-size: 12px; font-weight: 600; }
.secondary-button:hover { background: #f0f5e8; }
#cancel-button { width: 100%; margin-top: 10px; }
.status { text-align: center; font-size: 11px; line-height: 1.6; color: var(--muted); margin: 13px 0; overflow-wrap: anywhere; }
.status[data-tone="error"] { color: #9d3d23; background: #fff2e9; border-radius: 6px; padding: 9px; }
.example-button { display: flex; gap: 10px; width: 100%; align-items: center; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); background: none; font-size: 11px; text-align: left; }
.example-button span:first-child { color: #9c7735; font-size: 20px; }
.example-button span:last-child { margin-left: auto; }
.map-panel { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 24px; height: calc(100vh - 160px); min-height: 640px; max-height: 1050px; overflow: hidden; border-radius: 16px; border: 1px solid #cdd7c6; background: #e9eee0; isolation: isolate; }
#map { width: 100%; height: 100%; z-index: 0; background: #e9eee0; }
.map-heading { position: absolute; z-index: 400; top: 24px; left: 24px; padding: 17px 21px; background: #fffffff2; border-radius: 12px; box-shadow: 0 3px 18px #18312e0d; pointer-events: none; }
.map-heading .eyebrow { color: #728561; font-size: 9px; }
.map-heading p { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -.5px; line-height: 1.45; margin: 8px 0 0; }
.map-key { position: absolute; z-index: 400; bottom: 32px; left: 20px; display: flex; align-items: center; gap: 9px; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 11px; max-width: calc(100% - 40px); }
.key-line { background: var(--forest); height: 4px; width: 24px; border-radius: 2px; flex-shrink: 0; }
.map-fit { position: absolute; z-index: 400; top: 24px; right: 20px; background: white; padding: 10px; border: 1px solid var(--line); box-shadow: 0 2px 8px #18312e11; font-size: 11px; }
.map-error { position: absolute; z-index: 450; top: 180px; margin: 0 24px; padding: 14px; border: 1px solid #e4c89b; border-radius: 8px; background: #fff8e9; font-size: 12px; line-height: 1.6; }
.leaflet-container { font-family: 'DM Sans', system-ui, sans-serif; }
.leaflet-control-attribution { font-size: 10px !important; }
.trip-marker { display: flex; align-items: center; justify-content: center; border: 3px solid white; border-radius: 50%; background: var(--ink); color: white; box-shadow: 0 3px 8px #18312e40; font: 700 12px 'DM Sans', sans-serif; }
.trip-marker.stop-marker { background: #9c7535; }
.results { padding: 26px; grid-column: 1; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
h2 { font-size: 21px; letter-spacing: -.65px; margin: 10px 0; }
.unit-label { margin: 0; font-size: 10px; }
.unit-label select { padding: 5px; margin-top: 4px; width: 55px; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.6; }
.notice { border: 1px solid #e4d9b9; border-radius: 8px; background: #fffaf0; font-size: 11px; line-height: 1.6; padding: 10px; margin: 15px 0; white-space: pre-line; }
.route-list { display: grid; gap: 10px; margin: 20px 0; }
.route-card { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 15px; text-align: left; }
.route-card:hover { border-color: #8ba56b; }
.route-card[aria-pressed="true"] { border: 2px solid var(--forest); padding: 14px; background: #f4f8ec; }
.route-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 800; }
.route-index { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; border-radius: 50%; background: #edf0e7; font-size: 10px; margin-right: 7px; }
.route-card[aria-pressed="true"] .route-index { color: white; background: var(--forest); }
.route-check { color: var(--forest); }
.route-retained { display: block; margin-top: 7px; font-size: 10px; color: var(--forest); }
.route-metrics { display: flex; gap: 12px; margin: 12px 0; color: #465c52; font-size: 12px; }
.curve-row { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--muted); gap: 10px; }
.curve-score { font-weight: 800; color: var(--forest); }
.curve-track { display: block; height: 4px; border-radius: 3px; background: #e1e8d7; margin-top: 7px; overflow: hidden; }
.curve-track span { display: block; background: #7f9d4c; height: 100%; }
.route-export { border-top: 1px solid var(--line); padding-top: 16px; }
h3 { font-size: 14px; letter-spacing: -.2px; }
.export-actions { display: flex; gap: 8px; margin-top: 10px; }
.export-actions button { flex: 1; }
.fine-print { font-size: 10px; line-height: 1.65; color: var(--muted); margin-bottom: 0; }
#copy-fallback { margin-top: 14px; }
#share-url { width: 100%; padding: 8px; border: 1px solid var(--line); font-size: 12px; }
.how-it-works { grid-column: 1 / -1; padding: 30px; margin-top: 4px; background: #eef1e7; }
.explain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px; margin-top: 26px; }
.step-number { font-size: 9px; letter-spacing: 1.1px; color: #6a805b; font-weight: 700; }
.explain-grid h3 { margin: 12px 0 8px; }
.explain-grid p { margin: 0; font-size: 12px; line-height: 1.75; color: var(--muted); }
.service-note { border-top: 1px solid #d7dfce; margin: 24px 0 0; padding-top: 17px; font-size: 10px; line-height: 1.75; color: var(--muted); }
footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 5% 35px; font-size: 10px; color: var(--muted); }
.brand-small { font: 800 22px 'Manrope', sans-serif; letter-spacing: -1px; color: var(--ink); }
.noscript { position: fixed; inset: auto 10px 10px; padding: 20px; background: #fff2c2; z-index: 2000; }
@media (min-width: 1440px) {
  .workspace { grid-template-columns: 430px minmax(0, 1fr); }
  .planner { padding: 34px; }
  h1 { font-size: 46px; }
}
@media (max-width: 1000px) {
  .workspace { grid-template-columns: 350px minmax(0, 1fr); gap: 18px; padding: 0 3%; margin-top: 24px; }
  .planner { padding: 24px; }
  h1 { font-size: 38px; }
  .map-heading { top: 16px; left: 16px; padding: 12px; }
  .map-heading p { font-size: 16px; }
  .map-fit { top: 145px; right: 12px; }
  .explain-grid { gap: 22px; }
}
@media (max-width: 760px) {
  .site-header { height: 74px; padding: 0 6%; }
  .brand { font-size: 28px; }
  .brand-icon { width: 33px; height: 33px; }
  .header-tagline { display: none; }
  .text-link { margin-left: auto; font-size: 12px; }
  .workspace { display: flex; flex-direction: column; padding: 0 5%; margin-top: 20px; gap: 20px; }
  .workspace > section { width: 100%; }
  .planner { padding: 26px; }
  h1 { font-size: 43px; }
  .intro { max-width: 420px; }
  .map-panel { position: relative; top: auto; height: 440px; min-height: 0; }
  .map-heading { padding: 12px 16px; }
  .map-fit { top: 16px; }
  .explain-grid { grid-template-columns: 1fr; gap: 24px; }
  .how-it-works { padding: 25px; }
  footer { flex-wrap: wrap; padding: 5px 6% 28px; gap: 15px; }
  footer span:last-child { flex-basis: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .primary-button { transition: background-color .15s, border-color .15s; }
}
