:root {
  color-scheme: light;
  --ink: #20201d;
  --muted: #66645d;
  --paper: #faf8f2;
  --surface: #ffffff;
  --line: #dfdbd0;
  --accent: #e85d04;
  --accent-dark: #a63f00;
  --brand-green: #6f8d35;
  --content: 780px;
  --wide: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.75 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

a:focus-visible {
  outline: 3px solid rgba(232, 93, 4, 0.35);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 242, 0.96);
}

.header-inner,
.footer-inner,
main {
  width: min(calc(100% - 40px), var(--wide));
  margin-inline: auto;
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 51px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 22px;
}

.site-nav a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-dark);
}

main {
  min-height: calc(100vh - 290px);
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: 72px;
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.3;
}

.home-intro h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 650;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 24px 0 22px;
  color: #44413b;
  font-size: 19px;
}

.text-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
}

.text-link span {
  color: var(--accent);
}

.home-facts {
  align-self: end;
  border-top: 3px solid var(--accent);
  background: var(--surface);
  padding: 4px 22px;
}

.home-facts p {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.home-facts p:last-child {
  border-bottom: 0;
}

.home-facts span {
  color: var(--muted);
  font-size: 14px;
}

.home-facts strong {
  font-size: 14px;
}

.latest-section,
.listing-page,
.article-page,
.not-found {
  width: min(calc(100% - 40px), var(--wide));
  margin-inline: auto;
}

.latest-section {
  padding: 56px 0 80px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
}

.section-heading a {
  font-size: 14px;
}

.article-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.article-list li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.article-list time {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.article-list a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.article-list a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.listing-page {
  padding: 68px 0 90px;
}

.listing-header {
  max-width: var(--content);
  margin-bottom: 38px;
}

.listing-header h1 {
  margin: 0;
  font-size: 42px;
}

.listing-header p:last-child {
  color: var(--muted);
}

.article-list-full {
  max-width: 900px;
}

.article-page {
  max-width: var(--content);
  padding: 66px 0 90px;
}

.article-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  overflow-wrap: anywhere;
}

.article-header time {
  color: var(--muted);
  font-size: 14px;
}

.back-link {
  font-size: 14px;
  text-decoration: none;
}

.prose {
  overflow-wrap: anywhere;
}

.prose p {
  margin: 0 0 1.2em;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  margin: 1.8em 0 0.65em;
}

.prose h2 {
  font-size: 28px;
}

.prose h3 {
  font-size: 23px;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 2px 0 2px 22px;
  border-left: 4px solid var(--accent);
  color: #514e47;
}

.prose pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f1eee6;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.prose code {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
}

.prose th,
.prose td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: left;
}

.media-note {
  padding: 18px 20px;
  border-left: 4px solid var(--brand-green);
  background: var(--surface);
  color: var(--muted);
}

.not-found {
  padding: 100px 0 140px;
}

.not-found h1 {
  margin: 0;
  font-size: 48px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #efebe1;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  gap: 50px;
  padding-top: 38px;
  padding-bottom: 42px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner p {
  margin: 0 0 6px;
}

.footer-brand {
  color: var(--ink);
  font-weight: 700;
}

.footer-legal {
  text-align: right;
}

@media (max-width: 780px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
  }

  .brand span {
    font-size: 16px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .home-intro {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 52px;
  }

  .home-intro h1 {
    font-size: 40px;
  }

  .article-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-legal {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
