/* SmallTalkMaster prototype, bright editorial mode */

:root {
  --bg: #ffffff;
  --ink: #111827;
  --ink-soft: #374151;
  --ink-muted: #6b7280;
  --paper: #fff8ec;
  --cyan: #00a7e1;
  --orange: #ff6b35;
  --green: #74c043;
  --yellow: #ffd23f;
  --red: #ef476f;
  --line: #111827;
  --soft-line: #d9dde5;
  --shadow: 8px 8px 0 #111827;
  --shadow-small: 4px 4px 0 #111827;
  --max-page: 1180px;
  --max-content: 760px;
  --radius: 8px;
}

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

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: #005f86;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:hover { color: #c2410c; }

h1, h2, h3, h4 {
  color: inherit;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.02;
  letter-spacing: 0;
  margin: 0;
}

p { margin: 0 0 1em; }

::selection {
  background: var(--yellow);
  color: var(--ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 3px solid var(--line);
}

.site-header-inner {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  text-decoration: none;
}

.site-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  border: 3px solid var(--line);
  object-fit: cover;
  background: #ffffff;
}

.site-brand-text {
  display: grid;
  font-weight: 950;
  font-size: 1.05rem;
  line-height: 1.05;
}

.site-brand-text small {
  max-width: 30ch;
  color: var(--ink-muted);
  font-weight: 750;
  font-size: .7rem;
  line-height: 1.12;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 900;
  padding: .55rem .75rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.site-nav a:hover {
  background: var(--yellow);
  color: var(--ink);
}

.page-shell,
.article-shell {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.home-page { padding: 1.35rem 0 0; }

.home-banner {
  min-height: clamp(530px, 74vh, 760px);
  display: grid;
  align-content: end;
  padding: clamp(1.3rem, 6vw, 5rem);
  border: 3px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #111827 url("/hero-images/homepage.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.home-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .72);
}

.home-banner > * {
  position: relative;
  z-index: 1;
}

.home-banner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  background: var(--cyan);
  border-top: 3px solid var(--line);
}

.home-eyebrow,
.subject-meta-pill,
.subject-kicker,
.article-kicker,
.recent-card-cat,
.featured-article-label,
.toc-header {
  width: fit-content;
  color: var(--ink);
  background: var(--cyan);
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: .35rem .55rem;
  font-weight: 950;
  font-size: .78rem;
  text-transform: uppercase;
}

.home-banner h1 {
  max-width: 10ch;
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 1000;
  margin-top: 1.1rem;
}

.home-tagline {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.4vw, 1.28rem);
  font-weight: 950;
  line-height: 1.15;
}

.home-lead {
  max-width: 720px;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(.95rem, 1vw, 1.02rem);
  font-weight: 650;
  background: #ffffff;
  border: 3px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}

.home-section { margin: clamp(2.6rem, 6vw, 4.5rem) 0 0; }

.home-section h2,
.subject-header h1,
.article-header h1,
.faq h2,
.see-also h2,
.resources h2 {
  font-size: clamp(1.55rem, 2.8vw, 3rem);
  font-weight: 1000;
}

.subjects-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.subjects-list > li {
  min-height: 250px;
  padding: 1.1rem;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-small);
}

.subjects-list > li:nth-child(4n+1) { background: #e7f8ff; }
.subjects-list > li:nth-child(4n+2) { background: #fff0e8; }
.subjects-list > li:nth-child(4n+3) { background: #f3ffe6; }
.subjects-list > li:nth-child(4n+4) { background: #fff9d9; }

.subjects-list h3 {
  margin: .8rem 0 .6rem;
  font-size: 1.3rem;
  line-height: 1;
}

.subjects-list h3 a,
.series-list a {
  color: var(--ink);
  text-decoration: none;
}

.subjects-list h3 a:hover,
.series-list a:hover { color: #005f86; }

.subject-desc { color: var(--ink-soft); font-weight: 620; }

.subjects-list ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.subjects-list li li {
  border-top: 2px solid rgba(17, 24, 39, .16);
  padding: .7rem 0;
  font-weight: 780;
}

.recent-grid {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.recent-card,
.featured-article {
  border: 3px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-small);
}

.recent-card-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.recent-card-body { padding: 1rem; }

.recent-card h4 {
  margin-top: .55rem;
  font-size: 1rem;
}

.breadcrumb {
  margin: 1.2rem 0;
  color: var(--ink-muted);
  font-size: .88rem;
  font-weight: 760;
}

.breadcrumb ol {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: .4rem;
  color: var(--ink-muted);
}

.breadcrumb a {
  color: var(--ink);
  text-decoration: none;
}

.subject-page { padding: 1rem 0 0; }

.subject-header {
  padding: clamp(2rem, 6vw, 4rem);
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #e7f8ff;
  box-shadow: var(--shadow);
}

.subject-intro {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 650;
}

.subject-body,
.article {
  color: var(--ink);
  background: var(--paper);
  border-radius: 8px;
  border: 3px solid var(--line);
  box-shadow: var(--shadow);
}

.subject-body {
  margin-top: 1.2rem;
  padding: clamp(1.4rem, 4vw, 3rem);
}

.subject-body h2,
.subject-body h3 { margin: 1.6rem 0 .7rem; }

.series-list {
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: .9rem;
  list-style: none;
}

.series-list li {
  background: #ffffff;
  border-radius: 8px;
  border: 3px solid var(--line);
  box-shadow: var(--shadow-small);
}

.series-list a {
  display: grid;
  gap: .3rem;
  padding: 1rem;
}

.series-desc {
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.45;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

@media (min-width: 1040px) {
  .article-shell { grid-template-columns: minmax(0, 1fr) 270px; }
}

.article-main { min-width: 0; }
.article { overflow: hidden; }
.article-hero { margin: 0; }

.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-bottom: 3px solid var(--line);
}

.article-hero figcaption {
  padding: .65rem clamp(1.2rem, 4vw, 3rem) 0;
  color: var(--ink-muted);
  font-size: .86rem;
  font-weight: 650;
}

.article-header,
.summary-box,
.article-body,
.faq,
.see-also,
.resources {
  max-width: var(--max-content);
  margin-left: auto;
  margin-right: auto;
}

.article-header {
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.2rem, 4vw, 3rem) 0;
}

.byline {
  margin: 1rem 0 0;
  color: var(--ink-muted);
  font-weight: 800;
}

.summary-box {
  margin-top: 1.4rem;
  padding: 1rem 1rem 1rem 1.15rem;
  border: 3px solid var(--line);
  border-left: 12px solid var(--orange);
  background: #ffffff;
  color: var(--ink);
  border-radius: 8px;
  font-weight: 820;
}

.summary-box p { margin: 0; }

.article-body,
.faq,
.see-also,
.resources {
  padding-left: clamp(1.2rem, 4vw, 3rem);
  padding-right: clamp(1.2rem, 4vw, 3rem);
}

.article-body {
  padding-top: 1.4rem;
  padding-bottom: .5rem;
}

.article-body h2 {
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
  margin: 2.1rem 0 .7rem;
}

.article-body h3 {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  margin: 1.4rem 0 .45rem;
}

.article-body p,
.article-body li { color: #242838; }

.article-body ul,
.article-body ol { padding-left: 1.25rem; }

.article-body li { margin: .45rem 0; }

.article-body a,
.resources a {
  color: #005f86;
  font-weight: 850;
}

.faq,
.see-also,
.resources {
  padding-top: 1rem;
  padding-bottom: 1.8rem;
}

.faq h2,
.see-also h2,
.resources h2 {
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  margin-bottom: 1rem;
}

.faq-item {
  border-top: 2px solid rgba(17, 24, 39, .2);
  padding: .9rem 0;
}

.faq-item summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.faq-answer {
  color: #242838;
  padding-top: .7rem;
}

.article-sidebar { display: none; }

@media (min-width: 1040px) {
  .article-sidebar {
    display: block;
    position: sticky;
    top: 5.5rem;
    align-self: start;
  }
}

.toc,
.sidebar-meta {
  border: 3px solid var(--line);
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow-small);
}

.toc-header { margin-bottom: .7rem; }

.toc ol {
  margin: 0;
  padding-left: 1rem;
}

.toc li {
  margin: .45rem 0;
  color: var(--ink-muted);
}

.toc a {
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.25;
  font-weight: 760;
}

.sidebar-meta { margin-top: 1rem; }

.sidebar-meta-row {
  display: grid;
  gap: .2rem;
  margin: 0 0 .8rem;
  color: var(--ink-soft);
  font-size: .9rem;
}

.sidebar-meta-row span {
  color: var(--ink-muted);
  font-size: .75rem;
  text-transform: uppercase;
  font-weight: 950;
}

.legal-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

.about-page {
  margin: 1rem 0 0;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.about-hero {
  padding: clamp(1.4rem, 5vw, 4rem);
  background: #fff8ec;
  border-bottom: 3px solid var(--line);
}

.about-hero h1 {
  margin-top: 1rem;
  max-width: 12ch;
  font-size: clamp(2.1rem, 4.9vw, 4.55rem);
  font-weight: 1000;
}

.about-hero p {
  max-width: 760px;
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: clamp(.98rem, 1.2vw, 1.05rem);
  font-weight: 750;
  line-height: 1.3;
}

.about-page section:not(.about-hero) {
  max-width: 840px;
  margin: 0 auto;
  padding: clamp(1.2rem, 4vw, 2.5rem) clamp(1.2rem, 4vw, 2.5rem);
  border-bottom: 2px solid rgba(17, 24, 39, .12);
}

.about-page section:nth-child(3) {
  background: #e7f8ff;
  border-top: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  max-width: none;
}

.about-page section:nth-child(3) > * {
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.about-page h2 {
  font-size: clamp(1.45rem, 2.45vw, 2.3rem);
  font-weight: 1000;
  margin-bottom: .8rem;
}

.about-page p,
.about-page li {
  color: #242838;
  font-size: .98rem;
}

.about-page ul {
  padding-left: 1.2rem;
}

.about-page li {
  margin: .55rem 0;
}

.legal-page {
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: clamp(1.3rem, 4vw, 3rem);
}

.site-footer {
  margin-top: 4rem;
  border-top: 3px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 1.4rem 1.25rem 2rem;
  display: flex;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: .88rem;
  font-weight: 700;
}

.footer-copy { margin: 0; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
}

.cookie-banner[hidden] { display: none; }

.cookie-banner-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.cookie-banner p {
  margin: 0;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 650;
}

.cookie-banner-actions {
  display: flex;
  gap: .55rem;
  flex-shrink: 0;
}

.cookie-banner button,
.reset-consent-btn {
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  font-weight: 950;
  padding: .55rem .75rem;
}

.cookie-banner button[data-action="decline"] {
  background: #ffffff;
}

@media (max-width: 720px) {
  body { font-size: 15px; }

  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .home-banner {
    min-height: 620px;
    padding: 1.25rem;
    background: #111827 url("/hero-images/homepage.png") center / cover no-repeat;
  }

  .home-banner::before {
    background: rgba(255, 255, 255, .78);
  }

  .home-banner h1 {
    font-size: clamp(2.2rem, 12.5vw, 3.6rem);
  }

  .home-eyebrow { font-size: .72rem; }

  .cookie-banner-inner {
    display: grid;
  }

  .cookie-banner-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
