:root {
  --paper: #f3efe6;
  --card: #fffdf8;
  --ink: #1c1915;
  --muted: #5e584e;
  --line: #e3d9c8;
  --teal: #0f6e6b;
  --teal-ink: #f4f1ea;
  --closed: #8a8175;
  --danger: #8c2f2f;
  --shadow: 0 1px 0 rgba(28, 25, 21, 0.04);
  font-family: "Segoe UI", "Source Sans 3", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
}

a { color: var(--teal); }

.top {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.brand {
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.45rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.top nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top nav a { text-decoration: none; }

.button,
button {
  display: inline-block;
  background: var(--teal);
  color: var(--teal-ink);
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover { filter: brightness(1.08); }

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow: var(--shadow);
}

.narrow { max-width: 640px; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

h1 {
  font-family: Georgia, "Iowan Old Style", serif;
  font-weight: 500;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.lede,
.meta,
.team,
.empty,
.back { color: var(--muted); }

.lede { margin: 0; }

.team { margin: 0.85rem 0 1.1rem; }

.team span { color: var(--ink); }

.back { margin: 0 0 0.8rem; }

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.45rem 0.6rem 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 0.8rem 0.8rem 0.8rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tr:last-child td { border-bottom: 0; }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.85rem;
  background: #e5f3f2;
  color: var(--teal);
}

.pill[data-status="closed"] {
  background: #f0ebe3;
  color: var(--closed);
}

.details {
  white-space: pre-wrap;
  line-height: 1.5;
  margin: 1rem 0;
}

form label {
  display: block;
  margin: 0.9rem 0;
  font-size: 0.92rem;
}

input,
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: inherit;
}

.errors {
  background: #f8ecec;
  color: var(--danger);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin: 1rem 0 0;
}

.empty { margin: 0.5rem 0 0; }

.request-work {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.request-work h2 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.request-work h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.request-work form { max-width: 560px; }

.request-work label { margin-top: 0.6rem; }

.request-work select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 2rem 0.6rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.notes-list {
  margin: 0.8rem 0 1.35rem;
  padding: 0;
  list-style: none;
}

.note {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.note-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0;
}

.note-byline time,
.count {
  color: var(--muted);
  font-size: 0.88rem;
}

.note-body {
  margin: 0.45rem 0 0;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-form {
  margin-top: 1rem;
}

.status-action { margin-top: 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 720px) {
  .top {
    flex-wrap: wrap;
    align-items: center;
  }

  .brand-note { display: none; }

  .top nav { width: 100%; }

  table, thead, tbody, tr, th, td { display: block; }

  thead { display: none; }

  td {
    border-bottom: 0;
    padding: 0.15rem 0;
  }

  tr {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  td:last-child { color: var(--muted); }
}
