.entry-shell,
.entry-shell *,
.entry-shell *::before,
.entry-shell *::after {
  box-sizing: border-box;
}

.entry-shell {
  width: 100%;
  overflow-x: clip;
}

.entry-hero,
.entry-card,
.entry-section,
.mini-card,
.link-panel,
.intent-step {
  min-width: 0;
}

.ad-unit,
.google-auto-placed,
.adsbygoogle {
  max-width: 100%;
  overflow: hidden;
}

.entry-calculator-card {
  align-self: stretch;
}

.entry-calculator-card h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 1.25rem;
  line-height: 1.25;
}

.entry-calculator-intro {
  margin: 0 0 16px;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.55;
}

.entry-calculator {
  display: grid;
  gap: 14px;
}

.entry-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.entry-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.entry-field label {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 800;
}

.entry-field input,
.entry-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  padding: 0 10px;
}

.entry-field input:focus,
.entry-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: 0;
}

.entry-calculator .primary-cta {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.entry-calculator-result {
  display: none;
  margin-top: 16px;
  border-top: 1px solid #dbe3ee;
  padding-top: 16px;
  scroll-margin: 24px 0 132px;
}

.entry-calculator-result.is-visible {
  display: block;
}

.entry-calculator-result.is-error {
  color: #991b1b;
}

.entry-result-heading {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.entry-result-primary {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.entry-result-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.entry-result-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}

.entry-result-list dt {
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 700;
}

.entry-result-list dd {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 900;
  text-align: right;
}

.entry-result-note,
.entry-disclaimer {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.5;
}

.entry-result-actions {
  margin-top: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 12px;
}

.entry-result-actions-title {
  margin: 0 0 8px;
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
}

.entry-result-action-list {
  display: grid;
  gap: 8px;
}

.entry-result-action {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.35;
  padding: 9px 11px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.entry-result-action::after {
  content: ">";
  flex: 0 0 auto;
  margin-left: 10px;
  color: #1e40af;
  font-weight: 900;
}

.entry-result-action:hover,
.entry-result-action:focus {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.14);
  outline: 0;
}

.intent-path {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.intent-step {
  border-left: 4px solid #2563eb;
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px 18px;
}

.intent-step h3,
.faq-list h3,
.link-panel h3 {
  margin: 0 0 8px;
  color: #0f172a;
}

.intent-step p,
.faq-list p,
.link-panel p {
  margin: 0;
  color: #475569;
  line-height: 1.65;
}

.link-panel {
  display: block;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}

.link-panel:hover,
.mini-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

.keyword-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.keyword-pill-list li {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 7px 11px;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.source-note {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.55;
}

.source-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.priority-router {
  margin-top: 22px;
}

.priority-router > p {
  max-width: 760px;
  margin: 0 0 18px;
  color: #475569;
  line-height: 1.65;
}

.priority-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
}

.priority-card {
  display: grid;
  min-width: 0;
  gap: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
}

.priority-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.02rem;
  line-height: 1.3;
}

.priority-card p {
  margin: 0;
  color: #475569;
  font-size: 0.93rem;
  line-height: 1.55;
}

.priority-tag {
  width: fit-content;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 5px 9px;
}

.priority-actions {
  display: grid;
  gap: 8px;
}

.priority-actions a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 850;
  padding: 9px 10px;
  text-decoration: none;
}

.priority-actions a::after {
  content: '>';
  flex: 0 0 auto;
  color: #64748b;
}

.priority-actions a:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.ad-label {
  display: block;
  margin: 0 0 8px;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.2;
}

@media (max-width: 760px) {
  .entry-field-grid,
  .entry-result-list div {
    grid-template-columns: 1fr;
  }

  .entry-result-list dd {
    text-align: left;
  }
}

/*
 * Search calculator pages
 * Scoped so the shared entry utilities above keep their existing behavior on
 * older hand-authored calculator pages.
 */
body.search-calculator-page {
  --entry-ink: #102a56;
  --entry-ink-strong: #071b3d;
  --entry-muted: #58677e;
  --entry-border: #d9e1ed;
  --entry-border-strong: #b9c7da;
  --entry-surface: #ffffff;
  --entry-surface-soft: #f6f8fc;
  --entry-coral: #c63d34;
  --entry-coral-dark: #a62f28;
  --entry-coral-soft: #fff4f1;
  --entry-coral-border: #f0b8af;
  margin: 0;
  background: #ffffff;
  color: var(--entry-ink);
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body.search-calculator-page a {
  color: var(--entry-ink);
}

body.search-calculator-page .entry-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  border-radius: 6px;
  background: var(--entry-ink);
  color: #ffffff;
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

body.search-calculator-page .entry-skip-link:focus {
  transform: translateY(0);
}

body.search-calculator-page .entry-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0 24px 56px;
  overflow-x: clip;
}

body.search-calculator-page .entry-site-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--entry-border);
}

body.search-calculator-page .entry-brand {
  position: relative;
  flex: 0 0 auto;
  color: var(--entry-ink-strong);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  text-decoration: none;
}

body.search-calculator-page .entry-brand::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border-radius: 2px;
  background: var(--entry-coral);
  content: "";
  vertical-align: 1px;
}

body.search-calculator-page .entry-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
  margin: 0;
}

body.search-calculator-page .entry-nav a {
  color: var(--entry-ink);
  font-size: 0.88rem;
  font-weight: 720;
  text-decoration: none;
  text-underline-offset: 4px;
}

body.search-calculator-page .entry-nav a:hover,
body.search-calculator-page .entry-nav a:focus-visible {
  color: var(--entry-coral-dark);
  text-decoration: underline;
}

body.search-calculator-page .entry-brand:focus-visible,
body.search-calculator-page .primary-cta:focus-visible,
body.search-calculator-page .entry-field input:focus-visible,
body.search-calculator-page .entry-field select:focus-visible,
body.search-calculator-page .link-panel:focus-visible,
body.search-calculator-page summary:focus-visible,
body.search-calculator-page .source-list a:focus-visible,
body.search-calculator-page .footer-note a:focus-visible {
  outline: 3px solid rgba(198, 61, 52, 0.34);
  outline-offset: 3px;
}

body.search-calculator-page .entry-hero {
  display: block;
  padding: clamp(42px, 5.4vw, 66px) 0 30px;
}

body.search-calculator-page .entry-hero-copy {
  max-width: 900px;
}

body.search-calculator-page .entry-hero h1 {
  max-width: 880px;
  margin: 0;
  color: var(--entry-ink-strong);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1.04;
  text-wrap: balance;
}

body.search-calculator-page .entry-lead {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--entry-muted);
  font-size: clamp(1.02rem, 2vw, 1.16rem);
  line-height: 1.72;
}

body.search-calculator-page .scope-note {
  max-width: 860px;
  margin: 20px 0 0;
  border: 1px solid var(--entry-coral-border);
  border-left: 4px solid var(--entry-coral);
  border-radius: 8px;
  background: var(--entry-coral-soft);
  color: #6f302a;
  font-size: 0.9rem;
  line-height: 1.62;
  padding: 13px 16px;
}

body.search-calculator-page .entry-card.entry-calculator-card {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(300px, 0.84fr);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--entry-border-strong);
  border-radius: 12px;
  background: var(--entry-surface);
  box-shadow: 0 12px 34px rgba(16, 42, 86, 0.07);
  padding: 0;
}

body.search-calculator-page .entry-calculator-intro {
  grid-column: 1;
  margin: 0;
  padding: 28px 30px 0;
}

body.search-calculator-page .entry-calculator-intro h2,
body.search-calculator-page .entry-result-panel h2 {
  margin: 0;
  color: var(--entry-ink-strong);
  font-size: 1.24rem;
  font-weight: 820;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

body.search-calculator-page .entry-calculator-intro p {
  margin: 8px 0 0;
  color: var(--entry-muted);
  font-size: 0.91rem;
  line-height: 1.55;
}

body.search-calculator-page .entry-calculator {
  grid-column: 1;
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 20px 30px 30px;
}

body.search-calculator-page .entry-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 16px;
}

body.search-calculator-page .entry-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

body.search-calculator-page .entry-field label {
  color: var(--entry-ink);
  font-size: 0.86rem;
  font-weight: 780;
  line-height: 1.42;
}

body.search-calculator-page .entry-field input,
body.search-calculator-page .entry-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--entry-border-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--entry-ink-strong);
  font: inherit;
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  padding: 0 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

body.search-calculator-page .entry-field input:hover,
body.search-calculator-page .entry-field select:hover {
  border-color: #8fa2bd;
}

body.search-calculator-page .entry-field input:focus,
body.search-calculator-page .entry-field select:focus {
  border-color: var(--entry-ink);
  box-shadow: 0 0 0 3px rgba(16, 42, 86, 0.12);
  outline: 0;
}

body.search-calculator-page .entry-field small {
  color: var(--entry-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

body.search-calculator-page .entry-calculator .primary-cta {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--entry-coral);
  border-radius: 7px;
  background: var(--entry-coral);
  box-shadow: none;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 820;
  letter-spacing: -0.01em;
  padding: 0 18px;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

body.search-calculator-page .entry-calculator .primary-cta:hover {
  border-color: var(--entry-coral-dark);
  background: var(--entry-coral-dark);
  transform: translateY(-1px);
}

body.search-calculator-page .entry-result-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
  min-height: 100%;
  border-left: 1px solid var(--entry-coral-border);
  background: var(--entry-coral-soft);
  padding: 30px;
}

body.search-calculator-page .entry-result-panel h2 {
  color: #76332c;
}

body.search-calculator-page .entry-result-empty {
  max-width: 310px;
  margin: 18px 0 0;
  color: #86564f;
  font-size: 0.92rem;
  line-height: 1.6;
}

body.search-calculator-page .search-calculator-result {
  margin: 20px 0 0;
  border: 0;
  padding: 0;
}

body.search-calculator-page .search-calculator-result:not([hidden]) + .entry-result-empty {
  display: none;
}

body.search-calculator-page .search-calculator-output-label {
  margin: 0 0 6px;
  color: #86564f;
  font-size: 0.82rem;
  font-weight: 800;
}

body.search-calculator-page .search-calculator-output-value {
  display: block;
  color: var(--entry-coral-dark);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

body.search-calculator-page .search-calculator-breakdown {
  display: grid;
  gap: 0;
  margin: 24px 0 0;
}

body.search-calculator-page .search-calculator-breakdown div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 18px;
  border-top: 1px solid var(--entry-coral-border);
  padding: 11px 0;
}

body.search-calculator-page .search-calculator-breakdown dt {
  color: #86564f;
  font-size: 0.84rem;
  line-height: 1.45;
}

body.search-calculator-page .search-calculator-breakdown dd {
  margin: 0;
  color: var(--entry-ink-strong);
  font-size: 0.93rem;
  font-weight: 850;
  text-align: right;
}

body.search-calculator-page .search-calculator-warnings {
  margin: 18px 0 0;
  color: #713a34;
  font-size: 0.84rem;
  line-height: 1.55;
  padding-left: 18px;
}

body.search-calculator-page .search-calculator-error {
  margin: 0;
  border: 1px solid #e4a6a0;
  border-radius: 7px;
  background: #ffffff;
  color: #8c2720;
  font-size: 0.9rem;
  font-weight: 780;
  line-height: 1.55;
  padding: 12px 14px;
}

body.search-calculator-page .entry-noscript {
  grid-column: 1 / -1;
  border-top: 1px solid var(--entry-border);
  color: var(--entry-muted);
  font-size: 0.88rem;
  padding: 14px 30px;
}

body.search-calculator-page .entry-noscript p {
  margin: 0;
}

body.search-calculator-page .ad-unit {
  width: 100%;
  min-height: 90px;
  margin: 30px 0;
  overflow: hidden;
  text-align: center;
}

body.search-calculator-page .ad-label {
  display: block;
  margin: 0 0 7px;
  color: #8793a4;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.search-calculator-page .entry-section {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--entry-border);
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  padding: 42px 0;
}

body.search-calculator-page .entry-section h2 {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--entry-ink-strong);
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 820;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

body.search-calculator-page .entry-section p,
body.search-calculator-page .entry-section li {
  color: var(--entry-muted);
  line-height: 1.72;
}

body.search-calculator-page .entry-section > p,
body.search-calculator-page .entry-section > ol,
body.search-calculator-page .entry-section > .source-list {
  max-width: 850px;
}

body.search-calculator-page .entry-section ol {
  margin: 0;
  padding-left: 22px;
}

body.search-calculator-page .entry-section ol li + li {
  margin-top: 11px;
}

body.search-calculator-page .source-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding-left: 20px;
}

body.search-calculator-page .source-list a,
body.search-calculator-page .footer-note a {
  color: var(--entry-ink);
  font-weight: 760;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

body.search-calculator-page .source-list a:hover,
body.search-calculator-page .footer-note a:hover {
  color: var(--entry-coral-dark);
}

body.search-calculator-page details {
  max-width: 850px;
  border: 0;
  border-top: 1px solid var(--entry-border);
  padding: 17px 0;
}

body.search-calculator-page details:last-of-type {
  border-bottom: 1px solid var(--entry-border);
}

body.search-calculator-page summary {
  color: var(--entry-ink-strong);
  cursor: pointer;
  font-weight: 800;
  line-height: 1.45;
}

body.search-calculator-page details p {
  margin: 12px 0 0;
}

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

body.search-calculator-page .link-panel {
  display: block;
  min-width: 0;
  border: 1px solid var(--entry-border);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: none;
  color: inherit;
  padding: 18px;
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

body.search-calculator-page .link-panel:hover {
  border-color: var(--entry-coral-border);
  box-shadow: none;
  transform: translateY(-1px);
}

body.search-calculator-page .link-panel h3 {
  margin: 0;
  color: var(--entry-ink);
  font-size: 1rem;
  line-height: 1.35;
}

body.search-calculator-page .link-panel p {
  margin: 8px 0 0;
  color: var(--entry-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

body.search-calculator-page .footer-note {
  margin: 0;
  border-top: 1px solid var(--entry-border);
  color: var(--entry-muted);
  font-size: 0.84rem;
  line-height: 1.58;
  padding: 28px 0 0;
}

body.search-calculator-page .footer-note p {
  margin: 0 0 8px;
}

@media (max-width: 860px) {
  body.search-calculator-page .entry-card.entry-calculator-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  body.search-calculator-page .entry-calculator-intro,
  body.search-calculator-page .entry-calculator,
  body.search-calculator-page .entry-result-panel {
    grid-column: 1;
  }

  body.search-calculator-page .entry-result-panel {
    grid-row: auto;
    min-height: 230px;
    border-top: 1px solid var(--entry-coral-border);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  body.search-calculator-page .entry-shell {
    padding: 0 15px 40px;
  }

  body.search-calculator-page .entry-site-header {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding: 17px 0 14px;
  }

  body.search-calculator-page .entry-nav {
    width: 100%;
    justify-content: flex-start;
    gap: clamp(12px, 4vw, 16px);
    overflow-x: visible;
    padding-bottom: 3px;
    white-space: nowrap;
  }

  body.search-calculator-page .entry-nav a {
    font-size: 0.78rem;
  }

  body.search-calculator-page .entry-hero {
    padding: 42px 0 28px;
  }

  body.search-calculator-page .entry-hero h1 {
    font-size: clamp(2.15rem, 11vw, 3rem);
    letter-spacing: -0.04em;
  }

  body.search-calculator-page .entry-field-grid,
  body.search-calculator-page .grid,
  body.search-calculator-page .search-calculator-breakdown div {
    grid-template-columns: 1fr;
  }

  body.search-calculator-page .entry-calculator-intro {
    padding: 23px 20px 0;
  }

  body.search-calculator-page .entry-calculator {
    padding: 18px 20px 24px;
  }

  body.search-calculator-page .entry-result-panel {
    min-height: 210px;
    padding: 24px 20px;
  }

  body.search-calculator-page .search-calculator-breakdown dd {
    text-align: left;
  }

  body.search-calculator-page .entry-noscript {
    padding-inline: 20px;
  }

  body.search-calculator-page .entry-section {
    padding: 34px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.search-calculator-page *,
  body.search-calculator-page *::before,
  body.search-calculator-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
