/* Minor Software: one stylesheet, no fonts, no scripts, nothing remote.
   The palette and the drafting-sheet direction come from the product itself:
   paper ground, drafting blue for structure, measurement red for marks. */

:root {
  --paper: #f6f6f3;
  --panel: #ffffff;
  --ink: #14161a;
  --ink-2: #5a6068;
  --ink-3: #8b9098;
  --rule: #d9dbd5;
  --blue: #1e3d6b;
  --mark: #c0392b;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: 68ch;
  --spine: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131519;
    --panel: #1b1e24;
    --ink: #e8e9e4;
    --ink-2: #9aa0a6;
    --ink-3: #6d737a;
    --rule: #2e333b;
    --blue: #8fb2e0;
    --mark: #e5695c;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 24px 96px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: var(--spine);
}

/* --- masthead ---------------------------------------------------------- */

.top {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding: 40px 0 0;
  margin-bottom: 64px;
  font-family: var(--mono);
  font-size: 13px;
}

.top a { color: var(--ink-2); text-decoration: none; }
.top a:hover { color: var(--ink); }
.top .here { font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.top nav { display: flex; gap: 16px; margin-left: auto; }

/* --- the spine --------------------------------------------------------- */

/* A dimension line down the page. The ticks mark where one section ends and
   the next begins, which is information rather than decoration. */
main {
  position: relative;
  border-left: 1px solid var(--rule);
  padding-left: var(--spine);
  margin-left: calc(var(--spine) * -1);
}

main::before,
main::after {
  content: "";
  position: absolute;
  left: -6px;
  width: 11px;
  height: 1px;
  background: var(--mark);
}
main::before { top: 0; }
main::after { bottom: 0; }

section { position: relative; padding: 0 0 56px; }

section + section::before {
  content: "";
  position: absolute;
  left: calc(var(--spine) * -1 - 1px);
  top: -28px;
  width: 7px;
  height: 1px;
  background: var(--mark);
}

/* --- type -------------------------------------------------------------- */

h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 20px;
  max-width: 22ch;
}

h2 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 18px;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

p { margin: 0 0 16px; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

.lede { font-size: 19px; line-height: 1.55; color: var(--ink); }
.quiet { color: var(--ink-2); }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

code, .num { font-family: var(--mono); font-size: 0.92em; }

/* --- lists ------------------------------------------------------------- */

ul { margin: 0 0 16px; padding-left: 20px; max-width: 62ch; }
li { margin-bottom: 7px; }
li::marker { color: var(--ink-3); }

/* A definition row: mono term on the left, plain explanation on the right.
   Used for permissions and releases, where the term is the point. */
.rows { margin: 0; }
.rows > div {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 4px 20px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  max-width: 62ch;
}
.rows > div:last-child { border-bottom: 1px solid var(--rule); }
.rows dt { font-family: var(--mono); font-size: 13px; color: var(--ink); padding-top: 2px; }
.rows dd { margin: 0; color: var(--ink-2); }

/* --- call to action ---------------------------------------------------- */

.cta {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 6px;
  background: var(--blue);
  border: 1px solid var(--blue);
  color: var(--paper);
  text-decoration: none;
}
.cta:hover { filter: brightness(1.12); }
.cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.cta-note { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); margin-top: 12px; }

/* --- tool card --------------------------------------------------------- */

.tool {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  max-width: 62ch;
  margin-bottom: 12px;
}
.tool:hover { border-color: var(--ink-3); }
.tool:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tool p { margin: 0; color: var(--ink-2); }
.tool .badge {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: 2px;
}

/* The claim on this site is that nothing is loaded from anywhere else, so the
   page lists what it loads. Marked in the same red as every other measurement. */
.manifest {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  border-left: 2px solid var(--mark);
  padding: 2px 0 2px 16px;
  margin: 0;
  max-width: 62ch;
}
.manifest span { color: var(--ink); }

footer {
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
}
footer a { color: var(--ink-2); }

@media (max-width: 620px) {
  :root { --spine: 18px; }
  body { padding: 0 18px 72px; font-size: 15.5px; }
  h1 { font-size: 27px; }
  .lede { font-size: 17.5px; }
  .rows > div { grid-template-columns: 1fr; gap: 2px; }
  .top { margin-bottom: 44px; }
  .top nav { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
