:root {
  color-scheme: light;
  --bg: #fafafa;
  --bg-warm: #f8f6f3;
  --panel: #ffffff;
  --surface-dark: #111318;
  --line: rgba(17, 19, 24, .08);
  --line-strong: rgba(17, 19, 24, .15);
  --text: #111318;
  --muted: #626b79;
  --accent: #0a7d71;
  --accent-hover: #065f56;
  --accent-soft: rgba(10, 125, 113, .08);
  --shadow-sm: 0 1px 2px rgba(17, 19, 24, .04), 0 2px 8px rgba(17, 19, 24, .04);
  --shadow-md: 0 12px 34px rgba(17, 19, 24, .08);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 83% 2%, rgba(10, 125, 113, .08), transparent 30rem),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: rgba(10, 125, 113, .36); text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--accent); }
a:focus-visible { outline: 3px solid rgba(10, 125, 113, .42); outline-offset: 3px; }

.docs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
  padding: 10px max(1rem, calc((100% - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 250, .86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}
.docs-brand img {
  display: block;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  box-shadow: 0 3px 12px rgba(10, 125, 113, .24);
}
.docs-brand-copy { display: grid; gap: 2px; min-width: 0; line-height: 1.05; }
.docs-brand-copy strong { font-size: 1.02rem; font-weight: 760; letter-spacing: -.022em; white-space: nowrap; }
.docs-brand-copy small { color: var(--muted); font-size: .73rem; font-weight: 600; letter-spacing: .025em; white-space: nowrap; }
.docs-header nav,
.link-row,
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.docs-header nav { justify-content: flex-end; }
.docs-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: .45rem .75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: .88rem;
  text-decoration: none;
}
.docs-header nav a:hover { background: rgba(17, 19, 24, .045); color: var(--text); }

main { width: min(1120px, calc(100% - 2rem)); min-height: calc(100vh - 270px); margin: auto; }
.docs-hero { max-width: 850px; padding: clamp(4rem, 10vw, 8rem) 0 3rem; }
.eyebrow { color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1 { margin: .8rem 0 1.4rem; font-size: clamp(2.2rem, 6vw, 5rem); line-height: .98; letter-spacing: -.05em; }
h2 { letter-spacing: -.035em; }
.docs-hero > p:not(.eyebrow) { color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.65; }
.actions { gap: .75rem; }
.actions a,
.link-row a {
  padding: .7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.actions .primary { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(10, 125, 113, .2); }
.actions .primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  padding: 1rem 0 3rem;
}
.docs-grid a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 145px;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, .9);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.docs-grid a:hover { border-color: rgba(10, 125, 113, .3); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.docs-grid .featured-guide { border-color: rgba(10, 125, 113, .28); background: var(--accent-soft); }
.docs-grid span,
.notice { color: var(--muted); }
.docs-section { padding: 2rem 0 5rem; border-top: 1px solid var(--line); }
.docs-journey h2 { max-width: 760px; margin: .4rem 0 1.5rem; font-size: clamp(1.8rem, 4vw, 3rem); }
.docs-journey ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 0 0 1.5rem; padding: 0; counter-reset: journey; list-style: none; }
.docs-journey li { min-height: 160px; padding: 1.15rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .88); box-shadow: var(--shadow-sm); counter-increment: journey; }
.docs-journey li::before { display: grid; width: 2rem; height: 2rem; margin-bottom: .8rem; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); content: counter(journey); font-size: .8rem; font-weight: 800; }
.docs-journey li strong,
.docs-journey li span { display: block; }
.docs-journey li span { margin-top: .35rem; color: var(--muted); font-size: .9rem; }
.link-row { gap: .65rem; }
.notice { margin-top: 2rem; padding: 1rem; border: 1px solid rgba(10, 125, 113, .2); border-radius: 12px; background: var(--accent-soft); color: #075e56; }
.docs-source { padding: 3rem 0 5rem; }
.docs-source h1 { font-size: clamp(2rem, 5vw, 4rem); }
.docs-source-header { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.docs-source-header h1 { margin-bottom: 0; }
.raw-doc-link { flex: 0 0 auto; margin-bottom: .45rem; padding: .55rem .8rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--muted); font-size: .82rem; font-weight: 750; text-decoration: none; box-shadow: var(--shadow-sm); }
.docs-guide-layout { display: grid; grid-template-columns: minmax(190px, 240px) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.docs-toc { position: sticky; top: 100px; max-height: calc(100vh - 125px); overflow: auto; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-sm); }
.docs-toc > strong { font-size: .75rem; letter-spacing: .09em; text-transform: uppercase; }
.docs-toc ol { display: grid; gap: .48rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.docs-toc li { line-height: 1.25; }
.docs-toc .toc-level-3 { padding-left: .75rem; }
.docs-toc a { color: var(--muted); font-size: .8rem; text-decoration: none; }
.docs-toc a:hover { color: var(--accent); }
.docs-article-body { min-width: 0; max-width: 790px; }
.docs-article-body h2,
.docs-article-body h3 { scroll-margin-top: 100px; }
.docs-article-body h2 { margin: 3.2rem 0 1rem; font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.15; }
.docs-article-body h2:first-child { margin-top: 0; }
.docs-article-body h3 { margin: 2.1rem 0 .8rem; font-size: 1.25rem; }
.heading-anchor { margin-left: .45rem; color: rgba(10, 125, 113, .35); font-size: .7em; text-decoration: none; opacity: 0; }
.docs-article-body h2:hover .heading-anchor,
.docs-article-body h3:hover .heading-anchor,
.heading-anchor:focus-visible { opacity: 1; }
.docs-article-body p { color: #3f4855; }
.docs-article-body li { margin-block: .42rem; color: #3f4855; }
.docs-article-body code:not(pre code) { padding: .1rem .34rem; border-radius: 5px; background: rgba(17, 19, 24, .065); color: #155b55; font-size: .9em; overflow-wrap: anywhere; }
.docs-article-body pre { margin: 1.3rem 0; padding: 1.15rem; white-space: pre; }
.docs-callout { margin: 1.4rem 0; padding: 1rem 1.1rem; border: 1px solid rgba(10, 125, 113, .26); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--accent-soft); color: #075e56; }
pre {
  overflow: auto;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: var(--surface-dark);
  color: #e8f1ef;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ai-guide { padding: 0 0 5rem; }
.ai-guide-hero { max-width: 920px; padding: clamp(4rem, 9vw, 7rem) 0 2.5rem; }
.ai-guide-hero h1 { max-width: 900px; }
.ai-guide-lead { max-width: 780px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.65; }
.ai-warning,
.ai-how-to,
.authoritative-inputs {
  margin: 1rem 0 2rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-sm);
}
.ai-warning { border-color: rgba(10, 125, 113, .3); background: var(--accent-soft); }
.ai-warning h2,
.ai-how-to h2,
.authoritative-inputs h2 { margin-top: 0; }
.on-this-page { margin: 2rem 0 3rem; padding: 1.5rem 0; border-block: 1px solid var(--line); }
.on-this-page h2 { margin-top: 0; }
.on-this-page ol { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.on-this-page a {
  display: inline-flex;
  padding: .48rem .75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}
.on-this-page a:hover { border-color: rgba(10, 125, 113, .35); color: var(--accent); }
.ai-how-to code { padding: .12rem .35rem; border-radius: 5px; background: rgba(17, 19, 24, .06); }
.prompt-section { scroll-margin-top: 96px; padding: 3rem 0; border-top: 1px solid var(--line); }
.prompt-section h2 { max-width: 800px; margin: .25rem 0 1.3rem; font-size: clamp(1.55rem, 3vw, 2.35rem); }
.prompt-number { margin: 0; color: var(--accent); font-size: .73rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.prompt-section pre { max-height: 44rem; margin: 0; font-size: clamp(.78rem, 1.4vw, .9rem); }
.prompt-section code { font: inherit; }
.authoritative-inputs ul { display: grid; gap: .55rem; padding-left: 1.25rem; }

.docs-footer { border-top: 1px solid var(--line); background: rgba(255, 255, 255, .62); }
.docs-footer-shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2.25rem 0 1.5rem; }
.docs-footer-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; }
.docs-footer-brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.docs-footer-brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: var(--shadow-sm); }
.docs-footer-brand span { display: grid; line-height: 1.15; }
.docs-footer-brand strong { font-size: .92rem; }
.docs-footer-brand small { margin-top: .2rem; color: var(--muted); font-size: .72rem; }
.docs-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem 1.15rem; }
.docs-footer-links a { color: var(--muted); font-size: .8rem; text-decoration: none; }
.docs-footer-links a:hover { color: var(--accent); }
.docs-footer-meta { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }

@media (max-width: 640px) {
  .docs-header { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .docs-header nav { width: 100%; justify-content: flex-start; padding-top: .4rem; border-top: 1px solid var(--line); }
  .docs-brand-copy strong { font-size: .9rem; }
  .docs-footer-intro { flex-direction: column; }
  .docs-footer-links { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  h1 { line-height: 1.03; }
  .ai-guide-hero { padding-top: 3rem; }
  .prompt-section pre { margin-inline: -.35rem; padding: 1rem; border-radius: 12px; }
  .docs-journey ol { grid-template-columns: 1fr; }
  .docs-source-header { align-items: flex-start; flex-direction: column; }
  .docs-guide-layout { grid-template-columns: 1fr; }
  .docs-toc { position: static; max-height: none; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .docs-journey ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
