:root {
  --guide-green: #153f34;
  --guide-green-2: #0d2e27;
  --guide-paper: #f4f0e6;
  --guide-paper-2: #ebe4d4;
  --guide-ink: #183129;
  --guide-coral: #da6e51;
}

[hidden] {
  display: none !important;
}

.guide-shell {
  min-height: 100vh;
  background:
    linear-gradient(rgba(21, 63, 52, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 63, 52, 0.035) 1px, transparent 1px),
    var(--guide-paper);
  background-size: 24px 24px;
  color: var(--guide-ink);
}

.guide-shell .site-header,
.guide-shell main,
.guide-footer {
  width: min(1180px, calc(100% - 56px));
  margin-inline: auto;
}

.guide-site-header {
  border-bottom-color: rgba(21, 63, 52, 0.22);
}

.guide-site-header .nav a {
  color: inherit;
}

.guide-site-header .nav a[aria-current="page"] {
  color: var(--guide-green);
  font-weight: 800;
}

.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(24, 49, 41, 0.62);
  font-size: 12px;
}

.guide-breadcrumb a {
  color: inherit;
}

.guide-hero {
  padding: 36px 0 32px;
  border-bottom: 1px solid rgba(21, 63, 52, 0.24);
}

.guide-hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 54px;
  align-items: end;
  margin-top: 70px;
}

.guide-kicker {
  margin: 0 0 16px;
  color: var(--guide-coral);
  font: 800 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.guide-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--guide-green);
  font: 700 clamp(36px, 4.8vw, 64px)/1.04 Georgia, "Songti SC", serif;
  letter-spacing: -0.055em;
}

.guide-hero h1 em {
  display: block;
  color: var(--guide-coral);
  font-weight: 400;
}

.guide-hero-copy > p {
  margin: 0 0 6px;
  color: rgba(24, 49, 41, 0.7);
  font-size: 15px;
  line-height: 1.9;
}

.guide-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 44px 0 0;
  border: 1px solid rgba(21, 63, 52, 0.28);
  background: rgba(255, 255, 255, 0.2);
}

.guide-stats div {
  padding: 18px 20px;
  border-right: 1px solid rgba(21, 63, 52, 0.2);
}

.guide-stats div:last-child {
  border-right: 0;
}

.guide-stats dt {
  color: rgba(24, 49, 41, 0.58);
  font-size: 11px;
}

.guide-stats dd {
  margin: 7px 0 0;
  color: var(--guide-green);
  font: 700 24px/1 Georgia, serif;
}

.guide-search-panel {
  position: sticky;
  z-index: 5;
  top: 0;
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  margin: 34px 0;
  padding: 13px 16px;
  border: 1px solid var(--guide-green);
  background: rgba(244, 240, 230, 0.96);
  backdrop-filter: blur(12px);
}

.guide-search-panel label {
  font-size: 12px;
  font-weight: 800;
}

.guide-search-panel > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.guide-search-panel input {
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--guide-ink);
  font: inherit;
}

.guide-search-panel span {
  color: rgba(24, 49, 41, 0.58);
  font-size: 11px;
}

[data-guide-empty] {
  padding: 64px 20px;
  text-align: center;
}

[data-guide-empty] p {
  color: rgba(24, 49, 41, 0.62);
}

.guide-category {
  margin-top: 28px;
  border-top: 2px solid var(--guide-green);
}

.guide-category > header {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 1.3fr auto;
  gap: 30px;
  align-items: center;
  min-height: 108px;
}

.guide-category > header > div {
  display: flex;
  gap: 18px;
  align-items: baseline;
}

.guide-category > header span,
.guide-category > header strong {
  color: var(--guide-coral);
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.guide-category h2 {
  margin: 0;
  color: var(--guide-green);
  font: 700 26px/1.1 Georgia, "Songti SC", serif;
}

.guide-category > header p {
  margin: 0;
  color: rgba(24, 49, 41, 0.64);
  font-size: 13px;
  line-height: 1.65;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(21, 63, 52, 0.22);
  border-left: 1px solid rgba(21, 63, 52, 0.22);
}

.guide-card {
  display: flex;
  min-height: 220px;
  padding: 24px;
  border-right: 1px solid rgba(21, 63, 52, 0.22);
  border-bottom: 1px solid rgba(21, 63, 52, 0.22);
  background: rgba(255, 255, 255, 0.18);
  color: var(--guide-ink);
  flex-direction: column;
}

.guide-card:hover {
  background: var(--guide-green);
  color: var(--guide-paper);
}

.guide-card > span {
  color: var(--guide-coral);
  font-size: 10px;
  font-weight: 800;
}

.guide-card h3 {
  margin: 28px 0 10px;
  font: 700 20px/1.28 Georgia, "Songti SC", serif;
}

.guide-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  opacity: 0.66;
  font-size: 12px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.guide-card > strong {
  margin-top: auto;
  padding-top: 20px;
  color: inherit;
  font-size: 11px;
}

.guide-article-layout {
  padding: 32px 0 80px;
}

.guide-article-layout > .guide-breadcrumb {
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(21, 63, 52, 0.22);
}

.guide-article {
  width: min(820px, 100%);
  margin: 0 auto;
}

.article-header {
  padding: 70px 0 44px;
}

.article-header h1 {
  margin: 0;
  color: var(--guide-green);
  font: 700 clamp(30px, 4.2vw, 48px)/1.12 Georgia, "Songti SC", serif;
  letter-spacing: -0.035em;
}

.article-header > p:last-child {
  margin: 24px 0 0;
  color: rgba(24, 49, 41, 0.65);
  line-height: 1.8;
}

.article-content {
  padding: 46px clamp(24px, 6vw, 72px);
  border: 1px solid rgba(21, 63, 52, 0.24);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 10px 12px 0 var(--guide-paper-2);
  font-size: 16px;
  line-height: 1.9;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  scroll-margin-top: 90px;
  color: var(--guide-green);
  font-family: Georgia, "Songti SC", serif;
  line-height: 1.3;
}

.article-content h1 {
  display: none;
}

.article-content h2 {
  margin: 2.4em 0 0.8em;
  font-size: 30px;
}

.article-content h3 {
  margin: 2em 0 0.65em;
  font-size: 22px;
}

.article-content a {
  color: #176b59;
  text-decoration: underline;
  text-decoration-color: rgba(23, 107, 89, 0.35);
  text-underline-offset: 3px;
}

.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  border: 1px solid rgba(21, 63, 52, 0.18);
}

.article-content .media-omission {
  margin: 28px 0;
  padding: 24px;
  border: 1px dashed rgba(21, 63, 52, 0.34);
  background: rgba(21, 63, 52, 0.045);
  color: rgba(24, 49, 41, 0.68);
  text-align: center;
}

.article-content .media-omission figcaption {
  font-size: 13px;
}

.article-content blockquote {
  margin: 28px 0;
  padding: 12px 22px;
  border-left: 4px solid var(--guide-coral);
  background: rgba(218, 110, 81, 0.08);
}

.article-content pre {
  max-width: 100%;
  overflow: auto;
  padding: 20px;
  border-radius: 4px;
  background: var(--guide-green-2);
  color: #e9f3ee;
  font-size: 13px;
  line-height: 1.65;
}

.article-content :not(pre) > code {
  padding: 0.16em 0.36em;
  background: rgba(21, 63, 52, 0.1);
  font-size: 0.88em;
}

.article-content table {
  display: block;
  width: 100%;
  margin: 28px 0;
  overflow-x: auto;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  min-width: 120px;
  padding: 11px 13px;
  border: 1px solid rgba(21, 63, 52, 0.24);
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background: rgba(21, 63, 52, 0.09);
}

.article-neighbors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 38px;
}

.article-neighbor {
  display: flex;
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(21, 63, 52, 0.26);
  color: var(--guide-ink);
  flex-direction: column;
}

.article-neighbor:last-child {
  text-align: right;
}

.article-neighbor span {
  margin-bottom: 8px;
  color: var(--guide-coral);
  font-size: 10px;
}

.guide-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 72px;
  color: rgba(24, 49, 41, 0.65);
}

.guide-footer strong {
  color: var(--guide-green);
}

@media (max-width: 820px) {
  .guide-shell .site-header,
  .guide-shell main,
  .guide-footer {
    width: min(100% - 32px, 1180px);
  }

  .guide-site-header .nav span {
    display: none;
  }

  .guide-hero-copy,
  .guide-category > header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .guide-hero-copy {
    margin-top: 48px;
  }

  .guide-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-search-panel {
    grid-template-columns: 1fr;
    gap: 7px;
  }
}

@media (max-width: 560px) {
  .guide-site-header {
    align-items: flex-start;
    gap: 14px;
  }

  .guide-site-header .nav {
    gap: 12px;
  }

  .guide-hero h1 {
    font-size: 38px;
  }

  .guide-stats,
  .guide-card-grid,
  .article-neighbors {
    grid-template-columns: 1fr;
  }

  .guide-stats div {
    border-right: 0;
    border-bottom: 1px solid rgba(21, 63, 52, 0.2);
  }

  .guide-stats div:last-child {
    border-bottom: 0;
  }

  .guide-card {
    min-height: 185px;
  }

  .guide-search-panel > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .article-header {
    padding: 48px 0 30px;
  }

  .article-header h1 {
    font-size: 32px;
  }

  .article-content {
    padding: 30px 20px;
    font-size: 15px;
  }

  .guide-footer {
    gap: 12px;
    flex-direction: column;
  }
}
