/* =========================================================
   BellyDay — hCG doubling calculator
   Page-scoped additions only. Shared components live in assets/site.css.
   Loads after /assets/site.css.
   ========================================================= */

body.hcg {
  --ink-55: rgba(44, 27, 42, 0.68);
  background:
    radial-gradient(circle at 5% -8%, rgba(224, 138, 95, 0.12), transparent 42%),
    radial-gradient(circle at 100% 2%, rgba(184, 69, 95, 0.08), transparent 34%),
    var(--bone);
}

/* ---------- Breadcrumbs ---------- */

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

/* ---------- Hero ---------- */

.hcg .hero { padding-top: clamp(16px, 2.4vw, 30px); padding-bottom: clamp(12px, 1.8vw, 20px); }
.hcg .hero h1 { max-width: 20ch; font-size: clamp(36px, 5.4vw, 60px); }
.hcg .hero__lede { max-width: 72ch; font-size: clamp(14px, 1.4vw, 16px); }
.hcg .hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-55);
}
.hcg .hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.hcg .hero__meta span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--apricot); }
.hcg .hero__meta span:first-child::before { display: none; }
.hcg .hero__meta time { font-variant-numeric: tabular-nums; }

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

.hcg-tool { padding-bottom: 8px; grid-template-columns: minmax(0, 1fr); }
.hcg-panel {
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--rose-tint);
  overflow: hidden;
}
.hcg-card { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); }
.hcg-card__col { min-width: 0; padding: clamp(18px, 2.4vw, 30px); }
.hcg-card__col--input { background: var(--paper); border-right: 1px solid var(--line); }
.hcg-card__col--output { background: var(--bone); }

.hcg-kicker,
.hcg-output__label {
  margin-bottom: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.hcg-output__label { color: var(--ink-55); }

.hcg-head__title { font-family: var(--font-display); font-size: clamp(21px, 2.4vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.hcg-head__sub { margin-top: 5px; max-width: 64ch; font-size: 13px; color: var(--ink-70); }

.hcg-groups { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
.hcg-group { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); background: rgba(255, 253, 248, 0.72); }
.hcg-group legend { padding: 0 5px; font-size: 12px; font-weight: 600; color: var(--ink-70); }
.hcg-group .field + .hcg-pair { margin-top: 10px; }
.hcg-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hcg-pair .field__control { height: 44px; }
.hcg-pair .field__control input { padding: 0 9px; }
.hcg-group > .field__hint { margin-top: 7px; }
.hcg-group .field__hint { font-size: 11.5px; }

.hcg-err-interval { margin-top: 10px; }
.hcg-actions { display: flex; margin-top: 14px; }
.hcg-actions .btn { min-height: 42px; }

/* ---------- Result and static safety blocks ---------- */

.hcg-empty {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--apricot);
  background: var(--apricot-soft);
  font-size: 13px;
  color: var(--ink-70);
}
.hcg-result { margin-top: 14px; }
.hcg-lines { display: grid; gap: 4px; }
.hcg-line { font-size: 13.5px; line-height: 1.5; }
.hcg-line--lead {
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  background: var(--rose-tint);
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.hcg-safety,
.hcg-cannot,
.hcg-reference,
.hcg-samelab,
.hcg-nice {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}
.hcg-safety { border-left: 4px solid var(--rose); background: #fffdf8; }
.hcg-safety h3,
.hcg-cannot h3,
.hcg-reference h3,
.hcg-samelab h3,
.hcg-nice h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.hcg-safety p,
.hcg-cannot p,
.hcg-reference p,
.hcg-samelab p,
.hcg-nice p { margin-top: 5px; font-size: 12.5px; line-height: 1.6; color: var(--ink-70); }

.hcg-nice-replacement,
.hcg-short-note {
  margin-top: 10px;
  padding: 9px 12px;
  border-left: 3px solid var(--rose);
  background: var(--rose-tint);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-70);
}
.hcg-privacy { margin-top: 12px; font-size: 12px; color: var(--ink-55); }
.hcg-noscript {
  margin-top: 12px;
  padding: 9px 12px;
  border-left: 3px solid var(--rose);
  background: var(--rose-tint);
  font-size: 12.5px;
}

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

.hcg .section__head { max-width: none; }
.hcg .section h2 { font-size: clamp(24px, 2.6vw, 34px); }
.hcg .section__lede { max-width: 74ch; }
.hcg-line--lead { text-wrap: balance; }

.hcg-table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); }
.hcg-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.hcg-table caption { padding: 9px 12px; text-align: left; font-weight: 600; background: var(--bone-deep); }
.hcg-table th, .hcg-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.hcg-table thead th { font-size: 12px; color: var(--ink-70); background: rgba(255, 253, 248, 0.6); }
.hcg-table tbody tr:last-child td { border-bottom: 0; }
.hcg-quote {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--rose);
  background: var(--paper);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
}
.prose .sources { padding-left: 1.3em; }
.prose .sources li { margin-top: 7px; font-size: 13px; line-height: 1.55; }

/* ---------- Print-only summary ---------- */

.hcg-print { display: none; }

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .hcg-card { grid-template-columns: minmax(0, 1fr); }
  .hcg-card__col--input { border-right: 0; border-bottom: 1px solid var(--line); }
  .hcg-card__col--output { background: var(--paper); }
}

@media (max-width: 760px) {
  .hcg-groups { gap: 12px; }
}

/* The first input and first result line must be visible at 390×844. Keep the
   hero short, hide repeated help text visually, and keep the two fieldsets
   side by side at phone width. */
@media (max-width: 560px) {
  .hcg .crumbs { padding-top: 9px; }
  .hcg .hero { padding-top: 8px; padding-bottom: 6px; }
  .hcg .hero h1 { font-size: 31px; line-height: 1.1; }
  .hcg .hero__lede { margin-top: 8px; font-size: 12.5px; line-height: 1.4; }
  .hcg .hero__meta { margin-top: 6px; gap: 3px 9px; font-size: 10.5px; }
  .hcg .hero__meta span::before { display: none; }

  .hcg-panel { box-shadow: 4px 4px 0 var(--rose-tint); }
  .hcg-card__col { padding: 11px; }
  .hcg-kicker, .hcg-output__label { display: none; }
  .hcg-head__title { font-size: 19px; }
  .hcg .section h2 { font-size: 22px; }
  .hcg-head__sub { display: none; }

  .hcg-groups { grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
  .hcg-group { padding: 8px; }
  .hcg-group legend { font-size: 11px; padding: 0 3px; }
  .hcg-group label { font-size: 11.5px; }
  .hcg-group .field__control,
  .hcg-pair .field__control { height: 40px; }
  .hcg-pair { grid-template-columns: 1fr 1fr; gap: 5px; }
  .hcg-pair .field__control input { padding: 0 5px; font-size: 12px; }
  .hcg-group > .field__hint,
  .hcg-group .field__hint {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .hcg-group .field__error,
  .hcg-err-interval { font-size: 10.5px; line-height: 1.35; }
  .hcg-actions { margin-top: 8px; }
  .hcg-actions .btn { min-height: 38px; padding: 0 16px; }

  .hcg-empty { margin-top: 10px; padding: 8px 10px; font-size: 12px; }
  .hcg-result { margin-top: 8px; }
  .hcg-line--lead { padding: 8px 10px; font-size: 16px; }
  .hcg-safety, .hcg-cannot, .hcg-reference, .hcg-samelab, .hcg-nice { padding: 10px 11px; }
}

/* ---------- Print: result, reference, safety and caveats only ---------- */

@media print {
  body.hcg { background: #fff; }
  .masthead, .crumbs, .skip, .reviewstrip, .hcg-tool, .faq,
  .footer, .dock, .section--hide-print { display: none !important; }
  #main { padding-top: 0; }
  .hcg-print {
    display: block;
    color: #000;
    font-size: 12pt;
    line-height: 1.45;
  }
  .hcg-print h2 { font-family: Georgia, serif; font-size: 18pt; margin-bottom: 10pt; }
  .hcg-print p { margin: 0 0 6pt; }
  .hcg-print .hcg-print__label { font-weight: bold; }
}
