:root {
  --public-ink: #202238;
  --public-muted: #62657b;
  --public-line: #dfe2ef;
  --public-surface: #ffffff;
  --public-soft: #f7f7fc;
  --public-lavender: #7068e8;
  --public-lavender-dark: #5047c9;
  --public-blue: #2f76df;
  --public-green: #2a9b72;
  --public-shadow: 0 18px 50px rgba(43, 46, 82, 0.1);
  --metric-conditional: #2f76df;
  --metric-unconditional: #7068e8;
  --metric-cumulative: #2a9b72;
}

html { scroll-behavior: smooth; }

/* A short path from the due date to today's answer. */
.hero-date-entry { max-width: 30rem; margin-top: 1.25rem; }
.hero-date-entry label { display: block; margin-bottom: .4rem; font-size: 1rem; font-weight: 650; }
.hero-date-entry input { box-sizing: border-box; width: 100%; font-size: 1rem; }
.hero-date-entry .field-help { margin: .5rem 0 0; font-size: .875rem; }
.hero-date-entry input[aria-invalid="true"] { border: 2px solid #a12e42; }
#metricListTitle { scroll-margin-top: 1.25rem; }
#metricItemDistance { display: none; } /* The date is already in the result heading. */
#todayForecast .chart-subtitle { max-width: 65ch; font-size: .9375rem; }
#todayForecast .birth-likely-message { margin: .75rem 0; padding: .75rem 0; background: none; border: 0; color: var(--public-muted); }
#todayForecast .birth-likely-message strong { font-weight: 400; }
#todayForecast .slider-card { margin: 0; padding: .75rem 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
#todayForecast .slider-card .card-title { font-size: 1rem; margin-bottom: .5rem; }
#todayForecast .slider-label { font-size: .875rem; }
#todayForecast .quick-jump-row { gap: .5rem; }
#todayForecast #selectedDateLabel { display: none; } /* Announced by forecastContext. */
#todayForecast #metricItemConditional { background: #f2f7fc; border-color: #c8dcef; box-shadow: none; }
#todayForecast #metricValueConditional { font-size: clamp(2rem, 5vw, 3rem); color: #245f96; background: none; border: 0; padding: 0; }
#todayForecast #dueCountdown { display: none; } /* The selected date and ET offset already appear above the answer. */
.additional-metrics { width: 100%; border-top: 1px solid var(--public-line); margin-top: .5rem; }
.additional-metrics summary, #calculatorSettings > summary { cursor: pointer; min-height: 44px; padding: .65rem 0; box-sizing: border-box; font-weight: 650; }
.additional-metrics .metric-item { margin-top: .75rem; box-shadow: none; }
#calculatorSettings { margin-top: 1rem; padding-block: .5rem; background: #fff; box-shadow: none; }
#calculatorSettings > summary { margin: 0; font-size: 1rem; }
.due-calendar-card { margin: 1rem 0; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .header .bf-landing-photo { display: none; }
  .header .hero-copy { text-align: left; max-width: none; }
  .header .hero-actions { justify-content: flex-start; }
  .header .title { max-width: 14ch; font-size: 2.65rem; }
  .header .subtitle { text-align: left; font-size: 1rem; }
  .header .hero-proof { display: none; }
  .header .share-top { display: none; }
  .header .top-bar { margin-bottom: 1.25rem; }
  #todayForecast .metric-item--probability { padding: 1rem; }
  #todayForecast #metricItemConditional { align-items: start; }
  #todayForecast #metricItemConditional .metric-visual { justify-content: space-between; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  color: var(--public-ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(112, 104, 232, 0.14), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(42, 155, 114, 0.1), transparent 24rem),
    #f5f6fb;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.app {
  width: min(1120px, calc(100% - 2rem));
  max-width: none;
  padding: 1rem 0 3.5rem;
}

.header {
  margin-bottom: 2rem;
  text-align: left;
}

.top-bar {
  justify-content: flex-end;
  margin-bottom: 2.1rem;
}

.public-brand {
  color: var(--public-ink);
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.top-actions,
.public-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-actions { flex-wrap: wrap; justify-content: flex-end; }

.public-nav a {
  padding: 0.65rem 0.8rem;
  color: var(--public-muted);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.public-nav a:hover { color: var(--public-lavender-dark); background: #ecebff; }

.language-toggle,
.mode-toggle {
  min-height: 46px;
  padding: 0.25rem;
  gap: 0.15rem;
  border: 1px solid rgba(207, 210, 230, 0.8);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.language-toggle button,
.mode-toggle button {
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  color: var(--public-muted);
  background: transparent;
  box-shadow: none;
}

.language-toggle button.active,
.mode-toggle button.active {
  color: var(--public-ink);
  background: #fff;
  box-shadow: 0 5px 14px rgba(43, 46, 82, 0.1);
}

button,
.hero-cta,
.share-primary.share-top {
  min-height: 46px;
  padding: 0.72rem 1.15rem;
  color: #fff;
  background: linear-gradient(135deg, var(--public-blue), var(--public-lavender));
  box-shadow: 0 8px 20px rgba(64, 91, 214, 0.2);
  font-weight: 750;
}

button:hover { filter: brightness(0.97); transform: translateY(-1px); }

button.ghost {
  color: var(--public-lavender-dark);
  border: 1px solid #cfd2e6;
  background: #fff;
  box-shadow: none;
}

.share-primary.share-top {
  min-height: 46px;
  padding-inline: 1.1rem;
}

.hero-grid {
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.hero-copy { max-width: 35rem; }

.eyebrow {
  padding: 0.4rem 0.75rem;
  color: var(--public-lavender-dark);
  background: rgba(112, 104, 232, 0.11);
}

.title {
  max-width: 11ch;
  color: var(--public-ink);
  font-size: clamp(2.45rem, 6vw, 4.65rem);
  font-weight: 850;
  letter-spacing: -0.055em;
}

.subtitle,
.hero-proof,
.field-help,
.chart-subtitle,
.metric-subtitle,
.small-note,
label {
  color: var(--public-muted);
}

.hero-visual img {
  border: 1px solid rgba(223, 226, 239, 0.9);
  border-radius: 1.75rem;
  box-shadow: var(--public-shadow);
}

.card {
  padding: clamp(1.2rem, 3vw, 1.75rem);
  border: 1px solid var(--public-line);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--public-shadow);
}

.control-card {
  border-color: rgba(112, 104, 232, 0.3);
  background:
    radial-gradient(circle at 100% 0%, rgba(112, 104, 232, 0.09), transparent 26rem),
    rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 58px rgba(64, 91, 214, 0.13);
}

.card-title {
  color: var(--public-ink);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

select,
input[type="date"],
input[type="number"],
input[type="text"] {
  min-height: 46px;
  padding: 0.65rem 0.8rem;
  color: var(--public-ink);
  border-color: #cfd2e6;
  border-radius: 0.8rem;
  background: #fff;
}

select:focus,
input:focus {
  border-color: var(--public-blue);
  box-shadow: 0 0 0 3px rgba(47, 118, 223, 0.16);
}

.optional-settings { border-color: var(--public-line); }
.optional-settings summary { color: var(--public-lavender-dark); }

.info-pill,
.share-due-chip {
  color: var(--public-muted);
  border: 1px solid var(--public-line);
  background: var(--public-soft);
}

.privacy-inline { color: var(--public-muted); }

.free-model-notice {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.8rem;
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  color: var(--public-ink);
  border: 1px solid rgba(112, 104, 232, 0.24);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(112, 104, 232, 0.09), rgba(47, 118, 223, 0.06));
}

.free-model-notice__icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--public-lavender);
  font-size: 0.9rem;
  font-weight: 850;
}

.free-model-notice h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  line-height: 1.35;
}

.free-model-notice p {
  margin: 0;
  color: var(--public-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.free-model-notice__upgrade {
  margin-top: 0.65rem !important;
}

.free-model-notice__upgrade a {
  display: inline-block;
  margin-top: 0.45rem;
  color: var(--public-lavender-dark);
  font-weight: 800;
  text-underline-offset: 0.2em;
}

.free-model-notice__upgrade a:hover {
  color: var(--public-blue);
}

/* Pro product preview styles are shared with Pro in pro-product.css. */

.forecast-context {
  color: var(--public-ink);
  border: 1px solid rgba(112, 104, 232, 0.14);
  background: linear-gradient(120deg, rgba(47, 118, 223, 0.08), rgba(42, 155, 114, 0.08));
}

.metric-item {
  border-color: var(--public-line);
  background: var(--public-surface);
  box-shadow: 0 8px 24px rgba(43, 46, 82, 0.06);
}

.metric-item[data-detail]:hover,
.metric-item.active {
  border-color: rgba(112, 104, 232, 0.38);
  box-shadow: 0 13px 30px rgba(43, 46, 82, 0.1);
}

.chart-wrapper {
  border-color: var(--public-line);
  background: var(--public-soft);
}

#slider::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--public-blue), var(--public-green));
}

#slider::-moz-range-track {
  background: linear-gradient(90deg, var(--public-blue), var(--public-green));
}

.calculation-guide p {
  color: var(--public-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.calculation-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.calculation-info-box {
  padding: 1.2rem;
  border: 1px solid var(--public-line);
  border-radius: 1rem;
  background: var(--public-soft);
}

.calculation-guide h3,
.calculation-guide h4 {
  margin: 0 0 0.65rem;
  color: var(--public-ink);
  font-size: 1.05rem;
  line-height: 1.45;
}

.calculation-info-box p,
.calculation-example-metric p { margin: 0; }

.calculation-example {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--public-line);
}

.calculation-example-metric strong {
  display: block;
  margin: 0.3rem 0 0.65rem;
  color: var(--public-ink);
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
}

.calculation-guide .calculation-boundary {
  margin-bottom: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--public-line);
}

.faq-card summary,
.faq-card details p { font-size: 1rem; line-height: 1.65; }

@media (max-width: 760px) {
  .calculation-guide-grid { grid-template-columns: 1fr; }
  .calculation-example-metric + .calculation-example-metric {
    padding-top: 1rem;
    border-top: 1px solid var(--public-line);
  }
}

.faq-card details,
.glossary-card details,
.optional-settings {
  border-color: var(--public-line);
}

.faq-card details p,
.glossary-card p,
.seo-card p,
.seo-list,
.scenario-desc {
  color: var(--public-muted);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline-color: rgba(47, 118, 223, 0.3);
}

@media (min-width: 768px) {
  .app { padding: 1rem 0 4rem; }
}

@media (max-width: 759px) {
  .top-bar {
    justify-content: space-between;
    margin-bottom: 1.35rem;
  }

  .top-actions { width: 100%; justify-content: center; }

  .hero-copy { text-align: center; }
  .title { margin-inline: auto; }
  .hero-actions { justify-content: center; }
}

@media (max-width: 560px) {
  .app { width: min(100% - 1rem, 1120px); }
  .header { margin-bottom: 1.35rem; }
  .top-bar { gap: 0.4rem; }
  .language-toggle button,
  .mode-toggle button { padding-inline: 0.65rem; }
  .share-primary.share-top { padding-inline: 0.85rem; }
  .title { font-size: clamp(2.35rem, 13vw, 3.3rem); }
  .card { border-radius: 1.1rem; }
  .hero-visual img { border-radius: 1.2rem; }

  .free-model-notice {
    position: relative;
    display: block;
  }

  .free-model-notice__icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
  }

  .free-model-notice h3 {
    min-height: 2rem;
    padding-left: 2.8rem;
  }

}
