:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8faff;
  --surface-3: #eef4ff;
  --text: #102044;
  --muted: #6f7c98;
  --line: #dfe6f3;
  --line-strong: #cdd8ea;
  --shadow: 0 10px 30px rgba(18, 40, 86, 0.06), 0 2px 8px rgba(18, 40, 86, 0.03);
  --shadow-soft: 0 8px 24px rgba(18, 40, 86, 0.05);
  --radius: 26px;
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 18px;
  --blue: #246bff;
  --blue-dark: #154fcb;
  --blue-soft: #e9f1ff;
  --success: #1e8c62;
  --warning: #f58e2c;
  --max: 1220px;
  --header: 84px;
  --bottom-nav: 86px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #fbfcff 0%, var(--bg) 26%, #f4f5fb 100%);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom, 0px));
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

img,
svg {
  display: block;
}

.app-shell {
  min-height: 100vh;
}

.app-container {
  width: min(var(--max), calc(100vw - 24px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(223, 230, 243, 0.9);
}

.topbar {
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-box,
.category-icon,
.tool-icon,
.trust-icon,
.inline-icon,
.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  flex: 0 0 auto;
}

.logo-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--blue-soft) 0%, #dde9ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.logo-box svg,
.category-icon svg,
.tool-icon svg,
.trust-icon svg,
.inline-icon svg,
.stat-icon svg,
.header-action svg {
  width: 24px;
  height: 24px;
}

.topbar-center,
.topbar-right,
.desktop-nav,
.desktop-search,
.search-results,
.footer-desktop,
.hero-visual,
.breadcrumb,
.site-footer {
  display: none;
}

.header-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-action {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-action:active {
  transform: scale(0.98);
}

.mobile-search-panel,
.mobile-menu-panel {
  display: none;
  padding: 0 0 14px;
}

.mobile-search-panel.show,
.mobile-menu-panel.show {
  display: block;
}

.mobile-menu-links {
  display: grid;
  gap: 10px;
}

.mobile-menu-link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  font-weight: 700;
}

.mobile-menu-link.active {
  color: var(--blue);
  border-color: rgba(47, 109, 247, 0.24);
}

.search-shell,
.hero-search,
.page-search {
  position: relative;
}

.search-field,
.search-field-main {
  width: 100%;
  height: 58px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  padding: 0 18px 0 56px;
  outline: none;
}

.search-field::placeholder,
.search-field-main::placeholder {
  color: #8a95af;
}

.search-lead,
.page-search .search-lead,
.hero-search .search-lead {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #7d89a5;
}

.search-lead svg {
  width: 24px;
  height: 24px;
}

.search-submit {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #2f7cff 0%, var(--blue) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(36, 107, 255, 0.25);
}

.search-submit svg {
  width: 22px;
  height: 22px;
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.search-item,
.search-empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
}

.search-item + .search-item {
  border-top: 1px solid #edf1f8;
}

.search-item:focus,
.search-item:focus-visible {
  outline: none;
  background: #f5f8ff;
}

.search-item strong {
  font-size: 14px;
}

.search-item span,
.search-empty {
  color: var(--muted);
  font-size: 13px;
}

.page-wrap {
  padding: 22px 0 28px;
}

.mobile-frame,
.panel,
.list-card,
.tool-card,
.category-card,
.trust-card,
.trust-panel,
.empty-state,
.content-panel,
.calc-shell-panel,
.calc-fallback {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(223, 230, 243, 0.9);
  box-shadow: var(--shadow);
}

.hero-section {
  padding: 10px 0 4px;
}

.hero-stack {
  padding: 12px 0 0;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d7e4ff;
  background: #f7faff;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0;
  font-size: clamp(42px, 13vw, 74px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.hero-title .accent {
  color: var(--blue);
}

.hero-subtitle,
.page-subtitle {
  max-width: 720px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 4.8vw, 24px);
  line-height: 1.45;
}

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

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 18px 0 0;
  border-radius: 24px;
  overflow: hidden;
}

.stat-tile {
  padding: 18px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}

.stat-tile + .stat-tile {
  border-left: 1px solid #edf1f8;
}

.stat-copy strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.stat-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.section-block {
  margin-top: 24px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(18px, 5vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.section-link {
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  border-radius: 22px;
  padding: 14px 10px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.category-card .category-icon {
  width: 52px;
  height: 52px;
}

.category-card .category-icon svg {
  width: 36px;
  height: 36px;
}

.category-card span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}


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

.directory-card {
  border-radius: 22px;
  padding: 18px 16px;
  min-height: 108px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(223, 230, 243, 0.9);
  box-shadow: var(--shadow);
}

.directory-card .category-icon {
  width: 42px;
  height: 42px;
}

.directory-card strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.directory-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

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

.tool-card {
  border-radius: 22px;
  padding: 16px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.tool-card .tool-icon {
  width: 44px;
  height: 44px;
}

.tool-card .tool-icon svg {
  width: 32px;
  height: 32px;
}

.tool-card h3,
.tool-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tool-copy {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.tool-meta,
.tool-card-desc {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.tool-card.category-card,
.tool-card.directory-card,
.tool-card.trust-card,
.tool-card.list-card {
  padding: 16px;
  min-height: 132px;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}

.chevron {
  color: #8a95af;
  margin-left: auto;
  flex: 0 0 auto;
}

.chevron svg {
  width: 22px;
  height: 22px;
}

.page-hero {
  text-align: center;
  padding: 16px 0 6px;
}

.page-hero-inline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.page-title {
  margin: 0;
  font-size: clamp(24px, 10vw, 48px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.page-hero .category-icon,
.page-hero .trust-icon {
  width: 52px;
  height: 52px;
}

.page-search {
  margin: 22px 0 0;
}

.list-stack {
  display: grid;
  gap: 14px;
}

.list-card {
  border-radius: 20px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.list-card .tool-icon,
.list-card .trust-icon,
.list-card .category-icon {
  width: 42px;
  height: 42px;
}

.list-card strong,
.trust-card strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.list-card span,
.trust-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.trust-stack {
  display: grid;
  gap: 14px;
}

.trust-card {
  border-radius: 22px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.trust-panel {
  border-radius: 24px;
  padding: 22px 18px;
  margin-top: 14px;
}

.trust-panel h3,
.content-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.trust-point {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.trust-links-inline {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef2f8;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 700;
}

.trust-panel-head p {
  margin: 8px 0 0;
  color: #55637f;
  font-size: 14px;
  line-height: 1.7;
}

.trust-links-grid {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef2f8;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trust-link-chip {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #e7ecf5;
  border-radius: 16px;
  background: #fbfcff;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.policy-panel {
  display: grid;
  gap: 18px;
}

.policy-intro {
  margin: 0;
  font-size: 15px;
  line-height: 1.78;
  color: #43506b;
}

.policy-section {
  padding-top: 2px;
}

.policy-section h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--text);
}

.policy-section p + p {
  margin-top: 10px;
}

.content-panel {
  border-radius: 28px;
  padding: 24px 20px;
}

.content-panel p,
.content-panel li {
  color: #46536f;
  font-size: 15px;
  line-height: 1.72;
}

.content-panel ul {
  margin: 0;
  padding-left: 18px;
}

.content-panel .subtle {
  color: var(--muted);
}

.footer-links-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 18px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(245, 247, 251, 0) 0%, rgba(245, 247, 251, 0.92) 35%, rgba(245, 247, 251, 0.98) 100%);
}

.bottom-nav-inner {
  width: min(780px, calc(100vw - 16px));
  margin: 0 auto;
  border-radius: 28px;
  border: 1px solid rgba(223, 230, 243, 0.96);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(18, 40, 86, 0.12);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.bottom-link {
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #7d89a5;
  font-size: 12px;
  font-weight: 700;
}

.bottom-link svg {
  width: 23px;
  height: 23px;
}

.bottom-link.active {
  color: var(--blue);
}

.empty-state {
  border-radius: 24px;
  padding: 24px 18px;
  text-align: center;
}

.empty-state p {
  margin: 10px 0 0;
  color: var(--muted);
}

.inline-button,
.cta-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  padding: 0 18px;
  min-height: 48px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}

.cta-button {
  background: linear-gradient(180deg, #2f7cff 0%, var(--blue) 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(36, 107, 255, 0.24);
}

.secondary-button {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.simple-list {
  display: grid;
  gap: 12px;
}

#calculator-related.simple-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.simple-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(223, 230, 243, 0.92);
  box-shadow: var(--shadow-soft);
}

.simple-link span:last-child,
.muted {
  color: var(--muted);
}

.calc-shell-panel,
.calc-fallback {
  border-radius: 30px;
  padding: 18px;
  overflow: hidden;
}

.calc-embed-wrap {
  width: 100%;
}

.calc-embed-frame {
  width: 100%;
  min-height: 520px;
  border: 0;
  border-radius: 18px;
  background: transparent;
}

.code-path {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-3);
  color: var(--blue-dark);
  font-size: 14px;
  word-break: break-word;
}

.related-header {
  margin: 28px 0 14px;
}

.page-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 768px) {
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  body {
    padding-bottom: 40px;
  }

  .page-wrap {
    padding: 42px 0 56px;
  }

  .hero-section {
    padding-top: 22px;
  }

  .hero-title {
    font-size: clamp(56px, 8vw, 88px);
  }

  .hero-subtitle,
  .page-subtitle {
    font-size: 21px;
  }

  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
  }

  .category-card {
    min-height: 136px;
    padding: 18px 14px;
  }

  .category-card span {
    font-size: 15px;
  }

  .tool-grid,
  .popular-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .tool-card {
    min-height: 152px;
    padding: 20px;
  }

  .list-stack,
  .trust-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .list-card {
    padding: 18px 20px;
  }

  .trust-panel {
    padding: 26px 24px;
  }
}

@media (min-width: 980px) {
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  body {
    padding-bottom: 0;
  }

  .topbar {
    gap: 20px;
  }

  .topbar-center,
  .topbar-right,
  .desktop-nav,
  .desktop-search,
  .site-footer,
  .footer-desktop {
    display: flex;
  }

  .header-action-group,
  .mobile-search-panel,
  .mobile-menu-panel,
  .bottom-nav {
    display: none !important;
  }

  .topbar-center {
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
  }

  .desktop-nav {
    align-items: center;
    gap: 28px;
  }

  .desktop-nav a {
    color: #51607c;
    font-size: 15px;
    font-weight: 700;
  }

  .desktop-nav a.active,
  .desktop-nav a:hover {
    color: var(--text);
  }

  .topbar-right {
    align-items: center;
    gap: 14px;
  }

  .desktop-search {
    width: min(360px, 32vw);
    position: relative;
  }

  .desktop-search .search-field {
    height: 52px;
    padding-right: 18px;
    border-radius: 18px;
    box-shadow: none;
  }

  .hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    align-items: center;
    gap: 42px;
  }

  .hero-stack {
    text-align: left;
    padding-top: 24px;
  }

  .hero-subtitle {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-search {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-visual {
    display: block;
  }

  .hero-window {
    padding: 24px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(223, 230, 243, 0.96);
    box-shadow: 0 22px 44px rgba(18, 40, 86, 0.08);
  }

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

  .mini-card {
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid #edf2fa;
    padding: 16px;
    min-height: 124px;
    box-shadow: var(--shadow-soft);
  }

  .mini-card h4 {
    margin: 12px 0 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
  }

  .mini-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }

  .stats-strip {
    width: fit-content;
    min-width: 620px;
    margin-top: 22px;
  }

  .stat-tile {
    min-width: 206px;
    justify-content: flex-start;
    padding: 20px 22px;
  }

  .section-block {
    margin-top: 34px;
  }

  .section-title {
    font-size: 32px;
  }

  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
  }

  .tool-grid,
  .popular-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-hero {
    padding: 10px 0 12px;
  }

  .page-title {
    font-size: 60px;
  }

  .page-search {
    max-width: 760px;
    margin: 26px auto 0;
  }

  .list-stack {
    grid-template-columns: 1fr;
  }

  .list-card {
    padding: 20px 24px;
  }

  .trust-stack {
    grid-template-columns: 1fr;
  }

  .site-footer {
    margin-top: 54px;
    padding: 26px 0 40px;
    border-top: 1px solid rgba(223, 230, 243, 0.92);
  }

  .footer-desktop {
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }

  .footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .footer-brand p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px 18px;
    color: #51607c;
    font-size: 14px;
    font-weight: 700;
  }

  .footer-links a:hover {
    color: var(--text);
  }
}


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

.category-tool-grid .tool-card {
  min-height: 154px;
  padding: 18px 14px;
  border-radius: 24px;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
}

.category-tool-grid .tool-card-top {
  justify-content: center;
}

.category-tool-grid .chevron {
  display: none;
}

.category-tool-grid .tool-card .tool-icon {
  width: 52px;
  height: 52px;
}

.category-tool-grid .tool-card .tool-icon svg {
  width: 34px;
  height: 34px;
}

.category-tool-grid .tool-copy {
  gap: 8px;
}

.category-tool-grid .tool-card h3 {
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.category-tool-grid .tool-meta {
  display: none;
}

@media (min-width: 640px) {
  .category-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (min-width: 980px) {
  .category-tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  .category-tool-grid .tool-card {
    min-height: 166px;
    padding: 20px 16px;
  }

  .category-tool-grid .tool-card h3 {
    font-size: 15px;
  }
}

@media (min-width: 1280px) {
  .category-tool-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}


body.calculator-page .app-container {
  width: calc(100vw - 24px);
  max-width: none;
}

body.calculator-page .page-wrap {
  padding-top: 12px;
}

body.calculator-page .calc-shell-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}

body.calculator-page .calc-embed-wrap {
  width: 100%;
}

body.calculator-page .calc-embed-frame {
  width: 100%;
  min-height: 720px;
  border-radius: 0;
  background: transparent;
}

body.calculator-page #page-mount:empty {
  display: none;
}

@media (min-width: 768px) {
  body.calculator-page .app-container {
    width: calc(100vw - 40px);
  }

  body.calculator-page .calc-embed-frame {
    min-height: 860px;
  }
}

@media (min-width: 980px) {
  body.calculator-page .app-container {
    width: calc(100vw - 40px);
  }

  body.calculator-page .page-wrap {
    padding-top: 18px;
  }

  body.calculator-page .calc-embed-frame {
    min-height: 920px;
  }
}


.breadcrumb-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 18px;
}

.breadcrumb-bar .breadcrumb {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.breadcrumb {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.breadcrumb a,
.breadcrumb .current,
.breadcrumb .sep {
  display: inline-flex;
  align-items: center;
}

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

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

.breadcrumb .current {
  color: var(--text);
}

.breadcrumb .sep {
  color: #b7c0d6;
}

body.calculator-page #page-mount {
  margin-bottom: 16px;
}


.save-calculator-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #97a3bb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.save-calculator-btn:hover {
  color: #e11d48;
  border-color: #f3c1cd;
  background: #fff6f8;
}

.save-calculator-btn:focus-visible {
  outline: 2px solid rgba(36, 107, 255, 0.22);
  outline-offset: 2px;
}

.save-calculator-btn:active {
  transform: scale(0.96);
}

.save-calculator-icon svg {
  width: 15px;
  height: 15px;
}

.save-heart-path {
  fill: transparent;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.save-calculator-btn.is-active {
  color: #e11d48;
  border-color: #f2b8c5;
  background: #fff1f4;
}

.save-calculator-btn.is-active .save-heart-path {
  fill: currentColor;
  stroke: currentColor;
}

.site-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 1200;
}

.site-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 980px) {
  .breadcrumb-bar {
    margin-bottom: 22px;
  }

  .breadcrumb {
    margin-bottom: 0;
    font-size: 14px;
  }
}


/* 4-column card layout update */
@media (min-width: 768px) {
  .category-grid,
  .directory-grid,
  .tool-grid,
  .popular-grid,
  .category-tool-grid,
  .mini-grid,
  .list-stack,
  .trust-stack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .category-grid,
  .directory-grid,
  .tool-grid,
  .popular-grid,
  .category-tool-grid,
  .mini-grid,
  .list-stack,
  .trust-stack {
    gap: 18px;
  }

  .directory-card,
  .list-card,
  .trust-card {
    min-height: 148px;
    padding: 18px 14px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  .directory-card .category-icon,
  .list-card .tool-icon,
  .list-card .trust-icon,
  .list-card .category-icon,
  .trust-card .trust-icon {
    width: 48px;
    height: 48px;
  }

  .directory-card strong,
  .list-card strong,
  .trust-card strong {
    font-size: 15px;
    line-height: 1.25;
  }

  .directory-card span,
  .list-card span,
  .trust-card span {
    font-size: 12px;
    line-height: 1.35;
  }

  .directory-card .chevron,
  .list-card .chevron,
  .trust-card .chevron {
    display: none;
  }

  .mini-card {
    min-height: 144px;
  }
}

@media (min-width: 980px) {
  .category-grid,
  .directory-grid,
  .tool-grid,
  .popular-grid,
  .category-tool-grid,
  .mini-grid,
  .list-stack,
  .trust-stack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1280px) {
  .category-grid,
  .directory-grid,
  .tool-grid,
  .popular-grid,
  .category-tool-grid,
  .mini-grid,
  .list-stack,
  .trust-stack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}



/* Mobile 4-column override */
@media (max-width: 639px) {
  .category-grid,
  .directory-grid,
  .tool-grid,
  .popular-grid,
  .category-tool-grid,
  .mini-grid,
  .list-stack,
  .trust-stack,
  .trust-points {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .category-card,
  .tool-card,
  .directory-card,
  .list-card,
  .trust-card,
  .mini-card,
  .trust-point,
  .category-tool-grid .tool-card {
    border-radius: 14px !important;
    padding: 10px 8px !important;
    min-height: 96px !important;
    gap: 8px !important;
  }

  .category-card .category-icon,
  .tool-card .tool-icon,
  .directory-card .category-icon,
  .list-card .tool-icon,
  .list-card .trust-icon,
  .list-card .category-icon,
  .trust-card .trust-icon,
  .category-tool-grid .tool-card .tool-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  .category-card .category-icon svg,
  .tool-card .tool-icon svg,
  .directory-card .category-icon svg,
  .list-card .tool-icon svg,
  .list-card .trust-icon svg,
  .list-card .category-icon svg,
  .trust-card .trust-icon svg,
  .category-tool-grid .tool-card .tool-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .directory-card,
  .list-card,
  .trust-card,
  .trust-point,
  .category-tool-grid .tool-card {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .tool-card-top {
    gap: 6px !important;
    justify-content: center !important;
  }

  .tool-card .chevron,
  .directory-card .chevron,
  .category-tool-grid .chevron {
    display: none !important;
  }

  .directory-card strong,
  .list-card strong,
  .trust-card strong,
  .tool-card-title,
  .category-card span,
  .mini-card h4,
  .trust-point strong {
    font-size: 11px !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
  }

  .directory-card span,
  .list-card span,
  .trust-card span,
  .mini-card p,
  .tool-card-desc,
  .trust-point span {
    font-size: 9px !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
  }

  .mini-card {
    min-height: 96px !important;
  }

  .section-block {
    margin-top: 18px !important;
  }
}

@media (min-width: 820px) {
  .trust-links-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


.footer-contact-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 10px;
  color: #5b6986;
  font-size: 13px;
  font-weight: 700;
}

.footer-contact-inline a {
  color: #2754c5;
}

.contact-box {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.contact-chip {
  display: block;
  border: 1px solid rgba(208, 218, 235, 0.95);
  border-radius: 20px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(18, 40, 86, 0.06);
}

.contact-chip-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 6px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(39, 84, 197, 0.08);
  color: #2754c5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.contact-chip strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
}

.contact-chip span:last-child {
  display: block;
  margin-top: 6px;
  color: #60708f;
  font-size: 14px;
  line-height: 1.55;
}

.trust-contact-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(223, 230, 243, 0.9);
  color: #60708f;
  font-size: 14px;
  font-weight: 700;
}

.trust-contact-note a {
  color: #2754c5;
}

.contact-section {
  margin-bottom: 10px;
}

@media (min-width: 980px) {
  .contact-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Related cards on calculator pages */
.calculator-related-grid,
.calculator-related-category-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.calculator-related-grid .tool-card,
.calculator-related-category-grid .tool-card {
  min-height: 154px;
  padding: 18px 14px;
  border-radius: 24px;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.calculator-related-grid .tool-card-top,
.calculator-related-category-grid .tool-card-top {
  justify-content: center;
}

.calculator-related-grid .chevron,
.calculator-related-category-grid .chevron {
  display: none;
}

.calculator-related-grid .tool-card .tool-icon,
.calculator-related-category-grid .tool-card .tool-icon {
  width: 52px;
  height: 52px;
}

.calculator-related-grid .tool-card .tool-icon svg,
.calculator-related-category-grid .tool-card .tool-icon svg {
  width: 34px;
  height: 34px;
}

.calculator-related-grid .tool-card h3,
.calculator-related-category-grid .tool-card h3 {
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.calculator-related-grid .tool-meta,
.calculator-related-category-grid .tool-meta {
  display: none;
}

.calculator-related-category-grid {
  margin-bottom: 4px;
}

@media (min-width: 640px) {
  .calculator-related-grid,
  .calculator-related-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (min-width: 980px) {
  .calculator-related-grid,
  .calculator-related-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  .calculator-related-grid .tool-card,
  .calculator-related-category-grid .tool-card {
    min-height: 166px;
    padding: 20px 16px;
  }

  .calculator-related-grid .tool-card h3,
  .calculator-related-category-grid .tool-card h3 {
    font-size: 15px;
  }
}

@media (min-width: 1280px) {
  .calculator-related-grid,
  .calculator-related-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Fixed related card containment and readable titles */
.calculator-page #calculator-related.calculator-related-grid,
.calculator-page #calculator-related-categories.calculator-related-category-grid {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  overflow: visible !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.calculator-page #calculator-related.calculator-related-grid > .tool-card,
.calculator-page #calculator-related-categories.calculator-related-category-grid > .tool-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  padding: 16px 10px !important;
  min-height: 142px !important;
}

.calculator-page #calculator-related .tool-copy,
.calculator-page #calculator-related-categories .tool-copy {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: block !important;
}

.calculator-page #calculator-related .tool-card-title,
.calculator-page #calculator-related-categories .tool-card-title,
.calculator-page #calculator-related .tool-card h3,
.calculator-page #calculator-related-categories .tool-card h3 {
  width: 100% !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  hyphens: auto !important;
  letter-spacing: 0 !important;
  line-height: 1.25 !important;
  text-align: center !important;
  margin: 0 !important;
}

@media (min-width: 980px) {
  .calculator-page #calculator-related.calculator-related-grid,
  .calculator-page #calculator-related-categories.calculator-related-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
}

@media (max-width: 979px) {
  .calculator-page #calculator-related.calculator-related-grid,
  .calculator-page #calculator-related-categories.calculator-related-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 420px) {
  .calculator-page #calculator-related.calculator-related-grid,
  .calculator-page #calculator-related-categories.calculator-related-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .calculator-page #calculator-related.calculator-related-grid > .tool-card,
  .calculator-page #calculator-related-categories.calculator-related-category-grid > .tool-card {
    padding: 10px 6px !important;
    min-height: 116px !important;
  }

  .calculator-page #calculator-related .tool-card-title,
  .calculator-page #calculator-related-categories .tool-card-title,
  .calculator-page #calculator-related .tool-card h3,
  .calculator-page #calculator-related-categories .tool-card h3 {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }
}

/* Inline calculator full-width fix after iframe removal */
body.calculator-page .app-container.page-wrap {
  width: 100vw !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.calculator-page .calc-shell-panel,
body.calculator-page #calculator-shell-content,
body.calculator-page .cc-calculator-inline {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.calculator-page .cc-calculator-inline > .container,
body.calculator-page .cc-calculator-inline > .wrapper,
body.calculator-page .cc-calculator-inline > .wrap,
body.calculator-page .cc-calculator-inline > .page,
body.calculator-page .cc-calculator-inline > .page-wrap,
body.calculator-page .cc-calculator-inline > .page-container,
body.calculator-page .cc-calculator-inline > .main,
body.calculator-page .cc-calculator-inline > .main-content,
body.calculator-page .cc-calculator-inline > .calculator-wrap,
body.calculator-page .cc-calculator-inline > .content,
body.calculator-page .cc-calculator-inline > .shell,
body.calculator-page .cc-calculator-inline > .inner,
body.calculator-page .cc-calculator-inline > .inner-wrap,
body.calculator-page .cc-calculator-inline > .content-wrap,
body.calculator-page .cc-calculator-inline > .calculator,
body.calculator-page .cc-calculator-inline > .calculator-shell {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (max-width: 768px) {
  body.calculator-page .app-container.page-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.calculator-page .breadcrumb-bar {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  body.calculator-page .cc-calculator-inline > .container,
  body.calculator-page .cc-calculator-inline > .wrapper,
  body.calculator-page .cc-calculator-inline > .wrap,
  body.calculator-page .cc-calculator-inline > .page,
  body.calculator-page .cc-calculator-inline > .page-wrap,
  body.calculator-page .cc-calculator-inline > .page-container,
  body.calculator-page .cc-calculator-inline > .main,
  body.calculator-page .cc-calculator-inline > .main-content,
  body.calculator-page .cc-calculator-inline > .calculator-wrap,
  body.calculator-page .cc-calculator-inline > .content,
  body.calculator-page .cc-calculator-inline > .shell,
  body.calculator-page .cc-calculator-inline > .inner,
  body.calculator-page .cc-calculator-inline > .inner-wrap,
  body.calculator-page .cc-calculator-inline > .content-wrap,
  body.calculator-page .cc-calculator-inline > .calculator,
  body.calculator-page .cc-calculator-inline > .calculator-shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.calculator-page .cc-calculator-inline .calculator-container,
  body.calculator-page .cc-calculator-inline .seo-content {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


/* Minimal health notice and static fallback support */
.cc-health-disclaimer {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: 1rem;
  background: var(--card-bg, #FFFFFF);
  color: var(--text-muted, #334155);
  font-size: 0.95rem;
  line-height: 1.6;
}
.cc-health-disclaimer strong { color: var(--text-main, #0F172A); }
.cc-health-disclaimer a { color: var(--primary, #0284C7); font-weight: 700; text-decoration: none; }
.cc-health-disclaimer a:hover { text-decoration: underline; }

/* Desktop header spacing fix: keeps mobile header untouched */
@media (min-width: 980px) {
  .site-header .topbar {
    gap: 24px;
  }

  .site-header .brand {
    flex: 0 0 auto;
    padding-right: 10px;
  }

  .site-header .topbar-center {
    flex: 1 1 auto;
    min-width: 0;
    gap: 22px;
    margin-left: 4px;
  }

  .site-header .desktop-nav {
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(12px, 1.45vw, 24px);
  }

  .site-header .desktop-nav a {
    white-space: nowrap;
    line-height: 1.2;
    font-size: clamp(13px, 0.98vw, 15px);
  }

  .site-header .topbar-right {
    flex: 0 1 320px;
    min-width: 200px;
  }

  .site-header .desktop-search {
    width: clamp(200px, 24vw, 340px);
  }
}

@media (min-width: 1280px) {
  .site-header .brand {
    padding-right: 16px;
  }

  .site-header .desktop-nav {
    gap: 28px;
  }

  .site-header .desktop-search {
    width: min(360px, 28vw);
  }
}

/* Desktop header overlap fix: keeps mobile header unchanged */
@media (min-width: 980px) and (max-width: 1120px) {
  .site-header .app-container { width: min(var(--max), calc(100vw - 16px)); }
  .site-header .topbar { min-height: 60px; gap: 10px; }
  .site-header .brand { gap: 8px; padding-right: 4px; }
  .site-header .logo-box { width: 34px; height: 34px; border-radius: 10px; }
  .site-header .logo-box svg { width: 19px; height: 19px; }
  .site-header .brand-mark { font-size: 13px; line-height: 1.1; }
  .site-header .topbar-center { gap: 10px; margin-left: 0; }
  .site-header .desktop-nav { gap: 10px; justify-content: flex-start; }
  .site-header .desktop-nav a { font-size: 11.5px; line-height: 1.1; letter-spacing: -0.01em; }
  .site-header .topbar-right { flex: 0 0 172px; min-width: 172px; }
  .site-header .desktop-search { width: 172px; }
  .site-header .desktop-search .search-field { height: 44px; border-radius: 15px; padding-left: 40px; padding-right: 12px; font-size: 12px; }
  .site-header .desktop-search .search-lead { left: 13px; }
  .site-header .desktop-search .search-lead svg { width: 18px; height: 18px; }
}

@media (min-width: 1121px) and (max-width: 1279px) {
  .site-header .topbar { gap: 14px; }
  .site-header .brand { padding-right: 8px; }
  .site-header .desktop-nav { gap: 16px; }
  .site-header .desktop-nav a { font-size: 13px; }
  .site-header .topbar-right { flex: 0 0 220px; min-width: 220px; }
  .site-header .desktop-search { width: 220px; }
}

/* Card spacing alignment cleanup */
.category-grid,
.directory-grid,
.tool-grid,
.popular-grid,
.category-tool-grid,
.calculator-related-grid,
.calculator-related-category-grid {
  align-items: stretch;
}

.tool-card,
.all-category-pill,
.all-tool-item a {
  height: 100%;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool-card-top {
  margin-bottom: 0;
}

.tool-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-card-title,
.tool-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.tool-card-desc,
.tool-meta {
  margin-top: 0;
}

.category-tool-grid .tool-card {
  gap: 12px;
}

.all-category-nav,
.all-tools-list {
  align-items: stretch;
}

.all-tool-item a {
  display: flex;
  align-items: center;
}

/* Mobile 4-column spacing fix: keep cards in 4 columns, improve wrapping */
.category-grid,
.directory-grid,
.tool-grid,
.popular-grid,
.category-tool-grid,
.calculator-related-grid,
.calculator-related-category-grid,
.list-stack,
.trust-stack {
  align-items: stretch !important;
}

.tool-card,
.category-card,
.directory-card,
.list-card,
.trust-card,
.calculator-related-grid .tool-card,
.calculator-related-category-grid .tool-card,
.category-tool-grid .tool-card {
  min-width: 0 !important;
  overflow: hidden !important;
}

.tool-card-title,
.tool-card h3,
.directory-card strong,
.list-card strong,
.trust-card strong,
.category-card span {
  max-width: 100% !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  text-wrap: balance;
}

.page-title,
.section-title {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  text-wrap: balance;
}

@media (max-width: 767px) {
  .app-container {
    width: min(var(--max), calc(100vw - 24px)) !important;
  }

  .page-wrap {
    padding-top: 18px !important;
  }

  .breadcrumb,
  .breadcrumb-bar .breadcrumb {
    gap: 6px !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .page-hero {
    padding: 14px 0 8px !important;
  }

  .page-hero-inline {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .page-title {
    width: 100% !important;
    max-width: 720px !important;
    margin: 0 auto !important;
    font-size: clamp(42px, 12vw, 64px) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.055em !important;
    text-align: center !important;
  }

  .page-subtitle {
    max-width: 680px !important;
    margin: 18px auto 0 !important;
    font-size: clamp(20px, 5.2vw, 28px) !important;
    line-height: 1.45 !important;
    text-align: center !important;
  }

  .page-search,
  .hero-search {
    margin-top: 20px !important;
  }

  .search-field,
  .search-field-main {
    height: 58px !important;
    border-radius: 20px !important;
  }

  .section-block {
    margin-top: 24px !important;
  }

  .section-head {
    margin-bottom: 14px !important;
  }

  .section-title {
    font-size: clamp(22px, 6.2vw, 30px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.035em !important;
  }

  .category-grid,
  .directory-grid,
  .tool-grid,
  .popular-grid,
  .category-tool-grid,
  .calculator-related-grid,
  .calculator-related-category-grid,
  .list-stack,
  .trust-stack {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .category-card,
  .directory-card,
  .tool-card,
  .list-card,
  .trust-card,
  .category-tool-grid .tool-card,
  .calculator-related-grid .tool-card,
  .calculator-related-category-grid .tool-card {
    height: 100% !important;
    min-height: 128px !important;
    padding: 10px 6px !important;
    border-radius: 18px !important;
    gap: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .category-tool-grid .tool-card,
  .calculator-related-grid .tool-card,
  .calculator-related-category-grid .tool-card {
    min-height: 146px !important;
    padding: 12px 6px !important;
  }

  .tool-card-top,
  .category-tool-grid .tool-card-top,
  .calculator-related-grid .tool-card-top,
  .calculator-related-category-grid .tool-card-top {
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    margin-bottom: 0 !important;
  }

  .tool-copy {
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
  }

  .category-card .category-icon,
  .tool-card .tool-icon,
  .directory-card .category-icon,
  .directory-card .tool-icon,
  .list-card .tool-icon,
  .list-card .trust-icon,
  .trust-card .trust-icon,
  .category-tool-grid .tool-card .tool-icon,
  .calculator-related-grid .tool-card .tool-icon,
  .calculator-related-category-grid .tool-card .tool-icon {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    margin: 0 auto !important;
  }

  .category-card .category-icon svg,
  .tool-card .tool-icon svg,
  .directory-card .category-icon svg,
  .directory-card .tool-icon svg,
  .list-card .tool-icon svg,
  .list-card .trust-icon svg,
  .trust-card .trust-icon svg,
  .category-tool-grid .tool-card .tool-icon svg,
  .calculator-related-grid .tool-card .tool-icon svg,
  .calculator-related-category-grid .tool-card .tool-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .tool-card .chevron,
  .directory-card .chevron,
  .category-card .chevron,
  .list-card .chevron,
  .trust-card .chevron,
  .category-tool-grid .chevron,
  .calculator-related-grid .chevron,
  .calculator-related-category-grid .chevron {
    display: none !important;
  }

  .tool-card-title,
  .tool-card h3,
  .directory-card strong,
  .list-card strong,
  .trust-card strong,
  .category-card span,
  .mini-card h4,
  .trust-point strong {
    font-size: 11.5px !important;
    line-height: 1.18 !important;
    letter-spacing: -0.02em !important;
    margin: 0 !important;
    text-align: center !important;
  }

  .category-tool-grid .tool-card-title,
  .category-tool-grid .tool-card h3,
  .calculator-related-grid .tool-card-title,
  .calculator-related-grid .tool-card h3,
  .calculator-related-category-grid .tool-card-title,
  .calculator-related-category-grid .tool-card h3 {
    font-size: 11px !important;
    line-height: 1.16 !important;
  }

  .directory-card span,
  .list-card span,
  .trust-card span,
  .mini-card p,
  .tool-card-desc,
  .tool-meta,
  .trust-point span {
    font-size: 10px !important;
    line-height: 1.25 !important;
    margin-top: 3px !important;
  }

  .category-tool-grid .tool-meta,
  .calculator-related-grid .tool-meta,
  .calculator-related-category-grid .tool-meta {
    display: none !important;
  }
}

@media (max-width: 379px) {
  .category-grid,
  .directory-grid,
  .tool-grid,
  .popular-grid,
  .category-tool-grid,
  .calculator-related-grid,
  .calculator-related-category-grid,
  .list-stack,
  .trust-stack {
    gap: 8px !important;
  }

  .category-card,
  .directory-card,
  .tool-card,
  .list-card,
  .trust-card,
  .category-tool-grid .tool-card,
  .calculator-related-grid .tool-card,
  .calculator-related-category-grid .tool-card {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  .tool-card-title,
  .tool-card h3,
  .directory-card strong,
  .list-card strong,
  .trust-card strong,
  .category-card span {
    font-size: 10.5px !important;
    line-height: 1.16 !important;
  }
}


/* Slug calculator-code folder system */
.calc-embed-wrap {
  width: 100%;
}
.calc-embed-frame {
  display: block;
  width: 100%;
  min-height: 520px;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.calc-fallback {
  padding: 24px;
  border-radius: 18px;
}
.calc-fallback .code-path,
.code-path {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f5f7fb;
  border: 1px solid #e5eaf3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}



/* Fullscreen calculator-code embed + compact related sections (slug-fullscreen-compact-related-1) */
.calculator-page #calculator-shell-content.is-embed {
  width: auto !important;
  max-width: none !important;
  margin-top: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: visible !important;
}

.calculator-page #calculator-shell-content.is-embed .calc-embed-wrap {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: 0 !important;
}

.calculator-page #calculator-shell-content.is-embed .calc-embed-frame {
  display: block !important;
  width: 100vw !important;
  max-width: none !important;
  min-height: calc(100vh - var(--header, 84px)) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  overflow: hidden !important;
}

.calculator-page .section-block {
  margin-top: 18px !important;
}

.calculator-page .related-header {
  margin: 18px 0 8px !important;
  font-size: clamp(16px, 3.8vw, 22px) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em !important;
}

.calculator-page .calculator-related-grid,
.calculator-page .calculator-related-category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-top: 8px !important;
}

.calculator-page .calculator-related-grid .tool-card,
.calculator-page .calculator-related-category-grid .tool-card {
  min-height: 92px !important;
  padding: 8px 6px !important;
  border-radius: 15px !important;
  gap: 6px !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-shadow: 0 6px 16px rgba(18, 40, 86, 0.04) !important;
}

.calculator-page .calculator-related-grid .tool-card-top,
.calculator-page .calculator-related-category-grid .tool-card-top {
  width: 100% !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
}

.calculator-page .calculator-related-grid .tool-card .tool-icon,
.calculator-page .calculator-related-category-grid .tool-card .tool-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  margin: 0 auto !important;
}

.calculator-page .calculator-related-grid .tool-card .tool-icon svg,
.calculator-page .calculator-related-category-grid .tool-card .tool-icon svg {
  width: 17px !important;
  height: 17px !important;
}

.calculator-page .calculator-related-grid .chevron,
.calculator-page .calculator-related-category-grid .chevron,
.calculator-page .calculator-related-grid .tool-meta,
.calculator-page .calculator-related-category-grid .tool-meta {
  display: none !important;
}

.calculator-page .calculator-related-grid .tool-card h3,
.calculator-page .calculator-related-grid .tool-card-title,
.calculator-page .calculator-related-category-grid .tool-card h3,
.calculator-page .calculator-related-category-grid .tool-card-title {
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.015em !important;
  text-align: center !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  text-wrap: balance !important;
}

@media (min-width: 768px) {
  .calculator-page .calculator-related-grid,
  .calculator-page .calculator-related-category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .calculator-page .calculator-related-grid .tool-card,
  .calculator-page .calculator-related-category-grid .tool-card {
    min-height: 102px !important;
    padding: 10px 8px !important;
  }
  .calculator-page .calculator-related-grid .tool-card h3,
  .calculator-page .calculator-related-grid .tool-card-title,
  .calculator-page .calculator-related-category-grid .tool-card h3,
  .calculator-page .calculator-related-category-grid .tool-card-title {
    font-size: 12px !important;
  }
}

@media (min-width: 1100px) {
  .calculator-page .calculator-related-grid,
  .calculator-page .calculator-related-category-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}


/* Mobile calculator edge-space reduction + smaller related cards (compact-fix-2) */
@media (max-width: 767px) {
  body.calculator-page .app-container,
  body.calculator-page .app-container.page-wrap {
    width: calc(100vw - 8px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.calculator-page .page-wrap {
    padding-top: 8px !important;
  }

  body.calculator-page .breadcrumb-bar {
    padding-left: 10px !important;
    padding-right: 10px !important;
    margin-bottom: 8px !important;
  }

  body.calculator-page .calc-shell-panel,
  body.calculator-page #calculator-shell-content,
  .calculator-page #calculator-shell-content.is-embed,
  .calculator-page #calculator-shell-content.is-embed .calc-embed-wrap {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .calculator-page #calculator-shell-content.is-embed .calc-embed-frame {
    width: 100% !important;
    min-height: 420px !important;
  }

  .calculator-page .section-block {
    margin-top: 14px !important;
  }

  .calculator-page .related-header,
  .calculator-page .section-head .section-title {
    margin: 12px 0 6px !important;
    font-size: 15px !important;
    line-height: 1.1 !important;
  }

  .calculator-page .calculator-related-grid,
  .calculator-page .calculator-related-category-grid,
  .calculator-page #calculator-related.calculator-related-grid,
  .calculator-page #calculator-related-categories.calculator-related-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 6px !important;
  }

  .calculator-page .calculator-related-grid .tool-card,
  .calculator-page .calculator-related-category-grid .tool-card,
  .calculator-page #calculator-related.calculator-related-grid > .tool-card,
  .calculator-page #calculator-related-categories.calculator-related-category-grid > .tool-card {
    min-height: 74px !important;
    padding: 6px 5px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(18, 40, 86, 0.04) !important;
  }

  .calculator-page .calculator-related-grid .tool-card .tool-icon,
  .calculator-page .calculator-related-category-grid .tool-card .tool-icon {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
  }

  .calculator-page .calculator-related-grid .tool-card .tool-icon svg,
  .calculator-page .calculator-related-category-grid .tool-card .tool-icon svg {
    width: 14px !important;
    height: 14px !important;
  }

  .calculator-page .calculator-related-grid .tool-card h3,
  .calculator-page .calculator-related-grid .tool-card-title,
  .calculator-page .calculator-related-category-grid .tool-card h3,
  .calculator-page .calculator-related-category-grid .tool-card-title,
  .calculator-page #calculator-related .tool-card h3,
  .calculator-page #calculator-related .tool-card-title,
  .calculator-page #calculator-related-categories .tool-card h3,
  .calculator-page #calculator-related-categories .tool-card-title {
    font-size: 9.5px !important;
    line-height: 1.1 !important;
    letter-spacing: -0.01em !important;
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .calculator-page .calculator-related-grid,
  .calculator-page .calculator-related-category-grid,
  .calculator-page #calculator-related.calculator-related-grid,
  .calculator-page #calculator-related-categories.calculator-related-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .calculator-page .calculator-related-grid .tool-card,
  .calculator-page .calculator-related-category-grid .tool-card {
    min-height: 88px !important;
    padding: 8px 6px !important;
  }
}


/* Calculator page touch smooth patch only - no layout/design changes (touch-smooth-1) */
body.calculator-page,
body.calculator-page .calc-shell-panel,
body.calculator-page #calculator-shell-content,
body.calculator-page .calc-embed-wrap,
body.calculator-page .calc-embed-frame,
body.calculator-page .section-block {
  -webkit-overflow-scrolling: touch !important;
}

body.calculator-page a,
body.calculator-page button,
body.calculator-page input,
body.calculator-page select,
body.calculator-page textarea,
body.calculator-page label,
body.calculator-page .tool-card,
body.calculator-page [role="button"] {
  touch-action: manipulation !important;
}

body.calculator-page * {
  -webkit-tap-highlight-color: transparent;
}

@media (hover: none) and (pointer: coarse) {
  body.calculator-page .tool-card,
  body.calculator-page a,
  body.calculator-page button,
  body.calculator-page .mobile-tab {
    transition-duration: 0s !important;
  }
}
