/* ingrained.dev: the public site.
 *
 * Paper and ink with one accent, from site-assets/ingrained-logo/brand-tokens.css.
 * The accent is spent only on link underlines, the focus ring, and the mark
 * that an entry arrived in a terminal. Everything else is ink on paper.
 * The page loads nothing from anywhere else: no fonts, scripts or trackers.
 */
:root {
  --paper: #f4f3f0;
  --ink: #141516;
  --mute: #6b6b66;
  --line: #dedcd6;
  --code: #ffffff;
  --accent: #2f9a10;
  --accent-text: #2a7a12;
  --sans: Inter, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --mono: "SF Mono", Menlo, "JetBrains Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1012;
    --ink: #f4f3f0;
    --mute: #8a8a84;
    --line: #26282c;
    --code: #17191c;
    --accent: #8cf545;
    --accent-text: #8cf545;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } }

/* ---- top and bottom */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0; }
.top .brand { display: block; color: var(--ink); text-decoration: none; }
.top .brand svg { display: block; height: 28px; width: auto; }
.top nav { display: flex; gap: 24px; font-size: 15px; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.foot { border-top: 1px solid var(--line); margin-top: 112px; padding: 28px 0 56px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--mute); }
.foot a { color: var(--mute); text-decoration-thickness: 1px; }
.foot .grow { flex: 1 1 auto; }

/* ---- the opening */
.open { padding: 72px 0 0; }
.open h1 {
  font-size: clamp(34px, 6.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
  max-width: 17ch;
}
.open .lede { font-size: clamp(18px, 2.1vw, 21px); line-height: 1.5; color: var(--mute); max-width: 54ch; margin: 28px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 36px; }
.button {
  display: inline-block; background: var(--ink); color: var(--paper);
  text-decoration: none; font-weight: 500; font-size: 16px;
  padding: 13px 20px; border-radius: 8px;
}
.button:hover { opacity: 0.88; }
.actions .note { color: var(--mute); font-size: 15px; }

/* ---- the two sessions
 * The one place the electric green is used at full strength. A terminal is
 * dark in either theme, and on ink the green is legible as text, so the
 * moment an entry is saved, and the moment it arrives, are what the eye
 * finds first on the page. */
.sessions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 72px; }
@media (max-width: 800px) { .sessions { grid-template-columns: 1fr; } }
.session { --t-ink: #f4f3f0; --t-mute: #8a8a84; --t-line: #26282c; --electric: #8cf545;
  background: #0f1012; color: var(--t-ink); border: 1px solid var(--t-line); border-radius: 12px; overflow: hidden; }
.session .who { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--t-line); font-size: 13px; color: var(--t-mute); }
.session pre { margin: 0; padding: 18px; font: 13.5px/1.75 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.session .person { color: var(--t-ink); }
.session .dim { color: var(--t-mute); }
.session .given { display: block; margin: 8px 0; padding: 4px 0 4px 14px; border-left: 2px solid var(--electric); }
.session .ok { color: var(--electric); }
.session .ok::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--electric);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--electric) 22%, transparent); margin-right: 9px; vertical-align: 1px; }
.caption { color: var(--mute); font-size: 15px; margin: 16px 0 0; max-width: 70ch; }

/* ---- sections */
section.block { margin-top: 112px; display: grid; grid-template-columns: 5fr 7fr; gap: 24px 56px; }
@media (max-width: 800px) { section.block { grid-template-columns: 1fr; margin-top: 80px; } }
section.block h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; margin: 0; max-width: 16ch; }
section.block p { margin: 0 0 18px; max-width: 60ch; }
section.block p:last-child { margin-bottom: 0; }

ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
ol.steps li { counter-increment: step; display: grid; grid-template-columns: 2.2em 1fr; padding: 18px 0; border-top: 1px solid var(--line); }
ol.steps li:first-child { border-top: 0; padding-top: 0; }
ol.steps li::before { content: counter(step); font: 14px/1.9 var(--mono); color: var(--mute); }
ol.steps strong { font-weight: 500; display: block; }
ol.steps span { color: var(--mute); }

dl.boundary { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
@media (max-width: 520px) { dl.boundary { grid-template-columns: 1fr; gap: 28px; } }
dl.boundary dt { font-weight: 500; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
dl.boundary dd { margin: 0 0 6px; color: var(--mute); }

code { font: 0.9em var(--mono); background: var(--code); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }

/* ---- the legal pages */
.doc { max-width: 68ch; padding: 56px 0 0; }
.doc h1 { font-size: clamp(30px, 4.5vw, 44px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; margin: 0 0 8px; }
.doc .dated { color: var(--mute); font-size: 15px; margin: 0 0 40px; }
.doc h2 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 500; margin: 48px 0 12px; }
.doc p, .doc li { color: var(--ink); }
.doc p { margin: 0 0 16px; }
.doc ul { margin: 0 0 16px; padding-left: 1.2em; }
.doc li { margin-bottom: 8px; }
.doc .summary { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; margin: 0 0 40px; }
.doc .summary p:last-child { margin-bottom: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 16px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 500; }
@media (max-width: 520px) { .doc table, .doc tbody, .doc tr, .doc td, .doc th { display: block; } .doc thead { display: none; } .doc td { border: 0; padding: 0 0 4px; } .doc tr { border-bottom: 1px solid var(--line); padding: 12px 0; } .doc td:first-child { font-weight: 500; } }

/* ---- narrow screens */
.sessions > *, section.block > * { min-width: 0; }
@media (max-width: 560px) {
  .top nav a.wide { display: none; }
  .open { padding-top: 40px; }
  .session pre { font-size: 12.5px; padding: 14px; }
  .session .who { padding: 10px 14px; }
}
