:root {
  --ink: #202338;
  --muted: #666b7c;
  --cream: #fff9ed;
  --paper: #ffffff;
  --yellow: #ffd95c;
  --coral: #ff786c;
  --purple: #7158e8;
  --blue: #5bbbe8;
  --green: #50b58b;
  --border: #e7e2d8;
  --shadow: 0 18px 50px rgba(52, 45, 31, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", sans-serif;
}

button,
input {
  font: inherit;
}

button,
summary {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0 0;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  transform: rotate(-4deg);
  transition: transform 180ms ease;
}

.brand:hover .brand-mark {
  transform: rotate(5deg) scale(1.05);
}

.timezone-pill,
.live-badge {
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  width: min(1040px, calc(100% - 40px));
  min-height: 400px;
  margin: 0 auto 24px;
  align-items: center;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 44px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Fredoka", sans-serif;
}

h1 {
  max-width: 690px;
  margin-bottom: 20px;
  font-size: clamp(3.4rem, 8vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

h1 span {
  position: relative;
  color: var(--coral);
  white-space: nowrap;
}

h1 span::after {
  position: absolute;
  right: 3px;
  bottom: -8px;
  left: 3px;
  height: 7px;
  background: var(--yellow);
  border-radius: 50%;
  content: "";
  transform: rotate(-2deg);
}

.hero-copy > p:not(.eyebrow) {
  max-width: 580px;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-stickers {
  display: flex;
  margin-top: 26px;
  gap: 12px;
}

.hero-stickers span {
  display: grid;
  width: 48px;
  height: 48px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 6px 14px rgba(40, 35, 25, 0.06);
  font-size: 1.5rem;
  place-items: center;
}

.hero-stickers span:nth-child(even) {
  transform: rotate(7deg);
}

.hero-doodle {
  display: grid;
  min-height: 320px;
  place-items: center;
}

.orbit {
  position: relative;
  display: grid;
  width: 285px;
  height: 285px;
  border: 3px dashed #d5cfbf;
  border-radius: 50%;
  place-items: center;
  transform: rotate(-8deg);
}

.planet {
  display: grid;
  width: 175px;
  height: 175px;
  background: var(--yellow);
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset -20px -14px 0 rgba(255, 120, 108, 0.35);
  font-size: 5.5rem;
  place-items: center;
  transform: rotate(8deg);
}

.moon {
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  width: 60px;
  height: 60px;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 50%;
  font-size: 1.8rem;
  place-items: center;
}

.ad-slot {
  display: flex;
  color: #96928a;
  background: rgba(255, 255, 255, 0.52);
  border: 1px dashed #cfc9be;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.ad-slot span {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-slot strong {
  margin: 4px 0 2px;
  color: #7e7a72;
  font-size: 0.8rem;
}

.ad-slot small {
  font-size: 0.65rem;
}

.ad-leaderboard {
  width: min(970px, calc(100% - 40px));
  min-height: 100px;
  margin: 30px auto 50px;
}

.calculator-shell {
  display: grid;
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto 70px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
}

.calculator-card,
.results {
  padding: clamp(24px, 5vw, 50px);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-heading h2,
.results-heading h2,
.fun-heading h2,
.share-panel h2,
.content-section h2,
.faq-section h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 4vw, 2.2rem);
}

.step-number {
  display: grid;
  width: 46px;
  height: 46px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 14px;
  font-family: "Fredoka", sans-serif;
  font-size: 1.25rem;
  place-items: center;
  transform: rotate(-4deg);
}

.step-number.coral {
  background: var(--coral);
  transform: rotate(4deg);
}

.field-grid {
  display: grid;
  margin-top: 28px;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label {
  font-size: 0.84rem;
  font-weight: 700;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

input[type="date"],
input[type="time"] {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fcfbf8;
  border: 1px solid #d9d4ca;
  border-radius: 12px;
}

input:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(113, 88, 232, 0.35);
  outline-offset: 3px;
}

.section-divider {
  height: 1px;
  margin: 36px 0;
  background: var(--border);
}

.choice-row {
  display: flex;
  margin-top: 24px;
  gap: 10px;
}

.choice-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-chip span {
  display: block;
  padding: 11px 18px;
  color: var(--muted);
  background: #f7f5f0;
  border: 2px solid transparent;
  border-radius: 999px;
}

.choice-chip input:checked + span {
  color: var(--ink);
  background: #f1efff;
  border-color: var(--purple);
}

.choice-chip input:focus-visible + span {
  outline: 3px solid rgba(113, 88, 232, 0.35);
  outline-offset: 3px;
}

.form-error {
  min-height: 20px;
  margin: 18px 0 5px;
  color: #c23b30;
  font-size: 0.85rem;
  font-weight: 700;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 0 #0d0f1e;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.primary-button:hover {
  box-shadow: 0 5px 0 #0d0f1e;
  transform: translateY(3px);
}

.privacy-inline {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.ad-rectangle {
  min-height: 250px;
  border-radius: 12px;
}

.results {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto 30px;
}

.results-heading,
.fun-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.live-badge i {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(80, 181, 139, 0.16);
}

.calendar-result {
  display: flex;
  margin: 32px 0;
  padding: 32px;
  background: var(--ink);
  border-radius: 22px;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(12px, 5vw, 48px);
}

.calendar-result div {
  text-align: center;
}

.calendar-result strong {
  display: block;
  color: var(--yellow);
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2.7rem, 9vw, 5.4rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.calendar-result span {
  display: block;
  margin-top: 9px;
  color: #c8cad6;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-result b {
  color: #6e7181;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 0.9;
}

.precision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.precision-grid article {
  min-width: 0;
  padding: 22px;
  background: #f7f5f0;
  border-radius: 16px;
}

.precision-grid span,
.precision-grid small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
}

.precision-grid strong {
  display: block;
  margin: 7px 0;
  overflow: hidden;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(1.15rem, 3vw, 1.8rem);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.birthday-countdown {
  margin-top: 34px;
  padding: clamp(22px, 5vw, 34px);
  background: #fff4d2;
  border: 1px solid #eedb9e;
  border-radius: 22px;
}

.countdown-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.countdown-heading h2 {
  margin-bottom: 5px;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.countdown-heading p:last-child,
.countdown-message {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.countdown-heading > span {
  font-size: 2.8rem;
}

.countdown-values {
  display: flex;
  margin: 25px 0 18px;
  padding: 22px 12px;
  color: white;
  background: var(--coral);
  border-radius: 17px;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(8px, 4vw, 35px);
}

.countdown-values div {
  min-width: 80px;
  text-align: center;
}

.countdown-values strong {
  display: block;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2rem, 7vw, 3.8rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.countdown-values span {
  display: block;
  margin-top: 7px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.countdown-values b {
  color: rgba(255, 255, 255, 0.55);
  font-size: 2.5rem;
  line-height: 0.8;
}

.countdown-share {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(32, 35, 56, 0.12);
}

.countdown-share > strong {
  display: block;
  margin-bottom: 12px;
  font-size: 0.8rem;
}

.countdown-share .share-buttons {
  justify-content: flex-start;
}

.countdown-share .share-status {
  position: static;
  min-height: 18px;
  margin: 10px 0 0;
}

.fun-heading {
  margin-top: 58px;
}

.fun-heading > span {
  font-size: 2.5rem;
}

.comparison-tabs {
  display: flex;
  margin-top: 25px;
  padding: 5px;
  overflow-x: auto;
  background: #f3f1eb;
  border-radius: 14px;
  gap: 5px;
  scrollbar-width: none;
}

.comparison-tabs::-webkit-scrollbar {
  display: none;
}

.comparison-tab {
  min-height: 44px;
  padding: 9px 17px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  flex: 1;
}

.comparison-tab.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 3px 10px rgba(52, 45, 31, 0.08);
}

.comparison-tab span {
  margin-right: 5px;
}

.category-intro {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.comparison-grid {
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.comparison-card {
  display: grid;
  min-height: 190px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto 1fr;
  column-gap: 14px;
}

.comparison-card:nth-child(3n + 1) {
  background: #fff4d2;
}

.comparison-card:nth-child(3n + 2) {
  background: #f0ecff;
}

.comparison-card:nth-child(3n + 3) {
  background: #e5f7f6;
}

.comparison-icon {
  grid-column: 2;
  grid-row: 1;
  font-size: 2rem;
  line-height: 1;
}

.comparison-card h3 {
  margin-bottom: 15px;
  font-size: 1.05rem;
  grid-column: 1;
  grid-row: 1;
}

.comparison-card strong {
  display: block;
  margin-bottom: 4px;
  font-family: "Fredoka", sans-serif;
  font-size: 1.7rem;
  grid-column: 1 / -1;
}

.comparison-card p,
.comparison-card small {
  color: var(--muted);
  font-size: 0.73rem;
  grid-column: 1 / -1;
  line-height: 1.45;
}

.comparison-card p {
  margin: 10px 0 0;
}

.show-comparisons-button {
  display: block;
  min-height: 44px;
  margin: 18px auto 0;
  padding: 9px 20px;
  color: var(--purple);
  background: #f1efff;
  border: 1px solid #d9d2ff;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.show-comparisons-button:hover {
  background: #e7e2ff;
}

.comparison-note {
  margin-top: 18px;
  padding: 15px 18px;
  color: var(--muted);
  background: #f8f7f4;
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.6;
}

.share-panel {
  display: flex;
  margin-top: 45px;
  padding-top: 35px;
  border-top: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.share-button {
  min-height: 42px;
  padding: 8px 13px;
  color: white;
  border: 0;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.share-button span {
  margin-right: 4px;
  font-size: 1rem;
}

.instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.facebook {
  background: #1877f2;
}

.whatsapp {
  background: #168c4b;
}

.email {
  color: var(--ink);
  background: var(--yellow);
}

.twitter,
.native {
  background: var(--ink);
}

.share-status {
  position: absolute;
  margin-top: 110px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
}

.bottom-ad {
  margin-top: 50px;
}

.content-section,
.faq-section {
  width: min(1040px, calc(100% - 40px));
  margin: 100px auto;
}

.content-section > div:first-child {
  max-width: 540px;
}

.content-cards {
  display: grid;
  margin-top: 30px;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.content-cards article {
  padding: 26px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.content-cards article > span {
  font-size: 1.7rem;
}

.content-cards h3 {
  margin: 18px 0 8px;
}

.content-cards p,
.faq-section details p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.faq-section {
  max-width: 760px;
}

.faq-section h2 {
  margin-bottom: 25px;
}

.faq-section details {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.faq-section details:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-section summary {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
}

.faq-section details p {
  padding: 13px 25px 0 0;
}

footer {
  display: grid;
  min-height: 180px;
  padding: 42px max(20px, calc((100% - 1040px) / 2));
  color: white;
  background: var(--ink);
  align-items: center;
  grid-template-columns: 1fr auto;
}

footer .brand {
  color: white;
}

footer p {
  margin: 0;
  color: #c8cad6;
  font-size: 0.82rem;
}

.footer-note {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid #3b3e50;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    padding: 50px 0 24px;
    grid-template-columns: 1fr;
  }

  .hero-doodle {
    display: none;
  }

  .calculator-shell {
    grid-template-columns: 1fr;
  }

  .ad-rectangle {
    min-height: 100px;
  }

  .comparison-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-cards {
    grid-template-columns: 1fr;
  }

  .share-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .share-buttons {
    justify-content: flex-start;
  }

  .share-status {
    position: static;
    margin: 0;
  }
}

@media (max-width: 520px) {
  .site-header,
  .hero,
  .calculator-shell,
  .results,
  .content-section,
  .faq-section {
    width: min(100% - 28px, 1040px);
  }

  .timezone-pill {
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5rem);
  }

  .hero-copy > p:not(.eyebrow) {
    font-size: 1rem;
  }

  .ad-leaderboard {
    width: calc(100% - 28px);
  }

  .calculator-card,
  .results {
    padding: 24px 18px;
    border-radius: 21px;
  }

  .field-grid,
  .precision-grid {
    grid-template-columns: 1fr;
  }

  .choice-row {
    align-items: stretch;
    flex-direction: column;
  }

  .choice-chip span {
    text-align: center;
  }

  .calendar-result {
    padding: 27px 10px;
    gap: 10px;
  }

  .calendar-result strong {
    font-size: clamp(2.4rem, 14vw, 4rem);
  }

  .countdown-values {
    gap: 5px;
  }

  .countdown-values div {
    min-width: 0;
    flex: 1;
  }

  .countdown-values strong {
    font-size: clamp(1.8rem, 10vw, 3rem);
  }

  .countdown-values b {
    font-size: 1.8rem;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .comparison-tab {
    padding-right: 13px;
    padding-left: 13px;
  }

  .share-buttons {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
