:root {
  --ink: #1c1d1a;
  --ink-soft: #31352e;
  --paper: #f3f2ee;
  --paper-2: #fafaf8;
  --brass: #5c6b45;
  --brass-deep: #3d4a32;
  --metal: #b7bea4;
  --wall: #2c2c2e;
  --muted: #5c615a;
  --line: #e2e1db;
  --field: #d3d2cb;
  --danger: #8c4036;
  --serif: "Fraunces", "Palatino Linotype", Palatino, Georgia, serif;
  --reader: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --shadow: 0 24px 60px rgba(20, 20, 22, 0.22);
  --grain: radial-gradient(rgba(28, 29, 26, 0.035) 0.65px, transparent 0.65px);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--serif);
}

button, input, textarea { font: inherit; color: inherit; }

button {
  cursor: pointer;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  padding: 12px 18px;
}

button.quiet {
  background: transparent;
  color: var(--brass-deep);
  padding: 8px 0;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

input::placeholder,
textarea::placeholder {
  color: #6e736c;
  opacity: 1;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brass-deep);
  font-family: var(--reader);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lede, .preamble, .notice, .fine {
  color: var(--muted);
  font-family: var(--reader);
  font-size: 17px;
  line-height: 1.5;
}

.error {
  color: var(--danger);
  min-height: 1.3em;
  margin: 8px 0 0;
  font-family: var(--reader);
  font-size: 16px;
}

.mark {
  width: 188px;
  height: 188px;
  display: block;
  margin: 0 0 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.mark-small {
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
}

.gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
}

.gate-brand {
  min-height: 100vh;
  padding: clamp(36px, 6vh, 72px) clamp(36px, 4vw, 72px) clamp(36px, 6vh, 72px) clamp(28px, 6vw, 96px);
  color: #f3f1eb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}

.gate-story {
  width: min(32rem, 100%);
}

.gate-brand .eyebrow { color: var(--metal); }

.gate-brand h1 {
  margin: 0 0 16px;
  color: #f7f6f2;
  font-weight: 460;
  font-size: clamp(52px, 5vw, 72px);
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.gate-brand .lede {
  margin: 0 0 28px;
  max-width: 34ch;
  color: #d8d6cf;
  font-size: 22px;
  line-height: 1.4;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 46ch;
}

.facts li {
  margin: 0;
  padding-left: 14px;
  border-left: 2px solid var(--metal);
  color: #c2c1bb;
  font-family: var(--reader);
  font-size: 17px;
  line-height: 1.45;
}

.gate-card {
  min-height: 100vh;
  margin: 0;
  padding: clamp(36px, 8vh, 88px) clamp(28px, 4vw, 52px);
  background-color: var(--paper);
  background-image: var(--grain);
  background-size: 4px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.gate-card h2 {
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 460;
  font-size: clamp(36px, 4vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1;
}

.gate-card label,
.intake-wrap summary,
.opened-label,
.cite-label,
.card .kicker {
  font-family: var(--reader);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gate-card label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.gate-card input,
#shelf-query,
#page-url,
#find-query,
textarea {
  width: 100%;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: var(--paper-2);
  padding: 14px 14px;
  outline: none;
  font-family: var(--reader);
}

.gate-card input { font-size: 18px; }

.gate-card input:focus,
#shelf-query:focus,
#page-url:focus,
#find-query:focus,
textarea:focus {
  border-color: var(--brass);
}

.gate-card button {
  margin-top: 18px;
  width: 100%;
  padding: 14px 18px;
  font-size: 18px;
}

.fine {
  margin: 18px 0 0;
  font-size: 15px;
  max-width: 36ch;
}

.room {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
}

.room.has-passage {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
}

.rail {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 4;
  height: auto;
  padding: 12px 22px;
  background: var(--wall);
  border-bottom: 1px solid rgba(243, 242, 238, 0.16);
  color: #f3f1eb;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.brand {
  margin: 0;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 460;
}

.brand-sub {
  margin: 5px 0 0;
  color: var(--metal);
  font-family: var(--reader);
  font-size: 14px;
  line-height: 1.35;
}

.rail-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.rail button {
  background: transparent;
  color: #f3f1eb;
  padding: 8px 0;
  border-radius: 0;
  border-bottom: 1px solid transparent;
  font-size: 16px;
}

.rail button:hover { border-bottom-color: var(--metal); color: var(--metal); }

.rail button.quiet { color: rgba(243, 241, 235, 0.68); }

.sheet,
.passage {
  background-color: var(--paper);
  background-image: var(--grain);
  background-size: 4px 4px;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  min-width: 0;
  position: relative;
}

.sheet {
  width: min(860px, calc(100% - 44px));
  margin: 22px auto 28px;
  padding: 36px 40px 28px;
  min-height: calc(100vh - 124px);
}

.room.has-passage .sheet {
  width: auto;
  margin: 22px 0 32px 22px;
}

.sheet::before,
.passage::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

.passage { display: none; }

.room.has-passage .passage {
  display: block;
  margin: 22px 22px 28px 14px;
  padding: 28px 28px 32px;
  min-height: calc(100vh - 124px);
  max-height: calc(100vh - 96px);
  overflow: auto;
  position: sticky;
  top: 78px;
  background-color: var(--paper-2);
}

.passage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.passage-head .eyebrow { margin-bottom: 0; }

.passage-head .quiet {
  background: transparent;
  color: var(--brass-deep);
  padding: 0;
  font-family: var(--reader);
  font-size: 15px;
}

.passage-actions {
  display: flex;
  gap: 16px;
  align-items: baseline;
  margin-left: auto;
}

.desk h1,
.passage h2,
.shelf-head h2 {
  margin: 0;
  font-weight: 460;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.desk h1 {
  max-width: 16ch;
  margin: 0 0 10px;
  font-size: clamp(36px, 4vw, 52px);
}

.room.has-asked .desk h1 {
  max-width: 34ch;
  margin-bottom: 16px;
  font-family: var(--reader);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.room.has-asked .starters { display: none; }

.room.has-asked textarea {
  min-height: 72px;
  font-size: 18px;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--reader);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.prompt {
  margin: 0 0 18px;
  max-width: 48ch;
  color: var(--ink-soft);
  font-family: var(--reader);
  font-size: 18px;
  line-height: 1.45;
}

textarea {
  font-size: 22px;
  line-height: 1.4;
  resize: vertical;
  min-height: 96px;
}

.ask-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 14px;
}

#ask {
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
  font-size: 17px;
}

.status {
  flex: 1 1 180px;
  min-height: 1.4em;
  margin: 0;
  font-family: var(--reader);
  font-size: 16px;
  font-style: italic;
  color: var(--ink-soft);
}

.status.busy::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--brass);
  transform: translateY(-1px);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.25; }
}

.starters,
.find-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.starters button,
.find-chips button {
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--field);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  line-height: 1.3;
  font-family: var(--reader);
  font-size: 16px;
}

.starters button span,
.find-chips button span {
  display: block;
  margin-bottom: 4px;
  color: var(--brass-deep);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.starters button:hover,
.find-chips button:hover { border-color: var(--brass); color: var(--brass-deep); }

.intake-wrap {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.intake-wrap summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--brass-deep);
}

.intake { padding-top: 16px; }

.intake .lede { margin: 0 0 16px; max-width: 62ch; }

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

#page-url { font-size: 17px; }

.intake button,
.file {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-family: var(--reader);
  font-size: 16px;
}

.intake button:disabled,
.file:has(input:disabled) {
  opacity: 0.45;
}

.file {
  display: inline-flex;
  margin-top: 12px;
  padding: 11px 16px;
  cursor: pointer;
}

.file input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.meter { margin-top: 16px; }

.meter-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.meter-row p {
  margin: 0;
  font-family: var(--reader);
  font-size: 15px;
}

#meter-count { color: var(--brass-deep); }

.meter-track {
  height: 3px;
  background: var(--line);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: var(--brass);
  transition: width 0.2s linear;
}

.meter.indeterminate .meter-fill {
  width: 34%;
  animation: meter-slide 1.2s ease-in-out infinite;
}

@keyframes meter-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

#intake-status { margin: 12px 0 0; font-style: italic; }

.leads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.opened-label {
  flex: 1 0 100%;
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--brass-deep);
}

.leads button {
  background: var(--paper-2);
  color: var(--ink-soft);
  border: 1px solid var(--field);
  border-radius: 999px;
  padding: 7px 12px;
  max-width: 100%;
  text-align: left;
  font-family: var(--reader);
  font-size: 14px;
  white-space: normal;
}

.leads button.current,
.leads button:hover {
  color: var(--ink);
  border-color: var(--brass);
}

.cites {
  display: grid;
  gap: 0;
  margin: 0 0 8px;
}

.cites button {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 13px 4px;
  text-align: left;
  font-family: var(--reader);
  font-size: 17px;
  color: var(--ink);
  white-space: normal;
}

.cites button .source-index {
  flex: 0 0 auto;
  color: var(--brass-deep);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding-top: 4px;
}

.cites .source-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cites .source-name strong {
  font-weight: 560;
}

.cites .source-place {
  color: var(--muted);
  font-size: 14px;
}

.cites button:hover,
.cites button.current {
  color: var(--ink);
  background: rgba(92, 107, 69, 0.12);
}

.cites button.current { box-shadow: inset 2px 0 0 var(--brass); }

.brief {
  display: grid;
  gap: 0;
  margin-top: 26px;
  scroll-margin-top: 88px;
}

.card.overview:not(.meta) { order: 0; }
.card.remedies { order: 1; }
.card.cautions { order: 2; }
.card.overview.meta { order: 4; }
.card.missing { order: 5; }

.card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 0 6px;
}

.card.overview { border-top: 0; padding-top: 4px; }

.card .kicker {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--brass-deep);
}

.card p,
.entry {
  font-family: var(--reader);
  font-size: 18px;
  line-height: 1.55;
  margin: 0 0 14px;
}

.card.overview p:not(.kicker) {
  font-size: 22px;
  line-height: 1.45;
  max-width: 38em;
}

.card.overview.meta p:not(.kicker) {
  font-size: 16px;
  line-height: 1.45;
  color: var(--muted);
  font-style: italic;
}

.card.remedies .entry,
.card.cautions .entry {
  margin: 0 0 8px;
  padding: 16px 0 16px 16px;
  border-bottom: 1px solid var(--line);
}

.card.remedies .entry:last-child,
.card.cautions .entry:last-child { border-bottom: 0; }

.entry-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 18px;
  margin: 0 0 6px;
}

.entry .who,
.entry button.who {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brass-deep);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.01em;
  text-align: left;
}

.entry .source-chip {
  margin-left: auto;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--reader);
  font-size: 14px;
  line-height: 1.35;
  text-align: right;
  text-decoration: underline;
  text-decoration-color: rgba(90, 95, 86, 0.45);
  text-underline-offset: 3px;
}

.entry .source-chip:hover,
.entry .source-chip.current { color: var(--ink); }

.entry .amount {
  margin: 2px 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
}

.entry .amount span {
  display: block;
  margin: 0 0 2px;
  color: var(--brass-deep);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry .amount strong {
  font-weight: 560;
}

.entry .said {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

.entry .said mark {
  background: rgba(92, 107, 69, 0.24);
  color: inherit;
  padding: 0 0.12em;
  border-radius: 2px;
}

.entry .on-page {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  color: var(--ink-soft);
  font-family: var(--reader);
  font-size: 15px;
  line-height: 1.45;
}

.on-page-label {
  display: block;
  margin: 0 0 3px;
  color: var(--brass-deep);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry button.who {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(61, 74, 50, 0.5);
  text-underline-offset: 3px;
}

.entry button.who:hover,
.entry button.who.current {
  text-decoration-color: var(--brass-deep);
}

.entry button.page-link {
  display: inline;
  margin: 0 0 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brass-deep);
  font-family: var(--reader);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card.remedies .entry { border-left: 2px solid var(--brass); }

.card.remedies .entry + .entry { margin-top: 8px; }

.card.cautions .entry { border-left: 2px solid var(--danger); }

.card.missing { border-top-style: dashed; }

.card.missing p:not(.kicker) {
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
  max-width: 46em;
}

.preamble {
  max-width: 46em;
  margin: 4px 0 0;
  font-style: italic;
}

.cite-label {
  margin: 22px 0 8px;
  font-size: 12px;
  color: var(--brass-deep);
}

.passage h2:focus { outline: none; }

.notice {
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 14px;
  max-width: 62ch;
}

.passage h2 {
  font-size: 30px;
  margin: 8px 0;
  max-width: 22em;
}

.passage .lede { margin-top: 0; }

#passage-page {
  width: 100%;
  height: auto;
  margin: 14px 0;
  background: white;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(28, 25, 22, 0.08);
}

.passage-text {
  margin-top: 18px;
  font-family: var(--reader);
  font-size: 18px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.shelf {
  position: fixed;
  inset: 0;
  z-index: 6;
  background: rgba(12, 11, 10, 0.62);
  display: grid;
  place-items: center;
  padding: 24px;
}

.shelf-card {
  width: min(760px, 100%);
  max-height: min(82vh, 820px);
  overflow: auto;
  background-color: var(--paper);
  background-image: var(--grain);
  background-size: 4px 4px;
  border-radius: 8px;
  padding: 28px 28px 22px;
  box-shadow: var(--shadow);
}

.shelf-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.shelf-head h2 { font-size: 42px; }

.shelf-head .quiet {
  background: transparent;
  color: var(--brass-deep);
  padding: 0 0 6px;
  font-family: var(--reader);
}

#shelf-query { margin-top: 18px; font-size: 18px; }

#shelf-count { margin: 12px 0 0; }

#shelf-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

#shelf-list li {
  padding: 0;
  border-top: 1px solid var(--line);
  font-family: var(--reader);
}

#shelf-list button.shelf-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 13px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

#shelf-list button.shelf-open:hover strong { color: var(--brass-deep); }

#shelf-list .kind {
  display: block;
  margin-bottom: 3px;
  color: var(--brass-deep);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#shelf-list strong {
  font-family: var(--serif);
  font-weight: 460;
  display: block;
  font-size: 18px;
}

#shelf-list span { color: var(--muted); font-size: 14px; }

.brief.is-settled { animation: rise 0.45s ease; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .status.busy::before,
  .meter.indeterminate .meter-fill,
  .brief.is-settled { animation: none; }
}

@media (max-width: 960px) {
  .room.has-passage { grid-template-columns: minmax(0, 1fr); }
  .sheet,
  .room.has-passage .sheet,
  .room.has-passage .passage {
    width: auto;
    margin: 12px;
    position: static;
    max-height: none;
  }
  .room.has-passage .passage { margin-top: 0; }
  .url-row { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .gate { grid-template-columns: 1fr; }
  .gate-brand,
  .gate-card { min-height: 0; }
  .gate-brand {
    align-items: stretch;
    padding: 28px 22px 8px;
  }
  .gate-story { width: 100%; }
  .gate-brand h1 { font-size: 46px; }
  .gate-brand .lede { font-size: 18px; margin-bottom: 18px; }
  .mark { width: 96px; height: 96px; margin-bottom: 14px; }
  .sheet,
  .room.has-passage .passage { min-height: 0; }
  .starters,
  .find-chips,
  .find-form { grid-template-columns: 1fr; }
  .gate-card { padding: 12px 22px 36px; justify-content: flex-start; }
  .rail {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    row-gap: 4px;
    padding: 12px 14px 10px;
  }
  .brand-block { min-width: 0; }
  .brand { font-size: 18px; }
  .brand-sub { font-size: 13px; }
  .rail-nav {
    grid-column: 1 / -1;
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .sheet { padding: 26px 18px 22px; }
  .desk h1 { font-size: 34px; }
  textarea { font-size: 18px; }
  .card.overview p:not(.kicker) { font-size: 20px; }
  .shelf-card { padding: 22px 16px; }
  .shelf-head h2 { font-size: 34px; }
  .prompt, .card p, .entry, .passage-text, .excerpt, .read-body { overflow-wrap: break-word; }
}

.sheet {
  display: flex;
  flex-direction: column;
  width: min(900px, calc(100% - 56px));
  padding: 48px 56px 36px;
}

#find-intro { padding-top: 8px; }

#find-title {
  max-width: none;
  margin: 0 0 18px;
  font-size: clamp(52px, 6vw, 72px);
  font-weight: 460;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

#find-intro .prompt {
  max-width: 36em;
  margin: 0 0 28px;
  font-size: 20px;
  line-height: 1.5;
}

.find-form {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-top: 0;
  padding: 6px 6px 6px 8px;
  border: 1px solid var(--field);
  border-radius: 14px;
  background: var(--paper-2);
  box-shadow: 0 1px 0 rgba(255, 253, 248, 0.9), 0 14px 32px rgba(28, 25, 22, 0.06);
}

.find-form:focus-within { border-color: var(--brass); }

#find-query {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 14px 12px;
  font-size: 22px;
  line-height: 1.3;
}

.find-form button {
  flex: 0 0 auto;
  align-self: stretch;
  border-radius: 10px;
  padding: 0 22px;
  font-family: var(--reader);
  font-size: 16px;
  font-weight: 560;
}

.find-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin-top: 20px;
}

.find-chips::before {
  content: "Try";
  color: var(--brass-deep);
  font-family: var(--reader);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.find-chips button {
  width: auto;
  background: transparent;
  color: var(--ink-soft);
  border: 0;
  border-radius: 0;
  padding: 0;
  font-family: var(--reader);
  font-size: 18px;
  line-height: 1.4;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(61, 74, 50, 0.5);
  text-underline-offset: 4px;
}

.find-chips button span { display: none; }

.find-chips button:hover { color: var(--brass-deep); }

.find-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  margin-top: 16px;
}

.filters { display: flex; flex-wrap: wrap; gap: 6px 18px; }

.filters button {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  padding: 4px 0 5px;
  font-family: var(--reader);
  font-size: 16px;
}

.filters button[aria-pressed="true"] {
  background: transparent;
  color: var(--ink);
  border-bottom-color: var(--brass);
}

.sort-label {
  color: var(--muted);
  font-family: var(--reader);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sort-label select {
  margin-left: 8px;
  font-family: var(--reader);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%233d4a32' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right center;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 4px 16px 4px 2px;
  appearance: none;
  cursor: pointer;
}

#find-status {
  min-height: 0;
  margin: 14px 0 0;
  font-style: normal;
  color: var(--muted);
}

#find-status:empty,
.notice:empty { display: none; }

.room.is-results #find-desk,
.room.is-reading #find-desk,
.room.is-asking #find-desk {
  padding-bottom: 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.room.is-results .find-form,
.room.is-reading .find-form,
.room.is-asking .find-form {
  padding: 4px 4px 4px 10px;
  border-radius: 12px;
  box-shadow: none;
}

.room.is-results #find-query,
.room.is-reading #find-query,
.room.is-asking #find-query {
  padding: 9px 8px;
  font-size: 17px;
}

.room.is-results .find-form button,
.room.is-reading .find-form button,
.room.is-asking .find-form button {
  padding: 0 16px;
  border-radius: 8px;
}

.results-head { margin: 32px 0 4px; }

#results-title,
.reader h1 {
  margin: 0;
  max-width: none;
  font-weight: 460;
  letter-spacing: -0.035em;
  line-height: 1.05;
  scroll-margin-top: 92px;
}

#results-title { font-size: clamp(36px, 4.4vw, 52px); }

.results-count {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--reader);
  font-size: 18px;
}

.exact-link { display: inline-block; margin-top: 8px; }

.tier {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0 0;
  color: var(--brass-deep);
  font-family: var(--reader);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tier::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.hit { border: 0; }

.hit-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 22px;
  align-items: start;
  width: calc(100% + 14px);
  margin: 0 0 0 -14px;
  padding: 20px 0 18px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  box-shadow: inset 0 0 0 transparent;
}

.hit .hit-open { border-top: 1px solid var(--line); }

.tier + .hit .hit-open { border-top: 0; }

.hit-open:hover { box-shadow: inset 3px 0 0 var(--brass); }

.hit-open:hover .hit-title { color: var(--brass-deep); }

.hit .kind,
.reader .kind {
  display: block;
  grid-column: 1;
  grid-row: 1;
  margin: 0 0 5px;
  color: var(--brass-deep);
  font-family: var(--reader);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hit-title {
  display: block;
  grid-column: 1;
  grid-row: 2;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 460;
  letter-spacing: -0.03em;
  line-height: 1.16;
}

.hit-heading,
.hit-meta {
  display: block;
  grid-column: 1 / -1;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--reader);
  font-size: 15px;
  line-height: 1.4;
}

.excerpt {
  display: block;
  grid-column: 1 / -1;
  margin-top: 8px;
  max-width: 62ch;
  color: var(--ink-soft);
  font-family: var(--reader);
  font-size: 17px;
  line-height: 1.55;
}

.excerpt mark {
  background: rgba(92, 107, 69, 0.24);
  color: inherit;
  padding: 0 0.12em;
  border-radius: 2px;
}

.hit-read {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  justify-self: end;
  margin-bottom: 2px;
  color: var(--brass-deep);
  font-family: var(--reader);
  font-size: 15px;
  white-space: nowrap;
}

.hit-read::after { content: " →"; }

.hit-open:hover .hit-read { text-decoration: underline; text-underline-offset: 3px; }

.more,
#read-more {
  display: inline-block;
  width: auto;
  margin: 26px 0 6px;
  background: transparent;
  color: var(--brass-deep);
  border: 0;
  border-bottom: 1px solid var(--brass);
  border-radius: 0;
  padding: 4px 0 6px;
  font-family: var(--reader);
  font-size: 16px;
}

.more:hover,
#read-more:hover { color: var(--ink); }

#read-more {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 20px 0 6px;
  border-bottom: 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.reader { padding-top: 6px; }

.reader-head {
  margin: 6px 0 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.reader h1 {
  margin: 6px 0 14px;
  font-size: clamp(36px, 4.4vw, 52px);
}

.reader .lede { margin: 0; max-width: 54ch; font-size: 18px; }

button.exact-link,
button.reader-back {
  background: transparent;
  color: var(--brass-deep);
  padding: 0;
  font-family: var(--reader);
  font-size: 15px;
}

button.reader-back { display: inline-block; margin: 0 0 22px; }

button.reader-back::before { content: "← "; }

.reader-source {
  display: inline-block;
  margin-top: 10px;
  color: var(--brass-deep);
  font-family: var(--reader);
  font-size: 16px;
  text-underline-offset: 3px;
}

.toc {
  margin: 0 0 32px;
  padding: 0 0 6px;
  background: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.toc::before {
  content: "On this page";
  display: block;
  margin-bottom: 10px;
  color: var(--brass-deep);
  font-family: var(--reader);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.15em;
  columns: 2;
  column-gap: 28px;
}

.toc li { margin: 3px 0; break-inside: avoid; }

.toc button {
  background: transparent;
  color: var(--ink-soft);
  padding: 0;
  border-radius: 0;
  text-align: left;
  font-family: var(--reader);
  font-size: 16px;
  line-height: 1.35;
}

.toc button:hover { color: var(--brass-deep); }

.read-body {
  max-width: 64ch;
  font-family: var(--reader);
  font-size: 20px;
  line-height: 1.72;
}

.read-body section { scroll-margin-top: 96px; }

.read-body section + section { margin-top: 0.2em; }

.read-body h2 {
  margin: 1.7em 0 0.45em;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 460;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.read-body p { margin: 0 0 0.95em; }

.read-body .page-no {
  margin: 1.4em 0 0.25em;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.read-body .is-focus {
  margin-left: -16px;
  padding: 4px 0 4px 14px;
  border-left: 2px solid var(--brass);
  background: rgba(92, 107, 69, 0.12);
}

.room:not(.is-results):not(.is-reading):not(.is-asking) .ask-fold {
  margin-top: auto;
  padding-top: 36px;
}

.ask-fold {
  margin-top: 36px;
  border-top: 0;
  padding-top: 0;
}

.ask-fold summary,
.intake-wrap summary {
  cursor: pointer;
  color: var(--muted);
  font-family: var(--reader);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-decoration-color: rgba(90, 95, 86, 0.45);
  text-underline-offset: 3px;
}

.ask-fold summary:hover,
.intake-wrap summary:hover { color: var(--brass-deep); }

.intake-wrap {
  margin-top: 12px;
  border-top: 0;
  padding-top: 0;
}

.ask-fold .starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.ask-fold .starters button {
  width: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: rgba(61, 74, 50, 0.5);
  text-underline-offset: 4px;
}

.ask-fold .starters button span {
  display: inline;
  margin: 0 8px 0 0;
}

.ask-fold .desk { padding-top: 18px; }

.room.is-asking #find-intro,
.room.is-asking #find-starts,
.room.is-asking #find-tools,
.room.is-results .ask-fold,
.room.is-reading .ask-fold,
.room.is-results .intake-wrap,
.room.is-reading .intake-wrap,
.room.is-results #overview,
.room.is-results #leads,
.room.is-results #cites,
.room.is-results #cite-label,
.room.is-results #preamble,
.room.is-reading #overview,
.room.is-reading #leads,
.room.is-reading #cites,
.room.is-reading #cite-label,
.room.is-reading #preamble { display: none; }

@media (max-width: 800px) {
  .sheet { width: auto; padding: 28px 18px 24px; }
  #find-title { font-size: 44px; }
  #find-intro .prompt { max-width: 100%; font-size: 18px; margin-bottom: 20px; }
  .find-form { flex-direction: column; padding: 6px; }
  .find-form button { width: 100%; min-height: 46px; }
  #find-query { font-size: 18px; }
  .hit-open {
    display: block;
    width: 100%;
    margin: 0;
    padding: 16px 0;
  }
  .hit-open:hover { box-shadow: none; }
  .hit .kind,
  .hit-title,
  .hit-heading,
  .excerpt,
  .hit-meta,
  .hit-read { grid-column: auto; grid-row: auto; }
  .hit-read { display: inline-block; margin-top: 10px; }
  .hit-title { font-size: 22px; }
  #results-title { font-size: 32px; }
  .reader h1 { font-size: 32px; }
  .read-body { font-size: 18px; }
  .toc ol { columns: 1; }
  .filters { gap: 8px 14px; }
  .find-tools { display: grid; justify-content: stretch; gap: 12px; }
  .sort-label { justify-self: start; }
  .find-chips { gap: 8px 14px; }
  .prompt, .card p, .entry, .passage-text, .excerpt, .read-body, .hit-title { overflow-wrap: break-word; }
}
