/* The home story continues the four real modules; hero, module cards and cabinet preview own their styles. */
body[data-home] :is(#hc-schedule, #hc-analytics, #calc, #prices, #faq, #home-sites) {
  --cd-booking: var(--module-booking, #ff8ad4);
  --cd-desk: var(--module-desk, #00d285);
  --cd-money: var(--module-money, #ffb800);
  --cd-growth: var(--module-growth, #9f85ff);
  --cd-detail: var(--cd-desk);
}
body[data-home] #hc-schedule {
  --cd-detail: var(--cd-booking);
  background: var(--hc-sheet);
  padding-block: clamp(28px, 4vw, 48px);
}
body[data-home] :is(#calc, #prices) { --cd-detail: var(--cd-money); }
body[data-home] #home-sites { --cd-detail: var(--cd-growth); }

/* A small square is the section's module marker, rather than another container around its copy. */
body[data-home] :is(#hc-schedule, #hc-analytics) .hc-kicker::before,
body[data-home] :is(#calc, #prices, #faq, #home-sites) .hp-sec-label::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  margin-inline-end: 8px;
  background: var(--cd-detail);
}
body[data-home] #hc-analytics { padding-block: clamp(40px, 5vw, 76px); }
body[data-home] #hc-analytics .hc-data-layout {
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
}
body[data-home] .hc-data-header .hc-section-title {
  max-width: 18ch;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.12;
}
body[data-home] #hc-after-hours {
  display: block;
  margin-block: 10px;
  font: 650 clamp(56px, 5.1vw, 80px)/1 var(--hc-mono);
  letter-spacing: -.065em;
  color: #295c45;
}
body[data-home] .hc-sample-size { margin: 12px 0 0; color: var(--hc-muted); }
body[data-home] #hc-analytics .hc-hourly-wrap { min-width: 0; margin: 0; padding: 0; border: 0; }
body[data-home] .hc-hourly-head { align-items: baseline; }
body[data-home] .hc-hourly-head > strong { font-size: 17px; }
body[data-home] .hc-legend-inline span:first-child::before { background: #295c45; }
body[data-home] .hc-legend-inline span:last-child::before { background: #87928a; }
body[data-home] .hc-sample-details {
  margin-top: clamp(24px, 3vw, 42px);
  border-block: 1px solid var(--hc-hair-strong);
}
body[data-home] .hc-sample-details > summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 52px; padding: 10px 2px; cursor: pointer;
  font-weight: 650; list-style: none;
}
body[data-home] .hc-sample-details > summary::-webkit-details-marker { display: none; }
body[data-home] .hc-sample-details > summary::after { content: "+" / ""; font: 20px/1 var(--hc-mono); }
body[data-home] .hc-sample-details[open] > summary::after { content: "−" / ""; }
body[data-home] #hc-analytics .hc-viz-panel {
  max-width: 760px;
  margin: 4px auto 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  background: #f5f7f5;
  border: 1px solid #d5ddd7;
  padding: clamp(14px, 2vw, 26px);
}
body[data-home] #hc-analytics .hc-viz-topbar { margin: 0; padding: 0; border: 0; }
body[data-home] #hc-analytics .hc-viz-title { margin: 0; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.25; }
body[data-home] #hc-matrix-labels text { font-size: 14px; }
body[data-home] .hc-matrix-hint { margin: 0; font-size: 14px; color: var(--hc-muted); }
@media (hover: none) {
  body[data-home] .hc-hover-hint { display: none; }
}
body[data-home]:not([data-hc-ready]) .hc-matrix-hint { display: none; }
body[data-home] #hc-analytics .hc-record-inspector {
  margin: auto 0 0;
  padding: 14px 16px;
  gap: 8px;
  background: #183329;
  color: #fff;
  border: 0;
  border-radius: 8px;
}
body[data-home] #hc-record-mode {
  font: 600 12px/1.4 var(--hc-mono);
  color: #dae7d6;
}
body[data-home] #hc-analytics .hc-record-desc { min-block-size: 2.9em; align-content: center; color: #dce9e0; }
body[data-home] #hc-analytics :is(.hc-record-price, .hc-record-desc b, .hc-record-picker-wrap) { color: #fff; }
body[data-home] #hc-analytics .hc-record-badge {
  justify-self: start;
  border: 0;
  border-radius: 4px;
  background: var(--hc-lime);
  color: #141815;
}
body[data-home] #hc-analytics .hc-record-inspector[data-preview] .hc-record-badge { background: #fff; }
body[data-home] #hc-analytics .hc-record-controls {
  border-color: #50665a;
  grid-template-columns: 44px auto 44px;
  justify-content: start;
}
@media (min-width: 641px) {
  body[data-home] .hc-record-controls { order: 1; }
}
@media (max-width: 640px) {
  body[data-home] #hc-analytics .hc-record-controls {
    padding-block: 0 10px;
    border-top: 0;
    border-bottom: 1px solid #50665a;
  }
}
body[data-home] .hc-touch-note {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  padding: 6px 9px;
  max-width: 100%;
  border-radius: 4px;
  background: #183329;
  color: #fff;
  font: 600 12px/1.4 var(--hc-mono);
  white-space: nowrap;
}
body[data-home] .hc-touch-note[hidden] { display: none; }
body[data-home] #hc-analytics .hc-record-controls :focus-visible { outline-color: var(--hc-lime); }
body[data-home] #hc-analytics .hc-badge-demo {
  border: 0;
  border-radius: 4px;
  background: var(--cd-desk);
  color: #141815;
}
@media (max-width: 820px) {
  body[data-home] #hc-analytics .hc-data-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 720px) {
  body[data-home] #hc-analytics .hc-viz-topbar { align-items: flex-start; flex-direction: column; }
  body[data-home] #hc-analytics .hc-record-inspector { padding: 12px; }
}

/* Cost and return retain their existing arithmetic and strip units. */
body[data-home] #calc .hc-calc-card { box-shadow: none; }
body[data-home] #calc .calc-result {
  border: 0;
  background: #141815;
  box-shadow: none;
}
body[data-home] #calc #c-total { color: var(--cd-desk); }
body[data-home] #calc .hc-payback-unit[data-state="cost"] { background: var(--cd-money); }
body[data-home] #calc .hc-payback-unit[data-state="profit"] { background: var(--cd-desk); }
body[data-home] #calc .hc-calc-footer .btn { min-height: 44px; }
body[data-home] #calc .hc-calc-notes[open] { border-top-color: var(--cd-money); }
body[data-home] #calc .hc-calc-notes[open] > summary {
  text-decoration: underline;
  text-decoration-color: var(--cd-money);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* A shared money rail ties the plan comparison together without adding a different module to each price. */
body[data-home] #prices .plan {
  border-color: transparent;
  border-top: 4px solid var(--cd-money);
  box-shadow: none;
}
body[data-home] #prices .plan.recommended {
  border-color: #141815;
  border-top-color: var(--cd-money);
  background: #141815;
  box-shadow: none;
}
body[data-home] #prices .plan-trial {
  border-radius: 4px;
  background: var(--cd-money);
  color: #141815;
}
body[data-home] #prices .hc-billing-button[aria-pressed="true"] {
  box-shadow: inset 0 -3px var(--cd-money);
}

/* The whole native summary remains the target; the small square is only its open/close indicator. */
body[data-home] #faq summary::after {
  content: "+" / "";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: 500 18px/1 var(--mono);
}
body[data-home] #faq details[open] > summary::after {
  content: "−" / "";
  background: var(--cd-desk);
  color: #141815;
}
body[data-home] #home-sites .ws-window { border-radius: 12px; box-shadow: none; }
body[data-home] #home-sites .ws-browser i { width: 4px; height: 4px; border-radius: 0; background: var(--cd-growth); }
body[data-home] #home-sites .ws-tab:is([aria-selected="true"], [aria-current="page"]) {
  border-bottom-width: 4px;
  border-bottom-color: var(--ink);
  background: color-mix(in srgb, var(--cd-growth) 12%, transparent);
}
body[data-home] #home-sites .ws-caption { border-top: 0; }

/* Motion answers a selection or a disclosure. Nothing loops or moves an entire card. */
@media screen and (prefers-reduced-motion: no-preference) and (scripting: enabled) {
  body[data-home][data-hc-ready="true"]:not([data-hp-static-fx]):not([data-hc-static-fx]) #faq details[open] > :not(summary),
  body[data-home][data-hc-ready="true"]:not([data-hp-static-fx]):not([data-hc-static-fx]) #calc .hc-calc-notes[open] > :not(summary) {
    animation: cd-answer 160ms ease-out both;
  }
  body[data-home][data-hc-ready="true"]:not([data-hp-static-fx]):not([data-hc-static-fx]) #prices .hc-billing-button,
  body[data-home][data-hc-ready="true"]:not([data-hp-static-fx]):not([data-hc-static-fx]) #faq summary::after {
    transition: background-color 140ms ease-out, color 140ms ease-out, border-color 140ms ease-out;
  }
  body[data-home][data-hc-ready="true"]:not([data-hp-static-fx]):not([data-hc-static-fx]) #home-sites .ws-open span {
    transition: transform 140ms ease-out;
  }
  body[data-home][data-hc-ready="true"]:not([data-hp-static-fx]):not([data-hc-static-fx]) #home-sites .ws-open:is(:hover, :focus-visible) span {
    transform: translateX(2px);
  }
}
@keyframes cd-answer { from { opacity: .45; } to { opacity: 1; } }
@media print {
  body[data-home] #calc .calc-result,
  body[data-home] #prices .plan.recommended {
    background: #fff;
    color: #141815;
    box-shadow: none;
  }
  body[data-home] #calc .calc-result *,
  body[data-home] #prices .plan.recommended * { color: #141815 !important; }
  body[data-home] :is(#hc-schedule, #hc-analytics) .hc-kicker::before,
  body[data-home] :is(#calc, #prices, #faq, #home-sites) .hp-sec-label::before { display: none; }
  body[data-home] #faq details[open] > :not(summary),
  body[data-home] #calc .hc-calc-notes[open] > :not(summary) { animation: none; }
}
