/* =============================================================
   First Annual Civic Education Debate Tournament
   Congressional Debate — shared stylesheet
   Design direction: dignified civic / founding-documents editorial.
   Accessibility target: WCAG 2.1 Level AA.
   Palette and type chosen for AA contrast and readability.
   ============================================================= */

:root {
  /* Brand palette (IU-inspired) ----------------------------- */
  --crimson: #8a0000;       /* primary accent; AA on white/cream */
  --crimson-bright: #990000;
  --navy: #14213d;          /* dark sections; white text passes AA */
  --navy-soft: #1f2f55;
  --gold: #b8860b;          /* used only as rules/borders or on dark */
  --gold-bright: #c9a227;
  --cream: #faf6ee;         /* page background (parchment) */
  --cream-deep: #f1e9d8;    /* card / callout background */
  --ink: #1c1c1c;           /* body text */
  --ink-soft: #3a3a3a;
  --line: #d8cdb5;          /* hairline rules on cream */
  --white: #ffffff;

  /* Type ---------------------------------------------------- */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing / layout --------------------------------------- */
  --maxw: 72rem;
  --readw: 44rem;   /* ~70 characters for comfortable reading */
  --radius: 10px;
  --pad: clamp(1rem, 3vw, 2rem);
}

/* Reset-ish ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;     /* 17px base for readability */
  line-height: 1.65;
  font-weight: 400;
}

/* Skip link ------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Visible focus for keyboard users -------------------------- */
:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

/* Layout container ----------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
main { display: block; }

/* ---------------- Site header & navigation ---------------- */
.site-header {
  background: var(--navy);
  color: var(--white);
  border-bottom: 5px solid var(--crimson);
}
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.25rem;
  padding-block: 1rem;
}
.masthead .wordmark { flex: 1 1 auto; }
.masthead .brandmark {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-left: auto;
}
.masthead .brandmark img {
  height: 116px;
  width: auto;
  display: block;
  background: var(--white);
  border-radius: 8px;
  padding: 6px;
}
.masthead .seal {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  white-space: nowrap;
}
.masthead .wordmark { line-height: 1.2; }
.masthead .wordmark a { color: var(--white); text-decoration: none; }
.masthead .wordmark .kicker {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.masthead .wordmark .title { font-family: var(--display); font-size: 1.2rem; font-weight: 600; }

.site-nav { background: var(--navy-soft); }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.site-nav a {
  display: block;
  color: var(--white);
  text-decoration: none;
  padding: 0.7rem 0.9rem;
  font-size: 0.92rem;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { background: rgba(255,255,255,0.08); text-decoration: underline; }
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--gold-bright);
  font-weight: 700;
  background: rgba(255,255,255,0.06);
}

/* ---------------- Page hero / titles ---------------------- */
.page-hero { padding-block: clamp(1.75rem, 5vw, 3rem) 1.25rem; }
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crimson);
  font-weight: 700;
  margin: 0 0 0.5rem;
}
h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.08;
  margin: 0 0 0.5rem;
  color: var(--navy);
}
.lede { font-size: 1.2rem; max-width: var(--readw); color: var(--ink-soft); }

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  color: var(--crimson);
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--line);
}
h3 {
  font-family: var(--body);
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--navy);
  margin: 1.75rem 0 0.5rem;
}
h4 { font-weight: 800; font-size: 1.02rem; color: var(--navy); margin: 1.2rem 0 0.4rem; }

p, ul, ol, dl { max-width: var(--readw); }
.prose-wide p, .prose-wide ul, .prose-wide ol { max-width: 60rem; }

a { color: var(--crimson); text-underline-offset: 0.15em; }
a:hover { color: var(--crimson-bright); }

ul, ol { padding-left: 1.4rem; }
li { margin-block: 0.3rem; }
li > ul, li > ol { margin-top: 0.3rem; }

hr { border: 0; border-top: 2px solid var(--line); margin: 2.5rem 0; }

strong { font-weight: 800; }
abbr[title] { text-decoration: underline dotted; cursor: help; }

/* ---------------- Reusable components --------------------- */
/* Card grid */
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  max-width: 100%;
  padding: 0;
  list-style: none;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--crimson);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.4rem;
}
.card h2, .card h3 { margin-top: 0; border: 0; color: var(--navy); }
.card h2 { font-size: 1.25rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card a.more { font-weight: 700; }

/* Label chip */
.chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--crimson);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  vertical-align: middle;
}
.chip.navy { background: var(--navy); }
.chip.gold { background: var(--gold); color: var(--ink); }

/* Callouts */
.note, .tip, .both-sides, .heads-up {
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  max-width: var(--readw);
}
.note    { background: var(--cream-deep); border-left: 5px solid var(--navy); }
.tip     { background: #eef5ee; border-left: 5px solid #2f6b3a; }
.heads-up{ background: #fdf3e3; border-left: 5px solid var(--gold); }
.both-sides { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--navy); }
.note > :first-child, .tip > :first-child, .heads-up > :first-child, .both-sides > :first-child { margin-top: 0; }
.note > :last-child, .tip > :last-child, .heads-up > :last-child, .both-sides > :last-child { margin-bottom: 0; }
.callout-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.tip .callout-label { color: #2f6b3a; }
.note .callout-label { color: var(--navy); }
.heads-up .callout-label { color: #8a6400; }

/* Two-column "both sides" */
.sides { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 38rem) { .sides { grid-template-columns: 1fr; } }
.sides .for, .sides .against {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.sides .for { border-top: 4px solid #2f6b3a; }
.sides .against { border-top: 4px solid var(--crimson); }
.sides h4 { margin-top: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }
table { border-collapse: collapse; width: 100%; background: var(--white); font-size: 0.98rem; }
caption { text-align: left; font-weight: 800; color: var(--navy); padding: 0.5rem 0; font-size: 1.05rem; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy); color: var(--white); border-color: var(--navy); }
tbody th[scope="row"] { background: var(--cream-deep); font-weight: 800; white-space: nowrap; }
tbody tr:nth-child(even) td { background: #fbf8f1; }

/* Bill / legislation block (looks like an engrossed bill) */
.bill {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem 1.5rem;
  margin: 1.25rem 0;
  max-width: 60rem;
}
.bill .bill-head {
  border-bottom: 2px solid var(--crimson);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}
.bill .bill-no { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--crimson); font-weight: 800; }
.bill .bill-title { font-family: var(--display); font-size: 1.3rem; font-weight: 600; color: var(--navy); margin: 0.15rem 0 0; }
.bill ol.clauses { counter-reset: clause; padding-left: 0; list-style: none; }
.bill ol.clauses > li { counter-increment: clause; padding-left: 3.2rem; position: relative; margin-block: 0.6rem; }
.bill ol.clauses > li::before {
  content: "Sec. " counter(clause) ".";
  position: absolute; left: 0; top: 0;
  font-weight: 800; color: var(--crimson); font-size: 0.92rem;
}
.bill .anchor { color: var(--ink-soft); }

/* Definition list (glossary, schedule notes) */
dl.defs dt { font-weight: 800; color: var(--navy); margin-top: 0.9rem; }
dl.defs dd { margin: 0.15rem 0 0; }

/* Steps */
ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps > li {
  counter-increment: step; position: relative; padding-left: 3rem; margin-block: 1rem;
  min-height: 2rem;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.1rem;
  width: 2rem; height: 2rem; line-height: 2rem; text-align: center;
  background: var(--crimson); color: var(--white); border-radius: 50%;
  font-weight: 800;
}

/* On-this-page mini nav */
.toc {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin: 1.25rem 0; max-width: var(--readw);
}
.toc p { margin: 0 0 0.4rem; font-weight: 800; color: var(--navy); }
.toc ul { margin: 0; }

/* Dark band section */
.band {
  background: var(--navy); color: var(--white);
  padding-block: clamp(1.5rem, 4vw, 2.5rem); margin-top: 3rem;
}
.band h2 { color: var(--gold-bright); border-color: rgba(255,255,255,0.25); }
.band a { color: var(--gold-bright); }

/* Buttons / link-buttons */
.btn {
  display: inline-block; background: var(--crimson); color: var(--white);
  text-decoration: none; font-weight: 800; padding: 0.7rem 1.1rem; border-radius: var(--radius);
  border: 2px solid var(--crimson);
}
.btn:hover { background: var(--crimson-bright); color: var(--white); }
.btn.ghost { background: transparent; color: var(--white); border-color: var(--gold-bright); }
.btn.ghost:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0; }

/* ---------------- Footer ---------------------------------- */
.site-footer {
  background: var(--navy); color: #e9e6df; margin-top: 0;
  border-top: 5px solid var(--crimson); padding-block: 2rem;
  font-size: 0.92rem;
}
.site-footer a { color: var(--gold-bright); }
.site-footer h2 { color: var(--white); border: 0; font-size: 1.05rem; margin: 0 0 0.4rem; }
.footer-cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem,1fr)); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer .fineprint { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.2); color: #c9c5bd; }
.brand-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem;
  margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.2);
}
.brand-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem 1.1rem; }
.brand-logos img {
  height: 54px; width: auto; display: block;
  background: var(--white); border-radius: 6px; padding: 7px 11px;
}
.brand-bar .sponsor-line { margin: 0; color: #d7d3cb; flex: 1 1 16rem; }
.brand-bar .sponsor-line strong { color: var(--white); }
.hosts-line { margin: 1rem 0 0; color: #c9c5bd; }

/* visually-hidden but available to screen readers */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Print: clean handouts ------------------------------------ */
@media print {
  .site-nav, .skip-link, .btn-row, .band { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; }
  .site-header, .site-footer { background: #fff; color: #000; border-color: #000; }
  .card, .bill, table { break-inside: avoid; }
}
