/* Claude Lessons — shared guide stylesheet.
   Self-contained: guides must NOT reference the app's hashed bundle CSS.
   Tokens mirror src/styles.css. */

:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #62615f;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #dedbd2;
  --line-strong: #c6c0b5;
  --coral: #e44f3a;
  --teal: #117c72;
  --green: #2d7d46;
  --yellow: #f0bf36;
  --violet: #6953b8;
  --shadow: 0 18px 45px rgba(23, 23, 23, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(17, 124, 114, 0.35);
  text-underline-offset: 2px;
}

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

/* ---------- Header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--yellow);
  font-size: 0.78rem;
}

.topbar-cta {
  display: inline-block;
  padding: 9px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-cta:hover {
  background: #f4ca55;
}

/* ---------- Article layout ---------- */

.article-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 24px;
}

.crumbs {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

.crumbs a {
  color: var(--muted);
}

article h1 {
  margin: 0 0 10px;
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.byline {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 0.9rem;
}

.lede {
  font-size: 1.08rem;
  color: var(--ink);
}

.hero-art {
  display: block;
  width: 100%;
  height: auto;
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

article h2 {
  margin: 44px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 800;
  scroll-margin-top: 84px;
}

article h3 {
  margin: 28px 0 10px;
  font-size: 1.12rem;
  font-weight: 750;
  scroll-margin-top: 84px;
}

article p,
article ul,
article ol {
  margin: 0 0 16px;
}

article li {
  margin-bottom: 6px;
}

article strong {
  font-weight: 750;
}

/* ---------- TOC ---------- */

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

.toc-title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

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

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

/* ---------- Code ---------- */

code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

pre {
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #17222113;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.85rem;
  overflow-wrap: normal;
}

/* ---------- Tables ---------- */

.table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
}

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

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

th {
  background: var(--surface);
  font-weight: 750;
  white-space: nowrap;
}

/* ---------- Callouts ---------- */

.note {
  margin: 0 0 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  background: var(--surface);
}

.warn {
  border-left-color: var(--coral);
}

/* ---------- CTA ---------- */

.cta {
  margin: 34px 0;
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cta h2,
.cta h3 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 1.2rem;
}

.cta p {
  margin: 0 0 14px;
  color: var(--muted);
}

.cta-button {
  display: inline-block;
  padding: 12px 22px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.cta-button:hover {
  background: #f4ca55;
}

/* ---------- FAQ ---------- */

.faq h3 {
  margin: 22px 0 6px;
}

/* ---------- Related / footer ---------- */

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

.related p {
  margin: 0 0 6px;
}

.site-footer {
  margin-top: 56px;
  padding: 28px 24px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
}

@media (max-width: 560px) {
  .topbar {
    padding: 0 16px;
  }

  .topbar-cta {
    font-size: 0.82rem;
    padding: 8px 12px;
  }
}
