/* Check-ins — calm, plain, neutral. One muted palette for every outcome:
   a hard day must never look visually different from a normal one. */

:root {
  --bg: #f7f5f1;
  --surface: #fffefb;
  --ink: #3b3833;
  --ink-soft: #837d73;
  --line: #e6e1d8;
  --accent: #5d6b7e;
  --accent-ink: #f7f5f1;
  --badge-bg: #eef0f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  accent-color: var(--accent);
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

/* Header */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--ink);
}

/* Layout */

.container {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}

h1 {
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.muted {
  color: var(--ink-soft);
}

main a {
  color: var(--accent);
}

.footnote {
  font-size: 0.85rem;
  margin-top: 2.5rem;
}

.flash {
  background: var(--badge-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin: 0 0 1.25rem;
  color: var(--ink);
}

/* Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  margin: 0 0 1rem;
}

/* Forms */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="time"],
input[type="tel"],
input[type="number"],
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  width: 100%;
}

textarea {
  resize: vertical;
}

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

input[type="submit"],
button[type="submit"] {
  font: inherit;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
  filter: brightness(1.08);
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Quiet inline buttons (sign out, remove) */

.link-button {
  display: inline;
}

.link-button button,
.link-button input[type="submit"],
button.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
}

.link-button button:hover,
button.link-button:hover {
  color: var(--ink);
  background: none;
  filter: none;
}

/* Sign in */

.signin {
  max-width: 22rem;
  margin: 3rem auto 0;
}

/* Task lists */

.task-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.task-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.task-name {
  font-weight: 600;
}

.task-time {
  color: var(--ink-soft);
  margin-left: auto;
}

.task-head .link-button {
  margin-left: 0.75rem;
}

.add-task-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.add-task-row input[type="text"] {
  flex: 2 1 12rem;
}

.add-task-row input[type="time"] {
  flex: 1 1 7rem;
  width: auto;
}

.add-task-row input[type="submit"] {
  flex: 0 0 auto;
}

.note-form {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Coverage banner — prominent but stays inside the muted palette */

.banner {
  border-left: 4px solid var(--accent);
}

.banner p {
  margin: 0 0 0.4rem;
}

.banner p:last-child {
  margin-bottom: 0;
}

.on-duty-line {
  font-size: 0.9rem;
}

/* Roster controls */

.roster-field {
  border: none;
  padding: 0;
  margin: 1.1rem 0 0.9rem;
}

.roster-field legend {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  padding: 0;
}

.day-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.day-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  background: var(--surface);
  cursor: pointer;
}

.day-pill:has(input:checked) {
  border-color: var(--accent);
  background: var(--badge-bg);
}

.radio-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.until-field {
  margin-top: 0.6rem;
}

.until-field input[type="date"] {
  width: auto;
}

input[type="date"] {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
}

/* Status badge — same neutral treatment for everything */

.badge {
  display: inline-block;
  background: var(--badge-bg);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.88rem;
  color: var(--ink);
  margin: 0.7rem 0 0;
}

/* Settings */

.guidance {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.guidance ul {
  margin: 0;
  padding-left: 1.1rem;
}

.guidance li {
  margin-bottom: 0.35rem;
}

.guidance strong {
  color: var(--ink);
  font-weight: 600;
}

.rate-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.rate-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.rate-row:last-child {
  border-bottom: none;
}

.rate-name {
  flex: 1;
}

.rate-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rate-form input[type="number"] {
  width: 5rem;
}

.rate-form input[type="text"] {
  flex: 1 1 10rem;
}

.add-rate {
  flex-wrap: wrap;
}

/* History */

.history-entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.history-entries li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.history-entries li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.history-when {
  font-size: 0.85rem;
}

.history-note {
  margin: 0.15rem 0 0;
}

/* Multi-circle sections on supporter pages */

.circle-heading {
  margin: 2rem 0 0.75rem;
  font-size: 1.15rem;
}

.circle-section {
  margin-bottom: 1.5rem;
}

/* Landing page */

.landing {
  max-width: 40rem;
}

.hero {
  margin: 1.5rem 0 2rem;
}

.hero h1 {
  font-size: 1.8rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.button-link {
  background: var(--accent);
  color: var(--accent-ink) !important;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
}

.quiet-link {
  color: var(--ink-soft) !important;
}

.steps {
  margin: 0;
  padding-left: 1.2rem;
}

.steps li {
  margin-bottom: 0.6rem;
}

.landing-footer {
  margin-top: 2.5rem;
  font-size: 0.85rem;
}

.signup-wide {
  max-width: 26rem;
}

.signup-wide h2 {
  margin-top: 1.5rem;
}

/* Collapsible landing sections */

details.card {
  padding: 0;
}

details.card summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

details.card summary::-webkit-details-marker {
  display: none;
}

details.card summary h2 {
  margin: 0;
}

details.card summary::after {
  content: "+";
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1;
}

details.card[open] summary::after {
  content: "–";
}

details.card > *:not(summary) {
  padding: 0 1.2rem;
}

details.card > *:last-child {
  padding-bottom: 1.1rem;
}

/* List markers need extra indent inside collapsible cards, or the
   numbers/bullets sit right against the card border. */
details.card > .steps {
  padding-left: 2.6rem;
}

/* Policy pages */

.policy h2 {
  margin-top: 1.75rem;
}

.policy ul {
  padding-left: 1.3rem;
}

.policy li {
  margin-bottom: 0.5rem;
}
