:root {
  --ink: #0b0d0c;
  --ink-soft: #1a1f1c;
  --muted: #5a635e;
  --paper: #f4f6f3;
  --panel: #ffffff;
  --line: rgba(11, 13, 12, 0.14);
  --accent: #b8ff00;
  --accent-ink: #0b0d0c;
  --danger: #c62828;
  --ok: #1b7a3a;
  --font-display: "Bebas Neue", sans-serif;
  --font-body: "Barlow", sans-serif;
  --radius: 4px;
  --slash: skewX(-18deg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--paper);
}

body {
  position: relative;
}

/* Full-bleed athletic stage (hero only) */
.stage {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(100vh, 720px);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(135deg, #0b0d0c 0%, #0b0d0c 42%, #141816 42.1%, #141816 100%);
}

.stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, transparent 0%, var(--paper) 100%);
}

.stage-lanes {
  position: absolute;
  inset: -20% -10%;
  opacity: 0.22;
  background: repeating-linear-gradient(
    -18deg,
    transparent 0 28px,
    rgba(184, 255, 0, 0.55) 28px 30px,
    transparent 30px 56px
  );
  animation: lane-drift 18s linear infinite;
}

.stage-slash {
  position: absolute;
  background: var(--accent);
  transform: var(--slash);
  opacity: 0.92;
}

.slash-a {
  top: -8%;
  right: 8%;
  width: 7vw;
  min-width: 52px;
  height: 130%;
  animation: slash-cut 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.slash-b {
  bottom: -20%;
  left: -4%;
  width: 3.5vw;
  min-width: 28px;
  height: 70%;
  opacity: 0.35;
  animation: slash-cut 1.25s 0.12s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.stage-pulse {
  position: absolute;
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  border: 2px solid rgba(184, 255, 0, 0.35);
  border-radius: 50%;
  top: 12%;
  right: 6%;
  animation: pulse-ring 3.6s ease-out infinite;
}

.top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.home-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: #fff;
  border: 2px solid #fff;
  padding: 0.35rem 0.7rem 0.2rem;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}

.home-link:hover,
.home-link:focus-visible {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  outline: none;
  transform: translateX(-2px);
}

.top-mark {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--ink);
  border: 2px solid var(--accent);
  padding: 0.2rem 0.55rem 0.05rem;
  line-height: 1;
}

.lang-btn {
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  border-radius: 0;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

main {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto 3rem;
  display: grid;
  gap: 1rem;
}

/* Hero: one composition — brand first */
.hero {
  min-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem 0 1.75rem;
  color: #fff;
  animation: rise 0.65s ease both;
}

.brand-kicker {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-hero {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.4rem, 12vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  max-width: 12ch;
}

.hero-line {
  margin: 1.1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  max-width: 22ch;
  color: rgba(255, 255, 255, 0.92);
}

.lede {
  margin: 0.85rem 0 0;
  max-width: 42ch;
  color: rgba(244, 246, 243, 0.72);
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 500;
}

.cta-row,
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.btn {
  appearance: none;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  padding: 0.75rem 1.2rem;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateX(3px);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn.ghost:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.panel .btn.ghost {
  border-color: var(--ink);
  color: var(--ink);
}

.panel .btn:not(.primary) {
  background: transparent;
}

.panel {
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.35rem;
  animation: rise 0.75s ease both;
  box-shadow: 6px 6px 0 var(--ink);
}

.panel:nth-of-type(2) {
  animation-delay: 0.04s;
}
.panel:nth-of-type(3) {
  animation-delay: 0.08s;
}
.panel:nth-of-type(4) {
  animation-delay: 0.12s;
}
.panel:nth-of-type(5) {
  animation-delay: 0.16s;
}

.panel h2 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.hint,
.empty,
.status {
  color: var(--muted);
  font-size: 0.95rem;
}

.status {
  min-height: 1.2em;
  margin: 0.75rem 0 0;
}

.status.error {
  color: var(--danger);
}

.status.ok {
  color: var(--ok);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem 1rem;
  margin-top: 1rem;
}

.grid-form label,
.goal-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.grid-form input,
.grid-form select {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 0;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease;
}

.grid-form input:focus,
.grid-form select:focus {
  outline: none;
  border-color: var(--ink);
}

.goal-field {
  grid-column: 1 / -1;
  border: 2px dashed var(--line);
  border-radius: 0;
  padding: 0.75rem 0.9rem;
}

.goal-field legend {
  padding: 0 0.35rem;
  font-weight: 700;
  color: var(--ink);
}

.radio {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.radio input {
  accent-color: var(--ink);
  width: 1rem;
  height: 1rem;
}

.hidden {
  display: none !important;
}

.plan-head h3 {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.plan-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 1.25rem;
}

.metric {
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 0.75rem;
}

.metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  color: var(--accent);
}

.metric span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.split h4 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.day-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.day-list li {
  background: #f7f8f6;
  border-left: 4px solid var(--accent);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.75rem 0.85rem;
}

.day-list h5 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.day-list p,
.day-list ul {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.day-list ul {
  padding-left: 1.1rem;
}

.nutrition-guide {
  margin: 0 0 1rem;
  padding: 0.85rem 0.9rem;
  background: var(--ink);
  color: #fff;
  border-left: 4px solid var(--accent);
}

.nutrition-guide h5 {
  margin: 0.65rem 0 0.35rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.95rem;
}

.nutrition-guide h5:first-child {
  margin-top: 0;
}

.nutrition-targets,
.nutrition-notes {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
}

.nutrition-notes {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
}

.period-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.period-list li {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.4;
  border: none;
  background: transparent;
  padding: 0;
}

.foot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--paper);
}

.api-hint code {
  font-size: 0.8rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slash-cut {
  from {
    transform: skewX(-18deg) translateY(-12%) scaleY(0.4);
    opacity: 0;
  }
  to {
    transform: skewX(-18deg) translateY(0) scaleY(1);
    opacity: 0.92;
  }
}

@keyframes lane-drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-56px);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.72);
    opacity: 0.55;
  }
  70% {
    opacity: 0.12;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: min(68vh, 560px);
    padding-top: 1.5rem;
  }

  .brand-hero {
    max-width: none;
  }

  .hero-line {
    max-width: none;
  }

  .slash-a {
    right: -2%;
    width: 42px;
  }

  .stage-pulse {
    right: -18%;
    top: 18%;
  }

  .panel {
    box-shadow: 4px 4px 0 var(--ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-lanes,
  .stage-pulse,
  .slash-a,
  .slash-b,
  .hero,
  .panel {
    animation: none;
  }
}

.progress-panel .progress-disclaimer {
  margin-top: 0.15rem;
  font-size: 0.85rem;
}

.progress-form {
  margin-top: 1rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  grid-column: 1 / -1;
  font-weight: 600;
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent, #b8ff00);
  cursor: pointer;
}

.progress-history-title {
  margin: 1.25rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-list {
  margin-top: 0.25rem;
}

