/* Small Door — shared styles. No framework. */
:root {
  --ink: #1b2428;
  --ink-soft: #3d4a52;
  --bg: #f3efe7;
  --paper: #fffcf8;
  --rule: #d8d0c4;
  --navy: #1c3348;
  --navy-deep: #142433;
  --door: #8b4b2a;
  --sage: #2a5a4a;
  --sand: #e8dcc8;
  --gold: #8a5a12;
  --todo: #7a3d12;
  --focus: #0b5cad;
  --max: 68rem;
  --nav-h: 3.6rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--sage); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--navy-deep); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }
header.site {
  background: var(--navy-deep);
  color: #f3eee6;
  position: sticky;
  top: 0;
  z-index: 20;
}
header.site a { color: #f3eee6; text-decoration: none; }
header.site a:hover { text-decoration: underline; }
.bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.wordmark {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  margin-right: auto;
}
.wordmark span { display: block; font-size: 0.68rem; font-weight: 400; font-family: inherit; letter-spacing: 0.04em; opacity: 0.85; }
nav.primary { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.95rem; }
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 1.1rem 3rem;
}
h1, h2, h3, h4 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  line-height: 1.25;
  color: var(--navy-deep);
}
h1 { font-size: clamp(1.7rem, 3vw, 2.25rem); margin: 0 0 0.6rem; }
h2 { font-size: 1.4rem; margin: 2rem 0 0.6rem; padding-top: 0.4rem; border-top: 1px solid var(--rule); }
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 { font-size: 1.12rem; margin: 1.3rem 0 0.4rem; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 42rem; }
.meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 1.2rem;
}
.card, .notice, .gap, .todo {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin: 0.8rem 0;
}
.notice { border-left: 4px solid var(--sage); }
.gap { border-left: 4px solid var(--gold); }
.todo { border-left: 4px solid var(--todo); background: #fbf3e8; }
.todo-aff, .todo { font-weight: 600; }
.todo-aff {
  color: var(--todo);
  background: #fbf3e8;
  padding: 0.05em 0.25em;
  border-radius: 3px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.9rem;
}
.listing {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  break-inside: avoid;
}
.listing h3 { margin: 0 0 0.25rem; color: var(--ink); font-size: 1.05rem; }
.listing p { margin: 0.15rem 0; }
.listing .contact { font-size: 0.95rem; }
.listing .flag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--sand);
  color: var(--navy-deep);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-top: 0.3rem;
}
.listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 0.75rem;
}
.counts { font-size: 0.95rem; color: var(--ink-soft); }
.picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.5rem;
}
.picker a, .picker .soon {
  display: block;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: inherit;
}
.picker a:hover { border-color: var(--door); box-shadow: 0 0 0 2px rgba(139,75,42,0.15); }
.picker h2, .picker h3 { margin: 0 0 0.3rem; border: 0; padding: 0; font-size: 1.15rem; }
.soon { opacity: 0.85; }
.soon em { font-style: normal; color: var(--gold); font-size: 0.85rem; font-weight: 600; }
.toc {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.8rem 1.1rem;
}
.toc ol { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.source-list, .plain-list { padding-left: 1.2rem; }
.source-list li { margin: 0.35rem 0; }
footer.site {
  background: var(--navy-deep);
  color: #e8e2d8;
  padding: 1.5rem 1.1rem 2.2rem;
  font-size: 0.92rem;
}
footer.site a { color: #e8e2d8; }
footer.site .wrap { max-width: var(--max); margin: 0 auto; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin-bottom: 0.8rem; }
.fine { font-size: 0.88rem; color: var(--ink-soft); }
table.simple {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 0.95rem;
}
table.simple th, table.simple td {
  border: 1px solid var(--rule);
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
}
table.simple th { background: var(--sand); }
.hero {
  background: linear-gradient(160deg, #142433 0%, #2a5a4a 100%);
  color: #f6f3ec;
  padding: 2rem 1.1rem 2.2rem;
  margin: 0 0 1.4rem;
}
.hero-inner { max-width: var(--max); margin: 0 auto; }
.hero h1 { color: #fff; }
.hero .lede { color: #e8e2d8; }
.hero a { color: #fff; }
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wordmark span { display: none; }
  table.simple { display: block; overflow-x: auto; }
}
