:root {
  --bg: #fbf6ee;
  --surface: #ffffff;
  --surface-2: #f4ece0;
  --ink: #1a1410;
  --ink-2: #5a4a3e;
  --ink-3: #8a7768;
  --line: #e8dccb;
  --accent: #b4532a;
  --accent-ink: #8f3d1b;
  --brand: #6b3f24;
  --focus: #2b6cb0;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(60 40 20 / 6%), 0 4px 16px rgb(60 40 20 / 6%);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --glyph: "Segoe UI Symbol", "Apple Symbols", "STIX Two Math", "Cambria Math", "Noto Sans Symbols 2", "Noto Sans Math", var(--font);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15110e;
    --surface: #1e1915;
    --surface-2: #27201b;
    --ink: #f3ebe1;
    --ink-2: #cbbcad;
    --ink-3: #9a8a7b;
    --line: #372d25;
    --accent: #f0915f;
    --accent-ink: #f5ad86;
    --brand: #e9b48c;
    --focus: #8cc4ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 25%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--font);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code, kbd { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
kbd { background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px; padding: 0.05em 0.4em; border-radius: 6px; white-space: nowrap; }
pre { background: var(--surface-2); padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 0.9em; }
pre code { background: none; padding: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand svg { width: 28px; height: 28px; color: var(--accent); }
.site-nav { margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 0.95rem; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
@media (max-width: 760px) {
  .header-inner { gap: 4px; padding-top: 10px; }
  .site-nav { margin: 0 -16px; padding: 0 12px 8px; width: calc(100% + 32px); }
}

/* Breadcrumbs */
.crumbs { margin: 22px 0 0; font-size: 0.88rem; color: var(--ink-3); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-3); }

/* Page head */
.page-head { padding: 18px 0 8px; }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--ink-2); margin: 0 0 18px; }
.home-head { text-align: center; padding: 40px 0 12px; }
.home-head h1 { font-size: clamp(2rem, 6vw, 3.1rem); margin-bottom: 10px; }
.home-head .lead { max-width: 620px; margin: 0 auto 8px; }
.home-head .wink { color: var(--ink-3); font-size: 0.98rem; margin: 0; }

/* Article body */
.prose h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.2em 0 0.6em; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.12rem; margin: 1.8em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 650; color: var(--ink-2); background: var(--surface-2); }
.prose blockquote { margin: 1.2em 0; padding: 4px 18px; border-left: 4px solid var(--accent); color: var(--ink-2); }
.prose img { height: auto; }
.note { background: var(--surface-2); border-radius: var(--radius); padding: 14px 18px; margin: 1.4em 0; }
.note p { margin: 0.3em 0; }

/* Copy buttons */
.copy-hero { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 22px; }
.copy-big {
  display: inline-flex; align-items: center; gap: 16px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 22px 10px 14px; box-shadow: var(--shadow); font: inherit;
}
.copy-big:hover { border-color: var(--accent); }
.copy-big .glyph { font-family: var(--glyph); font-size: 3rem; line-height: 1; min-width: 64px; text-align: center; }
.copy-big .copy-label { font-weight: 700; color: var(--accent-ink); }
.copy-big .copy-sub { display: block; font-weight: 400; font-size: 0.85rem; color: var(--ink-3); }
.copy-inline {
  font-family: var(--glyph); font-size: 1.1em; cursor: pointer; padding: 0 0.4em; margin: 0 0.1em;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 7px; line-height: 1.5;
}
.copy-inline:hover { border-color: var(--accent); }

/* Symbol grid */
.group-title { font-size: 1.05rem; color: var(--ink-2); margin: 34px 0 12px; font-weight: 650; }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sym { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.sym button {
  all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px 10px;
}
.sym button { flex: 1; justify-content: center; }
.sym button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.sym button:hover .sym-glyph { color: var(--accent); }
.sym-glyph { font-family: var(--glyph); font-size: 2.6rem; line-height: 1.2; min-height: 1.2em; }
.sym-name { font-size: 0.82rem; color: var(--ink-2); text-align: center; line-height: 1.3; }
.sym a { font-size: 0.78rem; text-align: center; padding: 6px; border-top: 1px solid var(--line); color: var(--ink-3); text-decoration: none; }
.sym a:hover { color: var(--accent-ink); background: var(--surface-2); }

/* Code table */
.codes td:first-child { color: var(--ink-2); white-space: nowrap; }
.codes td code { white-space: nowrap; }

/* Cards and lists */
.card-list { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card-list li { margin: 0 !important; }
.card-list a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.card-list a:hover { border-color: var(--accent); }
.card-list strong { display: block; margin-bottom: 2px; }
.card-list span { color: var(--ink-2); font-size: 0.92rem; line-height: 1.45; display: block; }
.hub-links { margin: 30px 0 10px; }

/* Downloads and logo gallery */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 20px 0; }
.design { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.design-art { aspect-ratio: 1; display: grid; place-items: center; background: var(--surface-2); border-radius: 10px; color: var(--ink); }
.design-art svg { width: 62%; height: 62%; }
.design h3 { margin: 4px 0 0; font-size: 1rem; }
.design p { margin: 0; font-size: 0.88rem; color: var(--ink-2); }
.dl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.dl a { font-size: 0.8rem; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); }
.dl a:hover { border-color: var(--accent); color: var(--accent-ink); }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 20px 0; }
.logo-tile { border-radius: var(--radius); padding: 26px 20px; display: flex; align-items: center; gap: 12px; min-height: 120px; }
.logo-tile svg { width: 52px; height: 52px; flex: none; }
.logo-tile span { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.logo-tile small { display: block; font-weight: 500; font-size: 0.78rem; letter-spacing: 0; opacity: 0.75; }

/* Font specimen */
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.font-cell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; }
.font-cell .spec { font-size: 3rem; line-height: 1.1; }
.font-cell .spec span { color: var(--ink-3); font-size: 0.6em; }
.font-cell small { display: block; color: var(--ink-2); font-size: 0.82rem; margin-top: 6px; }

/* Offers */
.offer { margin: 2em 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.offer-heading { font-weight: 700; margin: 0 0 12px; }
.offer-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.offer-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 10px; background: var(--surface-2); text-decoration: none; color: var(--ink); }
.offer-card:hover { outline: 2px solid var(--accent); }
.offer-card span { font-size: 0.9rem; color: var(--ink-2); line-height: 1.45; }
.offer-card .offer-cta { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--accent-ink); }
.offer-disclosure { margin: 12px 0 0; font-size: 0.8rem; color: var(--ink-3); }

/* Promo slots */
.promo { display: flex; justify-content: center; margin: 2em auto; }
.promo a { display: block; line-height: 0; border-radius: 16px; }
.promo img { display: block; height: auto; }
.promo-rect { min-height: 250px; }
.promo-banner { margin: 0 auto 28px; padding: 0 16px; }
.promo-banner img { width: 728px; }

/* Article footer */
.article-foot { margin: 3em 0 0; padding-top: 1.4em; border-top: 1px solid var(--line); }
.article-foot h2 { font-size: 1.1rem; margin: 0 0 12px; }
.share-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 26px; color: var(--ink-3); font-size: 0.88rem; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit; font-weight: 650; font-size: 0.95rem;
  background: var(--ink); color: var(--bg); border: 0; border-radius: 999px; padding: 9px 18px; text-decoration: none;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn svg { width: 18px; height: 18px; }

/* Footer */
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--surface-2); padding: 34px 0 26px; font-size: 0.92rem; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.footer-cols h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin: 0 0 8px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin: 4px 0; }
.footer-cols a { color: var(--ink-2); text-decoration: none; }
.footer-cols a:hover { color: var(--accent-ink); text-decoration: underline; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--ink-3); }
.footer-bottom p { margin: 0; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 650;
  transition: opacity 0.18s, transform 0.18s; z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* 404 */
.not-found { text-align: center; padding: 60px 0 20px; }
.not-found .big { font-size: 6rem; line-height: 1; color: var(--accent); margin: 0; }
