:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef7f6;
  --ink: #111827;
  --muted: #536170;
  --line: #dde5ec;
  --teal: #21b8ad;
  --teal-dark: #087d80;
  --violet: #8f5de8;
  --gold: #f3ad3d;
  --shadow: 0 24px 72px rgba(17, 24, 39, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(18px, calc((100vw - 1120px) / 2));
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid rgba(221, 229, 236, 0.86);
  backdrop-filter: blur(18px);
}

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

.brand-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
}

.brand span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.brand strong {
  font-size: 1.12rem;
  line-height: 1;
}

.brand small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.22);
}

.install-button {
  min-width: 132px;
  padding: 0 20px;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 0.9fr);
  gap: 36px;
  align-items: center;
  min-height: calc(100svh - 73px);
  padding: 34px 0 42px;
}

.hero-copy {
  min-width: 0;
  padding: 8px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 9ch;
  margin-bottom: 18px;
  font-size: 5.4rem;
  line-height: 0.92;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h1 span {
  display: block;
}

.lede {
  max-width: 48rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.24rem;
  font-weight: 500;
  line-height: 1.55;
}

.small-lede {
  margin-top: 18px;
  font-size: 1rem;
}

.cta-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}

.hero-cta-link {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
}

.app-store-badge {
  width: auto;
  height: 52px;
}

.free-label {
  display: block;
  margin: 0;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.ad-visual::before {
  content: "";
  position: absolute;
  inset: 5% -4% 8% 14%;
  background:
    linear-gradient(135deg, rgba(33, 184, 173, 0.2), rgba(143, 93, 232, 0.16)),
    var(--surface-soft);
  border: 1px solid rgba(8, 125, 128, 0.16);
  border-radius: 28px;
  transform: rotate(2deg);
}

.ad-visual img {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100svh - 120px);
  border-radius: 28px;
  object-fit: contain;
  object-position: center;
  box-shadow: var(--shadow);
}

.value-band,
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.value-band {
  padding: 8px 0 28px;
}

.value-band article,
.feature-strip article,
.release-features,
.intent-links,
.faq,
.support,
.screens {
  border: 1px solid var(--line);
  background: var(--surface);
}

.value-band article,
.feature-strip article {
  min-height: 146px;
  padding: 22px;
  border-radius: 22px;
}

.feature-strip {
  padding: 0 0 28px;
}

.feature-strip article {
  background: #fbfdff;
}

.release-features,
.intent-links,
.faq {
  margin: 0 0 28px;
  padding: 28px;
  border-radius: 28px;
}

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

.feature-grid article,
.faq-grid article {
  min-height: 148px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdff;
}

.feature-grid strong,
.faq-grid h3 {
  display: block;
  margin: 0 0 10px;
  font-size: 1.03rem;
  line-height: 1.25;
}

.feature-grid p,
.faq-grid p,
.intent-links p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.intent-links {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 28px;
  align-items: start;
  background:
    linear-gradient(135deg, rgba(33, 184, 173, 0.08), rgba(143, 93, 232, 0.08)),
    var(--surface);
}

.intent-links h2 {
  margin: 0 0 12px;
  font-size: 2.1rem;
}

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

.intent-link-grid a {
  display: flex;
  min-height: 58px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(8, 125, 128, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
}

.value-band strong,
.feature-strip strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.value-band p,
.feature-strip p,
.support-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.screens,
.support {
  margin: 0 0 28px;
  padding: 28px;
  border-radius: 28px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2,
.support h2 {
  margin: 0;
  font-size: 2.25rem;
  letter-spacing: 0;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #f9fbfd;
}

.shot img {
  width: 100%;
  height: min(62vw, 660px);
  object-fit: cover;
  object-position: top center;
}

.shot figcaption {
  padding: 16px 18px 18px;
  color: var(--muted);
  font-weight: 800;
}

.support {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 32px;
  align-items: start;
}

.support-copy {
  display: grid;
  gap: 18px;
}

.support-copy a,
footer a {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 32px;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.text-link {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: none;
}

.calculator-page main {
  display: grid;
  gap: 28px;
  padding: 34px 0 28px;
}

.calculator-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(360px, 1fr);
  gap: 30px;
  align-items: start;
}

.calculator-copy {
  padding: 18px 0;
}

.calculator-copy h1 {
  max-width: 11ch;
  margin-bottom: 18px;
  font-size: 4.55rem;
  line-height: 0.96;
}

.calculator-copy .lede {
  font-size: 1.16rem;
}

.calculator-shell,
.content-panel,
.cta-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.calculator-shell {
  display: grid;
  gap: 22px;
  padding: 22px;
  box-shadow: 0 18px 54px rgba(17, 24, 39, 0.1);
}

.calculator-shell h2,
.content-panel h2,
.cta-panel h2 {
  margin: 0;
  font-size: 1.7rem;
}

.content-panel h1 {
  max-width: 16ch;
  margin-bottom: 12px;
  font-size: 3rem;
  line-height: 1.05;
}

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

.calculator-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.calculator-form select,
.calculator-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

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

.calculator-form .button {
  width: 100%;
  min-height: 48px;
  cursor: pointer;
}

.calculator-template-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.calculator-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.result-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fbfd;
}

.result-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.result-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.65rem;
}

.result-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

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

.calculator-month-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-item span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-item.parent-a span,
.calendar-cell.parent-a .parent-chip {
  background: var(--teal);
}

.legend-item.parent-b span,
.calendar-cell.parent-b .parent-chip {
  background: var(--violet);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--line);
  gap: 1px;
}

.weekday,
.calendar-cell {
  min-width: 0;
  background: #fff;
}

.weekday {
  padding: 8px 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.calendar-cell {
  position: relative;
  min-height: 66px;
  padding: 8px;
}

.calendar-cell.empty {
  background: #f4f7fa;
}

.date-number {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.parent-chip {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.calculator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.calculator-actions .button {
  min-width: 190px;
  padding: 0 20px;
  cursor: pointer;
}

.outline-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.content-panel,
.cta-panel {
  padding: 28px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.content-panel p,
.content-panel li,
.cta-panel p {
  color: var(--muted);
  line-height: 1.65;
}

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

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-panel p {
  max-width: 46rem;
  margin: 8px 0 0;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: none;
}

@media print {
  .topbar,
  .cta-panel,
  footer,
  .calculator-actions,
  .calculator-form {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .calculator-page main {
    width: 100%;
    padding: 0;
  }

  .calculator-hero {
    display: block;
  }

  .calculator-copy {
    padding: 0 0 18px;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    min-height: auto;
    padding-top: 24px;
  }

  h1 {
    max-width: 10ch;
    font-size: 4.2rem;
  }

  .ad-visual {
    justify-content: start;
  }

  .ad-visual img {
    width: min(100%, 410px);
    max-height: none;
  }

  .value-band,
  .feature-strip,
  .intent-links,
  .support {
    grid-template-columns: 1fr;
  }

  .intent-link-grid {
    grid-template-columns: 1fr;
  }

  .calculator-hero,
  .content-grid,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .calculator-hero {
    display: grid;
  }

  .calculator-copy h1 {
    max-width: 12ch;
    font-size: 3.75rem;
  }

  .calculator-stats {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    display: grid;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 10px 12px;
    justify-content: space-between;
  }

  .topbar-actions .secondary-link {
    display: none;
  }

  .brand {
    justify-content: center;
    max-width: 190px;
  }

  .brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .brand strong {
    font-size: 1rem;
  }

  .brand small {
    max-width: 13ch;
    font-size: 0.74rem;
  }

  .install-button {
    display: none;
    min-width: 98px;
    min-height: 44px;
    padding: 0 13px;
    font-size: 0.92rem;
  }

  main,
  footer {
    width: 368px;
    max-width: calc(100% - 22px);
    margin-left: auto;
    margin-right: auto;
  }

  .hero {
    padding: 18px 0 24px;
    justify-items: center;
  }

  .hero-copy,
  .lede,
  .cta-stack {
    width: 100%;
    max-width: 348px;
  }

  .hero-copy,
  .cta-stack {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-copy,
  .value-band article,
  .feature-strip article,
  .screens,
  .support,
  .calculator-copy,
  .content-panel,
  .cta-panel,
  .shot figcaption,
  footer {
    text-align: center;
  }

  h1 {
    width: fit-content;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    font-size: 3.55rem;
  }

  .lede {
    max-width: 18.5rem;
    margin-right: auto;
    margin-left: auto;
    font-size: 1.04rem;
  }

  .section-heading h2,
  .support h2 {
    font-size: 1.8rem;
  }

  .app-store-button {
    flex: 0 0 auto;
  }

  .app-store-badge {
    height: 48px;
  }

  .hero-cta-link,
  .cta-stack {
    justify-content: center;
    width: fit-content;
  }

  .free-label {
    max-width: 7rem;
    font-size: 0.76rem;
    text-align: center;
  }

  .ad-visual {
    justify-content: center;
  }

  .ad-visual::before {
    inset: 5% 0 8% 10%;
  }

  .ad-visual img {
    width: 100%;
    max-height: none;
    border-radius: 24px;
  }

  .value-band,
  .feature-strip {
    gap: 10px;
    padding-bottom: 22px;
  }

  .value-band article,
  .feature-strip article,
  .screens,
  .support {
    border-radius: 20px;
  }

  .value-band article,
  .feature-strip article {
    min-height: auto;
    padding: 18px;
  }

  .screens,
  .support {
    padding: 20px;
  }

  .section-heading,
  .calculator-form,
  .calculator-month-head,
  .shot-grid,
  footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calculator-copy h1 {
    width: auto;
    max-width: 100%;
    font-size: 3rem;
  }

  .calculator-shell,
  .content-panel,
  .cta-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .calendar-legend,
  .calculator-actions,
  .cta-panel {
    justify-content: center;
  }

  .calendar-cell {
    min-height: 54px;
    padding: 6px;
  }

  .parent-chip {
    width: 20px;
    height: 20px;
    right: 5px;
    bottom: 5px;
  }

  .section-heading,
  .support-copy,
  footer {
    justify-items: center;
  }

  .shot img {
    height: 72vh;
  }
}
