/*
 * StatClinic academic interface theme
 * A calm, flat visual system inspired by professional desktop statistics tools.
 * This stylesheet intentionally changes presentation only; application structure,
 * controls, routes, and statistical workflows remain unchanged.
 */

:root {
  color-scheme: light;
  --bg: #eef1f4;
  --bg2: #e5e9ee;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-selected: #e7f0f8;
  --glass: #ffffff;
  --glass-h: #f4f7fa;
  --glass-bg: #ffffff;
  --glass-hover-bg: #f7f9fb;
  --gb: #cfd6de;
  --gb-h: #8aa9c4;
  --border: #cfd6de;
  --border-strong: #b9c3ce;
  --purple: #2f6fa3;
  --blue: #2f6fa3;
  --sky: #4b83b0;
  --ice: #d9e8f4;
  --teal: #36779a;
  --cyan: #2f6fa3;
  --pink: #9d4d5a;
  --amber: #9b681d;
  --rose: #a84d59;
  --green: #36765f;
  --text: #202934;
  --muted: #536170;
  --dim: #6f7b88;
  --grad: #2f6fa3;
  --shadow: 0 2px 8px rgba(31, 41, 51, .12);
  --focus: 0 0 0 3px rgba(47, 111, 163, .18);
}

html { background: var(--bg); color-scheme: light; }

body {
  background: var(--bg) !important;
  background-image: none !important;
  background-attachment: initial !important;
  color: var(--text) !important;
  cursor: auto !important;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif !important;
  font-size: 14px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after {
  text-shadow: none !important;
  -webkit-tap-highlight-color: rgba(47, 111, 163, .12);
}

#cd, #cr,
.hero-orb, .hero-orb1, .hero-orb2, .hero-orb3,
[style*="position:absolute"][style*="radial-gradient"] {
  display: none !important;
}

#app [style*="animation:orb-drift"] { display: none !important; animation: none !important; }
#app [style*="animation:fadeInUp"],
.home-hero > *, .home-actions {
  animation: none !important;
  opacity: 1 !important;
}

a { color: #245f91; }
a:hover { color: #174a75; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

button, a, .wc, .home-action, .category-btn, .test-btn,
.a-card, .cat-card, .featured-card, .tool-card {
  transform: none !important;
  text-shadow: none !important;
}

button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #2f6fa3 !important;
  outline-offset: 2px;
}

::selection { background: #cfe2f2 !important; color: #162533 !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #edf0f3 !important; }
::-webkit-scrollbar-thumb {
  background: #b8c1cb !important;
  border: 2px solid #edf0f3;
  border-radius: 8px !important;
}
::-webkit-scrollbar-thumb:hover { background: #9ea9b5 !important; }

/* Application shell */
#sidebar {
  background: #f4f6f8 !important;
  border-right: 1px solid #c5ccd4 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#sidebar > div:first-child {
  background: #ffffff !important;
  border-bottom-color: #cfd6de !important;
}

#sidebar img {
  background: #ffffff !important;
  border-color: #cfd6de !important;
  border-radius: 4px !important;
}

#sidebar input, #si {
  background: #ffffff !important;
  border: 1px solid #bfc8d2 !important;
  border-radius: 3px !important;
  color: var(--text) !important;
  box-shadow: inset 0 1px 1px rgba(31, 41, 51, .04) !important;
}

#sidebar input:focus, #si:focus { border-color: #2f6fa3 !important; box-shadow: var(--focus) !important; }

.nc {
  padding: 16px 16px 5px !important;
  color: #647382 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .75px !important;
}

.ni {
  min-height: 34px;
  padding: 7px 16px !important;
  border-left: 3px solid transparent !important;
  color: #455363 !important;
  font-size: 13px !important;
  transition: background-color .12s, color .12s, border-color .12s !important;
}

.ni[style*="color:var(--cyan)"], .ni[style*="color: var(--cyan)"] { color: #2f6fa3 !important; }
.ni:hover { background: #e8edf2 !important; color: #1f2c38 !important; }
.ni.active {
  background: #dfeaf4 !important;
  border-left-color: #2f6fa3 !important;
  color: #174f7d !important;
  font-weight: 600 !important;
}

#main { background: #eef1f4 !important; }

#main > header {
  background: #ffffff !important;
  border-bottom: 1px solid #c5ccd4 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#main > header h1, #main > header h2, #main > header strong,
#main > header [style*="color:#f8fafc"], #main > header [style*="color:white"] {
  color: #253342 !important;
}

#main > header p, #main > header [style*="color:#64748b"],
#main > header [style*="color:#94a3b8"] { color: #687582 !important; }

#main > header button { border-radius: 3px !important; box-shadow: none !important; }
#main > header button.bp {
  color: #ffffff !important;
  border: 1px solid #245b88 !important;
}
#main > header button[style*="var(--grad)"] {
  color: #ffffff !important;
  border: 1px solid #245b88 !important;
}
#main > header a {
  background: #ffffff !important;
  color: #315f86 !important;
  border: 1px solid #aabac8 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
}
#main > header a:hover { background: #edf3f8 !important; border-color: #7799b4 !important; color: #214f75 !important; }

#app {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 28px !important;
  color: var(--text) !important;
}

#ft, footer {
  background: #f7f8fa !important;
  border-top: 1px solid #cfd6de !important;
  color: #687582 !important;
  box-shadow: none !important;
}

#ft a, footer a { color: #315f86 !important; }
#ft a:hover, footer a:hover { color: #173f62 !important; }

#ov { background: rgba(25, 33, 42, .35) !important; backdrop-filter: none !important; }

/* Core analysis panels */
.rc, .wc, .cw, .tool-ctx, .interp-panel, .stat-help-panel,
.home-flow, .card, .result, .report-box, .faq-item, .step,
.example-box, .def-box, .brand-card, .bottom-cta {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #cfd6de !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.rc {
  max-width: 920px;
  padding: 18px 20px !important;
  margin-top: 14px;
}

.wc { padding: 16px !important; }
.wc:hover {
  background: #f7f9fb !important;
  border-color: #8aa9c4 !important;
  box-shadow: none !important;
}

.cw { background: #ffffff !important; padding: 14px 16px !important; }

.st, .interp-stitle, .xl-label {
  color: #5f6d7a !important;
  border-bottom-color: #d9dfe5 !important;
  letter-spacing: .5px !important;
}

.fl, label { color: #465563 !important; }

.ci, .in, .xl-drop,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select, textarea {
  background: #ffffff !important;
  color: #202934 !important;
  border: 1px solid #b9c3ce !important;
  border-radius: 3px !important;
  box-shadow: inset 0 1px 1px rgba(31, 41, 51, .04) !important;
  color-scheme: light !important;
}

.ci:focus, .in:focus, .xl-drop:focus,
input:focus, select:focus, textarea:focus {
  background: #ffffff !important;
  border-color: #2f6fa3 !important;
  box-shadow: var(--focus) !important;
  outline: none !important;
}

.ci::placeholder, .in::placeholder, input::placeholder, textarea::placeholder { color: #8a949f !important; }
option { background: #ffffff !important; color: #202934 !important; }
input[type="checkbox"], input[type="radio"] { accent-color: #2f6fa3 !important; color-scheme: light !important; }

.bp, .chart-dl-btn, .hdr-cta, .cta, .btn-start,
.bottom-cta a, .cta-row a:not(.secondary), button[type="submit"] {
  background: #2f6fa3 !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 1px solid #245b88 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  font-weight: 600 !important;
  transition: background-color .12s, border-color .12s !important;
}

.bp:hover, .chart-dl-btn:hover, .hdr-cta:hover, .cta:hover,
.btn-start:hover, .bottom-cta a:hover, .cta-row a:not(.secondary):hover,
button[type="submit"]:hover {
  background: #265f8f !important;
  border-color: #1d4e77 !important;
  box-shadow: none !important;
}

.bs, .cite-copy-btn, .interp-btn, .cta-row a.secondary {
  background: #ffffff !important;
  color: #275f8d !important;
  border: 1px solid #9fb2c3 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
}

.bs:hover, .cite-copy-btn:hover, .interp-btn:hover, .cta-row a.secondary:hover {
  background: #edf3f8 !important;
  border-color: #6f94b4 !important;
  color: #174f7d !important;
}

.bd {
  background: #fff6f6 !important;
  color: #8f3e48 !important;
  border: 1px solid #d7a7ad !important;
  border-radius: 3px !important;
}

.report-btn {
  background: #4f6f61 !important;
  background-image: none !important;
  color: white !important;
  border: 1px solid #3f5d51 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
}
.report-btn:hover { background: #425f53 !important; box-shadow: none !important; }

.xl-btn, .xl-up-btn {
  background: #f4f8fb !important;
  color: #2c658f !important;
  border: 1px dashed #8eabc2 !important;
  border-radius: 3px !important;
}

.xl-btn:hover, .xl-up-btn:hover { background: #eaf2f8 !important; }

.mb, .metric > div {
  background: #f6f8fa !important;
  border: 1px solid #d4dbe2 !important;
  border-radius: 3px !important;
}

.mv, .metric strong, .def-formula {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  color: #245f91 !important;
}

.ml, .interp-body, .stat-help-result { color: #596674 !important; }

.nr {
  background: #eef6f2 !important;
  border: 1px solid #a9c8b9 !important;
  border-radius: 4px !important;
}

.nnr, .interp-warn {
  background: #fff8e9 !important;
  border: 1px solid #dcc594 !important;
  border-radius: 4px !important;
  color: #74551e !important;
}

.ab, .interp-apa, .ctx-example {
  background: #f4f7fa !important;
  border: 1px solid #d2d9e0 !important;
  border-left: 3px solid #4f7ea5 !important;
  border-radius: 0 3px 3px 0 !important;
  color: #465563 !important;
}

.cite-note {
  background: #f7f8fa !important;
  border-color: #bfc8d2 !important;
  border-radius: 3px !important;
  color: #687582 !important;
}

.sh { color: #2f725b !important; }
.sn { color: #a0444d !important; }

table, .tb, .info-table, .pv-spectrum {
  width: 100%;
  background: #ffffff !important;
  border: 1px solid #bdc7d1 !important;
  border-collapse: collapse !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

th, .tb th, .info-table th, .pv-row.header {
  background: #e8edf2 !important;
  background-image: none !important;
  color: #2c3946 !important;
  border: 1px solid #c4cdd6 !important;
  font-weight: 600 !important;
}

td, .tb td, .info-table td, .pv-cell {
  background: #ffffff !important;
  color: #394756 !important;
  border: 1px solid #d7dde3 !important;
}

tbody tr:nth-child(even) td, .tb tr:nth-child(even) td { background: #f8f9fa !important; }
tbody tr:hover td, .tb tr:hover td, .pv-row:hover:not(.header) { background: #eef4f9 !important; color: #253342 !important; }

.tb th, .tb td { padding: 8px 11px !important; }

.ti {
  background: #5c7890 !important;
  color: #ffffff !important;
  border-radius: 50% !important;
}

.tt {
  background: #ffffff !important;
  color: #2d3945 !important;
  border: 1px solid #aeb8c2 !important;
  border-radius: 3px !important;
  box-shadow: 0 3px 10px rgba(31, 41, 51, .16) !important;
}

/* Normalize dark inline presentation generated by the application */
#app div[style*="background:rgba(255,255,255"]:not([style*="height:100%"]) {
  background: #ffffff !important;
  border-color: #d0d7de !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

#app div[style*="background:linear-gradient"]:not([style*="height:100%"]) {
  background: #f7f9fb !important;
  border-color: #cfd6de !important;
  box-shadow: none !important;
}

#app button[style*="linear-gradient"], #app a[style*="linear-gradient"] {
  background: #2f6fa3 !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 1px solid #245b88 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
}

#app button[style*="box-shadow:0 0"], #app a[style*="box-shadow:0 0"] { box-shadow: none !important; }

#app div[style*="color:#f1f5f9"], #app h1[style*="color:#f1f5f9"],
#app h2[style*="color:#f1f5f9"], #app h3[style*="color:#f1f5f9"] { color: #253342 !important; }
#app div[style*="color:#94a3b8"], #app p[style*="color:#94a3b8"] { color: #596674 !important; }
#app div[style*="color:#64748b"], #app p[style*="color:#64748b"] { color: #6f7b88 !important; }
#app [style*="color:#c084fc"], #app [style*="color:#a5b4fc"] { color: #2f6fa3 !important; }

/* Home workspace: practical start screen rather than marketing hero */
.home-hero {
  margin: 0 !important;
  padding: 28px 30px !important;
  background: #ffffff !important;
  border: 1px solid #cfd6de !important;
  border-radius: 4px !important;
  text-align: left !important;
  box-shadow: none !important;
}

.home-hero h1 {
  max-width: 820px !important;
  margin: 0 0 10px !important;
  color: #243342 !important;
  font-size: clamp(28px, 4vw, 38px) !important;
  font-weight: 650 !important;
  letter-spacing: -.4px !important;
  line-height: 1.15 !important;
  text-align: left !important;
}

.home-hero-sub {
  max-width: 800px !important;
  margin: 0 0 22px !important;
  color: #536170 !important;
  font-size: 15px !important;
  text-align: left !important;
}

.home-actions { max-width: none !important; gap: 10px !important; }
.home-action, .category-btn, .test-btn {
  background: #ffffff !important;
  border: 1px solid #c8d0d8 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

.home-action {
  min-height: 150px !important;
  padding: 18px !important;
  background: #edf4f9 !important;
  border-color: #a9bfd1 !important;
}
.home-action.primary { background: #edf4f9 !important; border-color: #7fa3c1 !important; }
.home-action:hover, .category-btn:hover, .test-btn:hover {
  background: #f1f6fa !important;
  border-color: #759bb9 !important;
  box-shadow: none !important;
}

.home-action-kicker { color: #456f91 !important; letter-spacing: .6px !important; }
.home-action-title, .category-btn strong, .test-btn strong { color: #253342 !important; }
.home-action-desc, .category-btn span, .test-btn span { color: #5d6975 !important; }
.home-action-foot { color: #2f6fa3 !important; }

.home-flow { max-width: none !important; }
.home-flow h2 { color: #253342 !important; }
.home-flow p { color: #596674 !important; }
.home-note { color: #667380 !important; }

.home-all-tools-btn {
  background: #ffffff !important;
  color: #315f86 !important;
  border: 1px solid #aabac8 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.home-all-tools-btn:hover {
  background: #edf3f8 !important;
  color: #214f75 !important;
  border-color: #7799b4 !important;
}

.home-bottom-cta {
  background: #f7f9fb !important;
  background-image: none !important;
  border-top: 1px solid #cfd6de !important;
}
.home-bottom-cta-title { color: #243342 !important; }
.home-bottom-cta-copy { color: #536170 !important; }
.home-bottom-cta-button {
  background: #2f6fa3 !important;
  color: #ffffff !important;
  border: 1px solid #245b88 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
}
.home-bottom-cta-button:hover { background: #265f8f !important; box-shadow: none !important; }

/* Academic documentation */
.doc-citation-card,
.workflow-card,
.validation-card {
  background: #ffffff !important;
  border: 1px solid #cbd4dc !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

.doc-citation-card { padding: 18px 20px; margin: 16px 0 24px; }
.doc-citation-grid { display: grid; gap: 14px; }
.doc-cite-item { padding-bottom: 14px; border-bottom: 1px solid #dce2e7; }
.doc-cite-item:last-child { padding-bottom: 0; border-bottom: 0; }
.doc-cite-item h3 {
  margin: 0 0 7px !important;
  color: #344454 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .45px !important;
  text-transform: uppercase;
}
.doc-cite-code {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f6f8fa !important;
  border: 1px solid #d5dce3 !important;
  border-radius: 3px !important;
  color: #2d3b48 !important;
  font: 12.5px/1.65 Consolas, "Courier New", monospace;
}
.doc-copy-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.doc-copy-btn {
  background: #ffffff !important;
  color: #2c628b !important;
  border: 1px solid #9fb2c3 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
}
.doc-copy-btn:hover { background: #edf3f8 !important; border-color: #7396b2 !important; }

.workflow-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 540px;
  margin: 16px 0 26px;
  padding: 18px;
  background: #f7f9fb !important;
}
.workflow-step {
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #c7d1da;
  border-radius: 3px;
  color: #2c3b49;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
}
.workflow-arrow { padding: 3px 0; color: #4d7393; font-size: 17px; line-height: 1; text-align: center; }
.validation-card {
  margin: 14px 0 24px;
  padding: 16px 18px;
  background: #f4f7fa !important;
  border-left: 3px solid #557f9f !important;
}
.validation-card p { margin: 0 !important; color: #4d5c69 !important; }

/* Documentation page: contain long citations and preserve a true mobile layout. */
.documentation-page {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.documentation-page .layout {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) 260px;
}
.documentation-page .layout > *,
.documentation-page .body,
.documentation-page .doc-citation-card,
.documentation-page .doc-citation-grid,
.documentation-page .doc-cite-item,
.documentation-page .workflow-card,
.documentation-page .validation-card {
  min-width: 0;
  max-width: 100%;
}
.documentation-page .body p,
.documentation-page .body li,
.documentation-page .doc-cite-code,
.documentation-page footer {
  overflow-wrap: anywhere;
  word-break: normal;
}
.documentation-page .doc-cite-code {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 900px) {
  .documentation-page .layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px;
    padding: 30px 18px 56px;
  }
  .documentation-page .sidebar { position: static; width: 100%; }
}

@media (max-width: 560px) {
  .documentation-page .hdr-in {
    width: 100%;
    height: auto;
    min-height: 58px;
    padding: 9px 14px;
    gap: 8px;
  }
  .documentation-page .logo { gap: 7px; }
  .documentation-page .logo-icon { width: 32px; height: 32px; }
  .documentation-page .logo-name { font-size: 14px; }
  .documentation-page .hdr-nav { gap: 0; margin-left: auto; }
  .documentation-page .hdr-nav a { padding: 6px 8px; font-size: 12.5px; }
  .documentation-page .hero { padding: 30px 16px 24px !important; }
  .documentation-page .hero h1 { font-size: 27px; line-height: 1.2; }
  .documentation-page .hero p { font-size: 13.5px; line-height: 1.6; }
  .documentation-page .layout { padding: 26px 16px 48px; }
  .documentation-page .body h2 { font-size: 19px; }
  .documentation-page .body p,
  .documentation-page .body li { font-size: 14px; line-height: 1.7; }
  .documentation-page .doc-citation-card { padding: 14px; }
  .documentation-page .doc-cite-code { padding: 10px; font-size: 11.5px; }
  .documentation-page .doc-copy-actions { display: grid; grid-template-columns: 1fr; }
  .documentation-page .doc-copy-btn { width: 100%; }
  .documentation-page .workflow-card,
  .documentation-page .validation-card { padding: 14px; }
  .documentation-page footer { padding: 24px 16px; }
}

/* Import, interpretation, and legal dialogs */
#lm, #xl-up { background: rgba(31, 41, 51, .42) !important; backdrop-filter: none !important; }
#lm-inner, #xl-inner {
  background: #ffffff !important;
  border: 1px solid #aeb8c2 !important;
  border-radius: 5px !important;
  box-shadow: 0 8px 24px rgba(31, 41, 51, .2) !important;
}

#lm-body, #lm-body h3, #lm-body h4 { color: #273442 !important; }
.xl-hdr { background: #edf2f6 !important; border-bottom-color: #c9d1d9 !important; backdrop-filter: none !important; }
.xl-preview { background: #f7f8fa !important; border-color: #d1d8df !important; color: #52606d !important; }
.xl-file-zone {
  background: #f8fafb !important;
  border: 1px dashed #8fa7ba !important;
  border-radius: 4px !important;
}
.xl-file-zone:hover, .xl-file-zone.drag { background: #edf4f9 !important; border-color: #477da8 !important; }
.xl-fmt-btn { background: #ffffff !important; border-color: #c2cbd4 !important; border-radius: 3px !important; color: #566473 !important; }
.xl-fmt-btn.active { background: #eaf2f8 !important; border-color: #5e8caf !important; color: #253342 !important; }
.interp-panel { background: #f7f9fb !important; }
.interp-steps li { background: #ffffff !important; border-left-color: #7c9db8 !important; border-radius: 2px !important; color: #4d5a67 !important; }
.interp-eff, .stat-help-panel { background: #f0f6f3 !important; border-color: #b7cdc2 !important; }
.stat-help-link, .stat-help-title, .interp-eff strong { color: #286b58 !important; }

/* Public pages, hubs, tools, and long-form research guides */
#hdr, body > header {
  background: #ffffff !important;
  border-bottom: 1px solid #c8d0d8 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.logo, .brand, .logo-name { color: #263746 !important; }
.logo-icon {
  background: #2f6fa3 !important;
  background-image: none !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
.logo-sub, .brand small { color: #607384 !important; }
.hdr-nav a, nav a { color: #52606d !important; border-radius: 3px !important; }
.hdr-nav a:hover, nav a:hover, .hdr-nav a.active { background: #edf2f6 !important; color: #224f75 !important; }

body:not(:has(#sidebar)) .hero {
  background: #f4f6f8 !important;
  background-image: none !important;
  border-bottom: 1px solid #cdd4dc !important;
  padding-top: 42px !important;
  padding-bottom: 34px !important;
  box-shadow: none !important;
}

.hero h1, .hero-title, .bottom-cta h2, .section-title {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  color: #243342 !important;
  text-shadow: none !important;
}

.hero p, .hero-meta, .hero-sub, .breadcrumb, .crumb { color: #5d6975 !important; }
.breadcrumb a, .crumb a { color: #466a88 !important; }
.breadcrumb span, .crumb span { color: #77838e !important; }

.cat-badge, .hero-badge, .cat-chip, #article-count, .cat-folder-count {
  background: #e7eff6 !important;
  color: #315f86 !important;
  border: 1px solid #b9cad8 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
}

.a-avatar, .step-n {
  background: #dfeaf3 !important;
  color: #315f86 !important;
  border: 1px solid #adc2d3 !important;
  box-shadow: none !important;
}
.a-info, .a-info strong { color: #536170 !important; }

.wrap, .layout, main { color: var(--text); }
.wrap h1, .wrap h2, .wrap h3,
.body h1, .body h2, .body h3, .body h4,
.content h1, .content h2, .content h3, .card h2,
.faq h2, .step-b h4, .mistake-item h4 { color: #273442 !important; }

.wrap p, .wrap li, .body p, .body li, .content p,
.step-b p, .example-box p, .mc-card p, .mistake-item p,
.bottom-cta p, .interp { color: #536170 !important; }

.wrap strong, .body strong, .content strong { color: #293745 !important; }
.body h2, .wrap h2, .faq h2 { border-top-color: #d8dee4 !important; }

.intro-lead, .callout, .misconception-grid > *, .mistake-item,
.links a, .tool-card, .category-btn, .test-btn {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #cfd6de !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.intro-lead, .callout, .mistake-item { border-left: 3px solid #6389a8 !important; }
.callout-amber, .ex-amber { border-left-color: #b28743 !important; background: #fffaf0 !important; }
.callout-rose, .mc-wrong, .ex-rose, .mistake-item { border-left-color: #ad6c74 !important; background: #fff8f8 !important; }
.callout-teal, .mc-right, .ex-teal { border-left-color: #548273 !important; background: #f5faf7 !important; }

.def-box { text-align: left !important; background: #f5f8fa !important; }
.report-example {
  background: #f7f8fa !important;
  color: #2e3c49 !important;
  border: 1px solid #d1d8df !important;
  border-radius: 3px !important;
}
.report-example span { color: #2f6f5a !important; }
.report-example em { color: #815d20 !important; }

.faq-q { color: #293745 !important; }
.faq-q:hover { background: #f3f6f8 !important; }
.faq-a { color: #536170 !important; border-top-color: #d8dee4 !important; }

.tag { border-radius: 2px !important; }
.tag-strong, .tag-sig { background: #e7f2ec !important; color: #2f6654 !important; border-color: #b3d0c2 !important; }
.tag-border { background: #fff3d9 !important; color: #76571e !important; border-color: #dfc68f !important; }
.tag-ns { background: #eceff2 !important; color: #566473 !important; border-color: #c9d0d7 !important; }

details { border-color: #d4dbe2 !important; }
summary { color: #2d3a47 !important; }

/* Blog index cards and category browsing */
.featured-card, .a-card, .cat-card {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #cbd3db !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
.featured-card:hover, .a-card:hover, .cat-card:hover {
  background: #f8fafb !important;
  border-color: #86a7c1 !important;
  box-shadow: none !important;
}
.a-card-img, .featured-img {
  background: #dfe8f0 !important;
  background-image: none !important;
  border-radius: 3px 3px 0 0 !important;
}
.article-visual span { background: #7f9cb4 !important; box-shadow: none !important; }
.read-more { background: #edf3f8 !important; color: #2d618a !important; border: 1px solid #bfd0dd !important; border-radius: 3px !important; }
.read-more:hover { background: #e1ecf4 !important; color: #214f75 !important; }
.cat-pill { background: #ffffff !important; color: #536170 !important; border: 1px solid #c7d0d9 !important; border-radius: 3px !important; }
.cat-pill:hover, .cat-pill.active { background: #e7f0f7 !important; color: #275d87 !important; border-color: #8ba9c0 !important; }
.search-wrap input { background: #ffffff !important; }

/* Standalone calculator cards */
.grid { align-items: start; }
.tool-card { color: #2f628b !important; }
.tool-card strong { color: #293745 !important; }
.tool-card span { color: #5c6976 !important; }
.tool-card:hover, .links a:hover { background: #edf4f9 !important; border-color: #8aa9c4 !important; }
.result { background: #f4f8fb !important; }

#xtoast {
  background: #304f68 !important;
  color: #ffffff !important;
  border: 1px solid #203c52 !important;
  border-radius: 3px !important;
  box-shadow: 0 3px 10px rgba(31, 41, 51, .18) !important;
  backdrop-filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media (max-width: 900px) {
  #app { padding: 18px !important; }
  .home-hero { padding: 22px !important; }
  .home-actions { grid-template-columns: 1fr !important; }
  .home-action { min-height: auto !important; }
}

@media (max-width: 768px) {
  #sidebar { box-shadow: 3px 0 14px rgba(31, 41, 51, .16) !important; }
  #app { padding: 14px !important; }
  #main > header { padding-left: 14px !important; padding-right: 14px !important; }
}

@media print {
  body { background: #ffffff !important; }
  #sidebar, #main > header, #ft, footer, .bp, .bs, .bd,
  .chart-dl-btn, .report-btn, .interp-btn { display: none !important; }
  #main { margin: 0 !important; }
  #app { max-width: none !important; padding: 0 !important; }
  .rc, .cw, .tool-ctx { break-inside: avoid; border-color: #999 !important; }
}
