@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4f3ef;
  --ink: #111;
  --quiet: #686a67;
  --blue: #2256d8;
  --line: #c9c8c2;
  --green: #0f7138;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(17, 17, 17, 0.025) 1px, transparent 1px) 0 0 / 100% 4px,
    var(--paper);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  line-height: 1.7;
}

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.notes-nav,
.notes-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: 1.2rem 0;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notes-nav { border-bottom: 1px solid var(--line); }
.notes-nav a:first-child { color: var(--ink); font-weight: 700; text-decoration: none; }
.notes-nav div { display: flex; gap: 1rem; }

.word-note,
.notes-index {
  width: min(100% - 2rem, 46rem);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2rem;
  color: var(--quiet);
  font-size: 0.72rem;
}

.breadcrumbs span[aria-current="page"] {
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-meta,
.note-sources h2,
.notes-index time {
  color: var(--quiet);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 18ch;
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 7vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.note-deck {
  max-width: 58ch;
  margin: 1.5rem 0 2.5rem;
  color: #30312f;
  font-family: Georgia, serif;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  line-height: 1.55;
}

.word-note h2 {
  margin: 3.2rem 0 0.7rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.25;
}

.word-note p,
.note-sources li {
  font-family: Georgia, serif;
  font-size: 1.08rem;
}

.word-note p { margin: 0 0 1.2rem; }

.word-card {
  margin: 2.2rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.answer-card {
  margin: 2.2rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 5px solid var(--blue);
  background: #fff;
}

.answer-card strong {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--blue);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.answer-card p { margin: 0; }

.word-card strong { display: block; font-size: 1.2rem; }
.word-card span { color: var(--quiet); font-size: 0.85rem; }

.note-cta {
  margin: 3.5rem 0;
  padding: 1.5rem;
  color: #fff;
  background: var(--ink);
}

.note-cta p { margin-top: 0; font-family: "JetBrains Mono", monospace; }
.note-cta a { color: #fff; font-weight: 700; }

.note-sources {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.related-notes {
  margin: 3.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.related-notes ul { padding-left: 1.2rem; }
.related-notes li + li { margin-top: 0.7rem; }

.note-tags {
  margin: 0.25rem 0 0;
  color: var(--green) !important;
  font-family: "JetBrains Mono", monospace !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.08em;
}

.table-scroll {
  max-width: 100%;
  margin: 2rem 0;
  overflow-x: auto;
}

.table-scroll:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.86rem;
}

caption { margin-bottom: 0.8rem; color: var(--quiet); text-align: left; }
th, td { padding: 0.65rem 0.8rem; border: 1px solid var(--line); text-align: right; }
th[scope="row"] { color: var(--blue); }
thead th:nth-child(2), tbody th { text-align: left; }

.note-sources ol { padding-left: 1.25rem; }
.note-sources li + li { margin-top: 0.65rem; }

.notes-index h1 { max-width: none; }
.notes-list { margin-top: 3rem; padding: 0; list-style: none; }
.notes-list li { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.notes-list h2 { margin: 0.4rem 0; line-height: 1.2; }
.notes-list h2 a { color: var(--ink); }
.notes-list p { margin: 0; color: var(--quiet); font-family: Georgia, serif; font-size: 1.05rem; }

.notes-footer { border-top: 1px solid var(--line); }

@media (max-width: 36rem) {
  .notes-nav { align-items: flex-start; }
  .notes-nav div { flex-direction: column; gap: 0.35rem; text-align: right; }
  .word-note p, .note-sources li { font-size: 1rem; }
}

