/*
 * zeitstrahl · meinpsychedelischertrip.de
 * 1 Concept: a calm diary and planner for the week before a trip, the day itself and the day after.
 * 2 Type: Atkinson Hyperlegible Next (text, headings) + Merienda (handwritten accents: station times, small notes).
 * 3 Palette: warm white #faf7f1, paper #f2ede3, graphite #2b2d2f, sage #6f8a72 / sage ink #4a6650, signal orange #b4481a (warnings only).
 * 4 Layout: ARCHETYPE timeline. Home = vertical CSS timeline of stations from "7 Tage vorher" to "Am Tag danach";
 *   article = horizontal progress strip + sticky station marker in its own left rail; content never runs under it.
 * 5 Detail: h2 headings carry an empty planner checkbox; ordered lists count in the handwritten face.
 */

@font-face { font-family: 'Atkinson Next'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/atkinson-normal-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; }
@font-face { font-family: 'Atkinson Next'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/atkinson-normal-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Atkinson Next'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/atkinson-italic-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; }
@font-face { font-family: 'Atkinson Next'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/atkinson-italic-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Merienda'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/merienda-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; }
@font-face { font-family: 'Merienda'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/merienda-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #faf7f1;
  --paper: #f2ede3;
  --tint: #e6ece2;
  --ink: #2b2d2f;
  --muted: #5d6063;
  --sage: #6f8a72;
  --sage-ink: #4a6650;
  --signal: #b4481a;
  --line: #d8d0c1;
  --sans: 'Atkinson Next', 'Segoe UI', system-ui, sans-serif;
  --hand: 'Merienda', 'Bradley Hand', cursive;
  --gutter: 1.25rem;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.hand { font-family: var(--hand); font-weight: 400; }
.wrap { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* ---------- header ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-row { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-family: var(--hand); font-size: 1.05rem; line-height: 1.2; }
.nav { display: none; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: .45rem .9rem; border: 1px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: .95rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--ink); color: var(--bg); }
.menu nav { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 5; width: min(20rem, calc(100vw - 2.5rem));
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; box-shadow: 0 8px 24px rgba(43,45,47,.12); }
.menu nav a { display: block; padding: .55rem .7rem; color: var(--ink); text-decoration: none; border-radius: 8px; }
.menu nav a[aria-current] { background: var(--tint); }
.menu .when { display: block; font-family: var(--hand); font-size: .8rem; color: var(--sage-ink); }

@media (min-width: 64rem) {
  .nav { display: flex; gap: .2rem; flex-wrap: wrap; justify-content: flex-end; }
  .nav a { color: var(--ink); text-decoration: none; padding: .35rem .6rem; border-radius: 999px; font-size: .95rem; }
  .nav a:hover { background: var(--paper); }
  .nav a[aria-current] { background: var(--ink); color: var(--bg); }
  .menu { display: none; }
}

/* ---------- headings and prose ---------- */
h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); margin: 0 0 1rem; letter-spacing: -.02em; }
.prose { max-width: 43rem; }
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1rem; }
.prose > h2 + * { margin-top: .6rem; }
.prose > h2 { font-size: 1.45rem; margin: 2.75rem 0 0; display: flex; gap: .7rem; align-items: baseline; }
.prose h2::before { content: ""; flex: none; width: .85rem; height: .85rem; border: 2px solid var(--sage); border-radius: 4px; transform: translateY(.05rem); }
.prose h2[id*="notfall"] { color: var(--signal); }
.prose h2[id*="notfall"]::before { border-color: var(--signal); background: var(--signal); }
.prose > h3 { font-size: 1.15rem; margin: 2rem 0 0; }
.prose ul { padding-left: 0; list-style: none; }
.prose ul > li { position: relative; padding-left: 1.6rem; }
.prose ul > li + li { margin-top: .45rem; }
.prose ul > li::before { content: ""; position: absolute; left: .15rem; top: .55em; width: .62rem; height: .62rem; border: 1.5px solid var(--sage-ink); border-radius: 3px; }
.prose ol { padding-left: 0; list-style: none; counter-reset: n; }
.prose ol > li { counter-increment: n; position: relative; padding-left: 2.1rem; }
.prose ol > li + li { margin-top: .5rem; }
.prose ol > li::before { content: counter(n); position: absolute; left: 0; top: -.05em; font-family: var(--hand); color: var(--sage-ink); font-size: 1.1rem; }
.prose strong { font-weight: 700; }
.prose a[href^="#quellen"] { font-size: .72em; vertical-align: super; line-height: 0; text-decoration: none; padding: 0 .1em; }
.prose hr { border: 0; border-top: 1px dashed var(--line); margin: 2.5rem 0; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--paper); border-radius: var(--radius); }
.prose figure { margin: 1.5rem 0; }
.prose figure img { max-width: 220px; }
.prose code { font-size: .9em; background: var(--paper); padding: .1em .3em; border-radius: 4px; }
#quellen ~ ol { font-size: .92rem; color: var(--muted); }
#quellen ~ ol li::before { font-size: .95rem; }

/* tables: ruled like a planner page; scroll inside their own box */
.table { margin: 1.5rem 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fffdf9; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { font-family: var(--hand); font-weight: 400; color: var(--sage-ink); background: var(--paper); font-size: .9rem; }
td:first-child { font-weight: 700; min-width: 8.5rem; }

/* products: planner list entries */
.products, .product-feature { display: grid; gap: .75rem; margin: 1.5rem 0; }
@media (min-width: 40rem) { .products { grid-template-columns: 1fr 1fr; } }
.pc { display: flex; gap: .9rem; align-items: center; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fffdf9; color: var(--ink); text-decoration: none; }
.pc:hover { border-color: var(--sage); }
.pc-img { flex: none; width: 5.5rem; height: 5.5rem; border-radius: 10px; overflow: hidden; background: var(--paper); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.pc-name { font-weight: 700; line-height: 1.3; }
.pc-meta { font-size: .9rem; color: var(--muted); }
.pc-price { color: var(--ink); font-weight: 700; margin-right: .4rem; }
.pc-shop { font-family: var(--hand); font-size: .82rem; }

/* ---------- home: intro ---------- */
.intro { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; align-items: center; }
.intro-kicker { color: var(--sage-ink); margin: 0 0 .75rem; font-size: 1rem; }
.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.25rem; max-width: 34rem; }
.intro-count { margin: 0; font-size: .98rem; }
.intro-count span { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--sage); color: #fff; font-weight: 700; margin-right: .35rem; }
.intro-count em { font-style: normal; font-family: var(--hand); color: var(--sage-ink); }
.intro-figure { margin: 0; }
.intro-figure img { border-radius: 18px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
@media (min-width: 56rem) {
  .intro { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; padding-top: 4rem; padding-bottom: 3.5rem; }
}

/* ---------- home: timeline ---------- */
.timeline { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3rem 0 3.5rem; }
.tl-title { font-size: 1.6rem; margin: 0 0 2rem; color: var(--sage-ink); }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; top: .6rem; bottom: .6rem; left: 1rem; width: 2px; background: var(--ink); }
.tl > li { position: relative; padding-left: 3.25rem; }
.tl > li + li { margin-top: 1.75rem; }
.tl-dot { position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; z-index: 1; }
.tl-cap .tl-dot { width: .9rem; height: .9rem; left: .56rem; top: .45rem; background: var(--ink); }
.tl-cap p { margin: 0; color: var(--muted); max-width: 30rem; }
.tl-cap strong { color: var(--ink); margin-right: .35rem; }
.tl-when { margin: .1rem 0 .55rem; font-size: 1.15rem; color: var(--sage-ink); }
.tl-card { display: block; padding: 1.1rem 1.25rem 1.2rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.tl-card:hover { border-color: var(--ink); }
.tl-name { display: block; font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.tl-desc { display: block; margin-top: .4rem; color: var(--muted); font-size: .97rem; }
.tl-go { display: inline-block; margin-top: .75rem; font-weight: 700; font-size: .92rem; color: var(--sage-ink); border-bottom: 1px solid currentColor; }
.tl-stop .tl-dot { background: var(--sage); border-color: var(--sage); color: #fff; }
.tl-stop.is-warn .tl-dot { background: var(--signal); border-color: var(--signal); }
.tl-stop.is-warn .tl-when, .tl-stop.is-warn .tl-go { color: var(--signal); }
.tl-stop.is-warn .tl-card { border-left: 4px solid var(--signal); }

@media (min-width: 56rem) {
  /* centre line, cards alternate; the station time sits on the opposite side of the line */
  .tl::before { left: 50%; margin-left: -1px; }
  .tl > li { padding-left: 0; display: grid; grid-template-columns: 1fr 4rem 1fr; align-items: start; }
  .tl > li + li { margin-top: 1rem; }
  .tl-dot { left: 50%; margin-left: -1rem; top: 1.1rem; }
  .tl-cap .tl-dot { margin-left: -.45rem; left: 50%; top: .35rem; }
  .tl-cap p { grid-column: 3; }
  .tl-cap-start p { grid-column: 3; }
  .tl-cap-end p { grid-column: 1; text-align: right; justify-self: end; }
  .tl-stop .tl-when { grid-row: 1; margin: 1.15rem 0 0; font-size: 1.3rem; }
  .tl-stop .tl-card { grid-row: 1; }
  .tl-stop:nth-child(even) .tl-card { grid-column: 1; }
  .tl-stop:nth-child(even) .tl-when { grid-column: 3; }
  .tl-stop:nth-child(odd) .tl-card { grid-column: 3; }
  .tl-stop:nth-child(odd) .tl-when { grid-column: 1; text-align: right; }
  .tl-stop.is-warn:nth-child(even) .tl-card { border-left: 1px solid var(--line); border-right: 4px solid var(--signal); }
}

.home-body { padding-top: 3rem; padding-bottom: 3rem; }
.home-body .prose { margin: 0 auto; }

/* ---------- article: progress strip ---------- */
.strip { border-bottom: 1px solid var(--line); background: var(--paper); }
.strip-track { list-style: none; margin: 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; padding-top: 1rem; padding-bottom: .9rem; }
.strip-track li { position: relative; text-align: center; }
.strip-track li::before { content: ""; position: absolute; top: .55rem; left: 0; right: 0; height: 2px; background: var(--line); }
.strip-track li:first-child::before { left: 50%; }
.strip-track li:last-child::before { right: 50%; }
.strip-track li.is-past::before, .strip-track li.is-now::before { background: var(--ink); }
.strip-track li.is-now::before { right: 50%; }
.strip-track li.is-now:first-child::before { display: none; }
.strip-track a { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; text-decoration: none; color: var(--muted); padding: 0 .15rem; }
.strip-dot { width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 2px solid var(--ink); background: var(--bg); }
.is-past .strip-dot { background: var(--ink); }
.is-now .strip-dot { background: var(--sage); border-color: var(--sage); box-shadow: 0 0 0 4px var(--tint); }
.is-warn .strip-dot { border-color: var(--signal); }
.is-warn.is-past .strip-dot { background: var(--signal); }
.is-warn.is-now .strip-dot { background: var(--signal); }
.strip-when { font-size: .78rem; line-height: 1.25; display: none; }
.is-now .strip-when { color: var(--ink); }
@media (min-width: 48rem) { .strip-when { display: block; } }

/* ---------- article: rail + sheet ---------- */
.station, .plain { padding-top: 1.75rem; padding-bottom: 3.5rem; }
.rail { display: none; }
.kicker-no { font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.marker { border: 1px solid var(--line); border-radius: var(--radius); background: #fffdf9; padding: 1rem 1.1rem; }
.marker.is-warn { border-top: 4px solid var(--signal); }
.marker-no { margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.marker-when { margin: .2rem 0 0; font-size: 1.35rem; line-height: 1.3; color: var(--sage-ink); }
.marker.is-warn .marker-when { color: var(--signal); }
.toc { margin-top: .9rem; border-top: 1px dashed var(--line); padding-top: .75rem; }
.toc summary { cursor: pointer; font-weight: 700; font-size: .92rem; }
.toc ol { list-style: none; margin: .6rem 0 0; padding: 0; font-size: .92rem; line-height: 1.4; }
.toc li + li { margin-top: .45rem; }
.toc a { color: var(--ink); text-decoration: none; display: block; padding-left: .9rem; border-left: 2px solid var(--line); }
.toc a:hover { border-left-color: var(--sage); color: var(--sage-ink); }
.sheet { min-width: 0; }
.sheet-head { margin-bottom: 2rem; max-width: 46rem; }
.sheet-kicker { margin: 0 0 .5rem; color: var(--sage-ink); font-size: 1.1rem; }
.is-station .sheet-head h1 { font-size: clamp(1.9rem, 5vw, 2.85rem); }
.stamp { margin: 0; font-size: .9rem; color: var(--muted); }

@media (min-width: 60rem) {
  .station { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: 3.5rem; align-items: start; padding-top: 2.75rem; }
  .kicker-no { display: none; }
  .rail { display: block; margin: 0; position: sticky; top: 1.25rem; max-height: calc(100vh - 2.5rem); overflow-y: auto; }
  .plain { max-width: 52rem; padding-top: 2.75rem; }
}

/* next / previous station */
.steps { display: grid; gap: .75rem; margin-top: 3.5rem; max-width: 42rem; }
@media (min-width: 40rem) { .steps { grid-template-columns: 1fr 1fr; } .step-next { grid-column: 2; } }
.step { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: #fffdf9; }
.step:hover { border-color: var(--ink); }
.step-next { background: var(--ink); color: var(--bg); border-color: var(--ink); text-align: right; }
.step-next:hover { color: var(--bg); }
.step-dir { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.step-when { font-size: 1.1rem; color: var(--sage-ink); }
.step-next .step-when { color: #c7d6c4; }
.step-name { font-weight: 700; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--paper); padding: 2.5rem 0 3rem; font-size: .93rem; }
.foot-grid { display: grid; gap: 1.75rem; }
.foot-pub { display: flex; gap: 1rem; align-items: center; }
.foot-pub img { width: 72px; height: 72px; flex: none; }
.foot-pub p, .foot-note { margin: 0; }
.foot-note { color: var(--muted); max-width: 38rem; }
.foot-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.foot-tl a { color: var(--ink); text-decoration: none; }
.foot-tl a:hover { text-decoration: underline; }
.foot-tl .hand { color: var(--sage-ink); font-size: .85rem; display: inline-block; min-width: 9rem; }
@media (min-width: 56rem) {
  .foot-grid { grid-template-columns: 1.1fr 1.2fr 1fr; align-items: start; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .top, .strip, .rail, .steps, .foot { display: none; } }
