/* ============================================================================
   government.london — shared content-page components
   Builds on styles.css tokens/components. Westminster night, brass & Portland stone.
   Breadcrumbs · page headers · roundel/Thames-meander section dividers · card grids
   news · callouts · definition tables · FAQ accordion · borough directory
   contact coordinates · council finder · discover cards.
   ========================================================================== */

/* Active nav state */
.nav__link[aria-current="page"] { color: var(--thames-ink); background: color-mix(in srgb, var(--thames) 9%, transparent); }
.header.is-stuck .nav__link[aria-current="page"] { color: var(--brass-2); background: color-mix(in srgb, var(--stone) 10%, transparent); }

/* ---------------------------------------------------------------------------
   Breadcrumb
   ------------------------------------------------------------------------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); margin-bottom: 1.4rem; }
.breadcrumb a { color: var(--thames-ink); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; text-decoration-color: var(--brass); }
.breadcrumb span[aria-hidden] { color: var(--brass); }

/* ---------------------------------------------------------------------------
   Page header + eyebrow
   ------------------------------------------------------------------------- */
.page-head { max-width: 62ch; margin-bottom: clamp(1.8rem, 1rem + 2vw, 2.8rem); }
.page-head .eyebrow { margin-bottom: 1rem; color: var(--red-ink); }
.page-head .eyebrow::before { background: var(--brass); }
.page-head h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem); letter-spacing: -0.025em; margin-bottom: 0.9rem; }
.page-head .lead { color: var(--text); }
.page-head .ref { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); margin-top: 0.9rem; letter-spacing: 0.04em; }

.block-h2 { font-size: var(--fs-h3); margin: clamp(2rem, 1.5rem + 1.5vw, 3rem) 0 1.1rem; }

/* Generic prose */
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1rem; color: var(--text); }
.prose h2, .prose h3 { margin-top: 1.8rem; margin-bottom: 0.7rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.2rem; color: var(--text); }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--thames-ink); }

/* ---------------------------------------------------------------------------
   Section header w/ roundel + Thames-meander divider ornament
   Wrap the section title in .section-head--ornament for the flanked meander rule.
   ------------------------------------------------------------------------- */
.ornament-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: clamp(2rem, 1rem + 3vw, 3.5rem) 0;
  color: var(--brass);
}
.ornament-rule::before, .ornament-rule::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--line-strong));
}
.ornament-rule::after { background: linear-gradient(90deg, var(--line-strong), transparent); }
.ornament-rule svg { width: 46px; height: 22px; flex: none; }
.ornament-rule--dark { color: var(--brass-2); }
.ornament-rule--dark::before { background: linear-gradient(90deg, transparent, var(--line-ink)); }
.ornament-rule--dark::after { background: linear-gradient(90deg, var(--line-ink), transparent); }

/* A section head that carries the small roundel mark before the eyebrow */
.section-head__mark { width: 30px; height: 30px; flex: none; color: var(--brass); margin-bottom: 0.6rem; }

/* ---------------------------------------------------------------------------
   Two-column article layout (service pages)
   ------------------------------------------------------------------------- */
.article { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 26%, 320px); gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; }
.article__aside { position: sticky; top: 6.5rem; display: grid; gap: 1rem; }

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: 0.9rem; margin: 0.5rem 0 1.5rem; }
.steps li { counter-increment: step; position: relative; padding: 1rem 1.2rem 1rem 3.4rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--text); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 1rem; top: 1rem; font-family: var(--font-mono); font-weight: 500; font-size: 0.85rem; color: var(--brass); }

/* Requirements checklist */
.reqs { list-style: none; padding: 0; display: grid; gap: 0.55rem; margin: 0.5rem 0 1.5rem; }
.reqs li { position: relative; padding-left: 1.9rem; color: var(--text); }
.reqs li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 14px; height: 8px; border-left: 2px solid var(--thames); border-bottom: 2px solid var(--thames); transform: rotate(-45deg); }

/* ---------------------------------------------------------------------------
   Definition tables — cost / eligibility (factbox + deflist)
   ------------------------------------------------------------------------- */
.factbox { display: grid; gap: 0.75rem; padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--stone-2); }
.factbox__row { display: flex; flex-direction: column; gap: 0.15rem; }
.factbox__row .k { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.factbox__row .v { font-weight: 600; color: var(--ink); }
.factbox .btn { justify-content: center; margin-top: 0.3rem; }

/* Full definition table (e.g. cost / eligibility grids) */
.deftable { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.98rem; }
.deftable caption { text-align: left; font-family: var(--font-mono); font-size: var(--fs-small); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 0.6rem; }
.deftable th, .deftable td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.deftable thead th { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--stone-2); }
.deftable tbody th { font-weight: 600; color: var(--ink); width: 40%; }
.deftable tbody tr:hover { background: color-mix(in srgb, var(--thames) 5%, transparent); }
.deftable td .price { font-family: var(--font-mono); color: var(--red-ink); font-weight: 500; }

/* ---------------------------------------------------------------------------
   Feature / callout / note boxes
   ------------------------------------------------------------------------- */
.callout {
  display: flex; gap: 1rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: var(--r-md);
  background: var(--paper);
  margin: 1.2rem 0;
}
.callout .ico { flex: none; color: var(--brass); margin-top: 0.15rem; }
.callout h4 { margin-bottom: 0.3rem; }
.callout p { color: var(--text); font-size: 0.98rem; }
.callout--info { border-left-color: var(--thames); }
.callout--info .ico { color: var(--thames); }
.callout--alert { border-left-color: var(--red); background: color-mix(in srgb, var(--red) 4%, var(--paper)); }
.callout--alert .ico { color: var(--red-ink); }

.note {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--muted);
  padding: 0.9rem 1.1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--stone-2) 60%, transparent);
  margin: 1.1rem 0;
}
.note b { color: var(--ink); }

/* Feature callout — full-width brass-edged panel */
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  padding: clamp(1.4rem, 1rem + 2vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--paper), var(--stone-2));
  align-items: center;
  margin: 1.5rem 0;
}
.feature__mark { width: 56px; height: 56px; color: var(--brass); }
.feature h3 { margin-bottom: 0.4rem; }
.feature p { color: var(--text); max-width: 56ch; }

/* CTA band linking to the official service (navy) */
.official-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; padding: 1.5rem 1.6rem; border-radius: var(--r-md); background: var(--ink); color: var(--stone); margin-top: 2rem; border: 1px solid var(--line-ink); }
.official-band p { color: color-mix(in srgb, var(--stone) 80%, transparent); font-size: var(--fs-small); max-width: 48ch; }
.official-band strong { color: var(--stone); }

/* Related services / cards reuse .service and .topic from styles.css */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1rem; }

/* ---------------------------------------------------------------------------
   Topic hub icon + chiplist
   ------------------------------------------------------------------------- */
.hub-icon { width: 56px; height: 56px; color: var(--thames); margin-bottom: 1rem; }
.hub-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; }
.chiplist { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0 1.5rem; }

/* ---------------------------------------------------------------------------
   FAQ accordion (details/summary, no JS)
   ------------------------------------------------------------------------- */
.faq { display: grid; gap: 0.6rem; margin-top: 0.5rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); overflow: hidden; transition: border-color 0.2s var(--ease); }
.faq details[open] { border-color: var(--brass); }
.faq summary { cursor: pointer; padding: 1rem 1.2rem; min-height: 44px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--brass); font-size: 1.35rem; line-height: 1; transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 3px solid var(--brass); outline-offset: -3px; }
.faq details > div { padding: 0 1.2rem 1.1rem; color: var(--text); }
.faq details > div p { margin-bottom: 0.7rem; }

/* ---------------------------------------------------------------------------
   Borough directory grid (33 authorities)
   ------------------------------------------------------------------------- */
.borough-dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.borough {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s var(--ease);
  min-height: 5.5rem;
}
.borough:hover { background: var(--white); }
.borough:hover .borough__name { color: var(--thames-ink); }
.borough__idx { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; }
.borough__name { font-weight: 600; font-size: 1.02rem; line-height: 1.2; transition: color 0.2s var(--ease); }
.borough__tier { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: auto; }
.borough__tier.is-inner { color: var(--thames-ink); }
.borough__tier.is-outer { color: var(--brass); }
.borough__tier.is-city { color: var(--red-ink); }
/* Filter/toolbar for the directory */
.dir-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1.4rem; }
.dir-toolbar__label { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------------------------------------------------------------------------
   "Find your council" navy finder block
   ------------------------------------------------------------------------- */
.finder {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--stone);
  border-radius: var(--r-lg);
  padding: clamp(1.6rem, 1rem + 3vw, 2.8rem);
  border: 1px solid var(--line-ink);
}
.finder::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(680px 320px at 90% 120%, color-mix(in srgb, var(--brass) 20%, transparent), transparent 65%);
  pointer-events: none;
}
.finder__inner { position: relative; z-index: 1; }
.finder .eyebrow { color: var(--brass-2); }
.finder .eyebrow::before { background: var(--brass); }
.finder h2 { color: var(--stone); margin: 0.8rem 0 0.6rem; }
.finder p { color: color-mix(in srgb, var(--stone) 82%, transparent); max-width: 48ch; }
.finder__form { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.4rem; max-width: 40rem; }
.finder__form input {
  flex: 1;
  min-width: 12rem;
  padding: 0.95rem 1.1rem;
  min-height: 48px;
  border: 1.5px solid var(--line-ink);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--stone) 8%, transparent);
  color: var(--stone);
}
.finder__form input::placeholder { color: color-mix(in srgb, var(--stone) 55%, transparent); }
.finder__form input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brass) 22%, transparent); }
.finder__note { font-family: var(--font-mono); font-size: var(--fs-small); color: color-mix(in srgb, var(--stone) 68%, transparent); margin-top: 1rem; }

/* ---------------------------------------------------------------------------
   Contact coordinate blocks
   ------------------------------------------------------------------------- */
.coords-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(1rem, 0.5rem + 1.5vw, 1.5rem); }
.coord {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem 1.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass);
  border-radius: var(--r-md);
}
.coord h3 { font-size: 1.2rem; }
.coord__role { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.coord dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin-top: 0.4rem; font-size: 0.96rem; }
.coord dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.coord dd { color: var(--text); }
.coord dd a { color: var(--thames-ink); text-decoration: none; }
.coord dd a:hover { text-decoration: underline; }
.coord__addr { font-style: normal; color: var(--text); line-height: 1.55; }
.coord .tel { font-family: var(--font-mono); font-weight: 500; color: var(--ink); font-size: 1.05rem; }

/* Emergency / key-number strip */
.numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.number { padding: 1.2rem 1.3rem; background: var(--paper); display: flex; flex-direction: column; gap: 0.2rem; }
.number__digits { font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; letter-spacing: -0.02em; color: var(--ink); }
.number--emergency .number__digits { color: var(--red-ink); }
.number__label { font-weight: 600; font-size: 0.95rem; }
.number__desc { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em; }

/* ---------------------------------------------------------------------------
   Discover sight cards (attractions)
   ------------------------------------------------------------------------- */
.attractions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(1rem, 0.5rem + 1.5vw, 1.6rem); }
.attraction { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.attraction:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.attraction__top { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--brass-2); }
.attraction__top .cat { position: absolute; top: 0.8rem; left: 0.8rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; background: color-mix(in srgb, var(--ink) 45%, transparent); color: var(--stone); padding: 0.3rem 0.6rem; border-radius: 999px; backdrop-filter: blur(4px); }
.attraction__top svg { width: 40%; height: 40%; opacity: 0.95; }
.attraction__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.attraction__district { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
.attraction__name { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.005em; color: var(--ink); }
.attraction__blurb { color: var(--text); font-size: 0.98rem; }
.attraction__tip { margin-top: auto; padding-top: 0.7rem; font-size: var(--fs-small); color: var(--muted); border-top: 1px solid var(--line); }
.attraction__tip b { color: var(--red-ink); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.attraction a.attraction__link { margin-top: 0.6rem; font-weight: 600; color: var(--thames-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.attraction a.attraction__link:hover { gap: 0.6rem; }

/* ---------------------------------------------------------------------------
   News feed (filter + items)
   ------------------------------------------------------------------------- */
.news-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.news-filter button { font-family: var(--font-mono); font-size: var(--fs-small); padding: 0.5rem 0.9rem; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); color: var(--text); transition: all 0.2s var(--ease); }
.news-filter button:hover { border-color: var(--brass); }
.news-filter button[aria-pressed="true"] { background: var(--ink); color: var(--brass-2); border-color: var(--ink); }
.newsfeed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(1rem, 0.5rem + 1.5vw, 1.6rem); }
.newsitem { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.newsitem:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.newsitem__media { aspect-ratio: 16 / 9; overflow: hidden; position: relative; }
.newsitem__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.newsitem:hover .newsitem__media img { transform: scale(1.05); }
.newsitem__media .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.newsitem__media .ph svg { width: 34%; height: 34%; opacity: 0.9; }
.newsitem__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.newsitem__cat { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red-ink); }
.newsitem__title { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.22; letter-spacing: -0.005em; color: var(--ink); }
.newsitem__excerpt { font-size: var(--fs-small); color: var(--muted); }
.newsitem__date { margin-top: auto; padding-top: 0.6rem; font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); }
.news-status { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); margin-bottom: 1.2rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.news-status b { width: 8px; height: 8px; border-radius: 50%; background: var(--thames); }
.news-note { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); margin-top: 1.5rem; }

/* ---------------------------------------------------------------------------
   Reference tag (mono chip used inline for codes / IDs)
   ------------------------------------------------------------------------- */
.ref-tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0.15rem 0.45rem; background: var(--stone-2); }

/* ---------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .article { grid-template-columns: 1fr; }
  .article__aside { position: static; }
}
@media (max-width: 560px) {
  .deftable tbody th { width: auto; }
  .coord dl { grid-template-columns: 1fr; gap: 0.15rem 0; }
  .coord dt { padding-top: 0.5rem; }
}
