:root {
  --paper: #f4efe6;
  --sheet: #fffdf8;
  --ink: #1c1d1f;
  --mute: #5e5a53;
  --rule: #d7cfc3;
  --mark: #7a3328;
  --mark-text: #fffdf8;
  --tick: #8a8378;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
}

.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.2rem 0.35rem;
  border-right: 1px solid var(--rule);
  color: var(--tick);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.mast {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem 1.25rem 4.2rem;
  border-bottom: 1px solid var(--rule);
  background: var(--sheet);
}

.mark {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  font-size: 0.92rem;
}
.nav a { color: var(--mute); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--mark); }
.who { color: var(--ink); }

main { padding: 2.2rem 1.5rem 4rem 4.2rem; }

h1, h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.8rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.4rem; margin: 1.8rem 0 0.5rem; }

.kicker {
  margin: 0 0 0.7rem;
  color: var(--mark);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

.lede, .prose p { max-width: 38rem; color: var(--mute); }
.hero { max-width: 42rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.5rem; }

.btn, button {
  display: inline-block;
  padding: 0.75rem 1.05rem;
  color: var(--mark-text);
  background: var(--mark);
  border: 0;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.btn:hover, button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

input, select, button, .btn {
  border-radius: 2px;
}
input, select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  font: inherit;
}
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 2px;
}

.text-link, .fine a { color: var(--mark); }

.plate {
  margin: 2.6rem 0 0 -4.2rem;
  width: calc(100% + 4.2rem);
}
.plate img {
  display: block;
  width: 100%;
  height: min(56vh, 520px);
  object-fit: cover;
}
.plate figcaption {
  padding: 0.75rem 1.5rem 0 4.2rem;
  color: var(--mute);
  font-size: 0.92rem;
}

.split {
  display: grid;
  gap: 2rem;
  margin-top: 2.8rem;
  max-width: 44rem;
}
.split p { color: var(--mute); }

.prose { max-width: 38rem; }
.sheet {
  max-width: 24rem;
  display: grid;
  gap: 0.85rem;
}
.sheet.compact { margin-top: 1.4rem; }
.sheet label {
  display: grid;
  gap: 0.3rem;
  color: var(--mute);
  font-size: 0.85rem;
}
.flash {
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: #f3ddd6;
  color: var(--ink);
}
.fine { color: var(--mute); font-size: 0.92rem; }

.board { max-width: 40rem; }
.board-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}
.find {
  display: flex;
  gap: 0.5rem;
  align-items: end;
}
.find input { min-width: 14rem; }
.tape {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.tape li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.tape a {
  color: inherit;
  text-decoration: none;
  display: grid;
}
.tape a:hover strong { color: var(--mark); }
.tape span { color: var(--mute); font-size: 0.9rem; }
.empty { color: var(--mute); }

textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  font: inherit;
  resize: vertical;
}
.rich { color: var(--ink); }
.notice {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}
.notice h2 { font-size: 1.35rem; margin: 0 0 0.3rem; }
.notice h2 a { color: inherit; text-decoration: none; }
.notes { list-style: none; padding: 0; }
.notes li { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.preview {
  white-space: pre-wrap;
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 0.8rem;
  overflow: auto;
}
.wide { max-width: 46rem; }
.sheet.wide { max-width: 40rem; }
.raw { font-style: normal; color: var(--mark); }

.colophon {
  padding: 1.3rem 1.5rem 2rem 4.2rem;
  border-top: 1px solid var(--rule);
  color: var(--mute);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .rail { width: 1.6rem; font-size: 0.55rem; }
  .mast, main, .colophon { padding-left: 2.1rem; padding-right: 1rem; }
  .plate { margin-left: -2.1rem; width: calc(100% + 2.1rem); }
  .plate figcaption { padding-left: 2.1rem; }
  .find { width: 100%; }
  .find input { min-width: 0; flex: 1; }
  .split { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
