/* =========================================================
   BellyDay — Kick counter / baby movement log
   Page-scoped additions only. Shared components live in assets/site.css.
   Loads after /assets/site.css.
   ========================================================= */

body.kc {
  /* Darker muted ink than the shared token: 10–12px hints must clear 4.5:1. */
  --ink-55: rgba(44, 27, 42, 0.68);
  background:
    radial-gradient(circle at 6% -8%, rgba(224, 138, 95, 0.14), transparent 42%),
    radial-gradient(circle at 100% 3%, rgba(184, 69, 95, 0.09), transparent 34%),
    var(--bone);
}

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

.crumbs {
  padding-top: 14px;
  font-size: 11.5px;
  color: var(--ink-55);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--ink-55);
}

.crumbs a { color: inherit; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current="page"] { color: var(--ink-70); }

/* ---------- Persistent safety strip (this page only) ----------
   Slim, non-dismissible, sticky under the masthead and above the H1. It is a
   single keyboard-focusable link to the full safety card. It never animates,
   never rotates and never disappears, and it is hidden in print. */

.kc-strip {
  position: sticky;
  top: 0;
  z-index: 30;
  display: block;
  background: var(--panel);
  color: var(--panel-ink);
  border-bottom: 2px solid var(--rose);
  text-decoration: none;
}

.kc-strip__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.kc-strip__msg { flex: 1 1 auto; }
.kc-strip__msg strong { color: var(--panel-rose); font-weight: 600; }

.kc-strip__cta {
  flex: none;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--panel-rose);
  color: var(--panel-ink);
  font-weight: 600;
  white-space: nowrap;
}

.kc-strip:hover { background: var(--panel-2); }

.kc-strip:focus-visible {
  outline: 3px solid var(--panel-rose);
  outline-offset: -3px;
}

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

.kc .hero {
  padding-top: clamp(22px, 3.4vw, 40px);
  padding-bottom: clamp(16px, 2.2vw, 26px);
}

.kc .hero h1 {
  max-width: 20ch;
  font-size: clamp(40px, 6.2vw, 68px);
}

.kc .hero__lede {
  max-width: 66ch;
}

.kc .hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 20px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--ink-55);
}

.kc .hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.kc .hero__meta span::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--apricot);
  border-radius: 50%;
}

/* ---------- Tool: single-column counter card ---------- */

.kc-tool {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
  margin-inline: auto;
  padding-top: clamp(10px, 1.6vw, 18px);
}

.kc-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 5px 5px 0 rgba(44, 27, 42, 0.09);
}

.kc-head__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.kc-head__sub {
  margin-top: 5px;
  color: var(--ink-70);
  font-size: 13.5px;
  line-height: 1.5;
}

/* Running total, e.g. "7 movements recorded". Never a denominator. */
.kc-count {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.kc-count[hidden] { display: none; }

.kc-empty {
  padding: 12px 14px;
  border-left: 2px solid var(--apricot);
  background: var(--apricot-soft);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-70);
}

.kc-empty[hidden] { display: none; }

/* ---------- The one primary button ---------- */

.kc-tap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 84px;
  margin-top: 2px;
  padding: 16px 20px;
  border: 1px solid var(--ink);
  background: var(--panel);
  color: var(--panel-ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.kc-tap:hover { background: var(--panel-2); }

.kc-tap:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.kc-tap__label { display: block; }

.kc-tap__note {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--panel-muted);
}

/* A brief pulse confirms the tap without any sound. */
.kc-tap.is-tapped { background: var(--rose); border-color: var(--rose-deep); }

/* ---------- Elapsed and session header ---------- */

.kc-elapsed {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--bone-deep);
}

.kc-elapsed[hidden] { display: none; }

.kc-elapsed__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.kc-elapsed__value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.kc-since {
  margin-top: -6px;
  font-size: 12.5px;
  color: var(--ink-55);
}

.kc-since[hidden] { display: none; }

/* ---------- Inline hint and notes ---------- */

.kc-hint {
  padding: 12px 14px;
  border-left: 3px solid #b06a1f;
  background: rgba(176, 106, 31, 0.1);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-70);
}

.kc-hint[hidden] { display: none; }

.kc-hint__text { margin: 0; }

.kc-hint__dismiss {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rose-deep);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* ---------- Vertical time list (a log, no denominator) ---------- */

.kc-times {
  max-height: 264px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
  counter-reset: kc-move;
}

.kc-times[hidden] { display: none; }

.kc-time {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 2px;
}

.kc-time + .kc-time { border-top: 1px dashed var(--line); }

.kc-time__n {
  flex: none;
  width: 2.2em;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-55);
}

.kc-time__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid transparent;
  background: none;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.kc-time__input:hover { border-color: var(--line); }
.kc-time__input:focus { border-color: var(--rose); outline: none; }

.kc-time__flag {
  flex: none;
  padding: 1px 6px;
  border: 1px solid #b06a1f;
  color: #8a4f14;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Secondary actions ---------- */

.kc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kc-panel .btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink-70);
}

.kc-panel .btn--ghost:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
}

/* ---------- Manual add ---------- */

.kc-editor {
  padding: 16px 18px;
  border: 1px solid var(--ink);
  background: var(--bone-deep);
}

.kc-editor[hidden] { display: none; }

.kc-editor h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.kc-editor .field { margin-top: 12px; }
.kc-editor .field > label { font-size: 12px; }
.kc-editor .field__control { background: var(--paper); }

.kc-editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.kc-editor .btn--primary {
  background: var(--panel);
  color: var(--panel-ink);
}

.kc-editor .btn--primary:hover { background: var(--panel-2); }

.kc-editor .btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink-70);
}

/* ---------- Notes, privacy, saving, vibrate ---------- */

.kc-noscript {
  padding: 10px 12px;
  border-left: 2px solid var(--rose);
  background: var(--rose-tint);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-70);
}

.kc-privacy {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-55);
}

.kc-privacy strong { color: var(--ink-70); }

.kc-save { margin-top: 2px; }

.kc-save__row,
.kc-vibrate {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-70);
  cursor: pointer;
}

.kc-save__row[hidden] { display: none; }
.kc-vibrate[hidden] { display: none; }

.kc-save__row input,
.kc-vibrate input {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--rose);
}

.kc-vibrate__note { color: var(--ink-55); }

.kc-saved {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
}

.kc-saved[hidden] { display: none; }

.kc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--sage);
  color: var(--sage);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.kc-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--sage);
  border-radius: 50%;
}

.kc-linkbtn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--rose-deep);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.kc-nosave {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-55);
}

.kc-nosave[hidden] { display: none; }

/* Delete session lives at the foot of the card, well away from the main button. */
.kc-delete {
  align-self: flex-start;
  margin-top: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--ink-55);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.kc-delete:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
}

.kc-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Safety card (static, always visible) ---------- */

.kc-safety__card {
  margin-top: 6px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--rose);
  scroll-margin-top: 64px;
}

.kc-safety__kicker {
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.kc-safety__headline {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.1vw, 31px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.kc-safety__lede {
  max-width: 64ch;
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-70);
}

.kc-safety__list {
  margin-top: 18px;
  padding-left: 22px;
  list-style: disc;
}

.kc-safety__list li {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-70);
}

.kc-safety__list li + li { margin-top: 8px; }

.kc-safety__close {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.kc-safety__note {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-55);
}

/* ---------- History ---------- */

.kc-history .section__head { max-width: 66ch; }

.kc-hist-empty {
  margin-top: 14px;
  padding: 18px 0;
  color: var(--ink-55);
  font-size: 14px;
}

.kc-hist-empty[hidden] { display: none; }

.kc-hist[hidden] { display: none; }

.kc-hist__group { margin-top: 24px; }

.kc-hist__date {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.kc-hist__group .table-wrap { margin-top: 10px; }

.kc-hist table td:first-child { font-variant-numeric: tabular-nums; }

.kc-hist__count { font-variant-numeric: tabular-nums; font-weight: 600; }

.kc-hist__flag {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 6px;
  border: 1px solid #b06a1f;
  color: #8a4f14;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.kc-hist__auto {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-55);
}

.kc-hist details summary {
  cursor: pointer;
  color: var(--rose-deep);
  font-size: 12.5px;
  font-weight: 600;
}

.kc-hist details[open] summary { margin-bottom: 6px; }

.kc-hist details p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-70);
  font-variant-numeric: tabular-nums;
}

/* ---------- Copy fallback ---------- */

.kc-copy-fallback {
  max-width: 720px;
  margin: 22px auto 0;
  padding: 16px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.kc-copy-fallback[hidden] { display: none; }

.kc-copy-fallback label {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

.kc-copy-fallback textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bone);
  font-size: 12.5px;
  line-height: 1.5;
  resize: vertical;
}

.kc-copy-fallback .btn { margin-top: 10px; }

/* ---------- Print header (screen-hidden) ---------- */

.kc-print-head { display: none; }

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

.kc-fig { margin: 22px 0 0; }

.kc-fig__scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
}

.kc-fig svg {
  display: block;
  width: 100%;
  min-width: 460px;
  height: auto;
}

.kc-fig figcaption {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-55);
}

.kc-fig__axis { stroke: var(--line-strong); stroke-width: 1.5; }
.kc-fig__rule { stroke: var(--line); stroke-width: 1; }
.kc-fig__tick { fill: var(--ink-55); font-size: 10px; font-family: var(--font-ui); }
.kc-fig__lane { fill: var(--ink); font-size: 11.5px; font-family: var(--font-ui); font-weight: 600; }
.kc-fig__dot { fill: var(--rose); }
.kc-fig__dot--b { fill: var(--apricot); }

.kc-table__close {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-70);
}

/* ---------- Sources, disclaimer, updated ---------- */

.kc .disclaimer { border-left-width: 3px; font-size: 12.5px; }

.updated {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-55);
}

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

@media (max-width: 760px) {
  .kc .hero { padding-top: 16px; padding-bottom: 16px; }
  .kc .hero h1 { margin-top: 10px; font-size: clamp(34px, 10vw, 48px); }
  .kc .hero__lede { margin-top: 10px; font-size: 14px; line-height: 1.5; }
  .kc .hero__meta { margin-top: 14px; }
  .kc-panel { gap: 12px; }
  .kc .panel { box-shadow: 6px 6px 0 var(--rose); }
  .kc-tap { min-height: 96px; }
  .kc-actions { flex-direction: column; }
  .kc-actions .btn { width: 100%; }
}

@media (max-width: 480px) {
  .kc .hero { padding-top: 12px; padding-bottom: 12px; }
  .kc .hero h1 { margin-top: 8px; font-size: clamp(30px, 9.4vw, 42px); }
  .kc .hero__lede { margin-top: 8px; font-size: 13.5px; line-height: 1.45; }
  .kc .hero__meta { margin-top: 11px; gap: 5px 14px; font-size: 12px; }
  .kc-panel { gap: 10px; padding: 18px; }
  .kc-strip__inner { font-size: 12px; min-height: 46px; }
  .kc-strip__cta { display: none; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .kc .btn,
  .kc .kc-tap,
}

/* ---------- Print: movement record ---------- */

@media print {
  .masthead,
  .crumbs,
  .kc-strip,
  .kc .hero__lede,
  .kc .hero__meta,
  .kc-tool,
  .reviewstrip,
  .kc .faq,
  .kc .section--hide-print,
  .kc-copy-fallback,
  .kc-hist-empty,
  .kc-hist__flag,
  .dock,
  .kc .footer,
  .skip,
  .noscript {
    display: none !important;
  }

  body.kc { background: #fff; padding: 0; }

  .wrap { width: 100%; }

  .kc .hero {
    padding: 0 0 8px;
    border-bottom: 1px solid #000;
  }

  .kc .hero h1 { font-size: 24pt; color: #000; }

  .kc-print-head {
    display: block;
    margin: 10px 0 0;
    font-size: 10.5pt;
    color: #000;
  }

  .kc-safety__card {
    margin-top: 16px;
    box-shadow: none;
    border-color: #000;
    page-break-inside: avoid;
  }

  .kc-safety__kicker { color: #000; }
  .kc-safety__note { color: #333; }

  .kc-history { padding-top: 18px; }
  .kc-hist__group { page-break-inside: avoid; }
  .kc-hist table { min-width: 0; }
  .kc-hist details { display: none; }
}
