:root {
  --orange: #f07d00;
  --orange-600: #d36c00;
  --accent: #f07d00;
  --accent-hover: #d36c00;
  --green-text: #007a4d;
  --orange-50: #fff4e8;
  --orange-100: #ffe6cc;
  --green: #00965e;
  --green-50: #e6f5ee;
  --red: #c62828;
  --red-50: #fdecec;
  --amber: #8a5200;
  --amber-50: #fff6e0;
  --blue: #1f5fa8;
  --blue-50: #e9f1fb;
  --ink: #1d1d1b;
  --ink-2: #3c3c3a;
  --muted: #6b6a66;
  --line: #e6e1da;
  --line-2: #d6cfc6;
  --bg: #f7f5f2;
  --card: #ffffff;
  --surface-2: #fcfbf9;
  --on-ink: #ffffff;
  --orange-hover: #d36c00;
  --blue-ink: #17406f;
  --amber-ink: #6b4300;
  --red-ink: #8a1c1c;
  --green-ink: #035c3b;
  --footer-bg: #1d1d1b;
  --footer-ink: #cfcac3;
  --backdrop: rgba(29, 29, 27, 0.5);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(29, 29, 27, 0.05), 0 4px 18px rgba(29, 29, 27, 0.06);
  --shadow-lg: 0 12px 40px rgba(29, 29, 27, 0.18);
  --focus: 0 0 0 3px rgba(240, 125, 0, 0.35);
  color-scheme: light;
}

/* ---- dark theme: the system preference (unless the viewer chose light), or the viewer's choice ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --orange: #f07d00;
  --orange-600: #ff9d3d;
  --orange-hover: #ff8f1f;
  --accent: #f07d00;
  --accent-hover: #ff8f1f;
  --green-text: #35c48c;
  --orange-50: #33220f;
  --orange-100: #57360f;
  --green: #35c48c;
  --green-50: #12291f;
  --red: #ff6b6b;
  --red-50: #3a1818;
  --amber: #f0b35a;
  --amber-50: #33260f;
  --blue: #86b6f2;
  --blue-50: #152338;
  --ink: #f1ede8;
  --ink-2: #d6d1ca;
  --muted: #a29d95;
  --line: #34312d;
  --line-2: #4a4641;
  --bg: #121110;
  --card: #1d1b19;
  --surface-2: #25231f;
  --on-ink: #151413;
  --blue-ink: #c3dbf8;
  --amber-ink: #f6d7a3;
  --red-ink: #ffc8c8;
  --green-ink: #aeebd0;
  --footer-bg: #0b0b0a;
  --footer-ink: #a9a49c;
  --backdrop: rgba(0, 0, 0, 0.65);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --focus: 0 0 0 3px rgba(255, 157, 61, 0.45);
  color-scheme: dark;
  }
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
  :root:not([data-theme="light"]) .field input::-webkit-calendar-picker-indicator { filter: invert(0.85); }
}
:root[data-theme="dark"] {
  --orange: #f07d00;
  --orange-600: #ff9d3d;
  --orange-hover: #ff8f1f;
  --accent: #f07d00;
  --accent-hover: #ff8f1f;
  --green-text: #35c48c;
  --orange-50: #33220f;
  --orange-100: #57360f;
  --green: #35c48c;
  --green-50: #12291f;
  --red: #ff6b6b;
  --red-50: #3a1818;
  --amber: #f0b35a;
  --amber-50: #33260f;
  --blue: #86b6f2;
  --blue-50: #152338;
  --ink: #f1ede8;
  --ink-2: #d6d1ca;
  --muted: #a29d95;
  --line: #34312d;
  --line-2: #4a4641;
  --bg: #121110;
  --card: #1d1b19;
  --surface-2: #25231f;
  --on-ink: #151413;
  --blue-ink: #c3dbf8;
  --amber-ink: #f6d7a3;
  --red-ink: #ffc8c8;
  --green-ink: #aeebd0;
  --footer-bg: #0b0b0a;
  --footer-ink: #a9a49c;
  --backdrop: rgba(0, 0, 0, 0.65);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --focus: 0 0 0 3px rgba(255, 157, 61, 0.45);
  color-scheme: dark;
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
:root[data-theme="dark"] .field input::-webkit-calendar-picker-indicator { filter: invert(0.85); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
a { color: var(--orange-600); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 0.8em; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--on-ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.icon-sm { width: 15px; height: 15px; vertical-align: -2px; }

/* ---- top bar ------------------------------------------------------------- */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar-in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo { height: 42px; width: auto; display: block; }
.logo-dark { display: none; }
.footer-logo { height: 46px; width: auto; display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; padding-left: 14px; border-left: 1.5px solid var(--line-2); }
.brand-txt b { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.brand-txt small { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.mainnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.navlink { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; border: 0; background: none; cursor: pointer; }
.navlink:hover { background: var(--bg); }
.navlink.active { color: var(--orange-600); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; text-transform: uppercase; }

/* ---- buttons & fields ------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.btn:hover { background: var(--ink); color: var(--on-ink); }
.btn:focus-visible, .field input:focus, .field select:focus, .field textarea:focus, .navlink:focus-visible, .chip:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: var(--on-ink); }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn.in-basket { background: var(--green-50); border-color: var(--green-text); color: var(--green-text); }
.iconbtn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--bg); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: 12.5px; font-weight: 700; }
.field .req { color: var(--orange-600); }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 13px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); }
.field textarea { min-height: 90px; resize: vertical; }
.field input[readonly] { background: var(--bg); color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field input:invalid:not(:placeholder-shown):not(:focus):not([type="date"]) { border-color: var(--red); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.span-2 { grid-column: span 2; }
.radios { display: flex; gap: 10px; flex-wrap: wrap; }
.radio, .check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; }
.radio input, .check input { width: 19px; height: 19px; accent-color: var(--orange); margin: 0; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; background: var(--card); }
.choice:has(input:checked) { border-color: var(--orange); background: var(--orange-50); }
.choice input { margin-top: 3px; accent-color: var(--orange); width: 18px; height: 18px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); font-size: 13px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.tag-lang { background: var(--card); border: 1px solid var(--line); }
.tag-ok { background: var(--green-50); color: var(--green-text); }
.tag-warn { background: var(--amber-50); color: var(--amber); }
.tag-bad { background: var(--red-50); color: var(--red); }
.tag-info { background: var(--blue-50); color: var(--blue); }
.tag-orange { background: var(--accent); color: #fff; }

/* ---- cards & layout -------------------------------------------------------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card-tight { padding: 16px; }
.section { padding-top: 34px; padding-bottom: 56px; } /* longhands: keep the side gutter of .wrap */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); }
.eyebrow { color: var(--orange-600); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; color: var(--line-2); margin-bottom: 8px; }
.notice { display: flex; gap: 12px; padding: 13px 16px; border-radius: var(--radius-sm); background: var(--blue-50); color: var(--blue-ink); font-size: 14px; }
.notice-warn { background: var(--amber-50); color: var(--amber-ink); }
.notice-bad { background: var(--red-50); color: var(--red-ink); }
.notice-ok { background: var(--green-50); color: var(--green-ink); }
.notice ul { margin: 4px 0 0; padding-left: 18px; }

/* ---- hero ------------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(115deg, #5a2c00 0%, #8b4300 45%, var(--orange) 100%); }
.hero::after { content: ""; position: absolute; inset: 0; background: url("header-pattern.svg") right top / 690px 610px no-repeat; pointer-events: none; }
.hero-in { position: relative; z-index: 1; padding: 56px 20px 60px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { text-transform: uppercase; margin: 0 0 12px; }
.hero p { font-size: 16px; opacity: 0.92; max-width: 34em; }
.hero-search { background: rgba(255, 255, 255, 0.12); border-top: 4px solid var(--orange); padding: 20px; border-radius: 0 0 var(--radius) var(--radius); backdrop-filter: blur(4px); }
.hero-search label { font-size: 14px; opacity: 0.95; display: block; margin-bottom: 10px; }
.searchbox { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 999px; padding: 4px 4px 4px 18px; color: var(--ink); }
.searchbox input { flex: 1; border: 0; outline: none; min-height: 44px; background: transparent; font-size: 15px; min-width: 0; }
.searchbox:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45); }
.hero-stats { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stat { position: relative; padding-bottom: 6px; }
.stat::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; border-radius: 2px; background: var(--orange); box-shadow: 0 0 12px rgba(255, 170, 80, 0.8); transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1); }
.stat.counting::after, .stat.landed::after { width: 28px; }
.stat.counting b { text-shadow: 0 0 18px rgba(255, 200, 140, 0.55); }
.stat.landed b { animation: stat-land 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: left bottom; }
@keyframes stat-land { 0% { transform: scale(1); } 45% { transform: scale(1.14); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .stat::after { transition: none; width: 28px; }
  .stat.landed b { animation: none; }
}
.hero-stats span { font-size: 12px; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- catalogue ------------------------------------------------------------- */
.catalogue { display: grid; grid-template-columns: 290px 1fr; gap: 26px; align-items: start; }
.filters { position: sticky; top: 88px; }
.filters h3 { display: flex; align-items: center; gap: 8px; text-transform: uppercase; font-size: 15px; }
.fgroup { padding: 16px 0; border-top: 1px solid var(--line); }
.fgroup:first-of-type { border-top: 0; }
.fgroup-title { color: var(--orange-600); font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.fgroup .chips { display: flex; gap: 7px; flex-wrap: wrap; }
.fgroup .checks { display: flex; flex-direction: column; gap: 7px; max-height: 260px; overflow: auto; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type=range] { flex: 1; accent-color: var(--orange); }
.filters-toggle { display: none; }
.results-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.results-count { font-weight: 800; font-size: 15px; }
.results-count span { color: var(--orange-600); }
.results-head select { min-height: 38px; border: 1.5px solid var(--line-2); border-radius: 999px; padding: 0 12px; background: var(--card); }
.clist { display: flex; flex-direction: column; gap: 14px; }
.ccard { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 18px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1.5px solid transparent; transition: border-color 0.15s, transform 0.15s; }
.ccard:hover { border-color: var(--orange-100); }
.ccard-top { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.ccard h3 { margin: 0 0 6px; font-size: 16.5px; }
.ccard h3 a { color: var(--orange-600); text-decoration: none; }
.ccard h3 a:hover { text-decoration: underline; }
.ccard .blurb { color: var(--ink-2); font-size: 13.5px; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .icon { color: var(--muted); width: 16px; height: 16px; }
.ccard-side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; justify-content: center; min-width: 150px; }
.thumb { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.ccard-main { display: flex; gap: 16px; min-width: 0; }
.ccard-body { min-width: 0; }
.more { display: flex; justify-content: center; margin-top: 18px; }

/* ---- course page ------------------------------------------------------------ */
.cbanner { color: #fff; position: relative; overflow: hidden; }
.cbanner::after { content: ""; position: absolute; inset: 0; background: url("header-pattern.svg") right top / 690px 610px no-repeat; }
.cbanner-in { position: relative; z-index: 1; padding: 42px 20px 46px; }
.cbanner .num { font-size: 30px; font-weight: 800; color: #ffd2a3; }
.cbanner h1 { max-width: 30em; font-size: clamp(22px, 2.8vw, 34px); }
.crumbs { font-size: 13px; margin-bottom: 18px; }
.crumbs a { color: #fff; opacity: 0.85; }
.course-grid { display: grid; grid-template-columns: 300px 1fr; gap: 34px; align-items: start; margin-top: -26px; position: relative; z-index: 2; }
.course-aside { position: sticky; top: 88px; }
.aside-head { background: var(--accent); color: #fff; font-weight: 800; padding: 14px 20px; border-radius: var(--radius) var(--radius) 0 0; text-transform: uppercase; font-size: 13px; letter-spacing: 0.04em; }
.aside-body { background: var(--card); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); padding: 10px 20px 20px; }
.toc { list-style: none; padding: 0; margin: 0 0 14px; }
.toc a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; }
.toc a:hover { color: var(--orange-600); }
.course-main { padding-top: 46px; min-width: 0; }
.facts { display: grid; grid-template-columns: repeat(5, auto); justify-content: start; gap: 8px 30px; padding-bottom: 14px; border-bottom: 2px solid var(--line-2); margin: 14px 0 26px; }
.facts small { display: block; font-size: 12px; color: var(--muted); }
.facts b { font-size: 14.5px; }
.prose h2 { margin-top: 30px; }
.prose ul { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 20px; margin: 6px 0; }
.prose li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 6px; height: 6px; background: var(--ink); }
.sessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.session { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.session.past { background: var(--surface-2); border-style: dashed; color: var(--muted); }
.session.past .session-name, .session.past b { color: var(--muted); }
.session-name { color: var(--orange-600); font-weight: 800; }
.seances { font-size: 13px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 4px 0; }
.seances b { font-weight: 700; }
.session .btn { margin-top: auto; }

/* ---- form panel ------------------------------------------------------------- */
.formcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 40px; }
.formcard h2.step { color: var(--orange-600); font-size: 18px; margin: 28px 0 14px; }
.formcard h2.step:first-of-type { margin-top: 8px; }
.formgrid { display: grid; gap: 16px; }
.success { text-align: center; padding: 30px 10px; }
.success .big { width: 64px; height: 64px; border-radius: 50%; background: var(--green-50); color: var(--green-text); display: inline-grid; place-items: center; margin-bottom: 12px; }
.success .big .icon { width: 34px; height: 34px; }
.refno { font-family: ui-monospace, "SF Mono", Menlo, monospace; background: var(--bg); padding: 3px 10px; border-radius: 6px; font-weight: 700; }

/* ---- workspace -------------------------------------------------------------- */
.ws { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.wsnav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 3px; }
.wsnav .who { display: flex; gap: 11px; align-items: center; padding: 6px 10px 16px; }
.wsnav .who b { display: block; font-size: 14px; }
.wsnav .who small { color: var(--muted); font-size: 12px; }
.wslink { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.wslink:hover { background: var(--card); }
.wslink.active { background: var(--card); box-shadow: var(--shadow); color: var(--orange-600); }
.wslink .badge { margin-left: auto; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; border: 1.5px solid transparent; }
.kpi:hover { border-color: var(--orange-100); }
.kpi .icon { color: var(--orange); width: 22px; height: 22px; }
.kpi b { font-size: 28px; font-weight: 800; line-height: 1.1; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-top: 18px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 58px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.datebox { background: var(--orange-50); color: var(--orange-600); border-radius: 10px; text-align: center; padding: 6px 0; font-weight: 800; line-height: 1.1; }
.datebox b { display: block; font-size: 20px; }
.datebox small { font-size: 11px; text-transform: uppercase; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.checklist li:first-child { border-top: 0; }
.dot { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.dot-ok { background: var(--green); color: var(--on-ink); }
.dot-todo { border: 2px solid var(--line-2); }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1.5px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .check input { width: 18px; height: 18px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .searchbox { border: 1.5px solid var(--line-2); padding-left: 14px; flex: 1; min-width: 220px; max-width: 380px; }
.toolbar .searchbox input { min-height: 38px; }

/* wizard */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 22px; counter-reset: s; }
.stepper { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line); font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; text-align: left; }
.stepper .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); font-size: 13px; flex: none; }
.stepper.active { border-color: var(--orange); color: var(--ink); }
.stepper.active .n { background: var(--accent); color: #fff; }
.stepper.done .n { background: var(--green); color: var(--on-ink); }
.stepper[disabled] { cursor: default; }
.wiz-foot { display: flex; gap: 10px; justify-content: space-between; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.item-row { display: grid; grid-template-columns: 1fr 300px auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.item-row:first-child { border-top: 0; }
.item-row .field select { min-height: 40px; }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 10; max-height: 340px; overflow: auto; }
.suggest-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; cursor: pointer; border-top: 1px solid var(--line); font-size: 14px; }
.suggest-list button:hover, .suggest-list button:focus { background: var(--orange-50); outline: none; }
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix th { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink); max-width: 160px; white-space: normal; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 18px; background: var(--orange-50); border-radius: var(--radius-sm); font-weight: 700; }
.total b { font-size: 22px; color: var(--orange-600); white-space: nowrap; }

.req-card { border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.req-head { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 16px 20px; cursor: pointer; width: 100%; border: 0; background: none; text-align: left; }
.req-body { padding: 0 20px 18px; border-top: 1px solid var(--line); }
.req-group { padding: 14px 0; border-top: 1px solid var(--line); }
.req-group:first-child { border-top: 0; }
.req-people { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.req-people li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }

/* modal & toasts */
.modal-back { position: fixed; inset: 0; background: var(--backdrop); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade 0.15s; }
.modal { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; animation: pop 0.18s; }
.modal-wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--card); }
.tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 999px; margin-bottom: 18px; }
.tabs button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 999px; font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--card); box-shadow: var(--shadow); color: var(--orange-600); }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100vw - 40px); }
.toast { background: var(--ink); color: var(--on-ink); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; display: flex; gap: 10px; align-items: center; animation: pop 0.2s; }
.toast-ok .icon { color: #5fd3a2; }
.toast-bad { background: var(--red); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

.loading { display: grid; place-items: center; padding: 80px 0; color: var(--muted); gap: 12px; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer { background: var(--footer-bg); color: var(--footer-ink); font-size: 13px; margin-top: 30px; }
.footer-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 20px; }
.footer b { color: #fff; }
.footer a { color: #fff; }

/* ---- responsive --------------------------------------------------------------- */
@media (max-width: 1020px) {
  .catalogue, .course-grid, .ws { grid-template-columns: 1fr; }
  .filters, .course-aside, .wsnav { position: static; }
  .course-grid { margin-top: 0; }
  .course-main { padding-top: 22px; order: -1; }
  .wsnav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .wsnav .who { display: none; }
  .wslink { white-space: nowrap; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-flex; }
  .filters.collapsed .fbody { display: none; }
}
@media (max-width: 760px) {
  .hero-in { grid-template-columns: 1fr; padding: 34px 16px 38px; gap: 22px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .brand-txt small { display: none; }
  .brand-txt b { font-size: 14px; white-space: nowrap; }
  .topbar-in { gap: 8px; }
  .navlink { padding: 9px 9px; }
  .navlink .lbl { display: none; }
  .ccard { grid-template-columns: 1fr; }
  .ccard-side { flex-direction: row; flex-wrap: wrap; }
  .ccard-side .btn { flex: 1; }
  .thumb { display: none; }
  .facts { grid-template-columns: repeat(2, auto); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .formcard { padding: 22px 18px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .stepper .t { display: none; }
  .stepper { justify-content: center; }
  .item-row { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .tbl .hide-sm { display: none; }
}
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
@media (max-width: 860px) {
  .brand-txt { display: none; }
}
@media (max-width: 760px) {
  .brand-logo { height: 32px; }
  .mainnav { gap: 0; }
  .navlink { padding: 8px 7px; }
}

/* ---- language menu --------------------------------------------------------------- */
.langpick { position: relative; }
.langbtn { min-width: 40px; justify-content: center; border: 1.5px solid var(--line-2); padding: 6px 10px; font-size: 12px; letter-spacing: 0.04em; }
.langmenu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; animation: pop 0.15s; }
.langmenu button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 9px 12px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px; color: var(--ink); }
.langmenu button b { width: 24px; font-size: 12px; color: var(--muted); }
.langmenu button:hover, .langmenu button:focus-visible { background: var(--surface-2); outline: none; }
.langmenu button[aria-checked="true"] { color: var(--orange-600); font-weight: 700; }
.langmenu button[aria-checked="true"] b { color: var(--orange-600); }

/* ---- course extras: photos, EU, cycles, modules, partners ------------------------------------- */
.thumb-photo { object-fit: cover; background: var(--surface-2); }
.cbanner.has-photo { background-size: cover; background-position: center; }
.cbanner.has-photo .cbanner-in { padding-top: 64px; padding-bottom: 70px; }
.tag-cycle { background: var(--orange-50); color: var(--orange-600); }
.tag-modules { background: var(--blue-50); color: var(--blue); }
.tag-eu { background: #003399; color: #ffcc00; }
.eu-flag { display: inline-block; border-radius: 2px; flex: none; }
.eu-flag.eu-md { width: 45px; height: 30px; }
.eu-flag.eu-sm { width: 24px; height: 16px; }
.eu-generic { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; color: var(--ink); }
.eu-logo { display: block; width: auto; max-width: 100%; }
.eu-logo.eu-md { height: 48px; }
.eu-logo.eu-sm { height: 24px; }
:root[data-theme="dark"] .eu-logo { background: #fff; padding: 6px 8px; border-radius: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .eu-logo { background: #fff; padding: 6px 8px; border-radius: 6px; } }
.eu-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--card); margin-bottom: 18px; }
.eu-box p { margin: 0; font-size: 14px; color: var(--ink-2); }

.offer { border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px; border-top: 4px solid var(--orange); }
.offer-modules { border-top-color: var(--blue); }
.offer-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.offer-head h3 { margin: 0; }
.offer-list { margin: 12px 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.offer-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 9px 10px; border-radius: 8px; font-size: 14px; }
.offer-list li > :first-child { flex: 1; min-width: 200px; }
.offer-list li.current { background: var(--surface-2); }
.offer-list a { color: var(--ink); text-decoration: none; }
.offer-list a:hover { text-decoration: underline; }
ol.offer-list { counter-reset: o; }
ol.offer-list li::before { counter-increment: o; content: counter(o); width: 24px; height: 24px; border-radius: 50%; background: var(--orange-50); color: var(--orange-600); font-weight: 800; font-size: 12px; display: inline-grid; place-items: center; flex: none; }
.module-no { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--blue); margin-right: 4px; }
.offer-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.offer-price { font-size: 24px; font-weight: 800; color: var(--orange-600); display: flex; align-items: baseline; gap: 10px; }
.offer-price s { font-size: 15px; font-weight: 600; }

.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.partner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--card); text-align: center; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; min-height: 120px; }
a.partner:hover { border-color: var(--orange-100); }
.partner img { max-width: 100%; max-height: 56px; object-fit: contain; }
.partner-initials { width: 52px; height: 52px; border-radius: 12px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-weight: 800; }
:root[data-theme="dark"] .partner img, :root[data-theme="dark"] .partner-logo img { background: #fff; padding: 6px; border-radius: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .partner img, :root:not([data-theme="light"]) .partner-logo img { background: #fff; padding: 6px; border-radius: 6px; } }

/* ---- admin ---------------------------------------------------------------------------------- */
.wsnav-title { margin: 14px 12px 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.badge-muted { background: var(--line-2); color: var(--ink); }
.mini-thumb { width: 48px; height: 36px; border-radius: 6px; object-fit: cover; display: block; }
.empty-thumb { opacity: 0.45; }
.clamp1 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.img-field { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.img-preview { width: 220px; height: 124px; border-radius: var(--radius-sm); border: 1.5px dashed var(--line-2); display: grid; place-items: center; overflow: hidden; background: var(--surface-2); }
.img-preview.logo { width: 160px; height: 90px; background: #fff; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview.logo img { object-fit: contain; padding: 8px; }
.partner-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.partner-picks .choice { align-items: center; padding: 10px 12px; }
.pick-logo { height: 26px; width: auto; max-width: 70px; object-fit: contain; }
.group-card.inactive { border: 1.5px dashed var(--line-2); box-shadow: none; }
.group-courses { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.group-courses li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: 14px; }
.partner-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.partner-card { display: flex; flex-direction: column; gap: 6px; }
.partner-logo { height: 80px; display: grid; place-items: center; background: #fff; border-radius: var(--radius-sm); margin-bottom: 6px; }
.partner-logo img { max-height: 60px; max-width: 80%; object-fit: contain; }
.admin-explain .notice { margin: 0; }

/* ---- grid view + favorites --------------------------------------------------------------------- */
.viewtoggle { display: inline-flex; gap: 2px; padding: 3px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--card); }
.viewtoggle .iconbtn { width: 32px; height: 32px; }
.viewtoggle .iconbtn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.ctile { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1.5px solid transparent; transition: border-color 0.15s, transform 0.15s; }
.ctile:hover { border-color: var(--orange-100); transform: translateY(-2px); }
.ctile-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; color: #fff; text-decoration: none; }
.ctile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.ctile:hover .ctile-media img { transform: scale(1.04); }
.ctile-media::after { content: ""; position: absolute; inset: 0; background: url("header-pattern.svg") right top / 690px 610px no-repeat; pointer-events: none; }
.ctile-media:has(img)::after { display: none; }
.ctile-num { position: relative; z-index: 1; font-size: 28px; font-weight: 800; letter-spacing: 0.02em; }
.ctile-flags { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; z-index: 2; }
.ctile-flags .tag { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.ctile-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.ctile-body h3 { margin: 0 0 6px; font-size: 15px; flex: 1; }
.ctile-body h3 a { color: var(--orange-600); text-decoration: none; }
.ctile-body h3 a:hover { text-decoration: underline; }
.ctile-body .meta { gap: 12px; font-size: 12.5px; }
.favbtn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: transform 0.15s, color 0.15s; }
.favbtn:hover { color: #e0245e; background: var(--surface-2); }
.favbtn.is-fav { color: #e0245e; }
.favbtn.is-fav .icon { animation: fav-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.favbtn-float { position: absolute; top: 10px; right: 10px; z-index: 3; background: rgba(255, 255, 255, 0.92); color: #6b6a66; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.favbtn-float:hover { background: #fff; }
.btn.is-fav { border-color: #e0245e; color: #e0245e; }
.btn.is-fav:hover { background: #e0245e; color: #fff; }
.ccard-top .favbtn { margin: -8px -8px -8px 0; }
@keyframes fav-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .favbtn.is-fav .icon, .ctile, .ctile-media img { animation: none; transition: none; } }
@media (max-width: 760px) { .cgrid { grid-template-columns: 1fr 1fr; gap: 12px; } .ctile-body { padding: 12px; } .ctile-body .meta span:nth-child(n+3) { display: none; } }
@media (max-width: 430px) { .cgrid { grid-template-columns: 1fr; } .ctile-body .meta span { display: inline-flex !important; } }
@media (max-width: 430px) {
  .topbar-in { gap: 4px; }
  .navlink { padding: 6px 5px; }
  .langbtn { min-width: 32px; padding: 4px 6px; }
  .brand-logo { height: 28px; }
  .avatar { width: 26px; height: 26px; font-size: 11px; }
}
.share-notice { margin: 0 0 16px; }
.formcard .share-notice { margin: 0 0 14px; }

/* ---- bulk selection ---------------------------------------------------------------------------- */
.bulkbar { position: sticky; top: 76px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--orange-50); border: 1.5px solid var(--orange-100); }
.bulkbar[hidden] { display: none; }
.tbl tr.is-selected td { background: var(--orange-50); }

/* ---- statistics (data-viz) ----------------------------------------------------------------------
   Categorical slots 1–4 validated (scripts/validate_palette.js) against the card surface in each theme:
   light #ffffff — slots 3 and 4 below 3:1, so parts always carry printed values + a legend; dark #1d1b19 all pass. */
:root { --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-4: #eda100; --viz-gray: #b9b5ae; --viz-grid: #ece8e2; --viz-track: #efece7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500; --viz-gray: #5f5b55; --viz-grid: #2f2c29; --viz-track: #2c2a27; } }
:root[data-theme="dark"] { --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500; --viz-gray: #5f5b55; --viz-grid: #2f2c29; --viz-track: #2c2a27; }

.kpis-5 { grid-template-columns: repeat(5, 1fr); }
.stat-kpi { position: relative; gap: 2px; padding-bottom: 46px; }
.stat-kpi > span:first-child { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 30px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi-delta { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.kpi-delta.up { color: var(--green-text); }
.kpi-delta.down { color: var(--red); }
.kpi-delta .muted { font-weight: 500; }
.spark { position: absolute; left: 18px; right: 18px; bottom: 12px; width: calc(100% - 36px); height: 30px; }
.viz-host { position: relative; }
.viz-svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-axis { font-size: 11px; fill: var(--muted); font-family: inherit; }
.viz-tip { position: absolute; transform: translate(-50%, -100%); pointer-events: none; background: var(--ink); color: var(--on-ink); padding: 8px 11px; border-radius: 8px; font-size: 12.5px; line-height: 1.4; box-shadow: var(--shadow-lg); white-space: nowrap; z-index: 4; }
.viz-tip[hidden] { display: none; }
.viz-data { margin-top: 10px; font-size: 13px; }
.viz-data summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.viz-data .tbl { font-size: 13px; margin-top: 6px; }
.rbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rbars li { display: grid; grid-template-columns: minmax(0, 1fr) 1.1fr auto; gap: 12px; align-items: center; border-radius: 6px; outline: none; }
.rbars li:focus-visible { box-shadow: var(--focus); }
.rbar-label { font-size: 13px; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbar-label:hover { text-decoration: underline; }
.rbar-track { height: 14px; display: block; }
.rbar { display: block; height: 100%; background: var(--viz-1); border-radius: 0 4px 4px 0; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.rbar-value { font-weight: 800; font-size: 13px; min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.segbar { display: flex; gap: 2px; width: 100%; border-radius: 6px; overflow: hidden; }
.segbar.tall { height: 34px; }
.segbar.thin { height: 10px; }
.seg { display: grid; place-items: center; min-width: 4px; }
.seg-label { font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.seg-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.seg-legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.meter .row { gap: 8px; font-size: 13.5px; margin-bottom: 4px; }
.meter-track { display: block; height: 8px; border-radius: 999px; background: var(--viz-track); overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--viz-1); border-radius: 999px; }
.fill { display: flex; flex-direction: column; gap: 4px; }
.mini-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
.mini-stats b { display: block; font-size: 20px; font-weight: 800; }
.mini-stats span { font-size: 11.5px; color: var(--muted); }
@media (max-width: 1200px) { .kpis-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .kpis-5 { grid-template-columns: 1fr 1fr; } .rbars li { grid-template-columns: 1fr auto; } .rbar-track { grid-column: 1 / -1; grid-row: 2; } .mini-stats { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { .rbar { transition: none; } }
.seg-light .seg-label { color: var(--ink); text-shadow: none; }
.kpi-delta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompt-out { width: 100%; min-height: 300px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; line-height: 1.5; padding: 12px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); resize: vertical; }

/* ---- QR / share ------------------------------------------------------------------------------- */
.share { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; padding: 18px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--card); }
.qr-frame { background: #fff; border-radius: 14px; padding: 10px; box-shadow: var(--shadow); width: 240px; aspect-ratio: 1; display: grid; place-items: center; }
.qr-img { width: 100%; height: auto; display: block; }
.qr-link { word-break: break-all; }
@media (max-width: 760px) { .share { grid-template-columns: 1fr; justify-items: center; } .share .stack { width: 100%; } }

/* ---- user guides ------------------------------------------------------------------------------ */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.guide-card { display: flex; flex-direction: column; border: 1.5px solid transparent; }
.guide-card.is-mine { border-color: var(--orange-100); }
.guide-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-50); color: var(--orange-600); flex: none; }
.guide-toc summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.guide-toc ol { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; columns: 2; column-gap: 24px; }
.guide-card > .row:last-child { margin-top: auto !important; padding-top: 14px; }
.footer-guides { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
@media (max-width: 760px) { .guide-grid { grid-template-columns: 1fr; } .guide-toc ol { columns: 1; } }
/* theme menu */
.thememenu { min-width: 250px; }
.thememenu button { gap: 10px; }
.thememenu button .icon-sm { flex: none; color: var(--muted); }
.thememenu button[aria-checked="true"] .icon-sm { color: var(--orange-600); }
.thememenu small { font-weight: 500; }
.theme-check { margin-left: auto; }
.navlink { position: relative; }
.theme-auto { position: absolute; right: 2px; bottom: 2px; font-size: 9px; font-weight: 800; line-height: 1; padding: 1px 3px; border-radius: 4px; background: var(--ink-2); color: var(--card); }
.thememenu small { display: block; font-size: 11.5px; margin-top: 1px; }
.thememenu button span { line-height: 1.25; }

/* ---- accessibility ------------------------------------------------------------------------------- */
/* boxes that stay white in dark mode (logo previews) keep dark text */
.img-preview.logo, .img-preview.logo .muted, .partner-logo, .partner-logo .partner-initials { color: #5c5b57; }
/* reduced motion: no animations or transitions at all (dialogs, toasts, count-up, hover effects) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
/* reflow at 320 px (WCAG 1.4.10) */
.ccard-top { flex-wrap: wrap; row-gap: 4px; }
@media (max-width: 430px) {
  .kpis, .kpis-5 { grid-template-columns: 1fr; }
  .btn { white-space: normal; text-align: center; max-width: 100%; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
}
