:root {
  --ink: #17211d;
  --muted: #5d6b64;
  --paper: #f4f0e8;
  --card: #fffdf7;
  --line: #d8d4c9;
  --green: #176b50;
  --green-dark: #0e4c38;
  --red: #a53c34;
  --shadow: 0 16px 45px rgba(23, 33, 29, 0.09);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(199, 220, 202, .7), transparent 38rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: var(--green-dark); }
.site-header, footer, .page-shell { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { min-height: 74px; display: flex; justify-content: space-between; align-items: center; }
.brand { color: var(--ink); font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.page-shell { padding: 3rem 0 5rem; }
footer { padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .9rem; }
.card { background: color-mix(in srgb, var(--card) 94%, transparent); border: 1px solid rgba(23, 33, 29, .1); border-radius: 22px; box-shadow: var(--shadow); padding: clamp(1.3rem, 3vw, 2.2rem); }
.hero { max-width: 720px; margin: 6vh auto; padding: clamp(2rem, 7vw, 5rem); }
.hero h1, .dashboard-heading h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -.045em; margin: .35rem 0 1rem; }
.hero p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; max-width: 56ch; }
.eyebrow { color: var(--green); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; margin: 0; }
.primary-button, .secondary-button, .danger-button, .link-button, .chip { appearance: none; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 750; text-decoration: none; }
.primary-button { display: inline-block; border: 0; color: white; background: var(--green); padding: .78rem 1.15rem; margin-top: 1rem; }
.primary-button:hover { background: var(--green-dark); }
.secondary-button, .chip { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: .55rem .8rem; }
.secondary-button:hover, .chip:hover { border-color: var(--green); color: var(--green); }
.danger-button { color: var(--red); border: 1px solid rgba(165, 60, 52, .3); background: transparent; padding: .45rem .8rem; }
.link-button { background: transparent; border: 0; color: var(--green-dark); padding: .5rem; }
.fine-print { font-size: .85rem !important; }
.dashboard-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 2rem; }
.dashboard-heading h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 0; }
.account-chip { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .45rem .8rem; font-size: .85rem; overflow-wrap: anywhere; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.25rem; align-items: start; }
h2 { margin-top: 0; font-size: 1.35rem; }
label, legend { display: block; font-weight: 750; font-size: .9rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.3rem; }
.time-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .5rem; }
input, textarea { width: 100%; color: var(--ink); background: rgba(255,255,255,.65); border: 1px solid var(--line); border-radius: 12px; font: inherit; padding: .7rem .8rem; margin-top: .35rem; }
input:focus, textarea:focus { outline: 3px solid rgba(23, 107, 80, .18); border-color: var(--green); }
textarea { resize: vertical; }
.quick-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .7rem 0 1.2rem; }
.chip { padding: .4rem .65rem; font-size: .8rem; }
.full-width { width: 100%; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-heading h2 { margin: .15rem 0 0; }
.compact { font-size: .82rem; padding: .4rem .7rem; }
.message-list { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.message-list li { border-top: 1px solid var(--line); padding: 1rem 0; }
.message-list li:last-child { padding-bottom: 0; }
.message-meta { color: var(--green-dark); font-size: .78rem; font-weight: 800; letter-spacing: .03em; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-state { color: var(--muted); text-align: center; padding: 3rem 1rem; }
.empty-state p { color: var(--ink); font-weight: 750; margin-bottom: .2rem; }
.notice { border-radius: 12px; margin-bottom: 1rem; padding: .8rem 1rem; }
.notice-error { color: #772822; background: #f8ded9; }
.notice-success { color: #10523d; background: #dceee5; }
.prose { max-width: 720px; margin-inline: auto; }

@media (prefers-color-scheme: dark) {
  :root { --ink: #eef5ef; --muted: #b6c2b9; --paper: #101713; --card: #18231e; --line: #3a4940; --green: #76cfa9; --green-dark: #a1e5c7; --red: #ff9a90; --shadow: 0 18px 50px rgba(0,0,0,.2); }
  input, textarea { background: rgba(0,0,0,.18); }
  .primary-button { color: #0d2b20; }
  .notice-error { color: #ffd4cf; background: #572824; }
  .notice-success { color: #c9f4df; background: #164a37; }
}

@media (max-width: 760px) {
  .page-shell { padding-top: 1.5rem; }
  .dashboard-heading { align-items: start; flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .queue { grid-row: 2; }
}
