:root {
  color-scheme: light;
  --ink: #202328;
  --muted: #68707c;
  --line: #e5e8ed;
  --soft: #f6f7f9;
  --red: #ed4558;
  --blue: #6383ef;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { background: #fff; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  border-radius: .5rem;
  background: var(--ink);
  color: #fff;
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 2.5rem), var(--max));
  min-height: 76px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-ball {
  color: var(--red);
  font-size: 1.35rem;
  line-height: 1;
  text-shadow: 9px 0 0 var(--blue);
  margin-right: 9px;
}

.site-header nav,
.insights-footer nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-header nav a,
.insights-footer nav a {
  color: #4f5661;
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
}

.site-header nav a:hover,
.insights-footer nav a:hover { color: var(--ink); }

.insights-hero {
  width: min(calc(100% - 2.5rem), 880px);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem);
  text-align: center;
}

.kicker {
  margin: 0 0 .9rem;
  color: var(--red);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.insights-hero h1 {
  max-width: 850px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .98;
}

.hero-copy {
  max-width: 650px;
  margin: 1.7rem auto 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.65;
}

.article-search {
  max-width: 650px;
  margin: 2.5rem auto 0;
  text-align: left;
}

.article-search label {
  display: block;
  margin-bottom: .55rem;
  color: #4f5661;
  font-size: .78rem;
  font-weight: 750;
}

.search-control {
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 56px;
  border: 1px solid #d9dde4;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(31, 39, 51, .06);
}

.search-control:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(99, 131, 239, .14), 0 8px 30px rgba(31, 39, 51, .06);
}

.search-control > span { margin-left: 1.25rem; color: #87909d; font-size: 1.4rem; }

.search-control input {
  min-width: 0;
  flex: 1;
  padding: 0 .85rem;
  border: 0;
  outline: 0;
  color: var(--ink);
  font: inherit;
}

.search-control button {
  align-self: stretch;
  margin: 5px;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: .86rem;
  font-weight: 750;
  cursor: pointer;
}

.article-index {
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
  padding: 0 0 7rem;
}

.section-heading { margin-bottom: 2rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.035em; }
.result-count { margin: .55rem 0 0; color: var(--muted); line-height: 1.5; }

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

.article-card {
  min-height: 310px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(31, 39, 51, .035);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: #d5d9e1;
  box-shadow: 0 16px 35px rgba(31, 39, 51, .09);
}

.article-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.6rem;
  text-decoration: none;
}

.article-card-link:focus-visible { outline: 3px solid rgba(99, 131, 239, .55); outline-offset: 3px; border-radius: 18px; }

.article-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #858d99;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.article-card h2 {
  margin: 1.2rem 0 .8rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.article-card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.65; }

.article-card-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-top: auto; padding-top: 1.4rem; }
.article-card-author { color: #59616c; font-size: .76rem; font-weight: 750; }
.draft-badge { display: inline-flex; width: fit-content; margin-top: 1rem; padding: .35rem .65rem; border-radius: 999px; background: #fff1d6; color: #825000; font-size: .66rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.article-tags, .article-hero-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.article-tags span, .article-hero-tags span { padding: .35rem .6rem; border-radius: 999px; background: var(--soft); color: #626a76; font-size: .68rem; font-weight: 750; }
.read-more { color: var(--ink); font-size: .82rem; font-weight: 800; }

.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 2.5rem; color: var(--muted); font-size: .85rem; }
.pagination a { font-weight: 750; text-decoration: none; }
.pagination a:last-child { text-align: right; }

.empty-state, .not-found { grid-column: 1 / -1; padding: 5rem 1rem; text-align: center; }
.empty-state h2, .not-found h1 { font-family: Georgia, "Times New Roman", serif; font-size: 2.2rem; font-weight: 500; }
.empty-state p, .not-found p { color: var(--muted); }
.empty-state a, .not-found a { font-weight: 750; }

.article-page { width: min(calc(100% - 2.5rem), 760px); margin: 0 auto; padding: clamp(3.5rem, 9vw, 7rem) 0 7rem; }
.back-to-insights { display: inline-block; margin-bottom: 3rem; color: var(--muted); font-size: .84rem; font-weight: 750; text-decoration: none; }
.back-to-insights:hover { color: var(--ink); }
.draft-notice { margin: -1.7rem 0 2.2rem; padding: .8rem 1rem; border: 1px solid #f0d392; border-radius: 10px; background: #fff8e9; color: #6d4a05; font: .82rem/1.5 Inter, ui-sans-serif, sans-serif; }
.draft-notice strong { margin-right: .3rem; }
.article-hero-tags { margin-bottom: 1.25rem; }

.article-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 7vw, 4.8rem);
  font-weight: 500;
  letter-spacing: -.052em;
  line-height: 1.02;
}

.article-deck { margin: 1.5rem 0 0; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.15rem, 2.3vw, 1.45rem); line-height: 1.55; }

.byline { display: flex; align-items: center; gap: .8rem; margin-top: 2rem; }
.author-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 850; }
.byline strong, .byline span { display: block; }
.byline strong { font-size: .88rem; }
.byline span { margin-top: .15rem; color: #7b838e; font-size: .76rem; }
.article-divider { width: 100%; height: 1px; margin: 3rem 0; background: var(--line); }

.article-body {
  color: #292d32;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.2rem);
  line-height: 1.82;
}

.article-body > :first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.55em; }
.article-body h2 { margin: 2.2em 0 .75em; font-family: Inter, ui-sans-serif, sans-serif; font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.035em; line-height: 1.18; }
.article-body h3 { margin: 2em 0 .65em; font-family: Inter, ui-sans-serif, sans-serif; font-size: 1.25rem; }
.article-body blockquote { margin: 2.2em 0; padding: .2rem 0 .2rem 1.5rem; border-left: 3px solid var(--red); color: #3f454d; font-size: 1.3em; font-style: italic; line-height: 1.55; }
.article-body blockquote p { margin: 0; }
.article-body ul, .article-body ol { margin: 0 0 1.6em; padding-left: 1.4em; }
.article-body li { margin-bottom: .65em; padding-left: .25em; }
.article-body a { text-decoration-color: rgba(237, 69, 88, .5); text-underline-offset: 3px; }
.article-body strong { color: #1d2024; }

.article-end { margin-top: 4.5rem; padding: 2.4rem; border-radius: 18px; background: var(--soft); }
.article-end h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; font-weight: 500; }
.article-end > p:not(.kicker) { color: var(--muted); line-height: 1.6; }
.article-end a { font-size: .88rem; font-weight: 800; text-decoration: none; }

.insights-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

.insights-footer p { max-width: 520px; margin: 0; }

@media (max-width: 800px) {
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header nav a:not(:last-child) { display: none; }
}

@media (max-width: 560px) {
  .site-header { min-height: 64px; }
  .site-header nav { gap: .8rem; }
  .insights-hero { padding-top: 4.5rem; }
  .insights-hero h1 br { display: none; }
  .search-control button { padding: 0 1rem; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card { min-height: 280px; }
  .article-page { width: min(calc(100% - 2rem), 760px); padding-top: 2.5rem; }
  .back-to-insights { margin-bottom: 2.25rem; }
  .article-end { padding: 1.6rem; }
  .insights-footer { flex-direction: column; width: min(calc(100% - 2rem), var(--max)); }
  .insights-footer nav { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .article-card { transition: none; }
}
