:root {
  --ink: #172026;
  --muted: #5b6871;
  --line: #d7dedb;
  --paper: #f7f6f1;
  --white: #ffffff;
  --green: #166f5c;
  --green-dark: #0c493d;
  --coral: #d85f45;
  --gold: #b89038;
  --blue: #236b9a;
  --shadow: 0 18px 48px rgba(23, 32, 38, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 246, 241, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--white);
  background: var(--green-dark);
  font-weight: 800;
}

.brand small,
.program-card span,
.footer,
.empty-state {
  color: var(--muted);
}

.brand span:last-child {
  display: grid;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
}

.nav a {
  color: var(--muted);
}

.nav a:hover {
  background: rgba(22, 111, 92, .08);
  color: var(--green-dark);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  min-height: 560px;
  padding: clamp(18px, 4vw, 56px);
  background: #e4ece6;
}

.training-scene {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 500px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8f8f2 0%, #dae7dd 52%, #f0d7bf 100%);
  box-shadow: var(--shadow);
}

.scene-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(23, 32, 38, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 38, .08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent);
}

.scene-mat {
  position: absolute;
  left: 16%;
  right: 10%;
  bottom: 11%;
  height: 18px;
  border-radius: 999px;
  background: rgba(12, 73, 61, .82);
}

.scene-bar {
  position: absolute;
  left: 20%;
  right: 20%;
  top: 38%;
  height: 10px;
  border-radius: 999px;
  background: #172026;
  transform: rotate(-7deg);
}

.scene-bar::before,
.scene-bar::after {
  content: "";
  position: absolute;
  top: -28px;
  width: 24px;
  height: 66px;
  border-radius: 5px;
  background: var(--coral);
}

.scene-bar::before {
  left: -8px;
}

.scene-bar::after {
  right: -8px;
}

.scene-person {
  position: absolute;
  border-radius: 999px;
}

.scene-person-a {
  width: 84px;
  height: 84px;
  left: 30%;
  top: 22%;
  background: var(--gold);
  box-shadow:
    0 108px 0 32px var(--green),
    42px 172px 0 14px var(--ink),
    -34px 172px 0 14px var(--ink);
}

.scene-person-b {
  width: 66px;
  height: 66px;
  right: 24%;
  top: 30%;
  background: #8c5d47;
  box-shadow:
    0 96px 0 26px var(--blue),
    34px 148px 0 12px var(--ink),
    -26px 148px 0 12px var(--ink);
}

.mini-card,
.metric-ring {
  position: absolute;
  display: grid;
  gap: 2px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 32px rgba(23, 32, 38, .15);
}

.mini-card {
  left: 26px;
  bottom: 26px;
}

.mini-card strong {
  font-size: 42px;
  line-height: 1;
}

.metric-ring {
  right: 28px;
  top: 28px;
  place-items: center;
  width: 128px;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 10px solid rgba(22, 111, 92, .28);
}

.metric-ring span {
  font-size: 30px;
  font-weight: 900;
}

.metric-ring small {
  max-width: 82px;
  text-align: center;
  line-height: 1.15;
}

.hero-copy {
  align-self: center;
  padding: clamp(28px, 6vw, 70px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: .96;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  font-size: 21px;
  line-height: 1.2;
}

.hero-copy p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions,
.form-actions,
.pill-row,
.client-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  border: 1px solid transparent;
  cursor: pointer;
}

.button.primary {
  color: var(--white);
  background: var(--green);
}

.button.secondary {
  color: var(--green-dark);
  background: transparent;
  border-color: rgba(12, 73, 61, .25);
}

.button:hover {
  transform: translateY(-1px);
}

.section {
  padding: clamp(30px, 5vw, 72px) clamp(18px, 4vw, 56px);
}

.intro-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.intro-band h2,
.intro-band p {
  max-width: 820px;
}

.pill-row span {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(22, 111, 92, .09);
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 20px;
  align-items: start;
}

.panel,
.program-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(23, 32, 38, .05);
}

.panel {
  padding: clamp(18px, 3vw, 32px);
}

.tool-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: min(760px, calc(100vh - 118px));
  overflow: hidden;
}

.private-tool-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  height: min(620px, calc(100vh - 118px));
}

aside.private-tool-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.scroll-tool {
  overflow: auto;
  min-height: 0;
  max-height: none;
  padding-right: 8px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(22, 111, 92, .42) #edf3ef;
}

.private-tool-panel .scroll-tool {
  max-height: none;
}

.summary-scroll,
.dashboard-scroll {
  display: grid;
  align-content: start;
  gap: 18px;
}

.scroll-tool::-webkit-scrollbar {
  width: 10px;
}

.scroll-tool::-webkit-scrollbar-track {
  background: #edf3ef;
  border-radius: 999px;
}

.scroll-tool::-webkit-scrollbar-thumb {
  background: rgba(22, 111, 92, .42);
  border-radius: 999px;
}

.sticky-panel {
  position: sticky;
  top: 92px;
}

.section-heading {
  max-width: 760px;
}

.tool-panel > .section-heading {
  min-height: 0;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.smart-form {
  display: grid;
  gap: 20px;
}

fieldset {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0 0 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

legend {
  margin-bottom: 10px;
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8d2ce;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(22, 111, 92, .18);
  border-color: var(--green);
}

.check-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.check-row label {
  color: var(--muted);
  font-weight: 650;
}

.agreement-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d9c7bd;
  border-radius: 8px;
  background: #fff8f4;
}

.agreement-box p {
  margin: 0;
  color: #59453b;
}

.terms-details {
  display: grid;
  gap: 10px;
}

.terms-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 900;
}

.terms-details summary:hover {
  text-decoration: underline;
}

.terms-details[open] {
  padding-top: 4px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  border: 1px dashed #c7d1cd;
  border-radius: 8px;
  background: #fafbf8;
  text-align: center;
}

.hidden {
  display: none;
}

.analysis {
  display: grid;
  gap: 18px;
}

.score-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: #f7faf7;
  border: 1px solid var(--line);
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.bar-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e7ece9;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.insight-list,
.weekly-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.insight-list li,
.weekly-list li {
  padding: 11px 12px;
  border-left: 4px solid var(--green);
  background: #f8faf8;
}

.warning {
  border-color: rgba(216, 95, 69, .4);
  background: #fff6f3;
}

.warning li {
  border-left-color: var(--coral);
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.program-card {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.program-card strong {
  color: var(--green-dark);
  font-size: 24px;
}

.booking-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #f2f7f3;
  border-top: 1px solid var(--line);
}

.booking-copy {
  max-width: 760px;
}

.booking-copy p:not(.eyebrow),
.booking-actions span {
  color: var(--muted);
}

.booking-actions {
  display: grid;
  gap: 10px;
  min-width: min(100%, 260px);
}

.feedback-section {
  background: var(--white);
  border-top: 1px solid var(--line);
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feedback-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.proof-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.proof-photo {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-radius: 8px;
  background: linear-gradient(145deg, #d8e2dc, #f3e0cb);
}

.proof-photo::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 44px;
  height: 82px;
  border-radius: 28px 28px 18px 18px;
  background: rgba(23, 32, 38, .62);
  transform: translateX(-50%);
}

.proof-photo::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 30px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(184, 144, 56, .82);
  transform: translateX(-50%);
}

.proof-photo.after {
  background: linear-gradient(145deg, #d7eadf, #e9f7f0);
}

.proof-photo span {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(12, 73, 61, .82);
  font-size: 12px;
  font-weight: 900;
}

.feedback-card p {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.feedback-card strong {
  color: var(--green-dark);
}

.feedback-card span {
  color: var(--muted);
}

.dashboard-section {
  background: #eef3ee;
  border-top: 1px solid var(--line);
}

.coach-gate,
.coach-tools {
  display: grid;
  gap: 18px;
}

.coach-gate {
  max-width: 520px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.coach-gate p {
  margin: 0;
  color: var(--muted);
}

.client-toolbar {
  align-items: end;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.client-toolbar label {
  min-width: min(100%, 280px);
}

.client-roster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-chip {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 94px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.client-chip:hover,
.client-chip.active {
  border-color: var(--green);
  background: #f3faf5;
}

.client-chip span,
.client-chip small {
  color: var(--muted);
}

.compact-empty {
  min-height: 110px;
}

.compact-form {
  gap: 16px;
}

.dashboard-scroll #dashboardResult {
  min-width: 0;
}

.chart {
  display: grid;
  gap: 12px;
}

.chart-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 190px;
  padding: 16px 8px 0;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chart-bar {
  flex: 1;
  min-width: 34px;
  display: grid;
  align-items: end;
  gap: 5px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.chart-bar span:first-child {
  display: block;
  min-height: 8px;
  border-radius: 6px 6px 0 0;
  background: var(--green);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .hero,
  .split,
  .program-grid,
  .feedback-grid,
  .client-roster {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    min-height: 440px;
    order: 2;
  }

  .hero-copy {
    order: 1;
  }

  .sticky-panel {
    position: static;
  }

  .tool-panel,
  .private-tool-panel {
    height: auto;
    overflow: visible;
  }

  .scroll-tool,
  .private-tool-panel .scroll-tool {
    max-height: 560px;
  }
}

@media (max-width: 700px) {
  .topbar,
  .intro-band,
  .booking-section,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 42px;
  }

  .hero-actions .button,
  .form-actions .button {
    width: 100%;
  }
}
