/* docs.blancnote.app. Blanc's palette and type (BlancApp/CLAUDE.md, "Brand &
   design system"): warm white, warm charcoal, DM Serif Display for display
   type, DM Sans for everything else. Teal marks links, nothing decorative.
   Fonts are served from this site; nothing loads from anywhere else. */

@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/DMSans-Regular.ttf") format("truetype"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url("/assets/fonts/DMSans-Medium.ttf") format("truetype"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url("/assets/fonts/DMSans-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "DM Serif Display"; font-weight: 400; font-display: swap; src: url("/assets/fonts/DMSerifDisplay-Regular.ttf") format("truetype"); }

:root {
  color-scheme: light dark;
  --bg: #F9F8F6;
  --panel: #F2F0EC;
  --ink: #2C2C2A;
  --muted: #66655E;
  --line: rgba(0, 0, 0, 0.1);
  --accent: #085C51;
  --warn: #7A4F0E;
  --warn-bg: rgba(138, 90, 18, 0.08);
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1C1A;
    --panel: #262624;
    --ink: #E9E7E2;
    --muted: #A3A198;
    --line: rgba(255, 255, 255, 0.11);
    --accent: #1DB887;
    --warn: #D9A85A;
    --warn-bg: rgba(217, 168, 90, 0.1);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }

a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; top: 8px; padding: 6px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; z-index: 1; }
.skip:focus { left: 16px; }

/* ── Chrome ────────────────────────────────────────────────────────────── */

header.site { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px;
  padding: 18px 24px; border-bottom: 1px solid var(--line); }
.mark { font-family: var(--serif); font-size: 24px; line-height: 1; color: var(--ink); text-decoration: none; }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
header.site nav a { color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--ink); }

.draft-banner { margin: 0; padding: 10px 24px; background: var(--warn-bg); color: var(--warn); font-size: 14px; border-bottom: 1px solid var(--line); }

.frame { flex: 1 0 auto; width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 24px 72px; }
main { min-width: 0; max-width: 760px; }
.layout-page main { margin: 0 auto; }

footer.site { border-top: 1px solid var(--line); padding: 20px 24px; color: var(--muted); font-size: 13px; }
footer.site p { max-width: 1072px; margin: 0 auto; }
footer.site a { color: var(--muted); }

/* ── The docs: contents beside the page ────────────────────────────────── */

.layout-docs .frame { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
.contents { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; font-size: 13.5px; }
.contents-title, .contents summary { font-weight: 600; color: var(--ink); margin: 0; padding: 2px 0; }
.contents summary { cursor: pointer; }
.contents ul { list-style: none; margin: 8px 0 0; padding: 0; }
.contents li.depth-3 { padding-left: 12px; }
.contents a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; line-height: 1.4; }
.contents a:hover { color: var(--ink); }
.contents-narrow { display: none; }

@media (max-width: 880px) {
  .layout-docs .frame { display: block; }
  .contents { position: static; max-height: none; margin-bottom: 32px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
  .contents-wide { display: none; }
  .contents-narrow { display: block; }
}

/* ── Type ──────────────────────────────────────────────────────────────── */

h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 14px; }
h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.25; margin: 56px 0 12px; }
h3 { font-size: 19px; font-weight: 600; line-height: 1.35; margin: 36px 0 8px; }
h4 { font-size: 16px; font-weight: 600; margin: 28px 0 6px; }
h5 { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 20px 0 6px; }
h2, h3, h4 { scroll-margin-top: 16px; }
p, ul, ol { margin: 0 0 14px; }
li { margin: 4px 0; }
li > p { margin: 0; }
.lead { font-size: 18px; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
strong { font-weight: 600; }

code { font-family: var(--mono); font-size: 0.86em; background: var(--panel); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: break-word; }
pre { background: var(--panel); border-radius: 10px; padding: 14px 16px; margin: 0 0 16px; overflow-x: auto; font-size: 13px; line-height: 1.55; }
pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }

.table { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; font-weight: 600; color: var(--muted); }
td:first-child { white-space: nowrap; }
td.type code { white-space: nowrap; }

blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--warn); background: var(--warn-bg); border-radius: 0 8px 8px 0; }
blockquote p:last-child { margin-bottom: 0; }

/* ── The generated reference ───────────────────────────────────────────── */

.endpoint, .object { border-top: 1px solid var(--line); margin-top: 32px; }
.endpoint > h4, .object > h4 { margin-top: 20px; }
.route { font-size: 14px; }
.method { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; padding: 1px 6px; margin-right: 2px;
  border: 1px solid var(--line); border-radius: 4px; }
.scope { display: inline-block; color: var(--muted); margin-left: 8px; }
.tag { font-size: 12px; color: var(--muted); white-space: nowrap; }
.headers { color: var(--muted); }

@media (max-width: 600px) {
  header.site, .draft-banner, footer.site { padding-left: 16px; padding-right: 16px; }
  .frame { padding: 28px 16px 56px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; margin-top: 44px; }
  td:first-child { white-space: normal; }
}
