/* Plain, mobile-first stylesheet. No external font, no CDN, no JavaScript:
   the CSP in newsletter/security.py allows only same-origin resources. */

:root {
  --ink: #16202b;
  --muted: #5a6672;
  --line: #d9dee4;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --accent: #1d5b8f;
  --accent-ink: #ffffff;
  --warn-bg: #fdf6e3;
  --warn-line: #e6d19a;
  --danger: #9b2226;
  --error: #a4262c;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  position: static;
  display: inline-block;
  padding: 0.5rem;
  background: var(--panel);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: baseline;
}

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

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem;
}

.foot {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 0.6rem; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 0.5rem; }
h2:first-child { margin-top: 0; }

p { margin: 0 0 0.8rem; }

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

.hero { padding: 0.5rem 0 1rem; }
.lede { font-size: 1.05rem; color: var(--ink); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem;
  margin: 0 0 1.1rem;
}

.card.narrow { max-width: 32rem; }
.card.danger { border-color: var(--warn-line); }

.banner {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}

.field { display: block; margin: 0 0 0.9rem; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.6rem;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus, button:focus, a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button, .button {
  display: inline-block;
  padding: 0.6rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
}

button.danger {
  background: var(--danger);
  border-color: var(--danger);
}

.linklike {
  padding: 0;
  color: var(--accent);
  background: none;
  border: none;
  font-weight: 400;
  text-decoration: underline;
}

form.inline { display: inline; }

a.secondary { font-weight: 600; }

.refine {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin: 0 0 1rem;
}

.refine > summary {
  cursor: pointer;
  font-weight: 600;
  margin: -0.6rem -0.8rem;
  padding: 0.6rem 0.8rem;
}

.refine[open] > summary { margin-bottom: 0.6rem; }

/* Honeypot: a real, focusable text input moved out of sight. Not type=hidden, which
   naive bots skip, and not display:none, which some of them also detect. */
.hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hint { display: block; color: var(--muted); font-size: 0.875rem; }
.error { display: block; color: var(--error); font-size: 0.875rem; }
.errors { color: var(--error); padding-left: 1.1rem; }

.messages { list-style: none; margin: 0 0 1rem; padding: 0; }
.msg {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.5rem;
}

.facts { margin: 0; }
.facts dt { font-weight: 600; color: var(--muted); font-size: 0.875rem; }
.facts dd { margin: 0 0 0.7rem; overflow-wrap: anywhere; }

.issues { list-style: none; margin: 0; padding: 0; }
.issues li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.issues li:last-child { border-bottom: none; }

.paper {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  margin-top: 0.9rem;
}
.paper h2 { font-size: 1.05rem; }
.meta { color: var(--muted); font-size: 0.9rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (max-width: 30rem) {
  .topbar { flex-direction: column; align-items: flex-start; }
  button, .button { width: 100%; text-align: center; }
  .linklike { width: auto; }
}
