:root {
  color-scheme: dark;
  --bg: #080d14;
  --panel: #101822;
  --line: #26333f;
  --text: #f2f5f7;
  --muted: #acbac7;
  --cyan: #6cdded;
  --orange: #ffa268;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SFMono-Regular', Consolas, monospace;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
select {
  cursor: pointer;
}
button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  min-height: 44px;
}
button:hover:not(:disabled) {
  background: #1d2a37;
  border-color: #526a7d;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}
button[aria-pressed='true'] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #081218;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.4;
}
p {
  margin-top: 0.7rem;
  color: var(--muted);
}
.eyebrow {
  font: 600 0.75rem/1.5 var(--mono);
  letter-spacing: 0.09em;
  color: var(--cyan);
  margin: 0 0 0.7rem;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1.25rem, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid var(--line);
  background: #080d14f2;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(15px);
}
.brand {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  font-weight: 750;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}
.brand span {
  color: var(--cyan);
}
.brand i {
  height: 22px;
  width: 1px;
  background: var(--line);
  margin: 0 0.7rem;
}
nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
nav a {
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.25rem 0;
}
nav a:hover {
  color: var(--text);
}
.private-link {
  color: var(--cyan);
}
.shell {
  max-width: 1368px;
  margin: auto;
  padding: 0 1.5rem 2rem;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 2.25rem 0 1.7rem;
}
h1 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 660;
  line-height: 1.15;
  letter-spacing: -0.045em;
}
h1 span {
  color: var(--muted);
  font-size: 0.72em;
  font-weight: 400;
  letter-spacing: -0.025em;
}
.countdown {
  display: flex;
  flex-direction: column;
  text-align: right;
  white-space: nowrap;
}
.countdown strong {
  font: 500 clamp(2.5rem, 6vw, 4.5rem) / 1 var(--mono);
  letter-spacing: -0.08em;
}
.countdown span {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.course-panel {
  background: #0c141f;
  border: 1px solid #304352;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 22px 60px #0003;
}
.course-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  gap: 1rem;
}
.course-top h2 {
  font-size: 1rem;
  letter-spacing: 0;
}
.segmented {
  display: flex;
  gap: 0.25rem;
}
.segmented button {
  font-size: 0.875rem;
  padding: 0.4rem 0.7rem;
}
.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
}
.map-wrap {
  min-width: 0;
  position: relative;
  background: radial-gradient(ellipse at 50% 50%, #153243 0, transparent 63%), #0b141e;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  perspective: 950px;
}
.map-meta,
.map-bottom {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font: 0.75rem var(--mono);
  color: var(--muted);
  z-index: 2;
}
.map-meta span:first-child {
  letter-spacing: 0.05em;
}
.map-plane {
  width: 100%;
  transition: transform 0.55s ease;
  transform-origin: 50% 48%;
}
.map-plane.perspective {
  transform: rotateX(28deg) rotateZ(-9deg) scale(0.94);
}
.route-fallback,
#course-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 430px;
  min-height: 240px;
}
.map-plane.ready .route-fallback {
  display: none;
}
[hidden] {
  display: none !important;
}
.map-bottom {
  flex-wrap: wrap;
  align-items: center;
}
.map-bottom a {
  margin-left: auto;
}
.legend-line {
  display: inline-block;
  width: 18px;
  height: 2px;
  vertical-align: middle;
  background: var(--cyan);
  margin-right: 5px;
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  vertical-align: middle;
  border-radius: 50%;
  border: 2px solid #f5f8ff;
  margin-right: 5px;
}
.race-readout {
  padding: 1.4rem;
  border-left: 1px solid var(--line);
  background: #0c131d;
}
.km-display {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0.5rem 0;
}
.km-display span {
  font: 0.875rem var(--mono);
  color: var(--muted);
}
.km-display strong {
  font: 500 3.3rem/1.05 var(--mono);
  letter-spacing: -0.07em;
}
.race-readout p {
  font-size: 0.875rem;
}
.race-readout dl {
  margin: 1.2rem 0;
}
.race-readout dl > div {
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}
dt {
  font-size: 0.8125rem;
  color: var(--muted);
}
dd {
  margin: 0.25rem 0 0;
  font: 1.45rem var(--mono);
}
dd small {
  font: 0.85rem var(--font);
  color: var(--muted);
}
.fuel-callout {
  border-left: 2px solid var(--orange);
  padding-left: 0.85rem;
}
.fuel-callout span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}
.fuel-callout strong {
  font: 1.3rem var(--mono);
  color: var(--orange);
}
.scrubber {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
}
.scrub-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
}
.scrub-actions output {
  margin-left: auto;
  font: 0.875rem var(--mono);
}
.play {
  font-size: 0.875rem;
  min-width: 175px;
}
.scrub-actions label {
  color: var(--muted);
}
input[type='range'] {
  width: 100%;
  min-height: 44px;
  accent-color: var(--cyan);
  margin: 0.4rem 0;
}
.km-jumps {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.km-jumps button {
  border: 0;
  padding: 0.2rem;
  font: 0.8rem var(--mono);
  color: var(--muted);
  min-height: 40px;
}
.km-jumps button:hover {
  color: var(--text);
}
.source-note {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
}
.course-panel > .source-note {
  padding: 0.2rem 1.5rem 1rem;
  margin: 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin: 2.8rem 0 1.2rem;
}
.badge {
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2rem;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}
.panel {
  padding: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  min-width: 0;
}
.strategy-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1rem;
}
.scenario-panel > label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
select {
  width: 100%;
  background: #0b121c;
  color: var(--text);
  border: 1px solid #405568;
  border-radius: 0.45rem;
  min-height: 46px;
  padding: 0.5rem 0.75rem;
}
.finish-time {
  font: 500 clamp(2.9rem, 5vw, 4.5rem) / 1.2 var(--mono);
  letter-spacing: -0.075em;
  color: var(--cyan);
  margin: 1.2rem 0 0.5rem;
}
.scenario-panel p {
  font-size: 0.875rem;
}
.scenario-panel > label:not(:first-child) {
  margin-top: 1.4rem;
}
.muted {
  color: var(--muted);
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}
.text-button {
  font-size: 0.8rem;
  color: var(--cyan);
  border-color: transparent;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.8rem;
}
th,
td {
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th:first-child,
td:first-child {
  padding-left: 0;
}
th:not(:first-child),
td:not(:first-child) {
  text-align: right;
}
td:not(:first-child) {
  font-family: var(--mono);
}
tbody tr:last-child td {
  border-bottom: 0;
  color: var(--cyan);
}
.phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.phases article {
  padding: 1rem 0 0;
  border-top: 2px solid var(--line);
}
.phases article > span {
  font: 0.75rem var(--mono);
  color: var(--orange);
}
.phases h3 {
  margin-top: 0.6rem;
}
.phases p {
  font-size: 0.875rem;
}
.fuel-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}
.fuel-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.fuel-inputs label {
  font-size: 0.875rem;
  color: var(--muted);
}
.fuel-inputs select {
  margin-top: 0.5rem;
}
.fuel-total {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.fuel-total strong {
  display: block;
  font: 1.9rem var(--mono);
  letter-spacing: -0.07em;
  color: var(--orange);
}
.fuel-total span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.3rem;
}
.fuel-grid p {
  font-size: 0.875rem;
}
.fuel-grid .source-note {
  font-size: 0.75rem;
}
.station-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.station-buttons button {
  font: 0.85rem var(--mono);
  background: #162330;
}
.station-buttons button.selected {
  border-color: var(--cyan);
  color: var(--cyan);
}
details {
  margin-top: 1.2rem;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 0.6rem 0;
  font-size: 0.875rem;
}
details > p {
  font-size: 0.875rem;
}
.private-banner {
  margin-top: 2.5rem;
  padding: 1.6rem;
  border: 1px solid #344b5e;
  border-radius: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: #12212c;
}
.private-banner p {
  font-size: 0.875rem;
}
.primary-button {
  display: inline-block;
  border: 0;
  border-radius: 0.5rem;
  background: var(--cyan);
  color: #07151b;
  font-weight: 650;
  padding: 0.8rem 1rem;
  text-decoration: none;
  white-space: nowrap;
}
.methodology {
  padding: 0 0.5rem;
}
footer {
  border-top: 1px solid var(--line);
  margin-top: 1.4rem;
  padding-top: 1.3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font: 0.75rem var(--mono);
  color: var(--muted);
}
.notice {
  padding: 1rem;
  border: 1px solid #706342;
  background: #241f15;
  color: #f5dbad;
  border-radius: 0.5rem;
}
.skip {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  background: var(--cyan);
  color: #000;
  padding: 0.7rem;
}
.skip:focus {
  top: 1rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.private-shell {
  max-width: 1180px;
}
.private-heading {
  padding: 2.5rem 0 1.5rem;
}
.login-card {
  max-width: 650px;
  margin: 1rem auto 3rem;
}
.login-card > p {
  margin-bottom: 1rem;
}
.login-card h2 {
  margin-bottom: 1rem;
}
.login-card .primary-button {
  margin: 1rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.stat-value {
  font: 2rem var(--mono);
  margin: 0.5rem 0;
  color: var(--cyan);
}
.stat-label {
  font-size: 0.875rem;
  color: var(--muted);
}
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.analysis-grid .wide {
  grid-column: 1/-1;
}
.evidence {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.evidence article {
  border-left: 2px solid var(--line);
  padding-left: 1rem;
}
.evidence .badge {
  display: inline-block;
  margin-bottom: 0.5rem;
}
.evidence p {
  font-size: 0.9rem;
}
.week-bars {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}
.week-bar {
  display: grid;
  grid-template-columns: 5.5rem 1fr 4.2rem;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
}
.week-bar-track {
  height: 12px;
  border-bottom: 1px solid var(--line);
}
.week-bar-fill {
  height: 100%;
  background: var(--cyan);
}
.week-bar.partial .week-bar-fill {
  background: transparent;
  border: 1px dashed var(--cyan);
}
.week-bar strong {
  text-align: right;
  font: 0.8rem var(--mono);
}
.data-list p {
  font-size: 0.875rem;
}
.plan-table td {
  white-space: normal;
  vertical-align: top;
  font-family: var(--font) !important;
  text-align: left !important;
  min-width: 90px;
}
.plan-table td:nth-child(3) {
  min-width: 270px;
}
.plan-table tbody tr:last-child td {
  color: var(--text);
}
.plan-table .is-today {
  background: #17313a;
}
.plan-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.privacy-status {
  font: 0.85rem var(--mono);
  color: var(--muted);
}
#user-button {
  margin-left: auto;
}
.health-empty {
  padding: 2rem 0;
}
.source-links a {
  display: block;
  margin: 0.5rem 0;
  overflow-wrap: anywhere;
}
.public-note {
  padding: 1.25rem 0;
}
@media (max-width: 950px) {
  .course-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .race-readout {
    padding: 1rem;
  }
  .map-meta {
    font-size: 0.7rem;
  }
  .top {
    padding: 1rem 1.5rem;
  }
  nav {
    gap: 1rem;
  }
  .strategy-grid,
  .fuel-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .private-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }
}
@media (max-width: 680px) {
  .shell {
    padding: 0 1rem 1.5rem;
  }
  .top {
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .brand {
    font-size: 0.9rem;
  }
  nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
  }
  nav a {
    min-height: 36px;
    display: flex;
    align-items: center;
  }
  .page-heading {
    padding: 1.4rem 0;
    gap: 0.7rem;
  }
  h1 {
    font-size: 1.6rem;
  }
  .countdown strong {
    font-size: 2.6rem;
  }
  .countdown span {
    font-size: 0.75rem;
  }
  .course-top {
    padding: 0.9rem;
    align-items: flex-start;
  }
  .course-top h2 {
    max-width: 180px;
    font-size: 0.875rem;
  }
  .segmented button {
    font-size: 0.75rem;
    padding: 0.35rem 0.45rem;
  }
  .course-layout {
    display: flex;
    flex-direction: column;
  }
  .map-meta {
    padding: 0.8rem 0.8rem 0;
    font-size: 0.65rem;
    gap: 0.3rem;
  }
  .map-plane {
    margin: 0;
  }
  .route-fallback,
  #course-svg {
    min-height: 210px;
    max-height: none;
  }
  .map-bottom {
    padding: 0.5rem 0.8rem 0.9rem;
    font-size: 0.65rem;
    gap: 0.6rem;
  }
  .race-readout {
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    padding: 1rem;
  }
  .race-readout > .eyebrow {
    grid-column: 1/-1;
    font-size: 0.65rem;
    margin: 0;
  }
  .km-display {
    margin: 0;
  }
  .km-display strong {
    font-size: 2.6rem;
  }
  .race-readout > p {
    font-size: 0.8rem;
    margin: 0;
    align-self: center;
  }
  .race-readout dl {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 0.7rem;
    margin: 0.2rem 0;
  }
  .race-readout dt {
    font-size: 0.7rem;
  }
  .race-readout dd {
    font-size: 1.1rem;
  }
  .race-readout dl p {
    font-size: 0.7rem;
    line-height: 1.3;
  }
  .fuel-callout {
    grid-column: 1/-1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
  }
  .fuel-callout span {
    font-size: 0.75rem;
  }
  .fuel-callout strong {
    font-size: 1rem;
  }
  .scrubber {
    padding: 0.8rem;
  }
  .scrub-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .scrub-actions label {
    display: none;
  }
  .scrub-actions output {
    font-size: 0.75rem;
  }
  .play {
    min-width: 0;
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }
  .km-jumps button {
    font-size: 0.7rem;
  }
  .course-panel > .source-note {
    padding: 0 0.8rem 0.8rem;
    font-size: 0.7rem;
  }
  .section-heading {
    margin-top: 2rem;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }
  .strategy-grid,
  .fuel-grid,
  .phases,
  .analysis-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 1.1rem;
  }
  .phases {
    gap: 0.75rem;
  }
  .phases article {
    padding-top: 0.8rem;
  }
  .fuel-total strong {
    font-size: 1.7rem;
  }
  .fuel-inputs {
    gap: 0.7rem;
  }
  .fuel-inputs label {
    font-size: 0.8rem;
  }
  .analysis-grid .wide {
    grid-column: auto;
  }
  .private-banner {
    padding: 1.2rem;
  }
  .primary-button {
    white-space: normal;
  }
  footer {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.7rem;
  }
  .panel-title {
    align-items: flex-start;
  }
  th,
  td {
    padding: 0.65rem 0.35rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .map-plane {
    transition: none;
  }
}
@media print {
  body {
    background: white;
    color: black;
  }
  .top,
  button,
  input,
  select,
  .private-banner,
  .scrubber,
  .map-wrap,
  .methodology {
    display: none !important;
  }
  .panel,
  .course-panel {
    border: 1px solid #aaa;
    background: white;
    box-shadow: none;
  }
  .course-layout,
  .strategy-grid,
  .fuel-grid {
    display: block;
  }
  .race-readout {
    border: 0;
    background: white;
  }
  .shell {
    max-width: none;
  }
  .section-heading {
    break-after: avoid;
  }
  .panel {
    break-inside: avoid;
  }
  p,
  dt,
  th,
  .source-note {
    color: #333;
  }
  dd,
  .finish-time,
  .fuel-total strong {
    color: #111;
  }
  a {
    color: #111;
  }
}
.sync-panel {
  margin-bottom: 1rem;
  border-left: 3px solid var(--cyan);
}
.sync-panel h2 {
  font-size: 1.2rem;
}
.sync-stale {
  border-left-color: var(--orange);
}
.sync-stale .eyebrow {
  color: var(--orange);
}
/* Berlin atlas and calm private working surface */
body {
  background: radial-gradient(ellipse at 70% 0, #112330 0, transparent 42rem), #080d14;
}
.shell {
  max-width: 1440px;
}
.page-heading h1 {
  font-size: clamp(2.3rem, 4.8vw, 4.1rem);
}
.page-heading h1 span {
  font-size: 0.5em;
}
.private-shell {
  max-width: 1280px;
}
.cockpit-tabs {
  position: sticky;
  top: 75px;
  z-index: 15;
  background: #0a121bf0;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0;
  gap: 0.5rem;
  overflow-x: auto;
}
.cockpit-tabs button {
  white-space: nowrap;
  border-color: transparent;
  border-radius: 2rem;
  padding: 0.7rem 1.2rem;
}
.cockpit-body {
  padding-top: 1.5rem;
}
.cockpit-section {
  margin: 3rem 0;
}
.cockpit-section > h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  margin: 0 0 1.3rem;
}
.cockpit-section > .panel {
  margin-top: 1rem;
}
.today-brief {
  border-top: 1px solid #3d6b7e;
  padding: 2rem 0 1rem;
  background: linear-gradient(130deg, #122a37aa, transparent 65%);
}
.today-brief > h2 {
  font-size: clamp(2rem, 4.5vw, 3.9rem);
  max-width: 900px;
  line-height: 1.1;
}
.brief-copy {
  font-size: 1.15rem;
  max-width: 800px;
}
.hero-metrics,
.stats-row,
.comparison-readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem 0;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.metric > span {
  font-size: 0.875rem;
  color: var(--muted);
}
.metric > strong {
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.metric > small {
  font-size: 0.8rem;
  color: #92a8b7;
}
.brief-rule {
  border-left: 2px solid var(--orange);
  padding: 0.6rem 1rem;
  margin: 0.5rem 0 1.5rem;
  max-width: 850px;
}
.brief-rule p {
  margin: 0.2rem 0 1rem;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 1rem;
  margin: 1rem 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 150px;
  flex: 1;
  font-size: 0.875rem;
  color: var(--muted);
}
.field input:not([type='range']):not([type='checkbox']):not([type='file']),
textarea {
  border: 1px solid #405568;
  border-radius: 0.5rem;
  background: #0a121c;
  color: var(--text);
  font: inherit;
  padding: 0.65rem;
  min-height: 46px;
  width: 100%;
}
.field:has([type='checkbox']) {
  flex-direction: row;
  align-items: center;
  min-width: 0;
}
.field input[type='checkbox'] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  accent-color: var(--cyan);
}
.field input[type='file'] {
  padding: 1rem 0;
  max-width: 100%;
}
.cockpit-body table td {
  white-space: normal;
  vertical-align: top;
  min-width: 80px;
  text-align: left;
  font-family: var(--font);
}
.cockpit-body table th {
  font-size: 0.85rem;
}
.cockpit-body table td p {
  font-size: 0.9rem;
  min-width: 230px;
}
.cockpit-body table td small {
  display: block;
  color: #92a8b7;
  margin-top: 0.5rem;
}
.cockpit-body .table-wrap {
  margin: 1rem 0;
}
.cockpit-body .panel > button {
  margin: 0.6rem 0.5rem 0.3rem 0;
}
.chart {
  margin: 1.3rem 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 180px;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
}
.chart-tooltip {
  font-size: 0.8rem;
  display: block;
  color: var(--muted);
  min-height: 2rem;
}
.empty-state {
  padding: 1.3rem;
  background: #0c1721;
  border: 1px dashed #355367;
  border-radius: 0.5rem;
}
.interactive-weeks {
  max-width: 1000px;
}
.interactive-weeks .week-bar {
  width: 100%;
  text-align: left;
  border-color: transparent;
  border-radius: 0;
  grid-template-columns: 6rem 1fr 5.5rem;
}
.interactive-weeks .week-bar strong {
  font-size: 0.875rem;
}
.interactive-weeks .week-bar-fill {
  border-radius: 0;
}
.taper-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}
.taper-row small {
  color: var(--muted);
  display: block;
  margin-top: 1rem;
}
.bar-row {
  display: grid;
  grid-template-columns: 3rem 1fr 5rem;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.8rem;
  font-size: 0.875rem;
}
.bar-track {
  height: 11px;
  background: #1b2b39;
}
.bar-track i {
  display: block;
  height: 100%;
  background: var(--cyan);
}
.bar-track .planned {
  background: transparent;
  border: 1px dashed var(--orange);
}
.bar-row b {
  font-size: 0.8rem;
  font-weight: 500;
}
.evidence-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.evidence-list .badge {
  display: inline-block;
  margin-bottom: 0.8rem;
}
.source-link {
  display: block;
  margin: 0.8rem 0;
}
.scenario-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.scenario-cards .panel {
  background: transparent;
  border-width: 1px 0 0;
  border-radius: 0;
  padding: 1rem 0;
}
.scenario-cards .panel:first-child {
  border-color: var(--orange);
}
.scenario-cards .panel:nth-child(2) {
  border-color: var(--cyan);
}
.private-course {
  margin: 1.5rem 0;
  min-width: 0;
}
.city-wrap {
  min-width: 0;
  overflow: hidden;
}
.berlin-scene {
  position: relative;
  background: #0c1822;
  min-height: 340px;
  isolation: isolate;
  overflow: hidden;
}
.berlin-scene canvas {
  display: block;
  width: 100%;
  height: auto;
}
.scene-status {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font: 600 0.75rem var(--mono);
  color: #d1eef6;
  pointer-events: none;
  margin: 0;
  max-width: calc(100% - 2rem);
  text-shadow: 0 1px 5px #000;
}
.scene-controls {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.scene-controls button {
  background: #08121eea;
  border-color: #355269;
  backdrop-filter: blur(10px);
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  min-height: 42px;
}
.scene-controls button:first-child {
  background: var(--orange);
  color: #121417;
  border-color: var(--orange);
  font-weight: 650;
}
.landmark-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  background: #0d1a25;
}
.landmark-chapters button {
  font-size: 0.8rem;
  border-radius: 2rem;
  padding: 0.4rem 0.7rem;
}
.landmark-readout {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: #101d28;
}
.landmark-readout > img {
  width: 95px;
  height: 100px;
  object-fit: cover;
  border-radius: 0.4rem;
}
.landmark-readout h3 {
  font-size: 1.15rem;
}
.landmark-readout p {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.landmark-readout .eyebrow {
  font-size: 0.7rem;
}
.scene-sources {
  padding: 0 1rem 0.6rem;
  margin: 0;
  background: #0c1721;
}
.scene-sources summary {
  font-size: 0.75rem;
  color: var(--muted);
}
.scene-sources p,
.scene-sources a {
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.story-hero {
  background: linear-gradient(145deg, #152f3e, #0c131b);
  border-top: 1px solid #41677e;
  min-height: 280px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.story-hero h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  max-width: 820px;
}
.story-hero:has(img) {
  padding: 0;
}
.story-hero img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  object-position: center;
}
.personal-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}
.personal-photos img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.story-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
.story-timeline .panel {
  border-top: 2px solid var(--orange);
  background: transparent;
  border-radius: 0;
}
.cockpit-section textarea {
  min-height: 90px;
  resize: vertical;
  margin-top: 0.8rem;
}
.race-print {
  display: none;
}
.comparison-readout .metric > strong {
  font-size: 1.5rem;
}
.source-note {
  font-size: 0.8rem;
}
#race-card > button {
  margin: 0.5rem 0.6rem 0.5rem 0;
}
.cockpit-body > section:first-child {
  margin-top: 0;
}
@media (max-width: 900px) {
  .scenario-cards,
  .taper-bars {
    grid-template-columns: 1fr;
  }
  .evidence-list {
    grid-template-columns: 1fr;
  }
  .hero-metrics {
    gap: 1rem;
  }
  .course-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .scene-controls button {
    font-size: 0.75rem;
  }
  .landmark-readout {
    grid-template-columns: 75px 1fr;
  }
  .landmark-readout > img {
    width: 75px;
    height: 95px;
  }
  .story-timeline {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .cockpit-tabs {
    top: 110px;
    gap: 0.2rem;
    padding: 0.5rem 0;
    width: 100%;
    justify-content: flex-start;
  }
  .cockpit-tabs button {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
  }
  .private-heading {
    padding: 1.6rem 0 1rem;
  }
  .private-heading h1 {
    font-size: 1.7rem;
  }
  .today-brief {
    padding: 1.5rem 0.1rem;
  }
  .today-brief > h2 {
    font-size: 2.2rem;
  }
  .hero-metrics,
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .hero-metrics > .metric:last-child {
    grid-column: 1/-1;
  }
  .brief-copy {
    font-size: 1rem;
  }
  .toolbar {
    gap: 0.75rem;
  }
  .field {
    min-width: 130px;
  }
  .cockpit-section {
    margin: 2rem 0;
  }
  .comparison-readout {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .comparison-readout .metric > strong {
    font-size: 1.1rem;
  }
  .chart svg {
    min-height: 130px;
  }
  .personal-photos {
    grid-template-columns: 1fr 1fr;
  }
  .personal-photos img {
    height: 170px;
  }
  .scene-controls {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    gap: 0.25rem;
  }
  .scene-controls button {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }
  .landmark-readout {
    grid-template-columns: 75px 1fr;
    padding: 0.8rem;
    gap: 0.7rem;
  }
  .landmark-chapters {
    padding: 0.6rem;
    gap: 0.25rem;
  }
  .landmark-chapters button {
    font-size: 0.75rem;
    padding: 0.35rem 0.55rem;
  }
  .story-hero {
    min-height: 260px;
    padding: 1.5rem;
  }
  .source-note {
    font-size: 0.8rem;
  }
  .top nav:has(#logout) {
    width: auto;
  }
  .top:has(#logout) {
    flex-wrap: nowrap;
  }
  .top:has(#logout) .brand {
    font-size: 0.8rem;
  }
  .top:has(#logout) nav a {
    font-size: 0.75rem;
  }
  .private-shell .cockpit-tabs {
    top: 65px;
  }
  .course-layout {
    display: flex;
    flex-direction: column;
  }
  .city-wrap {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
@media print {
  .printing-card > * {
    display: none !important;
  }
  .printing-card > .race-print {
    display: block !important;
    padding: 1rem;
    color: #000;
    background: #fff;
  }
  .race-print p,
  .race-print th,
  .race-print td {
    color: #000;
  }
  .race-print h1 {
    font-size: 24pt;
  }
  .race-print table {
    font-size: 11pt;
  }
  .race-print .table-wrap {
    overflow: visible;
  }
  .city-wrap,
  .berlin-scene,
  .scene-controls,
  .cockpit-tabs,
  .landmark-chapters,
  .landmark-readout,
  .scene-sources {
    display: none !important;
  }
}

.scene-finish {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: 1rem 2rem;
  background: #081521e8;
  border-top: 1px solid var(--orange);
  pointer-events: none;
}
.scene-finish span {
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -0.06em;
  color: var(--orange);
}
.scene-finish p {
  font-size: 0.9rem;
  margin: 0;
  color: #fff;
}

/* Owner-supplied photographs load only through the authenticated API. */
.today-brief.with-photo:after {
  content: '';
  display: block;
  clear: both;
}
.today-photo {
  float: right;
  width: 29%;
  height: 340px;
  object-fit: cover;
  margin: 0 0 1.4rem 2rem;
  border-radius: 0.6rem;
}
.with-photo > h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}
.with-photo .hero-metrics {
  clear: both;
}
.permanent-moments {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.personal-moment {
  position: relative;
  margin: 0;
  min-height: 400px;
  overflow: hidden;
  border-radius: 0.7rem;
  background: #12212d;
}
.personal-moment img {
  display: block;
  width: 100%;
  height: 480px;
  object-fit: cover;
}
.personal-moment figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1.3rem 1.2rem;
  background: linear-gradient(transparent, #080d14e8);
  font-size: clamp(1.4rem, 2.4vw, 2.2rem);
  font-weight: 650;
  line-height: 1.15;
}
.personal-moment > .source-note {
  padding: 1rem;
}
#connected-recovery > .panel {
  margin: 1.5rem 0;
}
#connected-recovery .stats-row {
  gap: 1rem;
}
#connected-recovery .metric > strong {
  font-size: 1.5rem;
}
#connected-recovery details {
  margin-top: 1rem;
}
#connected-recovery .chart {
  margin-top: 0.5rem;
}
.landmark-chapters {
  max-height: 12rem;
  overflow-y: auto;
  align-items: flex-start;
}
.scene-sources {
  overflow-wrap: anywhere;
}
@media (max-width: 680px) {
  .today-photo {
    width: 32%;
    height: 180px;
    margin: 0 0 1rem 1rem;
  }
  .with-photo > h2 {
    font-size: 1.8rem;
  }
  .permanent-moments {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .personal-moment {
    min-height: 0;
  }
  .personal-moment img {
    height: auto;
    max-height: 600px;
    object-fit: contain;
  }
  .personal-moment figcaption {
    font-size: 1.8rem;
  }
  .landmark-chapters {
    max-height: 10rem;
  }
}

.landmark-directory {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}
.landmark-directory summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
}
.landmark-directory .landmark-chapters {
  max-height: 18rem;
}
.landmark-chapters button[aria-current='location'] {
  border-color: var(--cyan);
  background: #19333e;
  color: #fff;
}
.landmark-km-tile {
  width: 110px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #356273;
  border-radius: 0.5rem;
  background: radial-gradient(ellipse at top, #214657, #0d1c28);
  color: #89ced3;
}
.landmark-km-tile strong {
  font-size: 2.3rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  color: #fff;
}
.landmark-km-tile span {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}
.landmark-upcoming {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0 1rem;
}
.landmark-upcoming > p {
  flex-basis: 100%;
  margin: 0.2rem 0;
}
.landmark-upcoming button {
  font-size: 0.85rem;
  text-align: left;
}
.landmark-readout > div:last-child {
  min-width: 0;
}
.landmark-readout h3 {
  overflow-wrap: anywhere;
}
@media (max-width: 680px) {
  .landmark-km-tile {
    width: 75px;
    min-height: 95px;
  }
  .landmark-km-tile strong {
    font-size: 1.8rem;
  }
  .landmark-km-tile span {
    font-size: 0.5rem;
  }
  .landmark-upcoming button {
    width: 100%;
    font-size: 0.8rem;
  }
  .landmark-directory .landmark-chapters {
    max-height: 15rem;
  }
}
@media print {
  .landmark-directory,
  .landmark-upcoming {
    display: none !important;
  }
}

/* Shared navigation and retrospective layout (Berlin is archived since 27.09.2026). */
.brand {
  letter-spacing: -0.02em;
}
.top nav a[aria-current='page'] {
  color: var(--text);
  font-weight: 650;
}
.plan-archive {
  margin: 2.5rem 0;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.plan-archive > summary {
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 650;
  padding: 0.6rem 0;
}
.plan-archive[open] > summary {
  margin-bottom: 1rem;
}
