/* STAIN. One family (Bricolage Grotesque), a pale sage-grey paper, deep pine ink, a walnut stain
   for the mark, and one signal blue for anything you can press. */

:root {
  --paper: #f1f2ee;
  --paper-deep: #e6e8e2;
  --ink: #1b2520;
  --mute: #5e6963;
  --line: #d3d7d0;
  --stain: #4b2e1c;
  --signal: #1e4fd8;
  --signal-deep: #1740b0;
  --ok: #2e7d4f;
  --warn: #8a5a00;
  --bad: #a33a2a;
  --radius: 6px;
  --measure: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-family: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }

a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--signal-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.45rem; margin-top: 2.2em; }
h3 { font-size: 1.1rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }
small, .small { font-size: 0.9rem; }
.mute { color: var(--mute); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }

/* ---------- frame ---------- */

.top {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--line);
}
.top nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-left: auto; }
.top nav a { color: var(--ink); text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.top nav a.quiet { color: var(--mute); }
.top .who { color: var(--mute); font-size: 0.9rem; }
.top form { margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--mute); font: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: underline; }
.linkish:hover { color: var(--ink); }

.mark { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: 0.02em; font-stretch: 112%; }
.mark svg { width: 1.6em; height: 1.6em; color: var(--stain); }
.mark .chapter { font-weight: 500; color: var(--mute); font-stretch: 100%; letter-spacing: 0; }

main { flex: 1; width: 100%; max-width: var(--measure); margin: 0 auto; padding: 2rem 1.25rem 4rem; }
main.wide { max-width: 64rem; }

footer { border-top: 1px solid var(--line); padding: 1.5rem 1.25rem 2.5rem; color: var(--mute); font-size: 0.9rem; }
footer p { max-width: var(--measure); margin: 0 auto 0.4em; }

/* ---------- the landing ---------- */

.hero { padding: 4rem 0 2rem; }
.wordmark { display: inline-block; font-size: clamp(4.5rem, 17vw, 11rem); font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; line-height: 0.9; margin: 0 0 1.2rem; }
/* The A is knocked out of the stain: the blot sits behind it, inside its own stacking context. */
.wordmark .a { position: relative; display: inline-block; isolation: isolate; color: var(--paper); }
.wordmark .blot { position: absolute; z-index: -1; width: 1.22em; height: 1.22em; left: 50%; top: 50%; transform: translate(-51%, -52%) rotate(-6deg); color: var(--stain); opacity: 0.94; }
.wordmark .blot svg { display: block; width: 100%; height: 100%; }
.hero .lede { font-size: 1.35rem; line-height: 1.4; max-width: 30em; margin-bottom: 0.6em; }
.hero .where { color: var(--mute); margin-bottom: 2.4rem; }
.hero .where a { color: inherit; }
.hero .doors a { margin-right: 1.4rem; font-weight: 600; }

.chapter-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 1rem 0; background: #fff; }
.chapter-card h3 { margin-top: 0; }
.chapter-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1.2rem; margin: 0.8rem 0; }
.chapter-card dt { color: var(--mute); }
.chapter-card dd { margin: 0; }

.actions { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; margin-top: 1.2rem; }

/* ---------- buttons and forms ---------- */

.btn, button.btn {
  display: inline-block; padding: 0.6rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--signal);
  background: var(--signal); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.3;
}
.btn:hover { background: var(--signal-deep); border-color: var(--signal-deep); color: #fff; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.secondary:hover { background: var(--paper-deep); }
.btn.small { padding: 0.35rem 0.75rem; font-size: 0.9rem; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: #fbeeec; }
.btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }

form.stack { display: grid; gap: 1.1rem; margin: 1.5rem 0; }
form.inline { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 0.5rem 0; }
.field { display: grid; gap: 0.35rem; }
.field > span { font-weight: 600; }
.field .hint { color: var(--mute); font-weight: 400; font-size: 0.9rem; }
input[type="text"], input[type="email"], input[type="url"], input[type="datetime-local"], textarea, select {
  width: 100%; font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
}
textarea { min-height: 7.5rem; resize: vertical; }
.choices { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.choices label { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.45rem 0.8rem; background: #fff; cursor: pointer; }
.choices label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.choices input { position: absolute; opacity: 0; width: 0; height: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 40rem) { .row { grid-template-columns: 1fr; } }

.problems { border-left: 3px solid var(--bad); padding: 0.6rem 1rem; margin: 1rem 0; background: #fbeeec; }
.problems ul { margin: 0; }
.notice { border-left: 3px solid var(--ok); padding: 0.6rem 1rem; margin: 1rem 0; background: #e9f3ec; }
.devlink { border: 1px dashed var(--stain); padding: 0.8rem 1rem; margin: 1.5rem 0; background: #fff; word-break: break-all; }

/* ---------- lists in the hub ---------- */

.list { list-style: none; padding: 0; margin: 1rem 0; border-top: 1px solid var(--line); }
.list > li { padding: 1rem 0; margin: 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.25rem; }
.list .title { font-weight: 600; font-size: 1.05rem; }
.list .meta { color: var(--mute); font-size: 0.9rem; }
.list .meta a { color: inherit; }
.tags { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; }
.tag { font-size: 0.85rem; color: var(--ink); background: var(--paper-deep); border-radius: 999px; padding: 0.1rem 0.6rem; text-decoration: none; }
.tag.on { background: var(--ink); color: #fff; }

.status { font-size: 0.9rem; }
.status.new { color: var(--signal); }
.status.approved, .status.yes, .status.active { color: var(--ok); }
.status.waitlist, .status.maybe, .status.paused { color: var(--warn); }
.status.declined, .status.no, .status.left { color: var(--bad); }

table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55rem 0.6rem 0.55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--mute); }
td form { margin: 0; display: inline; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 1.2rem 1.4rem; margin: 1rem 0; }
.card h2, .card h3 { margin-top: 0; }
.answer { white-space: pre-wrap; margin: 0.2rem 0 1rem; }
.answer-label { color: var(--mute); font-size: 0.9rem; }

.subnav { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0 0 1.5rem; border-bottom: 1px solid var(--line); }
.subnav a { color: var(--mute); text-decoration: none; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

.empty { color: var(--mute); padding: 1.5rem 0; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .top nav a { transition: background-color 120ms, border-color 120ms; }
}
