:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --panel: #ffffff;
  --text: #1d2522;
  --muted: #61706a;
  --line: #d9dfd9;
  --accent: #1f7a5c;
  --accent-strong: #155c46;
  --code: #16201d;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
}

.brand,
nav,
.actions,
.filters,
.meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--text);
  color: white;
}

nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a,
.text-link {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

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

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.hero,
.page-header {
  padding: 46px 0 36px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.actions {
  flex-wrap: wrap;
  margin-top: 26px;
}

.button,
button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
}

.button.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
}

button {
  min-height: 46px;
  padding: 0 18px;
}

button:hover,
.button:hover {
  background: var(--accent-strong);
  color: white;
}

.button.secondary:hover {
  border-color: var(--accent);
}

.panel-section,
.guide-grid,
.doc,
.faq-list,
.two-column {
  margin-top: 42px;
}

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

.muted,
label {
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.search-form {
  margin-bottom: 16px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 14px;
  color: var(--text);
  font: inherit;
}

.filters {
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chip {
  min-height: 34px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.results {
  display: grid;
  gap: 10px;
}

.result-card,
.panel,
.guide-card,
.faq-list article,
.doc section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px;
}

.result-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.result-card h3 a,
.guide-card {
  text-decoration: none;
}

.result-card p,
.guide-card p,
.faq-list p,
.doc p {
  color: var(--muted);
  line-height: 1.5;
}

.meta {
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 12px;
}

.copy {
  align-self: start;
  min-width: 104px;
}

.copy.inline {
  margin-top: 14px;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

.hidden {
  display: none;
}

.guide-grid,
.example-grid,
.two-column {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.two-column {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
}

.guide-card,
.panel,
.faq-list article,
.doc section {
  padding: 18px;
}

.doc {
  max-width: 900px;
}

.doc h2 {
  margin-top: 34px;
}

.doc h2:first-child {
  margin-top: 0;
}

pre {
  margin: 12px 0 18px;
  overflow-x: auto;
  border-radius: 6px;
  background: var(--code);
  padding: 14px;
}

code {
  color: #e8f5ef;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

p code,
td code {
  border-radius: 4px;
  background: #e9eee9;
  color: var(--text);
  padding: 2px 5px;
}

table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.meta-list div {
  display: grid;
  gap: 4px;
}

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

.meta-list dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.faq-list {
  display: grid;
  gap: 12px;
}

@media (max-width: 820px) {
  .topbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .search-row,
  .result-card,
  .guide-grid,
  .example-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 44px;
  }
}
