/* ==========================================================================
   dumbphones.org — site styles
   Warm paper, dark ink, green accent. Finlandica throughout.
   1. Tokens & base
   2. Accessibility & utilities
   3. Header & navigation
   4. Buttons & actions
   5. Page layout & sections
   6. Home
   7. Reviews index
   8. Reviews & long-form prose
   9. Books
   10. Hacks
   11. Lessons & course
   12. Store
   13. Finder backbar
   14. Footer
   15. Responsive adjustments
   16. Motion & print
   ========================================================================== */

/* Finlandica (self-hosted variable font) */
@font-face {
  font-family: "Finlandica";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/finlandica-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Finlandica";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/finlandica-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Finlandica";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/finlandica-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Finlandica";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/finlandica-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* 1. Tokens & base
   ========================================================================== */

:root {
  --paper: #f5f2e9;
  --paper-raised: rgba(255, 255, 255, 0.52);
  --ink: #1d1c19;
  --muted: #67635a;
  --line: #ddd6c6;
  --line-strong: #c3b9a4;
  --accent: #3f5d3f;
  --accent-strong: #324a32;
  --accent-ink: #f7f5ee;
  --max: 72rem;
  --prose: 44rem;
  --radius: 0.6rem;
  --radius-sm: 0.4rem;
  --shadow-soft: 0 1px 2px rgba(29, 28, 25, 0.04), 0 8px 22px -14px rgba(29, 28, 25, 0.28);
  --shadow-lift: 0 2px 4px rgba(29, 28, 25, 0.05), 0 16px 28px -16px rgba(29, 28, 25, 0.32);
  --sans: "Finlandica", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

::selection {
  background: #dbe4d2;
  color: var(--ink);
}

/* 2. Accessibility & utilities
   ========================================================================== */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

:target {
  scroll-margin-top: 5rem;
}

.skip {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip:focus,
.skip:focus-visible {
  top: 0;
}

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 3. Header & navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  background: rgba(245, 242, 233, 0.92);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark span {
  color: var(--muted);
}

.wordmark:hover span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.1rem 1.05rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.25rem 0;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.4em;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration-color: currentColor;
}

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

/* 4. Buttons & actions
   ========================================================================== */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6rem 1.35rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  background: var(--ink);
  color: var(--paper);
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: var(--accent-ink);
}

.button.ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* 5. Page layout & sections
   ========================================================================== */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 1.5rem) clamp(3rem, 6vw, 4rem);
}

section {
  padding: clamp(2.5rem, 1.75rem + 2.4vw, 3.75rem) 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  border-bottom: 0;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.025em;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.55rem, 1.15rem + 1.5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.15rem);
  font-weight: 600;
  line-height: 1.3;
}

p {
  margin: 0 0 1rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.lede {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.05rem + 0.25vw, 1.2rem);
  line-height: 1.55;
}

.section-note {
  margin: -0.75rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-head {
  padding: clamp(2.75rem, 2rem + 2.4vw, 3.5rem) 0 clamp(2rem, 1.5rem + 1.6vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}

.page-head .eyebrow {
  margin-bottom: 0.85rem;
  color: var(--accent);
}

.page-head p:not(.eyebrow) {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--muted);
  overflow-wrap: break-word;
}

/* 6. Home
   ========================================================================== */

.hero {
  padding: clamp(3rem, 2rem + 5.5vw, 5.5rem) 0 clamp(2.5rem, 2rem + 2.5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

.home-intro p {
  text-wrap: pretty;
}

.home-portrait {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  filter: saturate(0.9);
  object-fit: cover;
}

.discount {
  margin-top: 1.5rem;
  padding: 1.15rem 1.4rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--paper-raised);
}

.discount p {
  margin: 0 0 0.4rem;
}

.discount p:last-child {
  margin: 0;
}

.discount a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.discount a:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: clamp(0.85rem, 2vw, 1.25rem);
}

.pick {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.pick img {
  width: 100%;
  padding: clamp(0.6rem, 2vw, 1rem);
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.pick span {
  margin-top: auto;
  padding: 0.8rem 1rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

@media (hover: hover) {
  .pick:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-lift);
  }

  .pick:hover span {
    color: var(--accent);
  }
}

.explore {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}

.explore a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.explore strong {
  font-size: 1.02rem;
}

.explore span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (hover: hover) {
  .explore a:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-soft);
  }

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

/* 7. Reviews index
   ========================================================================== */

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: clamp(1.5rem, 3vw, 2rem);
  max-width: 54rem;
  padding-top: 2rem;
}

/* Index and category pages center the grid under the page heading.
   On the home page it sits left-aligned with the section heading. */
.page-head + .review-grid {
  margin-inline: auto;
}

.review-card {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.review-card img {
  width: 100%;
  margin-bottom: 1rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ece7db;
  transition: border-color 160ms ease;
}

.review-card .meta {
  font-size: 0.7rem;
  line-height: 1.5;
}

.review-card h2,
.review-card h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.3rem, 1.15rem + 0.45vw, 1.5rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  transition: color 160ms ease;
}

.review-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.6;
}

@media (hover: hover) {
  .review-card:hover img {
    border-color: var(--line-strong);
  }

  .review-card:hover h2,
  .review-card:hover h3 {
    color: var(--accent);
  }
}

.meta {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* 8. Reviews & long-form prose
   ========================================================================== */

.article,
.lesson {
  max-width: var(--prose);
  margin: 0 auto;
  padding-top: clamp(2rem, 4vw, 3rem);
}

.article-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 1.6rem + 1.9vw, 3.2rem);
  line-height: 1.08;
}

.article-actions {
  margin: 0 0 2rem;
}

.prose {
  font-size: 1.02em;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose dl,
.prose blockquote,
.prose table,
.prose figure,
.prose pre {
  margin: 0 0 1.2em;
}

.prose p {
  text-wrap: pretty;
}

.prose h2,
.prose h3 {
  margin: 2.35rem 0 0.7rem;
  line-height: 1.22;
  scroll-margin-top: 5.5rem;
}

.prose h2 {
  font-size: clamp(1.45rem, 1.25rem + 0.55vw, 1.7rem);
}

.prose h3 {
  font-size: clamp(1.18rem, 1.08rem + 0.3vw, 1.28rem);
  letter-spacing: -0.005em;
}

.prose ul,
.prose ol {
  padding-left: 1.45rem;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--muted);
}

.prose li > ul,
.prose li > ol {
  margin: 0.4em 0 0;
}

.prose a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.prose a:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

.prose img {
  width: 100%;
  margin: 1.75rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.prose figure {
  margin-inline: 0;
}

.prose figure img {
  margin: 0;
}

.prose figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.prose blockquote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: #4f4b43;
  font-size: 1.02em;
  font-style: italic;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose code,
.prose kbd,
.prose samp,
.prose pre {
  font-family: var(--mono);
  font-size: 0.86em;
}

.prose code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--paper-raised);
}

.prose pre {
  overflow-x: auto;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95em;
}

.prose th,
.prose td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 1.75rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #0d0d0d;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@supports not (aspect-ratio: 16 / 9) {
  .video {
    height: 0;
    padding-top: 56.25%;
  }
}

.article-nav,
.lesson-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.article-nav a,
.lesson-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  color: var(--muted);
  text-decoration: none;
}

.article-nav a:hover,
.lesson-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* 9. Books
   ========================================================================== */

.book-section h2 {
  margin-bottom: 1.25rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.75rem) clamp(0.85rem, 1.8vw, 1.25rem);
}

.book {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
}

.book img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 28, 25, 0.08), 0 10px 20px -14px rgba(29, 28, 25, 0.35);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.book span {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.4;
}

.book.no-link {
  cursor: default;
}

.book.no-link img {
  box-shadow: 0 1px 2px rgba(29, 28, 25, 0.06);
}

@media (hover: hover) {
  .book:not(.no-link):hover img {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: 0 2px 4px rgba(29, 28, 25, 0.08), 0 18px 28px -16px rgba(29, 28, 25, 0.4);
  }

  .book:not(.no-link):hover span {
    color: var(--accent);
  }
}

/* 10. Hacks
   ========================================================================== */

.hack-step {
  padding: clamp(2rem, 3vw, 2.5rem) 0;
}

.hack-step h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.65rem);
}

.hack-step p,
.hack-step li {
  max-width: 46rem;
}

.hack-step ul {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.hack-step li {
  margin-bottom: 0.45em;
}

.hack-step li::marker {
  color: var(--muted);
}

.hack-step a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.hack-step a:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

/* 11. Lessons & course
   ========================================================================== */

.lesson-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 0.9rem;
  padding-top: 1rem;
}

.lesson-list a {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  gap: 0 1.25rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.lesson-list .num {
  padding-top: 0.32rem;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.lesson-list strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.35;
}

.lesson-list span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.lesson-list a > span:last-child > span {
  display: block;
  max-width: 46rem;
}

/* With an odd number of lessons, let the final card span the full row
   instead of leaving a half-empty column on wide screens. */
.lesson-list a:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (hover: hover) {
  .lesson-list a:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-soft);
  }
}

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.75rem, 4vw, 2.5rem);
  align-items: center;
}

.course-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.lesson .download {
  margin: 1.5rem 0 2.5rem;
}

.resources {
  margin-top: 2.5rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.resources h2 {
  margin: 0 0 1rem;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.resources p:last-child {
  margin-bottom: 0;
}

/* 12. Store
   ========================================================================== */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  padding-top: clamp(2rem, 4vw, 3rem);
}

.product h1 {
  margin-bottom: 0.4rem;
  font-size: clamp(2.2rem, 1.7rem + 2.2vw, 3.6rem);
  line-height: 1.06;
}

.product img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.product p {
  max-width: 34rem;
}

.price {
  margin: 0.35rem 0 1.5rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.store-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 22rem));
  gap: 1.5rem;
  padding-top: 1.5rem;
}

.store-list a {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.store-list img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.store-list div {
  padding: 1rem 1.2rem;
}

.store-list strong {
  font-size: 1.02rem;
}

@media (hover: hover) {
  .store-list a:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-soft);
  }
}

/* 13. Finder backbar
   ========================================================================== */

.dpf-backbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #2a2f3a;
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--sans);
  font-size: 0.82rem;
}

.dpf-backbar a {
  color: inherit;
  text-decoration: none;
}

.dpf-backbar a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.dpf-backbar a:focus-visible {
  outline-color: #e2e8f0;
}

.dpf-backbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

/* 14. Footer
   ========================================================================== */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.75rem, 3vw, 2rem) clamp(1.25rem, 4vw, 1.5rem) clamp(2.5rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.6;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer a {
  display: inline-block;
  padding: 0.2rem 0;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* 15. Responsive adjustments
   ========================================================================== */

@media (max-width: 52rem) {
  .home-intro,
  .course-hero,
  .product {
    grid-template-columns: 1fr;
  }

  .home-portrait,
  .course-hero img {
    max-width: 30rem;
    margin-inline: auto;
  }

  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    padding-top: 0.55rem;
    border-top: 1px solid var(--line);
  }
}

@media (min-width: 56rem) {
  .pick-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 40rem) and (max-width: 55.99rem) {
  .pick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  body {
    font-size: 17px;
  }

  main {
    padding-inline: 1.25rem;
    padding-bottom: 3rem;
  }

  .hero {
    padding-top: 2.75rem;
  }

  h1 {
    font-size: clamp(2.4rem, 9vw, 3rem);
  }

  section {
    padding: 2.5rem 0;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.1rem 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }

  .site-nav a {
    min-height: 2.5rem;
  }

  .pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .pick img {
    padding: 0.55rem;
  }

  .pick span {
    padding: 0.65rem 0.75rem;
    font-size: 0.7rem;
  }

  .explore a {
    padding: 1.1rem 1.15rem;
  }

  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 1.1rem 0.8rem;
  }

  .article-title {
    margin-bottom: 1rem;
  }

  .prose h2,
  .prose h3 {
    scroll-margin-top: 4.5rem;
  }

  .prose h2 {
    margin-top: 2rem;
  }

  .prose img {
    margin: 1.5rem 0;
  }

  .lesson-list a {
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0 0.75rem;
    padding: 1rem 1.1rem;
  }

  .lesson-list strong {
    font-size: 1rem;
  }

  .lesson-list span {
    font-size: 0.92rem;
  }

  .resources {
    margin-top: 2rem;
    padding: 1.1rem 1.15rem;
  }

  .store-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding-inline: 1.25rem;
  }

  .site-footer nav {
    gap: 0.15rem 1.1rem;
  }
}

@media (max-width: 30rem) {
  .site-header {
    padding: 0.9rem 1.25rem;
  }

  .site-nav {
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    gap: 0.05rem 0.4rem;
    font-size: 0.65rem;
  }

  .button {
    padding: 0.55rem 1rem;
    font-size: 0.72rem;
  }

  .actions {
    gap: 0.6rem;
  }

  .discount {
    padding: 1rem 1.1rem;
  }
}

/* 16. Motion & print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .pick:hover,
  .explore a:hover,
  .book:not(.no-link):hover img,
  .lesson-list a:hover,
  .store-list a:hover {
    transform: none;
  }
}

@media print {
  :root {
    --paper: #fff;
    --ink: #000;
    --muted: #333;
    --line: #bbb;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .site-header,
  .site-footer,
  .skip,
  .article-actions,
  .article-nav,
  .lesson-nav,
  .video,
  .download,
  .actions {
    display: none !important;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .article,
  .lesson {
    max-width: none;
    padding-top: 0;
  }

  .page-head {
    padding: 0 0 1rem;
  }

  .prose a {
    color: #000;
    text-decoration: underline;
  }

  .prose h2,
  .prose h3 {
    break-after: avoid;
  }

  .prose img,
  .prose blockquote,
  .prose table {
    break-inside: avoid;
  }

  .prose img {
    border: 0;
  }
}
