/* Homepage + calculator (Phase 1B). Plain CSS because tailwind.css is precompiled. */
:root {
  --h-navy: #010e19;
  --h-navy-2: #1a2332;
  --h-accent: #ffa000;
  --h-accent-2: #ff8f00;
  --h-accent-soft: #fff4dc;
  --h-text: #1f2933;
  --h-muted: #5b6672;
  --h-border: #e5e7eb;
  --h-soft: #f7f8fa;
  --h-link: #b45f00;
  --h-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Compact hero: H1 + one sentence, calculator right after ---------- */
.hm-hero { background: linear-gradient(135deg, var(--h-navy), var(--h-navy-2)); color: #fff; padding: 1.75rem 1rem 5.5rem; text-align: center; }
.hm-hero h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); line-height: 1.15; margin: 0 auto .6rem; max-width: 20ch; padding: 0; }
.hm-hero p { font: 400 clamp(1rem, .95rem + .3vw, 1.15rem)/1.5 var(--h-font); color: #cfd6dd; margin: 0 auto; max-width: 52ch; }
@media (min-width: 768px) { .hm-hero { padding: 2.75rem 1rem 6.5rem; } }

/* ---------- Calculator card ---------- */
.ct-section { max-width: 980px; margin: -4.5rem auto 0; padding: 0 1rem 2.5rem; position: relative; font-family: var(--h-font); }
.ct-card { display: grid; grid-template-columns: minmax(0, 1fr); background: #fff; border: 1px solid var(--h-border); border-radius: 18px;
  box-shadow: 0 18px 40px rgba(1, 14, 25, .12); overflow: hidden; }
@media (min-width: 860px) { .ct-card { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.ct-form { padding: 1.25rem; display: flex; flex-direction: column; gap: 1.1rem; }
@media (min-width: 768px) { .ct-form { padding: 1.75rem; } }

.ct-modes { display: flex; flex-direction: column; gap: .45rem; }
.ct-modes-label, .ct-legend { font-size: .95rem; font-weight: 650; color: var(--h-navy); padding: 0; margin: 0 0 .1rem; }
.ct-toggle { display: grid; grid-template-columns: 1fr 1fr; background: var(--h-soft); border: 1px solid var(--h-border); border-radius: 12px; padding: 4px; }
.ct-toggle button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--h-muted); font: 600 .95rem var(--h-font); cursor: pointer; }
.ct-toggle button.is-active { background: #fff; color: var(--h-navy); box-shadow: 0 1px 3px rgba(1, 14, 25, .15); }
.ct-toggle button:focus-visible { outline: 2px solid var(--h-accent); outline-offset: 2px; }

.ct-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ct-hint { font-size: .85rem; color: var(--h-muted); margin: 0 0 .4rem; line-height: 1.4; }
.ct-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.ct-field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.ct-unit { font-size: .8rem; color: var(--h-muted); }
.ct-input { width: 100%; min-height: 48px; border: 2px solid var(--h-border); border-radius: 10px; padding: 0 .75rem; font: 500 1.05rem var(--h-font);
  color: var(--h-navy); background: #fff; -moz-appearance: textfield; }
.ct-input::-webkit-outer-spin-button, .ct-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ct-input:focus { outline: none; border-color: var(--h-accent); box-shadow: 0 0 0 3px rgba(255, 160, 0, .2); }
.ct-speed { display: flex; flex-direction: column; gap: .35rem; }
.ct-select { max-width: 160px; cursor: pointer; }
.ct-check { display: flex; gap: .55rem; align-items: center; font-size: .9rem; color: var(--h-text); min-height: 44px; cursor: pointer; }
.ct-check input { width: 20px; height: 20px; accent-color: var(--h-accent); }

.ct-actions { display: flex; gap: .6rem; margin-top: .2rem; }
.ct-btn { min-height: 50px; border-radius: 12px; font: 700 1rem var(--h-font); cursor: pointer; padding: 0 1.2rem; }
.ct-btn-primary { flex: 1; border: 0; background: var(--h-accent); color: var(--h-navy); }
.ct-btn-primary:hover { background: var(--h-accent-2); }
.ct-btn-ghost { border: 2px solid var(--h-border); background: #fff; color: var(--h-navy); }
.ct-btn:focus-visible { outline: 2px solid var(--h-navy); outline-offset: 2px; }

.ct-result { background: var(--h-navy); color: #fff; padding: 1.5rem 1.25rem; display: flex; flex-direction: column; justify-content: center; gap: 1rem;
  scroll-margin-top: 110px; min-height: 220px; }
@media (min-width: 768px) { .ct-result { padding: 1.75rem; } }
.ct-empty { text-align: center; color: #aeb8c2; }
.ct-empty .ct-empty-big { font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); font-weight: 800; color: #3a4757; margin: 0 0 .4rem; line-height: 1; }
.ct-empty p { margin: 0; line-height: 1.5; font-size: .95rem; }
.ct-percent { margin: 0; font-size: clamp(2.75rem, 2.2rem + 2.4vw, 4rem); font-weight: 800; line-height: 1; color: var(--h-accent); text-align: center; }
.ct-percent span { display: block; font-size: 1rem; font-weight: 500; color: #cfd6dd; margin-top: .45rem; }
.ct-bar { height: 12px; background: #24313f; border-radius: 99px; overflow: hidden; }
.ct-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--h-accent), var(--h-accent-2)); border-radius: 99px; transition: width .6s ease-out; }
.ct-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin: 0; }
.ct-stats div { background: #0d1b29; border: 1px solid #22303e; border-radius: 12px; padding: .75rem .8rem; }
.ct-stats dt { font-size: .78rem; color: #aeb8c2; margin: 0 0 .2rem; }
.ct-stats dd { margin: 0; font-size: 1.1rem; font-weight: 700; color: #fff; }
.ct-error { margin: 0; background: #3a1c1a; border: 1px solid #f08079; color: #ffd9d6; border-radius: 12px; padding: .9rem 1rem; line-height: 1.5; font-size: .95rem; }
.ct-privacy { text-align: center; font-size: .85rem; color: var(--h-muted); margin: .9rem 0 0; }

/* ---------- Content sections ---------- */
.hm-section { padding: 3rem 1rem; font-family: var(--h-font); color: var(--h-text); }
.hm-section.is-soft { background: var(--h-soft); }
.hm-inner { max-width: 760px; margin: 0 auto; }
.hm-section h2 { font-family: var(--h-font); font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); line-height: 1.2; color: var(--h-navy); margin: 0 0 .9rem; padding: 0; }
.hm-section h3 { font-family: var(--h-font); font-size: 1.15rem; color: var(--h-navy); margin: 1.6rem 0 .4rem; padding: 0; }
.hm-section p { font-size: 1.0625rem; line-height: 1.7; margin: 0 0 1rem; }
.hm-section a { color: var(--h-link); text-decoration: underline; text-underline-offset: 3px; }
.hm-formula { background: var(--h-accent-soft); border: 1px solid #ffe2a8; border-radius: 12px; padding: .9rem 1.1rem; font-weight: 650; color: var(--h-navy); margin: 0 0 1rem; }
.hm-steps { margin: 0 0 1rem; padding-left: 1.3rem; line-height: 1.7; font-size: 1.0625rem; }
.hm-steps li { margin: .3rem 0; }
.hm-steps li::marker { color: var(--h-accent-2); font-weight: 700; }
.hm-uses { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 1.2rem 0 0; padding: 0; list-style: none; }
.hm-uses li { background: #fff; border: 1px solid var(--h-border); border-radius: 14px; padding: 1rem 1.1rem; }
.hm-uses h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.hm-uses p { font-size: .975rem; line-height: 1.6; margin: 0; color: var(--h-text); }

/* ---------- FAQ (answers are in the HTML) ---------- */
.hm-faq { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.2rem; }
.hm-faq details { background: #fff; border: 1px solid var(--h-border); border-radius: 12px; }
.hm-faq summary { list-style: none; cursor: pointer; padding: 1rem 2.6rem 1rem 1.1rem; position: relative; background: none; color: var(--h-navy); margin: 0; }
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::marker { content: ""; }
.hm-faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--h-muted); }
.hm-faq details[open] summary::after { content: "−"; }
.hm-faq summary h3 { display: inline; font-size: 1.02rem; margin: 0; padding: 0; line-height: 1.45; }
.hm-faq details p { padding: 0 1.1rem 1rem; margin: 0; font-size: 1rem; line-height: 1.65; color: var(--h-text); background: none; border: 0; }
