:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #eef4fb;
  --ink: #132238;
  --text: #28384d;
  --muted: #687789;
  --line: #d7e0ea;
  --line-strong: #b9c7d7;
  --green: #087c70;
  --green-strong: #065b53;
  --blue: #235ea8;
  --gold: #9a6a13;
  --coral: #b5533f;
  --shadow: 0 18px 48px rgba(19, 34, 56, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body {
  margin: 0;
}

a {
  color: var(--green-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

img {
  display: block;
  max-width: 100%;
}

.site-header,
.site-footer,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 850;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

nav a:hover {
  color: var(--green-strong);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
  gap: 38px;
  align-items: center;
  min-height: 560px;
  padding: 52px 0 48px;
  border-bottom: 1px solid var(--line);
}

.hero-copy h1,
.page-head h1,
.article-head h1 {
  max-width: 850px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.35rem, 5vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p,
.page-head p,
.article-head p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 760;
  text-decoration: none;
}

.button:hover {
  background: var(--green-strong);
}

.text-link {
  font-weight: 760;
  overflow-wrap: anywhere;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: 34px 0 0;
}

.hero-stats div {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.hero-stats dt {
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 850;
}

.hero-stats dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-visual {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section,
.page-head,
.article-shell {
  padding: 44px 0 76px;
}

.section-band {
  width: 100%;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
}

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-head-row {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-head h2,
.split-section h2,
.faq-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.85rem;
  line-height: 1.18;
}

.section-head p {
  color: var(--muted);
}

.topic-grid,
.post-grid,
.post-list {
  display: grid;
  gap: 16px;
}

.topic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topic-card,
.post-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.topic-card span {
  color: var(--coral);
  font-size: 0.84rem;
  font-weight: 850;
}

.topic-card h2,
.topic-card h3,
.post-card h2,
.post-card h3 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.25;
}

.topic-card a,
.post-card h2 a,
.post-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.topic-card p,
.post-card p {
  margin: 0;
  color: var(--muted);
}

.post-card time,
.article-meta {
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 720;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.tag-row a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 720;
  text-decoration: none;
}

.read-link {
  align-self: flex-start;
  font-weight: 760;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1.15fr);
  gap: 30px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.check-list {
  padding: 22px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
}

.check-list p {
  margin-top: 0;
}

.article-shell {
  max-width: 1100px;
}

.article-head {
  max-width: 850px;
  margin-bottom: 34px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  gap: 34px;
  align-items: start;
}

.toc-panel {
  position: sticky;
  top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.toc-panel p {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 800;
}

.toc-panel nav ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 16px;
}

.toc-panel a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.article-body {
  color: var(--text);
  font-size: 1.06rem;
}

.article-body h2,
.article-body h3 {
  color: var(--ink);
  line-height: 1.22;
}

.article-body h2 {
  margin-top: 38px;
  font-size: 1.58rem;
}

.article-body h3 {
  margin-top: 28px;
  font-size: 1.24rem;
}

.article-body code {
  border-radius: 5px;
  background: #e7ece5;
  padding: 0.12em 0.3em;
}

.article-body pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 8px;
  background: #101820;
  color: #edf6f3;
}

.faq-section,
.cta-panel,
.related-section {
  margin-top: 42px;
}

.faq-section details {
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.faq-section summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 780;
}

.faq-section p {
  margin-bottom: 0;
  color: var(--muted);
}

.cta-panel {
  padding: 22px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
}

.cta-panel p {
  margin-top: 0;
}

.cta-panel a {
  font-weight: 800;
}

.compact {
  gap: 12px;
}

.compact-card {
  min-height: 150px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer strong {
  color: var(--ink);
}

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

@media (max-width: 980px) {
  .topic-grid,
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 34px;
  }

  .section-head-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 24px, 1180px);
  }

  .hero-copy h1,
  .page-head h1,
  .article-head h1 {
    font-size: 2.25rem;
  }

  .hero-stats,
  .topic-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .section-band {
    padding: 22px;
  }

  .site-footer {
    flex-direction: column;
  }
}

/* Distinct docs template surface */
.template-hugo_docs {
  --bg: #f3f7fd;
  --surface-soft: #e8f0fb;
  --green: #14756b;
  --green-strong: #0f5f57;
  --blue: #245ca8;
}

.template-hugo_docs main {
  width: min(1240px, calc(100% - 32px));
}

.docs-workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 34px 0 76px;
}

.docs-rail {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 6px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(36, 92, 168, 0.08);
}

.rail-label {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.docs-rail a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 720;
  text-decoration: none;
}

.docs-rail a:hover {
  background: var(--surface-soft);
  color: var(--blue);
}

.docs-main {
  min-width: 0;
}

.docs-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  min-width: 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f6faff 54%, #eaf3ff 100%);
}

.docs-hero-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.5rem, 5vw, 5.15rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.docs-hero-copy p {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.docs-console {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 360px;
  padding: 18px;
  border: 1px solid #c9d9ec;
  border-radius: 8px;
  background: #101827;
  color: #dce8f6;
  box-shadow: 0 22px 52px rgba(16, 24, 39, 0.22);
}

.console-top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.console-top span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: #6aa6ff;
}

.console-top span:nth-child(2) {
  background: #75d6c8;
}

.console-top span:nth-child(3) {
  background: #f1b45b;
}

.console-top strong {
  margin-left: 8px;
  color: #ffffff;
  font-size: 0.86rem;
}

.console-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.console-row span {
  color: #7f94b3;
  font-weight: 800;
}

.console-row code {
  color: #dce8f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.console-row.active code {
  color: #7ee2d4;
}

.docs-index-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 34px;
}

.docs-index-strip div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.docs-index-strip strong,
.docs-index-strip span {
  display: block;
}

.docs-index-strip strong {
  color: var(--ink);
  font-size: 1.35rem;
}

.docs-index-strip span {
  color: var(--muted);
  font-size: 0.9rem;
}

.docs-pathway {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.docs-track-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.docs-track-grid article {
  min-height: 180px;
  padding: 20px;
  border: 1px solid #d6e2f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.docs-track-grid span {
  color: var(--blue);
  font-weight: 850;
}

.docs-track-grid h3 {
  margin: 10px 0 8px;
  color: var(--ink);
}

.docs-track-grid p {
  margin: 0;
  color: var(--muted);
}

.docs-latest-list {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.docs-latest-row {
  display: grid;
  grid-template-columns: 128px minmax(220px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.docs-latest-row time {
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 800;
}

.docs-latest-row h3 {
  margin: 0;
  line-height: 1.25;
}

.docs-latest-row h3 a {
  color: var(--ink);
  text-decoration: none;
}

.docs-latest-row p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .docs-workspace {
    grid-template-columns: 1fr;
  }

  .docs-rail {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rail-label {
    grid-column: 1 / -1;
  }

  .docs-hero,
  .docs-latest-row {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
  }

  nav {
    width: 100%;
    gap: 12px 16px;
  }

  .docs-workspace {
    padding-top: 18px;
  }

  .docs-rail,
  .docs-index-strip,
  .docs-track-grid {
    grid-template-columns: 1fr;
  }

  .docs-hero,
  .docs-pathway {
    width: 100%;
    max-width: 366px;
    padding: 22px;
    overflow: hidden;
  }

  .docs-hero-copy,
  .docs-console {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .docs-hero-copy {
    max-width: 300px;
  }

  .docs-hero-copy h1 {
    max-width: 100%;
    font-size: 1.85rem;
    word-break: break-word;
  }

  .docs-hero-copy p {
    max-width: 100%;
  }

  .docs-console {
    max-width: 300px;
    overflow: hidden;
    min-height: 280px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .button,
  .text-link {
    max-width: 100%;
  }
}
