/* ZGYNTRIX brand layer. Loaded last on every page, after the page's own stylesheets.
   Colours, type and spacing follow the ZGYNTRIX Brand System; variables are defined in styles.css. */

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.015em; }
.section-head h2, .board-sub h3, .subj-heading, .dash h1, .admin-section h2, .auth-card h1, .modal h2 { font-weight: 800; color: var(--navy); }
.section-head p { font-size: 1.05rem; line-height: 1.6; }
.price { font-family: var(--display); font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat b { font-family: var(--display); font-weight: 800; }
section.block { padding: 96px 0; }
@media (max-width: 720px) { section.block { padding: 56px 0; } }
a { color: var(--violet-600); }
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn { border-radius: 10px; font-weight: 600; transition: background-color .15s ease-out, box-shadow .15s ease-out, transform .15s ease-out; }
.btn-primary, .btn-light { background: var(--violet-600); color: #fff; }
.btn-primary:hover, .btn-light:hover { background: var(--violet-700); box-shadow: none; }
.btn-outline { color: var(--navy); border: 1px solid var(--border-control); background: #fff; }
.btn-outline:hover { border-color: var(--violet-600); background: var(--violet-50); }
.btn-ghost-light { background: transparent; border-color: rgba(196, 181, 253, .45); color: #fff; }
.btn-ghost-light:hover { background: rgba(196, 181, 253, .12); }

/* ---------- Header (light, frosted) ---------- */
.site-header { background: rgba(248, 250, 252, .88); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px); color: var(--navy); border-bottom: 1px solid var(--line); }
.brand { color: var(--navy); gap: 10px; }
img.brand-mark { width: 32px; height: 32px; border-radius: 0; background: none; display: block; flex: none; }
.brand-name { display: block; font-family: var(--display); font-weight: 800; font-size: 1.12rem; letter-spacing: .08em; line-height: 1.15; color: var(--navy); }
.brand small { color: var(--slate); font-size: .62rem; font-weight: 600; letter-spacing: .12em; margin-top: 2px; }
.nav a { color: var(--slate); font-weight: 500; }
.nav a:hover { color: var(--navy); }
.site-header .nav a.btn-light, .site-header .nav a.btn-light:hover { color: #fff; }
.site-header .btn-ghost-light { background: #fff; color: var(--navy); border: 1px solid var(--border-control); }
.site-header .btn-ghost-light:hover { background: var(--violet-50); border-color: var(--violet-600); }
.nav-cart { color: var(--navy) !important; }
.cart-badge { background: var(--violet-600); color: #fff; }
.cart-badge.zero { background: var(--line); color: var(--slate); }
.site-header .nav a[aria-current="page"]:not(.nav-board) { color: var(--violet-700); font-weight: 600; }

/* ---------- Dark panels: hero, board and subject heroes, auth backdrop ---------- */
.hero, .board-hero, .subject-hero, .page-wrap { background: var(--navy) url('/img/math-bg.svg') repeat; }
.hero::after { content: none; }
.hero .container { padding: 104px 0 112px; }
.eyebrow { color: var(--lavender); background: rgba(196, 181, 253, .08); border-color: rgba(196, 181, 253, .28); font-weight: 700; letter-spacing: .12em; font-size: .74rem; }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.9rem); line-height: 1.04; letter-spacing: -.025em; }
.hero h1 span { color: var(--lavender); }
.hero p.lead, .board-hero .lead, .subj-blurb { color: var(--on-navy-muted); }
.hero-stats div, .crumbs, .subj-count { color: var(--on-navy-muted); }
.hero-stats strong { font-family: var(--display); font-weight: 800; }
.hero-card { background: rgba(27, 34, 64, .7); border-color: rgba(196, 181, 253, .22); }
.hero-card .paper-mock { border-radius: 12px; }
.paper-mock .pm-head { border-bottom-color: var(--violet); }
.paper-mock .pm-head b { font-family: var(--display); font-weight: 800; letter-spacing: .06em; }
.paper-mock .q { font-family: 'Georgia', serif; color: var(--navy); }
.paper-mock .line { background: var(--violet-50); }
.hero-card .lock { color: var(--on-navy-muted); }
.hero-card .lock svg { width: 16px; height: 16px; flex: none; stroke: var(--lavender); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.board-hero h1, .subject-hero h1 { font-weight: 800; }
.board-kicker { color: var(--lavender); letter-spacing: .12em; }
.subj-code { color: var(--lavender); }
.crumbs a { color: #fff; }
.board-switch a.active { color: var(--navy); }

/* ---------- Surfaces ---------- */
.card { border-radius: 20px; }
.paper, .subject-tile, .feature, .res-card, .stat, .faq details, .empty { border-color: var(--line); }
.paper, .subject-tile, .feature, .res-card { box-shadow: var(--shadow-card); }
.step { background: #fff; box-shadow: var(--shadow-card); }
.step::before { background: var(--navy); font-family: var(--display); }
.feature .ic { background: var(--violet-50); color: var(--violet-600); font-family: var(--display); }
.faq details[open] { border-color: #DDD6FE; }
.faq summary { color: var(--navy); }
.chip { color: var(--navy); }
.chip.active { background: var(--navy); border-color: var(--navy); }
input, textarea, select { border: 1px solid var(--border-control); }
input:focus, textarea:focus, select:focus { border-color: var(--violet-600); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }
.otp-boxes input:focus { border-color: var(--violet-600); outline: 2px solid var(--violet-50); }
.code, .modal .big-code { background: var(--violet-50); border-color: #C4B5FD; color: var(--navy); }
.vlocked-card { background: var(--navy-raised); border-top-color: var(--violet); }
.vlocked-card .btn-primary { background: var(--violet-600); color: #fff; }
.paper-thumb { background: var(--navy) url('/img/math-bg.svg') repeat; background-size: 48px; }
.paper-thumb .badge { font-family: var(--sans); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-navy-muted); }
.site-footer a { color: #fff; }
.f-brand .f-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.f-brand .f-logo img { width: 28px; height: 28px; }
.f-brand .f-logo b { font-family: var(--display); font-weight: 800; letter-spacing: .08em; color: #fff; font-size: 1.05rem; }
.f-brand .f-tag { display: block; color: var(--lavender); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 10px; }

/* ---------- Subject identities: icon tile, tag, 3px bar, active tab ---------- */
.s-math { --s: #2563EB; --s-ink: #2563EB; --s-tint: #EFF6FF; }
.s-physics { --s: #0D9488; --s-ink: #0F766E; --s-tint: #F0FDFA; }
.s-chemistry { --s: #D97706; --s-ink: #B45309; --s-tint: #FFFBEB; }
.s-biology { --s: #16A34A; --s-ink: #15803D; --s-tint: #F0FDF4; }

.subj-icon { box-shadow: none; }
.subj .subj-icon, .subj .subj-sym { background: var(--s-tint); color: var(--s); box-shadow: none; }
.subj .subj-sym { color: var(--s-ink); }
.subject-tile.subj { box-shadow: inset 0 3px 0 var(--s), var(--shadow-card); }
.subject-tile.subj:hover { border-color: var(--s); box-shadow: inset 0 3px 0 var(--s), var(--shadow); }
.subject-tile.subj .subject-info small { color: var(--s-ink); }
.subject-tile.subj .subject-foot .go { color: var(--s-ink); }
.subject-info b { font-family: var(--display); font-weight: 700; color: var(--navy); }
.subject-foot { border-top-style: solid; }

.paper.subj .paper-thumb { box-shadow: inset 0 -3px 0 var(--s); }
.paper.subj .paper-thumb .badge { background: var(--s-tint); color: var(--s-ink); display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: .78rem; }
.paper.subj .paper-thumb .badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--s); }
.paper-body h3 { font-family: var(--display); font-weight: 700; color: var(--navy); }
.buy-rows, .buy-row, .paper-foot { border-style: solid; border-color: var(--line); }

.subject-tab.subj .subj-icon.sm, .subject-tab.subj .subj-sym.sm { background: var(--s-tint); color: var(--s); box-shadow: none; }
.subject-tab.subj.active { background: var(--s-tint); border-color: var(--s); color: var(--s-ink); }
.subject-tab:hover { background: var(--cloud); }
.subject-hero.subj { box-shadow: inset 0 -3px 0 var(--s); }
.subject-hero.subj .subj-icon.xl { background: #fff; color: var(--s); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Board pages: hero question panel ---------- */
.s-math { --s-light: #93C5FD; }
.s-physics { --s-light: #5EEAD4; }
.s-chemistry { --s-light: #FCD34D; }
.s-biology { --s-light: #86EFAC; }
.bh-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 48px; align-items: center; }
@media (max-width: 960px) { .bh-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.bh-grid > * { min-width: 0; }
/* ---------- Board pages: latest exam pattern ---------- */
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.pt-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: inset 0 4px 0 var(--s), var(--shadow-card); display: flex; flex-direction: column; gap: 12px; }
.pt-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pt-name { font-family: var(--display); font-weight: 800; color: var(--navy); font-size: 1.1rem; }
.pt-lv { font-size: .74rem; font-weight: 700; color: var(--s-ink); background: var(--s-tint); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt-stats div { background: var(--s-tint); border-radius: 12px; padding: 10px 8px; text-align: center; }
.pt-stats b { display: block; font-family: var(--display); font-weight: 800; color: var(--s-ink); font-size: 1.2rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pt-stats small { display: block; color: var(--slate); font-size: .72rem; margin-top: 2px; }
.pt-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.pt-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); font-weight: 700; padding: 0 6px 6px 0; border-bottom: 1px solid var(--line); }
.pt-table td { padding: 6px 6px 6px 0; border-bottom: 1px solid #F1F5F9; color: var(--navy); vertical-align: top; }
.pt-table td:first-child { font-weight: 800; color: var(--s-ink); width: 52px; }
.pt-table td:last-child, .pt-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; padding-right: 0; }
.pt-list { margin: 0; padding-left: 18px; color: var(--navy); font-size: .88rem; line-height: 1.55; }
.pt-list li + li { margin-top: 4px; }
.pt-list li::marker { color: var(--s); }
.pt-total { margin: auto 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .8rem; color: var(--slate); }

/* ---------- Premium layer: formula field, glow, refined surfaces ---------- */
.hero, .board-hero, .subject-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(139, 92, 246, .30), transparent 60%),
    radial-gradient(700px 380px at -5% 110%, rgba(37, 99, 235, .20), transparent 60%),
    url('/img/formula-field.svg') center / 1600px auto no-repeat,
    url('/img/math-bg.svg') repeat,
    var(--navy);
}
.hero::before, .board-hero::before, .subject-hero::before {
  content: ''; position: absolute; inset: auto 0 0 0; height: 1px; z-index: 0;
  background: linear-gradient(90deg, transparent, rgba(196, 181, 253, .55), transparent);
}
.hero h1, .board-hero h1, .subject-hero h1 { letter-spacing: -.03em; }
.board-hero { padding: 44px 0 64px; }
.board-hero h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); }
.board-hero .lead { font-size: 1.08rem; line-height: 1.7; }
.board-switch { background: rgba(255, 255, 255, .06); border-color: rgba(196, 181, 253, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* Formula showcase */
.fx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fx-card { margin: 0; position: relative; padding: 16px 16px 14px; border-radius: 18px; min-height: 132px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
  border: 1px solid rgba(196, 181, 253, .20); box-shadow: 0 18px 40px rgba(4, 7, 20, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: fx-in .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 90ms); }
.fx-card:nth-child(2), .fx-card:nth-child(3) { transform: translateY(14px); }
.fx-card::before { content: ''; position: absolute; left: 16px; right: 16px; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--s-light), transparent); }
.fx-subj { font: 700 .68rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--s-light); }
.fx-eq { flex: 1; display: flex; align-items: center; font-family: 'Cambria Math', Cambria, Georgia, 'Times New Roman', serif; font-style: italic; color: #fff; font-size: 1.18rem; line-height: 1.5; letter-spacing: .01em; }
.fx-eq { white-space: nowrap; }
.fx-eq sub, .fx-eq sup { font-size: .62em; line-height: 0; position: relative; vertical-align: baseline; }
.fx-eq sup { top: -.55em; }
.fx-eq sub { top: .3em; }
.fx-eq .sm { font-size: .8em; }
.fx-eq .big { font-size: 1.5em; font-style: normal; line-height: 1; }
.fx-eq .lim { display: inline-flex; flex-direction: column; justify-content: space-between; font-size: .6em; line-height: 1.1; margin: 0 .25em 0 .05em; height: 2.4em; vertical-align: middle; }
.fx-eq b { font-style: normal; font-weight: 700; }
.fx-eq .fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .2em; font-size: .86em; line-height: 1.25; }
.fx-eq .fr > span:first-child { border-bottom: 1px solid currentColor; padding: 0 .2em .06em; }
.fx-eq .fr > span:last-child { padding: .06em .2em 0; }
.fx-card figcaption { font: 500 .78rem/1.3 var(--sans); color: var(--on-navy-muted); }
@keyframes fx-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 960px) { .fx-card:nth-child(2), .fx-card:nth-child(3) { transform: none; } }
@media (max-width: 600px) {
  .fx-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0; padding: 4px 0 10px; scrollbar-width: none; }
  .fx-grid::-webkit-scrollbar { display: none; }
  .fx-card { flex: 0 0 78%; scroll-snap-align: start; min-height: 118px; transform: none !important; }
}
main.block { padding-top: 72px; }

/* Refined surfaces */
body { background: #F6F7FB; }
.subject-tile, .paper, .pt-card, .res-card, .feature, .step { transition: transform .2s ease-out, box-shadow .2s ease-out, border-color .2s ease-out; }
.subject-tile:hover, .paper:hover, .pt-card:hover { transform: translateY(-3px); }
.paper:hover { box-shadow: 0 18px 40px rgba(16, 21, 42, .10); }
.section-head h2 { letter-spacing: -.025em; }
.section-head h2::after, .board-sub h3::after { content: ''; display: block; width: 44px; height: 3px; margin-top: 12px; border-radius: 3px; background: linear-gradient(90deg, var(--violet-600), #C4B5FD); }
.section-head h2::after { margin-left: auto; margin-right: auto; }
.hero-card { box-shadow: 0 30px 70px rgba(4, 7, 20, .5); }
.paper-mock { box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset; }
.site-footer { background:
  url('/img/formula-field.svg') center bottom / 1600px auto no-repeat,
  var(--navy); }

/* ---------- Homepage refinements: tagline, Mathematics board, "Latest pattern" ---------- */
.brand small { display: block; margin-top: 3px; color: var(--violet-600); font-size: .6rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; }
.f-tag { letter-spacing: .2em; font-weight: 800; text-transform: uppercase; font-size: .72rem; }
.math-board { border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px rgba(4, 7, 20, .45); }
.math-board svg { display: block; width: 100%; height: auto; }
.math-board .mb-cap { fill: #C4B5FD; font: 800 11px var(--display, 'Manrope', sans-serif); letter-spacing: .2em; }
.math-board .mb-r { text-anchor: end; fill: #A78BFA; }
.math-board .mb-t { fill: #E9E3FF; font-family: Georgia, 'Times New Roman', serif; font-style: italic; }
.math-board .mb-t.mb-w { fill: #FFFFFF; }
.math-board .mb-t.mb-c { fill: #C4B5FD; }
.math-board .mb-ghost text { fill: #C4B5FD; opacity: .09; font-family: Georgia, serif; font-style: italic; }
.lp, .lp-head { font: 800 .68rem/1 var(--display, 'Manrope', sans-serif); letter-spacing: .16em; text-transform: uppercase; }
.subject-tile .lp { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--s-ink, var(--violet-700)); }
.subject-tile .lp::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--s, var(--violet)); }
.board-sub p.lp-head { margin-top: 8px; color: var(--violet-700); }
@media (max-width: 480px) { .brand small { font-size: .55rem; letter-spacing: .18em; } }
