/* Shared AskKingsville topic-page branding.
   Content stays in the page; this file supplies the reusable visual shell. */

:root {
  --ak-ink: #071a38;
  --ak-navy: #062c59;
  --ak-blue: #0b5592;
  --ak-green: #b9ff6b;
  --ak-green-soft: #efffdd;
  --ak-purple: #741dff;
  --ak-purple-soft: #f2ebff;
  --ak-paper: #ffffff;
  --ak-canvas: #f3f7fc;
  --ak-line: #d8e2ef;
  --ak-muted: #53657a;
  --ak-shadow: 0 24px 70px rgba(3, 28, 61, 0.14);
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ak-ink);
  background:
    radial-gradient(circle at 88% 5%, rgba(35, 124, 205, 0.52), transparent 28rem),
    linear-gradient(180deg, #031b3c 0, #074273 25rem, var(--ak-canvas) 25rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
  max-width: 100%;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 25rem;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 70%, rgba(185, 255, 107, 0.08) 70% 71%, transparent 71%),
    linear-gradient(90deg, transparent 0 58%, rgba(116, 29, 255, 0.26) 58% 92%, transparent 92%) 0 4.5rem / 100% 0.45rem no-repeat;
}

body > header,
body > nav {
  position: relative;
  z-index: 2;
}

.topic-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.35rem 0 0.4rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topic-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-decoration: none;
}

.topic-site-brand span {
  display: inline-block;
  padding: 0.36rem 0.62rem 0.32rem;
  color: var(--ak-ink);
  background: var(--ak-green);
  border-radius: 0.62rem;
  line-height: 1;
}

.topic-site-header nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.topic-site-header nav a {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration-color: transparent;
}

.topic-site-header nav a:hover,
.topic-site-header nav a:focus-visible {
  color: var(--ak-green);
  text-decoration-color: currentColor;
}

main,
.wrap {
  position: relative;
  z-index: 1;
  width: min(72rem, calc(100% - 2rem));
  max-width: 72rem;
  margin: 1.4rem auto 4rem;
  box-sizing: border-box;
  padding: clamp(1.35rem, 4vw, 4rem);
  overflow: hidden;
  background: var(--ak-paper);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 1.75rem;
  box-shadow: var(--ak-shadow);
}

.kicker {
  display: inline-block;
  margin: 0 0 1.4rem;
  padding: 0.45rem 0.82rem 0.4rem;
  color: var(--ak-ink);
  background: var(--ak-green);
  border-radius: 0.7rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.075em;
  line-height: 1;
}

main::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.42rem;
  background: linear-gradient(90deg, var(--ak-green) 0 24%, var(--ak-purple) 24% 100%);
}

h1,
h2,
h3 {
  color: var(--ak-ink);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Segoe UI", sans-serif;
  letter-spacing: -0.018em;
  line-height: 1.05;
}

h1 {
  max-width: 16ch;
  margin: 0 0 1rem;
  font-size: clamp(2.65rem, 7vw, 5.6rem);
  text-wrap: balance;
}

h1 + p {
  max-width: 48rem;
  color: var(--ak-muted);
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  line-height: 1.5;
}

.meta {
  margin: 0 0 1.5rem;
  color: #66768a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.015em;
}

h2 {
  position: relative;
  margin: clamp(3rem, 7vw, 5.2rem) 0 1.2rem;
  padding: 0 0 0.72rem 1rem;
  border-bottom: 1px solid var(--ak-line);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-wrap: balance;
}

h2::before {
  content: "";
  position: absolute;
  inset: 0 auto 0.72rem 0;
  width: 0.32rem;
  border-radius: 1rem;
  background: linear-gradient(var(--ak-green), var(--ak-purple));
}

h3 {
  margin: 2rem 0 0.6rem;
  font-size: clamp(1.25rem, 2.5vw, 1.62rem);
}

p,
li {
  max-width: 72ch;
  font-size: 1.03rem;
}

a {
  color: #075ca7;
  text-decoration-color: rgba(116, 29, 255, 0.55);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: #5411cf;
  text-decoration-color: currentColor;
}

blockquote,
.callout,
.short,
[class*="plain-english"],
[class*="plainEnglish"] {
  margin: 1.5rem 0 2.25rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  color: var(--ak-ink);
  background: linear-gradient(135deg, var(--ak-green-soft), #fff 78%);
  border: 1px solid rgba(73, 124, 27, 0.25);
  border-left: 0.45rem solid var(--ak-green);
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(28, 71, 14, 0.08);
}

.short p {
  margin: 0;
  color: var(--ak-ink);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  font-weight: 650;
  line-height: 1.55;
}

blockquote > :first-child,
.callout > :first-child {
  margin-top: 0;
}

blockquote > :last-child,
.callout > :last-child {
  margin-bottom: 0;
}

section,
[class*="timeline-item"],
[class*="timeline-step"] {
  scroll-margin-top: 2rem;
}

[class*="timeline-item"],
[class*="timeline-step"] {
  position: relative;
  margin: 1rem 0 1rem 0.5rem;
  padding: 1.15rem 1.25rem 1.15rem 1.55rem;
  background: #f8fbff;
  border: 1px solid var(--ak-line);
  border-left: 0.35rem solid var(--ak-purple);
  border-radius: 0.9rem;
}

table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-spacing: 0;
  border: 1px solid var(--ak-line);
  border-radius: 0.85rem;
  background: var(--ak-paper);
  box-shadow: 0 10px 26px rgba(7, 35, 72, 0.08);
  -webkit-overflow-scrolling: touch;
}

.table {
  max-width: 100%;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 0;
  border-radius: 0.85rem;
  -webkit-overflow-scrolling: touch;
}

.table table {
  margin: 0;
}

th,
td {
  min-width: 8rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--ak-line);
  text-align: left;
  vertical-align: top;
  white-space: normal;
}

th:first-child,
td:first-child {
  min-width: 13rem;
}

thead th {
  color: #fff;
  background: var(--ak-navy);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) td {
  background: #f6f9fd;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.topic-sources,
[class*="official-sources"],
[class*="source-list"] {
  margin-top: 1.2rem;
  padding: clamp(1.15rem, 3vw, 1.8rem);
  background: linear-gradient(135deg, #f7f2ff, #fff 75%);
  border: 1px solid #d9c9ff;
  border-radius: 1rem;
}

main > h2:last-of-type + ol,
.wrap > h2:last-of-type + ol {
  margin-top: 1.2rem;
  padding: clamp(1.15rem, 3vw, 1.8rem) clamp(1.15rem, 3vw, 1.8rem) clamp(1.15rem, 3vw, 1.8rem) 3.2rem;
  overflow-wrap: anywhere;
  background: linear-gradient(135deg, #f7f2ff, #fff 75%);
  border: 1px solid #d9c9ff;
  border-radius: 1rem;
}

[data-topic-share] {
  margin-block: 1.5rem;
  padding: 0.85rem;
  background: linear-gradient(105deg, var(--ak-navy), #083e70);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.9rem;
  box-shadow: 0 10px 24px rgba(2, 30, 65, 0.16);
}

[data-topic-share] button,
[data-topic-share] a,
.topic-share__button {
  border-color: transparent !important;
  color: var(--ak-ink) !important;
  background: var(--ak-green) !important;
  font-weight: 800 !important;
}

body > footer {
  margin-top: 4rem;
  padding: 2.5rem max(1rem, calc((100% - 72rem) / 2));
  color: #dcecff;
  background: #031b3c;
  border-top: 0.38rem solid var(--ak-purple);
}

body > footer a {
  color: var(--ak-green);
}

.footer {
  margin-top: 4rem;
  padding: 1.25rem 1.4rem;
  color: #dcecff;
  background: linear-gradient(110deg, var(--ak-navy), #073d6f);
  border: 0;
  border-left: 0.4rem solid var(--ak-green);
  border-radius: 1rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.91rem;
  box-shadow: 0 12px 28px rgba(2, 30, 65, 0.13);
}

.footer p {
  margin: 0;
  font-size: inherit;
}

.footer a {
  color: var(--ak-green);
}

.back {
  margin-top: 1.6rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
}

.brand {
  margin: 2rem 0 0;
  color: #728196;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  body {
    background:
      radial-gradient(circle at 100% 0, rgba(35, 124, 205, 0.48), transparent 18rem),
      linear-gradient(180deg, #031b3c 0, #074273 18rem, var(--ak-canvas) 18rem);
  }

  body::before {
    height: 18rem;
    background: linear-gradient(90deg, transparent 0 18%, rgba(116, 29, 255, 0.34) 18% 96%, transparent 96%) 0 3.6rem / 100% 0.32rem no-repeat;
  }

  main,
  .wrap {
    width: calc(100% - 1rem) !important;
    max-width: 72rem !important;
    min-width: 0;
    margin: 1.1rem auto 2rem;
    padding: 1.4rem 1rem 2rem;
    border-radius: 1.1rem;
  }

  .kicker {
    margin-top: 0.15rem;
  }

  .topic-site-header {
    width: calc(100% - 1.5rem);
    padding-top: 0.8rem;
  }

  .topic-site-brand {
    gap: 0.38rem;
    font-size: 0.94rem;
  }

  .topic-site-header nav {
    gap: 0.75rem;
  }

  .topic-site-header nav a {
    font-size: 0.84rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 11.5vw, 3.35rem);
    overflow-wrap: break-word;
  }

  h2 {
    margin-top: 3.2rem;
    padding-left: 0.75rem;
    font-size: clamp(1.7rem, 9vw, 2.3rem);
  }

  p,
  li {
    font-size: 1rem;
  }

  table {
    margin-inline: 0;
  }

  th,
  td {
    min-width: 9rem;
    padding: 0.8rem 0.85rem;
    font-size: 0.92rem;
  }

  [data-topic-share] {
    width: 100%;
    max-width: 100%;
    padding: 0.65rem;
  }

  .short,
  blockquote,
  .callout {
    width: 100%;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Homepage-aligned topic shell. These later rules deliberately replace the
   earlier visual prototype while keeping the same article markup and assets. */
:root {
  --ink: #20242c;
  --muted: #666b75;
  --paper: #ffffff;
  --canvas: #f3f1ec;
  --line: #dcd9d1;
  --accent: #6d4aff;
  --electric: #c9ff4a;
  --night: #0d1220;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
}

body::before,
main::after { display: none; }

.wrap {
  position: relative;
  z-index: auto;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

main {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.site-header {
  position: relative;
  z-index: 3;
  padding: 0;
  background: var(--night);
  border: 0;
}

.site-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  flex: 0 0 auto;
  color: #fff;
  font-size: 1.28rem;
  font-weight: 850;
  letter-spacing: -.045em;
  text-decoration: none;
}

.wordmark span { color: var(--electric); }

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-left: auto;
}

.primary-nav a {
  padding: 8px 9px;
  border-radius: 999px;
  color: rgba(255,255,255,.7);
  font-size: .7rem;
  font-weight: 750;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav-update {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--electric);
  color: var(--night);
  font-size: .73rem;
  font-weight: 850;
  text-decoration: none;
}

.site-nav-update:hover { background: #d7ff77; }

.beta-pill {
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  color: rgba(255,255,255,.76);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.topic-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 7vw, 78px) 0 clamp(48px, 7vw, 70px);
  background: #06172c;
  color: #fff;
}

.topic-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/images/kingsville/profile-shoreline-dusk.webp") center right / cover no-repeat;
}

.topic-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4,17,34,.96), rgba(4,17,34,.82) 48%, rgba(4,17,34,.42)),
    linear-gradient(0deg, rgba(4,17,34,.8), rgba(4,17,34,.08));
}

.topic-hero-inner { position: relative; }

.kicker {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  color: var(--electric);
  background: transparent;
  border-radius: 0;
  font-size: .73rem;
  font-weight: 850;
  letter-spacing: .15em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3 { font-family: inherit; }

h1 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.7rem, 6vw, 5.35rem);
  font-weight: 850;
  letter-spacing: -.06em;
  line-height: .98;
  text-wrap: balance;
}

.meta,
h1 + .meta {
  margin: 23px 0 0;
  color: rgba(255,255,255,.7);
  font-size: .84rem;
  font-weight: 650;
  line-height: 1.5;
}

.topic-hero .topic-share {
  max-width: 760px;
  margin: 28px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.topic-hero .topic-share-status { color: rgba(255,255,255,.7); }

.topic-article,
.topic-article.wrap {
  width: 100%;
  max-width: 840px;
  margin-inline: auto;
  padding: clamp(34px, 6vw, 58px) 20px clamp(58px, 8vw, 90px);
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.short {
  width: auto;
  margin: 0 0 44px;
  padding: clamp(20px, 4vw, 28px);
  background: #f7ffe6;
  border: 1px solid #d9eca7;
  border-left: 5px solid var(--electric);
  border-radius: 16px;
  box-shadow: none;
}

.short p {
  margin: 0;
  color: var(--night);
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.55;
}

h2 {
  margin: 48px 0 16px;
  padding: 24px 0 0;
  color: var(--night);
  border-top: 1px solid var(--line);
  border-bottom: 0;
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  font-weight: 820;
  letter-spacing: -.035em;
  line-height: 1.08;
}

h2::before { display: none; }

h3 {
  margin: 28px 0 10px;
  color: var(--night);
  font-size: 1.2rem;
  line-height: 1.3;
}

p,
li {
  max-width: none;
  font-size: 1rem;
}

a {
  color: #5b3be1;
  text-decoration-color: currentColor;
}

.table {
  max-width: 100%;
  margin: 14px 0 24px;
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(13,18,32,.06);
}

table {
  display: table;
  width: 100%;
  min-width: 760px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: .86rem;
  line-height: 1.45;
}

th,
td {
  min-width: 0;
  padding: 12px 13px;
}

th:first-child,
td:first-child { min-width: 12rem; }

thead th {
  color: #fff;
  background: var(--night);
}

.topic-article > h2:last-of-type + ol {
  margin-top: 16px;
  padding: 22px 24px 22px 44px;
  overflow-wrap: anywhere;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(13,18,32,.05);
}

[data-topic-share] {
  margin: 28px 0 42px;
  padding: 14px;
  background: var(--night);
  border: 1px solid rgba(109,74,255,.35);
  border-radius: 14px;
  box-shadow: none;
}

[data-topic-share] .topic-share-button {
  border-color: transparent !important;
  background: var(--electric) !important;
  color: var(--night) !important;
  font-weight: 850 !important;
}

[data-topic-share] .topic-share-status { color: rgba(255,255,255,.68); }

.footer {
  margin-top: 52px;
  padding: 20px 22px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  box-shadow: none;
  font-size: .88rem;
}

.footer p { margin: 0; font-size: inherit; }

.back {
  margin: 26px 0 0;
  font-size: .94rem;
  font-weight: 750;
}

.site-footer {
  padding: 26px 0;
  background: var(--night);
  color: rgba(255,255,255,.66);
}

.brand {
  margin: 0;
  color: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: left;
  text-transform: none;
}

@media (max-width: 820px) {
  .primary-nav a:nth-child(1),
  .primary-nav a:nth-child(4) { display: none; }
  .beta-pill { display: none; }
  .topic-hero::after { background: linear-gradient(90deg, rgba(4,17,34,.97), rgba(4,17,34,.72)); }
}

@media (max-width: 620px) {
  .wrap { padding-inline: 16px; }
  .site-nav { min-height: 66px; gap: 10px; }
  .wordmark { font-size: 1.08rem; }
  .primary-nav { display: none; }
  .site-nav-update { min-height: 34px; padding: 6px 11px; }
  .topic-hero { padding: 42px 0 46px; }
  h1 { max-width: 100%; font-size: clamp(2.45rem, 12.5vw, 3.7rem); overflow-wrap: break-word; }
  .topic-article,
  .topic-article.wrap { padding: 28px 16px 62px; }
  h2 { margin-top: 40px; padding-top: 20px; font-size: 1.7rem; }
  .short { margin-bottom: 36px; padding: 20px; }
  [data-topic-share] { width: 100%; max-width: 100%; padding: 11px; }
  table { min-width: 720px; }
}
