/* ==========================================================================
   CDAC360 – design system
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.wide { max-width: var(--container-wide); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn:focus-visible, .nav a:focus-visible, .tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.cta :focus-visible, .announce-bar :focus-visible { outline-color: #fff; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 2000; background: var(--ink); color: var(--page); padding: 12px 18px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip-link:focus, .skip-link:focus-visible { top: 12px; outline: 3px solid var(--surface); outline-offset: 0; box-shadow: 0 0 0 6px var(--focus); }
main:focus { outline: none; }
.grad-text { background: var(--headline-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Logo (wordmark styles live in theme.css) ---------- */
.logo { padding: 6px 14px 6px 0; }
.logo.wordmark { font-size: 30px; }
.logo.sm { font-size: 26px; }
.logo.lg { font-size: 40px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer;
  padding: 14px 26px; border-radius: 12px; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none !important; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn-primary:hover { box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 38%, transparent); transform: translateY(-1px); }
.btn-outline { background: var(--surface); color: var(--indigo); border: 1.5px solid var(--accent-mid); }
.btn-outline:hover { background: var(--tint-accent); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-soft { background: var(--tint-accent); color: var(--indigo); }
.btn-soft:hover { background: var(--tint-accent-line); }
.btn-danger { background: var(--tint-red); color: var(--red-text); border: 1px solid var(--tint-red-line); }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .875rem; border-radius: 10px; }
.btn-lg { padding: 17px 34px; font-size: 1.1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { color: var(--ink-2); font-weight: 500; font-size: .84rem; padding: 7px 12px; white-space: nowrap; border-radius: 12px; text-decoration: none; background: var(--surface-2); border: 1px solid var(--line); }
.nav a:hover { color: var(--ink); border-color: var(--input-border); text-decoration: none; }
.nav a.active { color: var(--accent-text); background: var(--tint-accent); border-color: var(--tint-accent-line); font-weight: 600; }
.nav a[href="/combo-offers"] { background: var(--tint-amber); border-color: var(--tint-amber-line); color: var(--amber-text); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn { padding: 9px 16px; font-size: .86rem; border-radius: 12px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; border-radius: 10px; color: var(--ink-2); }
.nav-toggle svg { width: 28px; height: 28px; }
.user-menu { position: relative; }
.user-menu > button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); padding: 6px 12px 6px 6px; border-radius: 999px; cursor: pointer; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; min-width: 220px; display: none; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--ink); background: none; border: 0; cursor: pointer; font-size: .95rem; text-decoration: none; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg-soft); }
.dropdown .meta { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: .85rem; color: var(--muted); }
.dropdown .meta strong { display: block; color: var(--ink); font-size: .95rem; }

@media (max-width: 1180px) {
  .nav { position: fixed; inset: 70px 0 auto 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 12px 16px 20px; box-shadow: var(--shadow-lg); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 16px; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .site-header .bar { height: 70px; }
  .nav { top: 70px; }
  .logo.wordmark { font-size: 24px; }
  .header-actions .btn { padding: 10px 14px; font-size: .9rem; }
  .header-actions { gap: 4px; }
  .header-actions .btn-soft { display: none; }
  .user-menu > button { padding: 3px; }
  .site-header .container { padding: 0 14px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 110px 0 60px; text-align: center; }
.hero::before, .hero::after {
  content: ''; position: absolute; width: 760px; height: 760px; border-radius: 50%; z-index: -1; filter: blur(2px);
}
.hero::before { left: -420px; top: 60px; background: radial-gradient(circle at 70% 40%, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 10%, transparent) 45%, transparent 70%); }
.hero::after { right: -440px; top: 40px; background: radial-gradient(circle at 30% 40%, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--g3) 10%, transparent) 45%, transparent 70%); }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.1rem); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 28px; line-height: 1.05; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.45rem); color: var(--ink-2); max-width: 820px; margin: 0 auto 40px; opacity: .85; }
.hero-actions { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn { min-width: 250px; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; background: var(--tint-accent); color: var(--violet); font-weight: 600; font-size: .9rem; margin-bottom: 26px; border: 1px solid var(--tint-accent-line); }
.badge-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }

/* ---------- Feature cards (home) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 70px; }
.feature-card {
  position: relative; display: flex; flex-direction: column; padding: 22px 22px 24px; border-radius: var(--radius);
  color: var(--ink); text-decoration: none !important; text-align: left; min-height: 290px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--shadow-ink) 6%, transparent); border: 1px solid color-mix(in srgb, var(--surface) 70%, transparent); transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card h3 { font-size: 1.45rem; margin: 18px 0 8px; font-weight: 700; }
.feature-card p { color: var(--muted); font-size: .98rem; line-height: 1.45; margin: 0; flex: 1; }
.feature-card .go { width: 54px; height: 54px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; margin-top: 22px; box-shadow: 0 6px 18px color-mix(in srgb, var(--shadow-ink) 12%, transparent); }
.feature-card .go svg { width: 24px; height: 24px; }
.icon-tile { width: 72px; height: 72px; border-radius: 16px; display: grid; place-items: center; }
.icon-tile svg { width: 42px; height: 42px; }
.t-blue { background: linear-gradient(160deg, var(--tint-accent), var(--tint-accent)); } .t-blue .icon-tile { background: var(--tint-accent); } .t-blue .go { color: var(--blue); }
.t-violet { background: linear-gradient(160deg, var(--tint-accent), var(--tint-accent)); } .t-violet .icon-tile { background: var(--tint-accent-line); } .t-violet .go { color: var(--violet); }
.t-pink { background: linear-gradient(160deg, var(--tint-red), var(--tint-red)); } .t-pink .icon-tile { background: var(--tint-red); } .t-pink .go { color: var(--pink); }
.t-orange { background: linear-gradient(160deg, var(--tint-amber), var(--tint-amber)); } .t-orange .icon-tile { background: var(--tint-amber); } .t-orange .go { color: var(--amber-text); }
.t-purple { background: linear-gradient(160deg, var(--tint-accent), var(--tint-accent)); } .t-purple .icon-tile { background: var(--tint-accent-line); } .t-purple .go { color: var(--accent-text); }
.t-cyan { background: linear-gradient(160deg, var(--tint-accent), var(--tint-accent)); } .t-cyan .icon-tile { background: var(--tint-accent); } .t-cyan .go { color: var(--sky); }

@media (max-width: 1180px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) {
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feature-card { min-height: 0; padding: 18px; }
  .feature-card h3 { font-size: 1.15rem; }
  .feature-card p { font-size: .88rem; }
  .icon-tile { width: 56px; height: 56px; } .icon-tile svg { width: 32px; height: 32px; }
  .feature-card .go { width: 42px; height: 42px; }
  .hero { padding: 64px 0 40px; }
  .hero-actions .btn { min-width: 0; width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section.alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.eyebrow { display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); margin-bottom: 12px; }
.page-hero { padding: 80px 0 50px; text-align: center; background: radial-gradient(ellipse at top, var(--tint-accent) 0%, var(--surface) 60%); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
.page-hero p { color: var(--muted); font-size: 1.15rem; max-width: 760px; margin: 0 auto; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding: 60px 0; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.2rem; }
.card.flat { box-shadow: none; }
.card-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); color: var(--violet); margin-bottom: 16px; }
.card-icon svg { width: 26px; height: 26px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 28px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: 2.3rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-weight: 500; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.steps { counter-reset: step; }
.step { position: relative; padding-left: 64px; margin-bottom: 26px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; }
.step h4 { font-size: 1.1rem; margin-bottom: 4px; }
.step p { color: var(--muted); margin: 0; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 28px; margin: 9px 0; color: var(--ink-2); }
.check-list li::before { content: ''; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--tint-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ---------- Pricing cards ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.price-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.price-card.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; box-shadow: var(--shadow-lg); }
.price-card .ribbon { position: absolute; top: -13px; left: 24px; background: var(--grad); color: #fff; font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; letter-spacing: .02em; }
.price-card .cat { font-size: .8rem; font-weight: 700; color: var(--violet); text-transform: uppercase; letter-spacing: .08em; }
.price-card h3 { font-size: 1.3rem; margin: 8px 0 8px; }
.price-card .desc { color: var(--muted); font-size: .95rem; }
.price { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 4px; }
.price b { font-size: 2.3rem; font-weight: 800; }
.price s { color: var(--muted); font-size: 1.1rem; }
.price .off { color: var(--green-text); font-weight: 700; font-size: .9rem; }
.price-card .validity { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.price-card .check-list { flex: 1; margin-bottom: 22px; font-size: .95rem; }
.owned-tag { display: inline-flex; gap: 6px; align-items: center; color: var(--green-text); font-weight: 600; font-size: .9rem; }

/* ---------- Lists / items ---------- */
.item-list { display: grid; gap: 14px; }
.item { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.item .ic { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); color: var(--violet); }
.item .ic svg { width: 24px; height: 24px; }
.item .body { flex: 1; min-width: 0; }
.item .body h4 { margin: 0 0 4px; font-size: 1.05rem; }
.item .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .86rem; }
.item .actions { flex: none; display: flex; gap: 8px; align-items: center; }
@media (max-width: 640px) { .item { flex-wrap: wrap; } .item .actions { width: 100%; } .item .actions .btn { flex: 1; } }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--tint-accent); color: var(--indigo); letter-spacing: .02em; }
.tag.free { background: var(--tint-green); color: var(--green-text); }
.tag.lock { background: var(--tint-amber); color: var(--amber-text); }
.tag.red { background: var(--tint-red); color: var(--red-text); }
.tag.gray { background: var(--bg-soft); color: var(--muted); }
.tag.green { background: var(--tint-green); color: var(--green-text); }
.tag.blue { background: var(--tint-accent); color: var(--blue); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; }
.tab { border: 1px solid var(--line); background: var(--surface); padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--bg-soft); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--input-border); border-radius: 12px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: var(--input-border); }
.input:focus, .input:focus-visible { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); outline: none; }
textarea.input { min-height: 110px; resize: vertical; }
.input[readonly] { background: var(--bg-soft); color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.alert { padding: 14px 16px; border-radius: 12px; font-size: .94rem; border: 1px solid; }
.alert.error { background: var(--tint-red); border-color: var(--tint-red-line); color: var(--red-text); }
.alert.success { background: var(--tint-green); border-color: var(--tint-green-line); color: var(--green-text); }
.alert.info { background: var(--tint-accent); border-color: var(--tint-accent-line); color: var(--accent-text); }
.alert.warn { background: var(--tint-amber); border-color: var(--tint-amber-line); color: var(--amber-text); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 84px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--grad); color: #fff; padding: 70px 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .08); right: -180px; bottom: -200px; }
.auth-side h2 { font-size: 2.4rem; font-weight: 800; }
.auth-side .check-list li { color: #fff; }
.auth-side .check-list li::before { background-color: color-mix(in srgb, var(--surface) 95%, transparent); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 50px 24px; }
.auth-box { width: 100%; max-width: 440px; }
.auth-box h1 { font-size: 2rem; font-weight: 800; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); color: var(--muted); padding: 64px 0 28px; margin-top: 0; border-top: 1px solid var(--line); }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: var(--ink); font-size: 1rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .95rem; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 50px; padding-top: 24px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta { border-radius: 28px; padding: 60px; background: var(--grad); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
.cta p { opacity: .9; font-size: 1.1rem; max-width: 640px; margin: 0 auto 28px; }
.cta .btn { background: var(--surface); color: var(--indigo); }
@media (max-width: 640px) { .cta { padding: 40px 22px; } }

/* ---------- FAQ ---------- */
details.faq { border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; background: var(--surface); margin-bottom: 12px; }
details.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--violet); }
details.faq[open] summary::after { content: '–'; }
details.faq p { margin: 12px 0 0; color: var(--muted); }

/* ---------- Toast & modal ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { background: var(--ink); color: var(--page); padding: 14px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .94rem; animation: slideUp .25s ease; }
.toast .toast-action { color: inherit; font-weight: 700; text-decoration: underline; margin-left: 4px; }
body.has-wa .toast-stack { bottom: 92px; }
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } }
.modal-backdrop { position: fixed; inset: 0; background: color-mix(in srgb, var(--shadow-ink) 55%, transparent); z-index: 900; display: grid; place-items: center; padding: 20px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 20px; padding: 30px; max-width: 520px; width: 100%; box-shadow: var(--shadow-lg); max-height: calc(100vh - 40px); overflow: auto; }
.modal.wide { max-width: 860px; }
.modal h3 { font-size: 1.4rem; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.modal:focus { outline: none; }

/* ---------- Checkout ---------- */
.checkout .co-plan { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); }
.checkout .co-plan .cat { font-size: .75rem; font-weight: 700; color: var(--violet); text-transform: uppercase; letter-spacing: .08em; }
.checkout .co-plan b { font-size: 1.1rem; }
.co-lines { margin: 16px 0 0; display: grid; gap: 8px; }
.co-lines > div { display: flex; justify-content: space-between; gap: 12px; }
.co-lines > div[hidden] { display: none; }
.co-lines dt { color: var(--ink-2); }
.co-lines dd { margin: 0; font-weight: 600; }
.co-lines .co-discount dd { color: var(--green-text); }
.co-lines .co-total { border-top: 1px solid var(--line); padding-top: 10px; font-size: 1.1rem; }
.co-lines .co-total b { font-size: 1.35rem; }
.co-coupon { margin-top: 18px; }
.co-coupon label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
.co-coupon-row { display: flex; gap: 8px; }
.co-coupon-row .input { padding: 10px 13px; text-transform: uppercase; }
.co-coupon-row .input::placeholder { text-transform: none; }
.co-msg { margin-top: 6px; min-height: 1.2em; }
.co-msg.ok { color: var(--green-text); }
.co-msg.err { color: var(--red-text); }

/* ---------- Announcement bar ---------- */
.announce-bar { background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 50%, var(--g3) 100%); color: #fff; font-size: .9rem; position: relative; z-index: 51; }
.announce-inner { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.announce-bar p { margin: 0; text-align: center; font-weight: 500; }
.announce-bar a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.announce-close { flex: none; background: rgba(255, 255, 255, .16); border: 0; color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1; display: grid; place-items: center; }
.announce-close:hover { background: rgba(255, 255, 255, .28); }

/* ---------- WhatsApp button ---------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 700; width: 56px; height: 56px; border-radius: 50%; background: #128c7e; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(18, 140, 126, .35); text-decoration: none !important; transition: transform .15s ease, box-shadow .15s ease; }
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(18, 140, 126, .45); }
.wa-float svg { width: 30px; height: 30px; }
@media (max-width: 560px) { .wa-float { right: 14px; bottom: 14px; width: 52px; height: 52px; } body.has-wa .toast-stack { bottom: 80px; } }

/* ---------- Dashboard shell ---------- */
.dash { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 84px); }
.dash-side { background: var(--bg-soft); border-right: 1px solid var(--line); padding: 26px 16px; }
.dash-side a, .dash-side button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 600; text-decoration: none; width: 100%; border: 0; background: none; cursor: pointer; font-size: .95rem; }
.dash-side a:hover, .dash-side button:hover { background: var(--surface); }
.dash-side a.active, .dash-side button.active { background: var(--surface); color: var(--violet); box-shadow: var(--shadow); }
.dash-side svg { width: 20px; height: 20px; }
.dash-main { padding: 34px 40px 80px; min-width: 0; }
.dash-main h1 { font-size: 1.9rem; font-weight: 800; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0 30px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.kpi span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.kpi b { display: block; font-size: 1.8rem; font-weight: 800; margin-top: 4px; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { display: flex; overflow-x: auto; gap: 6px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); position: sticky; top: 70px; z-index: 5; }
  .dash-side a, .dash-side button { width: auto; white-space: nowrap; padding: 9px 12px; }
  .dash-main { padding: 24px 16px 60px; }
}
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 0 14px; flex-wrap: wrap; }
.panel-title h2 { font-size: 1.3rem; margin: 0; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: 16px; background: var(--surface); }

/* ---------- Protected content ---------- */
.protected { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.wm-layer { position: fixed; inset: 0; pointer-events: none; z-index: 800; background-repeat: repeat; opacity: 1; }
.shield { position: fixed; inset: 0; z-index: 850; background: color-mix(in srgb, var(--surface) 97%, transparent); display: none; align-items: center; justify-content: center; text-align: center; padding: 30px; font-weight: 600; color: var(--muted); }
body.shielded .shield { display: flex; }
/* Printing is blocked only on protected pages (tests, material, results). Public pages print normally. */
@media print {
  body.protected * { visibility: hidden !important; }
  body.protected::after { content: 'Printing is disabled for licensed CDAC360 content.'; visibility: visible; position: fixed; top: 40%; left: 0; right: 0; text-align: center; font-size: 22px; }
  body:not(.protected) .site-header, body:not(.protected) .announce-bar, body:not(.protected) .wa-float, body:not(.protected) .toast-stack, body:not(.protected) .skip-link { display: none !important; }
}

.md { font-size: 1.04rem; line-height: 1.75; color: var(--ink-2); }
.md h1 { font-size: 2rem; margin-top: 0; } .md h2 { font-size: 1.45rem; margin-top: 1.8em; } .md h3 { font-size: 1.15rem; margin-top: 1.4em; }
.md pre { background: var(--ink-panel); color: var(--on-panel); padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: .9rem; }
.md code { background: var(--tint-accent); color: var(--accent-text); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.md pre code { background: none; color: inherit; padding: 0; }
.md table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.md th { background: var(--bg-soft); }
.md blockquote { margin: 1em 0; padding: 12px 18px; border-left: 4px solid var(--accent-mid); background: var(--tint-accent); border-radius: 0 12px 12px 0; }

/* ---------- Misc ---------- */
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--tint-accent-line); border-top-color: var(--violet); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.pattern-table td:first-child { font-weight: 600; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.mock-ui { border-radius: 22px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.mock-ui .top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--bg-soft); border-bottom: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.mock-ui .timer { background: var(--ink); color: var(--page); padding: 6px 12px; border-radius: 8px; font-family: var(--mono); }
.mock-ui .body { display: grid; grid-template-columns: 1fr 150px; }
.mock-ui .q { padding: 20px; border-right: 1px solid var(--line); font-size: .9rem; }
.mock-ui .opt { border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-top: 8px; }
.mock-ui .opt.sel { border-color: var(--accent-mid); background: var(--tint-accent); }
.mock-ui .pal { padding: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-content: start; }
.mock-ui .pal i { aspect-ratio: 1; border-radius: 6px; background: var(--bg-soft); font-style: normal; font-size: .7rem; display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.mock-ui .pal i.a { background: var(--green); color: #fff; } .mock-ui .pal i.m { background: var(--accent-mid); color: #fff; } .mock-ui .pal i.n { background: var(--orange); color: #fff; }

/* ---------- Notification bell (header) & refer-and-earn (engage) ---------- */
.notif-menu { position: relative; }
.notif-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 50%; cursor: pointer; color: var(--ink-2); padding: 0; }
.notif-btn:hover { background: var(--bg-soft); }
.notif-btn svg { width: 21px; height: 21px; }
.notif-badge { position: absolute; top: -3px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.notif-badge[hidden] { display: none; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 370px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: none; z-index: 60; overflow: hidden; }
.notif-panel.open { display: block; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notif-all { background: none; border: 0; color: var(--violet); font-weight: 600; font-size: .85rem; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.notif-all:hover { background: var(--bg-soft); }
.notif-all:disabled { color: var(--muted); cursor: default; background: none; }
.notif-list { max-height: min(440px, 65vh); overflow-y: auto; overscroll-behavior: contain; }
.notif-item { display: block; position: relative; padding: 12px 14px 12px 28px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem; }
.notif-item:last-child { border-bottom: 0; }
a.notif-item:hover { background: var(--bg-soft); }
.notif-item.unread { background: var(--tint-accent); }
.notif-item.unread::before { content: ''; position: absolute; left: 11px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--violet); }
.notif-title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.notif-body { display: block; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.notif-item time { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; }
.notif-empty { margin: 0; padding: 22px 16px; color: var(--muted); font-size: .9rem; text-align: center; }
@media (max-width: 560px) {
  .notif-btn { width: 40px; height: 40px; }
  .notif-panel { position: fixed; top: 74px; left: 10px; right: 10px; width: auto; max-width: none; }
  .notif-list { max-height: calc(100vh - 150px); }
}
.ref-link { display: flex; gap: 8px; flex-wrap: wrap; }
.ref-link .input { flex: 1 1 240px; min-width: 0; font-family: var(--mono); font-size: .9rem; }
.ref-code { font-family: var(--mono); font-weight: 700; letter-spacing: .04em; overflow-wrap: anywhere; }
.ref-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.ref-steps > div { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--bg-soft); font-size: .92rem; }
.ref-steps b { display: block; margin-bottom: 4px; }
@media (max-width: 700px) { .ref-steps { grid-template-columns: 1fr; } }
.kpis.ref-kpis { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .kpis.ref-kpis { gap: 8px; } .ref-kpis .kpi { padding: 12px; } .ref-kpis .kpi span { font-size: .75rem; } .ref-kpis .kpi b { font-size: 1.35rem; } }

/* ---------- Blog, articles & testimonials (content extension) ---------- */
.blog-tags { justify-content: center; }
.blog-tags:empty { display: none; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--tint-accent-line); }
.post-card h2 { font-size: 1.18rem; font-weight: 800; line-height: 1.35; margin: 0; }
.post-card p { color: var(--muted); margin: 0; font-size: .95rem; flex: 1; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-tags a.tag { text-decoration: none; }
.post-meta { font-size: .84rem; color: var(--muted); font-weight: 600; }
.article-wrap { padding: 40px 0 70px; background: radial-gradient(ellipse at top, var(--tint-accent) 0%, var(--surface) 420px); }
.narrow-article { max-width: 820px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--muted); }
.article-head { margin-bottom: 26px; }
.article-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); font-weight: 800; line-height: 1.18; margin: 14px 0 12px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .92rem; margin: 0; }
.article-meta span + span::before { content: '·'; margin-right: 16px; }
.article-content { overflow-wrap: break-word; }
.article-content th, .article-content td { min-width: 70px; }
.article-content h2 { font-weight: 800; }
.article-content li { margin: 4px 0; }
.article-content img { max-width: 100%; height: auto; border-radius: 12px; }
.article-cta { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 40px; padding: 26px 28px; border-radius: var(--radius); background: var(--grad-soft); border: 1px solid var(--tint-accent-line); }
.article-cta h2 { font-size: 1.25rem; margin: 0 0 6px; }
.article-cta p { margin: 0; color: var(--muted); max-width: 460px; }
.article-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.t-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 380px)); justify-content: center; gap: 22px; }
.t-card { display: flex; flex-direction: column; gap: 14px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.t-card.featured { border-color: var(--tint-accent-line); box-shadow: 0 14px 40px color-mix(in srgb, var(--accent) 12%, transparent); }
.t-card blockquote { margin: 0; color: var(--ink-2); line-height: 1.65; white-space: pre-line; flex: 1; }
.t-card figcaption { display: flex; align-items: center; gap: 12px; font-size: .92rem; }
.t-card figcaption .avatar { width: 38px; height: 38px; flex: none; }
.t-card figcaption b { display: block; }
.stars { color: var(--amber-text); letter-spacing: 2px; font-size: 1.05rem; line-height: 1; }
.stars .off { color: var(--muted); }
.t-summary { text-align: center; color: var(--muted); margin: -30px 0 34px; font-weight: 600; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; border: 0; padding: 0; margin: 0; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { font-size: 1.9rem; line-height: 1; color: var(--muted); cursor: pointer; transition: color .12s ease, transform .12s ease; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--amber-text); }
.star-input input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.review-card { margin-top: 34px; }
.md-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.md-split textarea { min-height: 420px; font-family: var(--mono); font-size: .86rem; line-height: 1.55; resize: vertical; }
.md-preview { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; background: var(--surface); min-height: 420px; max-height: 70vh; overflow: auto; font-size: .95rem; }
@media (max-width: 900px) { .md-split { grid-template-columns: 1fr; } .md-split textarea, .md-preview { min-height: 260px; } }

/* Header logo image (shared with the Next.js pages) */
.logo.logo-img { padding: 0; }
.logo.logo-img img { height: 40px; width: auto; mix-blend-mode: multiply; }
@media (max-width: 560px) { .logo.logo-img img { height: 32px; } }
