:root {
  --bg: #FAF7F2;
  --ink: #1A1A1A;
  --muted: #6B655C;
  --rule: #DDD6CB;
  --accent: #B7654A;
  --accent-soft: #F1E1D8;
  --error: #B00020;
  --serif: "Iowan Old Style", "Charter", "Source Serif Pro", Georgia, serif;
  --sans: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

header.site {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px 24px;
  border-bottom: 1px solid var(--rule);
}
header.site .meta { color: var(--muted); font-size: 14px; }

h1, h2 { font-family: var(--serif); font-weight: 600; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; }
h3 { font-family: var(--serif); font-size: 19px; margin: 24px 0 8px; }
.intro { color: var(--muted); margin: 0 0 32px; }

.question-meta { color: var(--muted); font-size: 14px; margin-bottom: 4px; letter-spacing: 0.04em; text-transform: uppercase; }

.progress {
  height: 3px;
  background: var(--rule);
  margin: 0 0 28px;
  border-radius: 2px;
  overflow: hidden;
}
.progress > div {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

label {
  display: block;
  font-weight: 600;
  margin: 18px 0 6px;
  font-size: 15px;
}
.sub-label { color: var(--muted); font-weight: 400; font-size: 14px; margin-top: 2px; }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: white;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 10px 12px;
  resize: vertical;
  font-size: 16px;
}
textarea { min-height: 88px; line-height: 1.55; }
textarea.short { min-height: 44px; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

button, .btn {
  font: inherit;
  background: var(--ink);
  color: white;
  border: 0;
  padding: 11px 22px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
}
button.secondary, .btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
button:hover:not(:disabled) { background: #000; }

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.nav-row .savemark { color: var(--muted); font-size: 14px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--rule);
}
.checkbox-row:last-child { border-bottom: 0; }
.checkbox-row input[type="checkbox"] { margin-top: 6px; }
.checkbox-row .tool-text { flex: 1; }
.checkbox-row input.tool-name {
  margin-top: 4px;
  font-size: 14px;
}

.block {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 18px 18px 6px;
  margin: 16px 0;
  background: #fffdf9;
}
.block .block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -4px 0 12px;
}
.block .block-header h3 { margin: 0; font-size: 16px; }
.block-remove {
  background: transparent;
  color: var(--muted);
  border: 0;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
}
.add-block {
  background: transparent;
  color: var(--accent);
  border: 1px dashed var(--accent);
  padding: 10px 16px;
  width: 100%;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 8px;
  font-size: 15px;
}

.honeypot { position: absolute !important; left: -10000px !important; top: -10000px !important; }

.error {
  background: #FBEAEA;
  color: var(--error);
  padding: 10px 14px;
  border-radius: 4px;
  margin: 12px 0;
}
.notice {
  background: var(--accent-soft);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 4px;
  margin: 12px 0;
}

.center-card {
  text-align: center;
  margin: 80px auto 0;
}
.center-card h1 { margin-bottom: 12px; }

footer.site {
  margin: 80px 0 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Admin table */
table.subs {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
table.subs th, table.subs td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
table.subs th { color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; font-size: 12px; }
table.subs tr:hover td { background: #f5efe6; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.tag.done { background: #e5f3e7; color: #1f6b35; }
.tag.live { background: #fdecdc; color: #8c3d12; }

.admin-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}
