:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --surface: #fffefa;
  --ink: #1c2924;
  --muted: #4e6259;
  --line: #cfdbd3;
  --accent: #145b46;
  --error: #9c2735;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 system-ui, sans-serif;
}

.site-header, main {
  width: min(100% - 2rem, 42rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  gap: .75rem 1.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

nav, .post-meta, .composer-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: center;
}

main { padding-block: 1.75rem 4rem; }
h1, h2 { font-family: Georgia, serif; line-height: 1.15; margin: 0 0 1.25rem; }
h1 { font-size: clamp(2rem, 7vw, 3rem); overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: .17em; }
a:hover { text-decoration-thickness: .14em; }
a.brand { color: var(--ink); font-weight: 750; text-decoration: none; }
:focus-visible { outline: .18rem solid var(--accent); outline-offset: .2rem; }

.composer, .post, .flash {
  padding: clamp(.85rem, 4vw, 1.35rem);
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--surface);
}

.composer { margin-bottom: 1.25rem; }
.composer-footer, .post-meta { justify-content: space-between; }
.timeline { display: grid; gap: .7rem; }
.post-body { margin: .55rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-meta a:first-child, label { font-weight: 650; }
time, .muted, small { color: var(--muted); }
time, small { font-size: .84rem; }
.error, #error_explanation { color: var(--error); }

textarea, input:not([type="checkbox"], [type="submit"], [type="hidden"]) {
  display: block;
  width: 100%;
  margin: .25rem 0 .75rem;
  padding: .6rem .7rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--muted);
  border-radius: .35rem;
  font: inherit;
}

textarea { resize: vertical; }

button, input[type="submit"] {
  cursor: pointer;
  padding: .45rem .9rem;
  border: 1px solid var(--accent);
  border-radius: .35rem;
  color: white;
  background: var(--accent);
  font: inherit;
}

button.quiet { color: var(--accent); background: transparent; }
.field, .actions { margin-bottom: .85rem; }
