/*
 * Atlas Pane: components
 * Needs tokens.css first. Every class starts with "ap-" so it can sit next to any other CSS.
 * The drawn map uses "ap-m-" classes on SVG shapes, so its colors come from the tokens too.
 */

/* Base */
.ap { margin: 0; background: var(--ap-white); color: var(--ap-ink); font-family: var(--ap-sans); font-size: var(--ap-text-body); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
.ap *, .ap *::before, .ap *::after { box-sizing: border-box; }
.ap img, .ap svg { max-width: 100%; display: block; }
:where(.ap) a { color: var(--ap-route); }
.ap-container { width: min(100% - 32px, var(--ap-container)); margin-inline: auto; }
.ap-narrow { width: min(100% - 32px, var(--ap-narrow)); margin-inline: auto; }
.ap-center { text-align: center; }
.ap-center .ap-lead { margin-inline: auto; }

/* Sections: white, then land, then white. Mist for quiet bands. */
.ap-section { padding-block: var(--ap-section); }
.ap-section--land { background: var(--ap-land); }
.ap-section--mist { background: var(--ap-mist); border-block: var(--ap-border); }
.ap .ap-section__head { margin-bottom: 36px; }

/* Type: semi-condensed display for headings and numbers, Barlow for reading, Plex Mono for coordinates */
.ap-hero-title, .ap-h2, .ap-h3 { margin: 0; font-family: var(--ap-display); font-weight: 600; color: var(--ap-ink); }
.ap-hero-title { font-size: var(--ap-text-hero); letter-spacing: var(--ap-tracking-hero); line-height: 1.04; }
.ap-h2 { font-size: var(--ap-text-h2); line-height: 1.12; }
.ap-h3 { font-size: var(--ap-text-h3); line-height: 1.2; }
.ap-lead { max-width: 600px; margin: 14px 0 0; color: var(--ap-soft); font-size: var(--ap-text-lead); line-height: 1.5; }
.ap-mono { font-family: var(--ap-mono); font-size: var(--ap-text-mono); color: var(--ap-soft); letter-spacing: .01em; }
.ap-eyebrow { display: block; margin-bottom: 10px; font-family: var(--ap-display); font-size: var(--ap-text-label); font-weight: 600; letter-spacing: var(--ap-tracking-caps); text-transform: uppercase; color: var(--ap-soft); }
.ap-place { font-family: var(--ap-display); font-style: italic; font-weight: 500; color: var(--ap-label); }

/* Nav: a thin white bar like a map app's top strip */
.ap-nav { position: relative; z-index: 5; background: var(--ap-white); border-bottom: var(--ap-border); }
.ap-nav__inner { display: flex; align-items: center; gap: 22px; padding: 9px 16px; }
.ap-logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ap-display); font-size: 21px; font-weight: 700; color: var(--ap-ink); text-decoration: none; white-space: nowrap; }
.ap-logo__mark { width: 26px; height: 26px; flex-shrink: 0; }
.ap-nav__links { display: flex; gap: 16px; font-size: var(--ap-text-small); }
.ap-nav__links a { color: var(--ap-soft); text-decoration: none; }
.ap-nav__links a:hover, .ap-nav__links a[aria-current] { color: var(--ap-ink); }
.ap-nav__end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 820px) { .ap-nav__links { display: none; } }

/* Buttons: small-radius rectangles, route blue for the one action */
.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: var(--ap-radius); font-family: var(--ap-sans); font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s var(--ap-ease), box-shadow .15s var(--ap-ease); }
.ap-btn--primary { background: var(--ap-route); color: var(--ap-white); }
.ap-btn--primary:hover { background: var(--ap-route-dark); }
.ap-btn--ghost { background: var(--ap-white); color: var(--ap-ink); box-shadow: inset 0 0 0 1px var(--ap-line-2); }
.ap-btn--ghost:hover { background: var(--ap-mist); }
.ap-btn--soft { background: var(--ap-route-soft); color: var(--ap-route-dark); }
.ap-btn--sm { padding: 6px 12px; font-size: 14px; font-weight: 500; }
.ap-btn--block { width: 100%; }
.ap-btn svg { width: 16px; height: 16px; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ap-center .ap-actions { justify-content: center; }

/* Joined buttons, like Log in | Sign up */
.ap-join { display: inline-flex; border-radius: var(--ap-radius); box-shadow: inset 0 0 0 1px var(--ap-line-2); }
.ap-join a { padding: 6px 12px; font-size: 14px; color: var(--ap-ink); text-decoration: none; white-space: nowrap; }
.ap-join a + a { border-left: 1px solid var(--ap-line-2); }
.ap-join a:hover { background: var(--ap-mist); }

/* The drawn map: a full-bleed SVG under floating panels */
.ap-map { position: relative; overflow: hidden; background: var(--ap-land); isolation: isolate; }
.ap-map__art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.ap .ap-map__art { max-width: none; }
.ap-m-land { fill: var(--ap-land); }
.ap-m-block { fill: var(--ap-land-2); }
.ap-m-water { fill: var(--ap-water); stroke: var(--ap-water-2); stroke-width: 1.5; }
.ap-m-river { fill: none; stroke: var(--ap-water); stroke-linecap: round; }
.ap-m-park { fill: var(--ap-park); stroke: var(--ap-park-2); stroke-width: 1.5; }
.ap-m-plot { fill: var(--ap-park-2); }
.ap-m-contour { fill: none; stroke: var(--ap-contour); stroke-width: 1.2; }
.ap-m-casing { fill: none; stroke: var(--ap-white); stroke-linecap: round; stroke-linejoin: round; }
.ap-m-road { fill: none; stroke: var(--ap-road); stroke-linecap: round; stroke-linejoin: round; }
.ap-m-street { fill: none; stroke: var(--ap-white); stroke-linecap: round; }
.ap-m-edge { fill: none; stroke: var(--ap-line-2); stroke-linecap: round; }
.ap-m-boundary { fill: none; stroke: var(--ap-boundary); stroke-width: 2.5; stroke-dasharray: 10 5 2 5; }
.ap-m-select { fill: rgba(47, 104, 209, .14); stroke: var(--ap-route); stroke-width: 2.5; }
.ap-m-label { fill: var(--ap-label); font-family: var(--ap-display); font-style: italic; font-weight: 500; font-size: 15px; }
.ap-m-label--water { fill: var(--ap-water-2); font-size: 17px; letter-spacing: .12em; }

/* Floating panel: white, hairline border, soft float shadow */
.ap-panel { position: relative; background: var(--ap-white); border: var(--ap-border); border-radius: var(--ap-radius); box-shadow: var(--ap-shadow-float); }
.ap-panel__body { padding: var(--ap-panel-pad); }
.ap-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--ap-panel-pad); background: var(--ap-mist); border-bottom: var(--ap-border); border-radius: var(--ap-radius) var(--ap-radius) 0 0; font-family: var(--ap-display); font-weight: 600; font-size: 15px; }
.ap-panel__close { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--ap-radius-sm); color: var(--ap-soft); text-decoration: none; font-size: 18px; line-height: 1; }
.ap-panel__close:hover { background: var(--ap-line); }

/* Search: an input and a square button joined */
.ap-search { display: flex; }
.ap-search input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--ap-line-2); border-right: 0; border-radius: var(--ap-radius) 0 0 var(--ap-radius); font: inherit; font-size: 15px; color: var(--ap-ink); background: var(--ap-white); }
.ap-search input:focus { outline: 2px solid var(--ap-route); outline-offset: -1px; }
.ap-search button { display: grid; place-items: center; width: 42px; flex-shrink: 0; border: 0; border-radius: 0 var(--ap-radius) var(--ap-radius) 0; background: var(--ap-route); color: var(--ap-white); cursor: pointer; }
.ap-search button svg { width: 18px; height: 18px; }

/* Map controls: a slate stack of square buttons on the map edge */
.ap-controls { position: absolute; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.ap-controls__group { display: flex; flex-direction: column; border-radius: var(--ap-radius); overflow: hidden; box-shadow: var(--ap-shadow-control); }
.ap-controls__group span { display: grid; place-items: center; width: 36px; height: 36px; background: var(--ap-slate); color: var(--ap-on-slate); }
.ap-controls__group span + span { border-top: 1px solid var(--ap-slate-2); }
.ap-controls__group svg { width: 18px; height: 18px; }

/* Scale bar and attribution strip, the small print of every map */
.ap-scale { position: absolute; left: 16px; bottom: 14px; z-index: 2; display: grid; gap: 2px; font-family: var(--ap-mono); font-size: 11px; color: var(--ap-ink); }
.ap-scale span { width: 92px; padding: 0 4px; border: 1.5px solid var(--ap-slate); border-top: 0; background: rgba(255, 255, 255, .7); }
.ap-scale span + span { width: 64px; border-top: 1.5px solid var(--ap-slate); border-bottom: 0; }
.ap-attrib { position: absolute; right: 0; bottom: 0; z-index: 2; padding: 3px 10px; background: rgba(255, 255, 255, .8); font-size: 12px; color: var(--ap-soft); border-top-left-radius: var(--ap-radius-sm); }

/* Pins: a teardrop in the one pin red with a white dot, and a route-blue "you are here" */
.ap-pin { position: absolute; z-index: 2; width: 26px; height: 26px; margin: -26px 0 0 -13px; border-radius: 50% 50% 50% 0; background: var(--ap-pin); transform: rotate(-45deg); box-shadow: var(--ap-shadow-control); }
.ap-pin::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--ap-white); }
.ap-here { position: absolute; z-index: 2; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--ap-route); border: 3px solid var(--ap-white); box-shadow: 0 0 0 8px rgba(47, 104, 209, .2); }
.ap-tag { position: absolute; z-index: 2; padding: 3px 8px; border-radius: var(--ap-radius-sm); background: var(--ap-white); border: var(--ap-border); box-shadow: var(--ap-shadow-control); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Hero: the map fills the screen, a welcome panel docks top left */
.ap-hero { min-height: 640px; padding: 16px; }
.ap-hero .ap-panel { width: min(100%, 420px); }
.ap-hero .ap-hero-title { font-size: clamp(34px, 3.8vw, 46px); }
.ap-hero .ap-lead { font-size: 17px; }
@media (max-width: 640px) {
  .ap-hero { min-height: 0; padding: 12px 12px 300px; }
  .ap-hero .ap-controls { top: auto; bottom: 60px; right: 12px; }
}

/* Legend: map keys as a list of swatches */
.ap-legend { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: var(--ap-text-small); }
.ap-legend li { display: flex; align-items: center; gap: 10px; }
.ap-key { width: 28px; height: 14px; flex-shrink: 0; border-radius: 2px; }
.ap-key--park { background: var(--ap-park); box-shadow: inset 0 0 0 1px var(--ap-park-2); }
.ap-key--plot { background: var(--ap-park-2); }
.ap-key--water { background: var(--ap-water); }
.ap-key--road { height: 6px; background: var(--ap-road); box-shadow: 0 0 0 2px var(--ap-white), 0 0 0 3px var(--ap-line-2); }
.ap-key--boundary { height: 0; border-top: 2.5px dashed var(--ap-boundary); border-radius: 0; }
.ap-key--select { background: var(--ap-route-soft); box-shadow: inset 0 0 0 2px var(--ap-route); }

/* Results list: rows inside a panel, like search results on a map */
.ap-results { margin: 0; padding: 0; list-style: none; }
.ap-results li { display: flex; gap: 12px; align-items: flex-start; padding: 12px var(--ap-panel-pad); border-top: var(--ap-border); }
.ap-results li:hover { background: var(--ap-mist); }
.ap-results strong { display: block; font-weight: 600; }
.ap-results__dist { margin-left: auto; font-family: var(--ap-mono); font-size: var(--ap-text-mono); color: var(--ap-soft); white-space: nowrap; }

/* Badges: small square-cornered tags */
.ap-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--ap-radius-sm); background: var(--ap-mist); border: var(--ap-border); font-size: 12px; font-weight: 600; color: var(--ap-soft); white-space: nowrap; }
.ap-badge--ok { background: #e7f2e4; border-color: #c4dfbf; color: var(--ap-ok); }
.ap-badge--route { background: var(--ap-route-soft); border-color: #c5d6f5; color: var(--ap-route-dark); }

/* Cards: a panel with a small map tile on top */
.ap-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ap-gap); }
.ap-card { display: flex; flex-direction: column; background: var(--ap-white); border: var(--ap-border); border-radius: var(--ap-radius); overflow: hidden; }
.ap-card__map { position: relative; height: 150px; border-bottom: var(--ap-border); }
.ap-card__body { padding: 18px var(--ap-panel-pad) 20px; }
.ap-card__body p { margin: 8px 0 0; color: var(--ap-soft); font-size: 15px; }
.ap-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 900px) { .ap-cards { grid-template-columns: 1fr; } }

/* Steps: numbered like map waypoints */
.ap-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ap-gap); margin: 0; padding: 0; list-style: none; counter-reset: ap-step; }
.ap-steps li { position: relative; padding: 0 0 0 52px; counter-increment: ap-step; }
.ap-steps li::before { content: counter(ap-step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ap-white); border: 2.5px solid var(--ap-route); font-family: var(--ap-display); font-weight: 700; font-size: 18px; color: var(--ap-route); }
.ap-steps p { margin: 6px 0 0; color: var(--ap-soft); font-size: 15px; }
@media (max-width: 820px) { .ap-steps { grid-template-columns: 1fr; } }

/* Stats: a row of measured numbers with mono units */
.ap-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: var(--ap-border); border-radius: var(--ap-radius); background: var(--ap-white); }
.ap-stat { padding: 20px; }
.ap-stat + .ap-stat { border-left: var(--ap-border); }
.ap-stat__num { font-family: var(--ap-display); font-weight: 600; font-size: var(--ap-text-stat); line-height: 1; }
.ap-stat__unit { margin-left: 4px; font-family: var(--ap-mono); font-size: 14px; color: var(--ap-soft); }
.ap-stat p { margin: 8px 0 0; font-size: 14px; color: var(--ap-soft); }
@media (max-width: 820px) { .ap-stats { grid-template-columns: 1fr 1fr; } .ap-stat:nth-child(3) { border-left: 0; } .ap-stat:nth-child(n+3) { border-top: var(--ap-border); } }

/* Split: text beside a framed map */
.ap-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.ap-frame { position: relative; min-height: 380px; border: var(--ap-border); border-radius: var(--ap-radius); overflow: hidden; }
@media (max-width: 900px) { .ap-split { grid-template-columns: 1fr; gap: 28px; } .ap-frame { min-height: 300px; } }

/* Forms */
.ap-form { display: grid; gap: 16px; }
.ap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .ap-row { grid-template-columns: 1fr; } }
.ap-field { display: grid; gap: 6px; }
.ap-label { font-size: 14px; font-weight: 600; }
.ap-input, .ap-select { width: 100%; padding: 9px 12px; border: 1px solid var(--ap-line-2); border-radius: var(--ap-radius); background: var(--ap-white); font: inherit; font-size: 15px; color: var(--ap-ink); }
.ap-input:focus, .ap-select:focus { outline: 2px solid var(--ap-route); outline-offset: -1px; border-color: var(--ap-route); }
.ap-help { font-size: 13px; color: var(--ap-soft); }
.ap-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ap-soft); }
.ap-check input { margin-top: 3px; accent-color: var(--ap-route); }
.ap-divider { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ap-faint); }
.ap-divider::before, .ap-divider::after { content: ""; flex: 1; height: 1px; background: var(--ap-line); }

/* Pricing: three panels, the picked one outlined in route blue like a selected area */
.ap-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ap-gap); align-items: start; }
.ap-plan { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--ap-white); border: var(--ap-border); border-radius: var(--ap-radius); }
.ap-plan--picked { border-color: var(--ap-route); box-shadow: 0 0 0 1px var(--ap-route), var(--ap-shadow-float); }
.ap-plan--picked::before { content: "Most picked"; position: absolute; top: -11px; left: 20px; padding: 1px 8px; border-radius: var(--ap-radius-sm); background: var(--ap-route); color: var(--ap-white); font-size: 12px; font-weight: 600; }
.ap-price { display: flex; align-items: baseline; gap: 6px; }
.ap-price strong { font-family: var(--ap-display); font-weight: 600; font-size: 46px; line-height: 1; }
.ap-price span { font-family: var(--ap-mono); font-size: 13px; color: var(--ap-soft); }
.ap-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.ap-list li { position: relative; padding-left: 22px; }
.ap-list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 6px; border-left: 2px solid var(--ap-ok); border-bottom: 2px solid var(--ap-ok); transform: rotate(-45deg); }
@media (max-width: 900px) { .ap-plans { grid-template-columns: 1fr; } }

/* Table: plain rows, mist header, mono numbers */
.ap-table-wrap { overflow-x: auto; border: var(--ap-border); border-radius: var(--ap-radius); background: var(--ap-white); }
.ap-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ap-table th, .ap-table td { padding: 11px 16px; text-align: left; border-bottom: var(--ap-border); }
.ap-table thead th { background: var(--ap-mist); font-family: var(--ap-display); font-weight: 600; }
.ap-table tbody tr:last-child td { border-bottom: 0; }
.ap-table td:not(:first-child), .ap-table th:not(:first-child) { text-align: center; }
.ap-yes { color: var(--ap-ok); font-weight: 700; }
.ap-no { color: var(--ap-faint); }

/* FAQ */
.ap-faq { border-top: var(--ap-border); }
.ap-faq details { border-bottom: var(--ap-border); padding: 14px 0; }
.ap-faq summary { cursor: pointer; font-family: var(--ap-display); font-weight: 600; font-size: 19px; }
.ap-faq p { margin: 8px 0 0; color: var(--ap-soft); }

/* Article: a reading column, figures framed like map extracts */
.ap-article { font-size: 18px; line-height: 1.7; }
.ap-article h2 { margin: 44px 0 10px; font-family: var(--ap-display); font-weight: 600; font-size: 28px; line-height: 1.15; }
.ap-article p { margin: 0 0 18px; }
.ap-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; font-size: 14px; color: var(--ap-soft); }
.ap-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ap-park); color: var(--ap-ink); font-family: var(--ap-display); font-weight: 700; font-size: 14px; }
.ap-figure { margin: 30px 0; }
.ap-figure .ap-frame { min-height: 320px; }
.ap-figure figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; color: var(--ap-soft); }
.ap-quote { margin: 30px 0; padding: 4px 0 4px 20px; border-left: 3px dashed var(--ap-boundary); font-family: var(--ap-display); font-weight: 500; font-size: 24px; line-height: 1.35; }
.ap-quote cite { display: block; margin-top: 8px; font-family: var(--ap-sans); font-style: normal; font-size: 14px; color: var(--ap-soft); }
.ap-note { margin: 26px 0; padding: 14px 18px; border: var(--ap-border); border-left: 4px solid var(--ap-route); border-radius: var(--ap-radius); background: var(--ap-route-soft); font-size: 16px; }

/* Footer: slate, like the map control stack */
.ap-footer { padding: 48px 0 28px; background: var(--ap-slate); color: var(--ap-on-slate); font-size: var(--ap-text-small); }
.ap-footer a { color: var(--ap-on-slate-soft); text-decoration: none; }
.ap-footer a:hover { color: var(--ap-on-slate); }
.ap-footer .ap-logo { color: var(--ap-on-slate); }
.ap-footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 28px; }
.ap-footer__grid h4 { margin: 0 0 10px; font-family: var(--ap-display); font-weight: 600; font-size: 15px; }
.ap-footer__grid ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ap-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--ap-slate-2); color: var(--ap-on-slate-soft); }
.ap-footer__base .ap-mono { color: var(--ap-on-slate-soft); }
@media (max-width: 820px) { .ap-footer__grid { grid-template-columns: 1fr 1fr; } }

/* Logo mark: a folded map sheet with a pin */
.ap-logo__sheet { fill: var(--ap-park); stroke: var(--ap-ok); stroke-width: 1.6; stroke-linejoin: round; }
.ap-logo__fold { fill: none; stroke: var(--ap-ok); stroke-width: 1.2; }
.ap-logo__pin { fill: var(--ap-pin); }
.ap-footer .ap-logo__sheet { fill: var(--ap-slate-2); stroke: var(--ap-on-slate-soft); }
