/* Kuraksa visual system. Load after legacy styles; opt in with body.ak-site.
   Calculator math, chart datasets and application layouts are outside this layer. */
body.ak-site {
  --ak-ink: #203633;
  --ak-muted: #52645f;
  --ak-paper: #f8f7f3;
  --ak-surface: #fff;
  --ak-soft: #e8efea;
  --ak-line: #d5dfd9;
  --ak-field-line: #7c928a;
  /* Shared accent tokens are defined in site-shell.css, including game chrome. */
  --ak-detail: #8a613e;
  --ak-topic-soft: #f0f2eb;
  --ak-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ak-text-xs: .8125rem;
  --ak-text-sm: .875rem;
  --ak-text-base: 1rem;
  --ak-text-lead: 1.125rem;
  --ak-space-1: .25rem;
  --ak-space-2: .5rem;
  --ak-space-3: .75rem;
  --ak-space-4: 1rem;
  --ak-space-6: 1.5rem;
  --ak-space-8: 2rem;
  --ak-space-12: 3rem;
  --ak-space-16: 4rem;
  --ak-space-24: 6rem;
  --ak-radius-control: .75rem;
  --ak-radius-card: 1.25rem;
  --ak-page-max: 72rem;
  --ak-shadow: 0 8px 28px #20363308;
  color: var(--ak-ink);
  background: var(--ak-paper);
  font-family: var(--ak-font);
  font-size: var(--ak-text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The words identify the topic; these restrained surface changes are decorative. */
body.ak-site[data-home-variant="wealth"] { --ak-topic-soft: #edf2e8; }
body.ak-site[data-home-variant="review"] { --ak-topic-soft: #f2eee5; }
body.ak-site[data-home-variant="housing"] { --ak-topic-soft: #eaf1f2; }
body.ak-site[data-home-variant="insurance"] { --ak-topic-soft: #edf2ed; }
body.ak-site[data-home-variant="education"] { --ak-topic-soft: #eeeff5; }

.ak-site :where(h1,h2,h3,h4) { color: var(--ak-ink); font-family: var(--ak-font); }
.ak-site :where(h1,h2) { letter-spacing: -.035em; text-wrap: balance; }
.ak-site :where(p,li) { overflow-wrap: break-word; }
.ak-site :is(.text-slate-500,.text-gray-500,.text-gray-400,.text-slate-400), .ak-site .consent-settings { color: var(--ak-muted); }
.ak-site .card-featured .text-slate-400 { color: #dbe4e8; }
.ak-site .partner-tab .opacity-60 { opacity: 1; color: inherit; }
.ak-site :where(img,svg,video,iframe) { max-width: 100%; }
.ak-site :where(button,input,select,textarea) { font: inherit; }
.ak-site :where(button,a,input,select,textarea,summary) { -webkit-tap-highlight-color: #3156c820; }
.ak-site :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
  outline: 3px solid var(--ak-accent);
  outline-offset: 4px;
}
.ak-site :where(section,[id]) { scroll-margin-top: 5.5rem; }
.ak-site :where([hidden]) { display: none !important; }

.ak-site .ak-container { width: min(calc(100% - 2rem), var(--ak-page-max)); margin-inline: auto; }
.ak-site .ak-section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.ak-site .ak-section--soft { background: var(--ak-soft); }
.ak-site .ak-stack > * + * { margin-top: var(--ak-space-6); }
.ak-site .ak-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: var(--ak-space-6); }
.ak-site .ak-card, .ak-site .home-card, .ak-site .guide-box {
  min-width: 0;
  border: 1px solid var(--ak-line);
  border-radius: var(--ak-radius-card);
  background: var(--ak-surface);
  box-shadow: var(--ak-shadow);
}
.ak-site .ak-card { padding: clamp(1.25rem, 3vw, 2rem); }
.ak-site .ak-card h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.4; }
.ak-site .ak-card p { color: var(--ak-muted); line-height: 1.75; }
.ak-site .ak-eyebrow, .ak-site .home-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ak-accent);
}
.ak-site .ak-lead { max-width: 62ch; font-size: var(--ak-text-lead); line-height: 1.8; color: var(--ak-muted); }
.ak-site .ak-caption { font-size: var(--ak-text-sm); line-height: 1.7; color: var(--ak-muted); }
.ak-site .ak-text-link, .ak-site .home-text-link, .ak-site .article-content a {
  color: var(--ak-accent);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: .075em;
  text-underline-offset: .22em;
}
.ak-site :is(.ak-text-link,.home-text-link,.article-content a):hover { color: var(--ak-accent-hover); }

/* One action hierarchy, including the classes already emitted by legacy pages. */
.ak-site .ak-button, .ak-site .home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ak-space-2);
  min-height: 3rem;
  padding: .8rem 1.25rem;
  border: 1px solid var(--ak-accent);
  border-radius: var(--ak-radius-control);
  color: #fff;
  background: var(--ak-accent);
  font-size: var(--ak-text-base);
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.ak-site :is(a,button):is(.bg-cta-600,.bg-cta-700,.bg-cta-800,.bg-primary-600,.bg-primary-700),
.ak-site .site-footer__cta, .ak-site #homeHero [data-hero-primary], .ak-site #leadForm button[type="submit"] {
  min-height: 2.75rem;
  border-radius: var(--ak-radius-control);
  background: var(--ak-accent);
  color: #fff;
  box-shadow: none;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  transform: none;
}
.ak-site :is(.ak-button,.home-button,.site-footer__cta):hover,
.ak-site :is(a,button):is(.bg-cta-600,.bg-cta-700,.bg-cta-800,.bg-primary-600,.bg-primary-700):hover,
.ak-site #homeHero [data-hero-primary]:hover, .ak-site #leadForm button[type="submit"]:hover {
  background: var(--ak-accent-hover);
  color: #fff;
  border-color: var(--ak-accent-hover);
  box-shadow: none;
  transform: none;
}
.ak-site .ak-button--secondary, .ak-site .home-button.secondary {
  border-color: var(--ak-field-line);
  color: var(--ak-ink);
  background: var(--ak-surface);
}
.ak-site :is(.ak-button--secondary,.home-button.secondary):hover { border-color: var(--ak-accent); color: var(--ak-accent); background: var(--ak-soft); }
.ak-site .ak-button--quiet { border-color: transparent; color: var(--ak-accent); background: transparent; }
.ak-site .ak-button--quiet:hover { color: var(--ak-accent-hover); background: var(--ak-soft); border-color: var(--ak-soft); }
.ak-site :is(.ak-button,.home-button,button):disabled { cursor: not-allowed; opacity: .6; }
.ak-site :is(.text-primary-600,.text-primary-700,.text-cta-600,.text-cta-700) { color: var(--ak-accent); }
.ak-site :is(.hover\:text-primary-700,.hover\:text-cta-700):hover { color: var(--ak-accent-hover); }
.ak-site :is(.bg-primary-50,.bg-cta-50) { background-color: var(--ak-soft); }
.ak-site :is(.border-primary-200,.border-cta-200) { border-color: var(--ak-line); }

/* Keep number controls and range values intact; improve only their presentation. */
.ak-site :is(input:not([type="hidden"]):not([type="range"]):not([type="checkbox"]):not([type="radio"]),select,textarea) {
  min-height: 2.75rem;
  max-width: 100%;
  padding: .65rem .8rem;
  border: 1px solid var(--ak-field-line);
  border-radius: .65rem;
  color: var(--ak-ink);
  background: var(--ak-surface);
  line-height: 1.5;
  box-shadow: none;
}
.ak-site :is(input,textarea)::placeholder { color: #64766f; opacity: 1; }
.ak-site :is(input,select,textarea):focus-visible { border-color: var(--ak-accent); }
.ak-site input:is([type="checkbox"],[type="radio"],[type="range"]) { accent-color: var(--ak-accent); }
.ak-site input[type="range"] { min-width: 0; }
.ak-site textarea { resize: vertical; }
.ak-site .guide-option { border-color: var(--ak-line); }
.ak-site .guide-option:has(input:checked) { background: var(--ak-soft); border-color: var(--ak-accent); }

/* Homepage sizing is inherited from its tested responsive structure. */
.ak-site #homeHero { background: var(--ak-topic-soft); }
.ak-site #homeHero h1 { color: var(--ak-ink); font-weight: 750; letter-spacing: -.04em; }
.ak-site #homeHero [data-hero-copy] { color: var(--ak-muted); }
.ak-site #homeHero [data-hero-secondary] { color: var(--ak-ink); border-color: var(--ak-field-line); background: #ffffffb3; }
.ak-site #homeHero [data-hero-secondary]:hover { color: var(--ak-accent); background: var(--ak-surface); border-color: var(--ak-accent); }
.ak-site .home-section h2 { color: var(--ak-ink); line-height: 1.2; }
.ak-site :is(.home-lead,.home-caption,.home-card p,.home-process p,.home-preparation ul,.home-faq details p) { color: var(--ak-muted); }
.ak-site .home-topic-nav { padding-top: var(--ak-space-4); }
.ak-site .home-topic-nav a { min-height: 2.75rem; display: inline-flex; align-items: center; border-color: var(--ak-line); }
.ak-site .home-topic-nav a[aria-current] { background: var(--ak-accent); border-color: var(--ak-accent); color: #fff; }
.ak-site .ak-topic-label { margin-block: 1.5rem 0; color: var(--ak-muted); font-size: var(--ak-text-sm); font-weight: 650; }
.ak-site .home-principle { border-color: var(--ak-accent); background: var(--ak-soft); }
.ak-site .home-soft { border-color: var(--ak-line); }
.ak-site .zonky-affiliate-note { color: var(--ak-detail); background: #f8f2e8; }
.ak-site .learning-intro h1 { color: var(--ak-ink); }
.ak-site .learning-page .badge-new, .ak-site.learning-page .badge-new { background: var(--ak-accent); }

/* Optional editorial hooks for content pages; keep real portraits and logos. */
.ak-site .ak-brand-hero { background: var(--ak-topic-soft); color: var(--ak-ink); border-bottom: 1px solid var(--ak-line); }
.ak-site .ak-brand-hero > .pointer-events-none { display: none; }
.ak-site .ak-brand-hero :is(h1,h2), .ak-site .ak-brand-hero p.text-white { color: var(--ak-ink); }
.ak-site .ak-brand-hero :is(p,span):is(.text-slate-300,.text-slate-400) { color: var(--ak-muted); }
.ak-site .ak-editorial { max-width: 66ch; line-height: 1.8; }
.ak-site .ak-editorial h1 { font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.15; font-weight: 750; }
.ak-site .ak-editorial h2 { margin-block: 2rem .9rem; font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.25; font-weight: 700; }
.ak-site .ak-editorial p + p { margin-top: var(--ak-space-4); }
.ak-site.ak-editorial main h1, .ak-site .ak-brand-hero h1 { font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.15; font-weight: 750; }
.ak-site.ak-editorial main h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.3; }
.ak-site.ak-editorial main a:not([class]) { color: var(--ak-accent); text-decoration: underline; text-underline-offset: .2em; }
.ak-site .ak-portrait { border: 1px solid var(--ak-line); border-radius: var(--ak-radius-card); background: var(--ak-soft); overflow: hidden; }
.ak-site .ak-note { padding: var(--ak-space-6); border-left: 3px solid var(--ak-accent); border-radius: 0 var(--ak-radius-control) var(--ak-radius-control) 0; background: var(--ak-soft); color: var(--ak-ink); }
.ak-site .ak-trust-grid { display: grid; grid-template-columns: 1fr; gap: var(--ak-space-6); }
.ak-site .ak-trust-grid > * { min-width: 0; }
.ak-site .ak-icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: .8rem; background: var(--ak-soft); color: var(--ak-accent); }
.ak-site .ak-icon-badge svg { width: 1.4rem; height: 1.4rem; stroke-width: 1.65; }
.ak-site .ak-consultation { padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--ak-line); border-radius: var(--ak-radius-card); background: var(--ak-soft); }
.ak-site .ak-consultation p { max-width: 62ch; color: var(--ak-muted); }
.ak-site .partner-tab { min-height: 2.75rem; border-color: var(--ak-line); color: var(--ak-muted); }
.ak-site .partner-tab[aria-selected="true"] { color: #fff; background: var(--ak-accent); border-color: var(--ak-accent); }
.ak-site .partner-tab:hover:not([aria-selected="true"]) { background: var(--ak-soft); }

.ak-site .ak-faq details, .ak-site .home-faq details { border-bottom: 1px solid var(--ak-line); }
.ak-site .ak-faq summary { padding: 1.15rem 1.5rem 1.15rem 0; color: var(--ak-ink); cursor: pointer; font-size: 1.0625rem; font-weight: 650; line-height: 1.6; }
.ak-site .ak-faq details > :not(summary) { color: var(--ak-muted); padding-bottom: var(--ak-space-6); line-height: 1.8; }
.ak-site .faq-summary-inner { border-color: var(--ak-line); background: var(--ak-surface); box-shadow: none; }
.ak-site .faq-action { color: var(--ak-accent); background: var(--ak-soft); }
.ak-site section#faq .group.p-6:hover { transform: none; box-shadow: var(--ak-shadow); }

/* Chrome is shared; never select every header because calculators have their own. */
.ak-site > header { background: #fffffff2; border-bottom-color: var(--ak-line); }
/* Header/footer rules live in site-shell.css on every public page. */
.ak-site .consent-ui { color: var(--ak-ink); font-family: var(--ak-font); }
.ak-site .consent-ui a { color: var(--ak-accent); }
.ak-site .consent-actions button { min-height: 2.75rem; border-color: var(--ak-field-line); border-radius: var(--ak-radius-control); color: var(--ak-ink); background: var(--ak-surface); }
.ak-site .consent-actions .consent-primary { color: #fff; background: var(--ak-accent); border-color: var(--ak-accent); }
.ak-site .consent-actions .consent-primary:hover { background: var(--ak-accent-hover); }
.ak-site .consent-dialog-body input { accent-color: var(--ak-accent); }
.ak-site .consent-settings-fallback { border-color: var(--ak-field-line); color: var(--ak-ink); }

body.ak-calculator { background: var(--ak-paper); }
.ak-calculator main { color: var(--ak-ink); }
.ak-calculator main .grid > * { min-width: 0; }
.ak-calculator main h1 { font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.2; letter-spacing: -.03em; }
.ak-calculator main > header, .ak-calculator main > .mb-8 { max-width: 64ch; }
.ak-calculator main :is(.pill,.rounded-2xl.border,.shadow-sm.border):not([data-next-steps]) { border-color: var(--ak-line); background-color: var(--ak-surface); box-shadow: var(--ak-shadow); }
.ak-calculator .input-num { min-width: 0; max-width: 50%; font-variant-numeric: tabular-nums; }
.ak-calculator :is(.result-big,#outPayment,#outTotal) { font-variant-numeric: tabular-nums; color: var(--ak-ink); }
.ak-calculator [data-next-steps] { border-color: var(--ak-line); background: var(--ak-soft); }
.ak-calculator #progressBar { background: var(--ak-accent); }
.ak-calculator table { font-variant-numeric: tabular-nums; }
.ak-calculator :is(th,td) { padding: .75rem; }
.ak-calculator thead { color: var(--ak-ink); background: var(--ak-soft); }
.ak-calculator main details > summary { min-height: 2.75rem; padding-block: .65rem; }

@media (min-width:48rem) {
  .ak-site .ak-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width:68rem) {
  .ak-site .ak-trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width:47.99rem) {
  .ak-site .ak-section { padding-block: 3rem; }
  .ak-site .ak-button { max-width: 100%; }
  .ak-site .ak-editorial h1 { font-size: clamp(1.9rem, 7.5vw, 2.5rem); }
  .ak-site .ak-consultation { padding: var(--ak-space-6); }
  .ak-site .ak-brand-hero { overflow-wrap: break-word; }
}
@media (prefers-reduced-motion:reduce) {
  html:has(body.ak-site) { scroll-behavior: auto !important; }
  .ak-site *, .ak-site *::before, .ak-site *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors:active) {
  .ak-site :is(a,button,input,select,textarea,summary):focus-visible { outline-color: Highlight; }
  .ak-site :is(.ak-button,.home-button,.home-topic-nav a) { border: 1px solid ButtonText; }
}
@media print {
  body.ak-site { background: #fff; color: #000; font-size: 11pt; }
  .ak-site > header, .ak-site .site-footer, .ak-site .consent-ui, .ak-site .consent-settings-fallback,
  .ak-site .home-topic-nav, .ak-site .partners-belt, .ak-site .ak-no-print, .ak-site #leadForm { display: none !important; }
  .ak-site .ak-container, .ak-site .home-shell { width: 100%; max-width: none; }
  .ak-site :is(.ak-card,.home-card,[data-next-steps]) { break-inside: avoid; box-shadow: none; }
  .ak-site :is(h1,h2,h3) { break-after: avoid; }
  .ak-site :is(input,select,textarea) { color: #000; border-color: #555; }
  .ak-site :is(.home-section,.ak-section) { padding-block: 1.25rem; }
}
