/* ================================================================
   WHAT NUMBER HUMAN ARE YOU — Stylesheet
   Branding aligned with age-calculator, older-than-you,
   and birthday-population tools (same colour system throughout)
   All selectors scoped to #wnh-root to avoid WordPress conflicts
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── Reset ── */
#wnh-root *,
#wnh-root *::before,
#wnh-root *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Root / Variables ── */
#wnh-root {
  /* Shared brand palette — identical across all four tools */
  --bg:          #eef2f7;
  --card:        #ffffff;
  --border:      #b0c4de;
  --shadow:      0 2px 16px rgba(10,61,122,0.08);
  --shadow-lg:   0 8px 40px rgba(10,61,122,0.14);
  --blue-dark:   #0a3d7a;
  --blue-mid:    #1565c0;
  --blue-light:  #0288d1;
  --red:         #c62828;
  --teal:        #00897b;
  --orange:      #f57c00;
  --purple:      #7b1fa2;
  --slate:       #546e7a;
  --slate-light: #78909c;
  --navy:        #1a2332;
  --label:       #4a5568;
  --white:       #ffffff;
  --radius:      14px;
  --radius-sm:   9px;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', Arial, Helvetica, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', Courier, monospace;

  font-family: var(--font-body);
  color: var(--navy);
  background: var(--bg);
  padding: 20px 14px 36px;
  min-width: 280px;
  isolation: isolate;
}

/* ── Layout ── */
#wnh-root .wnh-wrap {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ══════════════════════════════
   HERO
══════════════════════════════ */
#wnh-root .wnh-hero {
  background: var(--blue-dark);
  border-radius: var(--radius);
  padding: 30px 28px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
#wnh-root .wnh-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 16%, rgba(255,255,255,0.07) 0%, transparent 50%),
    radial-gradient(circle at 8%  84%, rgba(2,136,209,0.18)   0%, transparent 48%);
  pointer-events: none;
}
#wnh-root .wnh-hero::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.09);
  box-shadow:
    0 0 0 38px rgba(255,255,255,0.03),
    0 0 0 76px rgba(255,255,255,0.015),
    0 0 0 114px rgba(255,255,255,0.008);
  pointer-events: none;
}
#wnh-root .wnh-hero-inner   { position: relative; z-index: 1; }
#wnh-root .wnh-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 8px;
}
#wnh-root .wnh-hero-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 28px);
  line-height: 1.2;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 10px;
}
#wnh-root .wnh-hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  font-weight: 300;
  max-width: 500px;
  line-height: 1.65;
}

/* ══════════════════════════════
   CARD BASE
══════════════════════════════ */
#wnh-root .wnh-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
#wnh-root .wnh-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 18px;
}

/* ══════════════════════════════
   FORM
══════════════════════════════ */
#wnh-root .wnh-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
#wnh-root .wnh-field { display: flex; flex-direction: column; gap: 5px; }
#wnh-root .wnh-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #2d3748;
}
#wnh-root .wnh-input,
#wnh-root .wnh-select {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  background: #f0f4f9;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
#wnh-root .wnh-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath fill='%232d3748' d='M6 7L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
#wnh-root .wnh-input:focus,
#wnh-root .wnh-select:focus {
  border-color: var(--blue-dark);
  box-shadow: 0 0 0 3px rgba(10,61,122,0.12);
  background: var(--white);
}
#wnh-root .wnh-input.wnh-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(198,40,40,0.10);
}
#wnh-root .wnh-err-msg {
  font-size: 11px;
  color: var(--red);
  font-weight: 700;
  min-height: 14px;
}

/* ── Primary button ── */
#wnh-root .wnh-btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  background: var(--blue-dark);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(10,61,122,0.28);
}
#wnh-root .wnh-btn:hover  { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(10,61,122,0.38); }
#wnh-root .wnh-btn:active { transform: translateY(0); }

/* ── Ghost button ── */
#wnh-root .wnh-btn-ghost {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-dark);
  background: transparent;
  border: 2px solid var(--blue-dark);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
#wnh-root .wnh-btn-ghost:hover { background: rgba(10,61,122,0.07); }

/* ══════════════════════════════
   RESULTS WRAPPER
══════════════════════════════ */
#wnh-root .wnh-result { display: none; flex-direction: column; gap: 18px; }
#wnh-root .wnh-result.wnh-visible { display: flex; }

/* ══════════════════════════════
   THRONE — The big serial number
══════════════════════════════ */
#wnh-root .wnh-throne {
  background: var(--blue-dark);
  border-radius: var(--radius);
  padding: 36px 28px 32px;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
#wnh-root .wnh-throne::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(255,255,255,0.10) 0%, transparent 60%),
    radial-gradient(circle at 15% 110%, rgba(2,136,209,0.16) 0%, transparent 50%);
  pointer-events: none;
}
#wnh-root .wnh-throne::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
#wnh-root .wnh-throne-inner      { position: relative; z-index: 1; }
#wnh-root .wnh-throne-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 14px;
}
#wnh-root .wnh-throne-number {
  font-family: var(--font-mono);
  font-size: clamp(26px, 6.5vw, 50px);
  font-weight: 500;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--white);
}
#wnh-root .wnh-throne-ordinal {
  font-family: var(--font-display);
  font-size: clamp(15px, 3vw, 21px);
  font-weight: 400;
  font-style: italic;
  color: rgba(255,255,255,0.90);
  margin-bottom: 10px;
}
#wnh-root .wnh-throne-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
}

/* ══════════════════════════════
   PAST / PRESENT / FUTURE TRIO
══════════════════════════════ */
#wnh-root .wnh-trio {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
#wnh-root .wnh-trio-card {
  border-radius: var(--radius);
  padding: 20px 16px 18px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#wnh-root .wnh-trio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.09) 0%, transparent 65%);
  pointer-events: none;
}
#wnh-root .wnh-trio-past    { background: var(--slate); }
#wnh-root .wnh-trio-present { background: var(--blue-dark); }
#wnh-root .wnh-trio-future  { background: var(--teal); }
#wnh-root .wnh-trio-era {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  position: relative;
  z-index: 1;
}
#wnh-root .wnh-trio-icon {
  font-size: 18px;
  line-height: 1;
  position: relative;
  z-index: 1;
  margin-bottom: 2px;
}
#wnh-root .wnh-trio-num {
  font-family: var(--font-mono);
  font-size: clamp(13px, 3vw, 20px);
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}
#wnh-root .wnh-trio-lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.78);
  font-weight: 300;
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

/* ══════════════════════════════
   STATS GRID
══════════════════════════════ */
#wnh-root .wnh-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
#wnh-root .wnh-stat {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
#wnh-root .wnh-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
#wnh-root .wnh-stat-bar {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
}
#wnh-root .wnh-stat:nth-child(1) .wnh-stat-bar { background: var(--blue-dark); }
#wnh-root .wnh-stat:nth-child(2) .wnh-stat-bar { background: var(--slate); }
#wnh-root .wnh-stat:nth-child(3) .wnh-stat-bar { background: var(--teal); }
#wnh-root .wnh-stat:nth-child(4) .wnh-stat-bar { background: var(--red); }
#wnh-root .wnh-stat:nth-child(5) .wnh-stat-bar { background: var(--orange); }
#wnh-root .wnh-stat:nth-child(6) .wnh-stat-bar { background: var(--purple); }
#wnh-root .wnh-stat-icon { font-size: 16px; margin-bottom: 4px; line-height: 1; display: block; }
#wnh-root .wnh-stat-val {
  font-family: var(--font-mono);
  font-size: clamp(12px, 2.5vw, 16px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  display: block;
}
#wnh-root .wnh-stat-lbl {
  font-size: 11px;
  color: var(--label);
  font-weight: 700;
  display: block;
}

/* ══════════════════════════════
   HUMAN TIMELINE CARD
══════════════════════════════ */
#wnh-root .wnh-timeline-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
#wnh-root .wnh-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
#wnh-root .wnh-section-title span { font-size: 16px; }

/* Stacked timeline bar */
#wnh-root .wnh-timeline-bar-outer {
  height: 32px;
  border-radius: 100px;
  background: #e0e8f0;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  position: relative;
  margin-bottom: 10px;
}
#wnh-root .wnh-tl-seg {
  height: 100%;
  transition: width 1.2s cubic-bezier(0.16,1,0.3,1);
  width: 0%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#wnh-root .wnh-tl-seg-past    { background: var(--slate); }
#wnh-root .wnh-tl-seg-present { background: var(--orange); min-width: 4px; }
#wnh-root .wnh-tl-seg-future  { background: var(--teal); }
#wnh-root .wnh-tl-seg-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
  padding: 0 8px;
  pointer-events: none;
}
#wnh-root .wnh-tl-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--label);
  font-weight: 700;
  margin-bottom: 18px;
}
#wnh-root .wnh-tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}
#wnh-root .wnh-dot-past   { background: var(--slate); }
#wnh-root .wnh-dot-you    { background: var(--orange); }
#wnh-root .wnh-dot-future { background: var(--teal); }

/* Era rows */
#wnh-root .wnh-eras { display: flex; flex-direction: column; gap: 8px; }
#wnh-root .wnh-era-row {
  display: grid;
  grid-template-columns: 130px 1fr 80px;
  align-items: center;
  gap: 10px;
}
#wnh-root .wnh-era-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}
#wnh-root .wnh-era-label.wnh-you { color: var(--orange); font-weight: 700; }
#wnh-root .wnh-era-track {
  background: #e0e8f0;
  border: 1px solid var(--border);
  border-radius: 100px;
  height: 7px;
  overflow: hidden;
}
#wnh-root .wnh-era-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1.2s cubic-bezier(0.16,1,0.3,1);
  width: 0%;
}
#wnh-root .wnh-era-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--label);
  font-weight: 700;
  text-align: right;
}

/* ══════════════════════════════
   CONTEXT CARD
══════════════════════════════ */
#wnh-root .wnh-context-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
#wnh-root .wnh-context-text {
  font-size: 14px;
  color: var(--label);
  line-height: 1.80;
}
#wnh-root .wnh-hl      { color: var(--blue-dark); font-weight: 700; }
#wnh-root .wnh-hl-past { color: var(--slate);     font-weight: 700; }
#wnh-root .wnh-hl-fut  { color: var(--teal);      font-weight: 700; }
#wnh-root .wnh-hl-org  { color: var(--orange);    font-weight: 700; }
#wnh-root .wnh-hl-red  { color: var(--red);       font-weight: 700; }

/* ══════════════════════════════
   PROJECTION PAIR
══════════════════════════════ */
#wnh-root .wnh-proj-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
#wnh-root .wnh-proj-box {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#wnh-root .wnh-proj-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #2d3748;
}
#wnh-root .wnh-proj-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
#wnh-root .wnh-proj-sub { font-size: 12px; color: var(--label); font-weight: 600; }

/* ══════════════════════════════
   ACTION ROW + FOOTNOTE
══════════════════════════════ */
#wnh-root .wnh-action-row { display: flex; gap: 10px; flex-wrap: wrap; }
#wnh-root .wnh-footnote {
  text-align: center;
  font-size: 12px;
  color: var(--label);
  font-weight: 600;
  line-height: 1.65;
}

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes wnh-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
#wnh-root .wnh-anim { animation: wnh-fade-up 0.55s cubic-bezier(0.16,1,0.3,1) both; }
#wnh-root .wnh-d1   { animation-delay: 0.05s; }
#wnh-root .wnh-d2   { animation-delay: 0.12s; }
#wnh-root .wnh-d3   { animation-delay: 0.19s; }
#wnh-root .wnh-d4   { animation-delay: 0.26s; }
#wnh-root .wnh-d5   { animation-delay: 0.33s; }
#wnh-root .wnh-d6   { animation-delay: 0.40s; }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 580px) {
  #wnh-root .wnh-card,
  #wnh-root .wnh-timeline-card,
  #wnh-root .wnh-context-card { padding: 20px 18px; }
  #wnh-root .wnh-hero    { padding: 28px 22px 24px; }
  #wnh-root .wnh-throne  { padding: 28px 20px 24px; }
  #wnh-root .wnh-fields  { grid-template-columns: 1fr 1fr; }
  #wnh-root .wnh-stats   { grid-template-columns: 1fr 1fr; }
  #wnh-root .wnh-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  #wnh-root .wnh-era-row { grid-template-columns: 100px 1fr 65px; }
}
@media (max-width: 420px) {
  #wnh-root .wnh-fields    { grid-template-columns: 1fr; }
  #wnh-root .wnh-stats     { grid-template-columns: 1fr; }
  #wnh-root .wnh-trio      { grid-template-columns: 1fr; }
  #wnh-root .wnh-proj-pair { grid-template-columns: 1fr; }
  #wnh-root .wnh-era-row   { grid-template-columns: 86px 1fr 55px; gap: 6px; }
}