/* Shared stylesheet for the deep guide pages.
   Tokens are copied from the homepage so both surfaces share one palette.
   Do not introduce new literal colors here: extend the token block instead. */

:root {
  color-scheme: dark;
  --bg: #050807;
  --surface: #0b1110;
  --surface-2: #111917;
  --surface-3: #16201d;
  --text: #edf4ec;
  --text-soft: #d6e2d8;
  --muted: #93a197;
  --line: rgba(215, 232, 218, 0.10);
  --line-strong: rgba(158, 255, 111, 0.22);
  --green: #9eff6f;
  --green-soft: rgba(158, 255, 111, 0.12);
  --amber: #ffd56a;
  --amber-soft: rgba(255, 213, 106, 0.12);
  --cyan: #8eeeff;
  --cyan-soft: rgba(142, 238, 255, 0.10);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, 0.12);
  --purple: #c7a4ff;
  --purple-soft: rgba(199, 164, 255, 0.12);
  --max: 1180px;
  --reading: 74ch;
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 34px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 82% -8%, var(--green-soft), transparent 62%),
    radial-gradient(760px 480px at 4% 12%, var(--cyan-soft), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--green);
  color: var(--bg);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  left: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand svg {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.brand strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.2;
  white-space: nowrap;
}

.brand span span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

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

/* Breadcrumbs */

.breadcrumbs {
  padding: 18px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--green);
}

/* Article layout */

main {
  display: block;
}

.article-head {
  padding: 26px 0 8px;
}

.eyebrow {
  display: inline-block;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin: 0;
  max-width: var(--reading);
  color: var(--text-soft);
  font-size: 1.08rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.article-meta li {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.figure {
  margin: 24px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.figure figcaption {
  padding: 10px 16px 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Quick answer: the block AI answer engines quote first. */

.answer-box {
  margin: 28px 0 8px;
  padding: 20px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--green-soft), transparent 70%), var(--surface);
}

.answer-box h2 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.answer-box ul {
  margin: 0;
  padding-left: 20px;
}

.answer-box li + li {
  margin-top: 6px;
}

/* Prose */

.prose {
  max-width: var(--reading);
  padding: 8px 0 24px;
}

.prose h2 {
  margin: 44px 0 12px;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  scroll-margin-top: 96px;
}

.prose h3 {
  margin: 26px 0 8px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.prose p {
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.prose li + li {
  margin-top: 6px;
}

.prose strong {
  color: var(--text);
}

.prose blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--green);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft);
}

.note {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.92rem;
}

.note strong {
  color: var(--amber);
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  margin: 18px 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

caption {
  caption-side: top;
  padding: 10px 14px;
  text-align: left;
  color: var(--muted);
  font-size: 0.8rem;
}

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

th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 750;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* Steps and cards */

.steps {
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 10px;
}

.steps li {
  position: relative;
  padding: 14px 16px 14px 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 13px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--green-soft);
  border: 1px solid var(--line-strong);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.card h3 {
  margin: 0 0 6px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Runable checklist */

.checklist {
  margin: 34px 0 8px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.checklist-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
}

.checklist h2 {
  margin: 0;
  font-size: 1.15rem;
}

.checklist-progress {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
}

.checklist ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li + li {
  margin-top: 6px;
}

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.checklist input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--green);
}

.checklist input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
}

.checklist-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* On-page navigation and feedback */

.toc {
  margin: 22px 0 8px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.toc strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 26px;
}

.toc li {
  margin: 0 0 6px;
  break-inside: avoid;
}

.toc a {
  color: var(--text-soft);
  text-decoration: none;
}

.toc a:hover {
  color: var(--green);
  text-decoration: underline;
}

.helpful {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 28px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.helpful > span {
  font-weight: 700;
}

.helpful .btn {
  min-height: 40px;
  padding: 0 16px;
}

.helpful-status {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.helpful-status:empty {
  display: none;
}

.helpful[data-voted] .btn {
  opacity: 0.6;
}

/* FAQ */

.faq {
  margin: 48px 0 8px;
}

.faq h2 {
  margin-bottom: 14px;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
}

.faq details {
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.faq summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--green);
  font-weight: 800;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details > div {
  padding: 0 18px 15px;
  color: var(--text-soft);
}

/* Conversion block and related links */

.cta {
  margin: 40px 0 10px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green-soft), transparent 60%), var(--surface);
}

.cta h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.cta p {
  margin: 0 0 16px;
  color: var(--text-soft);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.btn.primary {
  border-color: transparent;
  background: var(--green);
  color: var(--bg);
}

.btn.primary:hover {
  background: var(--text);
  color: var(--bg);
}

.related {
  margin: 46px 0 10px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.related h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
}

.related ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related a {
  display: block;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.related a:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.related strong {
  display: block;
  font-size: 0.95rem;
}

.related span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Footer */

.site-footer {
  margin-top: 56px;
  padding: 30px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer p {
  margin: 0 0 8px;
  max-width: 82ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--green);
}

/* Prompt studio */

.studio {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field select,
.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.prompt-output {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.prompt-output pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.studio-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.provider-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.provider-list a {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.8rem;
  text-decoration: none;
}

.provider-list a:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

/* Responsive */

@media (max-width: 900px) {
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    padding-bottom: 4px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .wrap {
    width: min(var(--max), calc(100% - 28px));
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }

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

  .answer-box,
  .cta,
  .studio {
    padding: 16px;
  }

  .toc ol {
    columns: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-header,
  .cta,
  .related,
  .site-footer,
  .breadcrumbs {
    display: none;
  }

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