/* All Trips Considered: shared page styles. */
/* Instrument Serif, self-hosted (SIL Open Font License: assets/fonts/OFL.txt). Same subsets Google Fonts serves. */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-v5-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-v5-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1c2330;
  --muted: #5d6676;
  --border: #dde1e7;
  --primary: var(--scheme-primary, #006643);
  --primary-text: #ffffff;
  --brand-link: var(--scheme-link, #006643);
  --accent: #00acec; /* Frontier sky blue: decorative only, too light for text */
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151b;
    --surface: #1b2029;
    --text: #e8ebf0;
    --muted: #9aa3b2;
    --border: #2c3340;
    --primary: var(--scheme-primary-dark, #308367);
    --brand-link: var(--scheme-link-dark, #80b3a1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12151b;
  --surface: #1b2029;
  --text: #e8ebf0;
  --muted: #9aa3b2;
  --border: #2c3340;
  --primary: var(--scheme-primary-dark, #308367);
  --brand-link: var(--scheme-link-dark, #80b3a1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.container {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding-block: 32px 96px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Brand line: "All Trips Considered" in Instrument Serif, brand blue */
.brand {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 2.8125rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 6px;
}
.brand, .page-header h1 { text-align: center; text-wrap: balance; }
.brand a, .copyright a {
  color: var(--brand-link);
  text-decoration: none;
  border-radius: 4px;
}
.brand a:focus-visible, .copyright a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1 { font-size: 1.5rem; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 0; }
.lede { color: var(--muted); margin: 0 0 24px; text-align: center; text-wrap: balance; }
#page-title:focus { outline: none; }

/* Appearance button, upper right */
.top-controls {
  position: absolute;
  top: 16px;
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 30;
  display: flex;
  gap: 8px;
}
.theme-toggle {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.theme-toggle svg { fill: currentColor; stroke: currentColor; }

/* Appearance panel: mode and color scheme */
.appearance-wrap { position: relative; }
.appearance-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 300px;
  max-width: calc(100vw - 32px);
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  text-align: start;
}
.appearance-title { font-size: 1rem; margin: 0 0 12px; }
.appearance-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.appearance-group + .appearance-group { margin-top: 16px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--border); }
.appearance-group legend { float: left; width: 100%; padding: 0; margin-bottom: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.appearance-group legend + * { clear: both; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--bg); border-radius: 10px; }
.segmented label { position: relative; }
.segmented input, .scheme-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: grid; place-items: center; min-height: 36px; border-radius: 7px; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
.mode-hint { margin: 8px 2px 0; font-size: .82rem; color: var(--muted); }
.scheme-list { max-height: min(300px, 45vh); overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.scheme-subhead { margin: 10px 8px 4px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.scheme-subhead:first-child { margin-top: 0; }
.scheme-option { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.scheme-option:hover { background: var(--bg); }
.scheme-option:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--primary); }
.scheme-option:has(input:checked) { background: var(--bg); }
.scheme-flag { font-size: 1.15rem; line-height: 1; }
.scheme-name { flex: 1; font-size: .95rem; }
.scheme-option input:checked ~ .scheme-name { font-weight: 700; }
.scheme-now { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.scheme-check { width: 16px; color: var(--primary); font-weight: 700; visibility: hidden; }
.scheme-option input:checked ~ .scheme-check { visibility: visible; }
.scheme-swatch { display: flex; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px var(--border); }
.scheme-swatch i { width: 9px; height: 14px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-footer { margin-top: 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.hint { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }

.btn {
  font: inherit; font-weight: 600;
  border-radius: 8px; padding: 8px 14px; min-height: 40px;
  cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Footer: disclaimer, 75px app icon, serif copyright */
.disclaimer { color: var(--muted); font-size: .85rem; }
.disclaimer p { margin: 0 0 6px; }
.rules-note { margin-top: 12px !important; }
.footer-links { margin-top: 12px !important; text-align: center; }
.footer-links a { color: var(--brand-link); font-weight: 600; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-icon { display: block; width: 75px; height: 75px; margin: 24px auto 0; }
.copyright {
  margin-top: 1.5em !important;
  text-align: center;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
}

/* Travel Tools: links to other All Trips Considered tools.
   Wider screens: a row of buttons (name, then icon).
   Phones: a list, one tool per row (icon, name, arrow). */
.quick-links { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; }
.quick-links h2 { margin: 0 0 12px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.quick-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.quick-links a {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  color: var(--text); font-size: .9rem; font-weight: 600; text-decoration: none;
}
.quick-links .ql-icon { order: 2; }
.quick-links .ql-arrow { display: none; }
.quick-links a:hover { border-color: var(--brand-link); color: var(--brand-link); }
.quick-links a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.quick-links a[aria-current="page"] { border-color: var(--brand-link); color: var(--brand-link); }
@media (max-width: 600px) {
  .quick-links ul { display: block; max-width: 420px; margin: 0 auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; text-align: left; }
  .quick-links li + li { border-top: 1px solid var(--border); }
  .quick-links a { display: flex; gap: 12px; height: 48px; border: 0; border-radius: 0; background: transparent; font-size: .95rem; }
  .quick-links .ql-icon { order: 0; width: 1.4em; text-align: center; }
  .quick-links .ql-arrow { display: inline; margin-left: auto; color: var(--muted); font-size: 1.1rem; }
  .quick-links a[aria-current="page"] .ql-arrow { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
  .quick-links a:hover { background: var(--bg); }
  .quick-links a:focus-visible { outline-offset: -2px; }
  .quick-links .ql-name, .quick-links .ql-arrow { white-space: nowrap; }
}
/* Very narrow phones: a check mark instead of "You are here" keeps one line per row. */
@media (max-width: 360px) {
  .quick-links a[aria-current="page"] .ql-arrow { font-size: 0; }
  .quick-links a[aria-current="page"] .ql-arrow::after { content: "\2713"; font-size: 1rem; letter-spacing: 0; }
}

/* Back to top, lower right */
.back-to-top {
  position: fixed;
  right: max(20px, calc(env(safe-area-inset-right, 0px) + 16px));
  bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  z-index: 15;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 999px;
  background: var(--primary); color: var(--primary-text);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  cursor: pointer;
}
.back-to-top:hover { filter: brightness(1.08); }
.back-to-top:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
body.has-install-banner .back-to-top { bottom: calc(var(--install-banner-height, 150px) + 16px); }

/* Add to Home Screen banner */
.install-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .12);
  padding-top: 14px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.install-icon { width: 48px; height: 48px; border-radius: 11px; flex: none; }
.install-text { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; font-size: .95rem; }
.install-text span { color: var(--muted); }
.install-actions { display: flex; gap: 8px; margin-left: auto; }
.share-glyph {
  display: inline-block; width: 14px; height: 17px; vertical-align: -2px;
  background: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 17'%3E%3Cpath d='M7 0l3.5 3.5-1 1L7.7 2.7V11H6.3V2.7L4.5 4.5l-1-1z'/%3E%3Cpath d='M1 6h3.5v1.4H2.4v8.2h9.2V7.4H9.5V6H13v11H1z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 17'%3E%3Cpath d='M7 0l3.5 3.5-1 1L7.7 2.7V11H6.3V2.7L4.5 4.5l-1-1z'/%3E%3Cpath d='M1 6h3.5v1.4H2.4v8.2h9.2V7.4H9.5V6H13v11H1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.has-install-banner { padding-bottom: var(--install-banner-height, 140px); }

@media (max-width: 680px) {
  .container { padding-top: 68px; }
  .top-controls { top: 14px; }
  .brand { font-size: 2.375rem; }
}
@media (max-width: 600px) {
  .card { padding: 16px; }
  .disclaimer { font-size: .9rem; }
  .card-footer .btn { flex: 1; }
}

/* GoWild! Pass guide */
.card h3 { font-size: 1rem; margin: 18px 0 6px; }
.rule-list { margin: 0; padding-left: 1.2em; }
.rule-list li + li { margin-top: 6px; }
.card a { color: var(--brand-link); }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.pass-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pass-table th, .pass-table td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); }
.pass-table thead th { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pass-table tbody th { white-space: nowrap; }
.peak-list { margin: 12px 0 0; }
.peak-list dt { font-weight: 700; margin-top: 12px; }
.peak-list dd { margin: 4px 0 0; }
@media (max-width: 600px) {
  .pass-table thead { display: none; }
  .pass-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .pass-table th, .pass-table td { display: block; padding: 2px 0; border: 0; }
}

/* Badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); font-size: .75rem; font-weight: 600; white-space: nowrap; }

/* Search and results */
.tool-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 14px 0 4px; }
.field { display: grid; gap: 4px; flex: 1 1 160px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.field input { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 1rem; font-weight: 400; }
.field input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.tool-form .btn { min-height: 44px; }
.check { display: flex; align-items: center; gap: 8px; flex-basis: 100%; font-size: .9rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.tool-status { margin: 12px 0 0; font-weight: 600; }
.tool-status:empty { display: none; }
.tool-status:focus { outline: none; }
.route-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.route-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.route-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.route-code { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.route-city { flex: 1 1 auto; }
.route-badges { display: flex; gap: 6px; }
.route-facts { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.badge-active, .badge-seasonal { border-color: var(--brand-link); color: var(--brand-link); }
.badge-ended { text-decoration: line-through; }
.link-btn { margin-top: 6px; padding: 4px 0; border: 0; background: none; color: var(--brand-link); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.busy-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.busy-high { border-color: var(--text); color: var(--text); }
.busy-low { border-color: var(--brand-link); color: var(--brand-link); }

.lf-chart { margin: 16px 0 0; }
.lf-title { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.lf-plot { position: relative; height: 190px; margin-left: 38px; }
.lf-grid, .lf-ref { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--border); }
.lf-grid-label { position: absolute; right: 100%; transform: translateY(-50%); padding-right: 6px; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lf-ref { border-top: 2px dashed var(--muted); z-index: 2; pointer-events: none; }
.lf-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; font-size: .8rem; color: var(--text); }
.lf-key-bar { width: 12px; height: 12px; border-radius: 3px; background: var(--primary); }
.lf-key-ref { width: 18px; height: 0; margin-left: 8px; border-top: 2px dashed var(--muted); }
.lf-bars { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 2px; }
.lf-col { position: relative; flex: 1 1 0; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.lf-col:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.lf-bar { width: min(70%, 28px); background: var(--primary); border-radius: 4px 4px 0 0; }
.lf-col:hover .lf-bar, .lf-col:focus .lf-bar { filter: brightness(1.15); }
.lf-empty { background: none; }
.lf-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); z-index: 3; padding: 5px 8px; border-radius: 6px; background: var(--text); color: var(--surface); font-size: .8rem; font-weight: 600; white-space: nowrap; pointer-events: none; }
.lf-axis { display: flex; gap: 2px; margin: 6px 0 0 38px; }
.lf-axis span { flex: 1 1 0; text-align: center; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.lf-table { margin-top: 14px; }
.lf-table summary { cursor: pointer; color: var(--brand-link); font-weight: 600; font-size: .9rem; }
.lf-table .pass-table td { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .lf-table .pass-table thead { display: table-header-group; }
  .lf-table .pass-table tr { display: table-row; padding: 0; }
  .lf-table .pass-table th, .lf-table .pass-table td { display: table-cell; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--border); }
  .lf-table .pass-table { font-size: .8rem; }
}

/* Route detail panel */
.route-detail { margin: 14px 0 6px; padding: 16px; border: 1px solid var(--brand-link); border-radius: var(--radius); scroll-margin-top: 16px; }
.route-detail:focus { outline: none; }
.route-detail:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.detail-head h3 { margin: 0; font-size: 1.1rem; }
.detail-head .link-btn { margin: 0 0 0 auto; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.stat { display: grid; align-content: start; gap: 2px; padding: 12px; border-radius: 10px; background: var(--bg); }
.stat-label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.stat-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .78rem; color: var(--muted); }
.stat .badge { justify-self: start; margin-top: 4px; }
.metric-tabs { grid-template-columns: repeat(4, 1fr); margin: 4px 0 0; }
.metric-tabs span { font-size: .85rem; text-align: center; padding: 0 4px; }
.link-inline { margin-right: 16px; }
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-tabs { grid-template-columns: repeat(2, 1fr); }
}


/* Single search */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-card { border-top: 4px solid var(--accent); } /* Frontier sky blue, decorative only */
.search-card .tool-form { margin-top: 0; }
.field small { font-weight: 400; }
.field-date { flex: 0 1 170px; }
.search-hint { margin-top: 10px; }
.results { scroll-margin-top: 16px; }
.results > .tool-status { margin: 0 0 12px; }
#re-results h3, .card h3:first-child { margin-top: 0; }
#re-results > h3 { margin: 16px 0 8px; }
#re-results:empty, #trip-check:empty, #book-links:empty { display: none; }
#book-links, #re-results { margin-bottom: 16px; }
.trip-card h3, .book-card h3 { font-size: 1rem; margin: 0 0 10px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-item { display: flex; gap: 10px; align-items: flex-start; }
.check-item p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.check-icon { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .8rem; font-weight: 700; border: 1.5px solid var(--border); color: var(--muted); }
.check-ok .check-icon { border-color: var(--primary); background: var(--primary); color: var(--primary-text); }
.check-warn .check-icon { border-color: var(--text); background: var(--text); color: var(--surface); }
.book-card p { margin: 0 0 12px; }
.book-links { display: flex; flex-wrap: wrap; gap: 8px; }
.book-links .btn { display: inline-flex; align-items: center; text-decoration: none; }
.rules-card h2 { margin-bottom: 8px; }
.rules-section { border-top: 1px solid var(--border); }
.rules-section summary { padding: 14px 0; font-weight: 700; cursor: pointer; color: var(--text); }
.rules-section summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.rules-section[open] { padding-bottom: 14px; }
.rules-section > h3:first-of-type { margin-top: 4px; }
.data-note { text-align: center; margin: 0 0 20px; }
.route-detail, .route-item { background: var(--surface); }
.book-links .btn-primary { color: var(--primary-text); }
.book-links .btn-ghost { color: var(--brand-link); }

/* Searchable airport boxes (adapted from points-calculator) */
.field > label { display: block; }
.combo { position: relative; }
.combo-input { padding-right: 40px; }
.combo-input.has-clear { padding-right: 70px; }
.combo-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer;
}
.combo-toggle:hover { color: var(--text); background: var(--border); }
.combo-input[aria-expanded="true"] ~ .combo-toggle svg { transform: rotate(180deg); }
.combo-clear {
  position: absolute; top: 50%; right: 36px; transform: translateY(-50%);
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer;
}
.combo-clear[hidden] { display: none; }
.combo-clear:hover { color: var(--text); background: var(--border); }
.combo-clear:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  min-width: 260px; max-height: 320px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none;
  background: var(--surface); color: var(--text); font-size: .95rem; font-weight: 400;
  border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.combo-list[hidden] { display: none; }
.combo-list [role="option"] { display: flex; align-items: center; gap: 10px; padding: 7px 12px; cursor: pointer; }
.combo-list [role="option"]:hover, .combo-list [role="option"].active { background: var(--primary); color: var(--primary-text); }
.combo-list [role="option"].active .airport-name, .combo-list [role="option"]:hover .airport-name { color: inherit; }
.airport-code { flex: none; width: 3.2em; font-weight: 700; font-variant-numeric: tabular-nums; }
.airport-text { display: grid; min-width: 0; flex: 1; }
.airport-place, .airport-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.airport-name { font-size: .8rem; color: var(--muted); }
.combo-empty { padding: 10px 12px; color: var(--muted); }

/* Flights by weekday */
.day-table { margin: 0 0 14px; }
.day-table h4 { margin: 0 0 6px; font-size: .9rem; }
.day-table .hint { margin-top: 6px; font-size: .8rem; }
.days { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.days th, .days td { padding: 6px 4px; text-align: center; border-bottom: 1px solid var(--border); }
.days thead th { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.days tbody th { text-align: left; white-space: nowrap; font-weight: 600; padding-right: 10px; }
.days td.full { font-weight: 600; }
.days td.none { color: var(--muted); }
.days td.some { color: var(--text); }
.days .is-day { background: var(--bg); box-shadow: inset 0 -2px 0 var(--primary); }
.days thead .is-day { color: var(--text); }
@media (max-width: 600px) {
  .days { font-size: .8rem; }
  .days th, .days td { padding: 6px 2px; }
}

/* Search and Clear buttons */
.form-actions { display: flex; gap: 8px; }
.form-actions .btn { min-height: 44px; }
@media (max-width: 600px) { .form-actions { flex: 1 1 100%; } .form-actions .btn-primary { flex: 1; } }
