:root {
  --bg: #f7f4ee;
  --surface: #fffdf9;
  --surface-strong: #ffffff;
  --text: #171613;
  --muted: #646158;
  --line: #e9e2d8;
  --line-soft: #f1ebe2;
  --accent: #204f56;
  --accent-soft: #edf3f2;
  --success-soft: #eef6ef;
  --success-text: #2f5d37;
  --shadow: 0 14px 32px rgba(24, 23, 20, 0.022);
  --shadow-lift: 0 18px 40px rgba(24, 23, 20, 0.032);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shell: 1120px;
  --reading: 760px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --font-body: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --transition-fast: 140ms ease;
  --transition-soft: 220ms ease;
  --highlight-soft: rgba(255, 255, 255, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.003em;
}

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

p,
h1,
h2,
ol,
pre {
  margin: 0;
}

main {
  display: block;
}

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

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

.header-shell,
.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 24px 0;
}

.brand {
  font-size: 0.95rem;
  font-weight: 680;
  letter-spacing: 0.015em;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  padding: 2px 0;
}

.brand-logo img {
  display: block;
  width: auto;
  height: 40px;
}

.header-nav {
  display: flex;
  gap: var(--space-4);
}

.header-nav a {
  color: color-mix(in srgb, var(--muted) 88%, white 12%);
  font-size: 0.93rem;
  font-weight: 430;
  transition: color var(--transition-fast), opacity var(--transition-fast), background-color var(--transition-fast);
  padding: 6px 10px;
  border-radius: 999px;
}

.header-nav a[aria-current="page"] {
  color: var(--text);
}

.header-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.38);
}

.section {
  padding: 40px 0;
}

.section-hero {
  padding-top: 48px;
}

.hero,
.task-hero,
.not-found {
  max-width: 760px;
}

.eyebrow {
  margin-bottom: var(--space-3);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  letter-spacing: -0.03em;
}

h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.55rem, 8vw, 4.2rem);
  line-height: 1;
  font-weight: 580;
}

h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  line-height: 1.14;
  font-weight: 620;
}

.hero-copy,
.task-hero-copy,
.section-intro p:last-child,
.soft-cta p,
.not-found p:last-of-type,
.block-body p,
.video-panel p,
.practice-list,
.related-link span {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.76;
}

.hero-copy,
.task-hero-copy {
  margin-top: 16px;
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: 16px;
}

.button-primary,
.button-secondary,
.text-link {
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast);
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, white 15%);
  font-weight: 600;
}

.button-primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.4);
}

.text-link {
  color: var(--accent);
  font-weight: 580;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
}

.button-primary:hover,
.button-secondary:hover,
.text-link:hover,
.task-card:hover,
.related-link:hover,
.pager-link:hover {
  transform: translateY(-2px);
}

.button-primary:hover {
  background: #24231f;
  border-color: #24231f;
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.76);
  border-color: color-mix(in srgb, var(--line-soft) 88%, white 12%);
}

.text-link:hover {
  color: #19464c;
  text-decoration-color: currentColor;
}

.section-intro {
  max-width: 680px;
  margin-bottom: 32px;
}

.section-intro h2 {
  max-width: 28rem;
}

.task-grid,
.related-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.task-card {
  display: block;
  padding: 34px;
  background: color-mix(in srgb, var(--surface) 58%, white 42%);
  border: 1px solid rgba(235, 228, 218, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 18px rgba(24, 23, 20, 0.016);
  transition: transform var(--transition-soft), box-shadow var(--transition-soft), border-color var(--transition-soft), background-color var(--transition-soft);
}

.task-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.task-order {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.task-command {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--accent);
}

.task-card h2 {
  font-size: 1.28rem;
  margin-bottom: 10px;
}

.task-card p {
  color: var(--muted);
  line-height: 1.72;
}

.task-card:hover {
  box-shadow: 0 12px 24px rgba(24, 23, 20, 0.022);
  border-color: rgba(234, 227, 217, 0.88);
  background: linear-gradient(180deg, var(--highlight-soft), transparent), color-mix(in srgb, var(--surface) 66%, white 34%);
}

.soft-cta {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 32px;
  border: 1px solid color-mix(in srgb, var(--line-soft) 76%, white 24%);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 84%, var(--accent-soft) 16%);
}

.soft-cta-inline {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 56px;
}

.site-footer p:first-child {
  font-weight: 700;
}

.site-footer p:last-child {
  color: var(--muted);
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.task-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line-soft) 82%, white 18%);
  background: color-mix(in srgb, var(--surface) 90%, white 10%);
}

.task-layout {
  display: grid;
  gap: 40px;
}

.content-block {
  max-width: var(--reading);
  padding: 0;
}

.block-heading {
  margin-bottom: 12px;
}

.block-syntax,
.block-example,
.block-output,
.block-mistake,
.block-related,
.block-nav,
.block-cta {
  padding: 28px 32px;
  border: 1px solid color-mix(in srgb, var(--line-soft) 76%, white 24%);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 88%, white 12%);
}

.block-syntax {
  padding-top: 24px;
  padding-bottom: 24px;
}

.block-syntax .block-heading h2,
.block-example .block-heading h2 {
  font-size: clamp(1.85rem, 4.2vw, 2.45rem);
  line-height: 1.06;
  font-weight: 640;
}

.block-output .block-heading h2,
.block-mistake .block-heading h2 {
  font-size: clamp(1.36rem, 3vw, 1.72rem);
  line-height: 1.12;
  font-weight: 630;
}

.block-why .block-heading h2,
.block-practice .block-heading h2,
.block-video .block-heading h2 {
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  font-weight: 690;
  color: var(--text);
}

.block-syntax .block-heading,
.block-example .block-heading {
  margin-bottom: 16px;
}

.block-output .block-heading,
.block-mistake .block-heading {
  margin-bottom: 16px;
}

.block-why .block-heading,
.block-practice .block-heading,
.block-video .block-heading {
  margin-bottom: 8px;
}

.block-body p + p,
.soft-cta p + p,
.video-panel p + p,
.not-found p + p {
  margin-top: 12px;
}

.block-syntax,
.block-example {
  box-shadow: 0 12px 28px rgba(24, 23, 20, 0.02);
}

.block-output,
.block-mistake {
  background: color-mix(in srgb, var(--surface) 84%, white 16%);
}

.block-why,
.block-practice,
.block-video {
  max-width: 680px;
}

.block-why,
.block-practice,
.block-video {
  position: relative;
  padding-top: 12px;
}

.block-why::before,
.block-practice::before,
.block-video::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 1px;
  background: color-mix(in srgb, var(--line) 42%, transparent 58%);
}

.block-why,
.block-practice,
.block-video,
.block-related,
.block-nav,
.block-cta {
  margin-left: 2px;
}

.block-why .block-body p,
.block-practice .practice-list,
.block-video .video-panel p {
  font-size: 0.98rem;
}

.block-why + .block-output,
.block-practice + .block-video,
.block-video + .block-related {
  margin-top: -8px;
}

.code-shell {
  overflow: hidden;
  border: 1px solid rgba(229, 222, 211, 0.46);
  border-radius: var(--radius-md);
  background: #f8f4ed;
}

.code-label {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(229, 222, 211, 0.55);
  color: rgba(100, 97, 88, 0.72);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

pre {
  overflow-x: auto;
  padding: 24px 26px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.87rem;
  line-height: 1.68;
  color: var(--text);
}

.confirmation-cue {
  margin-bottom: 12px;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--success-soft);
  color: var(--success-text);
  font-size: 0.96rem;
}

.muted-inline {
  color: var(--muted);
}

.note-card,
.video-panel {
  padding: 0;
  border-radius: var(--radius-md);
  border: 0;
  background: transparent;
}

.note-card p + p {
  margin-top: 12px;
}

.practice-list {
  padding-left: 1.2rem;
}

.practice-list li + li {
  margin-top: 12px;
}

.video-title {
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 680;
}

.pager {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-4);
  border: 1px solid color-mix(in srgb, var(--line-soft) 78%, white 22%);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 90%, white 10%);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.pager-link:hover {
  border-color: rgba(232, 224, 214, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent), color-mix(in srgb, var(--surface) 94%, white 6%);
}

.pager-link span {
  color: var(--muted);
  font-size: 0.9rem;
}

.pager-link strong {
  font-size: 1rem;
}

.pager-link-empty {
  opacity: 0.65;
}

.related-links {
  gap: 12px;
}

.related-link {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--line-soft) 78%, white 22%);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.38);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.related-link strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.related-link .related-order {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.related-link span:last-child {
  color: rgba(100, 97, 88, 0.84);
  font-size: 0.94rem;
}

.related-link:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent), rgba(255, 255, 255, 0.58);
  border-color: #ece4da;
}

@media (min-width: 720px) {
  .shell {
    width: min(calc(100% - 48px), var(--shell));
  }

  .section {
    padding: 48px 0;
  }

  .section-hero {
    padding-top: 56px;
  }

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

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

  .soft-cta {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
  }

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

@media (max-width: 719px) {
  .section {
    padding: 32px 0;
  }

  .section-hero {
    padding-top: 40px;
  }

  .task-card,
  .soft-cta,
  .block-syntax,
  .block-example,
  .block-output,
  .block-mistake,
  .block-related,
  .block-nav,
  .block-cta {
    padding: 24px;
  }

  .task-card {
    padding: 28px;
  }

  .task-layout {
    gap: 32px;
  }

  .section-intro {
    margin-bottom: 24px;
  }

  .brand-logo img {
    height: 34px;
  }

  .block-syntax .block-heading h2,
  .block-example .block-heading h2 {
    font-size: clamp(1.6rem, 6.6vw, 2rem);
  }

  .block-output .block-heading h2,
  .block-mistake .block-heading h2 {
    font-size: clamp(1.18rem, 4.8vw, 1.42rem);
  }
}
