:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f1eee8;
  --ink: #202326;
  --muted: #66706b;
  --line: #ded8ce;
  --teal: #2f8f89;
  --teal-dark: #1e6662;
  --coral: #d96f56;
  --gold: #d6a73f;
  --green: #597f56;
  --graphite: #151719;
  --code: #111318;
  --shadow: 0 18px 45px rgba(32, 35, 38, 0.11);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.72;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--teal-dark);
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
}

code {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.72;
}

.progress-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 3px;
  background: rgba(32, 35, 38, 0.08);
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--coral);
}

.site-header {
  position: sticky;
  top: 3px;
  z-index: 40;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 8px 28px;
  background: rgba(251, 250, 247, 0.93);
  border-bottom: 1px solid rgba(222, 216, 206, 0.78);
  backdrop-filter: blur(16px);
}

.community-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 11px;
  color: #185a55;
  background: #e7f3ef;
  border: 1px solid #b9d8cf;
  border-radius: 6px;
  font-size: 0.84rem;
  line-height: 1.2;
  white-space: nowrap;
}

.community-bar strong {
  color: #111819;
  font-weight: 800;
}

.community-bar:hover {
  color: #123f3c;
  background: #dceee9;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: fit-content;
  font-weight: 750;
  line-height: 1.2;
}

.brand-mark {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  background: var(--graphite);
  border-radius: 50%;
  font-size: 0.84rem;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
}

.top-nav a {
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.top-nav a:hover,
.top-nav a.active {
  color: var(--ink);
  background: var(--surface-2);
}

.top-nav .nav-shortcut {
  color: #fff;
  background: var(--teal-dark);
  border: 1px solid rgba(14, 109, 101, 0.25);
  font-weight: 760;
}

.top-nav .nav-shortcut:hover {
  color: #fff;
  background: #185a55;
}

.hero {
  position: relative;
  min-height: 630px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(520px, calc(100% - 48px));
  margin-left: auto;
  margin-right: max(38px, calc((100vw - var(--max)) / 2));
  padding: 44px 0;
}

.eyebrow,
.kicker,
.mini-label {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-weight: 760;
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0;
  color: #141819;
  font-size: 4.8rem;
  line-height: 0.98;
  font-weight: 850;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.72);
}

.hero-lede {
  margin: 26px 0 0;
  color: #273432;
  font-size: 1.12rem;
  font-weight: 520;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.62);
}

.hero .eyebrow {
  color: #0e6d65;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.7);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 760;
}

.primary-link {
  color: #fff;
  background: var(--graphite);
}

.primary-link:hover {
  color: #fff;
  background: #303336;
}

.secondary-link {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(32, 35, 38, 0.13);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 30px 0 0;
}

.hero-stats div {
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(32, 35, 38, 0.12);
  border-radius: var(--radius);
}

.hero-stats dt {
  font-size: 1.5rem;
  font-weight: 850;
  line-height: 1;
}

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

.source-strip {
  padding: 18px 28px;
  background: var(--graphite);
  color: #f8f3ea;
}

.source-strip p {
  max-width: var(--max);
  margin: 0 auto;
  font-size: 0.95rem;
}

.source-strip a {
  color: #f1c76a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 44px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 28px 80px;
}

.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  display: grid;
  gap: 4px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(32, 35, 38, 0.05);
}

.toc p {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 760;
  font-size: 0.85rem;
}

.toc a {
  padding: 8px 9px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.toc a:hover,
.toc a.active {
  color: var(--ink);
  background: var(--surface-2);
}

.content {
  min-width: 0;
}

.section {
  padding: 24px 0 72px;
  scroll-margin-top: 88px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 790px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.15;
}

.section-heading p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.definition-grid,
.prompt-anatomy,
.practice-list,
.pitfall-grid,
.solo-roles,
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.definition-card,
.prompt-anatomy article,
.practice-list article,
.pitfall-grid article,
.solo-roles article,
.scenario-grid article,
.capability-grid article,
.surface-grid article,
.template-card,
.review-loop,
.config-note,
.final-card,
.first-message-card,
.solo-loop,
.scenario-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(32, 35, 38, 0.05);
}

.definition-card {
  min-height: 220px;
  padding: 24px;
  border-top: 5px solid var(--teal);
}

.accent-coral {
  border-top-color: var(--coral);
}

.accent-gold {
  border-top-color: var(--gold);
}

h3 {
  margin: 0;
  line-height: 1.28;
  font-size: 1.15rem;
}

article p,
.review-loop p,
.config-note p,
.final-card p,
.scenario-panel p {
  margin: 12px 0 0;
  color: var(--muted);
}

.surface-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.surface-grid article {
  padding: 20px;
}

.mini-label {
  display: inline-flex;
  margin-bottom: 8px;
}

.comparison-table {
  display: grid;
  margin-top: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.comparison-table [role="row"] {
  display: grid;
  grid-template-columns: 0.65fr 1fr 1.25fr;
}

.comparison-table [role="row"] + [role="row"] {
  border-top: 1px solid var(--line);
}

.comparison-table span {
  padding: 14px 16px;
  min-width: 0;
}

.comparison-table span + span {
  border-left: 1px solid var(--line);
}

.table-head {
  color: #fff;
  background: var(--graphite);
  font-weight: 760;
}

.audience-band {
  margin-top: 22px;
  padding: 24px;
  background: #ebe7db;
  border: 1px solid #d8d0c0;
  border-radius: var(--radius);
}

.concept-explainers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.concept-explainers article {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(32, 35, 38, 0.05);
}

.concept-explainers article:first-child {
  border-top: 5px solid var(--teal);
}

.concept-explainers article:last-child {
  border-top: 5px solid var(--coral);
}

.concept-explainers ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 19px;
  color: var(--muted);
}

.concept-explainers li::marker {
  color: var(--teal-dark);
}

.concept-explainers p {
  margin: 12px 0 0;
  color: var(--muted);
}

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

.chip-list li {
  padding: 7px 10px;
  color: #26302d;
  background: #fffaf0;
  border: 1px solid #ded2b6;
  border-radius: 6px;
}

.first-message-card {
  display: grid;
  grid-template-columns: 0.78fr 1.2fr;
  gap: 18px;
  align-items: stretch;
  padding: 22px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: #fff;
  background: var(--teal-dark);
  border-radius: 50%;
  font-weight: 850;
}

.first-message-card pre,
.good-bad pre,
.template-card pre {
  padding: 18px;
  color: #eef7f4;
  background: var(--code);
  border-radius: 7px;
}

.prompt-anatomy {
  margin-top: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.prompt-anatomy article,
.practice-list article,
.pitfall-grid article,
.solo-roles article,
.scenario-grid article {
  padding: 20px;
}

.good-bad {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 14px;
  margin-top: 16px;
}

.good-bad article {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.good-bad .bad {
  background: #fff7f3;
  border-color: #e7c6b8;
}

.good-bad .good {
  background: #f3fbf8;
  border-color: #b9d8ce;
}

.callout {
  margin-top: 16px;
  padding: 22px 24px;
  color: #26302d;
  background: #eff4e8;
  border: 1px solid #d5dfc7;
  border-radius: var(--radius);
}

.callout p {
  margin: 10px 0 0;
}

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

.capability-grid article {
  padding: 20px;
}

.capability-grid span {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  color: var(--teal-dark);
  border-top: 1px solid var(--line);
  font-weight: 720;
}

.workflow-map {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.workflow-map article {
  position: relative;
  min-height: 210px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.workflow-map article:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  z-index: 2;
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--coral);
  border-right: 2px solid var(--coral);
  transform: rotate(45deg);
  background: var(--paper);
}

.workflow-map span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 16px;
  color: #fff;
  background: var(--coral);
  border-radius: 50%;
  font-weight: 850;
}

.workflow-map p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.review-loop,
.config-note,
.final-card {
  margin-top: 18px;
  padding: 24px;
}

.review-loop ol {
  margin: 14px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.review-loop li + li {
  margin-top: 8px;
}

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

.solo-loop {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
  padding: 24px;
  background: #fffdf7;
}

.loop-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.loop-steps span {
  display: grid;
  min-height: 72px;
  place-items: center;
  padding: 10px;
  color: #1f3431;
  background: #e7f3ef;
  border: 1px solid #b8d8cf;
  border-radius: 7px;
  font-weight: 780;
}

.loop-steps span:nth-child(2n) {
  background: #fff1e9;
  border-color: #e8c2b2;
}

.loop-steps span:nth-child(3n) {
  background: #fff7dc;
  border-color: #e7d48e;
}

.scenario-panel {
  margin-top: 18px;
  padding: 24px;
}

.scenario-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.scenario-grid span {
  color: var(--coral);
  font-weight: 800;
}

.template-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.filter-button.active {
  color: #fff;
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

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

.template-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  min-width: 0;
}

.template-card.is-hidden {
  display: none;
}

.template-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.copy-button {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-weight: 760;
}

.copy-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-button.copied {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.copy-status {
  min-height: 26px;
  margin: 14px 0 0;
  color: var(--green);
  font-weight: 720;
}

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

.config-note {
  background: #f6f1e5;
}

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

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checklist-grid label {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.checklist-grid input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--teal-dark);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  color: #f8f3ea;
  background: var(--graphite);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #f1c76a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .toc {
    position: sticky;
    top: 67px;
    z-index: 30;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
  }

  .toc p {
    display: none;
  }

  .surface-grid,
  .workflow-map,
  .pitfall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-map article:not(:last-child)::after {
    display: none;
  }

  .prompt-anatomy,
  .scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 10px;
    min-height: 0;
    padding: 6px 18px 8px;
  }

  .community-bar {
    justify-self: start;
    min-height: 30px;
    padding: 5px 9px;
    max-width: 100%;
    overflow: hidden;
  }

  .community-bar span {
    display: none;
  }

  .top-nav {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
  }

  .top-nav a {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 0.88rem;
  }

  .toc {
    top: 84px;
  }

  .hero {
    min-height: 720px;
    align-items: end;
  }

  .hero img {
    object-position: 35% center;
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 62%;
    background: rgba(251, 250, 247, 0.9);
  }

  .hero-copy {
    width: auto;
    margin: 0;
    padding: 260px 22px 36px;
  }

  .hero h1 {
    color: #151819;
    font-size: 3.25rem;
    text-shadow: none;
  }

  .hero-lede {
    color: #283431;
    font-size: 1rem;
    text-shadow: none;
  }

  .hero .eyebrow {
    color: #0f756c;
    text-shadow: none;
  }

  .source-strip,
  .page-shell,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-heading h2 {
    font-size: 2rem;
  }

  .definition-grid,
  .capability-grid,
  .concept-explainers,
  .solo-roles,
  .template-grid,
  .practice-list,
  .checklist-grid,
  .good-bad,
  .first-message-card,
  .solo-loop {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    overflow-x: auto;
  }

  .comparison-table [role="row"] {
    min-width: 720px;
  }

  .template-head {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 690px;
  }

  .hero h1 {
    font-size: 2.72rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-link,
  .secondary-link {
    justify-content: center;
    width: 100%;
  }

  .hero-stats,
  .surface-grid,
  .prompt-anatomy,
  .workflow-map,
  .scenario-grid,
  .pitfall-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-bottom: 54px;
  }

  .definition-card {
    min-height: 0;
  }

  .template-head {
    flex-direction: column;
  }

  .copy-button {
    width: 100%;
    justify-content: center;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
