/* Shared full-width navigation used by the homepage. */
.public-header {
  width: 100%;
  min-height: 76px;
  padding: 10px 24px;
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(30rem, 34rem) minmax(10rem, 1fr);
  gap: 16px;
  align-items: center;
  background: rgba(238, 244, 250, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}
.public-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.public-brand img { flex: 0 0 auto; }
.public-brand span { display: flex; flex-direction: column; min-width: 0; }
.public-brand strong { color: #172033; font-size: 1.35rem; line-height: 1.15; }
.public-brand small { color: #94a3b8; font-size: .72rem; white-space: nowrap; }
.public-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.public-nav a { position: relative; min-height: 54px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; color: #8fa0b6; text-decoration: none; font-size: .78rem; font-weight: 850; }
.public-nav a::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 28px; height: 3px; border-radius: 999px; background: transparent; transform: translateX(-50%); }
.public-nav a:hover { color: #243b67; }
.public-nav a:hover::after { background: #243b67; }
.public-nav i { font-size: 1rem; }
.public-coffee { justify-self: end; min-height: 38px; padding: 0 17px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(148, 163, 184, .35); border-radius: 999px; background: #e2e8f0; color: #1e293b; text-decoration: none; font-size: .78rem; font-weight: 850; }

/* Calculator pages use normal document scrolling and no viewport-edge padding. */
body.calculator-page {
  width: 100%;
  padding: 0 !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
.calculator-page .app-shell {
  width: 100% !important;
  max-width: 1440px;
  min-height: 100vh !important;
  height: auto !important;
  margin: 0 auto;
  padding: 0 16px 22px;
}
.calculator-page #shared-header {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: rgba(226, 235, 244, .78);
  border-bottom: 1px solid rgba(148, 163, 184, .18);
}
.calculator-page .site-header {
  width: 100%;
  margin: 0 !important;
  padding: 8px 22px !important;
}
.calculator-page #print-area {
  width: 100%;
  max-width: none;
  height: auto !important;
  min-height: 0 !important;
  margin: 12px 0 0;
  padding: 0;
}
.calculator-page #print-area > .flex.flex-col.md\:flex-row {
  min-height: 0 !important;
}
.calculator-page #print-area > .flex.flex-col.md\:flex-row > div {
  overflow: visible !important;
}

/* The short page explanation now sits near the footer instead of above the calculator. */
.calculator-page .calc-intro {
  order: 10;
  width: 100%;
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 14px 18px;
  border-top: 1px solid rgba(148, 163, 184, .25);
  color: #64748b;
  font-size: .76rem;
  line-height: 1.55;
}
.calculator-page .calc-intro .eyebrow { margin: 0 0 2px; font-size: .62rem; }
.calculator-page .calc-intro h1 { margin: 0 0 3px; font-size: .96rem; line-height: 1.35; }
.calculator-page .calc-intro p { max-width: none; font-size: .76rem; }
.calculator-page .trust-links { order: 15; }
.calculator-page footer.no-print { order: 20; }

@media (max-width: 1100px) {
  .public-header { grid-template-columns: 1fr auto; }
  .public-nav { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 640px) {
  .public-header { padding: 10px 14px 8px; gap: 5px 10px; }
  .public-brand strong { font-size: 1.12rem; }
  .public-brand small { display: none; }
  .public-coffee { min-height: 34px; padding: 0 12px; }
  .public-nav { gap: 0; }
  .public-nav a { min-height: 48px; font-size: .7rem; }
  .calculator-page .app-shell { padding: 0 0 18px; }
  .calculator-page .site-header { padding: .8rem .9rem .9rem !important; }
  .calculator-page #print-area { margin-top: 8px; }
  .calculator-page .seo-content,
  .calculator-page .calc-intro { width: calc(100% - 24px); }
}
