/* The tolvane.ca site's stylesheet: the app's own look (page/js/look.css), for plain pages with no script. */
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/barlow-semi-condensed-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/barlow-semi-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --bg: #f1f4f5; --panel: #ffffff; --panel-2: #f3f5f6;
  --ink: #1f2326; --ink-2: #4f5960;
  --rule: #cdd4d8; --rule-2: #dfe4e7;
  --accent: #0b7f75; --accent-ink: #ffffff; --accent-soft: #dcf0ed;
  --code-bg: #f4f6f7;
  --plate: #0b7f75; --plate-ink: #ffffff; --plate-mark: #f6b26b; --rivet: #84c9c0;
  --stop: #b3261e; --stop-soft: #fbe7e5; --pill-stop-fg: #ffffff;
  --warn: #8a5300; --warn-soft: #fdefd3; --pill-warn-bg: #f2b23a; --pill-warn-fg: #2b1a00;
  --note: #33557e; --note-soft: #e4ecf7; --pill-note-fg: #ffffff;
  --shot-edge: #cdd4d8;
  --body: "Barlow Semi Condensed", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c2023; --panel: #262b2f; --panel-2: #2e3439;
    --ink: #eef2f4; --ink-2: #a7b1b8;
    --rule: #3a4247; --rule-2: #31383d;
    --accent: #3cc7b6; --accent-ink: #0f1a19; --accent-soft: #1c3936;
    --code-bg: #20262a;
    --plate: #17655e; --plate-ink: #ffffff; --plate-mark: #f2a65a; --rivet: #4f9c93;
    --stop: #ff7a70; --stop-soft: #3a1715; --pill-stop-fg: #2a0906;
    --warn: #ffbe55; --warn-soft: #35270b; --pill-warn-bg: #ffbe55; --pill-warn-fg: #2b1a00;
    --note: #9fbbe0; --note-soft: #18263a; --pill-note-fg: #0c1826;
    --shot-edge: #3a4247;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 17px/1.55 var(--body); }
.wrap { max-width: 68rem; margin: 0 auto; padding-block: 24px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.text { max-width: 44rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }

/* ---- the masthead: the plate, and the pages */
.mast { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-bottom: 36px; }
.plate { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 8px 24px 8px 12px; border-radius: 14px; background: var(--plate); color: var(--plate-ink); text-decoration: none; }
.plate::before, .plate::after { content: ""; position: absolute; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--rivet); }
.plate::before { left: 6px; } .plate::after { right: 6px; }
.mark { width: 34px; height: 34px; flex: none; }
.mark .ring { fill: none; stroke: currentColor; stroke-width: 5; }
.mark .needle { fill: none; stroke: var(--plate-mark); stroke-width: 6.5; stroke-linecap: round; }
.plate b { font-size: 28px; line-height: 1.1; font-weight: 700; }
.mast nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 18px; }
.mast nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.mast nav a:hover { border-bottom-color: var(--rule); }
.mast nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* ---- headings and running text */
h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.1; margin: 0 0 16px; text-wrap: balance; }
h2 { font-size: 26px; line-height: 1.2; margin: 48px 0 12px; text-wrap: balance; }
h3 { font-size: 20px; line-height: 1.25; margin: 26px 0 6px; }
p, li, dd { max-width: 68ch; }
ul, ol { padding-left: 1.25em; }
li { margin: 4px 0; }
.lead { font-size: 20px; line-height: 1.45; color: var(--ink-2); }
.meta { color: var(--ink-2); font-size: 15px; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
hr { border: 0; border-top: 2px solid var(--rule-2); margin: 32px 0; }

/* ---- the opening: words on one side, a real record on the other */
.hero { display: grid; gap: 32px 48px; align-items: center; }
@media (min-width: 880px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); } }
.hero > * { min-width: 0; }
.go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 10px; border: 2px solid var(--accent); font-weight: 700; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.plain { color: var(--accent); background: transparent; }

/* ---- a record as the app shows it */
.spec { background: var(--panel); border: 2px solid var(--rule-2); border-left: 6px solid var(--note); border-radius: 16px; padding: 16px 18px; font-size: 16px; }
.spec > :first-child { margin-top: 0; } .spec > :last-child { margin-bottom: 0; }
.spec .id { font: 500 24px/1.2 var(--mono); margin: 0; }
.spec .msg { font-weight: 700; margin: 4px 0 2px; }
.spec .on { color: var(--ink-2); font-size: 14px; margin: 0 0 10px; }
.spec .safety { background: var(--stop-soft); border: 2px solid var(--stop); border-radius: 10px; padding: 8px 12px; margin: 12px 0; }
.spec .safety b { color: var(--stop); }
.spec h3 { font-size: 16px; margin: 12px 0 2px; }
.spec ol { margin: 0; }
.spec .from { color: var(--ink-2); font-size: 14px; margin-top: 12px; }
.cap { color: var(--ink-2); font-size: 15px; margin: 8px 2px 0; }

/* ---- findings of the program checker */
.finds { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.finds li { max-width: none; margin: 0; background: var(--panel); border: 2px solid var(--rule-2); border-radius: 12px; padding: 10px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.pill { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; margin-top: 2px; }
.pill.stop { background: var(--stop); color: var(--pill-stop-fg); }
.pill.warn { background: var(--pill-warn-bg); color: var(--pill-warn-fg); }
.pill.note { background: var(--note); color: var(--pill-note-fg); }
.finds .line { font-family: var(--mono); font-size: 14px; color: var(--ink-2); grid-column: 2; overflow-wrap: anywhere; }

/* ---- the three ways to use it */
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 16px; margin: 16px 0; }
.way { background: var(--panel); border: 2px solid var(--rule-2); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.way h3 { margin: 0; font-size: 22px; }
.way p { margin: 0; }
.way .what { color: var(--ink-2); font-size: 15px; }
.way .more { margin-top: auto; padding-top: 8px; font-weight: 700; }

/* ---- what is in it: a list of terms */
.inside { margin: 8px 0; display: grid; gap: 0; }
.inside > div { display: grid; gap: 2px 24px; padding: 12px 0; border-top: 2px solid var(--rule-2); }
@media (min-width: 720px) { .inside > div { grid-template-columns: 11rem minmax(0, 1fr); } }
.inside dt { font-weight: 700; font-size: 18px; }
.inside dd { margin: 0; }

/* ---- cards, steps, tables */
.card { background: var(--panel); border: 2px solid var(--rule-2); border-radius: 16px; padding: 18px 20px; margin: 18px 0; }
.card > :first-child { margin-top: 0; } .card > :last-child { margin-bottom: 0; }
.card.plain-fact { border-left: 6px solid var(--accent); }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: step; margin: 0; max-width: 44rem; background: var(--panel); border: 2px solid var(--rule-2); border-radius: 14px; padding: 12px 16px 12px 58px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--ink); font-weight: 700; display: grid; place-items: center; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; max-width: 44rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 2px solid var(--rule-2); }
th { font-weight: 700; }
thead th { border-bottom-color: var(--rule); }
.mail { font-size: 22px; font-weight: 700; }
.hash { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; color: var(--ink-2); }

/* ---- a code list: each code, what it does, and how to write it */
/* fixed columns: a long line of code scrolls in its own box, and the meanings wrap to the width of the screen */
.codes { table-layout: fixed; }
.codes thead th:first-child { width: 5.5rem; }
.codes td { overflow-wrap: anywhere; }
.codes th[scope="row"] { font-family: var(--mono); font-weight: 500; white-space: nowrap; }
.how { margin-top: 6px; font-size: 16px; }
.how summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: 15px; }
.how summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.how .fmt { margin: 8px 0; }
.how .fmt code, .how pre { display: block; max-width: 100%; background: var(--code-bg); border: 2px solid var(--rule-2); border-radius: 8px; padding: 6px 10px; margin: 4px 0; font: 500 14px/1.5 var(--mono); overflow-x: auto; white-space: pre; }
.how .words { list-style: none; padding: 0; margin: 8px 0; }
.how .words li { margin: 8px 0; }
.how .w { font-family: var(--mono); font-weight: 500; }
.how .need { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: 6px; background: var(--accent-soft); color: var(--ink); white-space: nowrap; }
.how .need.opt { background: var(--panel-2); color: var(--ink-2); }
.how .ex { font-weight: 700; margin: 10px 0 0; }
.how ul { margin: 6px 0; }

/* ---- pictures of the app */
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 12px; margin: 16px 0; scroll-snap-type: x proximity; }
.shots figure { flex: none; margin: 0; width: min(64vw, 15rem); scroll-snap-align: start; }
.shots img { display: block; width: 100%; border-radius: 22px; border: 2px solid var(--shot-edge); }
.shots figcaption, .wide figcaption { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.wide { margin: 18px 0; }
.wide img { display: block; width: 100%; border-radius: 14px; border: 2px solid var(--shot-edge); }

/* ---- the foot */
footer { margin-top: 56px; padding-top: 18px; border-top: 2px solid var(--rule-2); color: var(--ink-2); font-size: 15px; }
footer .links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 10px; }
footer a { color: inherit; }
footer p { margin: 6px 0; max-width: 80ch; }
