:root {
  --paper: #f3ead8;
  --ink: #241910;
  --muted: #6b5344;
  --copper: #b85a2a;
  --copper-dark: #8e3f1b;
  --foam: #fff8ee;
  --line: #e0d1b8;
  --ok: #2f6b4f;
  --bad: #9a2d1f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #f8f1e2 0%, transparent 55%),
    var(--paper);
  font-family: "Avenir Next", "Segoe UI", Corbel, system-ui, sans-serif;
  line-height: 1.5;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.top,
main,
footer {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0 0.4rem;
}

.mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pill {
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--foam);
  color: var(--muted);
  font-size: 0.82rem;
}

.pill.ok {
  color: var(--ok);
  border-color: #c9dece;
}

.pill.bad {
  color: var(--bad);
  border-color: #ebc4bc;
}

.hero {
  padding: 2.2rem 0 1.4rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 0.8rem;
  max-width: 18ch;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.08;
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.lede,
.hint {
  color: var(--muted);
}

.lede {
  max-width: 58ch;
  font-size: 1.05rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.1rem;
  align-items: start;
}

.panel {
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.25rem 1.3rem;
  box-shadow: 0 12px 30px rgba(36, 25, 16, 0.05);
}

form {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #a38b76;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--copper);
  outline-offset: 1px;
}

button {
  justify-self: start;
  padding: 0.7rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background: var(--copper);
  color: #fff8ee;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--copper-dark);
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-status {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.88rem;
}

.form-status.error {
  color: var(--bad);
}

.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.count {
  color: var(--muted);
  font-size: 0.82rem;
}

#messages {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

#messages li {
  padding: 0.85rem 0.9rem;
  border-left: 3px solid var(--copper);
  background: #faf3e6;
  border-radius: 0 12px 12px 0;
}

#messages strong {
  display: block;
  margin-bottom: 0.2rem;
}

#messages time {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.endpoints {
  margin: 1.1rem 0 2rem;
}

.route-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.route-list li + li {
  margin-top: 0.35rem;
}

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #efe4cf;
  padding: 0.08em 0.35em;
  border-radius: 5px;
}

footer {
  padding: 0 0 2.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

a {
  color: var(--copper-dark);
}

.empty {
  color: var(--muted);
  margin: 0.4rem 0 0;
}

@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: none;
  }
}
