:root {
  --ink: #161613;
  --paper: #f4f0e8;
  --paper-deep: #e9e2d5;
  --line: #c9c0b2;
  --muted: #716b62;
  --accent: #b63b24;
  --white: #fffdf8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
a { color: inherit; text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
button, .button { border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--white); padding: .85rem 1.15rem; cursor: pointer; text-decoration: none; display: inline-block; font-weight: 650; }
button:hover, .button:hover { background: var(--accent); border-color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.landing-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto auto; max-width: 1440px; margin: 0 auto; padding: 1.25rem; }
.masthead { font-size: .78rem; font-weight: 800; letter-spacing: .18em; border-bottom: 1px solid var(--ink); padding-bottom: 1rem; }
.masthead a { text-decoration: none; }
.hero { padding: 12vh 0 11vh; }
.eyebrow { margin: 0 0 1.2rem; text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; font-weight: 750; color: var(--accent); }
.hero h1, .legal h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(4rem, 16vw, 10rem); font-weight: 400; line-height: .86; letter-spacing: -.065em; margin: 0; max-width: 1100px; }
.promise { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.65rem, 4vw, 3.1rem); line-height: 1.1; margin: 2.25rem 0; letter-spacing: -.025em; }
.promise.smaller { font-size: clamp(1.35rem, 3vw, 2.2rem); line-height: 1.3; }
.signup-form { display: grid; grid-template-columns: minmax(0, 32rem) auto; max-width: 47rem; margin-top: 3rem; }
.signup-form input { min-width: 0; background: var(--white); border: 1px solid var(--ink); border-right: 0; padding: 1rem; font-size: 1rem; }
.signup-form input:focus, input:focus, textarea:focus { outline: 3px solid rgba(182,59,36,.25); outline-offset: 1px; }
.field-error { grid-column: 1 / -1; color: #8f2417; margin: .5rem 0 0; font-size: .85rem; }
.manifesto { border-top: 1px solid var(--ink); padding: 3rem 0; display: grid; gap: 1.25rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; line-height: 1.45; }
.manifesto p { margin: 0; max-width: 31rem; }
.manifesto small { font: .8rem/1.4 Inter, sans-serif; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); padding: 1.1rem 0 .25rem; display: flex; justify-content: space-between; gap: 1rem; font-size: .72rem; color: var(--muted); }
.site-footer nav { display: flex; gap: 1rem; }
.short-page { grid-template-rows: auto 1fr auto; }
.legal { padding: 10vh 0; max-width: 50rem; font: 1.15rem/1.7 Georgia, serif; }
.legal h1 { font-size: clamp(3.5rem, 10vw, 7rem); margin-bottom: 3rem; }
.legal-note { color: var(--muted); font: .8rem Inter, sans-serif; margin-top: 3rem; }
.flash-stack { position: fixed; z-index: 10; top: 1rem; left: 50%; transform: translateX(-50%); width: min(92vw, 42rem); }
.flash { padding: .85rem 1rem; background: var(--ink); color: white; box-shadow: 0 4px 25px rgba(0,0,0,.16); }
.flash.error { background: #8f2417; }
.flash.success { background: #275d42; }

/* Admin */
.admin-page { background: #f6f5f2; }
.admin-nav { min-height: 4.5rem; padding: 1rem max(1.25rem, calc((100vw - 1200px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d9d6d0; background: white; }
.admin-brand { font-weight: 850; letter-spacing: .12em; text-decoration: none; font-size: .78rem; }
.admin-brand span { color: var(--muted); font-weight: 500; }
.admin-nav nav { display: flex; align-items: center; gap: 1.5rem; font-size: .85rem; }
.admin-nav nav form { margin: 0; }
.link-button { padding: 0; border: 0; color: var(--muted); background: transparent; font-weight: 400; text-decoration: underline; }
.link-button:hover { background: transparent; color: var(--ink); }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 4rem 1.25rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.page-heading h1, .login-panel h1 { font: 400 clamp(2.8rem, 6vw, 5.5rem)/.95 Georgia, serif; letter-spacing: -.045em; margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.actions form { margin: 0; }
.button.secondary { background: transparent; color: var(--ink); border-color: #aaa49a; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #d2cfc8; background: white; margin-bottom: 1.5rem; }
.stat-grid div { padding: 1.4rem; border-right: 1px solid #d2cfc8; border-bottom: 1px solid #d2cfc8; }
.stat-grid strong { display: block; font: 400 2.3rem Georgia, serif; margin-bottom: .35rem; text-transform: capitalize; }
.stat-grid span { color: var(--muted); font-size: .78rem; }
.admin-columns { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.5rem; }
.panel { background: white; border: 1px solid #d2cfc8; padding: 1.5rem; }
.panel.narrow { max-width: 780px; }
.panel h2 { font: 400 1.65rem Georgia, serif; margin: 0 0 1.25rem; }
.panel h3 { font-size: 1.15rem; margin: 1rem 0 .5rem; }
.status { display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; background: #e7e4de; padding: .3rem .45rem; color: #555; font-weight: 700; }
.status.approved { background: #d9eadf; color: #275d42; }.status.scheduled { background: #e1e5f2; color: #344577; }.status.sent { background: #d9eadf; color: #275d42; }.status.failed { background: #f4dbd6; color: #8f2417; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { color: var(--muted); font-weight: 550; text-align: left; }
th, td { padding: .8rem .35rem; border-bottom: 1px solid #e1ded8; }
th:last-child, td:last-child { text-align: right; }
.stacked-form { display: grid; gap: .65rem; }
.stacked-form label { font-size: .82rem; font-weight: 700; margin-top: .7rem; }
.stacked-form label span { font-weight: 400; color: var(--muted); }
.stacked-form input, .stacked-form textarea { width: 100%; border: 1px solid #aaa49a; background: #fff; padding: .8rem; resize: vertical; }
.stacked-form button { justify-self: start; margin-top: .8rem; }
.form-help { color: var(--muted); font-size: .78rem; margin: .25rem 0; }
.field-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.field-row > div { display: grid; gap: .65rem; }
.login-panel { max-width: 28rem; margin: 10vh auto; padding: 2rem; background: white; border: 1px solid #d2cfc8; }
.login-panel h1 { margin-bottom: 2rem; }

@media (min-width: 760px) {
  .landing-shell { padding: 1.75rem 3rem; }
  .manifesto { grid-template-columns: 1.2fr 1fr .8fr auto; align-items: end; }
}
@media (max-width: 700px) {
  .signup-form { grid-template-columns: 1fr; }
  .signup-form input { border-right: 1px solid var(--ink); border-bottom: 0; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .admin-nav { align-items: flex-start; gap: 1rem; }
  .admin-nav nav { gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
  .admin-main { padding-top: 2.5rem; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .actions { justify-content: flex-start; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-columns, .field-row { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
}

