/* Self-hosted fonts (no Google CDN — privacy/GDPR). Zilla Slab = bold newsprint
   slab-serif display (headlines, matches the masthead logo); PT Serif = classic
   editorial body serif (the workhorse face of real newspaper body text); Public
   Sans = civic/government-grade UI sans (nav, buttons, labels — chosen for its
   plain, official, "public record" character, distinct from the humanist Inter
   used elsewhere in the portfolio). See DESIGN.md. */
@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/zilla-slab-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/zilla-slab-semibold.woff2") format("woff2");
}
@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/zilla-slab-bold.woff2") format("woff2");
}
@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pt-serif-regular.woff2") format("woff2");
}
@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pt-serif-bold.woff2") format("woff2");
}
@font-face {
  font-family: "PT Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pt-serif-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/public-sans-var.woff2") format("woff2-variations");
}

:root {
  /* Color — "TC News Leader": classic small-town-weekly newspaper, not a lifestyle
     blog. Warm charcoal ink, a masthead red flag color (deeper/dustier than the
     portfolio's other reds — closer to old letterpress ink than a bright brand
     red), on a warm newsprint-cream canvas. */
  --primary: #8F2C22;         /* masthead red — primary (buttons, fills, accents) */
  --primary-dark: #70221B;    /* deep red — hover / active */
  --primary-bright: #A85A53;  /* lifted red — highlights on dark surfaces */
  --link: #7E271E;            /* deep red — text links (AA on cream) */
  --support: #49443F;         /* warm charcoal-brown — secondary support */
  --accent: #8F2C22;          /* red accent (alias of --primary) */
  --accent-dark: #70221B;
  --ink: #2B2622;             /* warm charcoal — body text / dark surfaces */
  --muted: #6B665F;           /* warm neutral grey — meta text, AA on paper */
  --line: #D9D3C8;            /* warm sand hairline */
  --paper: #F3EDE1;           /* newsprint cream canvas */
  --surface: #FAF7F2;         /* cards — lifted just above paper */
  --bg-soft: #E7E1D6;         /* alt sections — deeper sand wash */

  /* Layout — corners ~halved for a sharper, bolder feel */
  --wrap: 1140px;
  --radius: 8px;
  --radius-sm: 5px;
  --pill: 6px;               /* was fully round; now a subtle radius (bold/editorial) */
  --shadow-sm: 0 1px 2px rgba(20,20,20,.05), 0 2px 10px rgba(20,20,20,.05);
  --shadow-md: 0 10px 34px rgba(20,20,20,.12);

  /* Type — Zilla Slab display headlines, PT Serif body, Public Sans UI */
  --display: "Zilla Slab", "Roboto Slab", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: var(--ink);
  line-height: 1.7;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--primary-dark); }
.shell { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .002em;
  text-transform: uppercase;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.7rem); margin: 2.25rem 0 .75rem; }
h3 { font-size: 1.5rem; margin: 1.5rem 0 .5rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1.1rem; }
.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary-dark);
  display: inline-block;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(140%) blur(10px);
}
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 74px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; color: var(--ink); }
.brand svg { display: block; height: 38px; width: auto; }
.site-nav { display: flex; gap: 1.6rem; margin-left: auto; flex-wrap: wrap; }
.site-nav a { position: relative; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .98rem; padding: .25rem 0; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 2px; border-radius: 2px; background: var(--primary); transition: right .2s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--primary-dark); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }
/* Two-level nav: dropdown on hover/focus (desktop). */
.nav-group { position: relative; display: flex; align-items: center; }
.nav-parent { display: inline-flex; align-items: center; gap: .3rem; }
.nav-caret { transition: transform .2s ease; opacity: .7; }
.nav-group:hover .nav-caret, .nav-group:focus-within .nav-caret { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: 100%; left: 0; z-index: 40; min-width: 230px;
  display: flex; flex-direction: column; padding: .4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu a { padding: .5rem .7rem; border-radius: 8px; font-size: .95rem; font-weight: 500; color: var(--ink); white-space: nowrap; }
.nav-menu a::after { display: none; }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { background: var(--bg-soft); color: var(--primary-dark); }
.nav-toggle { display: none; }
.social { display: flex; gap: .5rem; }
.social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); background: var(--surface); border: 1px solid var(--line); transition: .18s; }
.social a:hover { color: #fff; background: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.social svg { width: 16px; height: 16px; display: block; }

/* Hero (home) */
.hero { position: relative; }
.hero-media {
  position: relative; min-height: 540px;
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end;
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(29,31,43,0) 40%, rgba(29,31,43,.32) 100%);
}
.hero .shell { position: relative; z-index: 2; width: 100%; padding-top: 3rem; padding-bottom: 3rem; }
.hero-card {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  max-width: 560px;
  box-shadow: var(--shadow-md);
}
.hero-card h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.3rem); margin: .5rem 0 .75rem; }
.hero-card p { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--primary); color: var(--ink);
  padding: .9rem 1.6rem; border-radius: var(--pill);
  font-family: var(--sans);
  text-decoration: none; font-weight: 800; font-size: .9rem;
  letter-spacing: .06em; text-transform: uppercase;
  /* Reset native <button> chrome so submit buttons don't render a 3D bevel. */
  border: 0; cursor: pointer; -webkit-appearance: none; appearance: none;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.btn:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }

/* Sections */
.section { padding: 4rem 0; }
.section.alt { background: var(--bg-soft); }
.section-head { max-width: 660px; margin: 0 auto 2.5rem; text-align: center; }
.section-head h2 { margin: .4rem 0 0; }
.section-head p { color: var(--muted); margin: .6rem 0 0; font-size: 1.08rem; }
.section-foot { text-align: center; margin-top: 2.5rem; }

/* Card grids */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.card {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-media { position: relative; overflow: hidden; }
.card-img { aspect-ratio: 4/3; object-fit: cover; width: 100%; display: block; background: var(--bg-soft); transition: transform .4s ease; }
.card:hover .card-img { transform: scale(1.04); }
.card-tag {
  position: absolute; top: .75rem; left: .75rem;
  background: rgba(255,255,255,.94); color: var(--ink);
  font-weight: 700; font-size: .72rem; letter-spacing: .03em; text-transform: uppercase;
  padding: .3rem .65rem; border-radius: var(--pill);
  backdrop-filter: blur(4px);
}
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.22rem; line-height: 1.25; }
.card-body p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin-top: auto; padding-top: .25rem; color: var(--muted); font-size: .85rem; font-weight: 500; }
.card-meta .m-item { display: inline-flex; align-items: center; }
.card-meta .m-item + .m-item::before { content: "•"; margin: 0 .55rem; color: var(--accent); font-size: .7em; }

/* Topic chips (browse) */
.cat-links { display: flex; flex-wrap: wrap; gap: .6rem; margin: .75rem 0 2.5rem; }
.topic-chip {
  display: inline-block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font-weight: 500; font-size: .92rem; padding: .5rem 1rem; border-radius: var(--pill);
  transition: .16s;
}
.topic-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Home: "Hyvän elämän elementit" */
.elements { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.el { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.25rem 1.75rem; text-align: center; box-shadow: var(--shadow-sm); }
.el-icon { width: 64px; height: 64px; margin: 0 auto 1.1rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255,90,54,.10); color: var(--primary-dark); }
.el:nth-child(2) .el-icon { background: rgba(20,20,20,.06); color: var(--ink); }
.el-icon svg { width: 30px; height: 30px; }
.el h3 { margin: .25rem 0 .5rem; font-size: 1.3rem; }
.el p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Content pages */
.page { padding-top: 2.5rem; padding-bottom: 4rem; }
.page .lead { margin-bottom: 2rem; }
.article, .recipe { padding-top: 2.5rem; padding-bottom: 4rem; }
.article article, .recipe article { max-width: 760px; margin: 0 auto; }
.article article p, .recipe article p, .page p { font-size: 1.15rem; line-height: 1.75; }
.article article h2, .recipe article h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); }
.article article a, .recipe article a { text-decoration: underline; text-decoration-color: rgba(192,55,26,.45); }
.article article a:hover, .recipe article a:hover { text-decoration-color: var(--primary); }
.article article img, .recipe article img { border-radius: var(--radius-sm); }
.article article blockquote, .recipe article blockquote {
  margin: 1.75rem 0; padding: .5rem 0 .5rem 1.5rem;
  border-left: 4px solid var(--accent);
  font-size: 1.25rem; color: var(--ink);
}
.meta { color: var(--muted); font-size: .92rem; margin: 0 0 1.5rem; }
.meta a { color: inherit; text-decoration-color: rgba(93,95,110,.35); }
.lead, .lead p { font-size: 1.25rem; color: var(--muted); line-height: 1.6; }
.article-hero, .recipe-hero { width: 100%; border-radius: var(--radius); margin-bottom: 1.75rem; aspect-ratio: 16/9; object-fit: cover; box-shadow: var(--shadow-sm); }
.video-embed { position: relative; aspect-ratio: 16/9; margin: 1.75rem 0; border-radius: var(--radius); overflow: hidden; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption { color: var(--muted); font-size: .9rem; margin-top: -.75rem; }
.author-bio {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1.1rem;
  align-items: start;
  margin-top: 3rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid #2b2b30;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.author-bio p { color: rgba(255,255,255,.82); }
.author-bio h2 a { color: #fff; text-decoration-color: var(--primary); }
.author-bio h2 a:hover { color: var(--primary); }
.author-avatar {
  width: 88px;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2a2e;
}
.author-kicker {
  margin: 0 0 .15rem;
  color: rgba(255,255,255,.55);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.author-bio h2 { margin: 0 0 .35rem; font-size: 1.25rem; }
.author-bio p:last-child { margin-bottom: 0; font-size: 1rem; line-height: 1.6; }
.author-profile {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.6rem;
  align-items: center;
  margin-bottom: 2.5rem;
}
.author-avatar-large { width: 140px; }

/* Recipe */
.recipe-excerpt p { font-size: 1.25rem; color: var(--muted); line-height: 1.5; }
.recipe-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  margin: 1.75rem 0; padding: 1.25rem .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.recipe-meta div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: .35rem .75rem; position: relative; }
.recipe-meta div + div::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: var(--line); }
.recipe-meta span { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.recipe-meta strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--primary-dark); }
.recipe-ingredients { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.recipe-ingredients li { position: relative; padding: .6rem 0 .6rem 1.6rem; border-bottom: 1px dashed var(--line); }
.recipe-ingredients li::before { content: ""; position: absolute; left: .25rem; top: 1.05rem; width: 7px; height: 7px; border-radius: 50%; background: var(--primary-bright); }
.recipe-directions { counter-reset: step; list-style: none; padding: 0; margin: 1rem 0; }
.recipe-directions li { position: relative; padding: .25rem 0 1.35rem 3rem; margin: 0; }
.recipe-directions li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.recipe-nutrition { border-collapse: collapse; width: 100%; max-width: 380px; margin: 1rem 0; font-variant-numeric: tabular-nums; }
.recipe-nutrition th, .recipe-nutrition td { padding: .6rem .85rem; border-bottom: 1px solid var(--line); }
.recipe-nutrition th { text-align: left; font-weight: 500; color: var(--muted); }
.recipe-nutrition td { text-align: right; font-weight: 600; }
.recipe-nutrition-note { color: var(--muted); font-size: .85rem; }
.recipe-back { margin-top: 2.5rem; }
.recipe-back a { font-weight: 600; text-decoration: none; }
.recipe-back a:hover { text-decoration: underline; }

/* Footer */
.site-footer { background: var(--ink); color: #c9c9cd; margin-top: 4rem; padding: 3.5rem 0 1.5rem; }
.page-home .site-footer { margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.footer-brand .footer-logo { display: inline-block; color: #fff; margin-bottom: 1rem; }
.footer-brand .footer-logo svg { display: block; height: 88px; width: auto; }
.footer-brand p { font-size: .95rem; line-height: 1.7; max-width: 44ch; color: #a4a4aa; }
.site-footer h2 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin: 0 0 1rem; }
.site-footer a { color: #c9c9cd; text-decoration: none; display: block; margin: .45rem 0; transition: .14s; }
.site-footer a:hover { color: var(--primary-bright); }
.footer-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: #8a8a90; }
.footer-legal a { display: inline; color: #c9c9cd; }
.footer-legal a:hover { color: var(--primary-bright); }

/* Responsive */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .shell { padding: 0 18px; }
  .section { padding: 2.75rem 0; }
  .header-row { gap: .75rem 1rem; }
  .social { display: none; }
  /* Mobile nav: hamburger toggle + dropdown panel under the header. */
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    margin-left: auto; width: 44px; height: 44px; padding: 0 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
    flex-direction: column; gap: 0; align-items: stretch; flex-wrap: nowrap;
    margin: 0; padding: .25rem 18px .85rem;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
    display: none;
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav a { padding: .8rem .2rem; border-top: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav a:first-child { border-top: 0; }
  .site-nav a::after { display: none; }
  /* Mobile: dropdowns collapse to just the parent link — the Topics/Toolkit
     destination pages list everything, so no nested panel is needed here. */
  .nav-group { display: block; }
  .nav-parent { display: block; padding: .8rem .2rem; border-top: 1px solid var(--line); font-size: 1.05rem; }
  .nav-caret, .nav-menu { display: none; }
  .elements { grid-template-columns: 1fr; }
  .hero-media { min-height: 420px; }
  .hero-card { padding: 1.5rem; max-width: none; }
  .author-bio, .author-profile { grid-template-columns: 1fr; }
  .author-avatar-large { width: 112px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
  .card:hover .card-img { transform: none; }
}

/* Breadcrumb (visible murupolku; mirrors BreadcrumbList JSON-LD) */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .85rem; color: var(--muted); margin: 0 0 1.25rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-dark); text-decoration: underline; }
.breadcrumb .bc-current { color: var(--ink); }
.breadcrumb span[aria-hidden] { opacity: .6; }

/* Newsletter (footer band) */
.newsletter { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem; padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.newsletter .nl-text { flex: 1 1 280px; }
.newsletter h2 { font-family: var(--display); font-size: 1.9rem; text-transform: uppercase; letter-spacing: .01em; color: #fff; margin: 0 0 .3rem; }
.newsletter .nl-text p { margin: 0; color: rgba(255,255,255,.72); }
.nl-form { flex: 1 1 340px; max-width: 460px; }
.nl-row { display: flex; gap: .5rem; }
.nl-form input[type=email] { flex: 1; min-width: 0; padding: .75rem .95rem; border: 1px solid transparent; border-radius: var(--pill); font: inherit; background: #fff; color: var(--ink); }
.nl-form .btn { white-space: nowrap; }
.nl-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* In-article signup CTA (end of every post — the high-intent moment). Reuses
   .nl-form (newsletter.js auto-attaches) on a filled dark card so the coral
   eyebrow + coral button read with strong contrast. */
.post-signup { margin: 3rem 0 1.25rem; padding: 1.9rem 1.9rem 1.75rem; background: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.post-signup .eyebrow { color: var(--accent); }
.post-signup h2 { font-family: var(--display); font-size: 1.7rem; line-height: 1.06; letter-spacing: .01em; text-transform: uppercase; color: #fff; margin: .35rem 0 .5rem; }
.post-signup__text p { color: rgba(255,255,255,.78); margin: 0 0 1.1rem; max-width: 52ch; }
.post-signup .nl-row { max-width: 460px; }
.post-signup .btn { background: var(--accent); color: var(--ink); }
.post-signup .btn:hover { background: #fff; color: var(--ink); }
.post-signup .nl-consent { display: block; margin-top: .7rem; font-size: .8rem; color: rgba(255,255,255,.66); }
.post-signup .nl-consent a { color: #fff; text-decoration: underline; }
.post-signup .nl-msg { margin: .6rem 0 0; font-size: .9rem; font-weight: 600; min-height: 1.2em; }
.post-signup .nl-msg.ok { color: #b8ecc9; }
.post-signup .nl-msg.err { color: #ffcfcf; }
.post-signup .nl-msg a { color: var(--accent); font-weight: 700; text-decoration: underline; }
.post-signup .nl-msg .nl-note { color: rgba(255,255,255,.6); font-weight: 500; }
.nl-consent { display: flex; gap: .5rem; align-items: flex-start; margin: .7rem 0 0; font-size: .82rem; line-height: 1.45; color: rgba(255,255,255,.72); }
.nl-consent input { margin-top: .15rem; accent-color: var(--primary-bright); flex: 0 0 auto; }
.nl-consent a { display: inline; color: #fff; text-decoration: underline; margin: 0; }
.nl-msg { margin: .5rem 0 0; font-size: .88rem; min-height: 1.1em; }
.nl-msg.ok { color: #8fe3b0; }
.nl-msg.err { color: #ffb4a8; }
@media (max-width: 560px) { .nl-row { flex-wrap: wrap; } .nl-form .btn { width: 100%; } }

/* Source citations (markdown-it-footnote) */
.footnote-ref a { text-decoration: none; font-weight: 600; color: var(--primary); }
.footnotes-sep { display: none; }
.footnotes { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.footnotes::before { content: "Lähteet"; display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; color: var(--ink); margin-bottom: .6rem; }
.footnotes-list { margin: 0; padding-left: 1.3rem; }
.footnote-item p { margin: .35rem 0; }
.footnotes a { color: var(--primary); }
.footnote-backref { text-decoration: none; }

/* Embeddable challenge CTA box (challenge-cta.njk) — drop into articles/recipes */
.challenge-cta { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.6rem 1.8rem; margin: 2.5rem 0; }
.challenge-cta .cc-eyebrow { color: var(--accent); font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.challenge-cta h3 { color: #fff; margin: .35rem 0 .45rem; font-size: 1.4rem; line-height: 1.2; }
.challenge-cta > p { color: rgba(255,255,255,.82); margin: 0 0 1.1rem; font-size: .98rem; }
.challenge-cta .btn { background: var(--accent); color: var(--ink); }
.challenge-cta .btn:hover { background: var(--accent-dark); color: var(--ink); }
/* Hide the embedded challenge CTA for visitors who already joined the challenge */
html.sub-haaste .challenge-cta { display: none; }

/* Desktop exit-intent popup (challenge-popup.njk + exit-intent.js) */
.exit-popup { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 1.25rem; }
.exit-popup.is-open { display: flex; }
.exit-popup__backdrop { position: absolute; inset: 0; background: rgba(20,30,24,.55); backdrop-filter: blur(2px); }
.exit-popup__card { position: relative; z-index: 1; width: 100%; max-width: 440px; background: var(--primary); color: #fff; border-radius: var(--radius); padding: 2rem 2.1rem; box-shadow: var(--shadow-md); animation: exitPopupIn .25s ease; }
@keyframes exitPopupIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.exit-popup__card .cc-eyebrow { color: var(--accent); font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.exit-popup__card h3 { color: #fff; margin: .35rem 0 .45rem; font-size: 1.45rem; line-height: 1.2; }
.exit-popup__card > p { color: rgba(255,255,255,.85); margin: 0 0 1.1rem; font-size: .98rem; }
.exit-popup__card .btn { background: var(--accent); color: var(--ink); }
.exit-popup__card .btn:hover { background: var(--accent-dark); color: var(--ink); }
.exit-popup__close { position: absolute; top: .5rem; right: .7rem; background: none; border: 0; color: rgba(255,255,255,.7); font-size: 1.9rem; line-height: 1; cursor: pointer; padding: .1rem .3rem; }
.exit-popup__close:hover { color: #fff; }
@media (prefers-reduced-motion: reduce) { .exit-popup__card { animation: none; } }

/* Mobile sticky challenge bar (challenge-bar.njk + challenge-bar.js) */
.challenge-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; background: var(--primary); color: var(--ink); box-shadow: 0 -6px 24px rgba(20,20,20,.18); transform: translateY(110%); transition: transform .35s ease; }
.challenge-bar.is-in { transform: translateY(0); }
.challenge-bar__peek { display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: 0; color: #fff; font: inherit; text-align: left; padding: .9rem 2.8rem .9rem 1.1rem; cursor: pointer; -webkit-appearance: none; appearance: none; }
.challenge-bar__peek-text { font-weight: 600; font-size: .98rem; }
.challenge-bar__peek-cta { margin-left: auto; color: var(--accent); font-weight: 700; white-space: nowrap; }
.challenge-bar.is-expanded .challenge-bar__peek-cta { display: none; }
.challenge-bar__close { position: absolute; top: .45rem; right: .55rem; background: none; border: 0; color: rgba(255,255,255,.75); font-size: 1.6rem; line-height: 1; padding: .1rem .35rem; cursor: pointer; -webkit-appearance: none; appearance: none; }
.challenge-bar__close:hover { color: #fff; }
.challenge-bar__panel { max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .3s ease, visibility .3s; padding: 0 1.1rem; }
.challenge-bar.is-expanded .challenge-bar__panel { max-height: 78vh; overflow: auto; visibility: visible; padding-bottom: 1.1rem; }
.challenge-bar__panel h3 { color: #fff; margin: .1rem 0 .4rem; font-size: 1.2rem; }
.challenge-bar__panel > p { color: rgba(255,255,255,.85); margin: 0 0 .9rem; font-size: .95rem; }
.challenge-bar__panel .btn { background: var(--accent); color: var(--ink); }
.challenge-bar__panel .btn:hover { background: var(--accent-dark); color: var(--ink); }
/* Desktop uses the exit-intent popup instead — never show the bar there. */
@media (min-width: 1024px) { .challenge-bar { display: none !important; } }

/* ── Homepage: brand hero + topic grid ─────────────────────────────────── */
.hero-media--photo {
  min-height: 480px;
  background-image: url("/assets/img/home-hero.jpg?v=5");
  background-size: cover;
  background-position: center right;
}
/* The photo is warm-paper edge-to-edge, so only a gentle left veil is needed to
   guarantee the headline card stays readable — no hard panel edge. */
.hero-media--photo::after {
  background: linear-gradient(90deg, rgba(20,20,20,.35) 0%, rgba(20,20,20,.12) 40%, rgba(20,20,20,0) 62%);
}
.hero-media--photo .hero-card { background: rgba(255,255,255,.95); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.topic-card {
  display: flex; flex-direction: column; gap: .25rem;
  padding: 1.3rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.topic-name { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; font-size: 1.4rem; color: var(--ink); }
.topic-count { color: var(--muted); font-size: .85rem; font-weight: 500; }

/* Homepage "Fresh reads" post cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.post-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.post-card a { display: block; padding: 1.4rem 1.5rem; text-decoration: none; color: inherit; }
.post-card h3 { margin: 0 0 .55rem; font-size: 1.3rem; line-height: 1.08; color: var(--ink); }
.post-card:hover h3 { color: var(--primary-dark); }
.post-card p { margin: 0 0 .85rem; color: var(--muted); font-size: .98rem; line-height: 1.55; }
.post-card .read-more { font-family: var(--sans); font-weight: 800; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; color: var(--primary-dark); }

/* Per-book hero photo at the start of each book section */
.book-hero {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  margin: .4rem 0 1.6rem;
}

/* Book cards — consistent affiliate cards for book listicles (cover + info + buy/Audible) */
.book-card {
  display: flex; gap: 1.1rem; align-items: stretch;
  margin: 1.4rem 0 2.6rem;
  padding: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.book-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.book-card__cover {
  flex: 0 0 110px; width: 110px; align-self: flex-start;
  display: grid; place-items: center;
}
/* Real book covers: SHARP corners (a book is never rounded) + a soft drop shadow
   for physical realism. Higher specificity + later source order than
   `.article article img` so that rule's radius does not apply. drop-shadow hugs
   the opaque cover rather than the transparent object-fit-contain box. */
.book-card .book-card__cover img {
  width: 100%; height: 162px; object-fit: contain; margin: 0;
  border-radius: 0;
  filter: drop-shadow(0 2px 7px rgba(29, 31, 43, .22));
}
.book-card__cover--ph {
  height: 162px; padding: .7rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, var(--primary) 0%, var(--primary-bright) 100%);
  color: #fff; text-align: center;
}
.book-card__cover--ph span { font-family: var(--serif); font-weight: 600; font-size: .96rem; line-height: 1.25; }
.book-card__body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.book-card__title { font-family: var(--serif); font-weight: 600; font-size: 1.18rem; color: var(--primary-dark); margin: 0; }
.book-card__author { color: var(--muted); font-size: .95rem; margin: 0; }
.book-card__note { font-size: .98rem; color: var(--ink); margin: .15rem 0 0; line-height: 1.5; }
.book-card__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; padding-top: .85rem; }
.book-card .btn { padding: .55rem 1.05rem; font-size: .92rem; }
@media (max-width: 560px) {
  .book-card { flex-direction: column; }
  .book-card__cover { width: 128px; flex-basis: auto; }
  .book-card__actions .btn { flex: 1 1 auto; justify-content: center; }
}
