/* Runlines website. Plain CSS, no framework.
   Tokens from Runlines/Core/Theme.swift ("Velvet house"): plum-black house,
   one tungsten-amber spotlight, warm paper for script text, jade for "off book",
   curtain rose for "shaky". Dark is the brand, so the site is dark only.
   Serif (New York / ui-serif) for anything that reads like a printed script;
   system sans for interface text. 14px radius, the app's corner. */

:root {
  --bg: #100D11;
  --bg-2: #151116;
  --surface: #1D181F;
  --raised: #28222B;
  --ink: #F4EFE6;
  --dim: #B3A9B7;
  --faint: #938998;
  --line: rgba(244, 239, 230, 0.12);
  --accent: #F2AA3C;
  --accent-ink: #1A1206;
  --wash: rgba(242, 170, 60, 0.14);
  --spot: rgba(242, 170, 60, 0.18);
  --signal: #45AD93;
  --danger: #E8687C;
  --paper: #F6F1E7;
  --paper-ink: #1E1A16;
  --paper-dim: #655D54;
  --highlight: rgba(242, 170, 60, 0.30);
  --mask: rgba(30, 26, 22, 0.85);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 44px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 9px;
  --wide: 1120px;
  --text: 700px;
  --gutter: 20px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; z-index: 10; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

.shell { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--text); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .shell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.01em; min-height: 44px; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.get { margin-left: auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 0.92rem; }
.get:hover { text-decoration: none; filter: brightness(1.06); }
.nav { order: 3; flex-basis: 100%; display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; color: var(--dim); font-size: 0.9rem; padding: 10px 7px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 8px; }
.nav a:first-child { padding-left: 0; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"], .nav a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; line-height: 1.16; letter-spacing: -0.015em; }
h1, h2 { font-family: var(--serif); font-weight: 600; }
h1 { font-size: clamp(2.05rem, 7.4vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 4.8vw, 2.05rem); margin-bottom: 14px; }
h3 { font-size: 1.12rem; font-weight: 650; margin-bottom: 6px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
strong { font-weight: 650; color: var(--ink); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--raised); padding: 1px 6px; border-radius: 6px; }
.kicker { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.lede { font-size: 1.16rem; color: var(--dim); }
.dim { color: var(--dim); }
.small { font-size: 0.9rem; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 0.86rem; color: var(--faint); padding-top: 22px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--faint); }
.crumbs a { color: var(--dim); }

/* ---------- Sections ---------- */
.band { padding: 56px 0; border-top: 1px solid var(--line); }
.band:first-of-type { border-top: 0; }
.page-head { padding: 26px 0 34px; }
.page-head h1 { max-width: 22ch; }
.page-head .lede { max-width: 62ch; margin-top: 16px; }
.page-head + .band { padding-top: 28px; border-top: 0; }

/* ---------- Home hero ---------- */
.hero { position: relative; padding: 40px 0 56px; background: radial-gradient(ellipse 55% 60% at 22% 8%, var(--spot), transparent 72%); }
.hero-grid { display: grid; gap: 34px; align-items: center; }
.hero h1 { max-width: 17ch; }
.hero .lede { margin-top: 18px; max-width: 56ch; }
.facts { list-style: none; padding: 0; margin: 20px 0 22px; display: grid; gap: 8px; }
.facts li { margin: 0; padding-left: 26px; position: relative; color: var(--dim); }
.facts li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); }

/* ---------- Phone screenshots ---------- */
.shot { margin: 0; }
.shot img { width: 100%; max-width: 320px; border-radius: 26px; border: 1px solid rgba(244, 239, 230, 0.16); box-shadow: var(--shadow); background: var(--surface); }
.shot figcaption { font-size: 0.86rem; color: var(--faint); margin-top: 12px; max-width: 320px; }
.shot.center img, .shot.center figcaption { margin-left: auto; margin-right: auto; }
.shot.center figcaption { text-align: center; }

/* ---------- Paper: a printed page of sides ---------- */
.paper {
  background: var(--paper); color: var(--paper-ink);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; font-family: var(--serif); font-size: 1.05rem; line-height: 1.5;
}
.paper .who { display: block; font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; color: var(--paper-dim); margin-top: 12px; }
.paper .who:first-child { margin-top: 0; }
.paper .mine { background: var(--highlight); border-radius: 4px; padding: 1px 4px; }
.paper .hidden { background: var(--mask); color: transparent; border-radius: 4px; padding: 1px 4px; user-select: none; }
.paper .note { display: block; font-family: var(--sans); font-size: 0.8rem; color: var(--paper-dim); margin-top: 14px; }
.paper .dir { font-style: italic; color: var(--paper-dim); }
.paper a { color: #8A5900; }
pre.paper { white-space: pre-wrap; font-family: var(--mono); font-size: 0.86rem; line-height: 1.55; margin: 0 0 18px; }

/* ---------- Cards, steps ---------- */
.grid { display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card p { color: var(--dim); }
.card .more { display: inline-block; margin-top: 4px; font-weight: 600; color: var(--accent); }
.card.link-card { display: block; color: inherit; }
.card.link-card:hover { text-decoration: none; border-color: rgba(242, 170, 60, 0.55); }
.card.link-card h3 { color: var(--ink); }
.tag { display: inline-block; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.tag.free { background: rgba(69, 173, 147, 0.16); color: var(--signal); }
.tag.pro { background: var(--wash); color: var(--accent); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 18px; display: grid; gap: 18px; }
.steps > li { position: relative; padding-left: 54px; counter-increment: step; margin: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent); background: var(--wash);
  display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 0.9rem;
}
.steps > li > p { color: var(--dim); }
.steps > li > p:last-child { margin-bottom: 0; }

.split { display: grid; gap: 30px; align-items: start; }

/* ---------- Line status legend ---------- */
.legend { list-style: none; padding: 0; display: grid; gap: 10px; margin: 0 0 18px; }
.legend li { margin: 0; padding: 14px 16px 14px 44px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--dim); }
.legend li::before { content: ""; position: absolute; left: 18px; top: 21px; width: 12px; height: 12px; border-radius: 50%; }
.legend .off::before { background: var(--signal); }
.legend .learning::before { background: var(--accent); }
.legend .shaky::before { background: var(--danger); }
.legend .untried::before { background: transparent; border: 2px solid var(--faint); }
.legend strong { display: block; color: var(--ink); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
thead th { background: var(--surface); color: var(--ink); font-weight: 650; }
td { color: var(--dim); }
td.yes { color: var(--signal); font-weight: 600; }
td.pro { color: var(--accent); font-weight: 600; }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 14px; margin: 8px 0 22px; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.plan.featured { border-color: var(--accent); background: linear-gradient(180deg, var(--wash), transparent 72%), var(--surface); }
.plan .pill { position: absolute; top: -12px; right: 16px; background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.plan .price { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; margin: 2px 0 8px; color: var(--ink); }
.plan .price span { font-size: 0.95rem; font-weight: 500; color: var(--faint); letter-spacing: 0; margin-left: 3px; }
.plan p { color: var(--dim); }
.plan p:last-child, .plan ul:last-child { margin-bottom: 0; }
.plan ul { color: var(--dim); padding-left: 18px; }
.legal { color: var(--dim); font-size: 0.92rem; line-height: 1.6; }

/* ---------- Articles (guides) ---------- */
.prose { max-width: var(--text); }
.prose h2 { margin-top: 44px; }
.prose h3 { margin-top: 26px; }
.prose p, .prose li { color: #DDD5DF; }
.prose .lede { color: var(--dim); }
.byline { font-size: 0.86rem; color: var(--faint); margin: 14px 0 0; }
.answer {
  background: var(--paper); color: var(--paper-ink);
  border-radius: var(--radius); padding: 20px 22px; margin: 26px 0 8px;
  border-left: 5px solid var(--accent); box-shadow: var(--shadow);
}
.answer .label { font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); margin: 0 0 8px; }
.answer p { color: var(--paper-ink); font-family: var(--serif); font-size: 1.12rem; line-height: 1.55; margin: 0; }
.answer p + p { margin-top: 10px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 26px 0; }
.toc p { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.toc ol { margin: 0; }
.toc li { margin-bottom: 4px; }
.mistakes li { margin-bottom: 10px; }
.mistakes strong { color: var(--ink); }
.fits { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--signal); border-radius: var(--radius); padding: 22px; margin: 34px 0; }
.fits h2 { margin-top: 0; font-size: 1.4rem; }
.fits p:last-child { margin-bottom: 0; }
.related { list-style: none; padding: 0; display: grid; gap: 8px; }
.related li { margin: 0; }
.related a { display: block; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.related a:hover { border-color: rgba(242, 170, 60, 0.55); text-decoration: none; }
.related a span { display: block; font-size: 0.88rem; color: var(--dim); }
dl.terms { margin: 0; }
dl.terms dt { font-family: var(--serif); font-size: 1.32rem; font-weight: 600; margin-top: 34px; color: var(--ink); }
dl.terms dd { margin: 8px 0 0; color: #DDD5DF; }
dl.terms dd p:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */
.qa { padding: 22px 0; border-top: 1px solid var(--line); }
.qa h2, .qa h3 { font-family: var(--sans); font-size: 1.14rem; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 10px; }
.qa .a p { color: var(--dim); }
.qa .a p:last-child { margin-bottom: 0; }
.faq-group { margin-top: 40px; }
.faq-group > h2 { margin-bottom: 4px; }

/* ---------- App Store CTA ---------- */
.get-band { background: radial-gradient(ellipse 70% 120% at 85% 0%, var(--spot), transparent 70%), var(--bg-2); border-top: 1px solid var(--line); padding: 48px 0; }
.get-band .inner { display: grid; gap: 22px; align-items: center; }
.get-band h2 { margin-bottom: 8px; }
.get-band p { color: var(--dim); margin-bottom: 10px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 11px; padding: 9px 18px 9px 13px; margin: 6px 0 8px; line-height: 1.1; min-height: 52px;
}
.badge:hover { text-decoration: none; border-color: rgba(255, 255, 255, 0.6); }
.badge svg { width: 26px; height: 26px; fill: #fff; flex: none; }
.badge small { display: block; font-size: 0.64rem; letter-spacing: 0.02em; opacity: 0.85; }
.badge strong { display: block; font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; color: #fff; }
.soon { font-size: 0.84rem; color: var(--faint); margin: 0; }
.echo { width: 132px; height: 132px; }

/* ---------- Planner tool ---------- */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 26px 0; }
.tool .row { display: grid; gap: 16px; }
.tool label { display: block; font-weight: 650; margin-bottom: 6px; }
.tool .hint { display: block; font-size: 0.86rem; color: var(--faint); font-weight: 400; margin-top: 4px; }
.tool input, .tool select {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.tool input:focus, .tool select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--wash); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 650; cursor: pointer; }
.btn.quiet { background: transparent; color: var(--accent); }
.btn:hover { filter: brightness(1.06); }
.tool .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.result { margin-top: 22px; }
.result .summary { font-family: var(--serif); font-size: 1.22rem; color: var(--ink); }
.result .warn { border-left: 4px solid var(--danger); padding: 8px 0 8px 14px; color: var(--dim); }
.result td:first-child { white-space: nowrap; color: var(--ink); font-weight: 600; width: 1%; }
.result td .when { display: block; font-weight: 400; font-size: 0.84rem; color: var(--faint); }
.result tr.final td:first-child { color: var(--signal); }
.result tr.day-of td { background: var(--wash); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 56px; font-size: 0.92rem; color: var(--faint); }
.foot-grid { display: grid; gap: 28px; }
.site-footer h2 { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-block; padding: 6px 0; color: var(--dim); }
.site-footer li a:hover { color: var(--ink); }
.site-footer .fine { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 20px; }
.site-footer .fine p { margin: 0 0 8px; }

/* ---------- Legal documents ---------- */
.doc { max-width: var(--text); padding-bottom: 20px; }
.doc h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); margin: 12px 0 6px; }
.doc .meta { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 28px; }
.doc h2 { font-size: 1.38rem; margin: 40px 0 10px; }
.doc h3 { font-size: 1.06rem; margin: 24px 0 6px; }
.doc p, .doc li, .doc td { color: var(--dim); }
.doc .summary { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; margin: 24px 0 8px; color: var(--ink); font-size: 1.05rem; }
.contact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.contact .k { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.contact .v { font-size: 1.1rem; margin-top: 4px; word-break: break-all; }

/* ---------- Wider screens ---------- */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .tool .row { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; }
  .band { padding: 72px 0; }
  .get-band .inner { grid-template-columns: auto 1fr; gap: 34px; }
}
@media (min-width: 940px) {
  .site-header .shell { flex-wrap: nowrap; }
  .nav { order: 0; flex-basis: auto; margin: 0 0 0 18px; padding: 0; overflow: visible; gap: 4px; }
  .nav a { font-size: 0.95rem; padding: 10px 10px; }
  .get { margin-left: auto; }
  .hero { padding: 72px 0 80px; }
  .hero-grid { grid-template-columns: 1.25fr 0.75fr; gap: 56px; }
  .split { grid-template-columns: 1fr 320px; gap: 56px; }
  .split.flip { grid-template-columns: 320px 1fr; }
}
@media (max-width: 719px) {
  .plan.featured { order: -1; }
  .shot img, .shot figcaption { max-width: 250px; }
  .shot img { border-radius: 22px; }
}
@media print {
  .site-header, .site-footer, .get-band, .crumbs, .tool form, .tool .actions, .no-print { display: none; }
  body { background: #fff; color: #000; }
  .result td, .result th { color: #000; border-color: #999; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
