/* Design rules: white background, black text, system font stack.
   Old Glory Blue #0A3161 and Old Glory Red #B31942 are used only for
   graphics, borders, rules, buttons, and table headers. */
:root {
  --blue: #0A3161;
  --red: #B31942;
  --white: #FFFFFF;
  --black: #000000;
  --rule: 4px;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--blue); color: var(--white); padding: .75rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* Links are black and underlined; accent color only in the underline. */
a { color: var(--black); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--red); }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.bars { display: flex; height: .75rem; }
.bar-blue { flex: 2; background: var(--blue); }
.bar-red { flex: 1; background: var(--red); }

/* Header and nav */
.site-header { border-bottom: 2px solid var(--blue); padding-bottom: .75rem; }
.site-name { margin: .75rem 0 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; }
.site-name a { text-decoration: none; }
.site-logo { margin: .5rem 0 0; }
.site-logo a { display: inline-block; padding: .25rem 0; text-decoration: none; }
.site-logo img { display: block; max-width: 100%; height: auto; }
.site-tag { margin: 0 0 .5rem; font-size: .95rem; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
nav a {
  display: flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0 .9rem;
  border: 2px solid var(--blue); border-radius: .375rem;
  text-decoration: none; font-weight: 600; font-size: 1rem;
}
nav a:hover { border-color: var(--red); }
nav a[aria-current="page"] { background: var(--blue); color: var(--white); }

/* Content */
main { padding-top: 1rem; padding-bottom: 2rem; }
.line { display: block; }
h1, h2 { text-wrap: balance; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 1rem 0 .75rem; padding-bottom: .5rem; border-bottom: var(--rule) solid var(--red); }
h2 { font-size: 1.4rem; line-height: 1.25; margin: 2rem 0 .5rem; padding-bottom: .25rem; border-bottom: 2px solid var(--blue); }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .25rem; }
.lead { font-size: 1.25rem; }
blockquote { margin: 1rem 0; padding: .5rem 1rem; border-left: var(--rule) solid var(--blue); }
.opinion { border-left: var(--rule) solid var(--red); padding-left: 1rem; }
.updated { margin-top: 2rem; font-size: .95rem; border-top: 2px solid var(--blue); padding-top: .75rem; }
.sources-line { margin-top: 2rem; font-size: .95rem; }

/* Visible placeholders; removed before launch */
.todo { margin: 1rem 0; padding: .5rem .75rem; border: 2px dashed var(--red); border-left-width: var(--rule); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .5rem 1.25rem;
  background: var(--red); color: var(--white);
  border: 2px solid var(--red); border-radius: .375rem;
  font-weight: 700; font-size: 1.1rem; text-decoration: none;
}
.btn:hover { background: var(--white); color: var(--black); }
.btn-blue { background: var(--blue); border-color: var(--blue); }

/* Call to action and "Vote NO" boxes */
.cta, .vote-no { margin: 1.5rem 0; padding: 1rem; border: var(--rule) solid var(--blue); border-top-color: var(--red); }
.cta h2, .vote-no h2 { margin-top: 0; border-bottom: 0; padding-bottom: 0; }

/* Large figures in the Prop A key-number box */
.big-figure { margin: .25rem 0; font-size: clamp(2.2rem, 11vw, 3.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.mid-figure { margin: 1rem 0 .25rem; font-size: 1.6rem; font-weight: 800; line-height: 1.15; }

/* Proposition cards on the home page */
.cards { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 1rem; }
.card { border: 2px solid var(--blue); padding: 1rem; display: grid; gap: .25rem; }
.card h3 { margin: 0; display: flex; align-items: center; gap: .75rem; }
.letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; background: var(--blue); color: var(--white);
  font-weight: 800; border-radius: .25rem;
}
.card p { margin: .25rem 0; }

/* Tables scroll sideways on small screens */
.table-scroll { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--blue); }
table { border-collapse: collapse; width: 100%; }
table.wide { min-width: 34rem; }
caption { text-align: left; font-weight: 700; padding: .5rem .75rem; }
th, td { text-align: left; padding: .6rem .75rem; border-top: 1px solid var(--blue); vertical-align: top; }
thead th { background: var(--blue); color: var(--white); border-top: 0; }
tbody th { font-weight: 600; }
table.compact { font-size: .95rem; }
table.compact th, table.compact td { padding: .6rem .4rem; }

/* Collapsible full text (no JavaScript) */
details { margin: 1rem 0; border: 2px solid var(--blue); }
summary { display: flex; align-items: center; min-height: 2.75rem; padding: .5rem .75rem; font-weight: 600; cursor: pointer; }
details[open] > summary { border-bottom: 2px solid var(--blue); }
details > blockquote { margin: .75rem; }

/* Collapsed sections: clear plus/minus so they read as expandable */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; margin-left: auto; padding-left: .75rem; font-size: 1.5rem; font-weight: 800; line-height: 1; }
details[open] > summary::after { content: "\2212"; }
.fold > summary h2 { margin: 0; padding: 0; border: 0; font-size: 1.15rem; line-height: 1.3; }
.fold > :not(summary) { margin-left: .75rem; margin-right: .75rem; }
.fold > .table-scroll, .fold > figure { margin-left: .75rem; margin-right: .75rem; }

/* Jump link to the opinion section */
.jump { margin: .25rem 0 1rem; }
.jump a { display: inline-block; padding: .6rem 0; font-weight: 600; }

figure { margin: 1rem 0; }
figure img { max-width: 100%; height: auto; display: block; border: 2px solid var(--blue); }
figcaption { font-size: .95rem; padding-top: .25rem; }

.qr { display: block; width: 10rem; height: 10rem; border: 2px solid var(--blue); padding: .5rem; background: var(--white); }
.qr-large { width: 16rem; height: 16rem; max-width: 100%; }
.share-message { padding: .75rem 1rem; border: 2px solid var(--blue); -webkit-user-select: all; user-select: all; }

/* Footer */
.site-footer { margin-top: 2rem; font-size: .95rem; }
.site-footer p { margin: .75rem 0 1.5rem; }

@media (min-width: 40rem) {
  body { font-size: 1.1875rem; }
  h1 { font-size: 2.25rem; }
  .cards { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
