/* Lathewright. Modelled on the developer-tools grammar (see brand/brand-kit.md): white or near-black, one sans, one accent, mono for ids and labels. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-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: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-latin-600-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: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jetbrains-mono-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; }

:root {
  color-scheme: light dark;
  --bg: #FFFFFF;
  --panel: #F6F6F7;
  --text: #111113;
  --muted: #5C5F66;
  --line: #E4E5E9;
  --line-strong: #8B8E96;
  --accent: #1F4FE0;
  --accent-ink: #FFFFFF;
  --accent-soft: #EAF0FF;
  --code-bg: #0F1117;
  --code-text: #E6E8EF;
  --code-key: #9DB7FF;
  --code-str: #B5E3A8;
  --code-muted: #8A8F9C;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1120px;
  --measure: 64ch;
  --gutter: 16px;
  --radius: 8px;
  --radius-lg: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B0C;
    --panel: #141416;
    --text: #ECECEE;
    --muted: #A1A4AC;
    --line: #26272B;
    --line-strong: #5B5E66;
    --accent: #7B9CFF;
    --accent-ink: #0B1330;
    --accent-soft: #15203F;
    --code-bg: #141416;
    --code-text: #E6E8EF;
  }
}
@media (min-width: 768px) { :root { --gutter: 24px; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem); line-height: 1.08; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; margin-top: 1.5em; }
h2[id], h3[id] { scroll-margin-top: 1.5rem; }
p, ul, ol, dl { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
code, kbd { font-family: var(--mono); font-size: 0.88em; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 0.1em 0.35em; }
.lede { font-size: 1.125rem; line-height: 1.5; color: var(--muted); max-width: 56ch; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.mono { font-family: var(--mono); }
.eyebrow { font: 400 0.75rem/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; }
.eyebrow b { color: var(--accent); font-weight: 400; }

/* Layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.section { padding-block: 3rem; border-top: 1px solid var(--line); }
.section > h2:first-child, .section > .eyebrow + h2 { margin-top: 0; }
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); }
.hero h1 { max-width: 18ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin-top: 1.5rem; }
.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 100; background: var(--bg); color: var(--text); padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.skip:focus { top: 12px; }
.mt { margin-top: 1.5rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; min-height: 60px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 22px; height: 22px; color: var(--accent); display: block; }
.brand .mark svg, .footer-brand .mark svg { width: 100%; height: 100%; display: block; }
.brand .wordmark { display: block; }
.brand .wordmark svg { height: 15px; width: auto; display: block; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 20px; }
.nav-list li { margin: 0; }
.nav-list a { color: var(--muted); font-size: 0.9375rem; display: inline-block; padding: 6px 0; }
.nav-list a:hover { color: var(--text); text-decoration: none; }
.nav-list a[aria-current="page"] { color: var(--text); }
.header-cta { order: 2; }
@media (max-width: 719px) {
  .header-row nav { order: 3; width: 100%; }
  .nav-list { gap: 0 16px; }
  .nav-list a { font-size: 0.9rem; padding: 4px 0 8px; }
}

/* Buttons */
.button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font: 600 0.9375rem/1.3 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.button:hover { filter: brightness(1.1); text-decoration: none; }
.button:disabled { opacity: 0.6; cursor: default; }
.button.secondary { background: var(--bg); color: var(--text); border-color: var(--line-strong); }
.button.secondary:hover { filter: none; background: var(--panel); }
.button.small { padding: 7px 11px; font-size: 0.875rem; }
.text-link { font-size: 0.9rem; }

/* Grids and cells (the bordered-cell pattern) */
.cells { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin: 1.5rem 0 0; list-style: none; padding: 0; }
.cells > * { padding: 18px 20px; border-top: 1px solid var(--line); margin: 0; min-width: 0; }
.cells > :first-child { border-top: 0; }
@media (min-width: 640px) {
  .cells.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cells.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cells.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cells.two > *, .cells.three > *, .cells.four > * { border-top: 0; border-left: 1px solid var(--line); }
  .cells.two > :nth-child(2n+1), .cells.three > :nth-child(3n+1), .cells.four > :nth-child(4n+1) { border-left: 0; }
  .cells.two > :nth-child(n+3), .cells.three > :nth-child(n+4), .cells.four > :nth-child(n+5) { border-top: 1px solid var(--line); }
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.875rem; }
.source { font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em; }
.source small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.lane .eyebrow { margin-bottom: 0.6rem; }
.lane h3 { margin: 0 0 0.4rem; }
.lane p { margin: 0 0 0.8rem; color: var(--muted); }
.lane a.more { font-weight: 600; font-size: 0.9375rem; }
.fact h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.fact p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.fact p a { color: var(--accent); }

/* Cards */
.cards { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cards.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.cards li { margin: 0; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; }
.card h3 { margin: 0 0 0.25rem; font-size: 1.0625rem; }
.card h3 a { color: inherit; }
.card .id { font: 400 0.78rem/1.4 var(--mono); color: var(--muted); margin: 0 0 0.75rem; overflow-wrap: anywhere; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 0.25rem; }
.card-head h3 { margin-bottom: 0; }
.card-head.stacked { flex-direction: column; align-items: flex-start; gap: 6px; }
.card p { margin: 0 0 0.75rem; font-size: 0.9375rem; }
.card p:last-child { margin-bottom: 0; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; font-size: 0.84rem; margin: 0.5rem 0 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.meta dd.mono, .price { font-family: var(--mono); }
.badge { display: inline-block; font: 400 0.68rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 7px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.badge.live { border-color: var(--accent); color: var(--accent); }
.price { font-size: 1.05rem; font-weight: 400; margin: 0; white-space: nowrap; }
.price-card .actions { margin-top: auto; padding-top: 0.9rem; }
.links { font-size: 0.9rem; }

/* Product block (home) */
.product { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-top: 2rem; }
.product > * { min-width: 0; }
.product .card { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
@media (min-width: 860px) {
  .product { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .product .card { border-bottom: 0; border-right: 1px solid var(--line); }
}

/* Code blocks */
.code { background: var(--code-bg); color: var(--code-text); border-radius: 0; margin: 0; font: 400 0.8rem/1.6 var(--mono); overflow-x: auto; }
.code pre { margin: 0; padding: 16px 20px; }
.code-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 20px; font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--code-muted); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.code .k { color: var(--code-key); }
.code .s { color: var(--code-str); }
.code .c { color: var(--code-muted); }
.code-block { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin: 1rem 0 1.5rem; }
.code-block .code-head { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

/* Price groups */
.price-group { margin-top: 2.5rem; }
.price-group:first-child { margin-top: 0; }
.group-title { margin: 0 0 0.3rem; font-size: 1.35rem; }
.group-intro { color: var(--muted); max-width: 66ch; margin: 0; }
.group-intro + p { margin-top: 0.6rem; }

/* Notices */
.notice { border: 1px solid var(--line); background: var(--panel); padding: 16px 18px; border-radius: var(--radius-lg); margin: 1.5rem 0; max-width: var(--measure); }
.notice p:last-child { margin-bottom: 0; }
.notice .eyebrow { margin-bottom: 0.5rem; }
.disclosure-line { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }

/* Forms */
.form { max-width: 620px; }
.field { margin-top: 1rem; }
label { display: block; font-weight: 600; font-size: 0.9rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { display: block; width: 100%; margin-top: 6px; padding: 9px 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius); }
textarea { min-height: 160px; resize: vertical; }
textarea.short { min-height: 5em; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 1.2rem; }
.check label { font-weight: 400; font-size: 0.9rem; }
.check input { margin: 4px 0 0; flex: none; width: 18px; height: 18px; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { margin-top: 1rem; }
[hidden] { display: none !important; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
th { font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* Legal */
.toc { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.toc li { margin: 0; }
.legal-meta { font-size: 0.875rem; color: var(--muted); }
.page-legal h2 { margin-top: 2.8em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.page-legal h3 { margin-top: 1.8em; font-size: 1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding-block: 2.5rem 3rem; font-size: 0.9rem; color: var(--muted); }
.footer-grid { display: grid; gap: 2rem 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); margin-bottom: 1rem; }
.footer-brand .mark { width: 18px; height: 18px; color: var(--accent); }
.footer-brand .wordmark { display: block; }
.footer-brand .wordmark svg { height: 13px; width: auto; display: block; }
.disclosure { color: var(--text); font-size: 0.95rem; max-width: 56ch; margin-bottom: 1rem; }
.footer-legal { margin: 0 0 0.5rem; max-width: 56ch; }
.footer-legal a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, max-content)); gap: 8px 28px; }
.footer-links li { margin: 0; }
.footer-links a { color: var(--text); }
.footer-links a[aria-current="page"] { color: var(--muted); }

@media print { .site-header nav, .footer-nav, .skip, .button { display: none; } a { color: inherit; } }
