/* Public study-time estimator. It follows the homepage's linen and petrol theme. */
.homepage .target-estimator-section {
  padding-block: clamp(48px, 7vw, 84px);
  border-bottom: 1px solid var(--clinic-border);
  background: transparent;
}

.homepage .target-estimator-heading { margin-bottom: 8px; }
.homepage .target-estimator-heading h2 { max-width: 24ch; }
.homepage .target-estimator-heading > p:last-child { max-width: 62ch; }
.homepage .target-estimator { grid-column: 1 / -1; min-width: 0; }

/* Consistent 5px corners for the estimator's rectangular controls and panels. */
.homepage .te-inputs,
.homepage .te-field select,
.homepage .te-roadmap,
.homepage .te-week-total,
.homepage .te-band-label,
.homepage .te-phase-copy small,
.homepage .te-effort,
.homepage .te-conversion,
.homepage .te-cta {
  border-radius: 5px;
}

.te-copy-en { display: none; }
html[lang="en"] .te-copy-fa { display: none !important; }
html[lang="en"] .te-copy-en { display: inline; }

.homepage .te-inputs,
.homepage .te-roadmap,
.homepage .te-effort,
.homepage .te-conversion {
  min-width: 0;
  border: 1px solid rgba(7, 58, 59, .2);
  background: #fffdf7;
  color: var(--clinic-ink);
}

.homepage .te-inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 16px;
  padding: clamp(16px, 2.5vw, 24px);
}

.homepage .te-field { grid-column: span 3; display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.homepage .te-field > span { color: var(--clinic-ink); font-size: .875rem; font-weight: 700; line-height: 1.5; }
.homepage .te-field select {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #9ca9a1;
  border-radius: 5px;
  background: #f0f1ed;
  color: var(--clinic-ink);
  font: inherit;
  font-size: .9375rem;
  box-shadow: inset 0 2px 3px rgba(32, 43, 38, .12), 0 1px 0 rgba(255, 255, 255, .85);
}
.homepage .te-field select:focus-visible { outline: 3px solid var(--clinic-amber); outline-offset: 2px; }
.homepage .te-field select option:disabled { color: #818781; }

.homepage .te-roadmap { padding: clamp(18px, 3vw, 28px); }
.homepage .te-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.homepage .te-result-heading h3,
.homepage .te-effort h3 { margin: 0; color: var(--clinic-ink); font-size: clamp(1.125rem, 2vw, 1.375rem); font-weight: 750; line-height: 1.45; }
.homepage .te-week-total { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border: 1px solid rgba(42, 157, 143, .3); background: #e8f5f1; color: #075b53; font-size: .875rem; white-space: nowrap; }
.homepage .te-week-total b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.homepage .te-track-wrap { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 22px 0 10px; }
.homepage .te-band-label { position: relative; z-index: 1; display: flex; min-width: 62px; flex-direction: column; align-items: center; gap: 3px; padding: 8px 10px; border: 1px solid #cbd5d1; background: #f1f3ef; color: var(--clinic-ink); }
.homepage .te-band-label small { color: #56645d; font-size: .6875rem; }
.homepage .te-band-label b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.homepage .te-band-end { border-color: #2a9d8f; background: #e8f5f1; color: #075b53; }
.homepage .te-phases { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; }
.homepage .te-phases::before { position: absolute; top: 18px; right: 0; left: 0; border-top: 2px dashed #7ebdb3; content: ""; }
.homepage .te-phase { position: relative; z-index: 1; display: flex; min-width: 0; flex-direction: column; align-items: center; text-align: center; }
.homepage .te-phase-node { display: grid; width: 38px; height: 38px; place-items: center; border: 2px solid #2a9d8f; border-radius: 50%; background: #fffdf7; color: #075b53; font-size: .6875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.homepage .te-phase-copy { display: grid; max-width: 19ch; gap: 4px; padding: 8px 4px 0; }
.homepage .te-phase-copy strong { color: var(--clinic-ink); font-size: .875rem; line-height: 1.5; }
.homepage .te-phase-copy > span { color: #56645d; font-size: .75rem; line-height: 1.55; }
.homepage .te-phase-copy small { justify-self: center; margin-top: 2px; padding: 2px 7px; background: #eef1ed; color: #45544c; font-size: .6875rem; font-weight: 700; }
.homepage .te-model-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #d7dfda; color: #4c5a52; font-size: .8125rem; line-height: 1.7; }

.homepage .te-result-bottom { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.homepage .te-effort { grid-column: span 2; padding: clamp(16px, 2.5vw, 24px); }
.homepage .te-effort h3 { font-size: 1.05rem; }
.homepage .te-chart-row { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 14px; padding-top: 18px; }
.homepage .te-donut { display: grid; width: 150px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: conic-gradient(#0b6965 0 var(--guided), #c6d0ca var(--guided) 100%); }
.homepage .te-donut::before { grid-area: 1 / 1; width: 112px; aspect-ratio: 1; border-radius: 50%; background: #fffdf7; content: ""; }
.homepage .te-donut > span { z-index: 1; grid-area: 1 / 1; display: grid; color: var(--clinic-ink); font-size: 1.1rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.homepage .te-donut small { color: #56645d; font-size: .6875rem; font-weight: 500; }
.homepage .te-legend { display: grid; width: 100%; gap: 9px; margin: 0; padding: 0; list-style: none; }
.homepage .te-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 7px; color: #45544c; font-size: .75rem; }
.homepage .te-legend li b { color: var(--clinic-ink); font-size: .75rem; font-variant-numeric: tabular-nums; direction: ltr; }
.homepage .te-legend-dot { width: 9px; height: 9px; border-radius: 50%; background: #0b6965; }
.homepage .te-dot-study { background: #aab8b0; }

.homepage .te-conversion { position: relative; grid-column: span 4; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(20px, 3vw, 30px); background: #e8f5f1; }
.homepage .te-conversion-eyebrow { margin: 0 0 5px; color: #075b53; font-size: .75rem; font-weight: 800; letter-spacing: .02em; }
.homepage .te-conversion h3 { max-width: 30ch; margin: 0; color: var(--clinic-ink); font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 750; line-height: 1.45; }
.homepage .te-conversion > p:not(.te-conversion-eyebrow) { max-width: 58ch; margin: 9px 0 17px; color: #45544c; font-size: .875rem; line-height: 1.7; }
.homepage .te-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 15px; border: 1px solid #073a3b; border-bottom: 3px solid #073a3b; background: #0b5c64; color: #fff; font-size: .875rem; font-weight: 800; text-decoration: none; transition: transform 80ms cubic-bezier(.4, 0, 1, 1), border-width 80ms cubic-bezier(.4, 0, 1, 1); }
.homepage .te-cta:hover { background: #094d53; }
.homepage .te-cta:active { transform: translateY(2px); border-bottom-width: 1px; }
.homepage .te-cta:focus-visible { outline: 3px solid var(--clinic-amber); outline-offset: 3px; }

@media (min-width: 600px) {
  .homepage .te-field { grid-column: span 3; }
  .homepage .te-chart-row { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
  .homepage .te-donut { width: clamp(106px, 12vw, 144px); }
  .homepage .te-donut::before { width: 78%; }
}
@media (min-width: 1024px) {
  .homepage .te-field { grid-column: span 3; }
  .homepage .te-chart-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .homepage .te-result-bottom { grid-template-columns: 1fr; }
  .homepage .te-effort,
  .homepage .te-conversion { grid-column: 1 / -1; }
  .homepage .te-chart-row { grid-template-columns: 1fr; justify-items: center; }
  .homepage .te-legend { width: min(100%, 320px); }
}
@media (max-width: 520px) {
  .homepage .te-inputs { grid-template-columns: 1fr; }
  .homepage .te-field { grid-column: 1 / -1; }
  .homepage .te-result-heading { align-items: flex-start; }
  .homepage .te-track-wrap { grid-template-columns: 1fr; gap: 12px; }
  .homepage .te-band-label { flex-direction: row; justify-self: center; gap: 7px; }
  .homepage .te-band-start { order: 0; }
  .homepage .te-phases { order: 1; }
  .homepage .te-band-end { order: 2; }
  .homepage .te-phase-copy > span { font-size: .6875rem; }
}
@media (prefers-reduced-motion: reduce) {
  .homepage .te-cta { transition: none; }
}

/* Keep the estimator's section spacing in step with the tighter homepage rhythm. */
.homepage .target-estimator-section {
  padding-block: clamp(32px, 4vw, 48px);
}

