/* lumen — light-kit material & light layer for margin.
   Everything is gated on color-mix support + html.lk (set by lumen.js boot snippet),
   so browsers without support keep the original theme untouched.
   --p runs 0 (dark) → 1 (light); every colour is a mix of the two ends, so the
   theme change is one continuous move instead of a swap. */
@supports (color: color-mix(in srgb, red 50%, blue)) {
html.lk { --p: 1; --glow: 255 158 18; color-scheme: light; }
html.lk[data-theme=dark] { --p: 0; --glow: 108 120 255; color-scheme: dark; }
html.lk:root, html.lk:root[data-theme=dark], html.lk:root:not([data-theme=dark]) {
  --q: calc(1 - var(--p)); --mq: calc((1 - var(--p)) * 100%);
  --bg: color-mix(in srgb, #0c0d11 var(--mq), #e3e0db);
  --hero: transparent;
  --fg: color-mix(in srgb, #eef0f7 var(--mq), #3a3531);
  --muted: color-mix(in srgb, #a3a7b6 var(--mq), #675e56);
  --accent: color-mix(in srgb, #b4bbff var(--mq), #9a5a00);
  --surface: color-mix(in srgb, #191a21 var(--mq), #f5f3f0);
  --soft: color-mix(in srgb, #24262f var(--mq), #d8d4ce);
  --line: color-mix(in srgb, rgba(255,255,255,.1) var(--mq), rgba(70,58,45,.15));
  --strong-line: color-mix(in srgb, rgba(255,255,255,.3) var(--mq), rgba(70,58,45,.42));
  --blue: var(--surface); --gold: var(--surface); --mauve: var(--surface); --sage: var(--surface);
  --display: var(--sans);
  --lk-glow: rgb(var(--glow));
  --lk-raised: linear-gradient(175deg, color-mix(in srgb, rgba(255,255,255,.13) var(--mq), #fefdfc), color-mix(in srgb, rgba(255,255,255,.05) var(--mq), #efece8));
  --lk-soft: linear-gradient(175deg, color-mix(in srgb, rgba(255,255,255,.075) var(--mq), #f3f0ec), color-mix(in srgb, rgba(255,255,255,.03) var(--mq), #e7e3de));
  --lk-well: linear-gradient(180deg, color-mix(in srgb, #030304 var(--mq), #dcd9d4), color-mix(in srgb, #0a0a0d var(--mq), #ebe9e6));
  --lk-panel: color-mix(in srgb, #14151b var(--mq), #ece9e5);
  --lk-edge: rgb(var(--glow) / .75);
}
html.lk { background: var(--bg); }
html.lk body { background: transparent; letter-spacing: .01em; }
html.lk body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 35%, color-mix(in srgb, #181920 var(--mq), #ece9e5) 0%, color-mix(in srgb, #0c0d11 var(--mq), #ddd9d4) 58%, color-mix(in srgb, #060609 var(--mq), #d0ccc6) 100%); }
html.lk ::selection { background: rgb(var(--glow) / .35); color: var(--fg); }
html.lk :focus-visible { outline: 2px solid var(--lk-edge); outline-offset: 3px; }
html.lk h1, html.lk h2, html.lk h3 { font-family: var(--sans); font-weight: 650; letter-spacing: -.01em; }
html.lk .brand { font-family: Fredoka, sans-serif; letter-spacing: 0; }
html.lk .eyebrow, html.lk .portal-product-breadcrumb { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }

/* ---- materials ---------------------------------------------------------- */
/* raised: frosted glass in the dark, porcelain in the light */
html.lk :is(.button, .hero-submit, .shelf-filter, .language-toggle, #auth-entry, .icon-button, .search-launch, .filter, .page-number, .hero-suggestions > a, .hero-suggestions > button, .portal-media-choice, .lk-raised) {
  --d: .4; position: relative; isolation: isolate; border: 0; color: var(--fg); background: var(--lk-soft);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / calc(.1 * var(--q))), inset 0 1.5px 0 rgb(255 255 255 / calc(.13 * var(--q) + .95 * var(--p))),
    0 calc(10px * var(--d)) calc(22px * var(--d)) rgb(0 0 0 / calc(.5 * var(--q))), 0 calc(10px * var(--d)) calc(18px * var(--d)) rgb(70 58 45 / calc(.2 * var(--p))), 0 1px 3px rgb(70 58 45 / calc(.16 * var(--p)));
  transition: transform .18s cubic-bezier(.3,.7,.3,1);
}
html.lk :is(.button, .hero-submit, .shelf-filter, .filter, .page-number, .lk-raised):active { transform: translateY(1px) scale(.985); }
html.lk :is(.button, .hero-submit, .shelf-filter, .language-toggle, #auth-entry, .icon-button, .search-launch, .filter, .page-number):hover { background: var(--lk-raised); color: var(--fg); }
html.lk :is(.button, .hero-submit, .shelf-filter, .filter, .page-number)[disabled], html.lk .button[aria-disabled=true] { opacity: .5; cursor: not-allowed; }

/* lit: the piece that carries the light — primary actions and current selections.
   The static bar stands in for the canvas arc until the pointer wakes it (lumen.js). */
html.lk :is(.button-primary, .hero-submit, .filter.active, .billing-toggle button.active, .shelf-filter[aria-pressed=true], .lk-lit) {
  color: var(--fg); border: 0;
  background: radial-gradient(90% 130% at 50% calc(var(--q) * 100%), rgb(var(--glow) / calc(.3 + .12 * var(--p))), rgb(var(--glow) / 0) 70%), var(--lk-raised);
}
html.lk :is(.button-primary, .hero-submit, .filter.active, .billing-toggle button.active, .shelf-filter[aria-pressed=true], .lk-lit)::after {
  content: ""; position: absolute; z-index: -1; left: 22%; right: 22%; height: 2px; top: calc(var(--q) * 100% - 1px); border-radius: 2px; pointer-events: none;
  background: radial-gradient(50% 100% at 50% 50%, color-mix(in srgb, #fff 55%, rgb(var(--glow))), rgb(var(--glow) / 0));
  box-shadow: 0 0 10px 1px rgb(var(--glow) / .75), 0 0 26px 4px rgb(var(--glow) / .38);
}
html.lk .lk-live::after { opacity: 0; }
html.lk :is(.button-primary, .hero-submit):hover { background: radial-gradient(110% 150% at 50% calc(var(--q) * 100%), rgb(var(--glow) / calc(.4 + .14 * var(--p))), rgb(var(--glow) / 0) 72%), var(--lk-raised); color: var(--fg); }
html.lk canvas.lk-fx { position: absolute; z-index: -1; pointer-events: none; max-width: none; }

/* well: pressed-in tray for anything you type or drop into */
html.lk :is(.hero-search, .input-search, .billing-toggle, .auth-tabs, .lk-well) {
  --d: .5; position: relative; isolation: isolate; border: 0; background: var(--lk-well);
  box-shadow: inset 0 calc(7px * var(--d)) calc(16px * var(--d)) rgb(0 0 0 / calc(.9 * var(--q))), inset 0 0 0 1px rgb(0 0 0 / calc(.6 * var(--q))), 0 1.5px 0 rgb(255 255 255 / calc(.08 * var(--q))),
    inset 0 calc(4px * var(--d)) calc(9px * var(--d)) rgb(80 68 55 / calc(.2 * var(--p))), inset 0 -2px 3px rgb(255 255 255 / calc(.95 * var(--p))), 0 0 0 1px rgb(255 255 255 / calc(.4 * var(--p)));
}
html.lk :is(.hero-search, .input-search):focus-within { outline: 0; }
html.lk :is(.hero-search, .input-search) input { outline: 0; caret-color: var(--lk-glow); color: var(--fg); }
html.lk :is(.hero-search, .input-search)::after { content: ""; position: absolute; z-index: -1; left: 18%; right: 18%; height: 2px; top: calc(var(--q) * 100% - 1px); border-radius: 2px; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(50% 100% at 50% 50%, color-mix(in srgb, #fff 55%, rgb(var(--glow))), rgb(var(--glow) / 0)); box-shadow: 0 0 10px 1px rgb(var(--glow) / .7), 0 0 24px 4px rgb(var(--glow) / .32); }
html.lk :is(.hero-search, .input-search):focus-within::after { opacity: 1; }
html.lk :is(.hero-search, .input-search).lk-live::after { opacity: 0; }
html.lk input::placeholder { color: var(--muted); opacity: .85; }
html.lk select, html.lk .sort-control select { color: var(--fg); background-color: var(--surface); border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgb(70 58 45 / calc(.12 * var(--p))); }
html.lk :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), textarea):not(.hero-search input):not(.input-search input) {
  color: var(--fg); background: var(--lk-well); border: 0; border-radius: 14px; caret-color: var(--lk-glow);
  box-shadow: inset 0 3px 8px rgb(0 0 0 / calc(.85 * var(--q))), inset 0 0 0 1px rgb(0 0 0 / calc(.55 * var(--q))), 0 1.5px 0 rgb(255 255 255 / calc(.08 * var(--q))), inset 0 2px 5px rgb(80 68 55 / calc(.2 * var(--p))), inset 0 -1.5px 2px rgb(255 255 255 / calc(.95 * var(--p))), 0 0 0 1px rgb(255 255 255 / calc(.4 * var(--p)));
}
html.lk :is(input, textarea):not(.hero-search input):not(.input-search input):focus-visible { outline: 0; box-shadow: inset 0 3px 8px rgb(0 0 0 / calc(.85 * var(--q))), inset 0 2px 5px rgb(80 68 55 / calc(.2 * var(--p))), 0 0 0 1.5px rgb(var(--glow) / .8), 0 calc(var(--q) * 12px - 6px) 18px -6px rgb(var(--glow) / .55); }

/* ---- header ------------------------------------------------------------- */
html.lk .site-header { background: color-mix(in srgb, var(--bg) 68%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
html.lk .navigation { height: 72px; gap: 36px; }
html.lk .brand { font-size: 28px; gap: 9px; }
html.lk .brand-mark { width: 30px; height: 30px; }
html.lk .desktop-links { gap: 6px; }
html.lk .desktop-links > a:first-child::after { display: none; }
html.lk :is(.portal-nav-button, .portal-nav-link) { padding: 8px 14px; border-radius: 12px; color: var(--muted); min-height: 40px; transition: color .2s, background .2s; }
html.lk :is(.portal-nav-button, .portal-nav-link):hover, html.lk .portal-nav-button[aria-expanded=true] { color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); }
html.lk :is(.portal-nav-button, .portal-nav-link)[aria-current=page] { color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); box-shadow: inset 0 calc(2px - var(--q) * 4px) 0 -0px rgb(var(--glow) / .0); }
html.lk :is(.portal-nav-button, .portal-nav-link)[aria-current=page]::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 2px; height: 2px; border-radius: 2px; background: var(--lk-glow); box-shadow: 0 0 8px 1px rgb(var(--glow) / .7); }
html.lk :is(.portal-nav-button, .portal-nav-link) { position: relative; }
html.lk .nav-actions { gap: 8px; }
html.lk .nav-actions :is(.icon-button, .language-toggle, .search-launch, #auth-entry) { --d: .3; min-width: 40px; min-height: 40px; height: 40px; border-radius: 13px; padding: 0 11px; font-size: 13px; }
html.lk #auth-entry { padding: 0 16px; font-weight: 600; }
html.lk .portal-ai-menu, html.lk .command-dialog, html.lk .mobile-menu { background: var(--lk-panel); }
html.lk .portal-ai-menu { border: 0; border-radius: 20px; padding: 8px; box-shadow: inset 0 0 0 1px var(--line), inset 0 1.5px 0 rgb(255 255 255 / calc(.12 * var(--q) + .9 * var(--p))), 0 24px 60px rgb(0 0 0 / calc(.2 + .4 * var(--q))); }
html.lk .portal-ai-menu > a { border-radius: 13px; }
html.lk .portal-ai-menu > a:hover, html.lk .portal-ai-menu > a:focus-visible { background: color-mix(in srgb, var(--fg) 7%, transparent); }

/* ---- hero --------------------------------------------------------------- */
html.lk .hero-shell { background: none; border-radius: 0; }
html.lk .hero { min-height: 0; padding-block: 72px 76px; gap: 64px; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); }
html.lk .hero h1 { font-size: clamp(40px, 5.2vw, 76px); line-height: 1.1; font-weight: 700; margin-bottom: 22px; }
html.lk .hero-description { font-size: clamp(16px, 1.5vw, 20px); margin-bottom: 34px; }
html.lk .hero-sparks, html.lk .doodle-arrow { display: none; }
html.lk .hero-search { --d: .7; min-height: 66px; border-radius: 22px; padding: 8px 9px 8px 22px; }
html.lk .hero-submit { --d: .45; border-radius: 15px; min-height: 50px; font-size: 15px; letter-spacing: .06em; }
html.lk .capability-stack { gap: 14px; padding: 0; }
html.lk .capability, html.lk .portal-entry { --d: .8; transform: none; color: var(--fg); border: 0; border-radius: 24px; background: var(--lk-soft); isolation: isolate; height: auto; min-height: 104px; padding: 18px 22px 18px 26px; overflow: visible;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / calc(.1 * var(--q))), inset 0 1.5px 0 rgb(255 255 255 / calc(.13 * var(--q) + .95 * var(--p))), 0 calc(14px * var(--d)) calc(30px * var(--d)) rgb(0 0 0 / calc(.5 * var(--q))), 0 calc(12px * var(--d)) calc(22px * var(--d)) rgb(70 58 45 / calc(.2 * var(--p))), 0 2px 5px rgb(70 58 45 / calc(.12 * var(--p))); }
html.lk .capability:hover, html.lk .portal-entry:hover { background: var(--lk-raised); }
html.lk .capability-copy strong, html.lk .portal-entry .capability-copy strong { font: 650 22px/1.25 var(--sans); letter-spacing: 0; }
html.lk .capability-copy > span, html.lk .portal-entry .capability-copy > span { font: 400 12px/1.5 var(--sans); letter-spacing: .14em; color: var(--muted); }
html.lk .portal-entry small { color: var(--muted); }
html.lk .capability canvas[data-art], html.lk .capability > canvas:not(.lk-fx):not(.lk-dots) { display: none; }
html.lk canvas.lk-dots { position: static; flex: none; display: block; width: auto; height: auto; }

/* ---- sections, toolbar, grid ----------------------------------------------- */
html.lk .section-heading h2, html.lk .catalog-heading h2 { font-size: clamp(28px, 3vw, 40px); }
html.lk .catalog-heading h2::after { display: none; }
html.lk .filter { --d: .3; border-radius: 14px; min-height: 40px; padding: 8px 16px; color: var(--muted); }
html.lk .filter.active { color: var(--fg); }
html.lk .input-search { border-radius: 16px; min-height: 46px; }
html.lk .shelf-filter { border-radius: 14px; }
html.lk .series-category, html.lk .portal-price { background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--muted); border-radius: 8px; letter-spacing: .06em; }
html.lk .portal-price[data-price-state=membership] { color: var(--accent); background: rgb(var(--glow) / .14); }
html.lk .card-grid.portal-grid { gap: 20px; }
html.lk .portal-card { --d: .55; position: relative; isolation: isolate; padding: 8px 8px 10px; border-radius: 22px; background: var(--lk-soft);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / calc(.09 * var(--q))), inset 0 1.5px 0 rgb(255 255 255 / calc(.12 * var(--q) + .95 * var(--p))), 0 calc(14px * var(--d)) calc(30px * var(--d)) rgb(0 0 0 / calc(.5 * var(--q))), 0 calc(12px * var(--d)) calc(22px * var(--d)) rgb(70 58 45 / calc(.18 * var(--p))), 0 1px 3px rgb(70 58 45 / calc(.12 * var(--p)));
  transition: transform .25s cubic-bezier(.3,.7,.3,1) !important; }
html.lk .portal-card:hover { transform: translateY(-2px); }
html.lk .portal-cover, html.lk .cover { border-radius: 15px; background: var(--lk-well); color: var(--fg); overflow: hidden; box-shadow: inset 0 0 0 1px rgb(0 0 0 / calc(.5 * var(--q) + .06 * var(--p))); }
html.lk .portal-card-info { padding: 10px 6px 0; }
html.lk .portal-card-reactions [aria-pressed=true] { color: var(--accent); }
html.lk .page-number { --d: .25; border-radius: 11px; }
html.lk #portal-page-numbers .page-number[aria-current=page] { background: var(--accent); color: var(--surface); font-weight: 750; }
html.lk .empty-state { border: 0; border-radius: 26px; background: var(--lk-well); box-shadow: inset 0 4px 12px rgb(0 0 0 / calc(.8 * var(--q))), inset 0 3px 8px rgb(80 68 55 / calc(.16 * var(--p))), inset 0 -2px 3px rgb(255 255 255 / calc(.9 * var(--p))); }
html.lk .site-footer { background: none; border-top: 1px solid var(--line); }

/* ---- dialogs ------------------------------------------------------------ */
html.lk dialog { background: var(--lk-panel); border: 0; border-radius: 28px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / calc(.1 * var(--q))), inset 0 1.5px 0 rgb(255 255 255 / calc(.16 * var(--q) + .95 * var(--p))), 0 30px 90px rgb(0 0 0 / calc(.28 + .4 * var(--q))); }
html.lk dialog::backdrop { background: color-mix(in srgb, rgba(4,4,7,.72) var(--mq), rgba(88,78,66,.42)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html.lk dialog .icon-button { --d: .25; border-radius: 13px; width: 40px; min-width: 40px; height: 40px; }
html.lk .portal-product-info, html.lk .membership-offer, html.lk .portal-content-section { border-color: var(--line); }
html.lk .portal-product-info { border: 0; border-radius: 24px; background: var(--lk-soft); box-shadow: inset 0 0 0 1px rgb(255 255 255 / calc(.08 * var(--q))), inset 0 1.5px 0 rgb(255 255 255 / calc(.1 * var(--q) + .95 * var(--p))), 0 8px 20px rgb(70 58 45 / calc(.12 * var(--p))); }
html.lk .portal-product-included, html.lk .portal-content-text { border: 0; border-radius: 16px; background: var(--lk-well); box-shadow: inset 0 3px 9px rgb(0 0 0 / calc(.8 * var(--q))), inset 0 2px 6px rgb(80 68 55 / calc(.16 * var(--p))), inset 0 -1.5px 2px rgb(255 255 255 / calc(.9 * var(--p))); }
html.lk .text-link { color: var(--fg); border-bottom-color: color-mix(in srgb, var(--fg) 35%, transparent); }
html.lk .text-link:hover { color: var(--accent); border-bottom-color: currentColor; }
html.lk .command-dialog [role=option][aria-selected=true] { background: rgb(var(--glow) / .18); color: var(--fg); box-shadow: inset 0 0 0 1px rgb(var(--glow) / .4); }
html.lk .billing-toggle { border-radius: 16px; padding: 5px; }
html.lk .billing-toggle button { border-radius: 11px; color: var(--muted); position: relative; isolation: isolate; }
html.lk .billing-toggle button.active { color: var(--fg); box-shadow: inset 0 1.5px 0 rgb(255 255 255 / calc(.14 * var(--q) + .95 * var(--p))), 0 3px 8px rgb(0 0 0 / calc(.4 * var(--q) + .14 * var(--p))); }

@media (max-width: 900px) { html.lk .hero { grid-template-columns: minmax(0,1fr); padding-block: 44px 52px; gap: 32px; } }
@media (max-width: 600px) {
  html.lk .navigation { height: 62px; gap: 6px; }
  html.lk .brand { font-size: 23px; gap: 6px; } html.lk .brand-mark { width: 25px; height: 25px; }
  html.lk .nav-actions { gap: 5px; }
  html.lk .nav-actions :is(.icon-button, .language-toggle, .search-launch, #auth-entry) { min-width: 36px; height: 36px; min-height: 36px; padding: 0 8px; border-radius: 11px; font-size: 12px; }
  html.lk .hero-search { min-height: 58px; padding: 7px 7px 7px 14px; border-radius: 19px; }
  html.lk .capability, html.lk .portal-entry { min-height: 92px; padding: 14px 16px; border-radius: 20px; align-items: center; }
  html.lk .capability-copy strong, html.lk .portal-entry .capability-copy strong { font-size: 18px; }
  html.lk .card-grid.portal-grid { gap: 12px; }
  html.lk .portal-card { padding: 6px 6px 8px; border-radius: 18px; } html.lk .portal-cover { border-radius: 13px; }
  html.lk dialog { border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) { html.lk * { transition: none !important; } }
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
/* theme switch */
html.lk .nav-actions .lk-switch, html.lk .lk-switch { --d: .4; position: relative; isolation: isolate; width: 68px; min-width: 68px; height: 36px; min-height: 36px; padding: 0; border-radius: 13px; background: var(--lk-well); overflow: visible;
  box-shadow: inset 0 3px 8px rgb(0 0 0 / calc(.9 * var(--q))), inset 0 0 0 1px rgb(0 0 0 / calc(.6 * var(--q))), 0 1.5px 0 rgb(255 255 255 / calc(.08 * var(--q))), inset 0 2px 5px rgb(80 68 55 / calc(.22 * var(--p))), inset 0 -1.5px 2px rgb(255 255 255 / calc(.95 * var(--p))), 0 0 0 1px rgb(255 255 255 / calc(.4 * var(--p))); }
html.lk .lk-switch:hover { background: var(--lk-well); }
html.lk .lk-switch > :not(.lk-knob):not(.lk-fx) { display: none; }
html.lk .lk-knob { position: absolute; left: 0; top: 4px; width: 28px; height: 28px; border-radius: 9px; z-index: 1; pointer-events: none; will-change: transform, width; background: var(--lk-raised);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / calc(.2 * var(--q))), inset 0 1.5px 0 rgb(255 255 255 / calc(.26 * var(--q) + .95 * var(--p))), 0 3px 8px rgb(0 0 0 / calc(.5 * var(--q))), 0 3px 7px rgb(70 58 45 / calc(.26 * var(--p))); }
@media (max-width: 600px) { html.lk .nav-actions .lk-switch { width: 58px; min-width: 58px; height: 32px; min-height: 32px; } html.lk .lk-knob { width: 24px; height: 24px; } }
}

/* ---- flow components (work with or without the lumen material) ---------------- */
.flow-steps { list-style: none; display: flex; gap: 6px; margin: 14px 0 18px; padding: 0; font: 500 11px/1.4 var(--sans); color: var(--muted); }
.flow-steps li { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 8px 9px; border-radius: 11px; background: var(--soft); }
.flow-steps b { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 7px; font: 600 11px/1 var(--sans); background: var(--surface); color: var(--muted); }
.flow-steps span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-steps li[aria-current=step] { color: var(--fg); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--accent); }
.flow-steps li[aria-current=step] b { background: var(--accent); color: var(--bg); }
.flow-steps li[data-done] b { color: transparent; position: relative; }
.flow-steps li[data-done] b::after { content: "✓"; position: absolute; color: var(--accent); font-size: 12px; }
.flow-steps[data-flow-step="5"] li:last-child { color: var(--fg); font-weight: 600; }
@media (max-width: 520px) { .flow-steps { gap: 4px; font-size: 10px; } .flow-steps li { flex-direction: column; gap: 4px; padding: 7px 3px; text-align: center; } .flow-steps span { white-space: normal; } }
.auth-reason { margin: -8px 0 18px; padding: 10px 13px; border-radius: 12px; background: var(--soft); color: var(--fg); font: 500 13px/1.65 var(--sans); border-left: 3px solid var(--accent); }
.portal-free-tag { display: table; margin: 8px 0 6px; padding: 3px 9px; border-radius: 8px; background: var(--soft); color: var(--accent); font: 600 11px/1.6 var(--sans); letter-spacing: .04em; }
.portal-product-next { display: block; margin-top: 7px; color: var(--accent); font: 600 12px/1.5 var(--sans); }
.portal-product-next:empty { display: none; }
[data-paid-download][data-locked] { color: var(--muted); }
[data-paid-download][data-locked]::before { content: ""; flex: none; width: 11px; height: 13px; margin-right: 7px; background: currentColor; opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 13'%3E%3Cpath d='M2.5 5V3.6a3 3 0 0 1 6 0V5h.7c.7 0 1.3.6 1.3 1.3v5.4c0 .7-.6 1.3-1.3 1.3H1.8C1.1 13 .5 12.400.5 11.700V6.300C.5 5.600 1.100 5 1.800 5h.7Zm1.400 0h3.200V3.600a1.600 1.600 0 0 0-3.200 0V5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 13'%3E%3Cpath d='M2.5 5V3.6a3 3 0 0 1 6 0V5h.7c.7 0 1.3.6 1.3 1.3v5.4c0 .7-.6 1.3-1.3 1.3H1.8C1.1 13 .5 12.400.5 11.700V6.300C.5 5.600 1.100 5 1.800 5h.7Zm1.400 0h3.200V3.600a1.600 1.600 0 0 0-3.200 0V5Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.portal-file-list [data-paid-download][data-locked]::before { width: 9px; height: 11px; margin-right: 5px; display: inline-block; vertical-align: -1px; }
/* membership: three plans side by side, prices always visible */
.membership-period { gap: 8px; }
.membership-period button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 13px; text-align: left; height: auto; }
.membership-plan-name { font: 500 12px/1.4 var(--sans); opacity: .8; }
.membership-plan-price { font: 650 24px/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.membership-plan-term { font: 400 10.5px/1.5 var(--sans); opacity: .75; white-space: nowrap; }
.membership-offer-title, .membership-price { display: none; }
.membership-offer .membership-period-note { margin-top: 0; }
.membership-benefits p { position: relative; padding-left: 22px; }
.membership-benefits p::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--accent); font-weight: 700; }
.membership-benefits p:last-child::before { content: "i"; font-style: italic; left: 6px; }
@media (max-width: 480px) { .membership-period { gap: 5px; } .membership-period button { padding: 10px 8px; } .membership-plan-price { font-size: 19px; } .membership-plan-term { white-space: normal; font-size: 10px; } }

@supports (color: color-mix(in srgb, red 50%, blue)) {
html.lk .flow-steps li { background: color-mix(in srgb, var(--fg) 6%, transparent); }
html.lk .flow-steps b { background: color-mix(in srgb, var(--fg) 10%, transparent); }
html.lk .flow-steps li[aria-current=step] { box-shadow: inset 0 0 0 1px rgb(var(--glow) / .55), 0 calc(var(--q) * 16px - 8px) 16px -8px rgb(var(--glow) / .6); background: rgb(var(--glow) / .1); }
html.lk .flow-steps li[aria-current=step] b { background: var(--lk-glow); color: color-mix(in srgb, #0c0d11 var(--mq), #fff); }
html.lk .auth-reason { border-left: 0; background: rgb(var(--glow) / .12); box-shadow: inset 0 0 0 1px rgb(var(--glow) / .35); }
html.lk .portal-free-tag { background: rgb(var(--glow) / .14); }
html.lk .membership-status { background: color-mix(in srgb, var(--fg) 7%, transparent); border-radius: 10px; }
html.lk .membership-period.billing-toggle { background: none; box-shadow: none; padding: 0; overflow: visible; }
html.lk .membership-period button { --d: .5; border-radius: 16px; background: var(--lk-soft); color: var(--fg);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / calc(.1 * var(--q))), inset 0 1.5px 0 rgb(255 255 255 / calc(.13 * var(--q) + .95 * var(--p))), 0 5px 12px rgb(0 0 0 / calc(.45 * var(--q))), 0 5px 10px rgb(70 58 45 / calc(.18 * var(--p))); }
html.lk .membership-period button.active { box-shadow: inset 0 0 0 1.5px rgb(var(--glow) / .7), inset 0 1.5px 0 rgb(255 255 255 / calc(.13 * var(--q) + .95 * var(--p))), 0 6px 16px rgb(0 0 0 / calc(.45 * var(--q))), 0 6px 14px rgb(70 58 45 / calc(.2 * var(--p))); }
html.lk .membership-period button.active .membership-plan-name { opacity: 1; color: var(--accent); }
html.lk .membership-offer { border: 0; border-radius: 18px; background: var(--lk-well); box-shadow: inset 0 3px 9px rgb(0 0 0 / calc(.8 * var(--q))), inset 0 2px 6px rgb(80 68 55 / calc(.16 * var(--p))), inset 0 -1.5px 2px rgb(255 255 255 / calc(.9 * var(--p))); }
html.lk #membership-dialog h2, html.lk #auth-dialog h2 { font-family: var(--sans); font-size: 30px; }
html.lk .auth-tabs { border: 0; border-radius: 15px; padding: 5px; }
html.lk .auth-tabs button { border-radius: 11px; color: var(--muted); }
html.lk .auth-tabs button[aria-selected=true] { color: var(--fg); background: var(--lk-raised); box-shadow: inset 0 1.5px 0 rgb(255 255 255 / calc(.14 * var(--q) + .95 * var(--p))), 0 3px 8px rgb(0 0 0 / calc(.4 * var(--q) + .14 * var(--p))), inset 0 calc(2px - var(--q) * 4px) 0 rgb(var(--glow) / .8); }
html.lk .auth-message { border: 0; background: color-mix(in srgb, var(--fg) 7%, transparent); }
html.lk [data-paid-download][data-locked]:not(.button-primary) { background: var(--lk-well); box-shadow: inset 0 2px 6px rgb(0 0 0 / calc(.7 * var(--q))), inset 0 2px 5px rgb(80 68 55 / calc(.16 * var(--p))), inset 0 -1.5px 2px rgb(255 255 255 / calc(.9 * var(--p))); }
html.lk .portal-file-list [data-paid-download][data-locked] { background: none; box-shadow: none; }
html.lk .portal-product-price { font-size: 30px; }
}
.button[data-paid-download][data-locked] { gap: 8px; }
.button[data-paid-download][data-locked]::before { margin-right: 0; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: 0 !important; }
.portal-product-purchase .button { white-space: nowrap; flex: none; }
.account-tabs button[aria-selected=true] { font-weight: 600; }
.flow-device-note { padding: 10px 13px; border-radius: 12px; background: var(--soft); color: var(--fg); font-size: 13px; margin-top: 10px; }
/* light rims extend past their control; never let them create sideways scroll in a dialog */
html.lk dialog { overflow-x: hidden; }

/* ---- detail dialogs: media left, decision right (free skill + video share the paid layout) ---- */
dialog { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fg) 26%, transparent) transparent; }
.portal-content-text { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fg) 26%, transparent) transparent; }
.portal-detail-split { max-width: 1180px; width: calc(100% - 64px); padding: 26px 30px 30px; }
.portal-detail-split > .dialog-top { margin-bottom: 20px; }
.portal-split-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 30px; align-items: start; }
.portal-split-grid.portal-split-single { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin-inline: auto; }
.portal-split-media, .portal-split-info { min-width: 0; }
.portal-split-media { position: sticky; top: 0; }
.portal-split-media .portal-detail-media { margin-top: 0; background: transparent; }
.portal-split-media .portal-detail-media > img { max-height: none; height: auto; background: transparent; }
.portal-split-media .portal-detail-media > video { max-height: min(70vh, 640px); aspect-ratio: 16 / 9; background: #000; }
.portal-split-media .portal-source-note { margin: 10px 2px 0; font-size: 12px; }
.portal-split-info { padding: 24px 26px 22px; border: 1px solid var(--line); border-radius: 20px; }
.portal-split-info > h2, .portal-split-info .portal-product-heading h2 { font: 600 28px/1.25 var(--display); margin: 0; letter-spacing: 0; overflow-wrap: anywhere; }
.portal-split-info > h2 + .portal-content-section, .portal-split-info .portal-product-heading + .portal-content-section { margin-top: 20px; }
.portal-split-info .portal-content-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.portal-split-info .portal-content-section[hidden] { display: none; }
.portal-split-info .portal-content-section h3 { font: 600 17px/1.4 var(--sans); margin-bottom: 6px; }
.portal-split-info .portal-content-note { font-size: 13px; line-height: 1.75; }
.portal-split-info > .portal-content-note { margin-top: 10px; }
.portal-split-info .portal-content-text { margin: 12px 0 0; max-height: 34vh; }
.portal-split-info .portal-content-actions { margin-top: 14px; }
.portal-split-info .portal-copy-feedback:empty { display: none; }
.portal-detail-facts { margin: 8px 0 0; color: var(--muted); font: 400 13px/1.6 var(--sans); overflow-wrap: anywhere; }
.portal-detail-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.portal-source-stats { margin: 14px 0 0; color: var(--muted); font: 400 11px/1.7 var(--sans); overflow-wrap: anywhere; opacity: .85; }
.portal-product-info .portal-source-stats { margin-top: 16px; }
html.lk .portal-split-info { border: 0; border-radius: 24px; background: var(--lk-soft); box-shadow: inset 0 0 0 1px rgb(255 255 255 / calc(.08 * var(--q))), inset 0 1.5px 0 rgb(255 255 255 / calc(.1 * var(--q) + .95 * var(--p))), 0 8px 20px rgb(70 58 45 / calc(.12 * var(--p))); }
html.lk .portal-split-media .portal-detail-media { border: 0; border-radius: 20px; box-shadow: 0 10px 28px rgb(0 0 0 / calc(.45 * var(--q))), 0 8px 22px rgb(70 58 45 / calc(.16 * var(--p))); }
@media (max-width: 1023px) { .portal-detail-split { width: calc(100% - 40px); padding: 23px; } .portal-split-grid { gap: 22px; } .portal-split-info { padding: 20px; } }
@media (max-width: 799px) {
  .portal-detail-split { width: calc(100% - 24px); padding: 18px; }
  .portal-detail-split > .dialog-top { margin-bottom: 14px; }
  .portal-split-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .portal-split-media { position: static; }
  .portal-split-media .portal-detail-media > video { max-height: 42vh; }
  .portal-split-info { padding: 18px 16px; }
  .portal-split-info > h2, .portal-split-info .portal-product-heading h2 { font-size: 22px; }
  .portal-split-info .portal-content-actions .button { flex: 1 1 auto; }
}
