:root {
  color-scheme: light;
  --bg: #f6f7f5;
  --paper: #ffffff;
  --ink: #17211d;
  --muted: #62706b;
  --line: #dfe4df;
  --accent: #0b6b58;
  --accent-2: #8a4a04;
  --steel: #41546b;
  --danger: #a63232;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.site-header,
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.site-search {
  flex: 1;
  max-width: 280px;
  min-width: 0;
  margin-left: 16px;
}

.site-search .site-search-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.site-search .site-search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.site-search .site-search-form button {
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.site-search .site-search-form input[type="search"]:focus-visible,
.site-search .site-search-form button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.search-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 20px;
}

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

.search-header h1 {
  max-width: 820px;
  margin: 10px 0 14px;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.08;
}

.search-header p {
  max-width: 760px;
  color: var(--muted);
  font-size: 19px;
}

.brand,
.top-nav a,
.article-card a,
.related-list a {
  text-decoration: none;
}

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

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  font-size: 13px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
}

.top-nav a {
  color: var(--muted);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.nav-toggle:focus-visible,
.top-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav-toggle-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 14px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: currentColor;
  transform: translateY(-50%);
  transition: transform 0.16s ease;
}

.nav-toggle-icon::after {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  border-color: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  transform: translateY(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  opacity: 1;
  transform: translateY(-50%) rotate(-45deg);
}

.home-hero,
.focus-links,
.content-groups,
.article,
.not-found {
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 20px;
}

.home-hero {
  min-height: 340px;
  display: grid;
  align-content: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.home-hero h1,
.article-header h1,
.not-found h1 {
  max-width: 820px;
  margin: 10px 0 14px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 1.02;
  letter-spacing: 0;
}

.home-hero p,
.article-header p,
.not-found p {
  max-width: 760px;
  color: var(--muted);
  font-size: 19px;
}

.content-band {
  padding: 28px 0 40px;
  border-bottom: 1px solid var(--line);
}

.focus-links {
  padding-top: 28px;
  padding-bottom: 12px;
}

.focus-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.focus-list a {
  display: grid;
  gap: 8px;
  padding: 16px;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.focus-list span {
  color: var(--muted);
  font-size: 13px;
}

.focus-list strong {
  font-size: 20px;
  line-height: 1.25;
}

.focus-list em {
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--steel);
  font-weight: 700;
}

.section-heading strong {
  color: var(--accent);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.article-card {
  min-height: 205px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-card a {
  display: grid;
  gap: 10px;
  height: 100%;
  padding: 18px;
  color: var(--ink);
}

.article-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.card-type,
.article-meta,
.breadcrumbs,
.related-list span {
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
}

.article {
  max-width: 900px;
}

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

.article-header h1 {
  font-size: clamp(34px, 6vw, 62px);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  max-width: 620px;
}

.article-author img {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper);
}

.article-author div {
  display: grid;
  gap: 2px;
}

.article-author span,
.article-author small,
.article-author em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.article-author a {
  width: fit-content;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.article-cover {
  overflow: hidden;
  margin: 24px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.article-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body {
  padding: 24px 0;
  font-size: 18px;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 36px 0 10px;
  line-height: 1.25;
}

.article-body h2 {
  font-size: 30px;
}

.article-body h3 {
  font-size: 23px;
}

.article-body p,
.article-body ul,
.article-body blockquote,
.article-body figure {
  margin: 0 0 18px;
}

.article-body ul {
  padding-left: 22px;
}

.article-figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.article-figure figcaption {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  background: #eef5f1;
}

.answer-details {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.answer-details summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  color: var(--ink);
}

.answer-details summary::marker {
  color: var(--accent);
}

.answer-details__body {
  padding: 0 18px 4px;
  border-top: 1px solid var(--line);
}

.answer-details__body h2,
.answer-details__body h3,
.answer-details__body h4 {
  margin-top: 20px;
}

.article-body pre {
  overflow-x: auto;
  padding: 16px;
  background: #18211e;
  color: white;
  border-radius: 8px;
}

.broken-link {
  color: var(--danger);
  font-weight: 700;
}

.related {
  margin-top: 22px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related h2 {
  margin-top: 0;
}

.related-list {
  display: grid;
  gap: 10px;
}

.related-list a {
  display: grid;
  gap: 3px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .header-bar {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
  }

  .site-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
    margin-left: 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .top-nav {
    display: none;
    width: 100%;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 14px 28px rgb(23 33 29 / 8%);
  }

  .site-header.nav-open .top-nav {
    display: grid;
  }

  .top-nav a {
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--ink);
  }

  .top-nav a:hover,
  .top-nav a:focus-visible {
    background: #eef5f1;
  }

  .home-hero,
  .focus-links,
  .content-groups,
  .article,
  .not-found,
  .search-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-hero {
    min-height: 300px;
  }

  .focus-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    transition: none;
  }
}
