/* =========================================================
   BellyDay — infant eye color predictor
   Page-scoped additions only. Shared components live in assets/site.css.
   Loads after /assets/site.css.
   ========================================================= */

body.eye {
  --ink-55: rgba(44, 27, 42, 0.66);
  background:
    radial-gradient(circle at 4% -6%, rgba(77, 107, 85, 0.08), transparent 34%),
    radial-gradient(circle at 98% 2%, rgba(224, 138, 95, 0.09), transparent 30%),
    var(--bone);
}

/* ---------- Breadcrumbs and hero ---------- */

.eye .crumbs { padding-top: 14px; font-size: 11.5px; color: var(--ink-55); }
.eye .crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; }
.eye .crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--ink-55); }
.eye .crumbs a { color: inherit; }
.eye .crumbs a:hover { color: var(--ink); }
.eye .crumbs [aria-current="page"] { color: var(--ink-70); }

.eye-hero { padding-top: clamp(8px, 1.5vw, 18px); padding-bottom: clamp(6px, 1vw, 12px); }
.eye .hero h1 { max-width: 26ch; font-size: clamp(30px, 4vw, 50px); line-height: 1.08; }
.eye .hero__lede { max-width: 82ch; margin-top: 6px; font-size: clamp(12px, 1.1vw, 14px); line-height: 1.4; }
.eye .hero__meta {
  display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 7px;
  font-size: 11px; color: var(--ink-55);
}
.eye .hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.eye .hero__meta span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--sage); }
.eye .hero__meta span:first-child::before { display: none; }

/* ---------- Tool card ---------- */

.eye-tool { grid-template-columns: minmax(0, 1fr); padding-bottom: 4px; }
.eye-panel { min-width: 0; border: 1px solid var(--line-strong); background: var(--paper); box-shadow: 5px 5px 0 var(--rose-tint); }
.eye-parents { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.eye-parent {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 38% 34%, #c99b74 0 26%, #6f4a37 27% 62%, #2b1d1a 63%);
}
.eye-parent:last-child { background: radial-gradient(circle at 38% 34%, #a8c3b0 0 26%, #5d8271 27% 62%, #24342b 63%); }
.eye-arrow { color: var(--rose-deep); font-size: 15px; }
.eye-panel > h2 {
  font-family: var(--font-display); font-size: clamp(18px, 1.9vw, 24px); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance;
}
.eye-noscript { margin-top: 7px; font-size: 10px; line-height: 1.4; color: var(--ink-55); }

.eye-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 11px; }
.eye-field { min-width: 0; }
.eye-field label { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 600; color: var(--ink-70); }
.eye-field select {
  width: 100%; min-width: 0; height: 36px; padding: 0 8px;
  border: 1px solid var(--line-strong); border-radius: 0; background: var(--paper);
  color: var(--ink); font: 500 12px/1 "Inter Tight", system-ui, sans-serif; cursor: pointer;
}
.eye-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.eye-panel .btn, .eye-panel button { min-height: 30px; padding: 0 11px; font-size: 11px; }

.eye-options { min-width: 0; margin-top: 9px; border-top: 1px solid var(--line); }
.eye-options > summary, .eye-how > summary {
  padding: 8px 0 2px; font-size: 11px; font-weight: 600; color: var(--ink-70); cursor: pointer;
}
.eye-options__body { padding-bottom: 2px; }
.eye-check { display: flex; align-items: center; gap: 6px; min-height: 26px; font-size: 10.5px; color: var(--ink-70); cursor: pointer; }
.eye-check input { margin: 0; accent-color: var(--rose-deep); }
.eye-check span { color: var(--ink-55); }
.eye-check input:disabled + span, .eye-check:has(input:disabled) { opacity: 0.62; cursor: not-allowed; }
.eye-options__note { margin-top: 4px; font-size: 9.5px; line-height: 1.35; color: var(--ink-55); }

.eye-chip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 8px; padding: 5px 8px; border: 1px solid var(--line); background: var(--bone);
  font-size: 10px; color: var(--ink-70);
}
.eye-chip button { min-height: 20px; padding: 0 7px; font-size: 9.5px; }

/* ---------- Caveat and circumstances: always visible, never collapsed ---------- */

.eye-sensitive, .eye-caveat {
  min-width: 0; margin-top: 8px; padding: 9px 11px;
  border: 1px solid var(--line); background: var(--paper);
}
.eye-sensitive { margin-top: 7px; background: rgba(255, 253, 248, 0.75); }
.eye-sensitive, .eye-caveat, .eye-privacy, .eye-options__note, .eye-note, .eye-summary,
.eye-empty, .eye-other-full, .eye-action-hint {
  font-size: 10px; line-height: 1.42; color: var(--ink-70);
}

/* ---------- Result ---------- */

.eye-empty { margin-top: 8px; min-height: 20px; padding: 8px 10px; border-left: 3px solid var(--apricot); background: var(--apricot-soft); }
.eye-other-full { margin-top: 6px; padding: 7px 10px; border-left: 3px solid var(--rose); background: var(--rose-tint); }
.eye-result { margin-top: 9px; padding-top: 4px; border-top: 1px solid var(--line); }
.eye-result h3 { font-family: var(--font-display); font-size: 13px; font-weight: 600; }
.eye-bars { margin-top: 6px; }
.eye-bar {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) 48px; align-items: center; gap: 8px;
  padding: 4px 0; border-bottom: 1px solid var(--line);
}
.eye-bar:last-child { border-bottom: 0; }
.eye-bar__label { font-size: 10.5px; font-weight: 600; color: var(--ink-70); }
.eye-bar__track { display: block; height: 9px; min-width: 0; background: var(--bone-deep); }
.eye-bar__fill { display: block; height: 100%; background: var(--sage); }
.eye-bar--brown .eye-bar__fill { background: #6f4a37; }
.eye-bar--hazel .eye-bar__fill { background: #9a7846; }
.eye-bar--green .eye-bar__fill { background: #4d6b55; }
.eye-bar--blue .eye-bar__fill { background: #5b7896; }
.eye-bar__value { text-align: right; font-size: 10.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.eye-summary { margin-top: 8px; font-weight: 600; }
.eye-notes { margin-top: 4px; }
.eye-note { margin-top: 3px; font-size: 9.5px; color: var(--ink-55); }
.eye-privacy { margin-top: 9px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 9.5px; color: var(--ink-55); }

.eye-how { min-width: 0; margin-top: 10px; border-top: 1px solid var(--line); }
.eye-how__body { padding-bottom: 2px; }
.eye-how__body p { margin-top: 5px; font-size: 10px; line-height: 1.45; color: var(--ink-70); }
.eye-table-scroll { overflow-x: auto; }
.eye-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.eye-table caption { padding: 6px 8px; text-align: left; font-size: 10px; font-weight: 600; background: var(--bone-deep); }
.eye-table th, .eye-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.eye-table thead th { font-size: 10px; color: var(--ink-70); background: rgba(255, 253, 248, 0.65); }
.eye-table tbody tr:last-child td { border-bottom: 0; }
.eye-table--compact { margin-top: 6px; font-size: 9.5px; }
.eye-override-notes { color: var(--rose-deep) !important; }

.eye-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.eye-action-hint { font-size: 9.5px; color: var(--ink-55); }

.eye-print { display: none; }

/* ---------- Pillar ---------- */

.eye .section__head { max-width: none; }
.eye .section h2 { font-size: clamp(22px, 2.4vw, 31px); line-height: 1.22; }
.eye .prose > p { margin-top: 12px; font-size: 13.5px; line-height: 1.68; color: var(--ink-70); }
.eye .prose > p:first-child { margin-top: 4px; }
.eye .prose .eye-table { margin: 14px 0; border: 1px solid var(--line); font-size: 12.5px; }
.eye .prose .eye-table caption { font-size: 11.5px; }
.eye .sources { padding-left: 1.3em; }
.eye .sources li { margin-top: 7px; font-size: 12.5px; line-height: 1.55; }
.eye .faq details > p { max-width: 82ch; }

/* ---------- Responsive ---------- */

@media (min-width: 901px) {
  .eye-tool { justify-items: center; }
  .eye-panel { max-width: 780px; }
  .eye .prose > p { max-width: 92ch; }
}

@media (max-width: 560px) {
  .eye .crumbs { padding-top: 8px; font-size: 10px; }
  .eye-hero { padding-top: 3px; padding-bottom: 3px; }
  .eye .hero h1 { font-size: 29px; }
  .eye .hero__lede { margin-top: 4px; font-size: 11.5px; line-height: 1.3; }
  .eye .hero__meta { display: none; }

  .eye-panel { box-shadow: 3px 3px 0 var(--rose-tint); }
  .eye-parents { gap: 7px; }
  .eye-parent { width: 22px; height: 22px; }
  .eye-panel > h2 { font-size: 14px; line-height: 1.15; }
  .eye-noscript { display: none; }
  .eye-controls { grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 7px; }
  .eye-field label { font-size: 10px; }
  .eye-field select { height: 32px; font-size: 11px; }
  .eye-panel .btn, .eye-panel button { min-height: 26px; padding: 0 8px; font-size: 10px; }
  .eye-options > summary, .eye-how > summary { padding: 6px 0 0; font-size: 10px; }
  .eye-sensitive, .eye-caveat { padding: 6px 8px; }
  .eye-sensitive, .eye-caveat, .eye-privacy, .eye-options__note, .eye-note, .eye-summary,
  .eye-empty, .eye-other-full, .eye-action-hint { font-size: 9px; line-height: 1.35; }
  .eye-bar { grid-template-columns: 48px minmax(0, 1fr) 42px; gap: 5px; }
  .eye-bar__label, .eye-bar__value { font-size: 9.5px; }
  .eye .section h2 { font-size: 21px; }
}

@media (max-width: 359px) {
  .eye-bar { grid-template-columns: 42px minmax(0, 1fr) 40px; gap: 4px; }
}

/* ---------- Print: caveat, estimates and sources only ---------- */

@media print {
  body.eye { background: #fff; }
  .masthead, .crumbs, .skip, .hero, .eye-tool, .section, .footer, .dock { display: none !important; }
  .eye-print { display: block; color: #000; font-size: 10pt; line-height: 1.5; }
  .eye-print p { margin-top: 4pt; }
}
