/* ============================================================
   SmartCalcHouse — modern stylesheet
   Same class names as before, no HTML/JS changes required.
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-700: #4338ca;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --accent: #8b5cf6;

  /* Neutrals */
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: #e5e9f2;
  --border-strong: #d5dbe7;
  --bg: #f6f7fb;
  --card: #ffffff;
  --card-soft: #fbfcfe;

  /* Success / warning / danger */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .06), 0 12px 32px rgba(15, 23, 42, .08);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, .08), 0 24px 48px rgba(15, 23, 42, .10);
  --shadow-focus: 0 0 0 4px rgba(99, 102, 241, .18);

  /* Geometry */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

html.dark {
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-700: #c7d2fe;
  --primary-50: rgba(99, 102, 241, .10);
  --primary-100: rgba(99, 102, 241, .18);
  --primary-200: rgba(99, 102, 241, .30);
  --accent: #a78bfa;

  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --border: #1e293b;
  --border-strong: #334155;
  --bg: #0b1120;
  --card: #0f172a;
  --card-soft: #111c33;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .45), 0 24px 48px rgba(0, 0, 0, .55);
  --shadow-focus: 0 0 0 4px rgba(129, 140, 248, .22);
}

html,
body {
  height: 100%;
  background-color: var(--bg, #f7f8fc);
}

html {
  color-scheme: light;
}

html.dark {
  color-scheme: dark;
  background-color: #0b1220;
}

body {
  padding-top: var(--site-header-height, 102px);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(99, 102, 241, .06), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(139, 92, 246, .05), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  font-feature-settings: 'cv11', 'ss01';
}

html.dark body {
  background-color: var(--bg);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(99, 102, 241, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(139, 92, 246, .08), transparent 55%),
    var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color .15s;
}

a:hover {
  text-decoration: none;
  color: var(--primary-hover);
}

button {
  font: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
}

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------- Layout ---------------- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  margin: 56px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.section h2 {
  margin-bottom: 20px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--text);
}

p a {
  margin-top: 20px;
  display: block;
}



/* Fix guide links under "How to use these guides" */
.section.prose p,
.sc-guide-section .sc-guide-intro {
  line-height: 1.75;
  max-width: 850px;
}

.section.prose p a,
.sc-guide-section .sc-guide-intro a {
  display: inline !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: normal;
  color: var(--primary-700);
  text-decoration: none;
  font-weight: 500;
}

.section.prose p a:hover,
.section.prose .sc-guide-intro a:hover {
  text-decoration: underline;
}

/* Keep inline punctuation and link text together */
.section.prose p a+a {
  margin-left: 2px !important;
}

/* Improve spacing and readability of the section */
.section.prose {
  margin-bottom: 28px;
}

.section.prose h2 {
  margin-bottom: 14px;
  line-height: 1.3;
}

.section.prose p {
  margin-bottom: 14px;
  color: var(--muted);
}

/* Avoid unwanted full-width link styling inside guide text */
.section.prose p a {
  float: none !important;
  flex: none !important;
}


.muted {
  color: var(--muted);
}

.prose {
  max-width: 780px;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 28px 0 8px;
  letter-spacing: -.01em;
}

.prose h3 {
  font-size: 1.05rem;
  margin: 20px 0 6px;
  color: var(--text-soft);
}

.prose p,
.prose ul,
.prose ol {
  margin: 10px 0;
  color: var(--muted);
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose code {
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: .88em;
  font-weight: 500;
}

/* ---------------- Header ---------------- */
header.site {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.header-announcement {
  background: var(--primary-50);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: .82rem;
}

.header-announcement .container {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  padding-top: 5px;
  padding-bottom: 5px;
  text-align: center;
}

.announcement-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.header-announcement a {
  color: var(--primary-700);
  font-weight: 700;
  white-space: nowrap;
}

.header-announcement a:hover {
  text-decoration: underline;
}

nav.primary a.nav-featured {
  color: var(--primary-700);
  background: var(--primary-50);
  font-weight: 700;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  letter-spacing: -.01em;
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .95rem;
  box-shadow: 0 6px 14px rgba(99, 102, 241, .35);
}

nav.primary {
  display: none;
  gap: 2px;
}

nav.primary a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  transition: background .15s, color .15s;
}

nav.primary a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

nav.primary a.active {
  color: var(--primary);
  background: var(--primary-50);
}

.header-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 9px;
  border-radius: 10px;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: background .15s, color .15s, border-color .15s;
}

.icon-btn:hover {
  background: var(--card-soft);
  border-color: var(--border);
  color: var(--text);
}

.menu-toggle {
  display: inline-grid;
}

@media (min-width: 1120px) {
  nav.primary {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }
}

@media (min-width: 1120px) and (max-width: 1280px) {
  nav.primary {
    gap: 0;
  }

  nav.primary a {
    padding: 7px 8px;
    font-size: .84rem;
  }
}

@media (max-width: 520px) {
  .header-announcement .container {
    gap: 6px;
    font-size: .75rem;
  }

  .header-announcement .container>span:nth-child(2) {
    flex-basis: calc(100% - 65px);
  }
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--border);
  background: var(--card);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 500;
  font-size: .95rem;
}

.mobile-nav a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.header-search {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  background: var(--card);
}

.header-search .search-wrap {
  max-width: 640px;
  margin: 0 auto;
}

/* ---------------- Hero ---------------- */
.hero {
  padding: 68px 0 40px;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-700) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}

html.dark .hero h1 {
  background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--muted);
  max-width: 620px;
  margin: 14px auto 28px;
  font-size: 1.06rem;
  line-height: 1.6;
}

@media (min-width: 700px) {
  .hero {
    padding: 88px 0 52px;
  }

  .hero h1 {
    font-size: 3rem;
  }
}

.hero-search {
  max-width: 560px;
  margin: 0 auto;
}

/* ---------------- Search ---------------- */
.search-wrap {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 15px 18px 15px 46px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.search-input::placeholder {
  color: var(--muted-2);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus), var(--shadow);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 30;
  display: none;
  padding: 6px;
}

.search-results.open {
  display: block;
}

.search-item {
  display: block;
  padding: 11px 14px;
  color: var(--text);
  border-radius: 10px;
  transition: background .1s;
}

.search-item:hover,
.search-item.active {
  background: var(--primary-50);
}

.search-item .si-name {
  font-weight: 600;
  font-size: .95rem;
}

.search-item .si-cat {
  font-size: .78rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------------- Grid & Cards ---------------- */
.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  transition: border-color .15s, box-shadow .2s, transform .15s;
}

.calc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-card:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.calc-card .cc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-50), var(--card));
  border: 1px solid var(--primary-100);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.calc-card .cc-name {
  font-weight: 600;
  color: var(--text);
  font-size: .98rem;
  letter-spacing: -.005em;
}

.calc-card .cc-desc {
  font-size: .87rem;
  color: var(--muted);
  line-height: 1.5;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat-card:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cat-card .cc-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  box-shadow: 0 10px 22px rgba(99, 102, 241, .28);
}

.cat-card h3 {
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -.01em;
}

.cat-card p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.5;
}

.cat-card .count {
  font-size: .8rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: auto;
  padding-top: 4px;
}

/* ---------------- Features ---------------- */
.features {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .2s;
}

.feature:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow);
}

.feature-ico {
  font-size: 26px;
  margin-bottom: 12px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-50), transparent);
  display: grid;
  place-items: center;
}

.feature h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  letter-spacing: -.005em;
}

.feature p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------------- FAQ ---------------- */
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  transition: border-color .15s, box-shadow .15s;
}

.faq details:hover {
  border-color: var(--border-strong);
}

.faq details[open] {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  color: var(--text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--muted-2);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform .2s;
}

.faq details[open] summary::after {
  content: "−";
  color: var(--primary);
}

.faq p {
  margin-top: 12px;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.6;
}

/* ---------------- Breadcrumb ---------------- */
.breadcrumb {
  font-size: .85rem;
  color: var(--muted);
  margin: 10px 0 14px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 8px;
  color: var(--muted-2);
}

/* ---------------- Calculator layout ---------------- */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 24px;
}

@media (min-width: 960px) {
  .calc-layout {
    grid-template-columns: 1fr 320px;
  }
}

.calc-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.calc-main {
  min-width: 0;
}

/* ---------------- Form ---------------- */
.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

.form-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 620px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field label {
  display: block;
  font-size: .83rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-soft);
  letter-spacing: .005em;
}

.field .input-wrap {
  position: relative;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: .95rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.field input:hover,
.field select:hover {
  border-color: var(--muted-2);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.field input.err {
  border-color: var(--danger);
}

.field .unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  font-size: .85rem;
  pointer-events: none;
  font-weight: 500;
}

.field .help {
  font-size: .78rem;
  color: var(--muted);
  margin-top: 5px;
}

.field .error {
  font-size: .78rem;
  color: var(--danger);
  margin-top: 5px;
  font-weight: 500;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: .92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .28);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, .38);
  filter: brightness(1.05);
}

.btn-secondary {
  background: var(--card);
  color: var(--text-soft);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--card-soft);
  border-color: var(--muted-2);
  color: var(--text);
}

.btn-icon {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: 10px;
  color: var(--muted);
}

.btn-icon:hover {
  background: var(--card-soft);
  color: var(--text);
  border-color: var(--border-strong);
}

/* ---------------- Tabs ---------------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.tab {
  background: transparent;
  border: none;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 500;
  font-size: .9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  border-radius: 8px 8px 0 0;
}

.tab:hover {
  color: var(--text-soft);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ---------------- Results ---------------- */
.results {
  margin-top: 26px;
}

.result-hero {
  background:
    linear-gradient(135deg, var(--primary-50) 0%, transparent 70%),
    var(--card);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.result-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 200px at 100% 0%, rgba(99, 102, 241, .08), transparent 70%);
  pointer-events: none;
}

.result-hero .rh-label {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.result-hero .rh-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary-700);
  margin-top: 6px;
  letter-spacing: -.025em;
  line-height: 1.15;
  position: relative;
}

html.dark .result-hero .rh-value {
  color: var(--primary);
}

.result-hero .rh-sub {
  font-size: .84rem;
  color: var(--muted);
  margin-top: 6px;
  position: relative;
}

.result-rows {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px 18px;
  box-shadow: var(--shadow-sm);
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  gap: 12px;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row .rr-label {
  color: var(--muted);
}

.result-row .rr-value {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Charts */
.chart-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
  margin: 12px 0 14px;
}

.chart-bar>div {
  transition: width .35s ease;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .85rem;
}

.chart-legend>span {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.chart-legend span.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
}

.chart-legend .lg-val {
  font-weight: 600;
  color: var(--text);
  margin-left: 4px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

table.schedule th,
table.schedule td {
  padding: 10px 14px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

table.schedule th:first-child,
table.schedule td:first-child {
  text-align: left;
}

table.schedule thead th {
  background: var(--card-soft);
  font-weight: 600;
  color: var(--muted);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  position: sticky;
  top: 0;
  z-index: 1;
}

table.schedule tbody tr {
  transition: background .1s;
}

table.schedule tbody tr:nth-child(even) {
  background: var(--card-soft);
}

table.schedule tbody tr:hover {
  background: var(--primary-50);
}

table.schedule tbody tr:last-child td {
  border-bottom: none;
}

/* ---------------- Sidebar panels ---------------- */
.panel h3 {
  font-size: .95rem;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: -.005em;
}

.panel ul {
  list-style: none;
}

.panel li+li {
  margin-top: 4px;
}

.panel a {
  display: block;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--muted);
  font-size: .89rem;
  transition: background .12s, color .12s;
}

.panel a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

/* ---------------- Related grid ---------------- */
.related-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  margin-top: 12px;
}

/* ---------------- Ad slots ---------------- */
.ad-slot {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  min-height: 90px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--card-soft);
  margin: 28px 0;
}

/* ---------------- Toast ---------------- */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
}

html.dark #toast {
  background: #1e293b;
  color: #f1f5f9;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------- Utilities ---------------- */
.hidden {
  display: none !important;
}

/* ---------------- Footer ---------------- */
footer.site {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 48px 20px 28px;
  margin-top: 64px;
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.footer-grid h4 {
  font-size: .78rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
  font-weight: 700;
}

.footer-grid ul {
  list-style: none;
}

.footer-grid li+li {
  margin-top: 9px;
}

.footer-grid a {
  color: var(--muted);
  font-size: .89rem;
}

.footer-grid a:hover {
  color: var(--primary);
}

.footer-brand p {
  color: var(--muted);
  font-size: .89rem;
  margin-top: 12px;
  line-height: 1.55;
}

.footer-bottom {
  max-width: 1180px;
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: .8rem;
  text-align: center;
}

/* ---------------- Small niceties ---------------- */
::selection {
  background: var(--primary-100);
  color: var(--primary-700);
}

/* Nicer scrollbars on desktop */
@media (min-width: 800px) {

  .search-results::-webkit-scrollbar,
  .table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  .search-results::-webkit-scrollbar-thumb,
  .table-wrap::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
    border: 3px solid var(--card);
  }
}

/* SmartCalcHouse v2: scenario tools, accessible states and print-friendly results */
[hidden] {
  display: none !important;
}

:where(button, input, select, textarea, a):focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.scenario-panel {
  margin-top: 18px;
}

.scenario-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.scenario-head h2 {
  font-size: 1.1rem;
  margin: 0 0 4px;
}

.scenario-head p {
  margin: 0;
  font-size: .875rem;
}

.scenario-panel h3 {
  margin: 20px 0 10px;
  font-size: 1rem;
}

.scenario-panel .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.scenario-panel table {
  min-width: 520px;
}

.error {
  color: var(--danger);
  font-size: .85rem;
  margin-top: 6px;
}

input.err,
select.err {
  border-color: var(--danger) !important;
}

[aria-live="polite"]:focus {
  outline-offset: 4px;
}

@media (max-width: 600px) {
  .scenario-head {
    flex-direction: column;
  }

  .scenario-head .btn {
    width: 100%;
  }

  .form-actions .btn {
    min-height: 42px;
  }
}

@media print {

  #site-header,
  #site-footer,
  .calc-side,
  #calc-form,
  #scenario-panel,
  .breadcrumb,
  #ad-above,
  #ad-below,
  .form-actions,
  .section-head,
  .mobile-nav,
  .header-actions {
    display: none !important;
  }

  body,
  html {
    background: #fff !important;
    color: #111 !important;
  }

  .container,
  .calc-main,
  .card,
  .prose {
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  .calc-layout {
    display: block !important;
  }

  .result-hero,
  .result-rows,
  .table-wrap {
    break-inside: avoid;
  }

  a {
    color: #111 !important;
    text-decoration: none !important;
  }
}


/* Privacy preference panel; pre-launch foundation, not a certified CMP. */
.privacy-preferences {
  position: fixed;
  z-index: 9999;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  color: var(--text, #172033);
  background: var(--surface, #fff);
  border: 1px solid var(--border, #d8dee9);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

.privacy-preferences__copy p {
  margin: 6px 0;
  font-size: .92rem;
  line-height: 1.5;
}

.privacy-preferences__copy a {
  text-decoration: underline;
}

.privacy-preferences details {
  margin-top: 8px;
}

.privacy-preferences details label {
  display: block;
  margin: 8px 0;
}

.privacy-preferences__note,
.privacy-preferences__status {
  font-size: .8rem !important;
  opacity: .82;
}

.privacy-preferences__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.privacy-preferences__actions button {
  cursor: pointer;
}

.privacy-preferences--saved {
  display: none;
}

.privacy-preferences__reopen {
  position: fixed;
  z-index: 9998;
  left: 16px;
  bottom: 16px;
  padding: 9px 12px;
  border: 1px solid var(--border, #d8dee9);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--text, #172033);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
  cursor: pointer;
}

.privacy-preferences:not(.privacy-preferences--saved)~.privacy-preferences__reopen {
  display: none;
}

.privacy-preferences input[type="checkbox"] {
  margin-right: 8px;
}

@media (max-width: 760px) {
  .privacy-preferences {
    grid-template-columns: 1fr;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 14px;
    max-height: 75vh;
    overflow-y: auto;
  }

  .privacy-preferences__actions {
    justify-content: stretch;
  }

  .privacy-preferences__actions button {
    flex: 1 1 100%;
  }
}


/* Editorial and trust pages */
.content-page {
  padding: 28px 20px 72px;
}

.page-hero {
  padding: 34px clamp(20px, 5vw, 56px);
  margin: 12px 0 34px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--card), var(--primary-50));
  box-shadow: var(--shadow-sm);
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -.035em;
  margin: 8px 0 14px;
}

.page-hero .lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.eyebrow {
  color: var(--primary);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.trust-pills span {
  border: 1px solid var(--border-strong);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--text-soft);
  font-size: .82rem;
  font-weight: 650;
}

.content-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 34px;
  align-items: start;
}

.content-main {
  max-width: none;
}

.content-aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
}

.content-aside .card h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.content-aside ul {
  list-style: none;
  padding: 0;
}

.content-aside li {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 30px;
}

.info-tile {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.info-tile h3 {
  margin: 8px 0 6px;
  color: var(--text);
}

.info-tile p {
  font-size: .9rem;
}

.info-tile a {
  display: inline-block;
  margin-top: 8px;
  font-size: .88rem;
  font-weight: 650;
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 800;
}

.callout-note {
  margin: 28px 0;
  padding: 20px;
  border: 1px solid var(--primary-200);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: var(--primary-50);
}

.callout-note p {
  margin: 6px 0 10px;
}

@media (max-width:850px) {
  .content-columns {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:620px) {
  .content-page {
    padding: 18px 16px 48px;
  }

  .page-hero {
    padding: 25px 20px;
    margin-bottom: 24px;
  }

  .info-grid,
  .content-aside {
    grid-template-columns: 1fr;
  }

  .page-hero .lead {
    font-size: 1rem;
  }
}


/* ============================================================
   SmartCalcHouse visual refresh — Aurora / Indigo
   CSS-only enhancement: preserves existing HTML and JS behavior.
   ============================================================ */

:root {
  --primary: #5855e7;
  --primary-hover: #4641d4;
  --primary-700: #3935b8;
  --primary-50: #f0efff;
  --primary-100: #e4e2ff;
  --primary-200: #cfccff;
  --accent: #a855f7;
  --bg: #f7f8ff;
  --card: #ffffff;
  --card-soft: #f8f8ff;
  --border: #e7e8f4;
  --border-strong: #d8d9ed;
  --shadow: 0 2px 8px rgba(38, 35, 100, .045), 0 10px 28px rgba(38, 35, 100, .055);
  --shadow-md: 0 8px 20px rgba(53, 48, 140, .08), 0 20px 48px rgba(53, 48, 140, .10);
  --shadow-lg: 0 14px 34px rgba(53, 48, 140, .12), 0 28px 70px rgba(53, 48, 140, .13);
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
}

html.dark {
  --primary: #9692ff;
  --primary-hover: #b1adff;
  --primary-700: #d0ceff;
  --primary-50: rgba(129, 120, 255, .13);
  --primary-100: rgba(129, 120, 255, .20);
  --primary-200: rgba(129, 120, 255, .32);
  --accent: #c084fc;
  --bg: #0b1020;
  --card: #11182b;
  --card-soft: #151e35;
  --border: #252d46;
  --border-strong: #35405e;
}

body {
  background:
    radial-gradient(ellipse 780px 480px at 8% -8%, rgba(116, 102, 255, .13), transparent 68%),
    radial-gradient(ellipse 720px 460px at 96% 8%, rgba(194, 104, 255, .10), transparent 66%),
    radial-gradient(ellipse 850px 520px at 50% 100%, rgba(74, 164, 255, .055), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

html.dark body {
  background:
    radial-gradient(ellipse 780px 480px at 8% -8%, rgba(116, 102, 255, .18), transparent 68%),
    radial-gradient(ellipse 720px 460px at 96% 8%, rgba(194, 104, 255, .12), transparent 66%),
    var(--bg);
  background-attachment: fixed;
}

header.site {
  background: color-mix(in srgb, var(--card) 78%, transparent);
  border-bottom-color: color-mix(in srgb, var(--border) 75%, transparent);
  box-shadow: 0 4px 24px rgba(30, 27, 90, .035);
}

.brand-logo {
  background: linear-gradient(135deg, #5755e8 0%, #8b5cf6 52%, #c084fc 100%);
  box-shadow: 0 8px 20px rgba(99, 85, 232, .32);
  border-radius: 12px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.brand:hover .brand-logo {
  transform: rotate(-7deg) scale(1.06);
  box-shadow: 0 10px 26px rgba(99, 85, 232, .42);
}

.hero {
  isolation: isolate;
  padding-top: clamp(64px, 8vw, 104px);
  padding-bottom: clamp(42px, 6vw, 72px);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(78vw, 760px);
  height: 330px;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(110deg, rgba(102, 92, 255, .12), rgba(186, 112, 255, .10), rgba(73, 174, 255, .09));
  filter: blur(65px);
  animation: aurora-drift 11s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero h1 {
  background: linear-gradient(105deg, #22245b 4%, #5855e7 48%, #a34fe8 82%, #5489ed 100%);
  background-size: 180% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-flow 8s ease-in-out infinite alternate, rise-in .7s both;
}

html.dark .hero h1 {
  background: linear-gradient(105deg, #f5f4ff 4%, #aaa5ff 48%, #d7a4ff 82%, #8ec5ff 100%);
  background-size: 180% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  animation: rise-in .75s .08s both;
}

.hero-search {
  animation: rise-in .8s .16s both;
}

.card,
.feature,
.faq details,
.category-card,
.calc-main>.card {
  border-radius: var(--radius-lg);
  transition: transform .24s cubic-bezier(.2, .7, .2, 1),
    box-shadow .24s ease, border-color .24s ease,
    background-color .24s ease;
}

.card:hover,
.feature:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: var(--shadow-md);
}

.grid>* {
  animation: rise-in .55s both;
}

.grid>*:nth-child(2) {
  animation-delay: .04s;
}

.grid>*:nth-child(3) {
  animation-delay: .08s;
}

.grid>*:nth-child(4) {
  animation-delay: .12s;
}

.grid>*:nth-child(5) {
  animation-delay: .16s;
}

.grid>*:nth-child(6) {
  animation-delay: .20s;
}

.grid>*:nth-child(7) {
  animation-delay: .24s;
}

.grid>*:nth-child(8) {
  animation-delay: .28s;
}

button,
.btn,
a.button,
input[type="submit"] {
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease, background .2s ease;
}

button:hover,
.btn:hover,
a.button:hover,
input[type="submit"]:hover {
  filter: saturate(1.08);
}

button:active,
.btn:active,
a.button:active,
input[type="submit"]:active {
  transform: translateY(1px) scale(.985);
}

.btn-primary,
.button-primary,
button.primary,
input[type="submit"] {
  background-image: linear-gradient(115deg, #5553e5 0%, #7657ed 52%, #a052df 100%);
  box-shadow: 0 8px 18px rgba(93, 79, 220, .22);
}

.btn-primary:hover,
.button-primary:hover,
button.primary:hover,
input[type="submit"]:hover {
  box-shadow: 0 11px 24px rgba(93, 79, 220, .30);
  transform: translateY(-2px);
}

.search-input {
  border-radius: 18px;
  border-color: color-mix(in srgb, var(--primary) 18%, var(--border-strong));
  background: color-mix(in srgb, var(--card) 92%, var(--primary-50));
  box-shadow: 0 8px 26px rgba(50, 46, 130, .07);
}

.search-input:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(99, 85, 232, .13), 0 12px 28px rgba(50, 46, 130, .10);
}

.section {
  margin-top: clamp(46px, 6vw, 72px);
  margin-bottom: clamp(46px, 6vw, 72px);
}

.section-head {
  margin-bottom: 22px;
}

.section h2 {
  letter-spacing: -.025em;
  font-size: clamp(1.28rem, 2vw, 1.55rem);
}

.feature {
  background: linear-gradient(145deg, var(--card), color-mix(in srgb, var(--primary-50) 45%, var(--card)));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.feature-ico {
  background: linear-gradient(135deg, rgba(99, 85, 232, .13), rgba(168, 85, 247, .12));
  border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
  border-radius: 14px;
}

.faq details {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 94%, var(--primary-50));
  padding: 16px 18px;
}

.faq details[open] {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
  box-shadow: var(--shadow);
}

.faq summary {
  cursor: pointer;
  transition: color .18s ease;
}

.faq summary:hover {
  color: var(--primary);
}

.calc-main>.card,
#calc-results .card {
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--primary) 12%, var(--border));
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 85, 232, .12);
}

footer {
  background: linear-gradient(135deg, color-mix(in srgb, var(--card) 95%, var(--primary-50)), var(--card));
  border-top: 1px solid var(--border);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradient-flow {
  from {
    background-position: 0% center;
  }

  to {
    background-position: 100% center;
  }
}

@keyframes aurora-drift {
  from {
    transform: translateX(-53%) translateY(-5px) scale(.96);
    opacity: .72;
  }

  to {
    transform: translateX(-47%) translateY(13px) scale(1.05);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-left: 8px;
    padding-right: 8px;
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .card,
  .feature {
    border-radius: 16px;
  }

  .grid {
    gap: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}


/* ============================================================
   SmartCalcHouse — V2 VISIBLE VISUAL REDESIGN
   Targets the real SmartCalcHouse components (.calc-card, .cat-card,
   .hero, .page-hero, .header-inner, etc.).
   ============================================================ */

:root {
  --primary: #635bff;
  --primary-hover: #5145e5;
  --primary-700: #4036c9;
  --primary-50: #f1efff;
  --primary-100: #e6e2ff;
  --primary-200: #d0c9ff;
  --accent: #bd65f5;
  --bg: #f6f7ff;
  --card: #ffffff;
  --card-soft: #faf9ff;
  --border: #e8e7f5;
  --border-strong: #d8d5ef;
  --shadow-sm: 0 5px 16px rgba(48, 40, 125, .045);
  --shadow: 0 8px 26px rgba(48, 40, 125, .075);
  --shadow-md: 0 14px 34px rgba(72, 58, 166, .13);
  --shadow-lg: 0 22px 58px rgba(53, 43, 130, .18);
  --shadow-focus: 0 0 0 4px rgba(99, 91, 255, .15);
}

html.dark {
  --primary: #a49cff;
  --primary-hover: #c0baff;
  --primary-700: #d8d3ff;
  --primary-50: rgba(132, 119, 255, .13);
  --primary-100: rgba(132, 119, 255, .20);
  --primary-200: rgba(132, 119, 255, .32);
  --accent: #d69cff;
  --bg: #0b1020;
  --card: #121a2d;
  --card-soft: #172139;
  --border: #27314b;
  --border-strong: #3a4665;
  --shadow-sm: 0 5px 16px rgba(0, 0, 0, .15);
  --shadow: 0 8px 26px rgba(0, 0, 0, .22);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, .30);
  --shadow-lg: 0 22px 58px rgba(0, 0, 0, .40);
}

body {
  background:
    radial-gradient(ellipse 720px 430px at 4% 0%, rgba(116, 99, 255, .16), transparent 68%),
    radial-gradient(ellipse 620px 400px at 100% 10%, rgba(206, 104, 244, .12), transparent 68%),
    linear-gradient(180deg, #faf9ff 0%, var(--bg) 46%, #f5f8ff 100%);
  background-attachment: fixed;
}

html.dark body {
  background:
    radial-gradient(ellipse 720px 430px at 4% 0%, rgba(116, 99, 255, .20), transparent 68%),
    radial-gradient(ellipse 620px 400px at 100% 10%, rgba(170, 91, 220, .14), transparent 68%),
    var(--bg);
  background-attachment: fixed;
}

/* Header: cleaner glass surface and brighter brand mark */
header.site {
  background: color-mix(in srgb, var(--card) 84%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, var(--border));
  box-shadow: 0 5px 24px rgba(39, 32, 105, .055);
}

.header-inner {
  min-height: 72px;
}

.brand {
  letter-spacing: -.035em;
}

.brand-logo {
  border-radius: 13px !important;
  background: linear-gradient(135deg, #5755ed 0%, #8657ed 54%, #c15ee8 100%) !important;
  box-shadow: 0 8px 22px rgba(105, 78, 230, .34) !important;
  transition: transform .25s ease, box-shadow .25s ease;
}

.brand:hover .brand-logo {
  transform: rotate(-8deg) scale(1.08);
  box-shadow: 0 12px 28px rgba(105, 78, 230, .43) !important;
}

nav.primary a {
  border-radius: 999px;
  padding: 9px 8px;
  transition: background .2s ease, color .2s ease;
}

nav.primary a:hover,
nav.primary a.active {
  background: var(--primary-50);
  color: var(--primary);
}

/* Hero: a much more visible gradient stage */
.hero {
  overflow: hidden;
  padding: clamp(76px, 9vw, 118px) 0 clamp(58px, 7vw, 86px);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(1000px, 115vw);
  height: 470px;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 28% 45%, rgba(109, 94, 255, .22), transparent 54%),
    radial-gradient(ellipse at 70% 50%, rgba(210, 104, 242, .18), transparent 55%),
    radial-gradient(ellipse at 50% 80%, rgba(69, 166, 255, .13), transparent 55%);
  filter: blur(30px);
  animation: sc-aurora 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.65rem, 6vw, 4.6rem) !important;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.04 !important;
  letter-spacing: -.065em !important;
  background: linear-gradient(100deg, #28256f 0%, #6255ee 42%, #a34ee5 72%, #438eea 100%) !important;
  background-size: 220% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  animation: sc-gradient 9s ease-in-out infinite alternate, sc-enter .75s both;
}

html.dark .hero h1 {
  background: linear-gradient(100deg, #f5f2ff 0%, #aaa1ff 42%, #e0a3ff 72%, #91c9ff 100%) !important;
  background-size: 220% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

.hero-sub {
  max-width: 680px !important;
  font-size: clamp(1.02rem, 1.8vw, 1.2rem) !important;
  line-height: 1.75 !important;
  animation: sc-enter .8s .08s both;
}

.hero-search {
  max-width: 650px !important;
  animation: sc-enter .85s .16s both;
}

.hero-search .search-input {
  min-height: 64px;
  border-radius: 20px !important;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border)) !important;
  background: color-mix(in srgb, var(--card) 94%, var(--primary-50)) !important;
  box-shadow: 0 14px 40px rgba(66, 54, 160, .13) !important;
  font-size: 1.04rem;
}

.hero-search .search-input:focus {
  box-shadow: 0 0 0 5px rgba(99, 91, 255, .13), 0 18px 45px rgba(66, 54, 160, .16) !important;
  transform: translateY(-2px);
}

/* Section rhythm and titles */
.section {
  margin-top: clamp(58px, 7vw, 88px);
  margin-bottom: clamp(58px, 7vw, 88px);
}

.section-head {
  margin-bottom: 24px;
}

.section h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  letter-spacing: -.045em;
}

.section h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  margin-top: 10px;
  border-radius: 9px;
  background: linear-gradient(90deg, #635bff, #c264ed);
}

/* Actual calculator and category cards */
.card {
  border-radius: 20px !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow-sm);
  transition: transform .28s cubic-bezier(.2, .75, .2, 1), box-shadow .28s ease, border-color .28s ease !important;
}

.calc-card,
.cat-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px !important;
  border-radius: 20px !important;
  background: linear-gradient(145deg, var(--card) 0%, color-mix(in srgb, var(--primary-50) 36%, var(--card)) 100%) !important;
}

.calc-card::before,
.cat-card::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -76px;
  top: -82px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(105, 91, 255, .12), rgba(198, 99, 235, .08));
  transition: transform .35s ease;
  pointer-events: none;
}

.calc-card:hover,
.cat-card:hover,
.feature:hover {
  transform: translateY(-7px) !important;
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border)) !important;
  box-shadow: var(--shadow-md) !important;
}

.calc-card:hover::before,
.cat-card:hover::before {
  transform: scale(1.55);
}

.calc-card .cc-icon,
.cat-card .cc-icon {
  width: 52px !important;
  height: 52px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #6159f1 0%, #9860ed 58%, #c568e8 100%) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(105, 83, 226, .28) !important;
  transition: transform .25s ease;
}

.calc-card:hover .cc-icon,
.cat-card:hover .cc-icon {
  transform: translateY(-3px) rotate(-5deg);
}

.calc-card .cc-name,
.calc-card h3,
.cat-card h3 {
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -.025em;
}

.calc-card .cc-desc,
.cat-card p {
  line-height: 1.65;
}

/* Feature panels */
.features {
  gap: 20px !important;
}

.feature {
  position: relative;
  overflow: hidden;
  padding: 27px !important;
  border-radius: 20px !important;
  background: linear-gradient(145deg, var(--card), color-mix(in srgb, var(--primary-50) 48%, var(--card))) !important;
  box-shadow: var(--shadow-sm);
}

.feature-ico {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px !important;
  background: linear-gradient(135deg, rgba(99, 91, 255, .16), rgba(190, 97, 235, .15)) !important;
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 14px;
}

/* Buttons and utility controls */
.btn,
button,
.icon-btn {
  transition: transform .2s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease !important;
}

.btn-primary {
  background: linear-gradient(110deg, #5c56ec 0%, #8058ed 55%, #b45cde 100%) !important;
  border: 0 !important;
  box-shadow: 0 9px 22px rgba(100, 78, 220, .26) !important;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 28px rgba(100, 78, 220, .36) !important;
}

.icon-btn {
  border-radius: 12px !important;
}

.icon-btn:hover {
  color: var(--primary) !important;
  background: var(--primary-50) !important;
  transform: translateY(-2px);
}

/* Calculator workspace and forms */
.calc-main>.card,
#calc-results .card,
.calc-side .card {
  border-radius: 20px !important;
  box-shadow: var(--shadow) !important;
}

.calc-layout {
  gap: 26px !important;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-radius: 12px;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: var(--shadow-focus) !important;
}

/* FAQ and content panels */
.faq details,
.info-tile,
.callout-note,
.page-hero {
  border-radius: 20px !important;
}

.faq details {
  background: color-mix(in srgb, var(--card) 94%, var(--primary-50));
  border: 1px solid var(--border);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.faq details[open] {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
  box-shadow: var(--shadow);
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 10%, rgba(194, 99, 237, .18), transparent 38%),
    radial-gradient(circle at 8% 95%, rgba(99, 91, 255, .15), transparent 42%),
    var(--card) !important;
  border-color: color-mix(in srgb, var(--primary) 20%, var(--border)) !important;
  box-shadow: var(--shadow);
}

footer.site {
  background: linear-gradient(135deg, color-mix(in srgb, var(--card) 94%, var(--primary-50)), var(--card));
  border-top: 1px solid var(--border);
}

/* Entrance motion, subtle ambient movement */
@keyframes sc-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sc-gradient {
  from {
    background-position: 0% center;
  }

  to {
    background-position: 100% center;
  }
}

@keyframes sc-aurora {
  from {
    transform: translateX(-52%) translateY(-8px) scale(.96);
  }

  to {
    transform: translateX(-48%) translateY(18px) scale(1.06);
  }
}

.grid>.calc-card,
.grid>.cat-card {
  animation: sc-enter .55s both;
}

.grid> :nth-child(2) {
  animation-delay: .05s;
}

.grid> :nth-child(3) {
  animation-delay: .10s;
}

.grid> :nth-child(4) {
  animation-delay: .15s;
}

.grid> :nth-child(5) {
  animation-delay: .20s;
}

.grid> :nth-child(6) {
  animation-delay: .25s;
}

@media (max-width: 700px) {
  .hero {
    padding-top: 66px;
    padding-bottom: 54px;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 11vw, 3.4rem) !important;
  }

  .calc-card,
  .cat-card {
    min-height: 0;
    padding: 20px !important;
  }

  .feature {
    padding: 21px !important;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}


/* Information-page visual system inspired by clean, editorial calculator sites. */
.content-page.info-page {
  padding-top: 30px;
  padding-bottom: 76px;
}

.info-page .page-hero {
  padding: clamp(30px, 5vw, 54px);
  margin: 12px 0 34px;
  border-radius: 26px;
}

.info-page .page-hero h1 {
  max-width: 850px;
  font-size: clamp(2.1rem, 4.8vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: -.055em;
}

.info-page .page-hero .lead {
  max-width: 760px;
  font-size: 1.08rem;
  line-height: 1.8;
}

.info-page .content-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: start;
}

.info-page .content-main,
.info-page .prose {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(22px, 3.5vw, 38px);
  box-shadow: var(--shadow-sm);
}

.info-page .content-main h2,
.info-page .prose h2 {
  margin-top: 30px;
  font-size: 1.38rem;
  letter-spacing: -.035em;
}

.info-page .content-main h2:first-child,
.info-page .prose h2:first-child {
  margin-top: 0;
}

.info-page .content-main h3,
.info-page .prose h3 {
  margin-top: 22px;
  font-size: 1.06rem;
}

.info-page .content-main p,
.info-page .prose p,
.info-page .content-main li {
  line-height: 1.8;
}

.info-page .info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 30px;
}

.info-page .info-tile {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 21px;
  background: linear-gradient(145deg, var(--card), var(--primary-50));
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.info-page .info-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-200);
}

.info-page .tile-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #5c56ec, #a85ce8);
  font-size: 1.3rem;
}

.info-page .content-aside .card,
.info-page .calc-side .card {
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.info-page .callout-note {
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(120deg, var(--primary-50), color-mix(in srgb, var(--accent) 10%, var(--card)));
  border: 1px solid var(--primary-200);
}

.info-page .contact-layout {
  grid-template-columns: minmax(0, 1fr) 290px;
}

.info-page .contact-form-card {
  padding: clamp(22px, 3vw, 34px);
}

.info-page .contact-form-card input,
.info-page .contact-form-card select,
.info-page .contact-form-card textarea {
  min-height: 48px;
  border-radius: 12px;
}

.info-page .contact-form-card textarea {
  min-height: 150px;
}

.info-page .contact-form-card .form-actions {
  margin-top: 20px;
}

.info-page .trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.info-page .trust-pills span {
  border: 1px solid var(--primary-200);
  background: color-mix(in srgb, var(--primary-50) 82%, var(--card));
  color: var(--primary-700);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: .82rem;
  font-weight: 650;
}

@media(max-width:850px) {

  .info-page .content-columns,
  .info-page .contact-layout {
    grid-template-columns: 1fr
  }

  .info-page .content-aside,
  .info-page .calc-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px
  }
}

@media(max-width:600px) {
  .info-page .info-grid {
    grid-template-columns: 1fr
  }

  .info-page .content-main,
  .info-page .prose {
    padding: 21px
  }

  .info-page .content-aside,
  .info-page .calc-side {
    display: block
  }
}


/* Financial guides: editorial reading experience */
.sc-guide-visual {
  margin: 24px auto 30px;
  max-width: 940px
}

.sc-guide-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06)
}

.sc-guide-visual figcaption {
  font-size: .78rem;
  color: var(--muted, #667085);
  margin: 8px 4px
}

.sc-guide-deep-dive {
  margin: 34px 0
}

.sc-guide-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--border, #e5e7eb)
}

.sc-guide-section h2 {
  margin-top: 0
}

.sc-guide-section p,
.sc-guide-section li {
  line-height: 1.78
}

.sc-guide-section p {
  max-width: 78ch
}

.sc-guide-section ol {
  padding-left: 22px
}

.sc-worksheet {
  background: var(--surface, #f8fafc);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 18px;
  padding: 22px;
  margin: 26px 0
}

.sc-editorial-promise {
  background: var(--surface, #f8fafc);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 18px;
  padding: 22px;
  margin: 20px 0 30px
}

.sc-editorial-promise p {
  max-width: 85ch;
  line-height: 1.75
}

.brand-logo-image {
  width: 190px;
}
.guide-card {
  display: flex;
  flex-direction: column
}

.guide-card>a:last-child {
  margin-top: auto;
  padding-top: 12px
}

.guide-topic {
  transition: transform .18s ease, border-color .18s ease
}

.guide-topic:hover {
  transform: translateY(-2px);
  border-color: var(--primary, #2563eb)
}

@media(max-width:640px) {
  .sc-guide-visual {
    margin: 18px 0 24px
  }

  .sc-guide-visual img {
    border-radius: 14px
  }

  .sc-guide-section {
    padding: 18px 0
  }

  .sc-worksheet,
  .sc-editorial-promise {
    padding: 16px
  }
}

.guide-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200/420;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border, #e5e7eb)
}

.sc-action-questions {
  background: var(--surface, #f8fafc);
  padding: 22px;
  border-radius: 16px;
  margin: 24px 0
}


/* ============================================================
   SmartCalcHouse UI consistency pass — spacing, alignment and themes
   Appended intentionally to normalize older component rules.
   ============================================================ */
:root {
  color-scheme: light;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #f7f8fc;
  --text: #172033;
  --text-soft: #344054;
  --muted: #667085;
  --border: #e4e7ef;
  --focus-ring: 0 0 0 4px rgba(99, 91, 255, .16);
}

html.dark {
  color-scheme: dark;
  --surface: #121a2d;
  --surface-raised: #172139;
  --surface-muted: #0e1628;
  --text: #f1f5fb;
  --text-soft: #d3dbea;
  --muted: #a7b3c7;
  --border: #2b3852;
  --focus-ring: 0 0 0 4px rgba(164, 156, 255, .22);
}

html,
body {
  min-height: 100%;
}

body {
  color: var(--text);
}

main,
.container {
  min-width: 0;
}

.container {
  width: min(100% - 32px, 1180px);
  padding-left: 0;
  padding-right: 0;
}

main.container {
  padding-top: clamp(22px, 3vw, 38px) !important;
  padding-bottom: clamp(48px, 6vw, 76px) !important;
}

section+section {
  scroll-margin-top: 96px;
}

.page-hero,
.panel,
.card,
.feature,
.info-tile,
.callout-note,
.sc-editorial-promise,
.sc-worksheet {
  color: var(--text);
  border-color: var(--border);
}

.card,
.panel,
.feature {
  min-width: 0;
}

.card p,
.panel p,
.feature p,
.muted,
.prose p,
.prose li {
  color: var(--muted);
}

h1,
h2,
h3,
h4,
strong,
b,
label,
legend {
  color: var(--text);
}

.page-hero p,
.page-hero .lead {
  color: var(--text-soft);
}

.eyebrow {
  color: var(--primary) !important;
}

input,
select,
textarea {
  color: var(--text) !important;
  background-color: var(--surface) !important;
  border-color: var(--border-strong, var(--border)) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted) !important;
  opacity: .85;
}

select option {
  color: var(--text);
  background: var(--surface);
}

.card,
.panel,
.feature,
.faq details,
.page-hero,
.info-tile,
.callout-note {
  background-color: var(--surface);
}

html.dark .card,
html.dark .panel,
html.dark .feature,
html.dark .faq details,
html.dark .info-tile,
html.dark .callout-note,
html.dark .sc-editorial-promise,
html.dark .sc-worksheet,
html.dark .page-hero {
  color: var(--text);
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

html.dark .card p,
html.dark .panel p,
html.dark .feature p,
html.dark .prose p,
html.dark .prose li,
html.dark .muted,
html.dark .breadcrumb,
html.dark .breadcrumb span {
  color: var(--muted);
}

html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark strong,
html.dark b,
html.dark label,
html.dark legend,
html.dark .card h2,
html.dark .card h3,
html.dark .panel h2,
html.dark .panel h3 {
  color: var(--text);
}

html.dark .page-hero p,
html.dark .page-hero .lead {
  color: var(--text-soft) !important;
}

html.dark .btn:not(.btn-primary),
html.dark button:not(.btn-primary),
html.dark .icon-btn {
  color: var(--text);
}

html.dark table,
html.dark th,
html.dark td {
  color: var(--text);
  border-color: var(--border);
}

html.dark .result-hero,
html.dark .result-card {
  color: var(--text);
}

html.dark a:not(.btn):not(.brand) {
  color: var(--primary);
}

html.dark a:hover {
  color: var(--primary-hover);
}

/* Consistent vertical rhythm and card content alignment */
.container>h1 {
  margin: 0 0 14px;
  line-height: 1.15;
}

.container>h2 {
  margin: clamp(28px, 4vw, 42px) 0 16px;
  line-height: 1.25;
}

.container>p {
  margin: 10px 0 16px;
}

.grid,
.related-grid,
.features,
.guide-grid {
  gap: clamp(14px, 2vw, 20px);
}

#calc-results {
  margin-top: 20px;
}

.card,
.panel {
  padding: clamp(18px, 2.2vw, 26px);
}

.card h2,
.card h3,
.panel h2,
.panel h3 {
  line-height: 1.35;
  margin: 0 0 10px;
}

.card p,
.panel p {
  line-height: 1.7;
  margin: 8px 0 12px;
}

.card> :last-child,
.panel> :last-child {
  margin-bottom: 0;
}

.btn,
.icon-btn,
button {
  min-height: 40px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
}

.page-hero {
  padding: clamp(22px, 4vw, 42px);
  margin-bottom: clamp(22px, 3vw, 32px);
}

.trust-pills {
  gap: 8px 10px;
}

.form-grid {
  align-items: start;
}

.form-grid>*,
.calc-layout>*,
.content-columns>* {
  min-width: 0;
}

img {
  height: auto;
}

/* Financial Guides topic tabs */
.guide-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 18px 0 24px;
  padding: 5px 0 12px;
}

.guide-tabs .guide-topic {
  appearance: none;
  cursor: pointer;
  font: inherit;
  line-height: 1.25;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 15px;
  min-height: 42px;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.guide-tabs .guide-topic:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.guide-tabs .guide-topic[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(110deg, #5c56ec, #8658e9);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(92, 86, 236, .22);
}

html.dark .guide-tabs .guide-topic {
  color: var(--text-soft);
  background: var(--surface-raised);
  border-color: var(--border);
}

html.dark .guide-tabs .guide-topic[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(110deg, #5c56ec, #8658e9);
}

.guide-tab-panel {
  margin: 24px 0 34px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.guide-tab-panel[hidden] {
  display: none !important;
}

.guide-tab-panel>h2 {
  margin: 0 0 16px;
}

.guide-tab-panel .related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.guide-tab-panel .card {
  height: 100%;
}

@media (max-width:640px) {
  .container {
    width: calc(100% - 28px);
  }

  .guide-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .guide-tabs .guide-topic {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .guide-tab-panel {
    padding: 16px;
  }

  .card,
  .panel {
    padding: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Goal-based planning tools */
.planning-tool,
.planning-journey,
.planning-note-card {
  margin-top: 24px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  box-shadow: var(--shadow-sm)
}

.planning-tool h2,
.planning-journey h2 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 5px 0 8px;
  color: var(--text)
}

.planning-tool p,
.planning-journey p,
.planning-note-card p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 14px
}

.eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  color: var(--primary)
}

.planning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0
}

.plan-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: var(--text-soft);
  font-size: .88rem;
  font-weight: 600
}

.plan-field input,
.plan-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card-soft);
  color: var(--text);
  font: inherit;
  color-scheme: light dark
}

.plan-field input:focus,
.plan-field select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px
}

.planning-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px
}

.planning-output {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-soft);
  color: var(--text);
  line-height: 1.6
}

.planning-output p {
  margin: 12px 0 0;
  color: var(--text-soft)
}

.planning-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px
}

.planning-results>div {
  padding: 12px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  min-width: 0
}

.planning-results span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: 5px
}

.planning-results strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
  overflow-wrap: anywhere
}

.planning-note {
  font-size: .82rem;
  margin: 10px 0 0 !important
}

.planning-note-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text)
}

.planning-export-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px
}

.plan-progress {
  height: 10px;
  border-radius: 20px;
  background: var(--border);
  overflow: hidden;
  margin-top: 14px
}

.plan-progress span {
  display: block;
  height: 100%;
  background: var(--success);
  border-radius: inherit;
  transition: width .2s ease
}

.planning-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px
}

.planning-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-soft);
  color: var(--text);
  text-decoration: none;
  min-width: 0
}

.planning-link:hover {
  border-color: var(--primary);
  transform: translateY(-1px)
}

.planning-link span {
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.5
}

.planning-link b {
  font-size: .82rem;
  color: var(--primary);
  margin-top: 4px
}

@media(max-width:600px) {

  .planning-tool,
  .planning-journey,
  .planning-note-card {
    padding: 16px
  }

  .planning-grid,
  .planning-results,
  .planning-links {
    grid-template-columns: 1fr
  }

  .planning-actions .btn {
    width: 100%;
    justify-content: center
  }

  .planning-export-row .btn {
    width: 100%
  }
}


/* Homepage positioning: Calculate, Plan and Learn */
.home-hero {
  padding-top: clamp(58px, 7vw, 88px);
  padding-bottom: 34px;
}

.home-hero .container {
  max-width: 980px;
}

.home-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--primary-700);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .13em;
}

.home-hero h1 {
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(2.35rem, 5.6vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -.055em;
}

.home-hero .hero-sub {
  max-width: 680px;
  margin: 18px auto 24px;
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.65;
}

.home-hero .hero-search {
  max-width: 700px;
}

.home-hero-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .8rem;
}

.home-hero-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 34px auto 0;
  text-align: left;
}

.home-hero-action {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 17px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.home-hero-action:hover {
  color: var(--text);
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.home-action-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 1.45rem;
  font-weight: 700;
}

.home-hero-action>span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-hero-action strong {
  color: var(--text);
  font-size: .98rem;
}

.home-hero-action small {
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.4;
}

.home-action-arrow {
  margin-left: auto;
  color: var(--primary-700);
  font-size: 1.15rem;
}

.home-planning-callout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 30px;
  align-items: center;
  margin: 30px 0 54px;
  padding: clamp(22px, 3.5vw, 38px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(120deg, var(--primary-50), var(--card) 68%);
}

html.dark .home-planning-callout {
  background: linear-gradient(120deg, rgba(99, 102, 241, .16), var(--card) 72%);
}

.home-planning-copy h2 {
  max-width: 520px;
  margin: 7px 0 10px;
  color: var(--text);
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: -.03em;
}

.home-planning-copy p {
  max-width: 560px;
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.home-planning-links {
  display: grid;
  gap: 9px;
}

.home-planning-links a {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
}

.home-planning-links a:hover {
  border-color: var(--primary-200);
}

.home-planning-links a span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: .72rem;
  font-weight: 800;
}

.home-planning-links strong {
  font-size: .9rem;
}

.home-planning-links small {
  color: var(--muted);
  font-size: .76rem;
}

html.dark .home-hero-action,
html.dark .home-planning-links a {
  background: var(--card);
}

@media (max-width:760px) {
  .home-hero-actions {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 26px;
  }

  .home-hero-action {
    padding: 14px;
  }

  .home-planning-callout {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 24px 0 42px;
  }

  .home-hero {
    padding-top: 52px;
  }
}

@media (max-width:420px) {
  .home-hero h1 {
    font-size: 2.25rem;
  }

  .desktop-break {
    display: none;
  }

  .home-action-arrow {
    font-size: 1rem;
  }
}

/* Saved scenario exports and topic resource cards */
.scenario-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px
}

.scenario-export-actions .btn {
  white-space: normal
}

.planning-scenario-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px
}

.planning-explainer {
  margin-top: 18px;
  line-height: 1.7
}

.planning-explainer h2 {
  margin: 0 0 12px
}

.planning-explainer h3 {
  margin: 20px 0 8px;
  font-size: 1.02rem
}

.planning-explainer p,
.planning-explainer li {
  color: var(--muted);
  line-height: 1.7
}

.planning-explainer ul {
  padding-left: 22px
}

@media(max-width:640px) {

  .scenario-export-actions .btn,
  .planning-scenario-actions .btn {
    width: 100%
  }
}

/* Theme switching fix: keep the page surface controlled by theme variables.
   Avoid inline root background colours, which remain stale after a live toggle. */
html {
  background-color: var(--bg, #f6f7ff);
}

html.dark {
  background-color: var(--bg, #0b1020);
}

/* High-contrast text for every gradient primary action in both themes. */
.btn-primary,
.button-primary,
button.primary,
input[type="submit"],
.home-planning-links a,
.home-hero-action,
.guide-cta .btn,
a.btn-primary {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

.btn-primary *,
.button-primary *,
button.primary *,
.home-planning-links a *,
.home-hero-action * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

/* SmartCalcHouse responsive card sliders: mobile swipe, desktop grid retained. */
@media (max-width: 767px) {
  .sc-card-slider.sc-slider-enabled {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    gap: 14px;
    padding: 2px 2px 14px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .sc-card-slider.sc-slider-enabled>.sc-card-slide {
    flex: 0 0 min(86%, 340px) !important;
    min-width: 0;
    scroll-snap-align: start;
  }

  .sc-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 5px 0 22px;
  }

  .sc-slider-arrow {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  .sc-slider-arrow:disabled {
    opacity: .35;
    cursor: default;
  }

  .sc-slider-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .sc-slider-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--border-strong);
    cursor: pointer;
  }

  .sc-slider-dot.is-active {
    width: 19px;
    border-radius: 8px;
    background: var(--primary);
  }
}

@media (min-width: 768px) {
  .sc-slider-controls {
    display: none;
  }
}

/* SmartCalcHouse readability and contrast corrections — November 2026 */
/* Card links use theme text colours; reserve white text for solid primary buttons. */
.home-hero-action,
.home-planning-links a {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

.home-hero-action strong,
.home-planning-links a strong {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

.home-hero-action small,
.home-planning-links a small {
  color: var(--muted) !important;
  -webkit-text-fill-color: var(--muted) !important;
}

.home-hero-action .home-action-icon,
.home-hero-action .home-action-arrow,
.home-planning-links a>span {
  color: var(--primary-700) !important;
  -webkit-text-fill-color: var(--primary-700) !important;
}

/* Consistent readable tables across calculator examples and guides. */
.table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 18px 0 24px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

.table-wrap table,
article table,
.content table,
.guide-content table {
  width: 100%;
  min-width: 680px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
  font-size: .92rem;
  line-height: 1.5;
  text-align: left;
}

.table-wrap th,
.table-wrap td,
article table th,
article table td,
.content table th,
.content table td,
.guide-content table th,
.guide-content table td {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: normal;
}

.table-wrap th:last-child,
.table-wrap td:last-child,
article table th:last-child,
article table td:last-child,
.content table th:last-child,
.content table td:last-child,
.guide-content table th:last-child,
.guide-content table td:last-child {
  border-right: 0;
}

.table-wrap tbody tr:last-child td,
article table tbody tr:last-child td,
.content table tbody tr:last-child td,
.guide-content table tbody tr:last-child td {
  border-bottom: 0;
}

.table-wrap thead th,
article table thead th,
.content table thead th,
.guide-content table thead th {
  background: var(--surface, var(--primary-50));
  color: var(--text);
  font-weight: 750;
  white-space: nowrap;
}

.table-wrap tbody tr:nth-child(even),
article table tbody tr:nth-child(even),
.content table tbody tr:nth-child(even),
.guide-content table tbody tr:nth-child(even) {
  background: var(--surface, rgba(120, 120, 140, .045));
}

.table-wrap tbody tr:hover,
article table tbody tr:hover,
.content table tbody tr:hover,
.guide-content table tbody tr:hover {
  background: var(--primary-50);
}

html.dark .table-wrap,
html.dark article table,
html.dark .content table,
html.dark .guide-content table {
  background: var(--card);
}

html.dark .table-wrap thead th,
html.dark article table thead th,
html.dark .content table thead th,
html.dark .guide-content table thead th {
  background: rgba(255, 255, 255, .06);
}

@media (max-width: 640px) {
  .table-wrap {
    border-radius: 10px;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 10px 11px;
    font-size: .84rem;
  }
}

.sc-plain-language {
  margin: 18px 0 26px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-500, var(--primary));
  border-radius: 12px;
  background: var(--surface, var(--card));
  color: var(--text);
}

.sc-plain-language strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.sc-plain-language p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* SmartCalcHouse planning tools */
.tool-hero {
  padding: 46px 0 26px
}

.tool-hero .eyebrow {
  color: var(--primary);
  font-weight: 800;
  letter-spacing: .08em;
  font-size: .76rem
}

.tool-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 10px 0 14px;
  color: var(--text)
}

.tool-hero p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75
}

.tool-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin: 18px 0
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px
}

.tool-field {
  display: flex;
  flex-direction: column;
  gap: 7px
}

.tool-field label {
  font-weight: 650;
  color: var(--text);
  font-size: .92rem
}

.tool-field input,
.tool-field select,
.tool-field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font: inherit
}

.tool-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px
}

.tool-result {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: 12px;
  padding: 16px;
  color: var(--text);
  margin-top: 16px
}

.tool-result strong {
  font-size: 1.45rem;
  display: block;
  margin: 5px 0
}

.tool-muted {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.6
}

.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 16px
}

.tool-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  padding: 16px
}

.tool-card small {
  display: block;
  color: var(--muted)
}

.tool-card b {
  display: block;
  font-size: 1.15rem;
  margin-top: 7px;
  color: var(--text)
}

.tool-table-wrap {
  overflow: auto;
  margin-top: 16px
}

.tool-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px
}

.tool-table th,
.tool-table td {
  padding: 11px;
  border-bottom: 1px solid var(--border);
  text-align: left
}

.tool-table th {
  background: var(--card-soft);
  color: var(--text)
}

.tool-alert {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-soft);
  color: var(--muted);
  line-height: 1.6;
  margin: 14px 0
}

.tool-chip {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: .78rem;
  font-weight: 700
}

.drop-gst {
  display: none;
}

@media(max-width:700px) {
  .tool-grid {
    grid-template-columns: 1fr
  }

  .tool-panel {
    padding: 16px
  }

  .tool-hero {
    padding-top: 30px
  }
}




/* ============================================================
   Smart Comparison Studio — layout correction
   Uses the actual .tool-* classes in comparison-studio.html.
   Keep this block at the end so it wins over earlier rules.
   ============================================================ */
body:has(#cmp-type) main.container {
  width: min(100% - 40px, 1040px);
  max-width: 1040px;
  margin-inline: auto;
  padding-bottom: 48px;
}

body:has(#cmp-type) .tool-hero {
  padding: 42px 0 22px;
  max-width: 100%;
}

body:has(#cmp-type) .tool-hero p {
  max-width: 760px;
  width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

body:has(#cmp-type) .tool-panel {
  width: 100%;
  max-width: 100%;
  padding: clamp(18px, 3vw, 30px);
  margin: 12px 0 20px;
  overflow: hidden;
}

body:has(#cmp-type) .tool-panel h2 {
  margin: 0 0 22px;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.25;
}

body:has(#cmp-type) .tool-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: start;
  gap: 20px 22px;
  width: 100%;
  min-width: 0;
}

body:has(#cmp-type) .tool-field {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

body:has(#cmp-type) .tool-field label {
  display: block !important;
  width: 100%;
  margin: 0;
  font-size: .94rem;
  line-height: 1.4;
}

body:has(#cmp-type) .tool-field input,
body:has(#cmp-type) .tool-field select,
body:has(#cmp-type) .tool-field textarea {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 11px 13px;
  box-sizing: border-box;
  font-size: 1rem;
  line-height: 1.4;
}

body:has(#cmp-type) #cmp-help {
  display: block;
  max-width: 100%;
  margin-top: 2px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}

body:has(#cmp-type) .tool-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  max-width: 100%;
}

body:has(#cmp-type) #cmp-new-value {
  flex: 1 1 220px;
  width: min(100%, 280px);
  box-sizing: border-box;
  display: block !important;
  width: 100% !important;
  /* max-width: 100% !important; */
  min-width: 280px;
  min-height: 46px;
  margin: 0;
  padding: 11px 13px;
  box-sizing: border-box;
  font-size: 1rem;
  line-height: 1.4;
  border: 1px solid var(--border-strong);
}

body:has(#cmp-type) .tool-actions .btn {
  min-height: 46px;
  padding: 11px 18px;
  white-space: normal;
}

body:has(#cmp-type) #cmp-output {
  width: 100%;
  max-width: 100%;
  margin-top: 24px;
}

body:has(#cmp-type) #cmp-output .tool-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

body:has(#cmp-type) #cmp-output .tool-card {
  min-width: 0;
  padding: 20px;
  border-radius: 14px;
  overflow-wrap: anywhere;
}

body:has(#cmp-type) #cmp-output .tool-card b {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.25;
  margin: 10px 0 6px;
}

body:has(#cmp-type) #cmp-output .tool-card p {
  margin: 10px 0;
}

body:has(#cmp-type) #cmp-output .tool-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

body:has(#cmp-type) #cmp-output .tool-table {
  width: 100%;
  min-width: 520px;
  margin: 0;
}

body:has(#cmp-type) .tool-alert {
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 760px) {
  body:has(#cmp-type) main.container {
    width: min(100% - 28px, 100%);
  }

  body:has(#cmp-type) .tool-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  body:has(#cmp-type) #cmp-output .tool-cards {
    grid-template-columns: 1fr;
  }

  body:has(#cmp-type) .tool-panel {
    padding: 18px;
  }
}

@media (max-width: 420px) {
  body:has(#cmp-type) .tool-actions {
    align-items: stretch;
  }

  body:has(#cmp-type) .tool-actions .btn,
  body:has(#cmp-type) #cmp-new-value {
    width: 100%;
    max-width: 100% !important;
    flex-basis: 100%;
  }
}
/* Editorial action checklists added in the November 2026 content pass */
.guide-action-checklist{margin:28px 0;padding:22px 24px;border:1px solid var(--border,#d9deea);border-radius:16px;background:var(--card-soft,rgba(120,130,160,.06))}
.guide-action-checklist h2{margin-top:0}
.guide-action-checklist p{color:var(--muted);line-height:1.7}
.guide-action-checklist ol{padding-left:1.35rem;margin-bottom:0}
.guide-action-checklist li{padding:.35rem 0 .35rem .2rem;line-height:1.7}
@media(max-width:600px){.guide-action-checklist{padding:18px 16px;margin:22px 0}}

/* Crawlable all-calculators directory cards */
#all-grid[hidden]{display:none!important}
.calculator-index-static{margin-top:22px}
.calculator-index-card{display:flex;flex-direction:column;gap:8px;text-decoration:none;min-height:160px}
.calculator-index-card h2{font-size:1.05rem;line-height:1.35;margin:0}
.calculator-index-card p{font-size:.92rem;line-height:1.6;color:var(--muted);margin:0}
.calculator-index-card:focus-visible{outline:3px solid var(--primary);outline-offset:3px}

/* Mobile card-slider containment and compact pagination fix — Nov 17, 2026 */
@media (max-width: 767px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .sc-card-slider.sc-slider-enabled {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-inline: 0;
    padding-inline: 2px;
    overscroll-behavior-x: contain;
  }

  .sc-card-slider.sc-slider-enabled > .sc-card-slide {
    box-sizing: border-box;
    flex: 0 0 min(82%, 310px) !important;
    width: min(82%, 310px);
    max-width: calc(100vw - 32px);
    min-width: 0;
  }

  .sc-slider-controls {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 10px;
    padding-inline: 8px;
  }

  .sc-slider-arrow {
    box-sizing: border-box;
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    min-height: 32px !important;
    height: 32px;
    padding: 0;
  }

  .sc-slider-dots {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    min-width: 0;
    max-width: calc(100% - 84px);
    gap: 6px;
  }

  .sc-slider-dots .sc-slider-dot {
    display: block;
    box-sizing: border-box;
    flex: 0 0 7px;
    width: 7px;
    min-width: 7px;
    min-height: 7px !important;
    height: 7px;
    padding: 0 !important;
    margin: 0;
    border: 0;
    border-radius: 50%;
    line-height: 0;
  }

  .sc-slider-dots .sc-slider-dot.is-active {
    flex-basis: 16px;
    width: 16px;
    min-width: 16px;
    border-radius: 999px;
  }
}


/* All Calculators: use one hydrated, swipeable catalogue on mobile.
   The crawlable static fallback remains available when JavaScript is disabled. */
@media (max-width: 767px) {
  #all-grid.sc-card-slider.sc-slider-enabled {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: hidden;
    gap: 14px;
    padding: 2px 2px 12px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  #all-grid.sc-card-slider.sc-slider-enabled > .calc-card {
    box-sizing: border-box;
    flex: 0 0 min(82%, 310px) !important;
    width: min(82%, 310px);
    max-width: calc(100vw - 32px);
    min-width: 0;
    scroll-snap-align: start;
  }

  #all-grid + .sc-slider-controls {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 6px 0 26px;
  }
}

@media (min-width: 768px) {
  #all-grid.sc-card-slider {
    display: grid;
    overflow: visible;
  }
}


/* SmartCalcHouse lightweight loading states.
   These are local placeholders only; page content remains available to crawlers. */
[data-sc-loading="cards"] {
  position: relative;
  min-height: 190px;
}
[data-sc-loading="cards"]::before {
  content: "";
  display: block;
  min-height: 190px;
  border-radius: 14px;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent) 0 0 / 220px 100% no-repeat,
    linear-gradient(var(--sc-loader-surface, #eef2f7) 0 0) 0 0 / 100% 100% no-repeat;
  animation: sc-loader-shimmer 1.35s ease-in-out infinite;
}
[data-sc-loading="cards"]::after {
  content: "Loading content…";
  position: absolute;
  inset: auto 0 12px;
  color: var(--muted, #64748b);
  font-size: .82rem;
  text-align: center;
}
[data-sc-loading="form"] {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted, #64748b);
  font-size: .9rem;
}
[data-sc-loading="form"]::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: sc-loader-spin .75s linear infinite;
}
[data-sc-loading="form"]::after {
  content: "Preparing calculator…";
}
@keyframes sc-loader-shimmer {
  0% { background-position: -220px 0, 0 0; }
  100% { background-position: calc(100% + 220px) 0, 0 0; }
}
@keyframes sc-loader-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  [data-sc-loading="cards"]::before,
  [data-sc-loading="form"]::before { animation: none; }
}


/* Category card skeletons: show one placeholder per card until the real cards render. */
.sc-card-loading {
  position: relative;
}
.sc-skeleton-card {
  min-height: 178px;
  padding: 20px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 14px);
  background: var(--card, #fff);
  overflow: hidden;
}
.sc-skeleton-card span,
.sc-skeleton-card i {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #edf0f4 25%, #f8fafc 50%, #edf0f4 75%);
  background-size: 220% 100%;
  animation: sc-card-skeleton-shimmer 1.25s ease-in-out infinite;
}
.sc-skeleton-card span {
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border-radius: 12px;
}
.sc-skeleton-card i {
  width: 78%;
  margin-top: 12px;
}
.sc-skeleton-card i:last-child {
  width: 56%;
}
@keyframes sc-card-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-skeleton-card span,
  .sc-skeleton-card i { animation: none; }
}
