/* «شب طلایی»: plum night and gold, the same theme as the Instagram page. Estedad for display, Vazirmatn for reading. */
@font-face { font-family: "Estedad"; src: url("../fonts/estedad.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/vazirmatn.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #120A1E;
  --ink-2: #1C1030;
  --plum: #33195C;
  --violet: #6B3FB5;
  --violet-hi: #8457D6;
  --gold: #C9A24A;
  --gold-hi: #E8D199;
  --ground: #F7F4FB;
  --surface: #FFFFFF;
  --text: #1E1430;
  --muted: #5C5170;
  --line: #E6DFEF;
  --on-dark: #F1ECF9;
  --on-dark-muted: #BDB0D1;
  --ok: #1D7A4B;
  --warn: #B4641A;
  --bad: #B3362B;
  --font-display: "Estedad", "Vazirmatn", Tahoma, sans-serif;
  --font-body: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --radius: 16px;
  --wrap: 1200px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.9; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); }
a:hover { color: var(--plum); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.4; text-wrap: balance; margin: 0; font-weight: 800; letter-spacing: -.01em; }
h1 { font-weight: 900; }
h2 { font-size: clamp(27px, 3.4vw, 40px); }
h3 { font-size: 20px; }
p { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
section { padding-block: 92px; }
@media (max-width: 640px) { section { padding-block: 64px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 14.5px var(--font-body); color: var(--violet); }
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: currentColor; }
.dark .eyebrow { color: var(--gold-hi); }
.lead { color: var(--muted); max-width: 64ch; font-size: 17px; }
.dark .lead { color: var(--on-dark-muted); }
.sec-head { display: grid; gap: 12px; margin-bottom: 44px; max-width: 780px; }
.sec-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.dark { background: var(--ink); color: var(--on-dark); }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.khatam { background-image: url("../img/khatam.svg"); background-size: 84px 84px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; min-height: 50px; padding: 0 24px; border-radius: 999px; font: 700 15.5px/1 var(--font-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s, color .18s; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(180deg, #DDBC6E, var(--gold)); color: var(--ink); box-shadow: 0 10px 28px rgba(201,162,74,.28); }
.btn-gold:hover { color: var(--ink); box-shadow: 0 14px 34px rgba(201,162,74,.4); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--on-dark); border-color: rgba(232,209,153,.5); }
.btn-ghost:hover { color: var(--ink); background: var(--gold-hi); }
.btn-plum { background: var(--plum); color: #fff; }
.btn-plum:hover { background: var(--violet); color: #fff; }
.btn-line { background: transparent; color: var(--plum); border-color: var(--line); }
.btn-line:hover { border-color: var(--violet); color: var(--violet); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.tag { display: inline-block; font-size: 12.5px; font-weight: 700; line-height: 1.7; padding: 2px 11px; border-radius: 999px; background: #EFE8F9; color: var(--plum); }
.tag-gold { background: rgba(201,162,74,.17); color: #7A5A1C; }
.dark .tag { background: rgba(232,209,153,.13); color: var(--gold-hi); }
.bar { height: 8px; border-radius: 99px; background: #EEE7F8; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--violet); }
.bar i.done { background: var(--gold); }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: 14px; font-weight: 700; }
input[type="text"], input[type="tel"], input[type="email"], select, textarea { min-height: 48px; border: 1px solid var(--line); border-radius: 11px; padding: 0 14px; font: 15px var(--font-body); background: var(--surface); color: var(--text); width: 100%; }
textarea { padding-block: 12px; min-height: 120px; resize: vertical; line-height: 1.8; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--violet-hi); outline-offset: 0; border-color: transparent; }
.error { color: var(--bad); font-size: 14px; }
.notice { background: #E9F6EF; color: var(--ok); border-radius: 12px; padding: 12px 16px; font-weight: 500; }
.notice-bad { background: #FBECEA; color: var(--bad); }

/* header */
.site-head { position: sticky; top: 0; z-index: 30; background: rgba(18,10,30,.94); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(232,209,153,.14); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-dark); flex: none; }
.brand img { width: 72px; height: 36px; }
.brand b { display: block; font: 900 19px/1.25 var(--font-display); color: #fff; }
.brand small { display: block; font-size: 11.5px; color: var(--on-dark-muted); line-height: 1.3; }
.brand:hover { color: var(--on-dark); }
.nav { display: flex; gap: 2px; margin-inline-start: auto; align-items: center; }
.nav-item { position: relative; }
.nav-item > a { display: flex; align-items: center; gap: 5px; color: var(--on-dark); text-decoration: none; font-weight: 500; font-size: 14.5px; padding: 10px 11px; border-radius: 9px; white-space: nowrap; }
.nav-item > a:hover, .nav-item:focus-within > a { background: rgba(255,255,255,.07); color: var(--gold-hi); }
.nav-item.new > a::after { content: "جدید"; font-size: 10.5px; font-weight: 700; color: var(--ink); background: var(--gold); border-radius: 99px; padding: 0 6px; line-height: 1.7; }
.caret { width: 12px; height: 12px; opacity: .7; }
.sub { position: absolute; top: 100%; inset-inline-start: 0; min-width: 240px; background: var(--ink-2); border: 1px solid rgba(232,209,153,.2); border-radius: 14px; padding: 8px; display: grid; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s, transform .16s; box-shadow: 0 24px 50px rgba(0,0,0,.4); }
.nav-item:hover .sub, .nav-item:focus-within .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.sub a { color: var(--on-dark); text-decoration: none; padding: 9px 12px; border-radius: 9px; font-size: 14.5px; }
.sub a:hover { background: rgba(232,209,153,.1); color: var(--gold-hi); }
.head-actions { display: flex; gap: 8px; align-items: center; }
.login { color: var(--on-dark); font-size: 14.5px; text-decoration: none; padding: 8px 10px; white-space: nowrap; }
.login:hover { color: var(--gold-hi); }
.menu-btn { display: none; margin-inline-start: auto; min-height: 46px; min-width: 46px; border-radius: 11px; border: 1px solid rgba(232,209,153,.35); background: transparent; color: var(--on-dark); cursor: pointer; place-items: center; }
/* phone menu: main items only, groups open on tap; the panel scrolls inside the screen under the sticky header */
.mobile-menu { background: var(--ink-2); border-top: 1px solid rgba(232,209,153,.14); padding: 10px 16px 18px; display: grid; gap: 2px; max-height: calc(100vh - 78px); max-height: calc(100dvh - 78px); overflow-y: auto; overscroll-behavior: contain; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { color: var(--on-dark); text-decoration: none; padding: 11px 12px; border-radius: 9px; }
.mobile-menu .mm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 12px; border-radius: 9px; color: var(--on-dark); font-weight: 700; text-decoration: none; cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary .caret { width: 14px; height: 14px; flex: none; transition: transform .2s ease; }
.mobile-menu details[open] > summary { color: var(--gold-hi); }
.mobile-menu details[open] > summary .caret { transform: rotate(180deg); }
.mobile-menu details[open] { background: rgba(255,255,255,.03); border-radius: 11px; padding-bottom: 6px; }
.mobile-menu .mm-new { margin-inline-start: 8px; font-size: 10.5px; font-weight: 700; color: var(--ink); background: var(--gold); border-radius: 99px; padding: 0 7px; line-height: 1.8; vertical-align: middle; }
.mobile-menu a.child { display: block; padding: 10px 12px; padding-inline-start: 28px; color: var(--on-dark-muted); font-size: 15px; font-weight: 400; }
.mobile-menu a:hover, .mobile-menu summary:hover { background: rgba(255,255,255,.06); }
.mobile-menu .mm-foot { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(232,209,153,.14); }
html.menu-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .mobile-menu summary .caret { transition: none; } }
.site-head .wrap { width: min(1500px, 100% - 32px); }
@media (max-width: 1560px) { .site-head .wrap { gap: 14px; } .nav-item > a { padding-inline: 8px; font-size: 14px; } }
@media (max-width: 1320px) { .nav, .login { display: none; } .menu-btn { display: grid; } .head-actions { order: 1; } .menu-btn { order: 2; margin-inline-start: 0; } .head-actions { margin-inline-start: auto; } }
@media (max-width: 560px) { .brand small { display: none; } .brand img { width: 58px; height: 29px; } .head-actions .btn { padding: 0 14px; min-height: 42px; font-size: 13.5px; } }

/* hero */
.hero { position: relative; overflow: hidden; padding-block: 66px 88px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(52% 72% at 18% 44%, rgba(107,63,181,.5), transparent 72%), radial-gradient(40% 50% at 92% 0%, rgba(201,162,74,.12), transparent 70%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.12fr .88fr; gap: 40px; align-items: center; }
.hero-copy { display: grid; gap: 24px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.28; color: #fff; }
.hero h1 .eyebrow { display: flex; width: fit-content; line-height: 1.6; margin-bottom: 24px; }
.hero h1 .tagline { display: block; }
.hero h1 em { font-style: normal; background: linear-gradient(95deg, var(--gold-hi), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 6px; }
.trust div { border-top: 1px solid rgba(232,209,153,.28); padding-top: 12px; font-size: 13.5px; color: var(--on-dark-muted); line-height: 1.7; }
.trust b { display: block; color: var(--on-dark); font-size: 15px; font-family: var(--font-display); font-weight: 700; }
.portrait { position: relative; justify-self: center; width: min(460px, 100%); aspect-ratio: 1 / 1.08; display: grid; place-items: end center; }
.portrait .halo { position: absolute; left: 50%; top: 48%; translate: -50% -50%; border-radius: 50%; border: 1px solid rgba(232,209,153,.5); aspect-ratio: 1; }
.portrait .h1 { width: 88%; background: radial-gradient(circle at 50% 42%, rgba(232,209,153,.26), rgba(107,63,181,.18) 58%, transparent 74%); }
.portrait .h2 { width: 102%; border-color: rgba(232,209,153,.2); border-style: dashed; animation: spin 90s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.portrait img { position: relative; width: 94%; -webkit-mask-image: linear-gradient(180deg, #000 86%, transparent 100%); mask-image: linear-gradient(180deg, #000 86%, transparent 100%); }
.license-chip { position: absolute; inset-inline-start: -8px; bottom: 26px; background: rgba(255,255,255,.97); color: var(--text); border-radius: 14px; padding: 11px 15px; box-shadow: 0 16px 44px rgba(0,0,0,.38); display: flex; gap: 10px; align-items: center; font-size: 12.5px; line-height: 1.6; max-width: 232px; }
.license-chip svg { width: 30px; height: 30px; flex: none; color: var(--violet); }
.license-chip b { display: block; font-size: 13.5px; font-family: var(--font-display); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .portrait { order: -1; width: min(330px, 86%); }
}
@media (max-width: 560px) { .trust { grid-template-columns: 1fr; gap: 10px; } .license-chip { inset-inline-start: -4px; bottom: 12px; } }

/* consulting: arched cards */
.services { background: linear-gradient(180deg, var(--ground), #F1ECF8); }
.arches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.arch { position: relative; display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: var(--text); background: var(--surface); border-radius: 220px 220px 20px 20px; border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(51,25,92,.07); transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s, border-color .28s; }
.arch:hover { transform: translateY(-10px); box-shadow: 0 34px 70px rgba(51,25,92,.18); border-color: var(--gold); color: var(--text); }
.arch-art { position: relative; margin: 10px 10px 0; aspect-ratio: 1 / 1.02; border-radius: 210px 210px 14px 14px; overflow: hidden; background: radial-gradient(90% 70% at 50% 18%, #54309A 0%, var(--plum) 48%, var(--ink) 100%); display: grid; place-items: center; }
.arch-art::before { content: ""; position: absolute; inset: 0; background-image: url("../img/khatam.svg"); background-size: 58px 58px; opacity: .75; }
.arch-art::after { content: ""; position: absolute; inset: 7px; border-radius: 204px 204px 9px 9px; border: 1px solid rgba(232,209,153,.32); pointer-events: none; }
.arch-art svg { position: relative; width: 74%; height: auto; color: var(--gold-hi); filter: drop-shadow(0 0 14px rgba(232,209,153,.25)); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.arch:hover .arch-art svg { transform: scale(1.07); }
.arch-body { padding: 20px 22px 24px; display: grid; gap: 8px; align-content: start; }
.arch-body h3 { font-size: 21px; }
.arch-body p { color: var(--muted); font-size: 14.5px; line-height: 1.85; }
.arch-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 700; font-size: 14.5px; color: var(--violet); }
.arch-go i { font-style: normal; transition: transform .25s; }
.arch:hover .arch-go i { transform: translateX(-6px); }
.also { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-top: 30px; color: var(--muted); font-size: 15px; }
.also a { text-decoration: none; background: var(--surface); border: 1px solid var(--line); padding: 7px 18px; border-radius: 999px; font-weight: 500; }
.also a:hover { border-color: var(--gold); }
@media (max-width: 1040px) { .arches { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .arches { grid-template-columns: 1fr; max-width: 340px; margin-inline: auto; } }

/* process + file */
.process { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; counter-increment: step; }
.steps li::before { content: counter(step, persian); width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--plum); color: var(--gold-hi); font: 800 21px var(--font-display); }
.steps h3 { font-size: 18px; }
.steps p { color: var(--muted); font-size: 15px; }
.file { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 26px 60px rgba(51,25,92,.1); display: grid; gap: 16px; }
.file-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.file-head h3 { font-size: 18px; }
.file-head p { color: var(--muted); font-size: 14px; }
.goal { display: grid; gap: 6px; }
.goal-top { display: flex; justify-content: space-between; font-size: 14.5px; gap: 10px; }
.goal-top span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.chart-box { border-top: 1px solid var(--line); padding-top: 14px; }
.chart-title { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 10px; }
.chart-box svg { width: 100%; height: auto; display: block; direction: ltr; }
.task { background: var(--ground); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.task b { color: var(--plum); }
@media (max-width: 900px) { .process { grid-template-columns: 1fr; } }

/* booking */
.booking-band { position: relative; overflow: hidden; }
.booking-band .wrap { position: relative; display: grid; grid-template-columns: .85fr 1.15fr; gap: 52px; align-items: start; }
.booking-intro { display: grid; gap: 18px; }
.modes { display: grid; gap: 12px; }
.mode { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius); border: 1px solid rgba(232,209,153,.25); cursor: pointer; transition: border-color .15s, background .15s; }
.mode:has(input:checked) { border-color: var(--gold); background: rgba(232,209,153,.09); }
.mode input { width: 20px; height: 20px; accent-color: var(--gold); margin: 0; }
.mode b { display: block; font-size: 16px; font-family: var(--font-display); }
.mode small { color: var(--on-dark-muted); font-size: 13.5px; }
.mode .price { font-weight: 800; color: var(--gold-hi); white-space: nowrap; }
.planner { background: var(--surface); color: var(--text); border-radius: 22px; padding: 26px; display: grid; gap: 18px; box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.planner h3 { color: var(--text); }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head b { font: 800 17px var(--font-display); }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--plum); font-size: 15px; }
.cal-nav button:disabled { opacity: .35; cursor: default; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.cal .dow { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.cal button, .cal span.day { min-height: 42px; border-radius: 10px; font: 500 14.5px var(--font-body); display: grid; place-items: center; }
.cal span.day { color: #AEA4BF; }
.cal button { border: 1px solid var(--violet); background: #F3EEFB; color: var(--plum); cursor: pointer; font-weight: 700; }
.cal button[aria-pressed="true"] { background: var(--plum); color: #fff; border-color: var(--plum); }
.slots { display: flex; flex-wrap: wrap; gap: 8px; min-height: 42px; }
.slots button { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 14.5px var(--font-body); color: var(--text); cursor: pointer; }
.slots button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.code-row .btn { min-height: 48px; border-radius: 11px; }
.summary { border-top: 1px dashed var(--line); padding-top: 14px; display: grid; gap: 12px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; flex-wrap: wrap; }
.note { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .booking-band .wrap { grid-template-columns: 1fr; } }

/* tests on the home page */
.tests-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.tests-grid:has(> :nth-child(-n+2):last-child) { max-width: 760px; margin-inline: auto; }
.test-card { position: relative; overflow: hidden; display: grid; gap: 12px; align-content: start; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: transform .24s, box-shadow .24s, border-color .24s; }
.test-card:hover { transform: translateY(-6px); border-color: var(--violet); box-shadow: 0 26px 54px rgba(51,25,92,.14); color: var(--text); }
.test-art { height: 110px; border-radius: 14px; background: linear-gradient(135deg, var(--plum), var(--ink)); display: grid; place-items: center; color: var(--gold-hi); position: relative; overflow: hidden; }
.test-art::before { content: ""; position: absolute; inset: 0; background-image: url("../img/khatam.svg"); background-size: 44px 44px; opacity: .6; }
.test-art svg, .test-art b { position: relative; }
.test-art svg { width: 66px; height: 66px; }
.test-art b { font: 900 34px var(--font-display); letter-spacing: .08em; direction: ltr; }
.test-card h3 { font-size: 18px; }
.test-card p { color: var(--muted); font-size: 14.5px; line-height: 1.85; }
.test-meta { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 1040px) { .tests-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tests-grid { grid-template-columns: 1fr; } }

/* academy */
.courses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.course { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: var(--text); transition: transform .24s, box-shadow .24s; }
.course:hover { transform: translateY(-5px); box-shadow: 0 24px 50px rgba(51,25,92,.13); color: var(--text); }
.course-cover { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--plum), var(--ink)); position: relative; display: grid; place-items: center; }
.course-cover::before { content: ""; position: absolute; inset: 0; background-image: url("../img/khatam.svg"); background-size: 48px 48px; opacity: .6; }
.course-cover svg { position: relative; width: 62px; height: 62px; color: var(--gold-hi); }
.course-cover .tag { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(232,209,153,.16); color: var(--gold-hi); }
.course-body { padding: 18px; display: grid; gap: 10px; align-content: start; }
.course-body h3 { font-size: 17px; }
.course-body p { color: var(--muted); font-size: 14.5px; }
.course-meta { display: flex; gap: 12px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.course-meta b { color: var(--plum); }
.audio { margin-top: 22px; background: var(--ink); color: var(--on-dark); border-radius: 22px; padding: 28px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; align-items: center; }
.audio h3 { color: #fff; font-size: 23px; }
.audio p { color: var(--on-dark-muted); font-size: 15px; }
.player { background: rgba(255,255,255,.05); border: 1px solid rgba(232,209,153,.2); border-radius: 16px; padding: 16px; display: grid; gap: 10px; }
.chapter { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 14.5px; color: var(--on-dark-muted); }
.chapter:last-child { border-bottom: 0; }
.chapter b { color: var(--on-dark); font-weight: 500; }
@media (max-width: 1100px) { .courses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .audio { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .courses { grid-template-columns: 1fr; } }

/* ventures: three real businesses on one continuous gold line */
.ventures { position: relative; overflow: hidden; }
.ventures::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 50% at 50% 34%, rgba(107,63,181,.42), transparent 74%); }
.ventures .wrap { position: relative; }
.v-infinity { position: absolute; left: 50%; top: 44%; translate: -50% -50%; width: min(1100px, 130%); opacity: .13; pointer-events: none; }
.v-head { text-align: center; display: grid; justify-items: center; gap: 14px; margin-bottom: 54px; }
.v-head h2 { font-size: clamp(30px, 4.4vw, 52px); max-width: 18em; }
.v-head h2 em { font-style: normal; color: var(--gold-hi); }
.v-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: start; }
.v-card { position: relative; display: grid; gap: 16px; padding: 14px 14px 22px; border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); border: 1px solid rgba(232,209,153,.2); backdrop-filter: blur(4px); transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s; }
.v-card:nth-child(2) { margin-top: 42px; }
.v-card:hover { transform: translateY(-10px); border-color: var(--gold); box-shadow: 0 40px 80px rgba(0,0,0,.45); }
.browser { border-radius: 13px; overflow: hidden; background: #0E0817; border: 1px solid rgba(255,255,255,.1); }
.browser-top { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: rgba(255,255,255,.06); direction: ltr; }
.browser-top i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.22); }
.browser-top span { margin-inline-start: 8px; font: 500 11.5px var(--font-body); color: var(--on-dark-muted); background: rgba(0,0,0,.28); border-radius: 99px; padding: 1px 12px; }
.browser-view { height: 214px; overflow: hidden; position: relative; }
.browser-view img { width: 100%; height: auto; transition: transform 5s linear; transform: translateY(0); }
.v-card:hover .browser-view img { transform: translateY(calc(-100% + 214px)); }
.browser-soon { height: 100%; display: grid; place-items: center; gap: 10px; align-content: center; text-align: center; background: radial-gradient(70% 70% at 50% 40%, rgba(107,63,181,.5), transparent), var(--ink-2); color: var(--on-dark-muted); font-size: 13.5px; }
.browser-soon img { width: 62px !important; transition: none !important; transform: none !important; }
.v-body { padding: 0 10px; display: grid; gap: 8px; }
.v-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-title h3 { font-size: 23px; font-weight: 900; }
.v-lesson { position: relative; color: var(--on-dark); font-size: 15px; line-height: 1.95; padding-inline-start: 14px; border-inline-start: 2px solid var(--gold); }
.v-lesson b { display: block; color: var(--gold-hi); font-size: 13px; }
.v-link { justify-self: start; color: var(--gold-hi); text-decoration: none; font-size: 14px; font-weight: 700; direction: ltr; }
.v-link:hover { color: #fff; }
.v-foot { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; border-top: 1px solid rgba(232,209,153,.18); padding-top: 22px; color: var(--on-dark-muted); font-size: 14px; }
@media (max-width: 960px) { .v-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } .v-card:nth-child(2) { margin-top: 0; } }

/* credentials */
.creds { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 18px; }
.cred { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 8px; align-content: start; }
.cred svg { width: 36px; height: 36px; color: var(--violet); }
.cred dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 14.5px; }
.cred dt { color: var(--muted); }
.cred dd { margin: 0; font-weight: 500; }
.cred p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .creds { grid-template-columns: 1fr; } }

/* articles */
.articles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.article { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: var(--text); transition: transform .24s, box-shadow .24s, border-color .24s; }
.article:hover { transform: translateY(-6px); box-shadow: 0 26px 54px rgba(51,25,92,.14); border-color: var(--violet); color: var(--text); }
.article-img { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--plum); }
.article-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.article:hover .article-img img { transform: scale(1.06); }
.article-img .tag { position: absolute; bottom: 10px; inset-inline-start: 10px; background: rgba(18,10,30,.8); color: var(--gold-hi); backdrop-filter: blur(4px); }
.article-body { padding: 16px 18px 18px; display: grid; gap: 10px; align-content: space-between; }
.article-body h3 { font: 700 16px/1.8 var(--font-display); letter-spacing: 0; }
.article-body time { font-size: 13px; color: var(--muted); }
.posts-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .articles, .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .articles, .posts-grid { grid-template-columns: 1fr; } }

/* financial health checkup */
.health { position: relative; overflow: hidden; }
.health::before { content: ""; position: absolute; inset: 0; background: radial-gradient(46% 70% at 84% 30%, rgba(107,63,181,.55), transparent 74%), radial-gradient(34% 44% at 6% 90%, rgba(201,162,74,.14), transparent 72%); }
.health .wrap { position: relative; display: grid; grid-template-columns: .82fr 1.18fr; gap: 52px; align-items: start; }
.health-intro { display: grid; gap: 18px; position: sticky; top: 104px; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pillar { border: 1px solid rgba(232,209,153,.22); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; background: rgba(255,255,255,.03); }
.pillar b { font: 800 16px var(--font-display); color: var(--gold-hi); }
.pillar span { font-size: 13px; color: var(--on-dark-muted); }
.hc { background: var(--surface); color: var(--text); border-radius: 22px; padding: clamp(20px, 3.4vw, 32px); box-shadow: 0 34px 80px rgba(0,0,0,.35); display: grid; gap: 18px; min-height: 480px; align-content: start; }
.hc h3 { color: var(--text); }
.hc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.hc-steps { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.hc-steps i { height: 6px; border-radius: 99px; background: #EEE7F8; transition: background .2s; }
.hc-steps i.on { background: var(--violet); }
.hc-q { font: 800 clamp(19px, 2.4vw, 23px)/1.7 var(--font-display); min-height: 3.4em; }
.hc-opts { display: grid; gap: 9px; }
.hc-opt { display: flex; align-items: center; gap: 12px; text-align: start; min-height: 54px; padding: 8px 16px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: 500 15.5px var(--font-body); cursor: pointer; transition: border-color .14s, background .14s; }
.hc-opt::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #C9BCDD; flex: none; }
.hc-opt:hover { border-color: var(--violet); background: #FAF7FD; }
.hc-opt[aria-pressed="true"] { border-color: var(--plum); background: #F3EEFB; }
.hc-opt[aria-pressed="true"]::before { border: 5px solid var(--plum); }
.hc-nav { display: flex; justify-content: space-between; }
.link-btn { background: none; border: 0; color: var(--violet); font: 700 14.5px var(--font-body); cursor: pointer; min-height: 40px; padding: 0 4px; }
.link-btn:hover { color: var(--plum); text-decoration: underline; }
.hc-score { display: grid; grid-template-columns: 190px 1fr; gap: 20px; align-items: center; }
.gauge { position: relative; width: 190px; }
.gauge svg { width: 100%; height: auto; display: block; }
.gauge b { position: absolute; inset: 42% 0 auto; text-align: center; font: 900 46px/1 var(--font-display); color: var(--plum); }
.gauge span { position: absolute; inset: 72% 0 auto; text-align: center; font-size: 12.5px; color: var(--muted); }
.tier { display: inline-block; font-weight: 800; padding: 3px 14px; border-radius: 999px; font-family: var(--font-display); }
.tier.healthy { background: #E5F5EC; color: var(--ok); }
.tier.coping { background: rgba(201,162,74,.2); color: #7A5A1C; }
.tier.vulnerable { background: #FBECEA; color: var(--bad); }
.hc-pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hc-pillar { background: var(--ground); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; font-size: 13px; }
.hc-pillar b { font-size: 18px; color: var(--plum); font-family: var(--font-display); }
.hc-list { display: grid; gap: 10px; }
.hc-action { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.hc-action input { width: 20px; height: 20px; accent-color: var(--violet); margin: 3px 0 0; }
.hc-action b { font-size: 15.5px; }
.hc-action p { font-size: 14px; color: var(--muted); line-height: 1.85; }
.hc-action:has(input:checked) { background: #F4FBF7; border-color: #BFE3CE; }
.hc-action:has(input:checked) b { text-decoration: line-through; color: var(--muted); }
.hc-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.hc-remind { display: grid; grid-template-columns: 1fr auto; gap: 8px; background: var(--ground); padding: 12px; border-radius: 13px; }
.hc-remind label { grid-column: 1 / -1; font-size: 14px; font-weight: 700; }
.hc-remind output { grid-column: 1 / -1; font-size: 13.5px; color: var(--ok); }
.hc-src { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; line-height: 1.8; }
@media (max-width: 960px) { .health .wrap { grid-template-columns: 1fr; } .health-intro { position: static; } }
@media (max-width: 560px) { .hc-score { grid-template-columns: 1fr; justify-items: center; text-align: center; } .hc-pillars { grid-template-columns: 1fr 1fr; } .hc-remind { grid-template-columns: 1fr; } }

/* inner pages */
.page-hero { position: relative; overflow: hidden; padding-block: 62px 66px; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 90% at 20% 20%, rgba(107,63,181,.5), transparent 72%); }
.page-hero .wrap { position: relative; display: grid; gap: 12px; }
.page-hero h1 { font-size: clamp(28px, 4.2vw, 46px); max-width: 22em; }
.crumbs { font-size: 13.5px; color: var(--on-dark-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--on-dark-muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold-hi); }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; }
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 4vw, 44px); min-width: 0; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: 25px; margin-top: 34px; }
.prose h3 { font-size: 20px; margin-top: 26px; }
.prose h4 { font-size: 17px; margin-top: 22px; }
.prose p, .prose li { font-size: 16.5px; line-height: 2.05; color: #2C2240; }
.prose li p { margin: 0; }
.prose ul, .prose ol { padding-inline-start: 22px; display: grid; gap: 6px; }
.prose img { border-radius: 14px; margin-inline: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: start; }
.prose th { background: var(--ground); }
.prose blockquote { margin: 0; padding: 14px 18px; border-inline-start: 3px solid var(--gold); background: var(--ground); border-radius: 10px; }
.side { position: sticky; top: 100px; display: grid; gap: 16px; }
.side-card { background: var(--ink); color: var(--on-dark); border-radius: 18px; padding: 22px; display: grid; gap: 12px; }
.side-card h3 { color: #fff; font-size: 19px; }
.side-card p { color: var(--on-dark-muted); font-size: 14.5px; }
.side-light { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.side-light h3 { color: var(--text); }
.side-light p { color: var(--muted); }
.post-meta { color: var(--on-dark-muted); font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.post-cover { border-radius: 16px; width: 100%; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { text-decoration: none; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 36px; }
.pagination a, .pagination span { min-width: 42px; min-height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; padding: 0 12px; }
.pagination .current { background: var(--plum); color: #fff; border-color: var(--plum); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.contact-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.contact-list li { display: grid; gap: 0; }
.contact-list span { font-size: 13px; color: var(--muted); }
.contact-list b { direction: ltr; text-align: start; font-size: 16px; unicode-bidi: plaintext; }
@media (max-width: 960px) { .page-grid { grid-template-columns: 1fr; } .side { position: static; } }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* sign in */
.auth { min-height: 72vh; display: grid; place-items: center; padding: 48px 16px; position: relative; overflow: hidden; }
.auth::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 30%, rgba(107,63,181,.55), transparent 74%); }
.auth-card { position: relative; width: min(420px, 100%); background: var(--surface); color: var(--text); border-radius: 22px; padding: 30px; display: grid; gap: 16px; box-shadow: 0 34px 80px rgba(0,0,0,.4); }
.auth-card h1 { font-size: 24px; color: var(--text); }
.auth-card p { color: var(--muted); font-size: 14.5px; }
.auth-card input { text-align: center; font-size: 19px; letter-spacing: .08em; direction: ltr; }
.test-code { background: rgba(201,162,74,.15); color: #6E5118; border-radius: 10px; padding: 8px 12px; font-size: 14px; text-align: center; }

/* client panel */
.panel-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; padding-block: 34px 70px; }
.panel-nav { position: sticky; top: 96px; background: var(--ink); border-radius: 18px; padding: 14px; display: grid; gap: 2px; }
.panel-user { padding: 8px 10px 14px; border-bottom: 1px solid rgba(255,255,255,.09); margin-bottom: 8px; color: var(--on-dark); }
.panel-user b { display: block; font-family: var(--font-display); }
.panel-user small { color: var(--on-dark-muted); direction: ltr; display: block; text-align: start; unicode-bidi: plaintext; }
.panel-nav a, .panel-nav button { display: flex; align-items: center; gap: 10px; color: var(--on-dark); text-decoration: none; padding: 10px 12px; border-radius: 10px; font: 500 15px var(--font-body); background: none; border: 0; width: 100%; cursor: pointer; text-align: start; }
.panel-nav a:hover, .panel-nav button:hover { background: rgba(255,255,255,.07); }
.panel-nav a.on { background: rgba(232,209,153,.14); color: var(--gold-hi); }
.panel-nav svg { width: 19px; height: 19px; flex: none; }
.panel-main { display: grid; gap: 20px; min-width: 0; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-title h1 { font-size: clamp(23px, 3vw, 30px); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 14px; }
.card h2 { font-size: 19px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; gap: 2px; }
.stat span { font-size: 13.5px; color: var(--muted); }
.stat b { font: 900 25px var(--font-display); color: var(--plum); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.case-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.case-row:first-of-type { border-top: 0; padding-top: 0; }
.case-row:hover { color: var(--violet); }
.case-row .bar { grid-column: 1 / -1; }
.ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) calc(var(--p) * 1%), #EEE7F8 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font: 900 20px var(--font-display); color: var(--plum); }
.task-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.task-row:first-child { border-top: 0; }
.task-row button { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #C9BCDD; background: var(--surface); cursor: pointer; display: grid; place-items: center; color: #fff; padding: 0; }
.task-row.done button { background: var(--ok); border-color: var(--ok); }
.task-row.done span { text-decoration: line-through; color: var(--muted); }
.task-row small { color: var(--muted); }
.session { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 6px; }
.session:first-of-type { border-top: 0; padding-top: 0; }
.session-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.session-top b { color: var(--text); font-family: var(--font-display); font-size: 16px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.table th { text-align: start; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.badge { display: inline-block; padding: 1px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: #EFE8F9; color: var(--plum); }
.badge.paid, .badge.done, .badge.active { background: #E5F5EC; color: var(--ok); }
.badge.pending, .badge.paused { background: rgba(201,162,74,.2); color: #7A5A1C; }
.badge.cancelled, .badge.no_show { background: #FBECEA; color: var(--bad); }
.empty { color: var(--muted); text-align: center; padding: 26px 10px; }
.learn { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.lesson-link { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--text); font-size: 14.5px; }
.lesson-link:hover { background: var(--ground); }
.lesson-link.on { background: #F3EEFB; color: var(--plum); font-weight: 700; }
.media { aspect-ratio: 16 / 9; background: var(--ink); border-radius: 14px; display: grid; place-items: center; color: var(--on-dark-muted); overflow: hidden; }
.media video, .media audio { width: 100%; }
@media (max-width: 900px) {
  .panel-shell { grid-template-columns: 1fr; }
  .panel-nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .panel-user { display: none; }
  .panel-nav a, .panel-nav button { white-space: nowrap; width: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .two, .learn { grid-template-columns: 1fr; }
}

/* footer */
.foot { padding-block: 66px 28px; position: relative; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; }
.foot h3 { font: 800 15.5px var(--font-display); color: var(--gold-hi); margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.foot a { color: var(--on-dark); text-decoration: none; }
.foot a:hover { color: var(--gold-hi); }
.foot p { color: var(--on-dark-muted); font-size: 14.5px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.socials a { border: 1px solid rgba(232,209,153,.3); border-radius: 999px; padding: 5px 14px; font-size: 13.5px; }
.legal { border-top: 1px solid rgba(255,255,255,.08); margin-top: 42px; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--on-dark-muted); }
.ltr { direction: ltr; unicode-bidi: plaintext; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

/* light cards that sit inside dark sections */
.hc .tag { background: #FBECEA; color: var(--bad); }
.hc .tag-gold { background: rgba(201,162,74,.2); color: #7A5A1C; }

/* loans: compare section and market */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loan-tabs { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 78px; z-index: 20; }
.loan-tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.loan-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 13px 14px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; }
.loan-tabs a:hover { color: var(--plum); }
.loan-tabs a.on { color: var(--plum); border-bottom-color: var(--gold); }
.loan-count { min-width: 20px; height: 20px; padding-inline: 5px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--gold); color: var(--ink); font-size: 12px; line-height: 1; }
.loan-page { padding-block: 34px 70px; }
.loan-page .wrap { display: grid; gap: 20px; }
.loan-page .wrap.page-grid { gap: 32px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-block: 2px; scrollbar-width: none; }
.chips a { flex: none; padding: 7px 15px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14.5px; }
.chips a:hover { border-color: var(--violet); color: var(--violet); }
.chips a.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.loan-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.loan-filters .field { flex: 1 1 170px; }
.loan-filters .btn { min-height: 48px; }
.loan-filter-check { min-height: 48px; }
.loan-reset { font-size: 14px; align-self: center; }
.loan-total { color: var(--muted); font-size: 14.5px; }
.loan-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.loan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; display: grid; gap: 14px; align-content: start; }
.loan-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; flex-wrap: wrap; }
.loan-bank { font-size: 13.5px; color: var(--muted); }
.loan-card h3 { font-size: 18.5px; }
.loan-card h3 a { color: var(--text); text-decoration: none; }
.loan-card h3 a:hover { color: var(--violet); }
.loan-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 14px 0; border-block: 1px solid var(--line); }
.loan-facts dt, .market-facts dt { font-size: 12.5px; color: var(--muted); }
.loan-facts dd, .market-facts dd { margin: 0; font-weight: 700; font-size: 15px; }
.loan-facts-lg { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.loan-facts-lg dd { font-size: 18px; font-family: var(--font-display); color: var(--plum); }
.loan-guarantee { font-size: 14.5px; color: var(--muted); }
.loan-guarantee b { color: var(--text); }
.loan-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.compare-pick { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 14.5px; cursor: pointer; line-height: 1.7; }
.compare-pick input { width: 18px; height: 18px; accent-color: var(--plum); flex: none; margin-top: 3px; }
.compare-pick input:disabled + * , .compare-pick:has(input:disabled) { color: var(--muted); cursor: not-allowed; }
.loan-filter-check { align-items: center; }
.loan-filter-check input { margin-top: 0; }
.loan-note { color: var(--muted); font-size: 14px; line-height: 1.9; }
.loan-note b { color: var(--text); }
.loan-source { font-size: 14px; color: var(--muted); }
.loan-detail { display: grid; gap: 16px; min-width: 0; }
.loan-docs { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.loan-estimate { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.loan-estimate span { color: var(--on-dark-muted); font-size: 14.5px; }
.loan-estimate b { font: 800 19px var(--font-display); color: var(--gold-hi); }
.loan-guide { padding-block: 0 70px; }
.loan-guide .sec-head { margin-bottom: 24px; }
.loan-guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.loan-guide-grid .card { align-content: start; gap: 8px; }
.loan-guide-grid h3 { font-size: 17.5px; }
.loan-guide-grid p { font-size: 15px; color: var(--muted); }
.loan-cta { padding-block: 54px; }
.loan-cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.loan-cta h2 { font-size: clamp(23px, 2.8vw, 31px); margin-bottom: 8px; }
.compare-tray { position: fixed; inset-inline: 16px; bottom: 16px; z-index: 25; max-width: 620px; margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--ink); color: var(--on-dark); border-radius: 16px; padding: 10px 16px; box-shadow: 0 18px 44px rgba(18,10,30,.35); }
.compare-tray > div { display: flex; align-items: center; gap: 12px; }
.compare-clear { background: none; border: 0; color: var(--on-dark-muted); font: 500 14px var(--font-body); cursor: pointer; padding: 8px 4px; }
.compare-clear:hover { color: #fff; }
.compare-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.compare-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14.5px; table-layout: fixed; }
.compare-table th, .compare-table td { padding: 13px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare-table thead th { font-family: var(--font-display); font-size: 15.5px; background: var(--ground); }
.compare-table thead th a:first-child { color: var(--plum); text-decoration: none; display: block; }
.compare-table tbody th { color: var(--muted); font-weight: 500; width: 190px; }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: 0; }
.compare-table td.best { background: rgba(201,162,74,.14); font-weight: 700; }
.compare-remove { font: 500 13px var(--font-body); color: var(--bad); }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.calc-result p { font-size: 14px; }
.market-closed { background: rgba(201,162,74,.16); color: #5F4614; border: 1px solid rgba(201,162,74,.5); border-radius: 12px; padding: 11px 16px; font-size: 14.5px; }
.market-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.page-hero .market-actions { margin-top: 10px; }
.market-rules { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: 14px; padding: 18px 22px; display: grid; gap: 8px; }
.market-rules h2 { font-size: 18px; }
.market-rules ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: 15px; }
.market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.market-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: grid; gap: 10px; align-content: start; text-decoration: none; color: var(--text); transition: border-color .18s, transform .18s; }
.market-card:hover { border-color: var(--violet); color: var(--text); transform: translateY(-2px); }
.market-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.market-card h3 { font-size: 17.5px; }
.market-verified { font-size: 12.5px; font-weight: 700; color: var(--ok); }
.market-facts { display: grid; gap: 6px; margin: 0; }
.market-facts > div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.market-facts-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.market-city { font-size: 13.5px; color: var(--muted); }
.market-report { display: grid; gap: 8px; margin-top: 10px; }
.side-light summary { cursor: pointer; color: var(--violet); font-weight: 700; font-size: 14.5px; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.field-help { color: var(--muted); font-size: 13.5px; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.doc-list li { padding: 11px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.doc-list li:first-child { border-top: 0; }
.doc-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.doc-file { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; overflow-wrap: anywhere; }
.doc-upload { padding-top: 14px; border-top: 1px dashed var(--line); }
input[type="file"] { font: 14px var(--font-body); min-height: 48px; padding: 10px 0; width: 100%; }
.link-btn.link-bad { color: var(--bad); min-height: 0; padding: 0; font-weight: 500; font-size: 14px; }
.badge.approved { background: #E5F5EC; color: var(--ok); }
.badge.draft, .badge.closed { background: #EFEBF4; color: var(--muted); }
.badge.changes { background: rgba(201,162,74,.2); color: #7A5A1C; }
.badge.rejected, .badge.expired { background: #FBECEA; color: var(--bad); }
@media (max-width: 1040px) { .loan-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .loan-list { grid-template-columns: 1fr; } .calc-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .loan-guide-grid, .market-grid, .market-facts-wide { grid-template-columns: 1fr; }
  .loan-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loan-filters .field { flex-basis: 100%; }
  .loan-tabs { top: 70px; }
}

/* official source box on a loan page */
.official { background: linear-gradient(180deg, #FFFBF1, #FFF6E2); border: 1.5px solid rgba(201,162,74,.65); border-radius: 18px; padding: 20px 22px; display: grid; gap: 16px; }
.official-head { display: flex; gap: 14px; align-items: flex-start; }
.official-head svg { width: 38px; height: 38px; flex: none; color: #9A7424; background: rgba(201,162,74,.18); border-radius: 12px; padding: 7px; }
.official-head h2 { font-size: 19px; }
.official-head p { color: var(--muted); font-size: 15px; margin-top: 2px; }
.official-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.official-actions .btn { white-space: normal; text-align: center; line-height: 1.5; }
.official-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; margin: 0; padding-top: 14px; border-top: 1px solid rgba(201,162,74,.35); }
.official-meta dt { font-size: 12.5px; color: var(--muted); }
.official-meta dd { margin: 0; font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }
.official-meta a { color: var(--plum); }
.official-meta small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.official-warn { font-size: 13.5px; color: #6E5118; }
.official-pill { display: inline-block; padding: 3px 12px; border-radius: 99px; background: rgba(201,162,74,.2); color: #5F4614; font-weight: 700; text-decoration: none; }
.official-pill:hover { background: var(--gold); color: var(--ink); }
.official-host, .official-date { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; text-align: right; }
@media (max-width: 640px) { .official-meta { grid-template-columns: 1fr; } .official-actions .btn { width: 100%; } }

/* real cost of a deposit loan */
.real-cost { gap: 14px; }
.real-cost-inputs { display: flex; flex-wrap: wrap; gap: 12px; }
.real-cost-inputs .field { flex: 1 1 200px; }
.real-cost table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.real-cost th, .real-cost td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
.real-cost th { color: var(--muted); font-weight: 500; font-size: 13px; }
.real-cost td.eff { font-weight: 800; color: var(--plum); }
.real-cost tr.best td { background: rgba(201,162,74,.12); }
.real-cost-note { font-size: 13.5px; color: var(--muted); }
.real-cost-lead { color: var(--text); }
.loan-real { font-size: 14px; color: #6E5118; background: rgba(201,162,74,.12); border-radius: 10px; padding: 6px 12px; }
.loan-real b { color: var(--plum); }

/* loan news */
.loan-alert-cta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; border-color: rgba(107,63,181,.3); background: linear-gradient(180deg, #FBF8FF, #F4EEFC); }
.loan-alert-cta h2 { font-size: 19px; }
.loan-alert-cta p { color: var(--muted); font-size: 15px; }
.alert-form { display: grid; gap: 14px; }
.alert-kinds { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; }
.alert-kinds legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.alert-kinds legend small { font-weight: 400; color: var(--muted); }
.alert-round { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.alert-round:first-of-type { border-top: 0; padding-top: 0; }
.alert-round-head { display: flex; gap: 10px; align-items: center; }
.alert-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.alert-items li { display: grid; gap: 2px; }
.alert-items .badge { justify-self: start; }
.alert-items small { color: var(--muted); }
.alert-items p { font-size: 14.5px; color: var(--muted); }
@media (max-width: 640px) { .loan-alert-cta { grid-template-columns: 1fr; } }
