:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --surface: #fffdf8;
  --ink: #1d2924;
  --muted: #4a5a50;
  --line: #cbcfc2;
  --accent: #214e39;
  --accent-text: #fffdf8;
  --tint: #e8eee1;
  --focus: #8a391f;
  --error: #912b26;
  --title: Georgia, 'Times New Roman', serif;
  --body: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #15211d;
  --surface: #1b2b24;
  --ink: #f2f1e8;
  --muted: #c3cdc2;
  --line: #526357;
  --accent: #b6d5bd;
  --accent-text: #12271b;
  --tint: #27382f;
  --focus: #ffc088;
  --error: #ffb9b3;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--body); }
a { color: var(--accent); text-underline-offset: .2em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.12; }
h1, h2 { font-family: var(--title); font-weight: 400; letter-spacing: -.035em; }
h1 { font-size: clamp(2.45rem, 5.2vw, 4.65rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 3.1rem); }
h3 { font-size: 1.17rem; }
p { overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
input, select, textarea {
  min-width: 0;
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: .6rem .8rem;
}
input::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; }
.tr-wrap { width: min(100% - 3rem, 1240px); margin-inline: auto; }
.tr-visually-hidden, .tr-skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.tr-skip:focus { position: fixed; z-index: 4; top: .75rem; left: .75rem; padding: .65rem 1rem; background: var(--surface); }
.tr-header { border-bottom: 1px solid var(--line); }
.tr-header-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; min-height: 76px; }
.tr-brand { display: inline-flex; gap: .5rem; align-items: center; min-height: 44px; color: var(--ink); font: 700 1.55rem/1 var(--title); text-decoration: none; }
.tr-brand img { border-radius: 8px; flex: none; }
.tr-header nav, .tr-tools, .tr-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0 1.12rem; }
.tr-header nav a, .tr-tools a, .tr-footer nav a, .tr-projects a {
  display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; color: var(--ink); font-size: .9rem; text-decoration: none;
}
.tr-header nav a:hover, .tr-header nav a[aria-current], .tr-tools a:hover, .tr-footer nav a:hover, .tr-projects a:hover { text-decoration: underline; }
.tr-tools { justify-content: flex-end; gap: 0 .7rem; }
.tr-tools a { justify-content: center; }
.tr-theme { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; }
.tr-hero, .tr-story-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: clamp(1.5rem, 5vw, 5.5rem); align-items: center; padding: 3.1rem 0 1.6rem; }
.tr-hero h1 { font-size: clamp(2.4rem, 4.6vw, 4.1rem); }
.tr-hero-text > p, .tr-story-head header p, .tr-story-head > div > p:not(.tr-meta, .tr-status), .tr-page-head p { max-width: 44rem; margin-top: 1rem; font-size: 1.1rem; color: var(--muted); }
.tr-story-head h1 { font-size: clamp(2.4rem, 4.3vw, 4rem); }
.tr-feature-photo { position: relative; }
.tr-feature-photo .tr-photo img, .tr-story-head .tr-photo img { width: 100%; height: auto; aspect-ratio: 1.2; object-fit: cover; border-radius: 6px; }
.tr-feature-label { position: absolute; bottom: 3.2rem; left: 1rem; right: 1rem; width: max-content; max-width: calc(100% - 2rem); display: flex; gap: .5rem .85rem; flex-wrap: wrap; align-items: center; border-radius: 5px; background: var(--surface); padding: .15rem 1rem; box-shadow: 0 1px 5px #0003; }
.tr-feature-label a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 650; color: var(--ink); }
.tr-feature-label span { font-size: .82rem; color: var(--muted); }
.tr-photo figcaption { padding: .18rem .2rem; color: var(--muted); font-size: .72rem; }
.tr-photo figcaption a { display: inline-flex; align-items: center; min-height: 44px; }
.tr-search { display: grid; grid-template-columns: minmax(7rem, .65fr) minmax(0, 1.35fr) auto; align-items: end; gap: .55rem; margin-top: 1.6rem; }
.tr-search label { display: grid; gap: .28rem; min-width: 0; font-size: .88rem; font-weight: 650; }
.tr-primary, .tr-secondary, .tr-chip {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  border: 1px solid var(--accent); border-radius: 6px; padding: .54rem .95rem;
  color: var(--accent-text); background: var(--accent); font-weight: 650; text-decoration: none;
}
.tr-primary:hover { filter: brightness(1.13); }
.tr-secondary, .tr-chip { background: transparent; border-color: var(--line); color: var(--accent); }
.tr-secondary:hover, .tr-chip:hover { background: var(--tint); }
.tr-chips, .tr-anchors, .tr-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.tr-chip { min-height: 44px; border-radius: 999px; padding-inline: .95rem; font-weight: 500; font-size: .9rem; }
.tr-section { margin: 2.7rem 0 3.2rem; scroll-margin-top: 1rem; }
.tr-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1.4rem; margin-bottom: 1.1rem; }
.tr-more, .tr-back { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }
.tr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.05rem; }
.tr-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.05rem; }
.tr-card, .tr-region, .tr-service { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.tr-card { overflow: hidden; }
.tr-card .tr-photo img { width: 100%; height: auto; aspect-ratio: 1.65; object-fit: cover; }
.tr-card .tr-photo figcaption { padding-inline: .95rem; border-bottom: 1px solid var(--line); }
.tr-card-text, .tr-region, .tr-service { padding: 1rem; }
.tr-card-text h3 { font: 400 1.5rem/1.15 var(--title); }
.tr-card-text h3 a, .tr-region a, .tr-service h3 a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); }
.tr-card-text > p:not(.tr-meta), .tr-region p, .tr-service p { margin-top: .55rem; color: var(--muted); }
.tr-meta { color: var(--muted); font-size: .84rem; font-weight: 650; }
.tr-card-info { border-top: 1px solid var(--line); padding-top: .55rem; font-size: .86rem; }
.tr-region { background: var(--tint); }
.tr-region-title { font: 400 clamp(1.375rem, 2.4vw, 1.65rem)/1.16 var(--title); letter-spacing: -.02em; }
.tr-region ul { display: flex; flex-wrap: wrap; column-gap: 1rem; list-style: none; padding: 0; margin: .4rem 0 0; }
.tr-dva { display: flex; align-items: center; gap: 1rem; background: var(--tint); border: 1px solid var(--line); border-radius: 6px; padding: 1rem; }
.tr-dva img { flex: none; }
.tr-dva a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.tr-dva p { color: var(--muted); }
.tr-page-head { padding: 2.9rem 0 1.45rem; }
.tr-filter { display: grid; gap: .9rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: 7px; background: var(--tint); }
.tr-filter label, .tr-inline-form label { display: grid; align-content: start; gap: .28rem; font-size: .92rem; font-weight: 650; }
.tr-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.tr-discovery-links { margin-block: .9rem; }
.tr-calendar-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; margin-block: 1.6rem .5rem; }
.tr-calendar-nav nav { display: flex; flex-wrap: wrap; gap: .45rem; }
.tr-calendar { width: min(100%, 42rem); table-layout: fixed; border-spacing: .18rem; text-align: center; }
.tr-calendar th { color: var(--muted); font-size: .86rem; }
.tr-calendar td { vertical-align: middle; padding: 0; }
.tr-calendar td > time, .tr-calendar td > a { display: flex; min-height: 2.75rem; align-items: center; justify-content: center; gap: .2rem; border-radius: .55rem; }
.tr-calendar td > time { color: var(--muted); }
.tr-calendar td > a { flex-wrap: wrap; background: var(--tint); font-weight: 650; text-decoration: none; }
.tr-calendar td > a:hover { text-decoration: underline; }
.tr-calendar td > a[aria-current] { outline: 2px solid var(--accent); outline-offset: -2px; }
.tr-calendar a > span { min-width: 1.1rem; border-radius: 1rem; padding-inline: .14rem; font-size: .72rem; color: var(--accent-text); background: var(--accent); }
.tr-transport-group { margin-block: 1rem; }
.tr-transport-group h3 { margin-bottom: .6rem; }
.tr-transport-group h4 { margin: 0; }
.tr-search-grid { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr); gap: .6rem; }
.tr-planner button { justify-self: start; }
.tr-planner fieldset { display: grid; gap: .55rem; min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 6px; }
.tr-planner legend { font-weight: 650; }
.tr-planner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.tr-planner summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--accent); text-decoration: underline; }
.tr-plan-result:not(:empty) { margin: .9rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.tr-plan-result li + li { margin-top: .5rem; }
.tr-plan-scenarios, .tr-fix-actions, .tr-editor-actions, .tr-compare-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-block: .8rem; }
.tr-plan-scenarios [aria-pressed="true"], .tr-compare-toggle[aria-pressed="true"] { background: var(--tint); border-color: var(--accent); }
.tr-plan-scenarios button:disabled, .tr-editor-actions button:disabled { opacity: .6; cursor: default; }
.tr-plan-risk:not(:empty), .tr-plan-timeline:not(:empty), .tr-plan-editor:not(:empty) { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 1rem; margin-block: .85rem; }
.tr-plan-risk[data-level="calm"] { border-inline-start: 4px solid var(--accent); }
.tr-plan-risk[data-level="tight"] { border-inline-start: 4px solid #a67436; }
.tr-plan-risk[data-level="risky"] { border-inline-start: 4px solid var(--error); }
.tr-risk-level { font-size: 1.18rem; font-weight: 750; margin-top: .45rem; color: var(--ink); }
.tr-plan-reasons, .tr-schedule { margin: .55rem 0; padding-inline-start: 1.45rem; }
.tr-schedule li { padding: .3rem .1rem; overflow-wrap: anywhere; }
.tr-schedule-panel { margin-block: 1.15rem; padding-block-start: .9rem; border-top: 1px solid var(--line); }
.tr-schedule-panel > h3 { margin: 0 0 .45rem; }
.tr-schedule-panel > p { margin: .45rem 0; }
.tr-schedule-panel small { display: block; margin-top: .3rem; }
.tr-plan-events { list-style: none; margin: .55rem 0; padding: 0; }
.tr-plan-events li { display: flex; flex-wrap: wrap; align-items: start; gap: .55rem 1rem; padding-block: .45rem; }
.tr-plan-events li > div { flex: 1 1 13rem; min-width: 0; overflow-wrap: anywhere; }
.tr-plan-event-ref { display: block; margin-top: .2rem; }
.tr-plan-time { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: .7rem; }
.tr-plan-time > div { background: var(--tint); border-radius: 4px; padding: .5rem .65rem; }
.tr-plan-time dt { font-weight: 650; }
.tr-plan-time dd { margin: 0; }
.tr-editor-list { display: grid; gap: .55rem; padding: 0; list-style: none; }
.tr-editor-item { border: 1px solid var(--line); border-radius: 5px; padding: .7rem; min-width: 0; }
.tr-editor-item input, .tr-editor-item select { max-width: 13rem; }
.tr-editor-new { display: grid; gap: .6rem; padding: .75rem; background: var(--tint); border-radius: 5px; }
.tr-editor-new button { justify-self: start; }
.tr-note { color: var(--muted); }
.tr-compare-toggle { margin-top: .65rem; }
.tr-actions .tr-compare-toggle { margin-top: 0; }
.tr-compare-form { max-width: 54rem; }
.tr-compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .8rem; margin-block: 1rem; }
.tr-compare-card { padding: 1rem; border: 1px solid var(--line); border-radius: 6px; min-width: 0; background: var(--surface); }
.tr-compare-card h2, .tr-compare-card h3 { font-size: 1.35rem; }
.tr-compare-metrics { display: grid; gap: .42rem; margin-block: .75rem; }
.tr-compare-metrics > div { padding-top: .35rem; border-top: 1px solid var(--line); }
.tr-compare-metrics dt { font-weight: 650; }
.tr-compare-metrics dd { margin: 0; overflow-wrap: anywhere; }
.tr-compare-status { min-height: 1.5rem; }
.tr-section > .tr-chips { margin: .85rem 0; }
.tr-filter-actions, .tr-inline-form { display: flex; flex-wrap: wrap; gap: .65rem; align-items: flex-end; }
.tr-filter-actions a { display: inline-flex; align-items: center; min-height: 46px; }
.tr-filter-actions .tr-check { display: inline-flex; align-items: center; gap: .55rem; min-height: 46px; padding-inline: .45rem; }
.tr-check input { width: 1.2rem; height: 1.2rem; min-height: auto; accent-color: var(--accent); }
.tr-filter-actions button { margin-left: auto; }
.tr-inline-form { margin-bottom: 1.4rem; }
.tr-inline-form label { flex: 1 1 12rem; max-width: 20rem; }
.tr-count { border-radius: 999px; background: var(--tint); color: var(--accent); padding: .2rem .55rem; font: 650 .85rem var(--body); vertical-align: middle; letter-spacing: 0; }
.tr-empty, .tr-error, .tr-success { padding: 1rem; border: 1px solid var(--line); border-radius: 5px; max-width: 50rem; }
.tr-empty a, [data-saved-empty] a { display: inline-flex; align-items: center; min-height: 44px; }
.tr-error { color: var(--error); margin-bottom: 1rem; }
.tr-success { background: var(--tint); }
.tr-story-head .tr-meta { margin: .3rem 0 .55rem; }
.tr-story-head .tr-secondary, .tr-actions { margin-top: 1.1rem; }
.tr-actions .tr-secondary { margin-top: 0; }
.tr-status { font-size: .88rem; color: var(--muted); margin-top: .6rem; }
.tr-status:empty { display: none; }
.tr-anchors { border-block: 1px solid var(--line); gap: .2rem 1rem; padding: .22rem 0; }
.tr-anchors a, .tr-sources summary { min-height: 44px; padding: .55rem .1rem; }
.tr-reading { max-width: 780px; }
.tr-reading > .tr-section { border-bottom: 1px solid var(--line); padding: 0 0 1.45rem; margin: 2.2rem 0; }
.tr-reading > .tr-section p { color: var(--muted); }
.tr-facts, .tr-days { padding: 0; margin: 0; }
.tr-facts > div, .tr-day dl > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .25rem .75rem; padding: .42rem 0; }
.tr-facts dt, .tr-day dt { font-weight: 650; }
.tr-days { display: grid; gap: 1rem; list-style-type: none; }
.tr-day { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 5px; padding: 1rem; }
.tr-day h3, .tr-day p:not(.tr-meta), .tr-day dl { margin-top: .5rem; }
.tr-day dd { color: var(--muted); }
.tr-list { margin: .6rem 0; padding-left: 1.35rem; }
.tr-list li + li { margin-top: .45rem; }
.tr-sources summary { cursor: pointer; width: fit-content; color: var(--accent); }
.tr-sources a { display: inline-flex; align-items: center; min-height: 44px; }
.tr-service-group { margin: 1.25rem 0; scroll-margin-top: 1rem; }
.tr-service-group > h3 { margin-bottom: .65rem; }
.tr-service-group .tr-service h3 { font-size: 1rem; }
.tr-service-group .tr-dva { grid-column: span 2; }
.tr-ad { font-size: .78rem; }
.tr-articles { margin-block: .9rem; }
.tr-feedback { max-width: 46rem; }
.tr-feedback button { width: fit-content; }
.tr-remove { margin-top: .85rem; }
.tr-footer { margin-top: 4rem; border-top: 1px solid var(--line); padding: 1.6rem 0 2rem; }
.tr-footer-inner { display: grid; grid-template-columns: 1fr 1.4fr .6fr; gap: 1rem 2rem; }
.tr-footer nav { align-content: start; }
.tr-footer p { color: var(--muted); font-size: .88rem; }
.tr-projects p { padding-top: .35rem; }
.tr-projects a { gap: .45rem; }

@media (max-width: 970px) {
  .tr-header-inner { flex-wrap: wrap; padding: .55rem 0; }
  .tr-header nav { order: 2; width: 100%; }
  .tr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-hero, .tr-story-head { gap: 1.5rem; }
  .tr-search { grid-template-columns: minmax(7rem, .7fr) minmax(0, 1.3fr); }
  .tr-search button { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 700px) {
  .tr-wrap { width: calc(100% - 2rem); }
  .tr-hero, .tr-story-head { grid-template-columns: 1fr; gap: 1.15rem; padding-top: 1.8rem; }
  .tr-feature-photo .tr-photo img, .tr-story-head .tr-photo img { aspect-ratio: 1.55; }
  .tr-grid, .tr-split { grid-template-columns: 1fr; }
  .tr-plan-time, .tr-compare-grid { grid-template-columns: minmax(0, 1fr); }
  .tr-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-filter-actions button { margin-left: 0; }
  .tr-facts > div, .tr-day dl > div { grid-template-columns: 1fr; }
  .tr-service-group .tr-dva { grid-column: auto; }
  .tr-footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .tr-header-inner { gap: 0 .6rem; }
  .tr-brand { font-size: 1.37rem; }
  .tr-header nav { gap: 0 .42rem; }
  .tr-header nav a, .tr-tools a { font-size: .81rem; }
  .tr-actions > *, .tr-search button { width: 100%; }
  .tr-planner-grid { grid-template-columns: minmax(0, 1fr); }
  .tr-search, .tr-search-grid { grid-template-columns: minmax(0, 1fr); }
}
