@font-face {
  font-family: "DM Sans";
  src: url("./fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("./fonts/barlow-condensed-latin-700-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("./fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
:root {
  --ink: #20271e;
  --muted: #596155;
  --line: #d9ded2;
  --page: #f6f7f2;
  --lime: #deef9a;
  --dark: #263022;
  --focus: #286029;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  color-scheme: light;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  scrollbar-color: #9aa38e var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
h1, h2, p, dl, dd, fieldset { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button, select, summary, label:has(input[type="radio"]) { cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
label, legend { font-size: .9rem; font-weight: 650; }
input { min-width: 0; caret-color: var(--focus); }
button { touch-action: manipulation; }
button:disabled, a[aria-disabled="true"] { cursor: default; opacity: .52; }
button, .button, summary, .segments span { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: #d3e985; color: #182310; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 8; top: 8px; left: 8px; padding: 10px 16px; background: white; }
.wrap { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.masthead { background: #fff; }
.nav-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand, .footer-brand { font-family: var(--display); font-weight: 700; font-style: italic; text-transform: uppercase; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 1.8rem; line-height: 1; white-space: nowrap; }
.brand-mark { width: 39px; height: 33px; display: flex; align-items: center; justify-content: center; gap: 2px; background: var(--lime); border-radius: 5px; }
.brand-mark i { display: block; height: 17px; width: 4px; transform: skewX(-21deg); background: var(--dark); }
.brand-mark i:first-child { height: 9px; margin-top: 8px; }
.brand-mark i:nth-child(2) { height: 13px; margin-top: 4px; }
.nav-row nav { display: flex; align-self: stretch; gap: 28px; }
nav a { position: relative; display: flex; align-items: center; font-size: .92rem; text-decoration: none; font-weight: 580; color: var(--muted); }
nav a:hover, nav a[aria-current] { color: var(--ink); }
nav a[aria-current]::after { content: ""; position: absolute; height: 3px; left: 0; right: 0; bottom: 13px; background: #638324; }
.hero { position: relative; isolation: isolate; overflow: hidden; background: #30201b; color: #fff; }
.hero-art { position: absolute; z-index: -2; right: 0; top: -7%; height: 114%; width: auto; object-fit: cover; object-position: 62% 42%; mask-image: linear-gradient(90deg, transparent, #000 23%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #261d18 4%, #2d211bf5 24%, #321f1bb5 48%, #321b140a 79%); }
.hero-copy { min-height: 231px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 30px 32px; }
.hero h1 { font: italic 700 clamp(3.8rem, 6.2vw, 5.75rem)/.95 var(--display); text-transform: uppercase; letter-spacing: -.025em; text-wrap: balance; }
.hero p { max-width: 490px; margin-top: 16px; font-size: 1.06rem; line-height: 1.5; color: #fcf8ee; text-wrap: pretty; }
.hero.plan-hero h1 { font-size: clamp(2.8rem, 4.75vw, 4.45rem); }
.content { padding-top: 30px; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px; align-items: start; scroll-margin-block-start: 16px; }
.form-box, .racecard { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.form-box { padding: 26px 30px; }
h2 { font-size: clamp(1.35rem, 2.1vw, 1.75rem); font-weight: 720; line-height: 1.16; letter-spacing: -.035em; text-wrap: balance; }
.mode-field { margin-top: 22px; }
.mode-field legend { margin-bottom: 7px; }
.segments { display: flex; padding: 4px; gap: 3px; border-radius: 8px; background: #eff1eb; }
.segments label { position: relative; flex: 1; }
.segments input { position: absolute; opacity: 0; }
.segments span { min-height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 5px; text-align: center; color: #50594c; transition: background-color 140ms ease-out; }
.segments input:checked + span { background: var(--dark); color: #fff; }
.segments input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.segments label:hover input:not(:checked) + span { background: #e1e6da; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.fields > div > label:not(.sr-only), .point-field > label { display: block; margin-bottom: 6px; }
.input-box, .select-box, .share-controls input, .point-field input { border-radius: 7px; border: 1px solid #aab2a2; background: #fff; }
.input-box { display: flex; align-items: center; padding-right: 13px; }
.input-box input, .select-box select { width: 100%; min-height: 46px; padding: 9px 12px; border: 0; background: transparent; }
.input-box input { font-size: 1.08rem; font-weight: 560; font-variant-numeric: tabular-nums; }
.input-box:focus-within, .select-box:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.input-box input:focus, .select-box select:focus { outline: none; }
.input-box > span { color: var(--muted); white-space: nowrap; font-size: .88rem; }
.select-box { position: relative; }
.select-box select { appearance: none; padding-right: 31px; font-weight: 550; }
.select-box::after, .chevron { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.select-box::after { position: absolute; pointer-events: none; right: 15px; top: 17px; }
#custom-field { margin-top: 7px; }
small, .muted, .form-foot, .card-head p, .share-panel p, .preview-toolbar p { color: var(--muted); }
.fields small { display: block; margin-top: 5px; font-size: .8rem; }
.unit-field { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; margin-top: 19px; }
.unit-field legend { float: left; font-weight: 500; }
.small-segments { width: max-content; padding: 2px; background: #fff; border: 1px solid var(--line); }
.small-segments span { padding: 3px 13px; min-height: 29px; font-size: .83rem; }
.small-segments input:checked + span { color: var(--ink); background: #e4ebd8; }
.ticket { position: relative; align-self: stretch; display: flex; flex-direction: column; background: var(--lime); border-radius: 14px; overflow: hidden; padding: 23px 28px 22px; color: #202c19; }
.ticket-top { display: flex; justify-content: space-between; align-items: center; }
.ticket-top h2 { font-size: 1.03rem; font-weight: 650; letter-spacing: 0; }
.timing-mark { position: relative; width: 29px; height: 23px; transform: skewX(-19deg); opacity: .64; border-inline: 5px solid #4d652b; }
.timing-mark::after { content: ""; display: block; width: 5px; height: 100%; margin: 0 auto; background: #4d652b; }
.readout { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; margin-block: auto; padding-block: 7px 11px; }
.readout strong { font: 600 clamp(4rem, 6.6vw, 5.8rem)/.98 var(--display); letter-spacing: -.028em; overflow-wrap: anywhere; }
.readout > span { font-size: 1.05rem; font-weight: 580; }
.clock-readout strong { font-size: clamp(3.4rem, 5.6vw, 5rem); }
.ticket-stats { display: flex; align-items: flex-start; gap: 12px 30px; flex-wrap: wrap; margin-block: 5px 16px; }
.ticket-stats dt { color: #445335; font-size: .82rem; }
.ticket-stats dd { font-size: 1.04rem; font-weight: 680; font-variant-numeric: tabular-nums; }
.ticket-action { position: relative; padding-top: 17px; border-top: 1px dashed #899e5f; }
.ticket-action::before, .ticket-action::after { content: ""; position: absolute; width: 15px; height: 15px; background: var(--page); border-radius: 50%; top: -8px; }
.ticket-action::before { left: -36px; }
.ticket-action::after { right: -36px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; border-radius: 7px; border: 1px solid transparent; padding: 9px 17px; text-decoration: none; font-size: .94rem; font-weight: 650; text-align: center; }
.button.dark { color: #fff; background: var(--dark); }
.button.dark:hover:not(:disabled):not([aria-disabled="true"]) { background: #3b4d33; }
.button.outline { color: var(--ink); background: #fff; border-color: #aab2a2; }
.button.outline:hover:not(:disabled) { background: #f0f3e9; }
.ticket .button { width: 100%; }
.button.compact { min-height: 41px; font-size: .88rem; padding: 8px 14px; }
.reading-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(26px, 6vw, 80px); border-top: 1px solid var(--line); margin-top: 33px; padding: 29px 0 42px; }
.reading-grid h2 { font-size: 1.42rem; }
.reading-grid p { max-width: 68ch; color: #495145; font-size: .96rem; margin: 10px 0; line-height: 1.65; }
.reading-grid b { font-weight: 650; color: var(--ink); }
.text-button { border: 0; background: none; padding: 3px 0; color: #375827; text-decoration: underline; text-underline-offset: 3px; font-weight: 620; font-size: .91rem; }
.text-button:hover { color: #162d0e; }
footer { border-top: 1px solid var(--line); }
.footer-row { min-height: 74px; padding-block: 17px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer-brand { font-size: 1.25rem; }
.footer-row a { font-size: .86rem; color: var(--muted); }
.error, .notice { background: #fff1e8; padding: 10px 13px; border-radius: 6px; color: #7f2d1b; font-size: .9rem; }
.error { margin-top: 14px; }
.notice { margin-bottom: 15px; }
.box-heading, .card-head, .card-actions, .share-controls, .card-goal, .preview-toolbar { display: flex; align-items: center; gap: 12px; }
.box-heading, .card-head, .preview-toolbar { justify-content: space-between; flex-wrap: wrap; }
.plan-kind { font-size: .78rem; font-weight: 620; color: #4d5947; padding: 3px 9px; background: #edf0e8; border-radius: 4px; }
.race-inputs { margin: 23px 0 20px; }
.race-inputs legend, .start-field { font-weight: 600; }
.duration-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 5px; }
.duration-parts label { color: var(--muted); font-size: .79rem; }
.duration-parts input { display: block; width: 100%; min-width: 0; margin-top: 3px; padding: 8px; min-height: 44px; border: 1px solid #aab2a2; border-radius: 7px; background: white; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.start-field { align-self: start; min-width: 0; }
.start-field .input-box { margin-top: 5px; }
.start-field small { font-weight: 400; }
.form-foot, .muted { font-size: .84rem; line-height: 1.5; }
.form-foot { margin-top: 8px; }
#route-editor { border-top: 1px solid var(--line); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 2px 8px 0; list-style: none; font-weight: 640; font-size: .94rem; }
summary::-webkit-details-marker { display: none; }
details[open] .chevron { transform: rotate(225deg); }
#point-inputs { margin: 13px 0 10px; }
.point-input { display: grid; grid-template-columns: minmax(55px, .37fr) minmax(0, 1fr) auto; align-items: end; gap: 9px; padding-bottom: 10px; }
.point-field > label { font-size: .79rem; color: var(--muted); margin-bottom: 3px; }
.point-field input, .share-controls input { padding: 7px 9px; width: 100%; height: 41px; }
.remove-point { width: 40px; height: 41px; border: 0; background: transparent; color: #5e6658; font-size: 1.35rem; }
.remove-point:hover { color: #8a331d; }
.racecard { margin-top: 25px; overflow: hidden; scroll-margin-block-start: 12px; }
.plan-loading, .plan-loading a, .loading-plan #planung, .loading-plan #rennkarte > :not(.plan-loading), .plan-unavailable .plan-loading span { display: none; }
.loading-plan .plan-loading { display: block; padding: 18px; }
.plan-unavailable .plan-loading a { display: inline; }
.card-head { padding: 23px 27px 16px; }
.card-head p { margin-top: 5px; font-size: .92rem; }
.card-actions { flex-wrap: wrap; gap: 8px; }
.card-goal { flex-wrap: wrap; gap: 6px 16px; padding: 0 27px 15px; font-size: .94rem; }
.card-goal b { font-variant-numeric: tabular-nums; }
.card-times { padding: 0 27px 16px; }
.card-times .race-inputs { max-width: 34rem; margin: 0 0 12px; }
.card-times .error { margin: 0 0 10px; }
.saved-card { margin: 0 27px 15px; padding: 9px 13px; border-left: 3px solid #7d9953; background: #f0f4e6; }
.content > .saved-card { margin: 0 0 15px; }
.saved-card a { color: #355524; font-weight: 650; }
.saved-card span { display: block; color: var(--muted); font-size: .84rem; }
.share-panel { background: #f0f4e6; padding: 15px 26px; margin-bottom: 14px; }
.share-controls { margin: 5px 0; }
.share-panel p { font-size: .86rem; }
#share-status:not(:empty) { color: #254d1a; margin-top: 5px; }
.splits-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.splits-table thead th { font-size: .86rem; color: var(--muted); background: #f2f4ed; }
.splits-table th, .splits-table td { padding: 10px 27px; border-block-start: 1px solid var(--line); text-align: right; overflow-wrap: anywhere; }
.splits-table th:first-child { width: 44%; text-align: left; }
.splits-table tbody th { font-size: .98rem; font-weight: 650; }
.splits-table tbody th small { display: inline; margin-left: 9px; font: 400 .86rem "DM Sans", sans-serif; }
.splits-table tbody td { font-size: 1.08rem; font-weight: 530; }
.splits-table tbody td:last-child { font-weight: 700; }
.splits-table .finish { background: #edf4d6; }
.last-leg { padding: 12px 27px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
@media (min-width: 1000px) {
  .plan-ticket { align-self: start; min-height: 266px; }
}
@media (max-width: 850px) {
  .wrap { width: calc(100% - 44px); }
  .tool-grid { gap: 16px; grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr); }
  .form-box { padding: 21px; }
  .ticket { padding-inline: 21px; }
  .ticket-action::before { left: -29px; }
  .ticket-action::after { right: -29px; }
  .fields { gap: 10px; }
  .hero-copy { min-height: 209px; }
  .hero p { max-width: 420px; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .nav-row { min-height: auto; gap: 0; flex-direction: column; align-items: flex-start; padding-top: 13px; }
  .brand { font-size: 1.56rem; gap: 8px; }
  .brand-mark { width: 33px; height: 28px; }
  .nav-row nav { gap: 24px; min-height: 45px; }
  nav a { font-size: .87rem; }
  nav a[aria-current]::after { bottom: 0; }
  .hero-copy { padding: 23px 0; min-height: 170px; }
  .hero h1 { font-size: clamp(2.85rem, 11vw, 4rem); }
  .hero.plan-hero h1 { max-width: 76%; font-size: clamp(2.25rem, 8vw, 3rem); }
  .hero p { font-size: .94rem; margin-top: 8px; max-width: min(78%, 370px); line-height: 1.42; }
  .hero-art { top: 0; height: 100%; width: 100%; object-position: 72% 50%; }
  .hero::before { background: linear-gradient(90deg, #241b18f5 2%, #2c1c18e6 33%, #2c1c1880 62%, #321b1410 94%); }
  .content { padding-top: 16px; }
  .tool-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .form-box { padding: 19px; }
  .mode-field { margin-top: 16px; }
  .fields { margin-top: 15px; }
  .unit-field { margin-top: 13px; }
  .ticket { padding: 16px 20px; }
  .ticket-top h2 { font-size: 1rem; }
  .timing-mark { width: 23px; height: 18px; border-width: 4px; }
  .timing-mark::after { width: 4px; }
  .readout { padding-block: 3px 5px; }
  .readout strong { font-size: 4.1rem; }
  .ticket-stats { margin: 2px 0 10px; gap: 8px 25px; }
  .ticket-action { padding-top: 12px; }
  .ticket-action::before { left: -28px; }
  .ticket-action::after { right: -28px; }
  .reading-grid { grid-template-columns: 1fr; gap: 19px; margin-top: 22px; padding: 23px 0 26px; }
  .footer-row { flex-wrap: wrap; gap: 7px 15px; }
  .racecard { margin-top: 16px; }
  .card-head { padding: 18px 16px 12px; }
  .card-goal { padding: 0 16px 12px; }
  .card-goal .text-button { min-height: 44px; }
  .card-times { padding: 0 16px 14px; }
  .saved-card { margin-inline: 16px; }
  .card-actions .button { min-height: 43px; }
  .share-panel { padding: 12px 15px; }
  .splits-table th, .splits-table td { padding: 9px 7px; }
  .splits-table th:first-child { width: 39%; padding-left: 15px; }
  .splits-table td:last-child, .splits-table th:last-child { padding-right: 15px; }
  .splits-table tbody th small { display: block; margin-left: 0; margin-top: 1px; }
  .splits-table tbody td { font-size: 1rem; }
  .last-leg { padding-inline: 15px; }
}
@media (max-width: 500px) {
  .race-inputs { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .race-inputs .start-field { max-width: 100%; }
}
@media (max-width: 355px) {
  .wrap { width: calc(100% - 24px); }
  .form-box { padding: 15px; }
  .splits-table tbody td { font-size: .92rem; }
  .splits-table td:last-child, .splits-table th:last-child { padding-right: 9px; }
  .card-head, .card-goal { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
