:root {
  --bg: #f7f8f5;
  --panel: #ffffff;
  --ink: #17201d;
  --muted: #66736d;
  --line: #dfe5dc;
  --accent: #0f766e;
  --accent-strong: #0b4f4a;
  --warm: #a15c22;
  --soft: #e9f3ef;
  --shadow: 0 16px 40px rgba(23, 32, 29, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px max(16px, calc((100vw - 1160px) / 2));
  background: rgba(247, 248, 245, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 240px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: flex-end;
}

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

.hero {
  background: linear-gradient(135deg, #eff7f2 0%, #f7f8f5 52%, #f7eee2 100%);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
  min-height: 420px;
  padding: 56px 0;
}

.hero h1,
.page-intro h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p,
.page-intro p {
  color: var(--muted);
  font-size: 18px;
  max-width: 720px;
}

.hero-panel,
.panel,
.topic-block,
.tile,
.prompt-card,
.recommendation,
.mistake-grid article,
.ad-slot,
.product-cta {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 24px;
}

.hero-panel span,
.eyebrow,
.ad-slot span {
  color: var(--warm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-panel strong {
  display: block;
  margin: 6px 0;
  font-size: 28px;
}

.page {
  padding: 48px 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1160px, calc(100% - 32px));
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 14px;
}

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

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  padding: 48px 0;
}

.sticky {
  position: sticky;
  top: 96px;
  align-self: start;
}

.section {
  margin: 32px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

h2 {
  margin: 0 0 16px;
  font-size: 26px;
  line-height: 1.15;
}

h3 {
  margin: 0 0 10px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.button.secondary {
  background: var(--soft);
  color: var(--accent-strong);
}

.buy-button {
  background: #101816;
}

.buy-button.disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.setup-note {
  padding: 18px;
  border: 1px solid #f0c36a;
  border-radius: 8px;
  background: #fff8e6;
}

.product-cover {
  margin: 28px 0 10px;
}

.product-cover img,
.price-panel-cover {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.product-cover img {
  aspect-ratio: 16 / 9;
}

.price-panel-cover {
  aspect-ratio: 4 / 3;
  margin: 0 0 18px;
}

.topic-grid,
.tile-grid,
.recommendation-grid,
.mistake-grid,
.resource-list,
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  min-width: 0;
}

.topic-block,
.tile,
.recommendation,
.resource-card,
.mistake-grid article {
  padding: 18px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.topic-block *,
.tile *,
.recommendation *,
.resource-card *,
.mistake-grid article *,
.link-grid a * {
  min-width: 0;
  max-width: 100%;
}

.topic-block h2 {
  font-size: 22px;
}

.topic-block a,
.link-grid a {
  text-decoration: none;
}

.topic-block p,
.tile span,
.recommendation p,
.resource-card p,
.resource-card li,
.mistake-grid p,
.link-grid span,
.panel li {
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.resource-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.resource-card h3 {
  font-size: 18px;
}

.tag-row,
.keywords div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.keywords span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.check-list,
.number-list {
  padding-left: 20px;
}

.number-list.compact {
  margin-top: 0;
}

.prompt-stack {
  display: grid;
  gap: 12px;
}

.prompt-card {
  position: relative;
  padding: 18px 82px 18px 18px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.prompt-card p {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.code-output {
  display: block;
  max-width: 100%;
  margin: 8px 0 0;
  padding: 10px 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  border-radius: 8px;
  background: #f4f7f5;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
}

.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--accent-strong);
  border-radius: 8px;
  padding: 7px 10px;
  font-weight: 800;
  cursor: pointer;
}

.copy-button.copy-failed {
  background: #fff1ef;
  color: #9a3412;
}

.copy-button.inline-copy {
  position: static;
  min-height: 38px;
}

.full-prompt {
  padding-right: 18px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

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

th {
  background: #eef4f1;
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.ad-slot {
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 18px;
  align-content: center;
}

.product-cta {
  padding: 22px;
  margin: 28px 0;
  border-color: rgba(15, 118, 110, 0.35);
  background: linear-gradient(135deg, #ffffff 0%, #eef7f2 100%);
}

.product-cta.compact {
  padding: 18px;
  margin: 0 0 18px;
}

.product-cta span,
.price-panel span {
  color: var(--warm);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-cta h2 {
  margin-top: 6px;
}

.product-cta ul {
  padding-left: 20px;
}

.price-panel strong {
  display: block;
  font-size: 44px;
  line-height: 1;
  margin: 8px 0 10px;
}

.related .link-grid a,
.search-results a,
.link-grid a {
  display: grid;
  gap: 4px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.prompt-output {
  display: block;
  min-height: 320px;
  white-space: pre-wrap;
  padding: 18px;
  background: #101816;
  color: #eef7f2;
  border-radius: 8px;
  overflow: auto;
}

.interactive-checklist {
  display: grid;
  gap: 10px;
}

.interactive-checklist label {
  grid-template-columns: 20px 1fr;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.interactive-checklist input {
  width: 18px;
  height: 18px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 20px 0;
}

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

.prose {
  max-width: 820px;
}

.footer {
  padding: 28px max(16px, calc((100vw - 1160px) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer a {
  color: var(--accent-strong);
}

@media (max-width: 860px) {
  .site-header,
  .hero-inner,
  .article-layout,
  .split,
  .tool-panel {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
    position: static;
  }

  .brand {
    min-width: 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero-inner {
    min-height: auto;
    padding: 40px 0;
  }

  .hero h1,
  .page-intro h1 {
    font-size: 42px;
  }

  .sticky {
    position: static;
  }

  .search-box {
    grid-template-columns: 1fr;
  }
}
