@import url("./fonts/fonts.css");

:root {
  color-scheme: dark;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-synthesis: none;
  --paper: #0a100f;
  --panel: #101816;
  --panel-2: #151f1c;
  --ink: #e9efe9;
  --muted: #8d9b93;
  --dim: #536159;
  --acid: #bbff38;
  --orange: #ff714b;
  --blue: #76c7ff;
  --yellow: #ffd45b;
  --line: #26322e;
  --line-strong: #45554f;
  --danger-bg: rgba(255, 113, 75, 0.09);
  --warning-bg: rgba(255, 212, 91, 0.08);
  --blue-solid: #176f9f;
  --display: "Bebas Neue", "Zen Kaku Gothic New", sans-serif;
  --body: "Zen Kaku Gothic New", sans-serif;
  --page: min(1500px, calc(100vw - 48px));
  --measure: 760px;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% -8%, rgba(187, 255, 56, 0.085), transparent 30rem),
    radial-gradient(circle at 8% 18%, rgba(118, 199, 255, 0.055), transparent 26rem),
    linear-gradient(180deg, var(--paper) 0%, #080d0c 100%);
  font-family: var(--body);
  line-height: 1.7;
  letter-spacing: 0.025em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(233, 239, 233, 0.018) 25%),
    repeating-linear-gradient(0deg, rgba(233, 239, 233, 0.012) 0 1px, transparent 1px 8px);
}

::selection {
  color: var(--paper);
  background: var(--acid);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border-radius: 0;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.visually-hidden {
  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: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 15px;
  color: var(--paper);
  background: var(--acid);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

/* Shared masthead */
.site-header {
  width: var(--page);
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-decoration: none;
}

.wordmark-dot {
  color: var(--acid);
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 3vw, 40px);
}

.primary-nav a {
  position: relative;
  padding: 10px 0 8px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--ink);
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Existing index and About surfaces */
.guide-main {
  width: var(--page);
  margin: 0 auto;
}

.guide-main > [data-content-id] {
  scroll-margin-top: 24px;
}

.guide-main > [data-content-id] + [data-content-id] {
  border-top: 1px solid var(--line);
}

.breadcrumbs {
  padding: 22px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  min-width: 0;
}

.breadcrumbs li:not(:last-child)::after {
  margin-left: 9px;
  color: var(--acid);
  content: "/";
}

.breadcrumbs a {
  text-decoration-color: var(--dim);
  text-underline-offset: 4px;
}

.breadcrumbs a:hover {
  color: var(--acid);
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.guide-hero {
  position: relative;
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(150px, 0.42fr);
  gap: clamp(36px, 8vw, 112px);
  align-items: center;
  padding: clamp(66px, 9vw, 124px) 0 clamp(58px, 7vw, 92px);
  overflow: hidden;
}

.guide-hero::after {
  width: clamp(112px, 17vw, 236px);
  aspect-ratio: 1;
  justify-self: end;
  border: 1px solid rgba(187, 255, 56, 0.32);
  border-radius: 50%;
  content: "";
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(187, 255, 56, 0.2) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(0deg, transparent calc(50% - 0.5px), rgba(187, 255, 56, 0.2) 50%, transparent calc(50% + 0.5px));
  box-shadow:
    0 0 0 3.5vw rgba(187, 255, 56, 0.018),
    0 0 0 7vw rgba(187, 255, 56, 0.012);
}

.guide-hero--spot,
.guide-hero--about {
  min-height: 340px;
}

.guide-hero--spot::after,
.guide-hero--about::after {
  border-radius: 0;
  transform: rotate(45deg) scale(0.72);
}

.guide-hero > :first-child {
  min-width: 0;
}

.eyebrow,
.section-label,
.sheet-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--acid);
  font-family: var(--display);
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-label::before,
.sheet-label::before {
  width: 28px;
  height: 1px;
  flex: 0 0 auto;
  content: "";
  background: currentColor;
}

.guide-hero h1 {
  max-width: 1000px;
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1.9rem, 4.2vw + 0.5rem, 4.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-wrap: balance;
  overflow-wrap: normal;
}

.title-segment {
  white-space: nowrap;
}

.hero-summary {
  max-width: var(--measure);
  margin: clamp(26px, 4vw, 44px) 0 0 clamp(0px, 5vw, 72px);
  color: var(--muted);
  font-size: clamp(0.9rem, 1.15vw, 1.03rem);
  line-height: 1.9;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin: 22px 0 0 clamp(0px, 5vw, 72px);
  color: var(--muted);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.guide-intro,
.prefecture-directory,
.spot-list-section,
.fact-section,
.about-section {
  padding: clamp(58px, 8vw, 108px) 0;
}

.guide-intro > p,
.about-section > p {
  max-width: var(--measure);
  color: var(--muted);
}

.guide-intro > p:first-of-type,
.about-section > p:first-of-type {
  color: var(--ink);
  font-size: clamp(1.18rem, 2vw, 1.65rem);
  line-height: 1.75;
}

.guide-intro h2,
.prefecture-directory > h2,
.spot-list-section > h2,
.fact-section > h2,
.about-section > h2,
.content-panel h2 {
  margin: 0 0 clamp(28px, 5vw, 50px);
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.guide-intro h3,
.region-heading,
.spot-list-section h3,
.fact-section h3,
.about-section h3,
.content-panel h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.3vw, 2.05rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.content-panel {
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(21, 31, 28, 0.96), rgba(10, 16, 15, 0.98));
}

.content-panel + .content-panel {
  margin-top: 18px;
}

.content-panel > :first-child,
.notice-box > :first-child,
.disclaimer > :first-child {
  margin-top: 0;
}

.content-panel > :last-child,
.notice-box > :last-child,
.disclaimer > :last-child {
  margin-bottom: 0;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(34px, 5vw, 58px);
  padding: 1px;
  background: var(--line);
}

.mode-card {
  min-height: 218px;
  padding: clamp(26px, 4vw, 44px);
  background: var(--panel);
}

.mode-card h3 {
  margin-bottom: 50px;
}

.mode-card p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
}

.region-section + .region-section {
  margin-top: clamp(50px, 7vw, 78px);
}

.region-heading {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.region-heading::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--line);
}

.prefecture-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

.prefecture-card {
  position: relative;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 23px;
  color: var(--ink);
  background: var(--panel);
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease;
}

.prefecture-card::after {
  position: absolute;
  right: 21px;
  bottom: 18px;
  color: var(--acid);
  content: "\2192";
  font-family: var(--display);
  transition: transform 180ms ease;
}

.prefecture-card:hover,
.prefecture-card:focus-visible {
  color: var(--paper);
  background: var(--acid);
}

.prefecture-card:hover::after,
.prefecture-card:focus-visible::after {
  color: var(--paper);
  transform: translateX(5px);
}

.prefecture-name {
  padding-right: 26px;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.3;
}

.prefecture-count {
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.prefecture-card:hover .prefecture-count,
.prefecture-card:focus-visible .prefecture-count {
  color: #283519;
}

.section-heading {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.spot-list-section + .spot-list-section {
  padding-top: 0;
  border-top: 0 !important;
}

/* Dense prefecture cards */
.spot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.spot-card {
  position: relative;
  min-width: 0;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  color: var(--ink);
  background: linear-gradient(145deg, rgba(21, 31, 28, 0.96), rgba(11, 17, 15, 0.99));
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
  animation: card-in 420ms both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.spot-card:hover,
.spot-card:focus-within {
  z-index: 1;
  border-color: var(--line-strong);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  transform: translateY(-3px);
}

.card__top {
  min-height: 86px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.card__identity {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.stay-mode-badge,
.detail-stay-mode-badge,
.vehicle-access-badge,
.category-badge,
.status-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(187, 255, 56, 0.52);
  color: var(--acid);
  background: rgba(187, 255, 56, 0.07);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.045em;
}

.stay-mode-badge.is-campsite,
.detail-stay-mode-badge.is-campsite {
  border-color: rgba(255, 113, 75, 0.62);
  color: #ff9a7d;
  background: rgba(255, 113, 75, 0.08);
}

.vehicle-access-badge {
  border-color: rgba(118, 199, 255, 0.5);
  color: var(--blue);
  background: rgba(118, 199, 255, 0.07);
}

.vehicle-access-badge.access-restricted {
  border-color: rgba(255, 212, 91, 0.55);
  color: var(--yellow);
  background: var(--warning-bg);
}

.vehicle-access-badge.access-unavailable {
  border-color: rgba(255, 113, 75, 0.45);
  color: #ff9a7d;
  background: var(--danger-bg);
}

.vehicle-access-badge.access-unknown {
  border-color: var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.category-badge {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.025);
}

.source {
  max-width: 28ch;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  flex: 0 0 auto;
  gap: 7px;
  color: var(--muted);
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.02);
}

.status-badge::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  content: "";
  background: currentColor;
}

.status-badge--active {
  color: var(--acid);
}

.status-badge--seasonal {
  color: var(--yellow);
}

.status-badge--temporarily-closed {
  color: var(--orange);
}

.status-badge--unknown {
  color: var(--muted);
}

.card__body {
  padding: 16px 15px 14px;
  flex: 1;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: var(--line);
}

.card-score,
.card-confidence {
  min-width: 0;
  padding: 10px 11px;
  background: rgba(8, 13, 12, 0.78);
}

.card-score b,
.card-confidence b {
  display: block;
  color: var(--acid);
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.card-confidence b {
  color: var(--blue);
}

.card-score span,
.card-confidence span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
}

.spot-card__heading {
  margin: 0 0 7px;
  font-size: clamp(1.12rem, 1.55vw, 1.38rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.012em;
  overflow-wrap: anywhere;
}

.spot-card__heading a {
  text-decoration: none;
}

.spot-card__heading a:hover {
  color: var(--acid);
}

.spot-card__location,
.spot-card__listing,
.spot-card__price,
.spot-card__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.spot-card__listing {
  margin-top: 8px;
  padding-left: 9px;
  border-left: 2px solid var(--acid);
  color: #c5d0ca;
}

.spot-card__price {
  margin-top: 12px;
  color: var(--ink);
  font-weight: 700;
}

.spot-card__meta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.critical-notices {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.critical-notice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px;
  border: 1px solid rgba(255, 113, 75, 0.68);
  background: var(--danger-bg);
}

.critical-notice > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--orange);
  font-family: var(--display);
  font-size: 1rem;
}

.critical-notice b {
  display: block;
  color: #ff9a7d;
  font-size: 0.68rem;
  line-height: 1.45;
}

.critical-notice small {
  display: block;
  margin-top: 3px;
  color: #cfb1a8;
  font-size: 0.625rem;
  line-height: 1.55;
}

.critical-notice.warning {
  border-color: rgba(255, 212, 91, 0.6);
  background: var(--warning-bg);
}

.critical-notice.warning > span {
  background: var(--yellow);
}

.critical-notice.warning b {
  color: var(--yellow);
}

.card-amenities,
.amenity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 3px;
  padding: 0;
  list-style: none;
}

.card-amenity,
.amenity-chip {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  color: #d6dfda;
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.25;
}

.card-amenity svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.card-amenity.available {
  color: var(--blue);
  border-color: rgba(118, 199, 255, 0.44);
}

.card-amenity.restricted {
  color: var(--yellow);
  border-color: rgba(255, 212, 91, 0.48);
}

.card-amenity.unavailable {
  color: #8d9992;
  border-color: #39443f;
}

.card-amenity.unknown {
  color: var(--muted);
  border-style: dashed;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.metric {
  min-width: 0;
  padding: 8px 5px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.metric:last-child {
  border-right: 0;
}

.metric b {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.625rem;
  line-height: 1.3;
  white-space: nowrap;
}

.cost-metric b {
  color: var(--acid);
}

.metrics.has-ev-range {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.arrival-metric b {
  color: var(--ev-range-color, var(--dim));
}

.tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.tag {
  padding: 3px 6px;
  border: 1px solid #34413d;
  color: #a4b1aa;
  font-size: 0.625rem;
  line-height: 1.35;
}

.tag.ev {
  border-color: rgba(187, 255, 56, 0.5);
  color: var(--acid);
}

.tag.alert {
  border-color: rgba(255, 113, 75, 0.6);
  color: var(--orange);
}

.notice-note-chip {
  border-color: #46534d;
  border-style: dashed;
  color: #b5c0ba;
  background: rgba(255, 255, 255, 0.025);
}

.card__action {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  border-top: 1px solid var(--line);
  color: var(--acid);
  font-size: 0.65rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.card__action:hover,
.card__action:focus-visible {
  color: var(--paper);
  background: var(--acid);
}

.empty-state {
  margin: 0;
  padding: clamp(28px, 4vw, 48px);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  background: rgba(16, 24, 22, 0.66);
}

/* Detail page */
.detail-page {
  background:
    radial-gradient(circle at 15% 0, rgba(118, 199, 255, 0.09), transparent 34rem),
    radial-gradient(circle at 78% -12%, rgba(187, 255, 56, 0.065), transparent 30rem),
    var(--paper);
}

.detail-nav {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 0 clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.detail-nav a {
  color: var(--acid);
  text-decoration: none;
}

.detail-nav > :last-child {
  justify-self: end;
  color: var(--dim);
}

.detail-main {
  width: 100%;
  padding-bottom: clamp(64px, 8vw, 112px);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(500px, 0.8fr);
  gap: clamp(30px, 5vw, 68px);
  align-items: end;
  padding: clamp(54px, 8vw, 108px) 0 42px;
  border-bottom: 1px solid var(--line);
}

.detail-identity {
  min-width: 0;
}

.detail-identity .badge-row {
  margin-bottom: 18px;
}

.detail-kicker {
  margin: 0;
  color: var(--acid);
  font-family: var(--display);
  font-size: 0.88rem;
  line-height: 1.2;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.detail-identity h1,
.detail-hero h1 {
  max-width: 960px;
  margin: 14px 0 0;
  font-family: var(--body);
  font-size: clamp(1.9rem, 4.2vw + 0.5rem, 4.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-wrap: balance;
  overflow-wrap: normal;
}

.detail-identity .detail-place,
.detail-place {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-reason {
  margin: 18px 0;
  color: #c4d0c9;
  font-size: 0.78rem;
  line-height: 1.8;
}

.detail-scoreboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.score-cell {
  min-width: 0;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 14px;
  background: rgba(8, 13, 12, 0.94);
}

.score-cell > span,
.score-cell > small:first-child,
.score-cell__label {
  color: var(--muted);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.07em;
}

.score-cell b,
.score-cell strong {
  display: block;
  color: var(--acid);
  font-family: var(--display);
  font-size: clamp(2rem, 3.3vw, 2.8rem);
  font-weight: 400;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.score-cell:nth-child(2) b,
.score-cell:nth-child(2) strong {
  color: var(--blue);
}

.score-cell small,
.score-cell p,
.score-cell em {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.625rem;
  font-style: normal;
  line-height: 1.45;
}

.listing-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.status-copy {
  min-width: 0;
}

.status-copy > strong,
.status-copy > b {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.55;
}

.status-copy > small,
.status-copy > p,
.listing-status-row time {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.55;
}

.listing-status-row > .badge-row {
  justify-content: flex-end;
}

.listing-status-row h2 {
  max-width: 900px;
  margin: 5px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.55;
  letter-spacing: -0.015em;
}

.listing-status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
}

.status-note {
  max-width: var(--measure);
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.65;
}

.warning-band {
  display: grid;
  gap: 4px;
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 212, 91, 0.58);
  border-left: 4px solid var(--yellow);
  color: #f5df9f;
  background: var(--warning-bg);
  font-size: 0.74rem;
  line-height: 1.7;
}

.warning-band.critical,
.warning-band--critical,
.warning-band[data-severity="critical"] {
  border-color: rgba(255, 113, 75, 0.68);
  border-left-color: var(--orange);
  color: #ffc0ae;
  background: var(--danger-bg);
}

.warning-band strong,
.warning-band b {
  color: var(--ink);
}

.notice-stack {
  padding: clamp(30px, 4vw, 52px) 0;
}

.notice-stack > .section-heading {
  margin-bottom: 16px;
}

.notice-stack > .critical-notices {
  margin: 0;
}

.notice-notes {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
}

.notice-stack > .notice-notes:first-child {
  margin-top: 0;
}

.notice-notes > .section-heading {
  margin-bottom: 12px;
}

.notice-notes ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notice-notes li {
  display: grid;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  line-height: 1.65;
}

.notice-notes li:first-child {
  padding-top: 0;
  border-top: 0;
}

.notice-notes li > div {
  display: grid;
  gap: 2px;
}

.notice-notes b {
  color: #c7d1cc;
}

.notice-notes .fact-source-link {
  justify-self: start;
}

.critical-notice .fact-source-link {
  display: inline-flex;
  margin-top: 6px;
}

.detail-layout,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
  gap: clamp(20px, 3.5vw, 54px);
  align-items: start;
  padding-top: 38px;
}

.facility-sheet,
.cost-builder,
.score-panel,
.score-method-panel,
.source-ledger {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(21, 31, 28, 0.96), rgba(10, 16, 15, 0.985));
}

.facility-sheet {
  min-width: 0;
  padding: clamp(22px, 3vw, 42px);
}

.detail-map-section {
  grid-column: 1 / -1;
  min-width: 0;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(21, 31, 28, 0.96), rgba(10, 16, 15, 0.985));
}

.detail-map-section .section-heading {
  margin-bottom: 16px;
}

.detail-map-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.7rem;
}

.detail-map-meta strong {
  color: var(--yellow);
}

.detail-map {
  width: 100%;
  height: min(52vh, 480px);
  min-height: 340px;
  background: #dbe4df;
}

.map-error {
  min-height: inherit;
  display: grid;
  place-items: center;
  margin: 0;
  color: #536159;
  font-size: 0.72rem;
}

.facility-section {
  min-width: 0;
}

.facility-sheet > section,
.facility-sheet > .detail-section {
  padding: clamp(30px, 4vw, 52px) 0;
  border-top: 1px solid var(--line);
}

.facility-sheet > section:first-child,
.facility-sheet > .detail-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.facility-sheet h2,
.score-panel h2,
.score-method-panel h2,
.source-ledger h2,
.cost-builder h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.facility-sheet h3,
.score-panel h3,
.score-method-panel h3,
.source-ledger h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.section-label {
  margin-bottom: 7px;
}

.section-intro,
.section-note {
  max-width: var(--measure);
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.section-heading--compact {
  align-items: flex-end;
  margin-bottom: 18px;
}

.section-heading--compact > div {
  min-width: 0;
}

.section-heading--compact .section-label {
  margin-bottom: 6px;
}

.section-heading--compact h2 {
  margin: 0;
}

/* Four-state facility tiles */
.amenity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 9px;
  margin-top: 22px;
}

.amenity-tile-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.amenity-tile {
  position: relative;
  width: 100%;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.amenity-tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.amenity-tile[aria-expanded="true"] {
  border-color: var(--acid);
  box-shadow:
    inset 0 0 0 1px var(--acid),
    0 0 0 2px rgba(187, 255, 56, 0.2);
}

.amenity-tile svg {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  stroke-width: 1.7;
}

.amenity-tile__icon {
  display: grid;
  place-items: center;
  line-height: 0;
}

.amenity-tile > span:not(.tile-condition),
.amenity-tile__copy {
  display: grid;
  gap: 3px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.amenity-tile small,
.amenity-tile__detail {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: currentColor;
  font-size: 0.61rem;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0.78;
}

.amenity-tile.available,
.amenity-tile.restricted {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue-solid);
  box-shadow: inset 0 -26px 52px rgba(3, 34, 51, 0.16);
}

.amenity-tile.restricted {
  padding-top: 34px;
}

.amenity-tile.unavailable {
  border-color: #3c4944;
  color: #a8b2ac;
  background: #293330;
}

.amenity-tile.unknown {
  border-color: var(--dim);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.012);
}

.tile-unknown {
  position: absolute;
  right: 9px;
  bottom: 7px;
  color: var(--muted);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tile-condition {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  color: #28200a;
  background: var(--yellow);
  font-size: 0.625rem;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.06em;
}

.amenity-evidence-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--blue);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.64rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.amenity-evidence-panel p {
  margin: 0;
}

.amenity-evidence-panel p + p {
  margin-top: 7px;
}

.amenity-evidence-panel a {
  color: var(--blue);
  text-underline-offset: 3px;
}

.amenity-evidence-panel summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

.amenity-evidence-panel[open] {
  border-color: rgba(118, 199, 255, 0.55);
}

.amenity-evidence-panel summary::marker {
  color: var(--blue);
}

.amenity-evidence-meta {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.amenity-evidence-meta small {
  display: block;
  margin-top: 3px;
  color: var(--dim);
}

/* Condition matrix */
.condition-table-wrap,
.facts-table-wrap {
  width: 100%;
  min-width: 0;
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
  scrollbar-color: var(--dim) var(--panel);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.condition-table,
.facts-table,
.equipment-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.72rem;
  line-height: 1.6;
}

.condition-table caption,
.facts-table caption,
.equipment-table caption {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-align: left;
  text-transform: uppercase;
}

.condition-table th,
.condition-table td,
.facts-table th,
.facts-table td,
.equipment-table th,
.equipment-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.condition-table thead th {
  color: var(--muted);
  background: #0c1311;
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.condition-table tbody th,
.facts-table th,
.equipment-table th {
  width: 24%;
  color: #cbd5cf;
  background: rgba(255, 255, 255, 0.018);
  font-weight: 700;
}

.condition-table tr:last-child > *,
.facts-table tr:last-child > *,
.equipment-table tr:last-child > * {
  border-bottom: 0;
}

.condition-table a,
.facts-table a,
.equipment-table a {
  color: var(--blue);
  text-underline-offset: 3px;
}

.value-detail {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 400;
}

.fact-list {
  display: grid;
  grid-template-columns: minmax(108px, 0.28fr) minmax(0, 1fr);
  margin: 20px 0 0;
}

.fact-list dt,
.fact-list dd {
  min-width: 0;
  margin: 0;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  line-height: 1.65;
}

.fact-list dt {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  font-weight: 700;
}

.fact-list dd {
  color: #cbd5cf;
  overflow-wrap: anywhere;
}

.fact-list > :nth-last-child(-n + 2) {
  border-bottom: 0;
}

.status-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--muted);
  background: currentColor;
  vertical-align: 0;
}

.status-dot.available,
.status-dot.is-available {
  color: var(--acid);
  box-shadow: 0 0 10px rgba(187, 255, 56, 0.32);
}

.status-dot.restricted,
.status-dot.conditional,
.status-dot.is-restricted {
  color: var(--yellow);
}

.status-dot.unavailable,
.status-dot.is-unavailable {
  color: var(--orange);
}

.status-dot.unknown,
.status-dot.is-unknown {
  color: var(--muted);
  background: transparent;
}

.fact-status {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.fact-status.available {
  color: var(--acid);
}

.fact-status.restricted {
  color: var(--yellow);
}

.fact-status.unavailable {
  color: #a6b0aa;
}

.fact-status.available .status-dot {
  color: var(--acid);
  box-shadow: 0 0 10px rgba(187, 255, 56, 0.32);
}

.fact-status.restricted .status-dot {
  color: var(--yellow);
}

.fact-status.unavailable .status-dot {
  color: #78847d;
}

.fact-status.unknown .status-dot {
  color: var(--muted);
  background: transparent;
}

.fact-source-link {
  color: var(--blue);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.fact-source-link + small {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font-size: 0.58rem;
}

/* Evidence */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.evidence-card,
.evidence-item {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
}

.evidence-card.available,
.evidence-card.is-available,
.evidence-available {
  border-color: rgba(187, 255, 56, 0.34);
}

.evidence-card.restricted,
.evidence-card.is-restricted {
  border-color: rgba(255, 212, 91, 0.42);
}

.evidence-card h3,
.evidence-card b,
.evidence-item b {
  color: var(--ink);
  font-size: 0.75rem;
}

.evidence-card p,
.evidence-card small,
.evidence-item small {
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.evidence-card a,
.evidence-item a {
  color: var(--blue);
  font-size: 0.62rem;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

.evidence-card footer {
  display: grid;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.59rem;
}

.evidence-card > div:first-child {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

/* Score axes */
.score-panel,
.score-method-panel {
  margin-top: clamp(28px, 4vw, 50px);
  padding: clamp(22px, 3vw, 34px);
  background:
    linear-gradient(110deg, rgba(187, 255, 56, 0.065), transparent 48%),
    var(--panel);
}

.score-axis-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.score-axis {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  padding: 15px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.score-axis > header {
  grid-column: 1 / -1;
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
}

.score-axis > header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
}

.score-axis > header strong {
  color: var(--acid);
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.score-axis > b,
.score-axis > h3 {
  align-self: center;
  color: var(--ink);
  font-size: 0.75rem;
}

.score-axis > strong {
  color: var(--acid);
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-axis > small,
.score-axis > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.65;
}

.progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: var(--acid);
  background: var(--line);
  appearance: none;
}

progress.progress::-webkit-progress-bar {
  background: var(--line);
}

progress.progress::-webkit-progress-value {
  background: var(--acid);
}

progress.progress::-moz-progress-bar {
  background: var(--acid);
}

.progress > span,
.progress__bar {
  height: 100%;
  display: block;
  background: var(--acid);
}

.score-axis > progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: var(--acid);
  background: var(--line);
  appearance: none;
}

.score-axis > progress::-webkit-progress-bar {
  background: var(--line);
}

.score-axis > progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--blue), var(--acid));
}

.score-axis > progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--blue), var(--acid));
}

.score-axis > dl {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  color: var(--dim);
  font-size: 0.58rem;
}

.score-axis > dl > div {
  display: flex;
  gap: 5px;
}

.score-axis > dl dt,
.score-axis > dl dd {
  margin: 0;
}

.score-axis > dl dd {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.score-axis details {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.63rem;
}

.score-axis summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--blue);
  cursor: pointer;
}

.score-axis details ul {
  margin: 9px 0 0;
  padding-left: 18px;
}

.condition-matrix {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.condition-matrix__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
  border: 1px solid var(--line);
}

.detail-actions a {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 10px 8px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.65rem;
  text-align: center;
  text-decoration: none;
}

.detail-actions a:last-child {
  border-right: 0;
}

.detail-actions a:hover,
.detail-actions a:focus-visible {
  color: var(--paper);
  background: var(--acid);
}

.failed-gates {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 212, 91, 0.45);
  color: #eadcae;
  background: var(--warning-bg);
  font-size: 0.7rem;
}

.failed-gates ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.gate-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 212, 91, 0.45);
  color: #eadcae;
  background: var(--warning-bg);
  font-size: 0.7rem;
  line-height: 1.65;
}

.gate-note b {
  color: var(--yellow);
}

.gate-note ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.gate-note--pass {
  border-color: rgba(187, 255, 56, 0.34);
  color: #c9dda1;
  background: rgba(187, 255, 56, 0.045);
}

/* Sticky night-cost builder */
.cost-builder {
  position: sticky;
  top: 18px;
  min-width: 0;
  box-shadow: var(--shadow);
}

.cost-builder__form {
  margin: 0;
}

.cost-builder__top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.cost-builder__top .section-label {
  margin-bottom: 5px;
}

.cost-builder h2 {
  font-size: 1.45rem;
}

.detail-party > span,
.detail-party > label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.58rem;
  text-align: center;
}

.detail-party > div {
  display: grid;
  grid-template-columns: 34px 42px 34px;
  border: 1px solid var(--line);
}

.detail-party button,
.detail-party input {
  width: 100%;
  height: 36px;
  border: 0;
  color: var(--ink);
  background: #0b120f;
  text-align: center;
}

.detail-party button {
  color: var(--acid);
  cursor: pointer;
  font-size: 1.05rem;
}

.detail-party button:hover:not(:disabled) {
  color: var(--paper);
  background: var(--acid);
}

.detail-party input {
  border-inline: 1px solid var(--line);
  appearance: textfield;
}

.detail-party button:disabled,
.detail-party input:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.detail-party input::-webkit-inner-spin-button,
.unit-input input::-webkit-inner-spin-button {
  display: none;
}

.base-cost-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

.base-cost-row strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.option-list {
  padding: 0 22px;
}

.cost-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 13px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cost-option.option-disabled {
  opacity: 0.47;
}

.cost-option.option-disabled > label,
.cost-option.option-disabled input {
  cursor: not-allowed;
}

.cost-option > label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}

.cost-option > label input {
  position: absolute;
  opacity: 0;
}

.cost-option > label i {
  position: relative;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  border: 1px solid var(--dim);
}

.cost-option > label input:checked + i {
  border-color: var(--acid);
  background: var(--acid);
}

.cost-option > label input:checked + i::after {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid var(--paper);
  border-left: 2px solid var(--paper);
  content: "";
  transform: rotate(-45deg);
}

.cost-option > label input:focus-visible + i {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.cost-option b {
  display: block;
  font-size: 0.72rem;
}

.cost-option small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.58rem;
}

.unit-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
}

.unit-input input {
  width: 100%;
  min-width: 0;
  padding: 7px 3px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  text-align: right;
  appearance: textfield;
}

.unit-input:focus-within {
  border-color: var(--acid);
}

.unit-input em {
  font-size: 0.58rem;
  font-style: normal;
}

.cost-breakdown {
  padding: 15px 22px 3px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 0.66rem;
}

.breakdown-row b,
.breakdown-row strong {
  color: #cbd5cf;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.grand-total {
  position: relative;
  margin: 13px 22px 0;
  padding: 20px;
  overflow: hidden;
  color: var(--paper);
  background: var(--acid);
}

.grand-total::after {
  position: absolute;
  top: -60px;
  right: -52px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(12, 19, 15, 0.25);
  border-radius: 50%;
  content: "";
}

.grand-total span,
.grand-total small {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 0.62rem;
}

.grand-total strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 6px;
  font-family: var(--display);
  font-size: clamp(3rem, 5vw, 4.4rem);
  font-weight: 400;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.grand-total small {
  margin-top: 5px;
}

.unresolved-notice {
  margin: 12px 22px 0;
  padding: 11px;
  border: 1px solid rgba(255, 113, 75, 0.65);
  color: #ff9e83;
  background: var(--danger-bg);
  font-size: 0.63rem;
  line-height: 1.65;
}

.cost-notes {
  margin: 11px 22px 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.65;
}

.cost-notes p {
  margin: 3px 0;
}

.calculator-caveat {
  margin: 15px 22px 21px;
  color: var(--muted);
  font-size: 0.59rem;
  line-height: 1.65;
}

.price-variants {
  margin: 18px 22px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.price-variants h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.price-variants ul,
.price-variants dl {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.price-variants li,
.price-variants dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
  font-size: 0.63rem;
}

.price-variants dt,
.price-variants dd {
  margin: 0;
}

.price-variants strong,
.price-variants dd {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.price-variants li > div b,
.price-variants li > div span {
  display: block;
}

.price-variants li > div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.58rem;
}

/* Source ledger and navigation */
.source-ledger {
  margin-top: clamp(28px, 4vw, 50px);
  padding: clamp(22px, 3vw, 34px);
}

.source-grid,
.source-ledger > div:not(.section-heading) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
}

.source-category {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.source-category ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-category li {
  min-width: 0;
}

.source-category > h3,
.source-category > b,
.source-category > div:first-child {
  margin-bottom: 9px;
  color: var(--ink);
}

.source-link,
.source-ledger a,
.external-link,
.external-links a,
.source-list a {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.64rem;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.source-link::after,
.source-ledger a::after,
.external-link::after,
.external-links a::after,
.source-list a::after {
  flex: 0 0 auto;
  color: var(--blue);
  content: "\2197";
  font-family: var(--display);
}

.source-link:hover,
.source-link:focus-visible,
.source-ledger a:hover,
.source-ledger a:focus-visible,
.external-link:hover,
.external-link:focus-visible,
.external-links a:hover,
.external-links a:focus-visible,
.source-list a:hover,
.source-list a:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(118, 199, 255, 0.05);
}

.source-category small,
.source-category p {
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.6;
}

.source-link > span {
  min-width: 0;
}

.source-link > small {
  flex: 0 0 auto;
  text-align: right;
}

.external-links,
.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 0;
  padding: 1px;
  list-style: none;
  background: var(--line);
}

.external-links li,
.source-list li {
  min-width: 0;
  background: var(--panel);
}

.external-links a,
.source-list a {
  min-height: 62px;
  margin: 0;
  border: 0;
  background: transparent;
}

.notice-box,
.disclaimer {
  position: relative;
  margin-top: clamp(30px, 5vw, 54px);
  padding: clamp(22px, 3.5vw, 34px) clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
  color: var(--muted);
  background: var(--warning-bg);
  font-size: 0.76rem;
  line-height: 1.8;
}

.notice-box strong,
.disclaimer strong {
  color: var(--ink);
}

.about-section ul:not(.external-links):not(.source-list) {
  max-width: var(--measure);
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.about-section ul:not(.external-links):not(.source-list) li {
  position: relative;
  padding: 15px 0 15px 27px;
  border-top: 1px solid var(--line);
}

.about-section ul:not(.external-links):not(.source-list) li::before {
  position: absolute;
  top: 26px;
  left: 2px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--acid);
  content: "";
  transform: rotate(45deg);
}

.about-section ul:not(.external-links):not(.source-list) li:last-child {
  border-bottom: 1px solid var(--line);
}

.adjacent-spots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(38px, 6vw, 70px);
}

.adjacent-link {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 20px 23px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.adjacent-link:last-child {
  text-align: right;
}

.adjacent-link:hover,
.adjacent-link:focus-visible {
  border-color: var(--acid);
  color: var(--acid);
  background: rgba(187, 255, 56, 0.04);
}

.adjacent-link small {
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.detail-closing {
  padding-top: clamp(28px, 4vw, 48px);
}

/* Legacy fact layouts retained for index/About safety */
.fact-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1.5fr);
  gap: clamp(32px, 6vw, 92px);
  align-items: start;
}

.fact-section > h2,
.fact-section > h3 {
  position: sticky;
  top: 24px;
  margin: 0;
}

.ev-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

.ev-card {
  min-width: 0;
  min-height: 170px;
  padding: clamp(21px, 3vw, 31px);
  background: var(--panel);
}

.ev-card > :first-child {
  margin-top: 0;
}

.ev-card > :last-child {
  margin-bottom: 0;
}

.ev-card h3,
.ev-card h4 {
  margin: 0 0 30px;
  color: var(--blue);
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.ev-card p {
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer,
.detail-footer {
  width: var(--page);
  margin: clamp(52px, 8vw, 106px) auto 0;
  padding: 34px 0 42px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: end;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
}

.footer-mark {
  color: var(--ink);
  font-size: 1rem;
}

.footer-note {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  text-align: center;
}

.footer-note-copy {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: center;
}

.footer-links a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--acid);
}

.footer-copy {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

/* Search dashboard */
.dashboard-page {
  background:
    linear-gradient(90deg, transparent 0 49.95%, rgba(187, 255, 56, 0.018) 50%, transparent 50.05%),
    radial-gradient(circle at 12% 2%, rgba(118, 199, 255, 0.09), transparent 31rem),
    radial-gradient(circle at 82% 5%, rgba(187, 255, 56, 0.075), transparent 32rem),
    var(--paper);
}

.dashboard-hero {
  position: relative;
  min-height: 530px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 32px;
  align-items: start;
  padding: clamp(72px, 9vw, 128px) 0;
  overflow: hidden;
}

.dashboard-hero__copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.dashboard-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1.9rem, 4.2vw + 0.5rem, 4.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-wrap: balance;
  overflow-wrap: normal;
}

.dashboard-hero .hero-summary {
  max-width: 40rem;
  margin-top: 32px;
  margin-left: clamp(0px, 5vw, 76px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
}

.button-link {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(16, 24, 22, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.button-link:hover,
.button-link:focus-visible {
  border-color: var(--acid);
  color: var(--acid);
}

.button-link--primary {
  border-color: var(--acid);
  color: var(--paper);
  background: var(--acid);
}

.button-link--primary:hover,
.button-link--primary:focus-visible {
  color: var(--paper);
  background: #d2ff78;
}

.dashboard-stats {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
  background: rgba(8, 13, 12, 0.8);
  box-shadow: var(--shadow);
}

.hero-stat {
  min-width: 0;
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 16px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-stat:nth-child(4n) {
  border-right: 0;
}

.hero-stat:nth-child(n + 5) {
  border-bottom: 0;
}

.hero-stat strong {
  color: var(--acid);
  font-family: var(--display);
  font-size: clamp(2rem, 3.4vw, 3.8rem);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
}

.hero-stat:nth-child(4n + 2) strong {
  color: var(--blue);
}

.hero-stat:nth-child(4n + 3) strong {
  color: var(--orange);
}

.hero-stat span {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.35;
}

.decision-bar {
  padding: 42px 0 36px;
}

.decision-bar__heading {
  display: flex;
  gap: 32px;
  align-items: end;
  justify-content: space-between;
}

.decision-bar__heading h2,
.trip-planner h2,
.origin-panel h2,
.dashboard-filters h2,
.results-toolbar h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 2.45rem);
  line-height: 1.15;
}

.decision-bar__heading > p {
  max-width: 44ch;
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.dashboard-tabs,
.quick-modes {
  display: flex;
  gap: 6px;
  margin-top: 25px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.dashboard-tab,
.quick-mode {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(16, 24, 22, 0.72);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.dashboard-tab:hover,
.quick-mode:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.dashboard-tab.is-active {
  color: var(--paper);
  border-color: var(--acid);
  background: var(--acid);
}

.tab-count {
  min-width: 20px;
  display: inline-grid;
  place-items: center;
  margin-left: 5px;
  padding: 1px 5px;
  border: 1px solid currentColor;
  font-family: var(--display);
  font-size: 0.72rem;
}

.quick-modes {
  margin-top: 8px;
}

.quick-mode {
  min-height: 35px;
  padding: 6px 11px;
  border-style: dashed;
  font-size: 0.64rem;
}

.quick-mode.is-active {
  color: var(--acid);
  border-color: var(--acid);
  border-style: solid;
  background: rgba(187, 255, 56, 0.08);
}

.journey-console {
  padding: 34px 0;
}

.journey-console__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
  align-items: stretch;
}

.trip-planner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  align-content: space-between;
  padding: 30px clamp(20px, 3vw, 40px);
  border: 1px solid var(--line-strong) !important;
  background:
    linear-gradient(112deg, rgba(187, 255, 56, 0.065), transparent 42%),
    rgba(16, 24, 22, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.trip-planner__intro > p:last-child {
  max-width: 44ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.trip-planner__controls {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: end;
}

.origin-panel {
  min-width: 0;
  padding: 30px clamp(20px, 3vw, 40px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(118deg, rgba(118, 199, 255, 0.075), transparent 48%),
    rgba(16, 24, 22, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.origin-panel__header {
  display: flex;
  gap: 22px;
  align-items: start;
  justify-content: space-between;
}

.origin-readout {
  min-width: min(220px, 48%);
  padding: 10px 12px;
  border-left: 2px solid var(--blue);
  background: rgba(0, 0, 0, 0.2);
}

.origin-readout span,
.origin-search__label,
.ev-field > span,
.ev-options legend {
  display: block;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.65rem;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.origin-readout strong {
  display: block;
  margin-top: 3px;
  color: var(--blue);
  font-size: 0.83rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.origin-search {
  position: relative;
  margin-top: 22px;
}

.origin-search__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 7px;
}

.origin-search input,
.ev-field input,
.ev-field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  background: #0b1210;
}

.origin-search__row button,
.origin-actions button,
.view-toggle button,
.map-popup__origin {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: #0b1210;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.origin-search__row button {
  color: var(--paper);
  border-color: var(--blue);
  background: var(--blue);
}

.origin-candidates {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 50;
  max-height: 260px;
  margin: 2px 0 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: #0b1210;
  box-shadow: var(--shadow);
  list-style: none;
  overflow-y: auto;
}

.origin-candidates button {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-size: 0.71rem;
  text-align: left;
  cursor: pointer;
}

.origin-candidates button:hover,
.origin-candidates button:focus-visible {
  color: var(--paper);
  background: var(--blue);
}

.origin-message {
  min-height: 1.5em;
  margin: 7px 0 0;
  color: var(--yellow);
  font-size: 0.67rem;
}

.origin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.origin-actions button:hover,
.origin-actions button:focus-visible,
.origin-actions button[aria-pressed="true"] {
  color: var(--blue);
  border-color: var(--blue);
  background: rgba(118, 199, 255, 0.075);
}

.origin-privacy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.64rem;
}

.origin-privacy::before {
  margin-right: 6px;
  color: var(--blue);
  content: "●";
}

.ev-range-panel {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.ev-range-panel > summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.ev-range-panel > summary::-webkit-details-marker {
  display: none;
}

.ev-range-panel > summary b,
.ev-range-panel > summary small {
  display: block;
}

.ev-range-panel > summary b {
  font-size: 0.78rem;
}

.ev-range-panel > summary small {
  margin-top: 2px;
  color: var(--acid);
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.ev-range-panel > summary > span:last-child {
  color: var(--acid);
  font-family: var(--display);
  font-size: 1.4rem;
  transition: transform 160ms ease;
}

.ev-range-panel[open] > summary > span:last-child {
  transform: rotate(45deg);
}

.ev-range-panel__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 0 4px;
  border-top: 1px dashed var(--line);
}

.ev-field--wide,
.ev-options,
.ev-range-result,
.ev-reachable-filter,
.ev-disclaimer {
  grid-column: 1 / -1;
}

.ev-field > span {
  margin-bottom: 6px;
}

.ev-field output {
  float: right;
  color: var(--acid);
}

.ev-field input[type="range"] {
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  accent-color: var(--acid);
}

.ev-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.ev-options legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.ev-range-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 12px;
  align-items: baseline;
  margin: 2px 0 0;
  padding: 11px 12px;
  border: 1px solid rgba(187, 255, 56, 0.35);
  background: rgba(187, 255, 56, 0.045);
}

.ev-range-result span,
.ev-range-result small {
  color: var(--muted);
  font-size: 0.65rem;
}

.ev-range-result strong {
  color: var(--acid);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
}

.ev-range-result small {
  grid-column: 1 / -1;
}

.ev-reachable-filter .filter-check {
  border-color: rgba(118, 199, 255, 0.35);
}

.ev-disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.55;
}

.planner-party,
.planner-extras {
  min-width: 0;
}

.planner-party > span,
.planner-extras legend,
.filter-field > span,
.filter-checks legend,
.sort-control > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.69rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.planner-party select,
.filter-field input,
.filter-field select,
.sort-control select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  background: #0b1210;
}

.dashboard-filters :disabled,
.sort-control select:disabled,
.quick-mode:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.filter-field.is-disabled,
.filter-check.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.station-filter-note {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(99, 210, 190, 0.28);
  color: var(--muted);
  background: rgba(99, 210, 190, 0.06);
  font-size: 0.68rem;
  line-height: 1.65;
}

.planner-extras,
.filter-checks {
  margin: 0;
  padding: 0;
  border: 0;
}

.planner-extras {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.planner-extras legend {
  grid-column: 1 / -1;
}

.filter-check {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: #cbd5cf;
  background: rgba(0, 0, 0, 0.16);
  font-size: 0.71rem;
  line-height: 1.35;
  cursor: pointer;
}

.filter-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.filter-check__mark {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.filter-check input:checked + .filter-check__mark {
  border-color: var(--acid);
  background:
    linear-gradient(135deg, transparent 0 38%, var(--paper) 39% 53%, transparent 54%),
    var(--acid);
}

.filter-check:has(input:checked) {
  border-color: rgba(187, 255, 56, 0.48);
  color: var(--ink);
  background: rgba(187, 255, 56, 0.055);
}

.filter-check input:focus-visible + .filter-check__mark {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.dashboard-workspace {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: clamp(58px, 8vw, 104px) 0;
}

.filter-drawer-toggle {
  display: none;
}

.dashboard-filters {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  padding: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(12, 19, 17, 0.97);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.filter-heading {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.filter-heading .section-label,
.results-toolbar .section-label,
.trip-planner .section-label,
.decision-bar .section-label {
  margin-bottom: 7px;
}

.filter-heading button {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-size: 0.62rem;
  cursor: pointer;
}

.filter-heading button:hover {
  color: var(--acid);
  border-color: var(--acid);
}

.filter-heading__actions {
  display: flex;
  gap: 5px;
}

.filter-drawer-close {
  display: none;
}

.filter-fields,
.filter-checks {
  display: grid;
  gap: 11px;
}

.filter-field input::placeholder {
  color: var(--dim);
}

.filter-checks {
  margin-top: 20px;
  gap: 5px;
}

.dashboard-results {
  min-width: 0;
}

.results-toolbar {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 17px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.results-toolbar__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  justify-content: flex-end;
}

.view-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(64px, 1fr));
}

.view-toggle button {
  min-height: 42px;
  margin-left: -1px;
}

.view-toggle button:first-child {
  margin-left: 0;
}

.view-toggle button:hover,
.view-toggle button:focus-visible {
  color: var(--acid);
  border-color: var(--acid);
  z-index: 1;
}

.view-toggle button.is-active {
  color: var(--paper);
  border-color: var(--acid);
  background: var(--acid);
}

.view-toggle button:disabled {
  cursor: wait;
  opacity: 0.48;
}

.sc-layer-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: #0b1210;
  font-size: 0.67rem;
  cursor: pointer;
}

.sc-layer-toggle input {
  accent-color: var(--blue);
}

.sc-layer-toggle:has(input:checked) {
  color: var(--blue);
  border-color: var(--blue);
}

.results-toolbar h2 span {
  color: var(--acid);
  font-family: var(--display);
  font-size: 1.35em;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.results-toolbar p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.sort-control {
  width: min(230px, 42%);
  flex: 0 0 auto;
}

.results-toolbar__controls .sort-control {
  width: 220px;
}

.active-filters {
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 13px;
}

.active-filter {
  padding: 4px 8px;
  border: 1px solid rgba(118, 199, 255, 0.4);
  color: var(--blue);
  background: rgba(118, 199, 255, 0.055);
  font-size: 0.62rem;
}

.dashboard-card-grid[aria-busy="true"] {
  display: block;
}

.dashboard-loading {
  margin: 0;
  padding: 48px 24px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
}

.results-map-wrap {
  position: relative;
  border: 1px solid var(--line-strong);
  background: #dbe4df;
}

.results-map {
  width: 100%;
  height: clamp(480px, 68vh, 760px);
  min-height: 480px;
}

.results-map.is-picking-origin,
.results-map.is-picking-origin .leaflet-interactive {
  cursor: crosshair !important;
}

.map-pick-notice {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 500;
  width: max-content;
  max-width: calc(100% - 104px);
  margin: 0;
  padding: 8px 12px;
  color: var(--paper);
  background: rgba(10, 16, 15, 0.92);
  border: 1px solid var(--acid);
  font-size: 0.68rem;
  text-align: center;
  transform: translateX(-50%);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 10px 12px;
  color: #28312d;
  background: #edf2ef;
  font-size: 0.61rem;
  line-height: 1.4;
}

.map-legend span::before {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  content: "";
  background: currentColor;
}

.map-legend .ev-consumption::before {
  background: var(--legend-color);
}

.map-legend .is-acid { color: #60880f; }
.map-legend .is-yellow { color: #a87d00; }
.map-legend .is-orange { color: #cf4d2a; }
.map-legend .is-dim { color: #69736e; }
.map-legend .is-blue { color: #176f9f; }

.leaflet-container {
  font-family: var(--body);
}

.leaflet-control-attribution {
  color: #48534e;
  font-size: 10px;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  color: #17201d;
  background: #f4f7f5;
  border-radius: 0;
}

.leaflet-popup-content-wrapper {
  border: 1px solid #8a9790;
  box-shadow: 0 16px 34px rgba(7, 13, 11, 0.22);
}

.map-popup {
  min-width: 180px;
  display: grid;
  gap: 5px;
}

.map-popup__title {
  font-size: 0.8rem;
  line-height: 1.45;
}

.map-popup__place,
.map-popup__metrics {
  color: #536159;
  font-size: 0.65rem;
  line-height: 1.45;
}

.map-popup__link {
  width: fit-content;
  margin-top: 3px;
  color: #3e6500;
  font-size: 0.67rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

.map-popup__origin {
  width: 100%;
  min-height: 36px;
  margin-top: 5px;
  color: #fff;
  border-color: var(--blue-solid);
  background: var(--blue-solid);
}

.card__controls {
  display: grid;
  gap: 7px;
  justify-items: end;
}

.card-save {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: #0b1210;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.card-save:hover,
.card-save:focus-visible,
.card-save.is-saved {
  color: var(--yellow);
  border-color: var(--yellow);
}

.card-save:active {
  transform: scale(0.92);
}

.card-amenity img {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  filter: invert(88%) sepia(6%) saturate(255%) hue-rotate(95deg) brightness(98%);
}

.card-amenity.available img {
  filter: invert(75%) sepia(36%) saturate(716%) hue-rotate(170deg) brightness(105%);
}

.cost-metric.is-unresolved b {
  color: var(--yellow);
}

.load-more {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border: 1px solid var(--acid);
  color: var(--acid);
  background: rgba(187, 255, 56, 0.04);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.load-more:hover,
.load-more:focus-visible {
  color: var(--paper);
  background: var(--acid);
}

.is-supercharger-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.supercharger-card {
  min-width: 0;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(118, 199, 255, 0.055), transparent 48%),
    linear-gradient(145deg, rgba(21, 31, 28, 0.96), rgba(11, 17, 15, 0.99));
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
  animation: card-in 420ms both;
}

.supercharger-card:hover,
.supercharger-card:focus-within {
  border-color: var(--blue);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  transform: translateY(-3px);
}

.supercharger-card__top {
  min-height: 58px;
  display: flex;
  gap: 8px;
  align-items: start;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.stay-mode-badge.is-supercharger {
  border-color: rgba(118, 199, 255, 0.52);
  color: var(--blue);
  background: rgba(118, 199, 255, 0.07);
}

.supercharger-card > .spot-card__heading,
.supercharger-card > .spot-card__location,
.supercharger-card__facility,
.supercharger-card > .metrics {
  margin-right: 15px;
  margin-left: 15px;
}

.supercharger-card > .spot-card__heading {
  margin-top: 18px;
}

.supercharger-card__facility {
  margin-top: 3px;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.supercharger-card > .metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: auto;
  margin-bottom: 15px;
}

.supercharger-card > .card__action {
  margin-top: auto;
}

.dashboard-fallback[hidden] {
  display: none;
}

@media (max-width: 1120px) {
  :root {
    --page: min(100% - 38px, 1040px);
  }

  .prefecture-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .spot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 16px;
  }

  .is-supercharger-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-scoreboard {
    max-width: 820px;
  }
}

@media (max-width: 1099px) {
  .dashboard-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 54px;
  }

  .dashboard-hero .hero-summary {
    margin-left: 0;
  }

  .dashboard-stats {
    max-width: 760px;
  }
}

@media (max-width: 980px) {
  .guide-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-hero::after {
    display: none;
  }

  .journey-console__grid,
  .trip-planner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .detail-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .cost-builder {
    position: static;
  }

  .fact-section {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .fact-section > h2,
  .fact-section > h3 {
    position: static;
  }

  .ev-grid {
    grid-template-columns: 1fr;
  }

  .ev-card {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  :root {
    --page: calc(100% - 28px);
  }

  .site-header {
    min-height: 70px;
  }

  .wordmark {
    font-size: 0.92rem;
  }

  .primary-nav {
    gap: 13px;
  }

  .primary-nav a {
    font-size: 0.74rem;
    letter-spacing: 0.05em;
  }

  .guide-hero {
    min-height: 0;
    padding: 52px 0 60px;
  }

  .dashboard-hero {
    min-height: 0;
    padding: 58px 0 62px;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stat {
    min-height: 106px;
  }

  .hero-stat:nth-child(2n) {
    border-right: 0;
  }

  .hero-stat:nth-child(5),
  .hero-stat:nth-child(6) {
    border-bottom: 1px solid var(--line);
  }

  .decision-bar {
    padding: 34px 0 30px;
  }

  .decision-bar__heading,
  .results-toolbar {
    display: grid;
    gap: 14px;
    align-items: start;
  }

  .results-toolbar__controls {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-tabs,
  .quick-modes {
    margin-right: -14px;
    padding-right: 14px;
  }

  .journey-console {
    margin-right: -14px;
    margin-left: -14px;
    padding: 28px 0;
  }

  .journey-console__grid {
    gap: 8px;
  }

  .trip-planner,
  .origin-panel {
    padding: 28px 14px;
    border-right: 0 !important;
    border-left: 0 !important;
  }

  .trip-planner__controls {
    grid-template-columns: 1fr;
  }

  .planner-extras {
    grid-template-columns: 1fr;
  }

  .origin-panel__header {
    display: grid;
    gap: 13px;
  }

  .origin-readout {
    width: 100%;
    min-width: 0;
  }

  .dashboard-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 58px 0;
  }

  .filter-drawer-toggle {
    position: sticky;
    top: 8px;
    z-index: 30;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--acid);
    color: var(--paper);
    background: var(--acid);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  }

  .dashboard-filters {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 80;
    width: min(88vw, 390px);
    max-height: none;
    padding: 24px 18px 44px;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    visibility: hidden;
    transform: translateX(105%);
    transition: transform 190ms ease, visibility 190ms ease;
  }

  .dashboard-filters.is-open {
    visibility: visible;
    transform: translateX(0);
  }

  .filter-drawer-close {
    display: inline-flex;
    align-items: center;
  }

  .sort-control {
    width: 100%;
  }

  .results-toolbar__controls .sort-control {
    width: 100%;
  }

  .view-toggle {
    flex: 1 1 150px;
  }

  .sc-layer-toggle {
    flex: 1 1 auto;
    justify-content: center;
  }

  .results-map {
    height: 62vh;
    min-height: 420px;
  }

  .is-supercharger-grid {
    grid-template-columns: 1fr;
  }

  .hero-summary,
  .hero-meta {
    margin-left: 0;
  }

  .guide-intro,
  .prefecture-directory,
  .spot-list-section,
  .fact-section,
  .about-section {
    padding: 58px 0;
  }

  .mode-grid,
  .spot-grid,
  .external-links,
  .source-list,
  .adjacent-spots {
    grid-template-columns: 1fr;
  }

  .prefecture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spot-card {
    min-height: 0;
  }

  .section-heading {
    display: grid;
    gap: 7px;
    align-items: start;
  }

  .section-heading p {
    justify-self: start;
  }

  .detail-hero {
    padding-top: 46px;
  }

  .detail-scoreboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .score-cell {
    min-height: 108px;
    padding: 12px;
  }

  .listing-status-row {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .listing-status-row > .badge-row {
    justify-content: flex-start;
  }

  .listing-status-meta {
    justify-content: flex-start;
  }

  .facility-sheet,
  .score-panel,
  .score-method-panel,
  .source-ledger {
    padding: 20px 14px;
  }

  .amenity-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .amenity-tile {
    min-height: 116px;
    padding: 11px;
  }

  .amenity-tile svg {
    width: 27px;
    height: 27px;
  }

  .evidence-grid,
  .condition-matrix__grid,
  .score-axis-list,
  .source-grid,
  .source-ledger > div:not(.section-heading) {
    grid-template-columns: 1fr;
  }

  .condition-table,
  .facts-table,
  .equipment-table {
    min-width: 620px;
  }

  .cost-builder__top {
    align-items: center;
  }

  .adjacent-link:last-child {
    text-align: left;
  }

  .site-footer,
  .detail-footer {
    grid-template-columns: 1fr auto;
    gap: 18px;
  }

  .footer-note {
    grid-column: 1 / -1;
    grid-row: 2;
    align-items: flex-start;
    text-align: left;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 500px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 11px 0 9px;
  }

  .primary-nav {
    justify-content: flex-start;
  }

  .guide-hero {
    padding-top: 42px;
  }

  .dashboard-hero {
    padding-top: 46px;
  }

  .title-segment {
    white-space: normal;
  }

  .content-panel,
  .mode-card,
  .ev-card {
    padding: 22px 18px;
  }

  .origin-search__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .origin-search__row button {
    width: 100%;
  }

  .origin-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .origin-actions button:last-child {
    grid-column: 1 / -1;
  }

  .ev-range-panel__body,
  .ev-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .ev-options legend,
  .ev-field--wide,
  .ev-options,
  .ev-range-result,
  .ev-reachable-filter,
  .ev-disclaimer {
    grid-column: 1;
  }

  .results-map {
    height: 58vh;
    min-height: 380px;
  }

  .map-pick-notice {
    top: 54px;
    max-width: calc(100% - 28px);
  }

  .detail-map {
    min-height: 300px;
  }

  .prefecture-grid {
    grid-template-columns: 1fr;
  }

  .amenity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .amenity-tile {
    min-height: 112px;
  }

  .fact-list {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .cost-builder__top {
    padding: 18px;
  }

  .option-list {
    padding: 0 18px;
  }

  .cost-option {
    grid-template-columns: minmax(0, 1fr) 102px;
  }

  .base-cost-row,
  .cost-breakdown {
    padding-right: 18px;
    padding-left: 18px;
  }

  .grand-total,
  .unresolved-notice,
  .cost-notes,
  .price-variants {
    margin-right: 18px;
    margin-left: 18px;
  }

  .calculator-caveat {
    margin-right: 18px;
    margin-left: 18px;
  }

  .notice-box,
  .disclaimer {
    padding: 20px 18px;
  }

  .detail-nav {
    grid-template-columns: 1fr auto;
  }

  .detail-nav > :nth-child(2) {
    display: none;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }

  .detail-actions a {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-actions a:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .status-badge,
  .amenity-tile,
  .amenity-chip,
  .critical-notice,
  .status-dot,
  .fact-status,
  .warning-band,
  .notice-box,
  .disclaimer {
    forced-color-adjust: auto;
  }
}
