/* ============================================================================
   WCKD — one stylesheet, no framework, no JavaScript (brand/kit.json, BRAND.md).
   Everything in JetBrains Mono, black on white, 2 px rules framing the page. The signal is
   the pixel symbol and the square that ends a headline; text in it only where it must be
   read (links on hover, focus). White by default, ink when the system asks for dark.
   ========================================================================== */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/lab/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/lab/inter-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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;
}

:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #6e6a64;
  --rule: #e4e1db;
  --rule-strong: #d3d0c9;
  --wash: #f6f5f2;
  --accent: #111111;
  --mark: #111111;

  --sans: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: var(--sans);
  --mono: var(--sans);

  --page: 1120px;
  --measure: 72ch;
  --gutter: 40px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111111;
    --ink: #eeebe5;
    --muted: #9a958c;
    --rule: #2a2826;
    --rule-strong: #3a3733;
    --wash: #1a1918;
    --accent: var(--accent-ink, var(--accent-paper));
    --mark: var(--mark-ink, var(--mark-paper));
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection {
  background: color-mix(in srgb, var(--accent) 18%, var(--paper));
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ink);
  text-decoration-color: var(--mark);
}
:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 3px;
}
img,
svg {
  display: block;
  max-width: 100%;
}
hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--ink);
}

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

.masthead {
  border-bottom: 1px solid var(--rule);
}
.masthead__in {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--ink);
}
.brand__mark {
  display: inline-flex;
  flex: none;
  height: 14px;
  color: var(--mark);
}
.brand__mark svg {
  height: 14px;
  width: auto;
  display: block;
}
.brand {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0;
}
.brand__sub {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 13px;
  color: var(--muted);
}
.nav a {
  text-decoration: none;
  color: var(--muted);
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink);
}
.nav a[aria-current='page'] {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.nav__version {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
}
h1 {
  font-family: var(--sans);
  font-size: clamp(2.1rem, 4.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 20ch;
}
h2 {
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 28px 0 8px;
}
h3:first-child {
  margin-top: 0;
}
p {
  margin: 0 0 1em;
  max-width: var(--measure);
}
.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 62ch;
  margin: 18px 0 0;
}
.meta {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}
.meta a {
  color: inherit;
}
.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.small {
  font-size: 13px;
  color: var(--muted);
}
.mono {
  font-family: var(--mono);
  font-size: 13px;
}
.serif {
  font-family: var(--serif);
}
blockquote {
  margin: 24px 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.4;
  max-width: 34ch;
}
blockquote p {
  margin: 0;
}

/* --------------------------------------------------------------- sections */

main {
  padding-top: 40px;
  padding-bottom: 24px;
}
section {
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}
main > section:first-of-type {
  border-top: 0;
  padding-top: 28px;
}
section > :last-child {
  margin-bottom: 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-head h2 {
  margin-bottom: 0;
}
.section-head .label {
  margin: 0;
}
.rule {
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}
.note {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 14px;
  color: var(--muted);
  font-size: 14px;
  max-width: 62ch;
  margin: 18px 0;
}
.note strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------------------------------------------------------------- actions */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 22px 0 0;
}
.button {
  display: inline-block;
  padding: 8px 13px;
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
}
.button:hover {
  background: var(--ink);
  color: var(--paper);
}
.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.button--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.text-link {
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ----------------------------------------------------------------- tables */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 14px 8px 0;
  border-bottom: 1px solid var(--ink);
  vertical-align: bottom;
  white-space: nowrap;
}
td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
td:last-child,
th:last-child {
  padding-right: 0;
}
td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td.mono,
th.mono {
  font-family: var(--mono);
  font-size: 12px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 22px 0;
}
.facts > div {
  padding: 12px 16px 12px 0;
  border-right: 1px solid var(--rule);
}
.facts > div:last-child {
  border-right: 0;
}
.facts dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.facts dd {
  margin: 0;
  font-size: 14px;
}

/* ------------------------------------------------------------------- code */

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 4px;
  border: 1px solid var(--rule);
  background: var(--wash);
  white-space: nowrap;
}
pre {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--wash);
  border: 1px solid var(--rule);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  tab-size: 2;
}
pre code {
  padding: 0;
  border: 0;
  background: none;
  white-space: pre;
  font-size: inherit;
}
pre .comment {
  color: var(--muted);
}

/* ----------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--rule);
  margin-top: 56px;
  padding: 24px 0 40px;
  font-size: 13px;
  color: var(--muted);
}
.footer__in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}
.footer p {
  margin: 0;
  max-width: 60ch;
}
.footer a {
  color: var(--muted);
}
.footer a:hover {
  color: var(--ink);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

/* ------------------------------------------------------------ publications */

.doc {
  max-width: 72ch;
}
.doc h2 {
  margin-top: 40px;
}
.doc h2:first-child {
  margin-top: 0;
}
.doc ul,
.doc ol {
  max-width: 68ch;
  padding-left: 1.2em;
  margin: 12px 0 20px;
}
.doc li {
  margin-bottom: 5px;
}
.list-plain {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  border-top: 1px solid var(--rule);
}
.list-plain li {
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
  font-size: 14px;
}
.list-plain b {
  font-weight: 600;
}

details {
  border-bottom: 1px solid var(--rule);
}
details summary {
  cursor: pointer;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  list-style-position: outside;
}
details summary::marker {
  color: var(--muted);
}
details .details-body {
  padding: 4px 0 18px;
  max-width: 68ch;
}
details .details-body p,
details .details-body li {
  font-size: 14px;
}

/* ------------------------------------------------------------------ brand */

.swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 20px 0;
}
.swatch {
  background: var(--paper);
  padding: 12px;
}
.swatch span {
  display: block;
  height: 48px;
  margin-bottom: 8px;
  border: 1px solid var(--rule);
}
.swatch b {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.swatch small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.specimen {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.specimen:last-child {
  border-bottom: 0;
}
.specimen p {
  margin: 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.grid-2 > * {
  min-width: 0;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 760px) {
  :root {
    --gutter: 18px;
  }
  .masthead__in {
    display: block;
  }
  .nav {
    margin-top: 10px;
    gap: 3px 14px;
  }
  h1 {
    font-size: clamp(2.2rem, 9vw, 3rem);
  }
  .lede {
    font-size: 17px;
  }
  main {
    padding-top: 28px;
  }
  section {
    padding: 28px 0;
  }
  .facts {
    grid-template-columns: 1fr 1fr;
  }
  .facts > div:nth-child(2n) {
    border-right: 0;
  }
  .swatches,
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .footer__in {
    display: block;
  }
  .footer__links {
    margin-top: 10px;
  }
  table {
    font-size: 13px;
  }
  th,
  td {
    padding-right: 10px;
  }
}

@media (max-width: 480px) {
  .swatches {
    grid-template-columns: 1fr;
  }
  .facts {
    grid-template-columns: 1fr;
  }
  .facts > div {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .facts > div:last-child {
    border-bottom: 0;
  }
}

@media print {
  .masthead,
  .footer,
  .actions {
    display: none;
  }
  body {
    font-size: 11pt;
  }
  a {
    text-decoration: none;
  }
}

/* --------------------------------------------------------- release notes */

.release-notes {
  max-width: 72ch;
  padding-top: 4px;
}
.release-notes p {
  margin: 0 0 0.8em;
  font-size: 14px;
}
.release-notes .release__h {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 6px;
}
.release-notes ul {
  margin: 0 0 1em;
  padding-left: 1.1em;
  max-width: 68ch;
}
.release-notes li {
  font-size: 14px;
  margin-bottom: 3px;
}
.release-notes pre {
  font-size: 12px;
}
.release-notes code {
  white-space: normal;
}
.release-notes pre code {
  white-space: pre;
}


/* ----------------------------------------------- v3: the frame and the voice of type */

body {
  font-size: 16px;
  line-height: 1.6;
}
.masthead {
  border-bottom: 2px solid var(--rule-strong);
}
.masthead__in {
  align-items: center;
  padding-block: 28px;
}
.brand {
  font-size: 17px;
}
.brand__sub {
  font-size: 13px;
}
.nav {
  gap: 0;
  font-size: 14px;
}
.nav a {
  padding: 0 14px;
  line-height: 1.2;
}
.nav a + a {
  border-left: 1px solid var(--ink);
}
.nav a:last-child {
  padding-right: 0;
}
.nav a[aria-current='page'] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
h1,
h2,
h3 {
  font-family: var(--mono);
  letter-spacing: 0;
}
h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  text-transform: lowercase;
  max-width: 28ch;
}
/* A headline ends in the brand's pixel square, where another site would put a period. */
h1::after {
  content: '';
  display: inline-block;
  width: 0.3em;
  height: 0.3em;
  margin-left: 0.12em;
  background: var(--mark);
}
h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}
h3 {
  font-size: 16px;
  font-weight: 700;
}
.lede {
  font-size: 17px;
  line-height: 1.6;
  max-width: 64ch;
}
.label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.button {
  font-family: var(--mono);
  border-radius: 0;
}
.button--primary,
.button--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.button--primary:hover {
  background: var(--muted);
  border-color: var(--muted);
}
a:hover {
  color: var(--ink);
  text-decoration-color: var(--mark);
  text-decoration-thickness: 2px;
}
::selection {
  background: color-mix(in srgb, var(--mark) 35%, var(--paper));
}
pre {
  border: 1px solid var(--rule);
  border-radius: 0;
}
.footer {
  border-top: 2px solid var(--rule-strong);
  margin-top: 72px;
  font-size: 14px;
}
.facts dt {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}
th {
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
@media (max-width: 760px) {
  :root {
    --gutter: 22px;
  }
  .masthead__in {
    padding-block: 22px;
  }
  .nav {
    gap: 6px 16px;
  }
  .nav a,
  .nav a:last-child {
    padding: 0;
  }
  .nav a + a {
    border-left: 0;
  }
}
main.wrap {
  padding-top: 54px;
  padding-bottom: 24px;
}
@media (max-width: 760px) {
  main.wrap {
    padding-top: 34px;
  }
}
