/* Before You Skip — Civic Register (stage 2 mock)
   Shared stylesheet for the homepage mock and draft About page.
   Fonts are self-hosted. Not for production deploy. */

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-700.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-serif-4-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-700.woff2") format("woff2");
}

:root {
  --paper: #f7f6f2;
  --card: #ffffff;
  --ink: #141513;
  --ink-soft: #3d433f;
  --green: #0b5345;
  --green-2: #0e6b59;
  --glance: #e8f3ef;
  --gold: #c9a227;
  --gold-soft: #f3ead0;
  --rule: #d4d0c8;
  --warn: #8a2b12;
  --max: 44rem;
  --wide: 64rem;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --focus: 3px solid var(--gold);
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  border-top: 4px solid var(--green);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--green-2); }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.nav-button:focus-visible,
.nav-toggle:focus-visible + .nav-button {
  outline: var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.4rem 0.75rem;
  z-index: 30;
}
.skip-link:focus { top: 0.75rem; color: var(--paper); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap,
.header-inner,
.footer-inner,
.masthead-inner {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
}

/* Masthead: independence line + dateline */
.masthead {
  background: var(--glance);
  border-bottom: 1px solid #c5ddd5;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.masthead-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.55rem 0;
}
.dateline {
  font-weight: 600;
  color: var(--ink);
  background: var(--gold-soft);
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
}

/* Header + mobile nav */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  flex: 0 1 auto;
}
.brand:hover { color: var(--ink); }
.brand img,
.brand svg {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1;
}
.wordmark em {
  font-style: normal;
  color: var(--green);
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.nav-button {
  display: none;
}

.site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 719px) {
  .nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-left: auto;
    background: var(--card);
    border: 1px solid var(--rule);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 2;
  }
  .nav-button .icon {
    display: block;
    width: 1.1rem;
    height: 0.85rem;
    position: relative;
  }
  .nav-button .icon::before,
  .nav-button .icon::after,
  .nav-button .icon span {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
  }
  .nav-button .icon span { top: 50%; transform: translateY(-50%); }
  .nav-button .icon::before { top: 0; }
  .nav-button .icon::after { bottom: 0; }
  .nav-toggle:checked + .nav-button .icon span { display: none; }
  .nav-toggle:checked + .nav-button .icon::before {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }
  .nav-toggle:checked + .nav-button .icon::after {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
  }
  .nav-button .close { display: none; }
  .nav-toggle:checked + .nav-button .open { display: none; }
  .nav-toggle:checked + .nav-button .close { display: inline; }

  .site-header nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 8px 16px rgba(20, 21, 19, 0.06);
    z-index: 10;
  }
  .nav-toggle:checked ~ nav { display: block; }
  .site-header nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.4rem 0 0.6rem;
    width: min(100% - 2rem, var(--wide));
    margin-inline: auto;
  }
  .site-header nav li { border-top: 1px solid var(--rule); }
  .site-header nav a {
    display: block;
    padding: 0.7rem 0;
  }
}

main { flex: 1; padding: 1.75rem 0 3.75rem; }

.hero {
  width: min(100% - 2rem, var(--wide));
  margin: 0 auto 2.5rem;
}
.hero h1,
.hero .standfirst { max-width: 40rem; }
h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.2vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
}
.standfirst {
  font-size: 1.125rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 42rem;
}

.section {
  width: min(100% - 2rem, var(--wide));
  margin: 0 auto 2.75rem;
}
.section h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.45rem;
}
.section-lead {
  color: var(--ink-soft);
  margin: 0 0 1.15rem;
  max-width: 48rem;
}

/* Fee cards */
.fee-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 800px) {
  .fee-grid { grid-template-columns: repeat(3, 1fr); }
}
.fee-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--green);
  padding: 1.1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fee-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.fee-card .amount {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 3vw, 2.45rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}
.fee-card .duration {
  font-weight: 600;
  margin: 0.15rem 0 0.65rem;
}
.fee-card .note {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 1rem;
  flex: 1;
}
.checked {
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--gold-soft);
  color: var(--ink);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  margin: 0 0 0.7rem;
}
.fee-card .more {
  font-weight: 600;
  text-decoration: none;
}
.fee-card .more:hover { text-decoration: underline; }

/* Councils we've checked — plain list/grid, no search */
.council-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
@media (min-width: 640px) {
  .council-list { grid-template-columns: repeat(3, 1fr); }
}
.council-list a {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.council-list a:hover {
  border-color: var(--green);
  color: var(--green);
}
.council-list a span {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

/* Decision questions */
.questions {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 720px) {
  .questions { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1rem 1.15rem 1.15rem;
}
.card h3,
.card h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.45rem;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
}

/* Guides */
.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 800px) {
  .guide-list { grid-template-columns: repeat(3, 1fr); }
}
.guide-list li {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1rem 1.15rem 1.15rem;
}
.guide-list h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}
.guide-list h3 a { text-decoration: none; }
.guide-list h3 a:hover { text-decoration: underline; }
.guide-list p {
  margin: 0;
  color: var(--ink-soft);
}

/* Footer */
.site-footer {
  border-top: 4px solid var(--green);
  background: var(--ink);
  color: #e8e0d2;
  padding: 1.75rem 0 2.1rem;
  font-size: 0.925rem;
}
.site-footer a { color: #f0c94d; }
.site-footer p { max-width: 70ch; margin: 0 0 0.7rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  margin: 0 0 1rem;
}
.footer-nav a { color: #e8e0d2; text-decoration: none; font-weight: 600; }
.footer-nav a:hover { color: #f0c94d; text-decoration: underline; }

/* Inner pages: About, future guides/council records */
.prose { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.prose h1 { margin-bottom: 0.75rem; }
.prose .standfirst { margin-bottom: 1.4rem; }
.prose h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.6rem;
}
.prose h3 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }
.prose p, .prose li { max-width: 65ch; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; }
.prose { overflow-x: auto; }

.crumb {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 0.85rem;
}
.crumb a { color: var(--ink-soft); }

.glance {
  background: var(--glance);
  border: 1px solid #c5ddd5;
  padding: 1rem 1.1rem;
  margin: 1.5rem 0;
}
.glance h2 { margin-top: 0; font-size: 1.05rem; }

.notice {
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
}
.notice strong { display: block; margin-bottom: 0.2rem; }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 0;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--rule);
}
th {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}
caption {
  caption-side: bottom;
  text-align: left;
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 0.55rem 0 0;
}

.faq { margin: 1.25rem 0 2rem; }
.faq details { border-bottom: 1px solid var(--rule); padding: 0.55rem 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 0.2rem 0; }
.faq details p { margin: 0.45rem 0 0.6rem; }

.worked {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
}
.worked h2, .worked h3 { margin-top: 0; }
.note-plain { font-size: 0.95rem; color: var(--ink-soft); }
.meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
  padding-top: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.masthead p { margin: 0; }

/* Inner-page kicker: label, not a highlighter pill */
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.65rem;
}

/* Wide fee tables: keep a real table on desktop; stack labelled cards on small screens.
   Add class="fees-table" and data-label on each td (see the skip-permit guide). */
@media (max-width: 719px) {
  table.fees-table {
    min-width: 0;
    border: 0;
  }
  table.fees-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  table.fees-table tbody,
  table.fees-table tr,
  table.fees-table td {
    display: block;
    width: 100%;
  }
  table.fees-table tr {
    background: var(--card);
    border: 1px solid var(--rule);
    margin: 0 0 0.85rem;
    padding: 0.15rem 1rem 0.35rem;
  }
  table.fees-table td {
    border: 0;
    border-bottom: 1px solid var(--rule);
    padding: 0.55rem 0;
  }
  table.fees-table td:last-child { border-bottom: 0; }
  table.fees-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 0.15rem;
  }
  table.fees-table caption {
    caption-side: bottom;
    margin: 0 0 0.75rem;
  }
}
