/* The Permit Dispatch: site styles (site_build.py copies this to /style.css).
   A plain newspaper page: one reading column, serif type, rules between sections, one green
   for every action. No web fonts, no trackers, nothing loaded from elsewhere. */

:root {
  --paper: #fbfaf6;
  --ink: #1c1b19;
  --muted: #5c5850;
  --rule: #d9d4c7;
  --box: #f3f0e7;
  --green: #209d50;
  --green-dark: #1a8443;
  --measure: 44rem;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.6 var(--serif);
}

main, .bar, .foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { color: var(--green-dark); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.75rem); margin: 2em 0 0.5em; padding-top: 0.6em; border-top: 1px solid var(--rule); }
h3 { font-size: 1.2rem; margin: 1.6em 0 0.3em; }
p, ul, ol { margin: 0 0 1em; }
li { margin: 0.15em 0; }
img { max-width: 100%; height: auto; display: block; margin: 0.5em 0 1.5em; border: 1px solid var(--rule); }

/* ---------- masthead (the top block's "## The Permit Dispatch") */
.hero { padding-top: 28px; }
.nameplate h2 {
  font-size: clamp(2.3rem, 9vw, 3.9rem);
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 0.35em;
  padding: 0.18em 0 0.12em;
  border-top: 4px double var(--ink);
  border-bottom: 1px solid var(--ink);
}
.nameplate p { font-size: 1.08rem; }

/* ---------- thin top bar on the terms and privacy pages */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.bar-name { font-weight: 700; font-size: 1.15rem; text-decoration: none; }

/* ---------- buttons */
.btn, .signup button {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.6em 1.2em;
  font: 600 0.95rem/1.2 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover, .signup button:hover { background: var(--green-dark); color: #fff; }
.btn-big { font-size: 1.02rem; padding: 0.7em 1.5em; }
.content p > .btn { margin: 0.2em 0.5em 0.2em 0; }

/* ---------- signup forms */
.signup { margin: 0.5em 0 1.5em; }
.signup label { display: block; font: 600 0.9rem var(--sans); margin-bottom: 6px; }
.signup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 16rem;
  min-width: 0;
  font: 1rem var(--sans);
  padding: 0.65em 0.8em;
  border: 1px solid #b9b3a4;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.signup input[type="email"]:focus { outline: 3px solid rgba(32, 157, 80, 0.35); border-color: var(--green); }
.signup button { font-size: 1rem; padding: 0.65em 1.3em; }
.signup button[disabled] { opacity: 0.6; cursor: default; }
.signup .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup-msg { min-height: 1.2em; margin: 8px 0 0; font: 0.95rem/1.45 var(--sans); }
.signup-msg.ok { color: var(--green-dark); font-weight: 600; }
.signup-msg.err { color: #a3361f; }
.signup.done label, .signup.done .signup-row { display: none; }
.signup-bottom { border-top: 1px solid var(--rule); padding-top: 1em; margin-top: 1em; }

/* ---------- product page body */
.content { padding-bottom: 1em; }
.content > h1:first-child { margin-top: 1.4em; padding-top: 0.6em; border-top: 1px solid var(--rule); }

.table-wrap { overflow-x: auto; margin: 0.5em 0 1.2em; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.45em 0.9em 0.45em 0; border-bottom: 1px solid var(--rule); }
th { font: 600 0.85rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }

/* each plan: heading, italic cadence line, checklist, buttons, in one box */
.plan {
  background: var(--box);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--green);
  border-radius: 8px;
  padding: 4px 22px 14px;
  margin: 1.3em 0;
}
.plan h3 { margin-top: 0.7em; }
.plan h3 + p { color: var(--muted); margin-bottom: 0.7em; }
.plan ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  column-gap: 1.8em;
  row-gap: 0.1em;
}
.plan li { position: relative; padding-left: 1.5em; font-size: 0.97rem; }
.plan li::before { content: "\2713"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.plan ul + p { margin-bottom: 0.4em; }

/* terms and privacy */
.doc { padding-top: 1.4em; }
.doc > h1:first-child { margin-top: 0.4em; padding-top: 0; border-top: 0; }
.doc h2, .doc h3 { border-top: 0; padding-top: 0; margin-top: 1.5em; }
.doc h3 { font-size: 1.15rem; }

/* ---------- footer */
.foot {
  border-top: 4px double var(--ink);
  margin-top: 2em;
  padding-top: 14px;
  padding-bottom: 40px;
  color: var(--muted);
  font: 0.9rem/1.5 var(--sans);
}
.foot p { margin: 0 0 0.5em; }

/* ---------- phones */
@media (max-width: 640px) {
  body { font-size: 17px; }
  main, .bar, .foot { padding: 0 16px; }
  .bar { padding-top: 12px; padding-bottom: 12px; }
  .bar .btn { font-size: 0.85rem; padding: 0.5em 0.9em; }
  .hero { padding-top: 16px; }
  .plan { padding: 2px 14px 12px; }
  .plan ul { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  th, td { font-size: 0.85rem; padding-right: 0.6em; }
  .signup button { flex: 1 1 100%; }
}

@media print {
  .signup, .bar .btn { display: none; }
  body { background: #fff; }
}
