@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;600;700&family=IBM+Plex+Serif:wght@400;600;700&family=IBM+Plex+Mono:wght@400;600&display=swap");

:root {
  --ink: #101214;
  --muted: #5a5f67;
  --paper: #ffffff;
  --line: #d9dde3;
  --accent: #15171a;
  --code: #f6f6f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "IBM Plex Serif", "Charter", "Iowan Old Style", "Palatino", serif;
  font-size: 18px;
  line-height: 1.38;
  letter-spacing: 0.002em;
}

main {
  width: min(72ch, 92vw);
  margin: 48px auto 72px;
}

header {
  margin-bottom: 28px;
}

.brand {
  font-family: "IBM Plex Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

h1, h2, h3 {
  font-family: "IBM Plex Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.55em;
}

h1 {
  font-size: clamp(2.1rem, 4.5vw, 2.9rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  margin-top: 1.85rem;
}

h3 {
  font-size: 1.05rem;
  margin-top: 1.2rem;
}

p {
  margin: 0 0 0.9em;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  font-family: "IBM Plex Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 0.88rem;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

nav a:hover {
  border-bottom-color: var(--accent);
}

section {
  padding-top: 6px;
}

.section-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

.callout {
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 0.95rem;
  color: var(--muted);
}

ul {
  padding-left: 1.2em;
}

li {
  margin: 0.2em 0;
}

code, pre {
  font-family: "IBM Plex Mono", "SFMono-Regular", "Menlo", monospace;
  font-size: 0.94em;
}

pre {
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 10px 0 18px;
}

pre code {
  color: inherit;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 14px;
  font-size: 0.93rem;
}

thead th {
  text-align: left;
  font-family: "IBM Plex Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding: 5px 4px;
}

tbody td {
  padding: 5px 4px;
  border-bottom: 1px solid #eceff3;
  vertical-align: top;
}

.tight th,
.tight td {
  padding: 4px 3px;
}

.small {
  color: var(--muted);
  font-size: 0.9rem;
}

.glyph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px 14px;
  margin: 10px 0 16px;
}

.glyph-item {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.glyph-symbol {
  font-family: "IBM Plex Sans", "Noto Sans Symbols2", "Noto Sans Symbols", sans-serif;
  font-size: 2.85rem;
  line-height: 1;
  margin-bottom: 4px;
}

.glyph-name {
  font-family: "IBM Plex Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.glyph-desc {
  font-size: 0.88rem;
  color: var(--muted);
}

.examples {
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.example-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #eceff3;
}

.example-row:last-child {
  border-bottom: 0;
}

.example-label {
  font-family: "IBM Plex Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}

.example-code {
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}

.example-code code {
  white-space: pre-wrap;
}

.keymap {
  margin: 10px 0 16px;
}

.keymap img {
  display: block;
  width: min(100%, 560px);
  border: 1px solid var(--line);
  background: #fff;
}

.keymap figcaption {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.cheat-sheet {
  break-before: page;
}

.cheat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 18px;
  margin-top: 10px;
}

.cheat-block h3 {
  font-size: 0.98rem;
  margin-top: 0.4rem;
}

.cheat-list {
  display: grid;
  gap: 6px;
}

.cheat-item {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 10px;
  align-items: baseline;
}

.cheat-item code {
  font-size: 0.92em;
}

body.cheat-only main {
  width: min(78ch, 94vw);
  margin: 36px auto 56px;
}

body.cheat-only header {
  margin-bottom: 20px;
}

body.cheat-only .section-rule {
  display: none;
}

body.cheat-only .cheat-sheet {
  break-before: auto;
}

footer {
  margin-top: 34px;
  font-family: "IBM Plex Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .example-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17.5px;
  }
  main {
    margin: 36px auto 64px;
  }
}

@media print {
  body {
    font-size: 11pt;
    line-height: 1.3;
    color: #000;
    background: #fff;
  }

  main {
    width: auto;
    margin: 0.6in 0.7in;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .no-print,
  nav,
  footer {
    display: none !important;
  }

  pre,
  .example-code {
    background: none;
    border-color: #bfc4ca;
  }

  .section-rule {
    margin: 18px 0;
  }

  .glyph-symbol {
    font-size: 24pt;
  }

  .cheat-grid {
    gap: 8pt 12pt;
  }

  .cheat-item {
    grid-template-columns: 1fr 1.5fr;
  }

  .keymap img {
    max-width: 6in;
  }
}
