/*
 * Josoor design system — the public side's shared parts: header, mega menu, search overlay, phone drawer, footer
 * and the one course card. Prefix `pub-` (the course card keeps the short `cc-` of the approved prototype).
 * Tokens only (tokens.css): the neutral palette, the brand and the accents are read, never written here.
 * Mobile first, RTL (logical properties), no fixed widths above a phone's.
 */

/* ── Section accent (the featured section's colour: marker, header pill, band, hub hero — never a button) ── */
body {
  --section: var(--section-base);
  --section-soft: color-mix(in srgb, var(--section-base) 10%, var(--surface));
  --section-band: color-mix(in srgb, var(--section-base) 7%, var(--bg));
  --section-line: color-mix(in srgb, var(--section-base) 38%, transparent);
  --brand-line: color-mix(in srgb, var(--brand) 22%, transparent);
}
:root[data-theme="dark"] body {
  --section: var(--section-night);
  --section-soft: color-mix(in srgb, var(--section-base) 24%, var(--surface));
  --section-band: color-mix(in srgb, var(--section-base) 13%, var(--bg));
  --section-line: color-mix(in srgb, var(--section-night) 40%, transparent);
  --brand-line: color-mix(in srgb, var(--brand) 32%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) body {
    --section: var(--section-night);
    --section-soft: color-mix(in srgb, var(--section-base) 24%, var(--surface));
    --section-band: color-mix(in srgb, var(--section-base) 13%, var(--bg));
    --section-line: color-mix(in srgb, var(--section-night) 40%, transparent);
    --brand-line: color-mix(in srgb, var(--brand) 32%, transparent);
  }
}

/* ── Shared atoms ─────────────────────────────────────────────────────────────── */
svg.icon.pi { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; }
svg.icon.pi.i-sm { width: 16px; height: 16px; }
.pub-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pub-wrap { width: 100%; max-width: 1232px; margin-inline: auto; box-sizing: border-box;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 768px) { .pub-wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.pub-link { color: var(--brand); font-weight: var(--fw-semibold); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pub-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.pub-kbd { font-size: 11px; color: var(--text-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-family: var(--font); }
.mk { display: inline-flex; align-items: center; gap: 7px; color: var(--section); font-weight: var(--fw-semibold); }
.mk::before { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: var(--section); rotate: 45deg; flex: none; }
.mk-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--section); rotate: 45deg; flex: none; }
.pub-skip { position: absolute; inset-inline-start: var(--sp-4); top: -64px; z-index: 100; padding: 8px 14px; border-radius: var(--radius);
  background: var(--brand); color: var(--brand-ink); font-weight: var(--fw-semibold); text-decoration: none; }
.pub-skip:focus { top: var(--sp-3); }
.pub-hdr :focus-visible, .pub-ftr :focus-visible, .pub-srch :focus-visible, .pub-drawer :focus-visible, .cc :focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; box-shadow: none; border-radius: 4px; }

/* ── Header ───────────────────────────────────────────────────────────────────── */
.pub-hdr { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--border);
  font-family: var(--font); color: var(--text); line-height: 1.6; }
.admin-bar .pub-hdr { top: 32px; }
@media (max-width: 782px) { .admin-bar .pub-hdr { top: 0; } }
.pub-hdr-in { display: flex; align-items: center; gap: var(--sp-4); height: var(--pub-hdr-h); }
.pub-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; flex: 0 1 auto; }
.pub-logo-img { width: 34px; height: 34px; flex: none; object-fit: contain; border-radius: 9px; }
.pub-logo-mark { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--brand);
  color: var(--brand-ink); font-weight: var(--fw-bold); }
.pub-logo-name { font-size: var(--fs-lg); font-weight: var(--fw-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: var(--sp-4); min-width: 0; }
.pub-nav a, .pub-nav-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: var(--radius);
  color: var(--text-2); text-decoration: none; font: inherit; font-size: var(--fs-md); font-weight: var(--fw-medium);
  border: 1px solid transparent; background: none; cursor: pointer; white-space: nowrap; }
.pub-nav a:hover, .pub-nav-btn:hover { color: var(--text); background: var(--surface-2); }
.pub-nav [aria-current="page"], .pub-nav-btn[aria-expanded="true"], .pub-nav-btn[data-current] { color: var(--text); background: var(--surface-2); }
.pub-nav-btn svg.icon.pi { transition: rotate .15s; }
.pub-nav-btn[aria-expanded="true"] svg.icon.pi { rotate: 180deg; }
.pub-nav .pub-feat { color: var(--text); font-weight: var(--fw-semibold); border-color: var(--section-line); border-radius: var(--radius-pill);
  padding: 0 14px 0 16px; margin-inline: 4px; gap: 8px; }
.pub-nav .pub-feat:hover, .pub-nav .pub-feat[aria-current="page"] { background: var(--section-soft); border-color: var(--section); }
.pub-sep { width: 1px; height: 20px; background: var(--border); margin-inline: 6px; flex: none; }
.pub-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.pub-iconbtn { width: 40px; height: 40px; position: relative; border: 0; background: none; color: var(--text-2); cursor: pointer; }
.pub-wide { display: none !important; }
@media (min-width: 1080px) {
  .pub-wide { display: flex !important; }
  .pub-actions .ds-btn.pub-wide { display: inline-flex !important; }
  .pub-narrow { display: none !important; }
}

/* Mega menu */
.pub-mega { position: absolute; inset-inline: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.pub-mega[hidden] { display: none; }
.pub-mega-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 230px; gap: 40px; padding-block: 28px 32px; }
.pub-mega-in.no-feat { grid-template-columns: minmax(0, 2fr) 230px; }
.pub-mega-col { min-width: 0; display: flex; flex-direction: column; }
.pub-mega-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-2); border-bottom: 1px solid var(--border); }
.pub-mega-head h2 { margin: 0; font-size: var(--fs-base); font-weight: var(--fw-bold); display: flex; align-items: center; gap: 8px; }
.pub-mega-head .sub { font-size: var(--fs-xs); color: var(--text-3); }
.pub-mega-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 36px; }
.pub-mega-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-inline: -10px; border-radius: var(--radius);
  text-decoration: none; color: var(--text); font-size: var(--fs-md); min-width: 0; }
.pub-mega-list a:hover { background: var(--surface-2); }
.pub-mega-list svg.icon.pi { color: var(--brand); }
.pub-mega-list .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-mega-list .c { color: var(--text-3); font-size: var(--fs-xs); }
.pub-mega-all { margin-top: auto; padding-top: var(--sp-4); align-self: flex-start; }
.pub-mega-side { border-inline-start: 1px solid var(--border); padding-inline-start: var(--sp-8); display: flex; flex-direction: column; gap: 4px; }
.pub-mega-side a { display: block; padding: 10px 12px; margin-inline: -12px; border-radius: var(--radius); text-decoration: none; color: var(--text); }
.pub-mega-side a:hover { background: var(--surface-2); }
.pub-mega-side b { display: flex; align-items: center; gap: 8px; font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.pub-mega-side span { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }

/* Dialogs: search, drawer (and the catalog's filter sheet in catalog.css) */
.pub-srch, .pub-drawer, .pub-sheet { border: 0; padding: 0; color: var(--text); background: var(--surface); font-family: var(--font); line-height: 1.6; }
.pub-srch::backdrop, .pub-drawer::backdrop, .pub-sheet::backdrop { background: var(--scrim); }
.pub-srch { margin: min(12vh, 96px) auto auto; width: min(680px, calc(100% - 32px)); max-width: none; max-height: min(640px, 80vh);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; flex-direction: column; }
.pub-srch[open] { display: flex; }
.pub-srch-bar { display: flex; align-items: center; gap: 10px; padding: 0 var(--sp-4); border-bottom: 1px solid var(--border); }
.pub-srch-bar > svg.icon.pi { color: var(--text-3); }
.pub-srch-bar input { flex: 1; min-width: 0; height: 60px; border: 0; background: none; color: var(--text); font: inherit; font-size: 1.0625rem; outline: none; }
.pub-srch-bar input::-webkit-search-cancel-button { display: none; }
.pub-esc { border: 0; background: none; padding: 8px; cursor: pointer; }
.pub-srch-body { overflow: auto; padding: var(--sp-2) var(--sp-2) var(--sp-4); }
.pub-srch-group h3 { margin: 0; font-size: var(--fs-xs); color: var(--text-3); font-weight: var(--fw-semibold); padding: 12px 12px 6px; }
.pub-srch-group ul { list-style: none; margin: 0; padding: 0; }
.pub-srch-group a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); text-decoration: none; color: var(--text); min-width: 0; }
.pub-srch-group a:hover, .pub-srch-group a:focus-visible { background: var(--surface-2); outline: none; }
.pub-srch-group a:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); }
.pub-srch-ic { width: 36px; height: 36px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.pub-srch-t { flex: 1; min-width: 0; }
.pub-srch-t b { display: block; font-weight: var(--fw-semibold); font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-srch-t span { display: block; font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-srch-t mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.pub-srch-empty { padding: 28px 16px; text-align: center; color: var(--text-2); font-size: var(--fs-md); }
.pub-srch-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-3); flex-wrap: wrap; }
@media (max-width: 520px) { .pub-srch-foot { display: none; } .pub-srch { margin-top: 12px; max-height: calc(100dvh - 24px); } }

.pub-drawer { margin: 0; inset-inline-start: 0; inset-inline-end: auto; height: 100dvh; max-height: none; width: min(360px, 88vw); max-width: none;
  border-inline-end: 1px solid var(--border); flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.pub-drawer[open] { display: flex; }
.pub-drawer-head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding-inline: 16px; border-bottom: 1px solid var(--border); flex: none; }
.pub-drawer-title { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.pub-drawer-body { overflow: auto; padding: 12px 16px; flex: 1; }
.pub-drawer-body details { border-bottom: 1px solid var(--border); }
.pub-drawer-body summary { display: flex; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; font-weight: var(--fw-semibold); list-style: none; }
.pub-drawer-body summary::-webkit-details-marker { display: none; }
.pub-drawer-body summary > svg.icon.pi:last-child { margin-inline-start: auto; color: var(--text-3); transition: rotate .15s; }
.pub-drawer-body details[open] summary > svg.icon.pi:last-child { rotate: 180deg; }
.pub-drawer-body ul { list-style: none; margin: 0 0 12px; padding: 0; }
.pub-drawer-body li a { display: flex; align-items: center; gap: 10px; padding: 9px 4px; text-decoration: none; color: var(--text-2); font-size: var(--fs-md); }
.pub-drawer-body li a b { color: var(--text); }
.pub-drawer-body li a .c { margin-inline-start: auto; font-size: var(--fs-xs); color: var(--text-3); }
.pub-drawer-links { margin-top: 8px !important; }
.pub-drawer-links a { min-height: 46px; padding: 0 4px !important; font-weight: var(--fw-medium); color: var(--text) !important; font-size: var(--fs-base) !important; }
.pub-drawer-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); flex: none; }
.pub-drawer-foot.one { grid-template-columns: 1fr; }

/* ── Footer ───────────────────────────────────────────────────────────────────── */
.pub-ftr { background: var(--surface); border-top: 1px solid var(--border); font-family: var(--font); color: var(--text); line-height: 1.6; }
.pub-ftr-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 40px; padding-block: 56px 32px; }
.pub-ftr .sp-footer-brand p, .pub-ftr .sp-footer-about { color: var(--text-2); font-size: var(--fs-md); margin: 14px 0 0; max-width: 26em; line-height: 1.8; }
.pub-ftr h2 { font-size: var(--fs-sm); font-weight: var(--fw-bold); margin: 0 0 12px; color: var(--text); }
.pub-ftr-col a { display: block; padding: 4px 0; color: var(--text-2); text-decoration: none; font-size: var(--fs-md); }
.pub-ftr-col a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.pub-ftr .sp-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.pub-ftr .sp-brand-logo, .pub-ftr .sp-brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.pub-ftr .sp-brand-mark { display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: var(--fw-bold); }
.pub-ftr .sp-brand-name { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.pub-ftr-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-3); margin: 0; }
.pub-ftr-bottom p { margin: 0; }
@media (max-width: 899px) { .pub-ftr-grid { grid-template-columns: 1fr 1fr; } .pub-ftr .sp-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .pub-ftr-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ── Course card (one component: catalog, hub, landing bands, related) ───────── */
.cc { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; min-width: 0; transition: border-color .15s, box-shadow .15s; font-family: var(--font); line-height: 1.75; }
.cc:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.cc-cover { position: relative; height: 124px; display: grid; place-items: center; overflow: hidden; --tone: var(--hue-slate);
  background: color-mix(in srgb, var(--tone) var(--cover-bg), var(--surface)); color: color-mix(in srgb, var(--tone) var(--cover-ink), var(--cover-ink-to)); }
.tone-teal { --tone: var(--hue-teal); } .tone-blue { --tone: var(--hue-blue); } .tone-green { --tone: var(--hue-green); }
.tone-sea { --tone: var(--hue-sea); } .tone-sage { --tone: var(--hue-sage); } .tone-steel { --tone: var(--hue-steel); }
.tone-ochre { --tone: var(--hue-ochre); } .tone-plum { --tone: var(--hue-plum); } .tone-slate { --tone: var(--hue-slate); } .tone-clay { --tone: var(--hue-clay); }
.cc-cover svg.icon.pi.ic { width: 50px; height: 50px; stroke-width: 1.5; }
.cc-arch { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 46px; fill: none;
  stroke: color-mix(in srgb, var(--tone, var(--brand)) var(--cover-line), transparent); stroke-width: 1.25; }
.cc-arch * { vector-effect: non-scaling-stroke; }
.cc-tags { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.cc-tags .ds-pill { font-size: var(--fs-xs); }
.cc-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 14px; flex: 1; min-width: 0; }
.cc-mark { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-2); min-width: 0; white-space: nowrap; }
.cc-mark .sp { overflow: hidden; text-overflow: ellipsis; }
.cc-mark .gen { color: var(--text-3); font-weight: var(--fw-semibold); }
.cc-mark .sep { color: var(--text-3); }
.cc-title { margin: 0; font-size: 1rem; font-weight: var(--fw-semibold); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 3.2em; overflow-wrap: anywhere; }
.cc-title a { text-decoration: none; color: var(--text); }
.cc-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: var(--radius-lg); }
.cc-title a:focus-visible { outline: none; }
.cc:has(.cc-title a:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.cc-desc { margin: 0; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-xs); color: var(--text-2); }
.cc-meta span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.cc-meta .icon { width: 15px; height: 15px; color: var(--text-3); }
.cc-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.hrs { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text);
  border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: var(--radius-pill); padding: 2px 10px 2px 9px; white-space: nowrap; }
.hrs .icon { width: 14px; height: 14px; color: var(--brand); }
.cc-rates { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cc-rate { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: var(--fs-xs); color: var(--text-2); }
.cc-rate:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.cc-stars { color: var(--warn); letter-spacing: 1px; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.cc-price-slot { min-width: 0; }
.cc-price { font-size: var(--fs-lg); font-weight: var(--fw-bold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-price small { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-2); margin-inline-start: 4px; }
.cc-price s { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-3); margin-inline-end: 6px; }
.cc-of { display: block; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-3); line-height: 1.3; }
.cc-free { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--ok); }
.cc-soon { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-2); line-height: 1.4; }
.cc-soon svg.icon.pi { width: 16px; height: 16px; color: var(--warn); }
.cc-state { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ok); }
.cc-foot .ds-btn, .cc-foot button, .cc-foot a { position: relative; z-index: 1; flex: none; }

/* ── Bundle card (catalog tab, hub block, landing band) ───────────────────────── */
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.bd { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); min-width: 0;
  font-family: var(--font); line-height: 1.75; color: var(--text); }
.bd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--fs-xs); color: var(--text-2); }
.bd-top .lbl { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--fw-semibold); }
.bd-top .lbl svg.icon.pi { color: var(--brand); }
.bd-gen { color: var(--text-3); font-weight: var(--fw-semibold); }
.bd h3 { margin: 0; font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: 1.4; }
.bd h3 a { text-decoration: none; color: var(--text); }
.bd h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bd-desc { margin: 6px 0 0; font-size: var(--fs-md); color: var(--text-2); }
.bd-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.bd-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-md); min-width: 0; }
.bd-list .ic { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.bd-list .ic svg.icon.pi { width: 18px; height: 18px; }
.bd-list .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); text-decoration: none; }
.bd-list a.t:hover { text-decoration: underline; text-underline-offset: 3px; }
.bd-list .p { color: var(--text-3); font-size: var(--fs-sm); white-space: nowrap; }
.bd-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: var(--fs-xs); color: var(--text-2); }
.bd-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.bd-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.bd-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bd-price b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.bd-price s { color: var(--text-3); font-size: var(--fs-sm); }
.bd-save { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ok); }
@media (max-width: 520px) { .bd { padding: 18px; } }

/* ── The certificate verification page (templates/page-verify-certificate.php) ─────────── */
.vp-page { display: block; font-family: var(--font); color: var(--text); line-height: 1.75; outline: none; min-height: 55vh; }
.vp-wrap { max-width: 760px; padding-bottom: 80px; }
.vp-head h1 { margin: 12px 0 0; font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.375rem); line-height: 1.35; }
.vp-head p { margin: 6px 0 0; color: var(--text-2); max-width: 640px; }
.vp-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 24px; }
.vp-form .ds-field { flex: 1; min-width: 0; margin: 0; }
.vp-form .ds-input { height: 44px; letter-spacing: 1px; text-transform: uppercase; }
.vp-form .ds-btn { height: 44px; margin-bottom: 30px; }
.vp-hint { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-top: 6px; }
.vp-res { margin-top: 28px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.vp-res-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.vp-res-head svg.icon.pi { width: 26px; height: 26px; }
.vp-res-head b { font-size: var(--fs-lg); }
.vp-res.ok .vp-res-head { background: var(--ok-soft); color: var(--ok); }
.vp-res.bad .vp-res-head { background: var(--bad-soft); color: var(--bad); }
.vp-res > p { margin: 0; padding: 16px 20px; color: var(--text-2); }
.vp-rows .row { display: grid; grid-template-columns: 180px minmax(0, 1fr); border-bottom: 1px solid var(--border); }
.vp-rows .row > * { padding: 12px 20px; min-width: 0; overflow-wrap: anywhere; }
.vp-rows .row .k { color: var(--text-2); font-size: var(--fs-sm); }
.vp-rows .row b { font-weight: var(--fw-semibold); }
.vp-res-foot { padding: 16px 20px; }
@media (max-width: 520px) {
  .vp-form { flex-direction: column; align-items: stretch; } .vp-form .ds-btn { margin-bottom: 0; }
  .vp-rows .row { grid-template-columns: 1fr; } .vp-rows .row .k { padding-bottom: 0; } .vp-rows .row b { padding-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .pub-hdr *, .pub-srch *, .pub-drawer *, .cc, .cc * { transition: none !important; animation: none !important; }
}
@media print { .pub-hdr, .pub-srch, .pub-drawer { display: none !important; } }
