/* Robin Bridge — classic newspaper article style */

:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #222222;
  --muted: #555555;
  --rule: #1a1a1a;
  --rule-light: #bdbdbd;
  --link: #0b3d91;
  --link-hover: #061f4a;
  --active-bg: #ececec;
  --toc-bg: #fafafa;
  --serif: "Libre Baskerville", "Georgia", "Times New Roman", "Times", serif;
  --sans: "Libre Franklin", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  --toc-width: 248px;
  --content-max: 760px;
  --page-max: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Masthead */
.site-header {
  background: var(--paper);
  border-bottom: none;
  padding: 18px 24px 0;
}

.site-header__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  text-align: center;
  border-top: 3px double var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 12px 12px;
}

.masthead-kicker {
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-header__brand {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.masthead-tagline {
  margin: 8px 0 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.layout {
  display: grid;
  grid-template-columns: var(--toc-width) minmax(0, 1fr);
  gap: 28px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 24px 24px 96px;
  align-items: start;
}

/* Sticky left Contents — newspaper index style */
.toc {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  align-self: start;
}

.toc-nav {
  background: var(--toc-bg);
  border: 1px solid var(--rule);
  border-width: 1px;
  padding: 0;
}

.toc-title {
  margin: 0;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  background: #f0f0f0;
}

.toc-list,
.toc-list ol {
  margin: 0;
  padding: 8px 10px 10px 8px;
  list-style: none;
}

.toc-list ol {
  margin-top: 2px;
  margin-bottom: 4px;
  padding-left: 10px;
}

.toc-list > li {
  margin-bottom: 5px;
}

.toc-list a {
  display: block;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.35;
  padding: 3px 5px;
  color: var(--link);
}

.toc-list a.is-active {
  background: var(--active-bg);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.toc-list ol a {
  font-size: 12px;
}

/* Article — broadsheet column */
.article {
  max-width: var(--content-max);
  min-width: 0;
  border-left: 1px solid var(--rule-light);
  padding-left: 28px;
}

.article h1 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.15rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.deck {
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-soft);
}

.article h2 {
  margin: 2.1em 0 0.65em;
  padding-top: 0.55em;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  clear: both;
}

.article h3 {
  margin: 1.45em 0 0.45em;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
}

.article p {
  margin: 0 0 0.95em;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.article p.lead::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 4.4rem;
  font-weight: 700;
  line-height: 0.82;
  padding: 0.08em 0.1em 0 0;
  color: var(--ink);
}

.article ol,
.article ul {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.article li {
  margin-bottom: 0.4em;
  text-align: justify;
}

.summary-box {
  background: transparent;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-left: none;
  border-right: none;
  padding: 12px 0;
  margin: 0 0 1.35em;
  clear: both;
}

.summary-box p {
  margin: 0;
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--ink);
}

.article section {
  scroll-margin-top: 18px;
}

.article > section:first-of-type h2 {
  margin-top: 1.4em;
}

@media (max-width: 960px) {
  .site-header {
    padding: 12px 16px 0;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px 16px 72px;
  }

  .article {
    border-left: none;
    padding-left: 0;
  }

  .toc {
    position: relative;
    top: 0;
    max-height: none;
  }

  .article p {
    text-align: left;
    hyphens: none;
  }

  .article li {
    text-align: left;
  }

  .article p.lead::first-letter {
    font-size: 3.4rem;
  }
}
