:root {
  color-scheme: light;
  --paper: #f4f7fb;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #667085;
  --line: #d8e0ea;
  --teal: #0f766e;
  --teal-dark: #0a5752;
  --blue: #2854a3;
  --amber: #b86b18;
  --shadow: 0 18px 55px rgba(30, 43, 65, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--paper), #eef3f8);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.site-shell {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 14px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-weight: 760;
}

.nav a {
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--teal-dark);
  outline: none;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.button:hover,
.button:focus-visible {
  border-color: var(--teal);
  outline: 2px solid rgba(15, 118, 110, 0.18);
  outline-offset: 2px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 44px;
  align-items: center;
  padding: 54px 0 56px;
}

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

.hero p,
.lede {
  max-width: 710px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.hero .button-row {
  margin-top: 28px;
}

.cover-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  box-shadow: var(--shadow);
}

.cover-frame img {
  width: 100%;
  border-radius: 6px;
}

.section {
  padding: 34px 0;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section h2,
.content-page h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.04;
  letter-spacing: 0;
}

.section-header p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.book-panel,
.tool-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.book-panel {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 26px;
  padding: 22px;
}

.book-panel h3,
.tool-panel h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
}

.book-panel p,
.tool-panel p,
.content-panel p,
.content-panel li {
  color: var(--muted);
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #f7faff;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

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

.tool-panel {
  padding: 20px;
}

.tool-panel h3 {
  font-size: 20px;
}

.content-page {
  padding: 48px 0 70px;
}

.content-panel {
  margin-top: 24px;
  padding: 28px;
}

.content-panel h2 + p,
.content-panel p + h2,
.content-panel ul + h2 {
  margin-top: 28px;
}

.content-panel a {
  color: var(--blue);
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 46px;
  padding: 24px 0 34px;
  color: var(--muted);
}

.site-footer .site-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
  font-weight: 760;
  text-decoration: none;
}

@media (max-width: 860px) {
  .topbar,
  .section-header,
  .site-footer .site-shell {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hero,
  .book-panel,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    padding-top: 32px;
  }

  .cover-frame {
    width: min(310px, 100%);
  }

  .book-panel {
    padding: 18px;
  }
}
