/* Documentation presentation. Website implementation: src/styles/global.css.
   This file deliberately does not change the bc-* / bca-* app library. */
@font-face {
  font-family: "Basic Chaos Handwriting";
  src: url("/fonts/BasicChaos-Bold.woff2?v=1.012") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  --field: #4c7a58;
  --field-text: #f5f5f5;
  --field-loud: #9ad6fb;
  --bg: #ececec;
  --surface: #f5f6f5;
  --text: #333333;
  --text-muted: #5a656b;
  --rule: #333333;
  --rule-soft: #b9c0c0;
  --chip: #dde1e1;
  --link-hover: #2f7fbe;
  --measure: 1180px;
  --pad: clamp(18px, 4vw, 56px);
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --handwriting: "Basic Chaos Handwriting", var(--display);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --field: #2c4733;
    --bg: #141617;
    --surface: #1d2022;
    --text: #e9e9e6;
    --text-muted: #a3adb2;
    --rule: #d9d9d5;
    --rule-soft: #4a5054;
    --chip: #2c3134;
    --link-hover: #87cefa;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: inherit; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }
img { display: block; max-width: 100%; }
code { font: .88em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
p code, li code { background: var(--chip); padding: 2px 5px; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; }
h2 { margin: 0; font-size: clamp(34px, 5vw, 64px); line-height: 1; }
h3 { margin: 0 0 12px; font-size: 25px; line-height: 1.15; }
ul, ol { padding-left: 1.2em; }
li + li { margin-top: 10px; }
.ds-shell { width: min(var(--measure), calc(100% - var(--pad) * 2)); margin-inline: auto; }
.ds-skip { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 10px 14px; background: var(--surface); transform: translateY(-180%); }
.ds-skip:focus { transform: none; }
.ds-header, .ds-hero { background: var(--field); color: var(--field-text); }
.ds-header .ds-shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.ds-wordmark { font: 700 32px/1 var(--handwriting); font-synthesis: none; white-space: nowrap; text-decoration: none; color: var(--field-loud); }
.ds-header nav { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 14px; }
.ds-hero { padding: clamp(56px, 8vw, 112px) 0 clamp(48px, 7vw, 96px); }
.ds-kicker { margin-bottom: 24px; font-size: 13px; font-weight: 700; }
.ds-hero h1 { max-width: 1000px; margin: 0 0 36px; font-size: clamp(52px, 9vw, 116px); font-weight: 800; line-height: .9; }
.ds-lede { max-width: 760px; font-size: clamp(20px, 2.3vw, 28px); line-height: 1.3; }
.ds-hero .ds-date { margin: 36px 0 0; font-size: 13px; }
.ds-toc { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-block: 24px; font-size: 14px; font-weight: 700; }
.ds-section { padding-block: clamp(48px, 7vw, 96px); scroll-margin-top: 24px; }
.ds-section-head { position: relative; margin-bottom: 32px; padding-bottom: 24px; }
.ds-section-head::after { content: ""; position: absolute; inset: auto 0 0; height: 4.5px; background: var(--rule); mask: url("/hand/lines/thick-long-1.png") center / 100% 100% no-repeat; }
.ds-intro { max-width: 760px; margin-bottom: 32px; font-size: 19px; line-height: 1.55; }
.ds-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.ds-grid > *, .ds-pair > * { min-width: 0; }
.ds-note { color: var(--text-muted); font-size: 14px; }
.ds-type-sample { background: var(--field); color: var(--field-text); padding: clamp(24px, 4vw, 56px); margin-block: 32px; }
.ds-type-hand { margin: 12px 0 36px; color: var(--field-loud); font: 700 clamp(56px, 9vw, 112px)/.9 var(--handwriting); font-synthesis: none; }
.ds-type-display { margin: 0 0 24px; font: 800 clamp(38px, 6vw, 82px)/.86 var(--display); letter-spacing: -.02em; }
.ds-type-sample > p:last-child { max-width: 600px; margin: 0; font-size: 20px; line-height: 1.55; }
.ds-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
caption { text-align: left; padding: 0 0 12px; color: var(--text-muted); }
th, td { text-align: left; vertical-align: top; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule-soft); }
th { font-weight: 700; }
th:first-child { width: 28%; }
thead th { color: var(--text-muted); font-size: 13px; }
.ds-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-block: 32px; }
.ds-theme { padding: 28px; }
.ds-theme--day { background: #f5f6f5; color: #333333; }
.ds-theme--night { background: #141617; color: #e9e9e6; }
.ds-theme > p { font-size: 14px; }
.ds-theme__band { margin: 24px 0; padding: 28px 20px; background: #4c7a58; color: #f5f5f5; }
.ds-theme--night .ds-theme__band { background: #2c4733; }
.ds-theme__band strong { display: block; margin-bottom: 8px; color: #9ad6fb; font: 700 38px/1 var(--handwriting); }
.ds-theme__surface { padding: 18px; background: #f5f6f5; outline: 1px solid #b9c0c0; }
.ds-theme--night .ds-theme__surface { background: #1d2022; outline-color: #4a5054; }
.ds-palettes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 32px 0; }
.ds-palette { background: var(--sample-field); color: var(--sample-text); padding: 24px 20px; }
.ds-palette strong { display: block; margin-bottom: 16px; color: var(--sample-loud); font-size: 24px; line-height: 1.15; }
.ds-palette p { font-size: 13px; margin: 0; }
.ds-palette code { font-size: 12px; }
.ds-example { position: relative; padding: 28px; background: var(--surface); }
.ds-example--card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--rule); mask: url("/hand/lines/medium-1.png") left top / 100% 4px no-repeat, url("/hand/lines/medium-2.png") left bottom / 100% 4px no-repeat, url("/hand/lines/medium-3-v.png") left top / 4px 100% no-repeat, url("/hand/lines/medium-1-v.png") right top / 4px 100% no-repeat; }
.ds-example-meta { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 32px; color: var(--text-muted); font-size: 11px; font-weight: 800; }
.ds-example h3 { font-size: clamp(28px, 4vw, 44px); }
.ds-tag { display: inline-block; padding: 6px 8px; background: var(--chip); font-size: 10px; font-weight: 800; }
.ds-example--field { background: var(--field); color: var(--field-text); }
.ds-example--field summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.ds-example--field details p { margin: 24px 0 0; }
.ds-arrow { display: inline-block; height: .7em; aspect-ratio: 1.506; background: currentColor; mask: url("/hand/arrows/right.png") center / contain no-repeat; }
.ds-drawings { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; margin: 32px 0; padding: 32px; background: var(--field); color: var(--field-loud); }
.ds-drawing { width: 64px; height: 48px; background: currentColor; mask: var(--drawing) center / contain no-repeat; }
.ds-sources { background: var(--surface); }
.ds-resources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ds-resource { display: block; padding: 24px; background: var(--bg); font-size: 21px; font-weight: 700; }
.ds-resource span { display: block; margin-top: 8px; font-size: 14px; font-weight: 400; color: var(--text-muted); }
.ds-prose { max-width: 760px; font-size: 18px; line-height: 1.72; padding-block: 56px 96px; }
.ds-prose h2 { margin: 64px 0 24px; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; }
.ds-prose h3 { margin-top: 40px; }
.ds-footer { padding-block: 32px; background: #1d1f21; color: #f5f5f5; font-size: 14px; }
@media (max-width: 850px) {
  .ds-grid { grid-template-columns: 1fr; gap: 24px; }
  .ds-palettes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-header .ds-shell { align-items: flex-start; flex-direction: column; padding-block: 20px; }
}
@media (max-width: 560px) {
  .ds-wordmark { font-size: 28px; }
  .ds-pair, .ds-resources { grid-template-columns: 1fr; }
  .ds-theme, .ds-example { padding: 24px; }
  .ds-palettes { grid-template-columns: 1fr; }
  .ds-toc { gap: 12px 20px; }
  th, td { padding-right: 12px; min-width: 110px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
