/* Vouch — vouchdocs.dev. Plain CSS, light and dark from the system setting. */

@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url(fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url(fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url(fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC; }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url(fonts/instrument-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url(fonts/instrument-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-weight: 200 900; font-style: normal; font-display: swap; src: url(fonts/source-serif-4-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Source Serif 4"; font-weight: 200 900; font-style: normal; font-display: swap; src: url(fonts/source-serif-4-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-weight: 200 900; font-style: italic; font-display: swap; src: url(fonts/source-serif-4-latin-wght-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  /* Cool paper and ink: the blue of a current vouch, the amber of a stale one, as in the app. */
  --page: #edf0f3;
  --paper: #ffffff;
  --ink: #18202a;
  --ink-2: #4d5866;
  --ink-3: #7c8794;
  --rule: #d8dde3;
  --vouch: #3348c9;
  --vouch-soft: #e8ecfd;
  --stale: #a6510a;
  --stale-soft: #fdf1e3;
  --mark: #3348c9;
  --shadow: 0 1px 2px rgba(24, 32, 42, .06), 0 12px 32px -12px rgba(24, 32, 42, .18);
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", ui-serif, Georgia, serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #11151b;
    --paper: #191f27;
    --ink: #e7ebf0;
    --ink-2: #aab3bf;
    --ink-3: #7d8794;
    --rule: #2b333d;
    --vouch: #95a6ff;
    --vouch-soft: #222b4a;
    --stale: #f0a35c;
    --stale-soft: #3a2a1a;
    --mark: #95a6ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 17px/1.55 var(--sans); font-feature-settings: "ss01", "tnum" 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--vouch); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, [contenteditable]:focus-visible { outline: 2px solid var(--vouch); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.012em; }
h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; max-width: 22ch; }
h3 { font-size: 17px; line-height: 1.35; }
p { margin: 0; }
main > section { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 9vw, 112px) var(--gutter) 0; }

.button {
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 9px;
  background: var(--vouch); color: var(--paper); font-weight: 600; text-decoration: none; font-size: 16px;
}
.button:hover { filter: brightness(1.08); }
.button.small { height: 36px; padding: 0 14px; font-size: 15px; }
.quiet { color: var(--ink-2); font-weight: 500; text-decoration: none; }
.quiet:hover { color: var(--ink); text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 30px; }

/* ---------------------------------------------------------------- header */
.top { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 18px; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav a:not(.button) { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a:not(.button):hover { color: var(--ink); }

/* ---------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-top: clamp(32px, 6vw, 72px) !important; }
.hero h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.028em; max-width: 13ch; }
.lead { margin-top: 24px; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 46ch; }

/* The document: the one place the page spends its boldness. */
.demo { margin: 0; }
.doc { background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--rule); }
.doc-bar { display: flex; justify-content: space-between; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--ink-3); }
.doc-bar b { color: var(--ink); font-weight: 600; }
.who-next b { color: var(--ink-2); font-weight: 500; }
.doc-body { padding: 26px 22px 18px 0; }
.doc-title { font: 600 26px/1.2 var(--serif); letter-spacing: -.01em; margin: 0 0 14px calc(var(--margin) + 18px); }
.doc { --margin: 150px; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: grid; grid-template-columns: var(--margin) 1fr; column-gap: 18px; align-items: baseline; position: relative; }
.margin { display: grid; padding: 6px 0 6px 18px; font-size: 12px; line-height: 1.35; color: var(--ink-3); border-right: 2px solid transparent; transition: border-color .25s; }
.margin .name { color: var(--ink-2); font-weight: 500; }
.lines li[data-agent] .name { font-style: italic; font-weight: 400; }
.text { font: 400 18px/1.55 var(--serif); padding: 4px 6px; margin-left: -6px; border-radius: 5px; outline: none; cursor: text; transition: background-color .25s; }
.text:hover { background: color-mix(in srgb, var(--vouch-soft) 55%, transparent); }
.text:focus { background: var(--vouch-soft); }
.lines li.changed .margin { border-right-color: var(--mark); }
.lines li.changed .margin .name { color: var(--mark); }
.lines li.changed .text { background: color-mix(in srgb, var(--vouch-soft) 70%, transparent); }

.seal { min-height: 92px; display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin: 6px 18px 18px; border-radius: 10px; background: var(--vouch-soft); color: var(--vouch); transition: background-color .3s, color .3s; }
.seal-mark { width: 30px; height: 30px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.seal-mark .tick { stroke-width: 2; stroke-linecap: round; transition: opacity .2s; }
.seal-text { flex: 1; min-width: 0; }
.seal-head { font-weight: 600; font-size: 15px; line-height: 1.35; }
.seal-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.seal[data-state="stale"] { background: var(--stale-soft); color: var(--stale); }
.seal[data-state="stale"] .tick { opacity: 0; }
.seal[data-state="stale"] .seal-mark { stroke-dasharray: 3 2.4; }
.putback { flex: none; border: 1px solid currentColor; background: transparent; color: inherit; font: 600 14px var(--sans); border-radius: 7px; height: 32px; padding: 0 12px; cursor: pointer; }
.putback:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.hint { margin-top: 14px; font-size: 14px; color: var(--ink-3); text-align: center; }

/* ---------------------------------------------------------------- problem */
.narrow { max-width: 62ch; }
.narrow p, p.narrow { margin-top: 16px; color: var(--ink-2); font-size: 18px; }
.problem h2 { max-width: 20ch; }
.table-wrap { margin-top: 40px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 640px; }
caption { text-align: left; font-size: 14px; color: var(--ink-3); padding-bottom: 12px; }
th, td { text-align: left; vertical-align: top; padding: 14px 18px 14px 0; border-top: 1px solid var(--rule); }
thead th { font-size: 13.5px; font-weight: 500; color: var(--ink-3); border-top: 0; padding-top: 0; }
tbody th { font-weight: 600; width: 19%; }
td:nth-child(2) { width: 26%; color: var(--ink-2); }
tr.ours th, tr.ours td { color: var(--vouch); }
tr.ours th, tr.ours td { border-top: 2px solid var(--vouch); }

/* ---------------------------------------------------------------- rules and life */
.rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: 40px; }
.rule h3 { font: 600 21px/1.3 var(--serif); letter-spacing: -.005em; }
.rule p { margin-top: 12px; color: var(--ink-2); }

.steps { list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.steps li { counter-increment: step; padding: 22px 24px 0 0; border-top: 2px solid var(--rule); position: relative; }
.steps li::before { content: counter(step); position: absolute; top: -13px; left: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--page); border: 2px solid var(--rule); font-size: 12.5px; font-weight: 600; display: grid; place-items: center; color: var(--ink-2); }
.steps li:nth-child(2) { border-top-color: var(--vouch); }
.steps li:nth-child(2)::before { border-color: var(--vouch); color: var(--vouch); }
.steps li:nth-child(3) { border-top-color: var(--stale); }
.steps li:nth-child(3)::before { border-color: var(--stale); color: var(--stale); }
.steps li:nth-child(4) { border-top-color: var(--vouch); }
.steps li:nth-child(4)::before { border-color: var(--vouch); color: var(--vouch); }
.steps h3 { margin-top: 8px; }
.steps p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }

/* ---------------------------------------------------------------- screens */
.shots { display: grid; gap: clamp(48px, 7vw, 88px); }
.shot { margin: 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.shot:nth-child(2) { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.shot:nth-child(2) img { order: 2; }
.shot img { border-radius: 12px; border: 1px solid var(--rule); box-shadow: var(--shadow); background: #fff; }
.shot figcaption { color: var(--ink-2); font-size: 18px; max-width: 34ch; }
.shot figcaption b { display: block; color: var(--ink); font-weight: 600; font-size: 21px; font-family: var(--serif); margin-bottom: 8px; }

/* ---------------------------------------------------------------- who, under, close */
.who .narrow { margin-top: 16px; }
.roles tbody th { width: 22%; }
.roles td:nth-child(2) { width: 42%; color: var(--ink); }
.roles td:nth-child(3) { color: var(--ink-2); }

.under { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 88px); }
ul.plain { list-style: none; margin: 24px 0 0; padding: 0; }
ul.plain li { padding: 12px 0; border-top: 1px solid var(--rule); color: var(--ink-2); }
ul.plain li:first-child { border-top: 0; padding-top: 0; }
.not h2 { font-size: 22px; }

.close { text-align: left; padding-bottom: clamp(56px, 9vw, 112px) !important; }
.close h2 { font-size: clamp(30px, 4vw, 44px); max-width: 18ch; }
.close p { margin-top: 16px; color: var(--ink-2); font-size: 18px; max-width: 48ch; }

.foot { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 40px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--ink-3); }
.foot a { color: var(--ink-3); }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .rule-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .shot, .shot:nth-child(2) { grid-template-columns: 1fr; }
  .shot:nth-child(2) img { order: 0; }
  .under { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav a:not(.button) { display: none; }
  .doc { --margin: 0px; }
  .doc-body { padding: 20px 16px 12px; }
  .doc-title { margin-left: 0; }
  .lines li { grid-template-columns: 1fr; }
  .margin { padding: 8px 0 0; border-right: 0; border-left: 2px solid transparent; display: flex; gap: 6px; }
  .lines li.changed .margin { border-left-color: var(--mark); padding-left: 8px; }
  .text { margin-left: 0; padding: 2px 0 6px; font-size: 17px; }
  .who-next { display: none; }
  .seal { margin: 4px 12px 12px; flex-wrap: wrap; }
  .steps { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
  /* Tables become one block per row: the row's name, then each cell under its column's name. */
  table { min-width: 0; }
  thead { display: none; }
  caption { display: block; }
  table, tbody, tr, th, td { display: block; width: auto !important; }
  tbody tr { padding: 14px 0; border-top: 1px solid var(--rule); }
  tbody tr.ours { border-top: 2px solid var(--vouch); }
  tbody th, td { border: 0 !important; padding: 2px 0; }
  tbody th { font-size: 17px; margin-bottom: 4px; }
  td::before { content: attr(data-label); display: block; font-size: 13px; color: var(--ink-3); margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
