:root {
  --white: #fffdf8;
  --warm-ivory: #f7f4ed;
  --ivory: #f7f2e8;
  --ivory-strong: #efe7d8;
  --gray: #e7e2d8;
  --deep-slate: #1f2933;
  --deep-green: #2f6f5e;
  --slate: #26312f;
  --slate-soft: #64706b;
  --green: #0f3d33;
  --green-2: #1e5a4b;
  --gold: #a77c2c;
  --amber: #d8a548;
  --red: #a84d43;
  --shadow: 0 24px 70px rgba(38, 49, 47, 0.12);
  --shadow-soft: 0 14px 34px rgba(38, 49, 47, 0.09);
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(216, 165, 72, 0.12), transparent 32rem),
    linear-gradient(180deg, var(--white), #fbf8f0 48%, var(--ivory));
  color: var(--slate);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header,
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(255, 253, 248, 0.86);
  border-bottom: 1px solid rgba(38, 49, 47, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Frosted headers create a containing block for fixed children; mobile sheets were
   clipped to header height so only the Menu bar appeared — links never showed. */
@media (max-width: 820px) {
  .site-header,
  .app-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

body.mobile-nav-scroll-lock .site-header,
body.mobile-nav-scroll-lock .app-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header {
  justify-content: space-between;
}

.logo,
.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-wordmark {
  color: var(--deep-slate);
  font: inherit;
}

.logo-mark {
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--deep-green);
  --logo-paper: var(--warm-ivory);
}

.logo-mark-primary {
  color: var(--deep-green);
  --logo-paper: var(--warm-ivory);
}

.logo-mark-reversed {
  color: var(--warm-ivory);
  --logo-paper: transparent;
}

.logo-mark-mono {
  color: var(--deep-slate);
  --logo-paper: transparent;
}

.logo-document {
  fill: var(--logo-paper);
  stroke: currentColor;
}

.logo-fold,
.logo-line {
  fill: none;
  stroke: currentColor;
}

.logo-dot {
  fill: currentColor;
}

.app-icon {
  display: inline-grid;
  width: 96px;
  height: 96px;
  place-items: center;
  color: var(--deep-green);
  background: var(--warm-ivory);
  border: 1px solid rgba(31, 41, 51, 0.08);
  border-radius: 24px;
}

.app-icon .logo-mark {
  width: 58px;
  height: 58px;
}

.favicon-preview {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--deep-green);
  background: var(--warm-ivory);
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
}

.favicon-preview .logo-mark {
  width: 22px;
  height: 22px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: var(--slate-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--green);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  color: var(--green);
  background: #fff;
  border: 1px solid var(--gray);
  border-radius: 10px;
}

.nav-toggle-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-toggle-icon path {
  fill: currentColor;
}

@keyframes mobile-sheet-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes mobile-sheet-from-top {
  from {
    opacity: 0;
    transform: translate3d(0, -18px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

body.mobile-nav-scroll-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (min-width: 821px) {
  body.mobile-nav-scroll-lock {
    overflow: unset;
    overscroll-behavior: unset;
  }
}

.mobile-sheet-backdrop {
  display: none;
}

.mobile-sheet-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--deep-slate);
  letter-spacing: -0.02em;
}

.mobile-sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  color: var(--slate-soft);
  background: rgba(231, 226, 216, 0.45);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.mobile-sheet-close:hover {
  color: var(--green);
  background: rgba(15, 61, 51, 0.08);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  color: var(--white);
  background: linear-gradient(145deg, var(--green), #164c40);
  border: 1px solid rgba(15, 61, 51, 0.18);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(15, 61, 51, 0.2);
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(15, 61, 51, 0.24);
}

.button-small {
  min-height: 38px;
  padding: 0 15px;
  font-size: 0.84rem;
}

.button-secondary,
.button-ghost {
  color: var(--green);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.button-ghost {
  border-color: rgba(15, 61, 51, 0.18);
}

.button-danger {
  color: var(--red);
  background: rgba(168, 77, 67, 0.08);
  border-color: rgba(168, 77, 67, 0.18);
  box-shadow: none;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0;
}

.section-tight {
  padding-top: 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 76px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--slate);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

h1 {
  max-width: 760px;
  font-size: clamp(3.1rem, 7vw, 6.4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h3 {
  font-size: 1.15rem;
}

.hero-subtitle,
.seo-intro,
.page-hero p,
.section-heading p,
.report-card p,
.cta-panel p,
.seo-grid p,
.faq-item p,
.muted-copy {
  color: var(--slate-soft);
  font-size: 1.08rem;
}

.small-note {
  margin-top: 16px;
  font-size: 0.92rem;
}

.hero-subtitle {
  max-width: 680px;
  margin: 24px 0 0;
  font-size: 1.28rem;
}

.seo-intro {
  max-width: 690px;
  margin: 18px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.dashboard-preview,
.calc-card,
.summary-card,
.report-card,
.sample-section,
.cta-panel,
.seo-grid article,
.faq-item {
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid rgba(38, 49, 47, 0.09);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.dashboard-preview {
  padding: 24px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.preview-kicker,
.app-title span {
  color: var(--slate-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-header h2 {
  margin-top: 4px;
  font-size: 1.65rem;
}

.status-pill {
  align-self: flex-start;
  padding: 6px 10px;
  color: var(--green);
  background: rgba(15, 61, 51, 0.08);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.metric-card,
.mini-metric,
.feature-card,
.persona-card,
.chart-card,
.scenario-box,
.result-grid div,
.summary-metrics div,
.insight-box {
  background: #fff;
  border: 1px solid rgba(38, 49, 47, 0.08);
  border-radius: var(--radius-md);
}

.metric-card-primary {
  padding: 24px;
  background: linear-gradient(145deg, #fff, var(--ivory));
}

.metric-card span,
.mini-metric span,
.scenario-box span,
.result-grid span,
.summary-metrics span,
.summary-hero span {
  display: block;
  color: var(--slate-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin: 10px 0 2px;
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: 3rem;
  letter-spacing: -0.08em;
}

.metric-card small {
  color: var(--slate-soft);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.mini-metric {
  padding: 16px;
}

.mini-metric strong,
.result-grid strong,
.summary-metrics strong,
.scenario-box strong {
  display: block;
  margin-top: 6px;
  color: var(--slate);
  font-family: "DM Mono", monospace;
  font-size: 1.25rem;
}

.preview-bar {
  height: 10px;
  margin: 22px 0 16px;
  overflow: hidden;
  background: var(--ivory-strong);
  border-radius: 999px;
}

.preview-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--amber));
  border-radius: inherit;
}

.preview-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--slate-soft);
  font-size: 0.9rem;
}

.preview-note i,
.feature-card i,
.persona-card i,
.insight-box i {
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(216, 165, 72, 0.34));
}

.section-heading {
  max-width: 820px;
  margin-bottom: 34px;
}

.section-heading p {
  margin-bottom: 0;
}

.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.card-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.seo-grid,
.faq-grid {
  display: grid;
  gap: 18px;
}

.seo-grid {
  grid-template-columns: repeat(3, 1fr);
}

.faq-grid {
  grid-template-columns: repeat(2, 1fr);
}

.seo-grid article,
.faq-item {
  padding: 26px;
}

.seo-grid h3,
.faq-item h3 {
  margin-bottom: 12px;
}

.feature-card,
.persona-card {
  padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature-card:hover,
.persona-card:hover,
.sample-section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-card i,
.persona-card i {
  margin-bottom: 20px;
  font-size: 1.45rem;
}

.feature-card p,
.persona-card p,
.sample-section p {
  color: var(--slate-soft);
}

.soft-panel {
  width: min(1220px, calc(100% - 32px));
  padding: 58px clamp(20px, 4vw, 54px);
  background: linear-gradient(145deg, rgba(247, 242, 232, 0.88), rgba(255, 253, 248, 0.74));
  border: 1px solid rgba(38, 49, 47, 0.08);
  border-radius: 36px;
}

.measure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.measure-grid span {
  padding: 14px 16px;
  color: var(--slate);
  background: #fff;
  border: 1px solid rgba(38, 49, 47, 0.08);
  border-radius: 999px;
  font-weight: 700;
}

.report-card {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 36px;
  padding: clamp(28px, 5vw, 54px);
}

.report-card .button,
.cta-panel .button {
  margin-top: 24px;
}

.report-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(38, 49, 47, 0.08);
  border-radius: 14px;
  font-weight: 700;
}

.report-list i {
  color: var(--green);
}

.cta-panel {
  text-align: center;
  padding: clamp(32px, 6vw, 70px);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 4vw, 56px);
  color: var(--slate-soft);
  border-top: 1px solid rgba(38, 49, 47, 0.08);
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer strong {
  color: var(--slate);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.page-hero {
  max-width: 920px;
  text-align: center;
}

.page-hero h1 {
  margin-inline: auto;
}

.page-hero p {
  max-width: 760px;
  margin: 22px auto 0;
}

.page-hero .button {
  margin-top: 28px;
}

.report-sample-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding-top: 0;
}

.sample-section {
  padding: 32px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.sample-section.recommendation {
  grid-column: 1 / -1;
}

.sample-number {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--gold);
  font-family: "DM Mono", monospace;
  font-weight: 600;
}

.calculator-body {
  background: linear-gradient(180deg, #fffdf8, #f8f3ea);
}

.app-header {
  align-items: flex-start;
}

.app-title {
  flex: 1;
  min-width: 0;
}

.app-title h1 {
  margin-top: 2px;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.calculator-header {
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px clamp(14px, 1.8vw, 22px);
  padding: 14px clamp(16px, 2.4vw, 34px);
  row-gap: 12px;
}

.calculator-site-nav {
  flex: 0 1 auto;
  justify-content: flex-start;
  gap: clamp(10px, 1.6vw, 18px);
  font-size: clamp(0.78rem, 0.9vw, 0.88rem);
  white-space: nowrap;
}

.calculator-header-actions {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (min-width: 821px) {
  .calculator-header {
    flex-wrap: nowrap;
    align-items: center;
  }

  .calculator-header-actions {
    display: none !important;
  }

  .calculator-site-nav-toggle,
  .calculator-tools-toggle {
    display: none !important;
  }

  .calculator-site-nav {
    display: flex !important;
  }

  .calculator-tools-panel {
    display: flex !important;
  }

  .mobile-nav-sheet .mobile-sheet-backdrop {
    display: none !important;
  }

  .mobile-nav-sheet .mobile-sheet-panel {
    display: contents !important;
  }

  .mobile-nav-sheet .mobile-sheet-header-row {
    display: none !important;
  }

  .site-primary-nav-panel.mobile-nav-sheet .mobile-sheet-links,
  .calculator-site-nav.mobile-nav-sheet .mobile-sheet-links {
    display: flex !important;
    align-items: center;
    gap: clamp(10px, 1.6vw, 20px);
    flex-wrap: nowrap;
  }

  .calculator-tools-panel.mobile-nav-sheet--actions .mobile-sheet-tools {
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: clamp(6px, 0.8vw, 8px);
  }

  .calculator-tools-panel .button-small {
    min-height: 36px;
    padding: 0 clamp(9px, 1vw, 13px);
    font-size: clamp(0.7rem, 0.82vw, 0.8rem);
    white-space: nowrap;
  }
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 760px;
}

.calculator-tools-panel {
  flex: 0 1 auto;
  min-width: 0;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: calc(100% - 24px);
  max-width: 1920px;
  margin: 18px auto 60px;
  align-items: start;
}

.calculator-layout.summary-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.summary-collapsed .summary-panel {
  display: none;
}

.calculator-main {
  display: grid;
  gap: 22px;
}

.calc-card {
  padding: clamp(20px, 3vw, 30px);
}

.calc-card-header {
  margin-bottom: 22px;
}

.calc-card-header h1 {
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.calc-card-header.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.input-grid.compact {
  grid-template-columns: repeat(5, 1fr);
}

.team-session-card {
  background:
    linear-gradient(145deg, rgba(15, 61, 51, 0.05), rgba(255, 255, 255, 0.88)),
    #fff;
  border: 1px solid rgba(15, 61, 51, 0.12);
}

.team-session-card .input-grid.compact {
  grid-template-columns: repeat(4, 1fr);
}

.team-update-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  background: rgba(15, 61, 51, 0.06);
  border: 1px solid rgba(15, 61, 51, 0.14);
  border-radius: 18px;
}

.team-update-banner {
  grid-template-columns: minmax(0, 1fr) auto;
  background: rgba(216, 165, 72, 0.12);
  border-color: rgba(167, 124, 44, 0.22);
}

.team-update-banner strong {
  display: block;
  color: var(--deep-slate);
  font-size: 1rem;
}

.team-update-banner p {
  margin: 4px 0 0;
}

.team-join-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 22px;
}

.team-join-modal[hidden] {
  display: none !important;
}

.team-join-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 41, 51, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.team-join-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(460px, 100%);
  gap: 16px;
  padding: clamp(24px, 5vw, 34px);
  background:
    radial-gradient(circle at top right, rgba(216, 165, 72, 0.18), transparent 16rem),
    #fffdf8;
  border: 1px solid rgba(38, 49, 47, 0.12);
  border-radius: 28px;
  box-shadow: 0 34px 90px rgba(31, 41, 51, 0.28);
  animation: team-modal-pop 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.team-join-dialog h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.team-join-dialog .button {
  width: 100%;
}

body.team-join-modal-open {
  overflow: hidden;
}

.team-update-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.team-pin-note {
  margin-top: 10px;
}

.team-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  padding: 5px 10px;
  color: var(--green);
  background: rgba(15, 61, 51, 0.08);
  border: 1px solid rgba(15, 61, 51, 0.14);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.team-live-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}

.team-live-pill.is-warning {
  color: var(--gold);
  background: rgba(216, 165, 72, 0.12);
  border-color: rgba(167, 124, 44, 0.22);
}

.team-live-pill.is-danger {
  color: var(--red);
  background: rgba(168, 77, 67, 0.08);
  border-color: rgba(168, 77, 67, 0.18);
}

.team-session-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

.team-session-actions .conflict-action {
  border-width: 2px;
}

#teamShareLink {
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
}

#teamSyncStatus {
  color: var(--gold);
  font-weight: 700;
}

.team-toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 260;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.team-toast {
  padding: 13px 15px;
  color: #fffdf8;
  background: linear-gradient(145deg, #0f3d33, #1f7a65);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 7px solid #d8a548;
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(15, 61, 51, 0.26);
  font-weight: 700;
  animation: team-toast-in 220ms ease-out both;
}

.team-toast-warning {
  color: #26312f;
  background: linear-gradient(145deg, #fff3cc, #ffd980);
  border-left-color: #a77c2c;
}

.team-toast-success {
  background: linear-gradient(145deg, #0f3d33, #22a06b);
  border-left-color: #d8a548;
}

.team-toast.is-leaving {
  animation: team-toast-out 220ms ease-in both;
}

.team-remote-flash {
  animation: team-remote-flash 1100ms ease-out;
}

.team-field-changed {
  position: relative;
  z-index: 3;
  animation: team-field-pulse 1600ms ease-out infinite;
}

.team-field-changed input {
  border-color: rgba(216, 165, 72, 0.95) !important;
  box-shadow: 0 0 0 5px rgba(216, 165, 72, 0.22), 0 0 28px rgba(15, 61, 51, 0.18) !important;
}

.team-change-bubble {
  position: absolute;
  left: 12px;
  top: -14px;
  z-index: 12;
  max-width: min(280px, calc(100vw - 48px));
  padding: 7px 10px;
  color: #fffdf8;
  background: linear-gradient(145deg, #a84d43, #d8a548);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(168, 77, 67, 0.24);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.2;
  pointer-events: none;
  text-transform: none;
  animation: team-bubble-pop 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.team-change-bubble.is-leaving {
  animation: team-bubble-out 220ms ease-in both;
}

@keyframes team-toast-in {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes team-toast-out {
  to {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
}

@keyframes team-remote-flash {
  0% {
    filter: none;
  }
  18% {
    filter: drop-shadow(0 0 18px rgba(216, 165, 72, 0.32));
  }
  100% {
    filter: none;
  }
}

@keyframes team-field-pulse {
  0%,
  100% {
    outline: 2px solid rgba(216, 165, 72, 0.12);
    outline-offset: 3px;
  }
  50% {
    outline: 3px solid rgba(216, 165, 72, 0.62);
    outline-offset: 6px;
  }
}

@keyframes team-bubble-pop {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes team-bubble-out {
  to {
    opacity: 0;
    transform: translate3d(0, -5px, 0) scale(0.96);
  }
}

@keyframes team-modal-pop {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

label {
  display: grid;
  gap: 7px;
  color: var(--slate-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
.editable-table input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--slate);
  background: #fff;
  border: 1px solid rgba(38, 49, 47, 0.13);
  border-radius: 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
.editable-table input:focus {
  border-color: rgba(15, 61, 51, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 61, 51, 0.08);
}

.table-wrap {
  overflow-x: auto;
}

.editable-table {
  width: 100%;
  min-width: 1220px;
  border-collapse: separate;
  border-spacing: 0 8px;
  table-layout: fixed;
}

.editable-table th:nth-child(1),
.editable-table td:nth-child(1) {
  width: 25%;
}

.editable-table th:nth-child(2),
.editable-table td:nth-child(2) {
  width: 22%;
}

.editable-table th:nth-child(3),
.editable-table td:nth-child(3) {
  width: 19%;
}

.editable-table th:nth-child(4),
.editable-table td:nth-child(4) {
  width: 96px;
}

.editable-table th:nth-child(5),
.editable-table td:nth-child(5) {
  width: 108px;
}

.editable-table th:nth-child(6),
.editable-table td:nth-child(6) {
  width: 124px;
}

.editable-table th:nth-child(7),
.editable-table td:nth-child(7) {
  width: 68px;
}

.editable-table th {
  padding: 0 10px 8px;
  color: var(--slate-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.editable-table td {
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid rgba(38, 49, 47, 0.08);
  border-bottom: 1px solid rgba(38, 49, 47, 0.08);
}

.editable-table td:first-child {
  border-left: 1px solid rgba(38, 49, 47, 0.08);
  border-radius: 14px 0 0 14px;
}

.editable-table td:last-child {
  border-right: 1px solid rgba(38, 49, 47, 0.08);
  border-radius: 0 14px 14px 0;
  text-align: center;
}

.editable-table input[data-field="hours"],
.editable-table input[data-field="rate"] {
  padding-inline: 8px;
  text-align: right;
}

.table-textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  padding: 10px 12px;
  color: var(--slate);
  background: #fff;
  border: 1px solid rgba(38, 49, 47, 0.13);
  border-radius: 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.table-textarea:focus {
  border-color: rgba(15, 61, 51, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 61, 51, 0.08);
}

.topic-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.topic-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
}

.topic-note-toggle,
.topic-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  color: var(--green);
  background: rgba(15, 61, 51, 0.06);
  border: 1px solid rgba(15, 61, 51, 0.14);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.topic-note-toggle:hover,
.topic-detail-close:hover {
  background: rgba(15, 61, 51, 0.11);
}

.topic-note-toggle.has-content {
  color: var(--gold);
  background: rgba(216, 165, 72, 0.12);
  border-color: rgba(167, 124, 44, 0.22);
}

.topic-note-status {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}

.topic-detail-row td {
  padding-top: 0;
  background: transparent;
  border-top: none;
}

.topic-detail-editor {
  display: grid;
  gap: 14px;
  width: min(620px, 100%);
  padding: 16px;
  background: linear-gradient(145deg, rgba(15, 61, 51, 0.05), #fff);
  border: 1px solid rgba(15, 61, 51, 0.12);
  border-radius: 18px;
}

.topic-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topic-detail-header strong {
  color: var(--slate);
  font-size: 0.96rem;
}

.topic-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.topic-detail-grid-single {
  grid-template-columns: 1fr;
}

.topic-detail-grid label {
  min-width: 0;
}

.topic-detail-grid textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  padding: 12px;
  color: var(--slate);
  background: #fff;
  border: 1px solid rgba(38, 49, 47, 0.13);
  border-radius: 14px;
  outline: none;
  text-transform: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.topic-detail-grid textarea:focus {
  border-color: rgba(15, 61, 51, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 61, 51, 0.08);
}

.editable-table .cost-cell {
  min-width: 120px;
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-weight: 600;
}

.delete-row {
  width: 34px;
  height: 34px;
  color: var(--red);
  background: rgba(168, 77, 67, 0.08);
  border: 1px solid rgba(168, 77, 67, 0.13);
  border-radius: 50%;
  cursor: pointer;
}

.subtotal-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 14px;
  color: var(--slate-soft);
  font-weight: 700;
}

.subtotal-row strong {
  color: var(--green);
  font-family: "DM Mono", monospace;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.result-grid div,
.summary-metrics div {
  padding: 16px;
}

.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 22px 0 6px;
}

.scenario-box {
  padding: 20px;
}

.scenario-box.highlighted {
  background: linear-gradient(145deg, rgba(15, 61, 51, 0.08), #fff);
}

.scenario-arrow {
  color: var(--gold);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.chart-card {
  min-height: 360px;
  padding: 20px;
}

.chart-card h3 {
  margin-bottom: 20px;
}

.chart-card canvas {
  width: 100% !important;
  height: 280px !important;
}

.summary-panel {
  position: static;
}

.summary-card {
  padding: 24px;
}

.summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-card-header .eyebrow {
  margin-bottom: 0;
}

.summary-toggle {
  flex-shrink: 0;
  white-space: nowrap;
}

.summary-hero {
  margin-top: 18px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(145deg, var(--green), #174e42);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(15, 61, 51, 0.22);
}

.summary-hero span {
  color: rgba(255, 255, 255, 0.72);
}

.summary-hero strong {
  display: block;
  margin-top: 10px;
  font-family: "DM Mono", monospace;
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: -0.08em;
}

.summary-metrics {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.summary-metrics div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-metrics strong {
  margin: 0;
  text-align: right;
}

.insight-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-top: 14px;
  padding: 18px;
  background: linear-gradient(145deg, #fff, var(--ivory));
}

.insight-box p {
  margin: 0;
  color: var(--slate-soft);
}

.calculator-footer {
  align-items: flex-start;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal-open {
  overflow: hidden;
}

.pdf-report {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  width: 8.5in;
  pointer-events: none;
  background: #fff;
  color: #1f2933;
  font-family: "Inter", Arial, sans-serif;
}

.pdf-report.is-exporting {
  left: 0;
  z-index: -1;
  pointer-events: none;
}

.pdf-report,
.pdf-report * {
  box-shadow: none !important;
}

.pdf-page {
  display: flex;
  flex-direction: column;
  width: 8.5in;
  height: 11in;
  padding: 0.55in;
  overflow: hidden;
  color: #1f2933;
  background: #fff;
  box-sizing: border-box;
  page-break-after: always;
  break-after: page;
}

.pdf-page:last-child {
  page-break-after: auto;
  break-after: auto;
}

.pdf-card,
.pdf-table,
.pdf-metric-grid,
.pdf-metric,
.pdf-section,
.pdf-summary-strip,
.pdf-summary-item,
.pdf-page table,
.pdf-page tr {
  page-break-inside: avoid;
  break-inside: avoid;
}

.pdf-page h1,
.pdf-page h2,
.pdf-page h3 {
  margin: 0;
  color: #1f2933;
  font-family: "Space Grotesk", Arial, sans-serif;
  letter-spacing: -0.035em;
  page-break-after: avoid;
  break-after: avoid;
}

.pdf-page p {
  margin: 0;
  color: #56625e;
  font-size: 10.5px;
  line-height: 1.48;
}

.pdf-kicker,
.pdf-report-label {
  margin: 0;
  color: #a77c2c;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pdf-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f3d33;
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.pdf-brand.small {
  font-size: 11px;
}

.pdf-logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  background: #f7f4ed;
  border: 2px solid #2f6f5e;
  border-radius: 6px;
}

.pdf-logo-mark::before {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 8px;
  height: 8px;
  background: #fff;
  border-left: 2px solid #2f6f5e;
  border-bottom: 2px solid #2f6f5e;
  border-radius: 0 4px 0 4px;
}

.pdf-logo-mark span {
  width: 10px;
  height: 7px;
  border-left: 3px solid #a77c2c;
  border-bottom: 3px solid #a77c2c;
  transform: rotate(-45deg);
}

.pdf-brand.small .pdf-logo-mark {
  width: 18px;
  height: 18px;
}

.pdf-page-header,
.pdf-cover-top,
.pdf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.pdf-page-header {
  padding-bottom: 14px;
  border-bottom: 1px solid #e7e2d8;
}

.pdf-page-header h2 {
  margin-top: 4px;
  font-size: 25px;
  line-height: 1.02;
}

.cover-page {
  background:
    linear-gradient(180deg, rgba(247, 242, 232, 0.7), rgba(255, 255, 255, 0) 36%),
    #fff;
}

.pdf-cover-top {
  padding-bottom: 18px;
  border-bottom: 1px solid #e7e2d8;
}

.pdf-cover-title {
  margin-top: 0.68in;
}

.pdf-cover-title h1 {
  max-width: 6.6in;
  margin: 8px 0 14px;
  color: #0f3d33;
  font-size: 42px;
  line-height: 0.98;
}

.pdf-cover-title p:not(.pdf-kicker) {
  max-width: 5.8in;
  font-size: 12px;
}

.pdf-cover-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 18px;
  margin-top: 0.38in;
}

.pdf-cover-meta div,
.pdf-summary-item {
  display: grid;
  gap: 4px;
}

.pdf-cover-meta span,
.pdf-summary-item span,
.pdf-metric span,
.pdf-insight-box span,
.pdf-leakage-bar span {
  color: #64706b;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.pdf-cover-meta strong,
.pdf-summary-item strong {
  color: #1f2933;
  font-size: 11px;
}

.pdf-card {
  padding: 14px;
  background: #fbf8f0;
  border: 1px solid #e7e2d8;
  border-radius: 14px;
}

.pdf-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: auto;
}

.pdf-metric-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.pdf-metric-grid.six-up,
.pdf-metric-grid.four-up {
  grid-template-columns: repeat(2, 1fr);
}

.pdf-metric-grid.five-up {
  grid-template-columns: repeat(3, 1fr);
}

.pdf-metric {
  min-height: 74px;
  padding: 13px;
  background: #fff;
  border: 1px solid #e7e2d8;
  border-radius: 13px;
}

.pdf-metric strong {
  display: block;
  margin-top: 8px;
  color: #0f3d33;
  font-family: "DM Mono", monospace;
  font-size: 20px;
  line-height: 1.04;
  letter-spacing: -0.07em;
}

.pdf-metric.is-primary {
  background: #0f3d33;
  border-color: #0f3d33;
}

.pdf-metric.is-primary span,
.pdf-metric.is-primary strong {
  color: #fff;
}

.pdf-metric.is-loss strong {
  color: #a84d43;
}

.pdf-metric.is-benefit strong {
  color: #1e5a4b;
}

.pdf-lead {
  margin-top: 18px !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.pdf-insight-box,
.pdf-leakage-bar {
  margin-top: 16px;
}

.pdf-insight-box p,
.pdf-leakage-bar p,
.pdf-recommendation p,
.pdf-callout p {
  margin-top: 8px;
}

.pdf-two-column {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.pdf-section {
  margin-top: 14px;
}

.pdf-section h3,
.pdf-card h3,
.pdf-callout h3,
.pdf-recommendation h3 {
  margin-bottom: 8px;
  color: #0f3d33;
  font-size: 14px;
}

.pdf-table {
  width: 100%;
  margin-top: 7px;
  border-collapse: collapse;
  table-layout: fixed;
}

.pdf-table th,
.pdf-table td {
  padding: 4.5px 5.5px;
  border: 1px solid #e7e2d8;
  font-size: 8.5px;
  line-height: 1.22;
  text-align: left;
  vertical-align: top;
}

.pdf-table th {
  color: #0f3d33;
  background: #f7f2e8;
  font-weight: 800;
}

.pdf-table td {
  color: #313d39;
  background: #fff;
}

.pdf-row-topic,
.pdf-row-note {
  display: block;
}

.pdf-row-topic {
  color: #1f2933;
  font-weight: 800;
}

.pdf-row-note {
  margin-top: 4px;
  color: #56625e;
  font-size: 7.5px;
  line-height: 1.25;
}

.pdf-row-note strong {
  color: #0f3d33;
}

.mini-table th {
  width: 58%;
}

.comparison-table th,
.comparison-table td {
  padding: 7px 8px;
  font-size: 9.5px;
}

.pdf-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.pdf-summary-item strong {
  color: #0f3d33;
  font-family: "DM Mono", monospace;
  font-size: 13px;
  letter-spacing: -0.05em;
}

.pdf-callout,
.pdf-recommendation {
  padding: 15px;
  background: #fbf8f0;
  border-left: 4px solid #a77c2c;
  border-radius: 12px;
}

.pdf-leakage-bar {
  border-color: rgba(168, 77, 67, 0.22);
}

.pdf-leakage-bar strong {
  display: block;
  margin-top: 4px;
  color: #a84d43;
  font-family: "DM Mono", monospace;
  font-size: 28px;
  letter-spacing: -0.07em;
}

.pdf-footer {
  margin-top: auto;
  padding-top: 10px;
  color: #64706b;
  border-top: 1px solid #e7e2d8;
  font-size: 8.5px;
}

.pdf-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.pdf-preview-modal.is-open {
  display: block;
}

.pdf-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 41, 51, 0.46);
}

.pdf-preview-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(980px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  margin: 14px auto;
  overflow: hidden;
  background: #f7f2e8;
  border: 1px solid rgba(38, 49, 47, 0.12);
  border-radius: 22px;
}

@media (max-width: 540px) {
  .pdf-preview-shell {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    margin: 6px auto;
    border-radius: 16px;
  }

  .pdf-preview-toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .pdf-preview-scroll {
    padding: 14px;
  }
}

.pdf-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: #fffdf8;
  border-bottom: 1px solid #e7e2d8;
}

.pdf-preview-toolbar h2 {
  margin: 0;
  font-size: 1.3rem;
}

.pdf-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-preview-scroll {
  overflow: auto;
  padding: 24px;
}

.pdf-report-preview {
  position: static;
  left: auto;
  top: auto;
  z-index: auto;
  display: grid;
  width: auto;
  pointer-events: auto;
  justify-items: center;
  gap: 24px;
  background: transparent;
}

.pdf-report-preview .pdf-page {
  transform-origin: top center;
  border: 1px solid #e7e2d8;
}

@media (max-width: 1180px) {
  .hero,
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-preview {
    max-width: 620px;
  }

  .summary-panel {
    position: static;
  }

  .app-header {
    flex-wrap: wrap;
  }

  .app-header.calculator-header {
    flex-wrap: nowrap;
    align-items: center;
  }

  .app-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .card-grid.four,
  .input-grid.compact,
  .team-session-card .input-grid.compact {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .site-header {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto;
  }

  .site-header .site-nav-toggle {
    margin-left: auto;
  }

  .calculator-header .calculator-site-nav-toggle,
  .calculator-header .calculator-tools-toggle {
    margin-left: 0;
  }

  .calculator-header-actions {
    display: inline-flex;
  }

  .app-header.calculator-header {
    align-items: center;
    justify-content: flex-start;
  }

  .calculator-site-nav {
    order: 5;
  }

  .calculator-tools-panel {
    order: 6;
  }

  .calculator-header .logo {
    order: 1;
  }

  .calculator-header-actions {
    order: 3;
    margin-left: auto;
  }

  /* Calculator toolbar — opens as fullscreen top sheet overlay */
  .calculator-tools-panel:not(.is-open) {
    display: none !important;
  }

  #calc-tools-panel.mobile-nav-sheet--actions.is-open {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 220;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
    padding: 0 !important;
    max-width: none !important;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow-x: hidden;
    width: 100vw;
    max-height: none;
    -webkit-overflow-scrolling: touch;
  }

  #calc-tools-panel.mobile-nav-sheet--actions.is-open .mobile-sheet-backdrop {
    display: block !important;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    cursor: pointer;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(31, 41, 51, 0.52);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  #calc-tools-panel.mobile-nav-sheet--actions.is-open .mobile-sheet-panel {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    width: 100%;
    padding: calc(14px + env(safe-area-inset-top)) 22px 22px;
    background: linear-gradient(180deg, #fffdfa, #fdf9f4);
    border-radius: 0 0 26px 26px;
    box-shadow: 0 22px 50px rgba(31, 41, 51, 0.2);
    animation: mobile-sheet-from-top 300ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    max-height: min(92vh, 900px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  #calc-tools-panel.mobile-nav-sheet--actions.is-open .mobile-sheet-header-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
  }

  #calc-tools-panel.mobile-nav-sheet--actions.is-open .mobile-sheet-tools {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  #calc-tools-panel.mobile-nav-sheet--actions.is-open .mobile-sheet-tools .button {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  #site-primary-nav.mobile-nav-sheet,
  #calc-site-nav.calculator-site-nav.mobile-nav-sheet {
    display: none !important;
  }

  #site-primary-nav.mobile-nav-sheet.is-open,
  #calc-site-nav.calculator-site-nav.mobile-nav-sheet.is-open {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 220;
    flex-direction: column;
    justify-content: flex-start;
    width: 100vw;
    max-width: none;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow: hidden;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #site-primary-nav.mobile-nav-sheet.is-open .mobile-sheet-backdrop,
  #calc-site-nav.calculator-site-nav.mobile-nav-sheet.is-open .mobile-sheet-backdrop {
    display: block !important;
    flex: 1 1 auto;
    min-height: 0;
    cursor: pointer;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(31, 41, 51, 0.52);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  #site-primary-nav.mobile-nav-sheet.is-open .mobile-sheet-panel,
  #calc-site-nav.calculator-site-nav.mobile-nav-sheet.is-open .mobile-sheet-panel {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: calc(14px + env(safe-area-inset-top)) 22px 22px;
    background: linear-gradient(180deg, #fffdfa, #fdf9f4);
    border-radius: 0 0 26px 26px;
    box-shadow: 0 22px 50px rgba(31, 41, 51, 0.2);
    animation: mobile-sheet-from-top 300ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    max-height: min(92vh, 900px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  #site-primary-nav.mobile-nav-sheet.is-open .mobile-sheet-header-row,
  #calc-site-nav.calculator-site-nav.mobile-nav-sheet.is-open .mobile-sheet-header-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }

  #site-primary-nav.mobile-nav-sheet.is-open .mobile-sheet-links,
  #calc-site-nav.calculator-site-nav.mobile-nav-sheet.is-open .mobile-sheet-links {
    display: flex !important;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    flex-shrink: 0;
    overflow: visible;
  }

  #site-primary-nav.mobile-nav-sheet.is-open .mobile-sheet-links a,
  #calc-site-nav.calculator-site-nav.mobile-nav-sheet.is-open .mobile-sheet-links a {
    display: block;
    padding: 16px 0;
    margin: 0;
    border-bottom: 1px solid rgba(38, 49, 47, 0.08);
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--slate);
    width: 100%;
  }

  #site-primary-nav.mobile-nav-sheet.is-open .mobile-sheet-links a:last-child,
  #calc-site-nav.calculator-site-nav.mobile-nav-sheet.is-open .mobile-sheet-links a:last-child {
    border-bottom: none;
  }

  .site-nav {
    align-items: flex-start;
    padding: 0;
    background: transparent;
    border: none;
  }

  .site-header > .button {
    display: none;
  }

  .section {
    width: min(100% - 28px, 1180px);
    padding: 62px 0;
  }

  .card-grid.three,
  .card-grid.four,
  .seo-grid,
  .faq-grid,
  .measure-grid,
  .report-card,
  .report-sample-grid,
  .input-grid,
  .input-grid.compact,
  .team-session-card .input-grid.compact,
  .result-grid,
  .chart-grid,
  .before-after {
    grid-template-columns: 1fr;
  }

  .team-update-banner {
    grid-template-columns: 1fr;
  }

  .team-update-actions {
    justify-content: stretch;
  }

  .team-update-actions .button {
    width: 100%;
  }

  .topic-detail-grid {
    grid-template-columns: 1fr;
  }

  .team-toast-region {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .sample-section.recommendation {
    grid-column: auto;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-metrics div {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-metrics strong {
    text-align: left;
  }
}

@media (max-width: 540px) {
  h1 {
    font-size: 2.7rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .app-actions .button {
    width: 100%;
  }

  .calculator-layout {
    width: calc(100% - 20px);
  }

  .calc-card-header.split {
    align-items: flex-start;
    flex-direction: column;
  }
}
