/*
 * Public course pages (src/course-pages.js): the course index and one page per course.
 * Builds on main.css and uses its tokens only.
 */
.desktop-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
/* No menu script on these pages: the language picker and sign-in stay in the header on small screens. */
@media (max-width: 1080px) {
  .courses-page .header-actions { margin-left: auto; display: flex; gap: 10px; }
  .courses-page .course-shops-link { display: none; }
}
/* On a phone the logo gives way, so a long sign-in label ("Iniciar sesión", "Se connecter") stays inside the header. */
@media (max-width: 560px) {
  .courses-page .landing-header { gap: 10px; }
  .courses-page .landing-header > .brand { flex: 0 1 auto; min-width: 0; }
  .courses-page .landing-header .brand-logo { width: 100%; max-width: 180px; height: auto; }
  .courses-page .header-actions { flex: 0 0 auto; }
}

.course-page-hero { padding-top: 148px; padding-bottom: 48px; }
.course-page-hero h1 { margin: 14px 0 16px; font-size: clamp(36px, 5vw, 60px); line-height: 1.04; }
.course-page-hero .section-heading { margin-bottom: 40px; }
.course-page-hero .section-heading p { margin-left: 0; }
.course-crumbs { margin-bottom: 20px; font-size: 14px; font-weight: 600; }
.course-crumbs a { color: var(--accent); }
.course-crumbs a::before { content: "← "; }

/* The whole card is the link: the title's link stretches over the card (one action per card). */
.course-card .course-card-link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.course-card h2 { margin: 0 0 8px; font-size: 23px; line-height: 1.15; }
.course-card-link:focus-visible { outline: none; }
.course-card:has(.course-card-link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }

.course-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 48px; }
.course-page-lead { margin: 0 0 24px; color: var(--text-muted); font-size: 18px; line-height: 1.6; }
.course-facts { margin: 0 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.course-facts div { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface); }
.course-facts dt { color: var(--text-subtle); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.course-facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; }
.course-page-note { margin: 14px 0 0; color: var(--text-muted); font-size: 14px; }
.course-page-trailer { margin: 0; }
.course-page-trailer video { width: 100%; aspect-ratio: 16 / 10; display: block; border: 1px solid var(--border); border-radius: 26px; background: var(--surface-subtle); object-fit: cover; }
.course-page-trailer figcaption { margin-top: 10px; color: var(--text-muted); font-size: 13px; text-align: center; }

.course-page-lessons, .course-page-teacher, .course-page-faq, .course-page-more { padding-top: 40px; padding-bottom: 40px; }
.course-page-lessons h2, .course-page-faq h2, .course-page-more h2 { margin: 0 0 24px; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.course-page-faq h2 { text-align: center; }
.course-lesson-list { margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; }
.course-lesson-list li { padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface); font-weight: 600; }
.course-lesson-list i { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }

/* Members' creations, reviews and the course tools (pastry.courses review, 2026-11-05). */
.course-page-gallery, .course-page-reviews, .course-page-tools { padding-top: 40px; padding-bottom: 40px; }
.course-page-gallery h2, .course-page-reviews h2, .course-page-tools h2 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.course-section-lead { margin: 0 0 24px; color: var(--text-muted); font-size: 16px; line-height: 1.6; }
.course-gallery { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; list-style: none; }
.course-gallery figure { margin: 0; position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface-subtle); }
.course-gallery img { width: 100%; height: auto; aspect-ratio: 1; display: block; object-fit: cover; }
.course-gallery figcaption { position: absolute; left: 8px; bottom: 8px; padding: 3px 10px; border-radius: var(--bam-radius-pill); background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; }
.course-rating-summary { margin: 0 0 20px; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.course-rating-summary i, .course-review-stars i { color: var(--bam-gold); }
.course-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.course-review { margin: 0; padding: 22px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); }
.course-review-stars { margin: 0; display: flex; gap: 2px; font-size: 15px; }
.course-review blockquote { margin: 0; font-family: var(--bam-serif); font-size: 17px; line-height: 1.45; }
.course-review figcaption { margin-top: auto; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.course-tool-list { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.course-tool-list a, .course-tool { padding: 9px 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--bam-radius-pill); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; }
.course-tool-list a { border-color: var(--bam-gold-line); }
.course-tool-list a:hover { border-color: var(--border-strong); }
.course-tool-list a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.course-tool-list i { color: var(--accent); }

/* Live workshop next to BAM Academy (src/course-pages.js compareHtml); a card per row on a phone. */
.course-page-compare { padding-top: 40px; padding-bottom: 40px; }
.course-page-compare h2 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.course-compare { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); }
.course-compare th, .course-compare td { padding: 14px 18px; border-top: 1px solid var(--border); text-align: left; vertical-align: top; font-size: 15px; line-height: 1.45; }
.course-compare thead th, .course-compare thead td { border-top: 0; color: var(--text-subtle); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.course-compare thead th.is-bam { color: var(--accent); }
.course-compare tbody th { width: 22%; font-weight: 700; }
.course-compare td { color: var(--text-muted); }
.course-compare td.is-bam { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.course-compare td i { margin-right: 8px; }
.course-compare td.is-bam i { color: var(--accent); }
@media (max-width: 650px) {
  .course-compare, .course-compare tbody, .course-compare tr, .course-compare th, .course-compare td { display: block; width: auto; }
  .course-compare thead { display: none; }
  .course-compare tbody tr { padding: 4px 0; border-top: 1px solid var(--border); }
  .course-compare tbody tr:first-child { border-top: 0; }
  .course-compare tbody th, .course-compare td { border-top: 0; padding: 8px 16px; }
  .course-compare tbody th { width: auto; padding-top: 14px; }
  .course-compare td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--text-subtle); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .course-compare td.is-bam { margin: 0 12px 12px; border-radius: var(--bam-radius-md); }
}

.course-teacher-card { padding: 28px; display: flex; align-items: center; gap: 28px; border: 1px solid var(--bam-gold-line); border-radius: var(--bam-radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.course-teacher-card img { width: 160px; height: 160px; flex: 0 0 auto; object-fit: cover; object-position: top; border-radius: 50%; background: var(--surface-subtle); }
.course-teacher-card h2 { margin: 8px 0 4px; font-size: 30px; }
.course-teacher-card p { margin: 0; color: var(--text-muted); line-height: 1.6; }
.course-teacher-card .course-teacher-role { margin-bottom: 10px; color: var(--accent); font-weight: 600; }
.course-page-cta { padding-top: 64px; padding-bottom: 64px; }
.course-page-cta p { margin: 18px 0 0; }

/* Masters, features and e-books (src/academy-pages.js). */
.course-teacher-card h2 a, .course-teacher-card h1 a { color: inherit; }
.master-hero { align-items: flex-start; }
.master-hero > div { flex: 1 1 auto; min-width: 0; }
.master-hero h1 { margin: 8px 0 12px; }
.master-hero .course-facts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.master-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.master-grid-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.master-tile, .feature-tile, .ebook-tile { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--bam-panel-sheen), var(--surface); }
.master-tile img { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; object-position: top; background: var(--surface-subtle); }
.master-tile-body { padding: 18px 20px 20px; }
.master-tile h2, .master-tile h3, .feature-tile h2, .feature-tile h3, .ebook-tile h2, .ebook-tile h3 { margin: 0 0 6px; font-size: 22px; line-height: 1.15; }
.master-tile p, .feature-tile p, .ebook-tile p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.master-tile .master-tile-role { margin-bottom: 6px; color: var(--accent); font-weight: 600; }
.master-tile-count { margin-top: 12px; display: block; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.master-tile .course-card-link::after, .feature-tile .course-card-link::after, .ebook-tile .course-card-link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.master-tile a, .feature-tile a, .ebook-tile a { color: inherit; }
.master-tile:has(.course-card-link:focus-visible), .feature-tile:has(.course-card-link:focus-visible), .ebook-tile:has(.course-card-link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.master-tile:hover, .feature-tile:hover, .ebook-tile:hover { border-color: var(--border-strong); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
/* Feature cards: the feature's photo on top with its icon riding on the edge, then plan, name and lead. */
.feature-tile { padding: 0 24px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; transition: transform var(--bam-duration) var(--bam-ease), box-shadow var(--bam-duration) var(--bam-ease); }
.feature-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.feature-tile-photo { margin: 0 -24px -38px; width: calc(100% + 48px); aspect-ratio: 16 / 9; display: block; overflow: hidden; background: var(--surface-subtle); }
.feature-tile-photo img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .5s var(--bam-ease); }
.feature-tile:hover .feature-tile-photo img { transform: scale(1.05); }
.feature-tile .feature-icon { position: relative; z-index: 1; border: 3px solid var(--surface); box-shadow: var(--shadow-sm); }
.feature-tile:not(:has(.feature-tile-photo)) { padding-top: 24px; }
.feature-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--bam-radius-md); background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--bam-rose-hi) 45%, var(--surface))); color: var(--accent); font-size: 26px; }
.feature-icon-large { width: 72px; height: 72px; font-size: 36px; border-radius: var(--bam-radius-lg); background: var(--bam-gold-gradient); color: var(--bam-on-gold); box-shadow: var(--shadow-sm); }

/* A feature page: a blush hero with soft colour blooms, the copy beside the stage (photo + the app window to try). */
.feature-page-hero { position: relative; isolation: isolate; }
.feature-page-hero::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); pointer-events: none; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent);
  background: radial-gradient(ellipse 40% 50% at 82% 30%, color-mix(in srgb, var(--bam-rose-hi) 42%, transparent), transparent 70%),
    radial-gradient(ellipse 30% 40% at 8% 18%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(ellipse 35% 35% at 45% 75%, color-mix(in srgb, var(--warning) 12%, transparent), transparent 70%); }
.feature-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 56px; }
.feature-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.feature-hero-badges { display: flex; align-items: center; gap: 14px; }
.feature-hero h1 { margin: 0; }
.feature-hero .course-page-lead { margin: 0 0 8px; }
.feature-stage { position: relative; padding: 96px 0 28px 18%; }
.feature-stage-photo { position: absolute; top: 0; left: 0; width: 64%; height: calc(100% - 8px); object-fit: cover; border-radius: 28px; box-shadow: var(--shadow-card); }
.feature-stage::after { content: ""; position: absolute; z-index: 0; pointer-events: none; right: -18px; bottom: -6px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--bam-rose-hi), var(--accent)); opacity: .5; }
.feature-stage-hint { position: absolute; z-index: 2; top: 14px; right: 8px; margin: 0; padding: 8px 14px; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--bam-radius-pill); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--accent); font-size: 13px; font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .feature-stage-hint { animation: fdemo-float 3.2s ease-in-out infinite; }
}
@keyframes fdemo-float { 50% { transform: translateY(-5px); } }

/* "What you can do": colourful tiles, each with its own icon, the tint stepping through the palette. */
.feature-points { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; list-style: none; }
.feature-points li { --tint: var(--accent); position: relative; overflow: hidden; padding: 20px; display: flex; flex-direction: column; gap: 14px; border: 1px solid color-mix(in srgb, var(--tint) 22%, var(--border)); border-radius: var(--bam-radius-lg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 11%, var(--surface)), var(--surface) 70%); font-weight: 600; line-height: 1.45; transition: transform var(--bam-duration) var(--bam-ease); }
.feature-points:has(li:nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-points li:hover { transform: translateY(-2px); }
.feature-points li:nth-child(4n + 2) { --tint: var(--bam-rose-hi); }
.feature-points li:nth-child(4n + 3) { --tint: var(--success); }
.feature-points li:nth-child(4n + 4) { --tint: var(--warning); }
.feature-point-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--bam-radius-md); background: color-mix(in srgb, var(--tint) 18%, var(--surface)); color: color-mix(in srgb, var(--tint) 75%, var(--text)); font-size: 22px; }

/* "How it works": the steps as a timeline beside a photo, on a full-width blush band. */
.feature-how { position: relative; isolation: isolate; }
.feature-how::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 40px calc(50% - 50vw); background: linear-gradient(120deg, color-mix(in srgb, var(--bam-rose-hi) 28%, var(--bg)), color-mix(in srgb, var(--accent) 10%, var(--bg)) 55%, color-mix(in srgb, var(--warning) 12%, var(--bg))); }
.feature-how-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: 48px; }
.feature-how-grid:not(:has(.feature-how-photo)) { grid-template-columns: 1fr; }
.feature-steps { position: relative; margin: 0; padding: 0; display: grid; gap: 14px; list-style: none; counter-reset: none; }
.feature-steps::before { content: ""; position: absolute; top: 24px; bottom: 24px; left: 37px; width: 2px; background: linear-gradient(var(--accent), var(--bam-rose-hi)); }
.feature-steps li { position: relative; padding: 18px 20px; display: flex; align-items: center; gap: 16px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 600; line-height: 1.5; }
.feature-step-number { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--bam-gold-gradient); color: var(--bam-on-gold); font-weight: 700; box-shadow: 0 0 0 5px var(--accent-soft); }
.feature-how-photo { margin: 0; position: relative; }
.feature-how-photo img { width: 100%; height: auto; aspect-ratio: 5 / 4; display: block; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow-card); }
.feature-how-photo::after { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 24px -16px -16px 24px; border-radius: 28px; background: linear-gradient(135deg, var(--bam-rose-hi), var(--accent-soft)); }

/* ---------- The app window to try (src/feature-demos.js, js/feature-demos.js) ---------- */
.fdemo { position: relative; z-index: 1; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-card), 0 30px 70px color-mix(in srgb, var(--accent) 16%, transparent); font-size: 14px; }
.fdemo-bar { padding: 12px 16px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, var(--accent-soft), var(--surface-subtle)); }
.fdemo-dots { display: inline-flex; gap: 6px; }
.fdemo-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.fdemo-dots span:first-child { background: var(--accent); }
.fdemo-dots span:nth-child(2) { background: var(--bam-rose-hi); }
.fdemo-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); }
.fdemo-title .ti { color: var(--accent); }
.fdemo-body { padding: 18px; }
.fdemo-example { position: absolute; right: 12px; top: 10px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 4px; border-radius: var(--bam-radius-pill); background: var(--surface); color: var(--text-subtle); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.fdemo [hidden] { display: none !important; }
.fdemo button { cursor: pointer; }
.fdemo button:disabled { cursor: default; }
.fdemo button:focus-visible, .fdemo input:focus-visible, .fdemo rect:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fdemo-mini-label { margin: 0 0 6px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-subtle); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.fdemo-hint { margin: 10px 0 0; display: flex; align-items: center; gap: 6px; color: var(--text-subtle); font-size: 12px; }
.fdemo-pill { padding: 3px 10px; display: inline-flex; align-items: center; gap: 5px; border-radius: var(--bam-radius-pill); background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.fdemo-button { min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: var(--bam-radius-pill); background: var(--bam-gold-gradient); color: var(--bam-on-gold); font-size: 13px; font-weight: 700; }
.fdemo-button-ghost { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.fdemo-button:disabled { opacity: .45; }
.fdemo-segments { margin-bottom: 14px; padding: 4px; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; border-radius: var(--bam-radius-pill); background: var(--surface-subtle); }
.fdemo-segment { min-height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: var(--bam-radius-pill); background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 700; }
.fdemo-segment:hover { color: var(--text); }
.fdemo-segment.is-on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.fdemo-segments-small .fdemo-segment { min-height: 30px; padding: 0 10px; font-size: 12px; }
.fdemo-tags { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.fdemo-tags li { padding: 5px 10px; border-radius: var(--bam-radius-pill); background: color-mix(in srgb, var(--warning) 14%, var(--surface)); color: var(--text); font-size: 12px; font-weight: 600; }
.fdemo-key { width: 10px; height: 10px; display: inline-block; flex: 0 0 auto; border-radius: 3px; background: var(--border-strong); }
.fdemo-key-after, .fdemo-key-0 { background: var(--accent); }
.fdemo-key-1 { background: var(--bam-rose-hi); }
.fdemo-key-2 { background: var(--success); }
.fdemo-range { margin: 0 0 12px; display: grid; gap: 6px; font-size: 13px; color: var(--text-muted); }
.fdemo-range strong { color: var(--text); }
.fdemo-range input { width: 100%; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; accent-color: var(--accent); }

/* Charts: bars in the brand rose, the latest one stronger; the hovered or focused bar shows its value. */
.fdemo-chart { width: 100%; height: auto; display: block; overflow: visible; }
.fdemo-grid { stroke: var(--border); stroke-dasharray: 3 4; }
.fdemo-bar { fill: color-mix(in srgb, var(--accent) 38%, var(--surface)); transition: fill var(--bam-duration) ease; cursor: pointer; }
.fdemo-bar.is-last { fill: var(--accent); }
.fdemo-bar:hover, .fdemo-bar.is-active { fill: var(--bam-rose-lo); }
.fdemo-axis { fill: var(--text-subtle); font-size: 10px; font-family: var(--bam-sans); }
[data-range-panel], [data-panel] { position: relative; }
.fdemo-tip { position: absolute; z-index: 2; width: 120px; padding: 5px 8px; border-radius: var(--bam-radius-sm); background: var(--text); color: var(--surface); font-size: 12px; font-weight: 700; text-align: center; pointer-events: none; }

/* Pastry assistant: a short chat. */
.fdemo-messages { max-height: 260px; min-height: 120px; margin-bottom: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.fdemo-bubble { margin: 0; max-width: 88%; padding: 10px 14px; display: flex; gap: 8px; border-radius: 16px; line-height: 1.45; }
.fdemo-bubble-bot { align-self: flex-start; border-bottom-left-radius: 4px; background: var(--surface-subtle); }
.fdemo-bubble-bot > .ti { color: var(--accent); font-size: 18px; }
.fdemo-bubble-me { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--bam-gold-gradient); color: var(--bam-on-gold); font-weight: 600; }
.fdemo-source { margin-top: 6px; display: flex; align-items: center; gap: 4px; color: var(--accent); font-size: 11px; font-weight: 700; }
.fdemo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fdemo-chip { padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: var(--bam-radius-pill); background: var(--surface); color: var(--accent); font-size: 13px; font-weight: 600; text-align: left; }
.fdemo-chip:hover:not(:disabled) { background: var(--accent-soft); }
.fdemo-chip:disabled { opacity: .45; }
.fdemo-typing { margin: 10px 0 0; display: flex; align-items: center; gap: 4px; color: var(--text-subtle); font-size: 12px; }
.fdemo-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .fdemo-typing span { animation: fdemo-blink 1s infinite; }
  .fdemo-typing span:nth-child(2) { animation-delay: .15s; }
  .fdemo-typing span:nth-child(3) { animation-delay: .3s; }
  .fdemo-bubble { animation: fdemo-in .3s var(--bam-ease); }
}
@keyframes fdemo-blink { 50% { opacity: .2; } }
@keyframes fdemo-in { from { opacity: 0; transform: translateY(6px); } }

/* Guided baking: one big step, its ingredients and a timer ring. */
.fdemo-bake-head { margin-bottom: 10px; display: flex; justify-content: space-between; gap: 10px; }
.fdemo-bake-head span { color: var(--text-subtle); font-size: 12px; font-weight: 700; }
.fdemo-progress { margin-bottom: 16px; display: grid; grid-auto-flow: column; gap: 6px; }
.fdemo-progress span { height: 6px; border-radius: var(--bam-radius-pill); background: var(--surface-subtle); transition: background var(--bam-duration) ease; }
.fdemo-progress span.is-on { background: var(--bam-gold-gradient); }
.fdemo-bake-step { min-height: 190px; }
.fdemo-bake-text { margin: 0 0 14px; font-family: var(--bam-serif); font-size: 24px; line-height: 1.2; }
.fdemo-timer { margin-top: 16px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; border-radius: var(--bam-radius-md); background: var(--surface-subtle); }
.fdemo-timer svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.fdemo-ring-bg, .fdemo-ring { fill: none; stroke-width: 4; }
.fdemo-ring-bg { stroke: var(--border); }
.fdemo-ring { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .9s linear; }
.fdemo-timer-time { flex: 1 1 auto; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fdemo-timer.is-done .fdemo-timer-time { color: var(--success); }
.fdemo-done { min-height: 190px; margin: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--accent); font-family: var(--bam-serif); font-size: 24px; text-align: center; }
.fdemo-done .ti { font-size: 44px; }
.fdemo-nav { margin-top: 14px; display: flex; justify-content: space-between; gap: 10px; }

/* Cake converter: two tins, the factor and every ingredient before and after. */
.fdemo-tins { margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.fdemo-tins svg { flex: 1 1 auto; max-width: 240px; height: auto; overflow: visible; }
.fdemo-tin-from { fill: var(--surface-subtle); stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 4 4; }
.fdemo-tin-to { fill: color-mix(in srgb, var(--accent) 18%, var(--surface)); stroke: var(--accent); stroke-width: 2; transition: r var(--bam-duration) var(--bam-ease); }
.fdemo-tin-label { fill: var(--text); font-size: 12px; font-weight: 700; font-family: var(--bam-sans); }
.fdemo-factor { padding: 10px 14px; display: grid; border-radius: var(--bam-radius-md); background: var(--bam-gold-gradient); color: var(--bam-on-gold); text-align: center; }
.fdemo-factor span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fdemo-factor strong { font-size: 22px; }
.fdemo-ingredients { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.fdemo-ingredients li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-weight: 600; }
.fdemo-ing-bars { display: grid; gap: 3px; }
.fdemo-ing-bars span { height: 6px; width: 40%; border-radius: var(--bam-radius-pill); background: var(--border-strong); transition: width var(--bam-duration) var(--bam-ease); }
.fdemo-ing-bars .fdemo-ing-after { width: 68%; background: var(--accent); }
.fdemo-ing-values { font-size: 13px; white-space: nowrap; }
.fdemo-ing-values s { color: var(--text-subtle); font-weight: 400; }
.fdemo-ing-values strong { color: var(--accent); }
.fdemo-legend { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--text-subtle); font-size: 12px; }
.fdemo-legend .fdemo-key-after { margin-left: 8px; }

/* Baking passport: XP meter, stamps to collect and the week's streak. */
.fdemo-xp { margin-bottom: 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; }
.fdemo-xp-level { padding: 4px 10px; border-radius: var(--bam-radius-pill); background: var(--bam-gold-gradient); color: var(--bam-on-gold); font-size: 12px; font-weight: 700; }
.fdemo-xp-points { justify-self: end; color: var(--text-muted); font-size: 12px; }
.fdemo-xp-points strong { color: var(--text); font-size: 16px; }
.fdemo-meter { grid-column: 1 / -1; height: 10px; overflow: hidden; border-radius: var(--bam-radius-pill); background: var(--surface-subtle); }
.fdemo-meter span { height: 100%; width: 40%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--bam-rose-hi), var(--accent)); transition: width .5s var(--bam-ease); }
.fdemo-stamps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fdemo-stamp { padding: 8px 4px; display: grid; justify-items: center; gap: 6px; border: 0; border-radius: var(--bam-radius-md); background: transparent; color: var(--text-subtle); font-size: 11px; font-weight: 700; line-height: 1.2; text-align: center; }
.fdemo-stamp:hover { background: var(--surface-subtle); }
.fdemo-stamp-seal { width: 52px; height: 52px; display: grid; place-items: center; border: 2px dashed var(--border-strong); border-radius: 50%; font-size: 22px; }
.fdemo-stamp.is-owned { color: var(--text); }
.fdemo-stamp.is-owned .fdemo-stamp-seal { border: 2px solid var(--bam-rose-hi); background: var(--bam-gold-gradient); color: var(--bam-on-gold); box-shadow: var(--shadow-sm); }
.fdemo-stamp:nth-child(3n + 2).is-owned .fdemo-stamp-seal { background: linear-gradient(135deg, var(--success), color-mix(in srgb, var(--success) 60%, var(--accent))); border-color: color-mix(in srgb, var(--success) 40%, var(--surface)); }
.fdemo-stamp:nth-child(3n).is-owned .fdemo-stamp-seal { background: linear-gradient(135deg, var(--warning), var(--accent)); border-color: color-mix(in srgb, var(--warning) 40%, var(--surface)); }
@media (prefers-reduced-motion: no-preference) {
  .fdemo-stamp.is-new .fdemo-stamp-seal { animation: fdemo-stamp .45s var(--bam-ease); }
}
@keyframes fdemo-stamp { 0% { transform: scale(1.6) rotate(-14deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.fdemo-week { margin-top: 14px; padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border-top: 1px solid var(--border); }
.fdemo-week .fdemo-mini-label { margin: 0; }
.fdemo-week-days { display: flex; gap: 5px; }
.fdemo-week-days > span { width: 26px; height: 34px; display: grid; justify-items: center; align-content: center; border-radius: 8px; background: var(--surface-subtle); color: var(--text-subtle); font-size: 12px; }
.fdemo-week-days > span.is-on { background: color-mix(in srgb, var(--warning) 20%, var(--surface)); color: var(--warning); }
.fdemo-week-days small { font-size: 9px; font-weight: 700; color: var(--text-subtle); }
.fdemo-streak { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--warning); font-size: 13px; }

/* Pastry corners and the recipe book: filters and cards. */
.fdemo-feed { display: grid; gap: 10px; }
.fdemo-post { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: var(--bam-radius-md); }
.fdemo-post img { width: 84px; height: 84px; display: block; object-fit: cover; border-radius: var(--bam-radius-sm); }
.fdemo-post p { margin: 0; }
.fdemo-post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fdemo-avatar { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--bam-gold-gradient); color: var(--bam-on-gold); font-size: 11px; font-weight: 700; }
.fdemo-post-text { margin: 4px 0 !important; line-height: 1.35; }
.fdemo-post-actions { display: flex; align-items: center; gap: 14px; color: var(--text-subtle); font-size: 12px; }
.fdemo-like { padding: 4px 8px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: var(--bam-radius-pill); background: var(--surface); color: var(--text-muted); font-size: 12px; font-weight: 700; }
.fdemo-like[aria-pressed="true"] { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
@media (prefers-reduced-motion: no-preference) {
  .fdemo-like[aria-pressed="true"] .ti { animation: fdemo-pop .35s var(--bam-ease); }
}
@keyframes fdemo-pop { 50% { transform: scale(1.4); } }
.fdemo-count { padding: 0 10px; color: var(--text-subtle); font-size: 12px; }
.fdemo-recipes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fdemo-recipe { overflow: hidden; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface); }
.fdemo-recipe img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; }
.fdemo-recipe div { padding: 8px 10px 10px; display: grid; gap: 4px; }
.fdemo-recipe strong { font-size: 13px; line-height: 1.25; }
.fdemo-recipe span { color: var(--text-subtle); font-size: 11px; }

/* Game room: the daily question and a leaderboard. */
.fdemo-question { margin: 12px 0; font-family: var(--bam-serif); font-size: 22px; line-height: 1.2; }
.fdemo-answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fdemo-answer { min-height: 48px; padding: 8px; border: 1px solid var(--border-strong); border-radius: var(--bam-radius-md); background: var(--surface); font-weight: 700; }
.fdemo-answer:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.fdemo-answer.is-right { border-color: var(--success); background: color-mix(in srgb, var(--success) 16%, var(--surface)); color: var(--success); }
.fdemo-answer.is-wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.fdemo-feedback { min-height: 22px; margin: 10px 0; font-weight: 700; }
.fdemo-feedback.is-right { color: var(--success); }
.fdemo-feedback.is-wrong { color: var(--danger); }
.fdemo-board ol { margin: 0 0 10px; padding: 0; display: grid; gap: 6px; list-style: none; counter-reset: board; }
.fdemo-board li { counter-increment: board; display: grid; grid-template-columns: 18px 56px minmax(0, 1fr) 40px; align-items: center; gap: 8px; font-size: 13px; }
.fdemo-board li::before { content: counter(board); color: var(--text-subtle); font-weight: 700; }
.fdemo-board li strong { text-align: right; font-variant-numeric: tabular-nums; }
.fdemo-board-bar { height: 10px; border-radius: var(--bam-radius-pill); background: var(--surface-subtle); }
.fdemo-board-bar span { height: 100%; width: 0; display: block; border-radius: inherit; background: color-mix(in srgb, var(--accent) 45%, var(--surface)); transition: width .6s var(--bam-ease); }
.fdemo-board li:first-child .fdemo-board-bar span { background: linear-gradient(90deg, var(--warning), var(--accent)); }
.fdemo-board li.is-you { font-weight: 700; color: var(--accent); }
.fdemo-board li.is-you .fdemo-board-bar span { background: var(--bam-gold-gradient); }

/* Earn with baking: the link, KPI tiles and clicks per day. */
.fdemo-link { margin-bottom: 14px; padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: var(--bam-radius-md); background: var(--accent-soft); }
.fdemo-link .fdemo-mini-label { grid-column: 1 / -1; margin: 0; }
.fdemo-link code { overflow: hidden; color: var(--accent); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.fdemo-kpis { margin: 0 0 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fdemo-kpis div { padding: 10px 12px; border-radius: var(--bam-radius-md); background: var(--surface-subtle); }
.fdemo-kpis div:nth-child(2) { background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.fdemo-kpis div:nth-child(3) { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); }
.fdemo-kpis dt { color: var(--text-subtle); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.fdemo-kpis dd { margin: 2px 0 0; font-size: 22px; font-weight: 700; }

/* My business: orders with a status to move on, a price calculator with a donut, monthly analytics. */
.fdemo-orders { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.fdemo-orders li { padding: 10px 12px; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--bam-radius-md); }
.fdemo-order-when { color: var(--accent); font-size: 12px; font-weight: 700; }
.fdemo-order-what { display: grid; min-width: 0; }
.fdemo-order-what strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fdemo-order-what small { color: var(--text-subtle); }
.fdemo-status { min-width: 92px; padding: 5px 10px; border: 0; border-radius: var(--bam-radius-pill); font-size: 12px; font-weight: 700; }
.fdemo-status[data-status="0"] { background: var(--accent-soft); color: var(--accent); }
.fdemo-status[data-status="1"] { background: color-mix(in srgb, var(--warning) 18%, var(--surface)); color: var(--warning); }
.fdemo-status[data-status="2"] { background: color-mix(in srgb, var(--success) 16%, var(--surface)); color: var(--success); }
.fdemo-status[data-status="3"] { background: var(--surface-subtle); color: var(--text-subtle); }
.fdemo-price { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 18px; align-items: center; }
.fdemo-donut-wrap { position: relative; display: grid; gap: 10px; }
.fdemo-donut { width: 100%; max-width: 190px; transform: rotate(0deg); }
.fdemo-donut-bg, .fdemo-donut-part { fill: none; stroke-width: 6; }
.fdemo-donut-bg { stroke: var(--surface-subtle); }
.fdemo-donut-part { stroke-dasharray: 0 100; transition: stroke-dasharray var(--bam-duration) ease, stroke-dashoffset var(--bam-duration) ease; }
.fdemo-donut-part-0 { stroke: var(--accent); }
.fdemo-donut-part-1 { stroke: var(--bam-rose-hi); }
.fdemo-donut-part-2 { stroke: var(--success); }
.fdemo-donut-center { position: absolute; top: 0; left: 0; width: 100%; max-width: 190px; aspect-ratio: 1; display: grid; place-content: center; text-align: center; }
.fdemo-donut-center span { max-width: 96px; margin: 0 auto; color: var(--text-subtle); font-size: 9px; line-height: 1.2; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.fdemo-donut-center strong { font-size: 26px; }
.fdemo-donut-legend { margin: 0; padding: 0; display: grid; gap: 4px; list-style: none; font-size: 12px; }
.fdemo-donut-legend li { display: flex; align-items: center; gap: 6px; }
.fdemo-donut-legend strong { margin-left: auto; }

/* My online pastry shop: four templates and a phone / desktop preview. */
.fdemo-site-controls { margin-bottom: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.fdemo-site-controls .fdemo-segments { margin: 0; }
.fdemo-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.fdemo-swatch { padding: 5px 10px 5px 5px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: var(--bam-radius-pill); background: var(--surface); font-size: 12px; font-weight: 700; }
.fdemo-swatch span { width: 20px; height: 20px; border-radius: 50%; }
.fdemo-swatch.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.fdemo-swatch-0 span { background: linear-gradient(135deg, var(--bam-plum) 50%, var(--bam-rose-hi) 50%); }
.fdemo-swatch-1 span { background: linear-gradient(135deg, var(--bam-rose) 50%, var(--bam-blush) 50%); }
.fdemo-swatch-2 span { background: linear-gradient(135deg, var(--warning) 50%, var(--bam-berry) 50%); }
.fdemo-swatch-3 span { background: linear-gradient(135deg, var(--bam-petal) 50%, var(--success) 50%); }
.fdemo-site-preview { --site-bg: var(--bam-plum); --site-ink: var(--bam-blush); --site-accent: var(--bam-rose-hi); --site-font: var(--bam-serif);
  margin: 0 auto; overflow: hidden; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--site-bg); color: var(--site-ink); transition: max-width .35s var(--bam-ease), background .35s ease; max-width: 100%; }
.fdemo-site-preview.fdemo-template-1 { --site-bg: var(--bam-blush); --site-ink: var(--bam-plum); --site-accent: var(--bam-rose); --site-font: var(--bam-sans); }
.fdemo-site-preview.fdemo-template-2 { --site-bg: color-mix(in srgb, var(--warning) 14%, var(--bam-blush)); --site-ink: var(--bam-berry); --site-accent: var(--bam-berry); --site-font: var(--bam-serif); }
.fdemo-site-preview.fdemo-template-3 { --site-bg: var(--bam-petal); --site-ink: var(--bam-plum); --site-accent: var(--success); --site-font: var(--bam-sans); }
.fdemo-site-preview.is-phone { max-width: 230px; }
.fdemo-site-nav { padding: 10px 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; border-bottom: 1px solid color-mix(in srgb, var(--site-ink) 18%, transparent); font-size: 12px; }
.fdemo-site-nav strong { font-family: var(--site-font); }
.fdemo-site-nav span { opacity: .75; }
.fdemo-site-hero { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: center; }
.fdemo-site-preview.is-phone .fdemo-site-hero { grid-template-columns: 1fr; }
.fdemo-site-hero img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; border-radius: var(--bam-radius-sm); }
.fdemo-site-hero p { margin: 0 0 8px; font-size: 12px; opacity: .85; }
.fdemo-site-hero .fdemo-site-title { font-family: var(--site-font); font-size: 22px; line-height: 1.1; opacity: 1; }
.fdemo-site-cta { padding: 6px 12px; display: inline-flex; border-radius: var(--bam-radius-pill); background: var(--site-accent); color: var(--site-bg); font-size: 11px; font-weight: 700; }
.fdemo-site-grid { padding: 0 14px 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fdemo-site-grid img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; border-radius: 8px; }

/* A master's page: copy and colourful facts beside a large portrait in a rose ring. */
.master-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 56px; }
.master-hero-copy h1 { margin: 10px 0 14px; }
.master-facts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.master-facts div { --tint: var(--accent); border-color: color-mix(in srgb, var(--tint) 24%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 12%, var(--surface)), var(--surface)); }
.master-facts div:nth-child(2) { --tint: var(--success); }
.master-facts div:nth-child(3) { --tint: var(--warning); }
.master-facts div:nth-child(4) { --tint: var(--bam-rose-hi); }
.master-facts dd { font-family: var(--bam-serif); font-size: 26px; font-weight: 400; }
.master-portrait { position: relative; margin: 0; justify-self: center; width: min(100%, 400px); }
.master-portrait::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: conic-gradient(from 200deg, var(--bam-rose-hi), var(--accent), var(--warning), var(--success), var(--bam-rose-hi)); opacity: .55; }
.master-portrait img { position: relative; width: 100%; height: auto; aspect-ratio: 1; display: block; border: 8px solid var(--surface); border-radius: 50%; object-fit: cover; object-position: top; box-shadow: var(--shadow-card); }
.master-tile img { transition: transform .5s var(--bam-ease); }
.master-tile:hover img { transform: scale(1.04); }
.master-tile { transition: box-shadow var(--bam-duration) var(--bam-ease), transform var(--bam-duration) var(--bam-ease); }
.master-tile:hover, .ebook-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.ebook-tile { transition: box-shadow var(--bam-duration) var(--bam-ease), transform var(--bam-duration) var(--bam-ease); }

/* Rankings (masters, e-books): a metric switch, bars that resize and re-sort, every row a link (js/feature-demos.js). */
.ranking { padding: 28px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: linear-gradient(150deg, color-mix(in srgb, var(--bam-rose-hi) 16%, var(--surface)), var(--surface) 55%); box-shadow: var(--shadow-card); }
.ranking-head { margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ranking-head:not(:has(h2)) { justify-content: flex-end; }
.ranking + .course-grid { margin-top: 24px; }
.ranking-head h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; }
.ranking-head .fdemo-segments { margin: 0; }
.ranking-list { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; counter-reset: rank; }
.ranking-list li { counter-increment: rank; }
.ranking-list a { padding: 8px 10px; display: grid; grid-template-columns: 22px 40px minmax(120px, 1.1fr) minmax(0, 2fr) minmax(70px, auto); align-items: center; gap: 12px; border-radius: var(--bam-radius-md); color: var(--text); transition: background var(--bam-duration) ease; }
.ranking-list a::before { content: counter(rank); color: var(--text-subtle); font-size: 13px; font-weight: 700; text-align: center; }
.ranking-list a:not(:has(img)) { grid-template-columns: 22px minmax(120px, 1.1fr) minmax(0, 2fr) minmax(70px, auto); }
.ranking-list a:hover { background: var(--surface-hover); }
.ranking-list img { width: 40px; height: 40px; display: block; border-radius: 50%; object-fit: cover; object-position: top; }
.ranking-label { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ranking-track { height: 12px; border-radius: var(--bam-radius-pill); background: var(--surface-subtle); }
.ranking-fill { height: 100%; width: 0; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--bam-rose-hi), var(--accent)); transition: width .5s var(--bam-ease); }
.ranking-list li:first-child .ranking-fill { background: linear-gradient(90deg, var(--warning), var(--accent)); }
.ranking-value { color: var(--accent); font-size: 14px; text-align: right; white-space: nowrap; }
.ranking:not(.is-live) .ranking-track { display: none; }

/* An e-book's recipes to explore: search, difficulty chips, a clickable difficulty chart and the list with dots and times. */
.ebook-page-cover img { transition: transform .25s var(--bam-ease); will-change: transform; }
.recipe-explorer-tools { margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.recipe-explorer-tools .fdemo-segments { margin: 0; }
.recipe-search { flex: 1 1 240px; max-width: 360px; min-height: 44px; padding: 0 16px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); border-radius: var(--bam-radius-pill); background: var(--surface); color: var(--text-subtle); }
.recipe-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.recipe-search input { flex: 1 1 auto; min-width: 0; min-height: 0; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; box-shadow: none; }
.recipe-levels { margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: linear-gradient(150deg, color-mix(in srgb, var(--warning) 10%, var(--surface)), var(--surface) 60%); }
.recipe-levels-bars { height: 150px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 12px; }
.recipe-level { height: 100%; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; border: 0; border-radius: var(--bam-radius-sm); background: transparent; cursor: pointer; font: inherit; color: var(--text); }
.recipe-level:disabled { cursor: default; opacity: .4; }
.recipe-level:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.recipe-level-count { font-weight: 700; font-size: 13px; }
.recipe-level-bar { width: 100%; height: 30%; min-height: 4px; border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--accent) 35%, var(--surface)); transition: height .5s var(--bam-ease), background var(--bam-duration) ease; }
.recipe-level:nth-child(1) .recipe-level-bar { background: color-mix(in srgb, var(--success) 45%, var(--surface)); }
.recipe-level:nth-child(2) .recipe-level-bar { background: color-mix(in srgb, var(--warning) 50%, var(--surface)); }
.recipe-level:nth-child(3) .recipe-level-bar { background: var(--bam-rose-hi); }
.recipe-level:nth-child(4) .recipe-level-bar { background: color-mix(in srgb, var(--accent) 75%, var(--surface)); }
.recipe-level:nth-child(5) .recipe-level-bar { background: var(--bam-rose-lo); }
.recipe-level:hover .recipe-level-bar, .recipe-level.is-on .recipe-level-bar { box-shadow: 0 0 0 3px var(--accent-soft); filter: saturate(1.3); }
.recipe-level-dots, .recipe-dots { color: var(--accent); font-size: 9px; letter-spacing: 1px; }
.recipe-explorer-count { margin: 0 0 12px; color: var(--text-subtle); font-size: 13px; font-weight: 600; }
.recipe-explorer-none { margin: 0; color: var(--text-muted); }
.recipe-explorer-list li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.recipe-explorer-list li[hidden] { display: none; }
.recipe-meta { display: inline-flex; align-items: center; gap: 10px; color: var(--text-subtle); font-size: 12px; white-space: nowrap; }
.recipe-dots-1, .recipe-dots-2 { color: var(--success); }
.recipe-dots-5 { color: var(--bam-rose-lo); }
.recipe-explorer:not(.is-live) .recipe-levels { display: none; }

.ebook-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ebook-tile { padding: 20px; display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 18px; }
.ebook-cover { width: 100%; height: auto; display: block; border-radius: var(--bam-radius-sm); background: var(--surface-subtle); box-shadow: var(--shadow-card); }
.ebook-page-cover { margin: 0; max-width: 360px; justify-self: center; }
.ebook-recipe-note { margin: -12px 0 20px; }
.ebook-recipe-list { margin: 0; padding: 0 0 0 1.4em; columns: 3 220px; column-gap: 32px; line-height: 1.5; }
.ebook-recipe-list li { margin: 0 0 8px; break-inside: avoid; }
.ebook-recipe-list a { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ebook-recipe-list a:hover { text-decoration-thickness: 2px; }
.ebook-recipe-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--bam-radius-sm); }

@media (max-width: 900px) {
  .master-grid, .feature-grid, .ebook-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .master-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-hero-grid, .feature-how-grid, .master-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .master-portrait { order: -1; width: min(70%, 300px); }
  .feature-points, .feature-points:has(li:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-stage { padding: 64px 0 20px 12%; }
  .feature-stage-photo { width: 70%; height: 260px; }
  .feature-how-photo { max-width: 420px; }
  .course-page-grid { grid-template-columns: 1fr; gap: 28px; }
  .course-page-trailer { order: -1; }
  .course-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .course-review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .course-page-hero { padding-top: 104px; }
  .course-facts, .course-lesson-list { grid-template-columns: 1fr; }
  .course-teacher-card { padding: 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .course-teacher-card img { width: 112px; height: 112px; }
  .master-grid, .feature-grid, .ebook-grid, .master-grid-compact { grid-template-columns: 1fr; }
  .feature-points, .feature-points:has(li:nth-child(5)) { grid-template-columns: 1fr; }
  .feature-stage { padding: 120px 0 0 0; }
  .feature-stage-photo { width: 100%; height: 200px; }
  .feature-stage::after { display: none; }
  .master-facts { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
  .master-facts div { padding: 10px 12px; }
  .master-facts dd { font-size: 20px; }
  .ranking { padding: 18px 14px; }
  .ranking-list a, .ranking-list a:not(:has(img)) { grid-template-columns: 18px minmax(0, 1fr) auto; gap: 4px 10px; }
  .ranking-list img { display: none; }
  .ranking-track { grid-column: 2 / -1; order: 3; }
  .recipe-levels-bars { height: 120px; gap: 6px; }
  .feature-stage .fdemo { margin: 0 6px; }
  .feature-stage-hint { right: 12px; }
  .fdemo-body { padding: 14px; }
  .fdemo-recipes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fdemo-answers { grid-template-columns: 1fr; }
  .fdemo-price { grid-template-columns: 1fr; }
  .fdemo-donut-wrap { grid-template-columns: 150px minmax(0, 1fr); align-items: center; }
  .fdemo-donut-center { max-width: 150px; }
  .fdemo-donut-center strong { font-size: 20px; }
  .fdemo-stamp-seal { width: 44px; height: 44px; font-size: 19px; }
  .fdemo-kpis dd { font-size: 18px; }
  .fdemo-ingredients li { grid-template-columns: 62px minmax(0, 1fr) auto; }
  .fdemo-orders li { grid-template-columns: minmax(0, 1fr) auto; }
  .fdemo-order-when { grid-column: 1 / -1; }
  .feature-steps::before { left: 37px; }
}

/* Free calculators (src/tool-pages.js): the form beside its live result, one card per tool. */
.tool-card { margin-top: 32px; padding: 24px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--bam-panel-sheen), var(--surface); box-shadow: var(--shadow-card); }
.tool-card [hidden] { display: none !important; }
.tool-form { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.tool-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.tool-pair .tool-form { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tool-inputs h2 { margin: 0 0 14px; font-size: 22px; line-height: 1.2; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tool-field { display: grid; gap: 6px; align-content: start; color: var(--text); font-size: 14px; font-weight: 600; }
.tool-field input, .tool-field select, .tool-line input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--bam-radius-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 400; }
.tool-field input:focus-visible, .tool-field select:focus-visible, .tool-line input:focus-visible, .tool-icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tool-lines { display: grid; gap: 8px; margin: 0 0 20px; padding: 0; border: 0; }
.tool-lines legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
.tool-lines [data-lines] { display: grid; gap: 8px; }
.tool-line { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.tool-line-head { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.tool-lines [data-add-line] { justify-self: start; }
.tool-icon-button { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--bam-radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; }
.tool-icon-button:hover { border-color: var(--border-strong); color: var(--text); }
.tool-output { position: sticky; top: 96px; display: grid; gap: 16px; padding: 20px; border-radius: var(--bam-radius-md); background: var(--surface-subtle); }
.tool-output dl { display: grid; gap: 8px; margin: 0; }
.tool-result { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
.tool-result dt { color: var(--text-muted); }
.tool-result dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.tool-result.is-main { display: grid; gap: 4px; border-bottom-color: var(--border-strong); }
.tool-result.is-main dd { color: var(--accent); font-family: var(--bam-serif); font-size: clamp(28px, 4vw, 40px); line-height: 1.1; text-align: left; }
.tool-error { margin: 0; color: var(--danger); font-size: 14px; }
/* "Shrani v Moje recepte": saving needs an account (public/academy/js/tools.js) */
.tool-save { display: grid; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--border-strong); }
.tool-save p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.tool-save p strong { display: block; color: var(--text); font-size: 15px; }
.tool-save .button { justify-self: start; }
.tool-note { margin: 12px 0 0; color: var(--text-muted); font-size: 13px; }
.tool-app-card { max-width: 760px; margin: 0 auto; padding: 32px; border-radius: var(--bam-radius-lg); background: var(--accent-soft); text-align: center; }
.tool-app-card h2 { margin: 0 0 12px; }
.tool-app-card > p { color: var(--text-muted); }
@media (max-width: 860px) {
  .tool-form, .tool-pair { grid-template-columns: minmax(0, 1fr); }
  .tool-output { position: static; }
}
@media (max-width: 560px) {
  .tool-card { padding: 16px; }
  .tool-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .tool-line input[name="name"] { grid-column: 1 / -1; }
  /* The column labels stay above the number fields (grams, price per kg); only the name label, whose field is full width, is hidden. */
  .tool-line-head > :first-child { display: none; }
  .tool-app-card { padding: 24px 16px; }
}

/* Guides (src/guide-pages.js): a long read with a contents rail, answer-first sections, photos, tables and bar charts. */
.guide-header { max-width: 860px; }
.guide-header h1 { margin: 14px 0 18px; }
.guide-lead { max-width: 760px; }
.guide-meta { margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text-subtle); font-size: 14px; font-weight: 600; }
.guide-meta span { display: inline-flex; align-items: center; gap: 6px; }
.guide-meta i { color: var(--accent); }
.guide-figure { margin: 0 0 28px; }
.guide-figure img { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface-subtle); object-fit: cover; }
.guide-header + .guide-figure img { max-height: 520px; aspect-ratio: 16 / 9; }
.guide-section .guide-figure img { aspect-ratio: 3 / 2; }
.guide-section .guide-figure.is-small { float: right; width: 46%; margin: 6px 0 16px 24px; }
.guide-section::after { content: ""; display: table; clear: both; }
.guide-section :is(h3, .guide-table-wrap, .guide-chart, .guide-callout) { clear: both; }
.guide-figure figcaption { margin-top: 8px; color: var(--text-subtle); font-size: 13px; line-height: 1.5; }

.guide-layout { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 760px); justify-content: space-between; align-items: start; gap: 56px; }
.guide-toc { position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow: auto; padding: 18px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); }
.guide-toc summary { margin: -11px 0; padding: 11px 0; cursor: pointer; color: var(--text-subtle); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.guide-toc ol { margin: 12px 0 0; padding: 0 0 0 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.4; }
.guide-toc a { color: var(--text-muted); }
.guide-toc a:hover { color: var(--accent); }
.guide-body { min-width: 0; font-size: 17px; line-height: 1.75; }
.guide-body p { margin: 0 0 16px; }
.guide-body a:not(.button) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.guide-body :is(a, summary):focus-visible, .guide-toc :is(a, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.guide-section { margin: 0 0 48px; scroll-margin-top: 96px; }
.guide-section h2 { margin: 0 0 16px; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.12; scroll-margin-top: 96px; }
.guide-section h3 { margin: 28px 0 10px; font-size: 23px; line-height: 1.2; }
.guide-answer { padding: 14px 18px; border-left: 4px solid var(--accent); border-radius: 0 var(--bam-radius-md) var(--bam-radius-md) 0; background: var(--accent-soft); color: var(--text); font-weight: 600; }
.guide-list { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 8px; }
.guide-list li::marker { color: var(--accent); }

.guide-summary { margin: 0 0 24px; padding: 24px; border: 1px solid var(--bam-gold-line); border-radius: var(--bam-radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.guide-summary h2 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 26px; }
.guide-summary h2 i { color: var(--accent); }
.guide-summary-text { font-weight: 600; }
.guide-summary .guide-list { margin: 0; }
.guide-facts { margin: 0 0 48px; }
.guide-facts dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.guide-facts div { padding: 16px; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface-subtle); }
.guide-facts dd { margin: 0; color: var(--accent); font-family: var(--bam-serif); font-size: 30px; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.guide-facts dt { margin-top: 6px; color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.guide-facts div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }

.guide-table-wrap { margin: 8px 0 24px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface); }
.guide-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.guide-table caption { padding: 12px 16px 0; color: var(--text-subtle); font-size: 13px; font-weight: 700; text-align: left; }
.guide-table th, .guide-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.guide-table thead th { color: var(--text-subtle); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.guide-table tbody th { font-weight: 700; }
.guide-table tbody tr:last-child > * { border-bottom: 0; }

.guide-chart { margin: 8px 0 28px; padding: 20px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); }
.guide-chart-title { margin: 0 0 14px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; line-height: 1.4; }
.guide-chart-title i { color: var(--accent); }
.guide-chart-rows { margin: 0; padding: 0; display: grid; gap: 12px; list-style: none; }
.guide-chart-row { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 6.5em; align-items: center; gap: 12px; font-size: 14px; line-height: 1.35; }
.guide-chart-bar { width: 100%; height: 14px; display: block; overflow: hidden; border-radius: var(--bam-radius-pill); }
.guide-chart-track { fill: var(--surface-subtle); }
.guide-chart-fill { fill: var(--accent); }
.guide-chart-fill.tone-1 { fill: color-mix(in srgb, var(--accent) 78%, var(--surface)); }
.guide-chart-fill.tone-2 { fill: color-mix(in srgb, var(--accent) 60%, var(--surface)); }
.guide-chart-fill.tone-3 { fill: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.guide-chart-row.is-highlight .guide-chart-fill { fill: var(--accent); }
.guide-chart-row.is-highlight .guide-chart-label { font-weight: 700; }
.guide-chart-value { text-align: right; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.guide-chart-axis, .guide-chart-note { margin: 12px 0 0 !important; color: var(--text-subtle); font-size: 13px; line-height: 1.5; }

.guide-callout { margin: 8px 0 24px; padding: 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface-subtle); font-size: 16px; line-height: 1.6; }
.guide-callout > i { color: var(--accent); font-size: 22px; line-height: 1.2; }
.guide-callout p { margin: 0 0 8px; }
.guide-callout p:last-child { margin: 0; }
.guide-callout-title { font-weight: 700; }
.guide-callout.is-warning { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); background: color-mix(in srgb, var(--warning) 9%, var(--surface)); }
.guide-callout.is-warning > i { color: var(--warning); }
.guide-callout.is-tip { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.guide-callout.is-tip > i { color: var(--success); }

.guide-steps { margin: 0; padding: 0; display: grid; gap: 10px; list-style: none; counter-reset: none; }
.guide-steps li { padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 14px; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface); font-size: 16px; line-height: 1.55; }
.guide-step-number { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }
.guide-glossary dl { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--border); }
.guide-glossary dl > div { padding: 12px 0; display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 16px; border-bottom: 1px solid var(--border); font-size: 15px; line-height: 1.55; }
.guide-glossary dt { font-weight: 700; }
.guide-glossary dd { margin: 0; color: var(--text-muted); }
.guide-sources ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 15px; line-height: 1.5; }
.guide-disclaimer { padding: 14px 16px; border-radius: var(--bam-radius-md); background: var(--surface-subtle); color: var(--text-muted); font-size: 14px !important; line-height: 1.55; }
@media (max-width: 1080px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .guide-toc { position: static; max-height: none; }
  .guide-toc details:not([open]) ol { display: none; }
}
@media (max-width: 560px) {
  .guide-body { font-size: 16px; }
  .guide-summary, .guide-chart { padding: 16px; }
  .guide-section .guide-figure.is-small { float: none; width: auto; margin: 0 0 24px; }
  .guide-chart-row { grid-template-columns: minmax(0, 1fr) minmax(0, max-content); gap: 4px 10px; }
  .guide-chart-bar { grid-column: 1 / -1; grid-row: 2; }
  .guide-glossary dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .guide-table { font-size: 14px; }
  .guide-table th, .guide-table td { padding: 10px 12px; }
  /* Phones: wide tables scroll sideways instead of crushing each cell to a few letters, and a soft edge shadow
     shows there is more to the right (the shadows are covered by the scrolling background at either end). */
  .guide-table :is(th, td) { min-width: 124px; }
  .guide-table :is(th, td):first-child { min-width: 108px; }
  .guide-table-wrap { background:
    linear-gradient(to right, var(--surface) 40%, transparent) left center / 28px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 40%, transparent) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--text) 16%, transparent), transparent) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--text) 16%, transparent), transparent) right center / 12px 100% no-repeat scroll,
    var(--surface); }
  .guide-table caption { position: sticky; left: 0; }
  /* Key figures keep a value and its unit together ("2,60–5,50 €", "10 mg/kg"). */
  .guide-facts dd { font-size: 24px; text-wrap: balance; }
  .hub-facts div { grid-template-columns: max-content minmax(0, 1fr); }
  .hub-facts dd { white-space: nowrap; }
  .hub-bars li { grid-template-columns: minmax(0, 1fr) 4.6em; gap: 4px 8px; }
  .hub-bars li .hub-bar { grid-column: 1 / -1; grid-row: 2; }
  .course-page-cta { padding-top: 40px; padding-bottom: 40px; }
}


/* Guides & articles (src/guide-pages.js): the hub's topic tree and the topics' card grids. */
.guide-hub { padding-bottom: 24px; }
.guide-hub-topic { padding-top: 32px; padding-bottom: 32px; scroll-margin-top: 96px; }
.guide-hub-topic h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.guide-hub-topic h2 .ti { color: var(--accent); }
/* Hub cards (2026-11-09): a photo, a worked example as a small chart and a "did you know", the whole card is the link. */
.hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.hub-card { position: relative; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--bam-panel-sheen), var(--surface); transition: transform var(--bam-duration) var(--bam-ease), box-shadow var(--bam-duration) var(--bam-ease), border-color var(--bam-duration) var(--bam-ease); }
.hub-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.hub-card:has(.course-card-link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.hub-card .course-card-link { color: inherit; }
.hub-card .course-card-link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.hub-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-subtle); }
.hub-card-media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .6s var(--bam-ease), opacity .45s var(--bam-ease); }
.hub-card:hover .hub-card-media > img, .hub-card:hover .hub-mosaic img { transform: scale(1.06); }
.hub-card-icon { position: absolute; left: 14px; bottom: 14px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--bam-radius-md); background: var(--surface); color: var(--accent); font-size: 22px; box-shadow: var(--shadow-card); }
.hub-card-badge { position: absolute; top: 14px; left: 14px; background: var(--surface); }
.hub-card-blank { width: 100%; height: 100%; display: grid; place-items: center; color: var(--accent); font-size: 56px; background: var(--accent-soft); }
.hub-mosaic { width: 100%; height: 100%; display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; }
.hub-mosaic img:first-child { grid-row: span 2; }
.hub-mosaic.is-portrait img { object-position: top; }
.hub-covers { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 18px 20px 10px; background: var(--accent-soft); }
.hub-covers img { width: 30%; height: auto; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: var(--shadow-card); transition: transform var(--bam-duration) var(--bam-ease); }
.hub-covers img:nth-child(1) { transform: rotate(-7deg) translateX(14px); }
.hub-covers img:nth-child(2) { position: relative; z-index: 1; transform: translateY(-6px); }
.hub-covers img:nth-child(3) { transform: rotate(7deg) translateX(-14px); }
.hub-card:hover .hub-covers img:nth-child(1) { transform: rotate(-12deg) translateX(-2px); }
.hub-card:hover .hub-covers img:nth-child(3) { transform: rotate(12deg) translateX(2px); }
.hub-pair { position: relative; width: 100%; height: 100%; display: block; }
.hub-pair img { position: absolute; inset: 0; }
.hub-pair .is-after { opacity: 0; }
.hub-card:hover .hub-pair .is-after, .hub-card:focus-within .hub-pair .is-after { opacity: 1; }
.hub-pair-tag { position: absolute; top: 14px; right: 14px; transition: opacity var(--bam-duration) var(--bam-ease); }
.hub-pair-tag.is-after-tag { opacity: 0; }
.hub-card:hover .hub-pair-tag, .hub-card:focus-within .hub-pair-tag { opacity: 0; }
.hub-card:hover .hub-pair-tag.is-after-tag, .hub-card:focus-within .hub-pair-tag.is-after-tag { opacity: 1; }
.hub-card-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; }
.hub-card h3 { margin: 0; font-size: 21px; line-height: 1.2; }
.hub-card-text { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.hub-card-go { margin-top: auto; align-self: flex-end; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--bam-radius-pill); background: var(--accent-soft); color: var(--accent); font-size: 18px; transition: transform var(--bam-duration) var(--bam-ease), background var(--bam-duration) var(--bam-ease), color var(--bam-duration) var(--bam-ease); }
.hub-card:hover .hub-card-go { transform: translateX(4px); background: var(--accent); color: var(--surface); }
.hub-card-fact { margin: 0; display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--bam-radius-md); background: var(--accent-soft); color: var(--text); font-size: 13px; line-height: 1.5; }
.hub-card-fact .ti { flex: 0 0 auto; margin-top: 1px; color: var(--accent); font-size: 18px; }
.hub-card-fact strong { color: var(--accent); }
.hub-viz { margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface); }
.hub-viz-title { margin: 0 0 10px; color: var(--text-muted); font-size: 12px; font-weight: 600; line-height: 1.4; }
.hub-viz-title > span:first-child { margin-right: 4px; padding: 2px 8px; border-radius: var(--bam-radius-pill); background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.hub-viz-total strong { float: right; color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.hub-bars { margin: 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.hub-bars li { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 4.6em; align-items: center; gap: 8px; font-size: 12px; line-height: 1.3; }
.hub-bar-label { min-width: 0; color: var(--text-muted); overflow-wrap: anywhere; }
.hub-bars li.is-highlight .hub-bar-label { color: var(--text); font-weight: 700; }
.hub-bar-value { text-align: right; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hub-bar { width: 100%; height: 10px; display: block; overflow: hidden; border-radius: var(--bam-radius-pill); }
.hub-bar-stack { height: 14px; }
.hub-bar-track { fill: var(--surface-subtle); }
.hub-bar-fill { fill: color-mix(in srgb, var(--accent) 55%, var(--surface)); transform-box: fill-box; transform-origin: left center; transition: fill var(--bam-duration) var(--bam-ease); }
.hub-bars li.is-highlight .hub-bar-fill, .hub-card:hover .hub-bars .hub-bar-fill { fill: var(--accent); }
.hub-bar-stack .tone-0, .hub-dot.tone-0 { fill: var(--accent); background: var(--accent); }
.hub-bar-stack .tone-1, .hub-dot.tone-1 { fill: color-mix(in srgb, var(--accent) 70%, var(--surface)); background: color-mix(in srgb, var(--accent) 70%, var(--surface)); }
.hub-bar-stack .tone-2, .hub-dot.tone-2 { fill: color-mix(in srgb, var(--accent) 45%, var(--surface)); background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.hub-bar-stack .tone-3, .hub-dot.tone-3 { fill: color-mix(in srgb, var(--accent) 25%, var(--surface)); background: color-mix(in srgb, var(--accent) 25%, var(--surface)); }
.hub-legend { margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; list-style: none; color: var(--text-muted); font-size: 12px; line-height: 1.35; }
.hub-legend-rows { grid-template-columns: 1fr; }
.hub-legend li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hub-legend strong { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hub-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: var(--bam-radius-pill); }
.hub-scale { height: 14px; }
.hub-scale-step { transform-box: fill-box; transform-origin: left center; }
.hub-scale-step.step-0, .hub-dot.step-0 { fill: color-mix(in srgb, var(--accent) 16%, var(--surface)); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.hub-scale-step.step-1, .hub-dot.step-1 { fill: color-mix(in srgb, var(--accent) 28%, var(--surface)); background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.hub-scale-step.step-2, .hub-dot.step-2 { fill: color-mix(in srgb, var(--accent) 40%, var(--surface)); background: color-mix(in srgb, var(--accent) 40%, var(--surface)); }
.hub-scale-step.step-3, .hub-dot.step-3 { fill: color-mix(in srgb, var(--accent) 54%, var(--surface)); background: color-mix(in srgb, var(--accent) 54%, var(--surface)); }
.hub-scale-step.step-4, .hub-dot.step-4 { fill: color-mix(in srgb, var(--accent) 68%, var(--surface)); background: color-mix(in srgb, var(--accent) 68%, var(--surface)); }
.hub-scale-step.step-5, .hub-dot.step-5 { fill: color-mix(in srgb, var(--accent) 84%, var(--surface)); background: color-mix(in srgb, var(--accent) 84%, var(--surface)); }
.hub-scale-step.step-6, .hub-dot.step-6 { fill: var(--accent); background: var(--accent); }
.hub-scale-ends { margin: 4px 0 0; display: flex; justify-content: space-between; color: var(--text-subtle); font-size: 11px; font-variant-numeric: tabular-nums; }
.hub-viz-drawing { display: flex; align-items: center; gap: 14px; }
.hub-drawing { flex: 0 0 96px; transition: transform .6s var(--bam-ease); }
.hub-card:hover .hub-drawing { transform: rotate(30deg); }
.hub-viz-drawing .hub-viz-title { margin: 0; }
.hub-facts { margin: 0; display: grid; gap: 8px; }
.hub-facts div { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface); }
.hub-facts dd { grid-column: 1; grid-row: 1; margin: 0; color: var(--accent); font-size: 18px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hub-facts dt { grid-column: 2; grid-row: 1; }
.hub-facts dt { color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.hub-avatars { margin: 0; padding: 0 0 0 10px; display: flex; list-style: none; }
.hub-avatars li { margin-left: -10px; transition: transform var(--bam-duration) var(--bam-ease); }
.hub-avatars img { width: 40px; height: 40px; display: block; border: 2px solid var(--surface); border-radius: var(--bam-radius-pill); object-fit: cover; object-position: top; background: var(--surface-subtle); }
.hub-card:hover .hub-avatars li { transform: translateX(6px); }
.hub-card:hover .hub-avatars li:first-child { transform: none; }
/* The bars grow in as a card scrolls into view where the browser can tie an animation to scrolling. */
@keyframes hub-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hub-bar-fill, .hub-scale-step { animation: hub-grow linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .hub-card, .hub-card-media img, .hub-card-go, .hub-drawing, .hub-avatars li, .hub-covers img, .hub-pair-tag { transition: none; }
  .hub-card:hover, .hub-card:hover .hub-card-media > img, .hub-card:hover .hub-mosaic img, .hub-card:hover .hub-drawing, .hub-card:hover .hub-card-go, .hub-card:hover .hub-avatars li { transform: none; }
}
@media (max-width: 980px) {
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Under an article there are only a few cards: they sit in the middle instead of leaving an empty column. */
.course-page-more:has(.hub-grid-related) > h2 { text-align: center; }
.hub-grid.hub-grid-related { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 380px)); justify-content: center; }
@media (max-width: 640px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card-body { padding: 18px; }
}

/* Technical calculators: result tables (stages, baker's percentages), short ingredient lines and the cutting plan drawing. */
.tool-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 14px; }
.tool-table caption { margin-bottom: 8px; font-weight: 700; text-align: left; }
.tool-table th, .tool-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tool-table thead th { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.tool-table td { font-variant-numeric: tabular-nums; }
.tool-output .tool-table { margin-top: 0; }
.tool-line.tool-line-short { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 44px; }
.tool-cut-drawing { max-width: 280px; margin: 20px auto 0; }
.tool-cut-svg { display: block; width: 100%; height: auto; }
.tool-cut-cake { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.tool-cut-line { fill: none; stroke: var(--accent); stroke-width: 1.5; }
@media (max-width: 560px) {
  .tool-line.tool-line-short { grid-template-columns: minmax(0, 1fr) 44px; }
  .tool-table { font-size: 13px; }
}

/* Public recipe pages (src/recipe-pages.js) */
.recipe-photo { margin: 0; }
.recipe-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; object-fit: cover; border-radius: var(--bam-radius-lg); background: var(--surface-subtle); box-shadow: var(--shadow-card); }
.recipe-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); align-items: start; gap: 48px; }
.recipe-ingredients { padding: 24px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); }
.recipe-body h2 { margin: 0 0 16px; font-size: 26px; }
.recipe-group-title { margin: 20px 0 10px; font-size: 16px; }
.recipe-ingredient-list { margin: 0; padding: 0; list-style: none; }
.recipe-ingredient-list li { padding: 9px 0; border-bottom: 1px solid var(--border); line-height: 1.45; }
.recipe-ingredient-list li:last-child { border-bottom: 0; }
.recipe-step-list { margin: 0 0 8px; padding-left: 26px; display: grid; gap: 14px; line-height: 1.6; }
.recipe-step-list li::marker { color: var(--accent); font-weight: 700; }
.recipe-app h2 { margin: 0 0 10px; }
.recipe-app p { max-width: 640px; margin: 0 auto 20px; }
.recipe-tips { margin-top: 28px; padding: 22px 24px; border: 1px solid var(--bam-gold-line); border-radius: var(--bam-radius-lg); background: var(--accent-soft); }
.recipe-tips h2 { margin: 0 0 12px; display: flex; align-items: center; gap: 8px; font-size: 22px; }
.recipe-tips h2 i { color: var(--accent); }
.recipe-tips ul { margin: 0; padding: 0; display: grid; gap: 14px; list-style: none; }
.recipe-tips p { margin: 0 0 4px; line-height: 1.55; }
.recipe-tips small { color: var(--text-muted); font-size: 13px; }
/* "Prenesi PDF": a small A4 sheet with the recipe's title and first ingredients (recipe-print.js opens the print dialog). */
.recipe-pdf { width: 100%; max-width: 460px; display: flex; align-items: center; gap: 16px; padding: 10px 18px 10px 10px; border: 1px solid var(--border-strong); border-radius: var(--bam-radius-lg); background: var(--accent-soft); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--bam-duration) ease; }
.recipe-pdf[hidden] { display: none; }
.recipe-pdf:hover { border-color: var(--accent); }
.recipe-pdf:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.recipe-pdf-sheet { position: relative; flex: none; width: 58px; height: 78px; padding: 7px 6px; display: grid; align-content: start; gap: 4px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--bam-radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform var(--bam-duration) var(--bam-ease); }
.recipe-pdf-title { overflow: hidden; font-family: var(--bam-serif); font-size: 7px; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis; }
.recipe-pdf-line { display: flex; align-items: center; gap: 2px; overflow: hidden; color: var(--text-muted); font-size: 4.5px; line-height: 1.2; white-space: nowrap; }
.recipe-pdf-line i { flex: none; width: 4px; height: 4px; border: 1px solid var(--border-strong); border-radius: 1px; }
.recipe-pdf-tag { position: absolute; right: 4px; bottom: 4px; padding: 1px 4px; border-radius: 3px; background: var(--accent); color: var(--bam-on-rose); font-size: 7px; font-weight: 800; letter-spacing: .04em; }
.recipe-pdf-copy { display: grid; gap: 3px; }
.recipe-pdf-copy strong { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.recipe-pdf-copy strong i { color: var(--accent); font-size: 22px; }
.recipe-pdf-copy small { color: var(--text-muted); font-size: 13px; line-height: 1.4; }
@media (prefers-reduced-motion: no-preference) {
  .recipe-pdf:hover .recipe-pdf-sheet, .recipe-pdf:focus-visible .recipe-pdf-sheet { transform: rotate(-4deg) translateY(-2px); }
}
/* "Poglej video recept" under the main photo, on the right. */
.recipe-photo-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
@media (max-width: 900px) {
  .recipe-body { grid-template-columns: 1fr; gap: 28px; }
  .recipe-photo { order: -1; }
  /* On a phone "Prenesi PDF" comes right under the title, before the long intro (asked by Andraž on 2026-11-22). */
  .recipe-copy { display: flex; flex-direction: column; align-items: flex-start; }
  .recipe-copy h1 { margin-bottom: 16px; }
  .recipe-copy .recipe-pdf { order: 1; margin-bottom: 24px; }
  .recipe-copy .course-page-lead, .recipe-copy .course-facts { order: 2; align-self: stretch; }
}
/* The A4 sheet from "Prenesi PDF": logo, title, facts, photo, ingredients, steps and tips; nothing else. */
@media print {
  @page { size: A4; margin: 14mm; }
  body.courses-page { background: var(--surface); color: var(--text); }
  .courses-page .skip-link, .courses-page .landing-header nav, .courses-page .header-actions, .courses-page .landing-footer,
  .courses-page .course-crumbs, .courses-page .recipe-pdf, .courses-page .recipe-photo-actions, .courses-page .recipe-app,
  .courses-page .course-page-faq, .courses-page .course-page-more, .courses-page .bam-consent { display: none !important; }
  .courses-page .landing-header { position: static; left: auto; width: auto; min-height: 0; margin: 0 0 12px; padding: 0 0 8px; transform: none; border: 0; border-bottom: 1px solid var(--bam-gold-line); border-radius: 0; background: none; box-shadow: none; }
  .courses-page .courses-main { padding-top: 0; }
  .courses-page .section { padding: 0; margin: 0 0 16px; }
  .courses-page .course-page-grid { grid-template-columns: 1.3fr 1fr; gap: 20px; }
  .courses-page .course-page-lead { font-size: 12px; }
  .courses-page .course-facts { margin: 0; grid-template-columns: 1fr 1fr; gap: 6px; }
  .courses-page .course-facts div { padding: 6px 8px; }
  .courses-page .recipe-photo img { box-shadow: none; }
  .courses-page .recipe-body { grid-template-columns: 1fr 1.6fr; gap: 20px; }
  .courses-page .recipe-ingredients { padding: 12px; }
  .courses-page .recipe-ingredient-list li, .courses-page .recipe-step-list li { break-inside: avoid; font-size: 12px; }
  .courses-page .recipe-tips { break-inside: avoid; padding: 12px 14px; }
  .courses-page .recipe-tips p { font-size: 12px; }
}

/* The free photo lesson (src/photo-course-page.js): BAM before/after pair, the diagram (same shapes as the app), the lesson list. */
.photo-pair { margin: 24px 0 10px; max-width: 720px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-pair-item { position: relative; margin: 0; overflow: hidden; border-radius: var(--bam-radius-lg); background: var(--surface-subtle); }
.photo-pair-item img { width: 100%; height: auto; display: block; }
.photo-pair-item figcaption { position: absolute; left: 12px; top: 12px; }
.photo-pair-tag { display: inline-block; padding: 4px 12px; border-radius: var(--bam-radius-pill); background: var(--surface); color: var(--text); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.photo-pair-tag.is-after { background: var(--bam-gold-gradient); color: var(--bam-on-gold); }
.photo-pair-note { max-width: 720px; margin: 0 0 8px; color: var(--text-muted); font-size: 14px; }
.photo-figure { margin: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 20px; padding: 18px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); }
.photo-figure-art svg { width: 100%; height: auto; display: block; }
.photo-figure ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; line-height: 1.55; }
.photo-figure .pc-wall { fill: var(--surface); stroke: var(--border-strong); stroke-width: 2; }
.photo-figure .pc-window { fill: var(--accent-soft); stroke: var(--border-strong); stroke-width: 1.5; }
.photo-figure .pc-ray { fill: none; stroke: var(--bam-gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 8; }
.photo-figure .pc-table { fill: var(--border-strong); }
.photo-figure .pc-cake { fill: var(--accent); }
.photo-figure .pc-cream { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.photo-figure .pc-reflector { fill: var(--surface); stroke: var(--text-muted); stroke-width: 2; }
.photo-figure .pc-mark { fill: var(--accent); }
.photo-figure .pc-num { fill: var(--surface); font: 700 12px sans-serif; text-anchor: middle; }
.photo-check { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.photo-check li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--bam-radius-pill); background: var(--surface); font-weight: 600; }
.photo-check .ti { color: var(--accent); }
.photo-lessons { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; }
.photo-lesson { overflow: hidden; display: grid; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); }
.photo-lesson img { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; object-fit: cover; }
.photo-lesson span { padding: 14px 16px 16px; display: grid; gap: 6px; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.photo-lesson small { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.photo-lesson strong { color: var(--text); font-size: 18px; }
@media (max-width: 900px) { .photo-lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .photo-figure { grid-template-columns: 1fr; } .photo-lessons { grid-template-columns: 1fr; } }

/* Allergen label generator (src/tool-pages.js labelForm): allergen chips, traces and the label preview. */
.tool-lines-spaced { margin-top: 20px; }
.tool-note-tight { margin: 0 0 4px; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip { position: relative; display: inline-flex; }
.tool-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tool-chip span { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: var(--bam-radius-pill); color: var(--text-muted); font-size: 13px; cursor: pointer; }
.tool-chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 600; }
.tool-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tool-more { margin-top: 8px; }
.tool-more summary { min-height: 44px; display: flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; list-style: none; }
.tool-more summary::-webkit-details-marker { display: none; }
.tool-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--bam-radius-sm); }
.tool-more[open] summary i { transform: rotate(180deg); }
.tool-output-title { margin: 0; font-size: 18px; }
.tool-label { display: grid; gap: 8px; padding: 16px; border: 1px dashed var(--border-strong); border-radius: var(--bam-radius-sm); background: var(--surface); font-size: 14px; line-height: 1.5; }
.tool-label p { margin: 0; }
.tool-label-name { font-family: var(--bam-serif); font-size: 20px; line-height: 1.2; }
.tool-output [data-copy-label] { justify-self: start; }
@media (prefers-reduced-motion: no-preference) {
  .tool-chip span { transition: background-color 0.15s ease, border-color 0.15s ease; }
}

/* Guides hub (2026-11-10): "where do I start" cards and the compact calculators topic. */
.hub-start { max-width: 1040px; margin: 32px auto 0; }
.hub-start-title { margin: 0 0 14px; color: var(--text-subtle); font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.hub-start-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.hub-start-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); text-align: left; }
.hub-start-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.hub-start-card:has(.course-card-link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.hub-start-card .course-card-link { color: var(--text); font-weight: 700; font-size: 16px; line-height: 1.25; }
.hub-start-card .course-card-link::after { content: ""; position: absolute; inset: 0; }
.hub-start-icon { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--bam-radius-md); background: var(--accent-soft); color: var(--accent); font-size: 22px; }
.hub-start-body { display: grid; gap: 4px; min-width: 0; }
.hub-start-body > span { color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.hub-start-go { margin-left: auto; color: var(--accent); font-size: 18px; }
.hub-grid.hub-grid-compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.hub-grid-compact .hub-card-media { aspect-ratio: auto; height: 0; overflow: visible; background: none; }
.hub-grid-compact .hub-card-media > :not(.hub-card-icon) { display: none; }
.hub-grid-compact .hub-card-icon { top: 18px; bottom: auto; left: 20px; width: 40px; height: 40px; font-size: 20px; box-shadow: none; background: var(--accent-soft); }
.hub-grid-compact .hub-card-body { padding: 18px 20px 18px 74px; gap: 8px; }
.hub-grid-compact .hub-card h3 { font-size: 18px; }
.hub-grid-compact .hub-card-fact, .hub-grid-compact .hub-viz { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .hub-start-card { transition: border-color var(--bam-duration) var(--bam-ease), box-shadow var(--bam-duration) var(--bam-ease); }
}
@media (max-width: 860px) {
  .hub-start-list { grid-template-columns: minmax(0, 1fr); }
}

/* Checklist as a PDF by e-mail (src/guide-pages.js checklistForm, 2026-11-11). */
.guide-pdf { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding: 24px; border: 1px solid var(--bam-gold-line); border-radius: var(--bam-radius-lg); background: var(--accent-soft); scroll-margin-top: 96px; }
.guide-pdf-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--bam-radius-md); background: var(--surface); color: var(--accent); font-size: 28px; }
.guide-pdf h2 { margin: 0 0 6px; }
.guide-pdf-body > p { margin: 0 0 16px; color: var(--text-muted); }
.guide-pdf-form { display: grid; gap: 12px; }
.guide-pdf-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.guide-pdf-field input { box-sizing: border-box; width: 100%; max-width: 420px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--bam-radius-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 400; }
.guide-pdf-field input:focus-visible, .guide-pdf-consent input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-pdf-consent { display: flex; align-items: flex-start; gap: 10px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.guide-pdf-consent input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.guide-pdf-consent a { color: var(--accent); }
.guide-pdf-form .button { justify-self: start; }
.guide-pdf-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.guide-pdf-status { margin: 0; font-size: 14px; font-weight: 600; }
.guide-pdf-status.is-done { color: var(--success); }
.guide-pdf-status.is-error { color: var(--danger); }
.guide-pdf-form.is-sent :is(.guide-pdf-field, .guide-pdf-consent, .button) { display: none; }
@media (max-width: 560px) {
  .guide-pdf { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .guide-pdf-form .button { justify-self: stretch; justify-content: center; }
}

/* Member cards and profiles (src/member-pages.js, public/academy/js/members.js): the whole card opens the profile
   (its name link stretches over it); the newest creations sit on top of the card, the most creative members first. */
.member-index-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px 40px; margin-bottom: 32px; text-align: left; }
.member-index-copy h1 { margin: 10px 0 12px; }
.member-index-copy p { max-width: 640px; margin: 0; color: var(--text-muted); font-size: 18px; line-height: 1.55; }
.member-stats { display: flex; gap: 12px; }
.member-stat { min-width: 140px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); box-shadow: var(--shadow-card); text-align: right; }
.member-stat strong { display: block; color: var(--accent); font-family: var(--bam-serif); font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.member-stat span { display: block; margin-top: 6px; color: var(--text-muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.member-loading { margin: 28px 0 0; text-align: center; color: var(--text-muted); font-size: 14px; }
.member-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 22px; }
.member-search { flex: 1 1 280px; position: relative; display: flex; align-items: center; }
.member-search i { position: absolute; left: 16px; color: var(--text-subtle); font-size: 18px; pointer-events: none; }
.member-search input { width: 100%; min-height: 46px; padding: 0 16px 0 44px; border: 1px solid var(--border-strong); border-radius: var(--bam-radius-pill); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.member-search input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.member-empty { padding: 32px; border: 1px dashed var(--border-strong); border-radius: var(--bam-radius-lg); text-align: center; color: var(--text-muted); }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.member-card { position: relative; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--bam-radius-lg); background: var(--surface); box-shadow: var(--shadow-card);
  transition: transform var(--bam-duration) var(--bam-ease), border-color var(--bam-duration) var(--bam-ease), box-shadow var(--bam-duration) var(--bam-ease); }
.member-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.member-card.is-top { border-color: var(--bam-gold-line); }
.member-card .course-card-link { color: var(--text); text-decoration: none; }
.member-card .course-card-link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.member-card:has(.course-card-link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.member-card h2 { margin: 0 0 2px; font-size: 20px; line-height: 1.2; }
.member-card-mosaic { display: grid; gap: 2px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-subtle); }
.member-card-mosaic img { width: 100%; height: 100%; min-height: 0; object-fit: cover; transition: transform 600ms var(--bam-ease); }
.member-card:hover .member-card-mosaic img { transform: scale(1.05); }
.member-card-mosaic.is-2 { grid-template-columns: 1fr 1fr; }
.member-card-mosaic.is-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.member-card-mosaic.is-3 img:first-child { grid-row: span 2; }
.member-card-mosaic.is-4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.member-card-mosaic.is-4 img:first-child { grid-row: span 2; }
.member-card-mosaic.is-4 img:nth-child(4) { grid-column: 2 / span 2; }
.member-card-empty { display: grid; place-items: center; height: 100%; background: var(--bam-medallion); color: var(--accent); font-size: 40px; opacity: .8; }
.member-rank { position: absolute; z-index: 2; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--bam-radius-pill);
  background: var(--bam-gold-gradient); color: var(--bam-on-gold); font-size: 13px; font-weight: 800; box-shadow: var(--shadow-sm); }
.member-card-body { display: grid; gap: 6px; padding: 0 18px 18px; }
.member-card-body p { margin: 0; }
.member-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; margin-top: -28px; }
.member-card-head > div { padding-top: 34px; }
.member-card-head .member-avatar { width: 64px; height: 64px; font-size: 22px; border-width: 3px; }
.member-card-level { margin-top: 36px; padding: 3px 10px; border-radius: var(--bam-radius-pill); background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.member-avatar-wrap { position: relative; display: inline-block; flex: none; }
.member-avatar { display: grid; place-items: center; width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--accent);
  font-family: var(--bam-serif); font-size: 26px; font-weight: 700; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.member-place { color: var(--text-muted); font-size: 14px; }
.member-title { color: var(--accent); font-size: 14px; font-weight: 700; }
.member-detail { font-size: 14px; }
.member-motto { color: var(--text-muted); font-family: var(--bam-serif); font-size: 15px; font-style: italic; }
.member-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; color: var(--text-muted); font-size: 14px; }
.member-hero { position: relative; padding-bottom: 24px; }
.member-hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.member-hero-top .course-crumbs { margin: 0; }
.member-since { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 auto; padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--bam-radius-pill); background: var(--surface); color: var(--text-muted); font-size: 14px; }
.member-since i { color: var(--accent); }
.member-since strong { color: var(--text); }
.member-profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-bottom: 18px; }
.member-profile-head .member-avatar { width: 128px; height: 128px; font-size: 44px; }
.member-profile-head .member-avatar-wrap { margin-right: 14px; }
.member-level { position: absolute; z-index: 1; top: -4px; right: -18px; padding: 4px 10px; border: 2px solid var(--surface); border-radius: var(--bam-radius-pill);
  background: var(--bam-gold-gradient); color: var(--bam-on-gold); font-size: 13px; font-weight: 800; white-space: nowrap; box-shadow: var(--shadow-sm); }
.member-profile-head h1 { margin: 6px 0 6px; }
.member-profile-head p { margin: 2px 0; }
.member-quote { margin: 0 0 18px; padding: 14px 20px; border-left: 3px solid var(--accent); border-radius: var(--bam-radius-sm); background: var(--accent-soft);
  font-family: var(--bam-serif); font-size: 20px; font-style: italic; }
.member-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.member-section { padding-top: 24px; padding-bottom: 24px; }
.member-section h2 { margin: 0 0 18px; }
.member-creations { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.member-creation { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface); }
.member-creation-photo { position: relative; display: block; overflow: hidden; color: inherit; }
.member-creation-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.member-creation img, .member-creation-empty { display: grid; place-items: center; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--surface-subtle); color: var(--text-muted); font-size: 32px;
  transition: transform 500ms var(--bam-ease); }
a.member-creation-photo { cursor: zoom-in; }
a.member-creation-photo:hover img { transform: scale(1.04); }
.member-creation figcaption { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.member-creation figcaption span { color: var(--accent); white-space: nowrap; }
/* The date watermark on every creation (asked by Andraž on 2026-11-16), bottom right. */
.member-watermark { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: var(--bam-radius-pill);
  background: color-mix(in srgb, var(--bam-cocoa) 48%, transparent); color: var(--bam-ivory); font-size: 11px; font-weight: 700; letter-spacing: .03em; opacity: .9; pointer-events: none; }
.member-viewer { width: min(calc(100% - 32px), 960px); max-height: calc(100% - 32px); margin: auto; padding: 0; overflow: visible; border: 0; border-radius: var(--bam-radius-lg); background: transparent; color: var(--bam-ivory); }
.member-viewer::backdrop { background: color-mix(in srgb, var(--bam-cocoa) 82%, transparent); }
.member-viewer-frame { margin: 0; }
.member-viewer-stage { position: relative; display: grid; place-items: center; }
.member-viewer-image { max-width: 100%; max-height: calc(100vh - 140px); border-radius: var(--bam-radius-md); object-fit: contain; background: var(--surface-subtle); }
.member-viewer .member-watermark { right: 12px; bottom: 12px; font-size: 13px; }
.member-viewer-caption { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px 0; font-size: 15px; }
.member-viewer-count { opacity: .8; white-space: nowrap; }
.member-viewer-button { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 22px; box-shadow: var(--shadow-sm); }
.member-viewer-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.member-viewer-button.is-close { top: -18px; right: -18px; }
.member-viewer-button.is-prev { top: 50%; left: -23px; transform: translateY(-50%); }
.member-viewer-button.is-next { top: 50%; right: -23px; transform: translateY(-50%); }
/* Completed courses as certificate stamps (<details>): above the creations and as a smaller row below them */
.member-stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); align-items: start; gap: 14px; }
.member-stamp { border: 1px dashed var(--bam-gold-line); border-radius: var(--bam-radius-md); background: var(--surface); transition: border-color var(--bam-duration) var(--bam-ease), transform var(--bam-duration) var(--bam-ease); }
.member-stamp:hover, .member-stamp[open] { border-color: var(--accent); transform: translateY(-2px); }
.member-stamp summary { display: grid; justify-items: center; gap: 8px; padding: 16px 10px 12px; list-style: none; text-align: center; cursor: pointer; border-radius: inherit; }
.member-stamp summary::-webkit-details-marker { display: none; }
.member-stamp summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.member-stamp-seal { position: relative; display: grid; place-items: center; width: 92px; height: 92px; border: 3px double var(--accent); border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); transform: rotate(-8deg); transition: transform 500ms var(--bam-ease); }
.member-stamp:nth-child(even) .member-stamp-seal { transform: rotate(7deg); border-color: var(--bam-gold); }
.member-stamp:hover .member-stamp-seal, .member-stamp[open] .member-stamp-seal { transform: rotate(0) scale(1.06); }
.member-stamp-ring { position: absolute; inset: 6px; display: grid; place-items: start center; padding-top: 7px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 50%;
  font-size: 7px; font-weight: 800; letter-spacing: .14em; }
.member-stamp-seal strong { margin-top: 10px; font-family: var(--bam-serif); font-size: 24px; font-weight: 500; line-height: 1; }
.member-stamp-seal i { position: absolute; bottom: 8px; font-size: 14px; }
.member-stamp-title { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.member-stamp summary small, .member-stamp-facts small { color: var(--text-muted); font-size: 12px; }
.member-stamp-facts { display: grid; justify-items: center; gap: 2px; margin: 0; padding: 0 10px 14px; text-align: center; }
.member-stamp-number { color: var(--accent) !important; font-weight: 700; letter-spacing: .06em; }
.member-stamp-band { padding-top: 0; }
.member-stamps.is-compact { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.member-stamps.is-compact .member-stamp { border-color: transparent; background: transparent; }
.member-stamps.is-compact .member-stamp:hover, .member-stamps.is-compact .member-stamp[open] { border-color: var(--bam-gold-line); background: var(--surface); }
.member-stamps.is-compact summary { gap: 6px; padding: 10px 6px; }
.member-stamps.is-compact .member-stamp-seal { width: 64px; height: 64px; }
.member-stamps.is-compact .member-stamp-ring { inset: 4px; padding: 0; font-size: 0; }
.member-stamps.is-compact .member-stamp-seal strong { margin-top: 0; font-size: 19px; }
.member-stamps.is-compact .member-stamp-seal i { bottom: 6px; font-size: 12px; }
.member-stamps.is-compact .member-stamp-title { font-size: 12px; }
@media (max-width: 560px) { .member-stamps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .member-stamps.is-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .member-stamp, .member-stamp-seal { transition: none; } .member-stamp:hover, .member-stamp[open] { transform: none; } }
/* The sign-up path at the bottom of a profile: four steps on a dashed road, one open at a time (members.js) */
.member-path { margin: 8px auto 24px; padding: 36px 32px 32px; border: 1px solid var(--bam-gold-line); border-radius: var(--bam-radius-lg); background: var(--bam-panel-sheen), var(--surface); box-shadow: var(--shadow-card); text-align: center; }
.member-path h2 { margin: 6px 0 8px; }
.member-path-lead { max-width: 560px; margin: 0 auto 26px; color: var(--text-muted); }
.member-path-steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 26px; padding: 0; list-style: none; }
.member-path-steps::before { content: ""; position: absolute; top: 32px; left: 12.5%; right: 12.5%; border-top: 2px dashed var(--bam-gold-line); }
.member-path-item { position: relative; display: grid; justify-items: center; align-content: start; gap: 10px; }
.member-path-step { display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.member-path-step:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: var(--bam-radius-md); }
.member-path-pin { display: grid; place-items: center; width: 64px; height: 64px; border: 2px solid var(--bam-gold-line); border-radius: 50%; background: var(--surface); color: var(--accent); font-size: 26px;
  transition: transform var(--bam-duration) var(--bam-ease), background var(--bam-duration) var(--bam-ease), color var(--bam-duration) var(--bam-ease); }
.member-path-number { margin-top: -22px; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; }
.member-path-step strong { font-size: 15px; line-height: 1.3; }
.member-path-panel { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.member-path.is-interactive .member-path-item:not(.is-active) .member-path-panel { display: none; }
.member-path-item.is-active .member-path-pin { transform: scale(1.08); background: var(--bam-gold-gradient); border-color: transparent; color: var(--bam-on-gold); box-shadow: var(--shadow-sm); }
.member-path-item.is-active .member-path-number { background: var(--accent); color: var(--surface); }
.member-path-actions { display: grid; justify-items: center; gap: 8px; }
.member-path-actions small { color: var(--text-muted); font-size: 13px; }
@media (max-width: 720px) {
  .member-path { padding: 26px 18px 22px; text-align: left; }
  .member-path-lead { margin-left: 0; }
  .member-path-steps { grid-template-columns: 1fr; gap: 14px; }
  .member-path-steps::before { top: 24px; bottom: 24px; left: 31px; right: auto; border-top: 0; border-left: 2px dashed var(--bam-gold-line); }
  .member-path-item { justify-items: stretch; gap: 4px; }
  .member-path-step { grid-template-columns: 64px minmax(0, 1fr); align-items: center; justify-items: start; gap: 14px; text-align: left; }
  .member-path-number { display: none; }
  .member-path-panel { padding-left: 78px; }
  .member-path-actions { justify-items: stretch; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .member-path-pin { transition: none; } .member-path-item.is-active .member-path-pin { transform: none; } }
.member-ads { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.member-ads li { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--bam-radius-md); background: var(--surface); }
.member-ads p { margin: 6px 0; color: var(--text-muted); }
.member-ads small { color: var(--text-subtle); }
.member-ad-type { display: inline-block; margin-right: 10px; padding: 2px 10px; border-radius: var(--bam-radius-pill); background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.member-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.member-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border: 1px solid var(--border); border-radius: var(--bam-radius-pill); background: var(--surface); color: var(--text-muted); font-size: 13px; font-weight: 600; }
.member-chip.is-accent { border-color: transparent; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.member-section .member-chip { padding: 6px 14px; font-size: 14px; color: var(--text); }
@media (max-width: 560px) {
  .member-card-body { padding: 0 14px 14px; }
  .member-profile-head { gap: 16px; }
  .member-profile-head .member-avatar { width: 96px; height: 96px; font-size: 34px; }
  .member-level { right: -14px; font-size: 12px; }
  .member-since { margin-left: 0; }
  .member-creations { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .member-search-button { flex: 1 1 auto; }
  .member-index-head { grid-template-columns: minmax(0, 1fr); }
  .member-stats { width: 100%; }
  .member-stat { flex: 1 1 0; min-width: 0; text-align: left; }
  .member-stat strong { font-size: 32px; }
  .member-viewer-button.is-close { top: -54px; right: 0; }
  .member-viewer-button.is-prev { left: 4px; }
  .member-viewer-button.is-next { right: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .member-card, .member-card-mosaic img, .member-creation img { transition: none; }
  .member-card:hover, .member-card:hover .member-card-mosaic img, a.member-creation-photo:hover img { transform: none; }
}
