/*
 * docutrip.app (ADR-0028): one stylesheet, the app's own colours (written
 * by `npm run tokens` from docs/design/tokens.json, R2 — change them there),
 * system fonts, nothing from outside. Phone first; light and dark.
 */
:root {
  /* tokens:begin light */
  --accent: #0a6e6e;
  --accent-text: #0a6e6e;
  --accent-soft: #ddefee;
  --on-accent: #ffffff;
  --warn: #b04e00;
  --warn-soft: #ffeedd;
  --ok: #1e7b36;
  --ok-soft: #e2f4e6;
  --bad: #c4291c;
  --bad-soft: #fde7e5;
  --muted: #5c5c63;
  --bg: #f2f2f7;
  --card: #ffffff;
  --text: #111114;
  --line: #e2e2e7;
  --code: #f6f6f9;
  /* tokens:end */
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    /* tokens:begin dark */
    --accent: #5ed1cf;
    --accent-text: #5ed1cf;
    --accent-soft: #123b3b;
    --on-accent: #062a2a;
    --warn: #ff9f45;
    --warn-soft: #3a2511;
    --ok: #4cd472;
    --ok-soft: #12301b;
    --bad: #ff6b5e;
    --bad-soft: #3b1512;
    --muted: #aeaeb5;
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f2f2f7;
    --line: #2e2e31;
    --code: #141416;
    /* tokens:end */
    --shadow: none;
  }
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    17px / 1.5 -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    system-ui,
    "Segoe UI",
    Roboto,
    sans-serif;
}
a {
  color: var(--accent-text);
}
a:focus-visible,
button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* The bar on top: the name and the pages, wrapping on a phone. */
.bar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.bar-in {
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.brand {
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  display: inline-grid;
  place-items: center;
  font-size: 16px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* On a phone the pages get their own row, all on one line. */
@media (max-width: 600px) {
  .bar nav {
    flex-basis: 100%;
    margin: 0 -8px;
  }
  .nav {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
}
.nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 8px 0 12px;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 22px;
  line-height: 1.25;
  margin: 32px 0 10px;
}
h3 {
  font-size: 18px;
  margin: 20px 0 6px;
}
p,
li {
  max-width: 68ch;
}
.lead {
  font-size: 19px;
  color: var(--muted);
  margin-top: 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 15px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin: 12px 0;
}
.card > :first-child {
  margin-top: 0;
}
.card > :last-child {
  margin-bottom: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.cards .card {
  margin: 0;
}
a.card {
  display: block;
  color: var(--text);
  text-decoration: none;
}
a.card:hover {
  border-color: var(--accent);
}
.card .icon {
  font-size: 28px;
  line-height: 1;
}
.card h3 {
  margin: 8px 0 4px;
}
.card p {
  margin: 0;
  color: var(--muted);
}

.steps {
  padding-left: 1.4em;
}
.steps li {
  margin: 6px 0;
}

.button,
button {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.button.quiet,
button.quiet {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 4px;
}
textarea {
  width: 100%;
  min-height: 180px;
  font:
    16px / 1.45 ui-monospace,
    "SF Mono",
    Menlo,
    Consolas,
    monospace;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
}
textarea.short {
  min-height: 72px;
  font: inherit;
}
input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  min-height: 44px;
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
}
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.pair input {
  min-width: 0;
}
label {
  font-weight: 600;
  display: block;
  margin: 16px 0 6px;
}
input[type="file"] {
  font: inherit;
  max-width: 100%;
}
.drop {
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--card);
}
.drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.note {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 8px 0;
  background: var(--accent-soft);
}
.note.ok {
  background: var(--ok-soft);
}
.note.warn {
  background: var(--warn-soft);
}
.note.bad {
  background: var(--bad-soft);
}
.private {
  border-left: 4px solid var(--ok);
  padding: 4px 0 4px 12px;
  margin: 16px 0;
}

details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  margin: 8px 0;
}
summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}
details[open] {
  padding-bottom: 12px;
}

/* The checker's result. */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}
.stats li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
}
.stats b {
  font-size: 20px;
  display: block;
}
.day {
  margin: 10px 0;
}
.day h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.day ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.day li {
  padding: 4px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
}
.day .time {
  min-width: 3.2em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.lines {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.lines li {
  padding: 4px 0;
  border-top: 1px solid var(--line);
  word-break: break-word;
}
.lines .n {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-right: 8px;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
footer .in {
  max-width: 880px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}
