/* Global design tokens */
:root {
  --bg: #eef4f6;
  --surface: rgba(255, 255, 255, 0.88);
  --text: #10242e;
  --muted: #5f7480;
  --line: #c9d8de;
  --primary: #0e7c86;
  --primary-soft: rgba(14, 124, 134, 0.1);
  --accent: #2f5d9f;
  --accent-soft: rgba(47, 93, 159, 0.12);
  --shadow: 0 20px 48px rgba(12, 36, 60, 0.1);
  --shadow-soft: 0 10px 26px rgba(12, 36, 60, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1600px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }


/* Base page styling */
body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 9% 8%, rgba(14, 124, 134, 0.2), transparent 30%),
    radial-gradient(circle at 92% 10%, rgba(47, 93, 159, 0.16), transparent 32%),
    linear-gradient(180deg, #f9fcfd 0%, var(--bg) 55%, #e6eef2 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: min(calc(100% - clamp(24px, 3.5vw, 40px)), var(--max-width));
  margin: 0 auto;
}

/* Hero section */
.site-header { padding: 56px 0 28px; }

.hero {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 22px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card,
.chart-shell,
.step-card,
.faq-card,
.screenshot-box {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-copy {
  border-radius: var(--radius-xl);
  padding: 36px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 124, 134, 0.24), rgba(14, 124, 134, 0.03));
  pointer-events: none;
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: -84px;
  bottom: -92px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 93, 159, 0.14), rgba(47, 93, 159, 0.01));
  pointer-events: none;
}

.hero-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

a {
  color: var(--primary);
  text-underline-offset: 2px;
}

a:hover {
  color: #0b6670;
}

p { margin: 0 0 1rem; }

.lead,
.note,
.section-heading p,
.placeholder-inline,
.placeholder-block p,
.template-box p,
.site-footer .muted,
.clean-list li {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #14949f);
  color: white;
  box-shadow: 0 14px 28px rgba(14, 124, 134, 0.26);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border: 1px solid var(--line);
}

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

.btn-primary:hover {
  box-shadow: 0 18px 32px rgba(14, 124, 134, 0.32);
}

.btn-secondary:hover {
  border-color: #bcd2e6;
  box-shadow: var(--shadow-soft);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.hero-panel ol {
  margin: 10px 0 0;
  padding-left: 1.2rem;
}

/* Main layout utilities */
main { padding-bottom: 46px; }
.section { padding: clamp(10px, 1.6vw, 16px) 0; }
.alt { background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.18)); }
.section-heading { margin-bottom: 18px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.wide-right { grid-template-columns: 1.05fr 0.95fr; }

.card {
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.2vw, 24px);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 40px rgba(12, 36, 60, 0.12);
}

.chart-shell {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  background: linear-gradient(180deg, #f2f8ff 0%, #e9f3fc 100%);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.chart-embed {
  background: white;
  min-height: clamp(420px, 62vh, 700px);
  padding: 0;
}

.chart-embed iframe {
  width: 100%;
  height: clamp(480px, 74vh, 850px);
  border: 0;
  display: block;
}

/* Code and content helpers */
pre {
  max-width: 100%;
  overflow-x: auto;
  text-align: left;
  background: #10263a;
  color: #eaf2fb;
  padding: 14px 16px;
  border-radius: 14px;
}

code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 0.92rem;
}

.steps-grid,
.faq-grid,
.screenshot-grid {
  display: grid;
  gap: 16px;
}

.steps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.screenshot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.step-card,
.faq-card,
.screenshot-box {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.step-number {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #4b97d1);
  color: white;
  font-weight: 800;
}

.placeholder-inline,
.placeholder-block,
.template-box,
.screenshot-box {
  border: 1.5px dashed rgba(14, 124, 134, 0.22);
  background: linear-gradient(180deg, rgba(14, 124, 134, 0.06), rgba(14, 124, 134, 0.02));
  border-radius: 14px;
}

.placeholder-inline { padding: 12px 14px; }

.placeholder-block {
  min-height: 150px;
  padding: 16px;
  display: flex;
  align-items: center;
}

.placeholder-block.small { min-height: 110px; }
.placeholder-block.medium { min-height: 180px; }
.placeholder-block.tall { min-height: 220px; }

.clean-list {
  margin: 0;
  padding-left: 1.1rem;
}

.clean-list li + li { margin-top: 0.45rem; }

.code-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.code-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.9));
  padding: 16px 14px;
  text-align: center;
}

.code-letter {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--primary);
}

.code-label {
  color: var(--muted);
  font-weight: 600;
}

.template-box { padding: 18px; }

.screenshot-box {
  min-height: 210px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.site-footer { padding: 12px 0 42px; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* Large laptops and small desktops */
@media (max-width: 1320px) {
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .code-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screenshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .secondments-table-head,
  .secondments-row {
    grid-template-columns: 1.1fr 0.72fr 0.82fr 0.56fr 0.56fr 0.52fr 2fr 0.6fr;
  }
}

/* Tablets and compact laptops */
@media (max-width: 1080px) {
  .hero,
  .two-col,
  .wide-right,
  .steps-grid,
  .code-grid,
  .screenshot-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner { flex-direction: column; }
}

/* Narrow tablets */
@media (max-width: 900px) {
  .site-header { padding: 36px 0 22px; }

  .hero-copy,
  .hero-panel,
  .step-card,
  .faq-card,
  .screenshot-box {
    border-radius: 20px;
  }

  .chart-toolbar {
    min-height: 48px;
    padding: 0 14px;
  }

  .chart-embed {
    min-height: 420px;
  }

  .chart-embed iframe {
    height: 65vh;
    min-height: 420px;
  }
}

/* Mobile landscape and large phones */
@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 22px), var(--max-width));
  }

  .hero-copy,
  .hero-panel,
  .card,
  .step-card,
  .faq-card,
  .screenshot-box,
  .chart-placeholder {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-copy,
  .hero-panel,
  .card,
  .step-card,
  .faq-card,
  .screenshot-box {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn { width: 100%; }

  .timeline-card {
    padding: 16px;
  }

  .timeline-detail {
    padding: 14px;
  }

  .secondments-topbar,
  .secondments-actions,
  .secondments-bottom {
    align-items: stretch;
  }

  .secondments-bottom .cf-turnstile,
  .secondments-bottom .btn {
    width: 100%;
  }

  .secondments-row {
    padding: 12px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  h1 {
    font-size: clamp(1.7rem, 9vw, 2.1rem);
    line-height: 1.12;
  }

  h2 {
    font-size: clamp(1.15rem, 6.2vw, 1.5rem);
  }

  .hero-tags span {
    min-height: 32px;
    font-size: 0.84rem;
  }

  .step-figure img {
    height: 160px;
  }

  .chart-embed iframe {
    height: 58vh;
    min-height: 360px;
  }

  .stats-card {
    padding: 16px;
  }

  .stats-chart {
    min-height: 320px;
  }

  .stats-chart-tall {
    min-height: 360px;
  }
}


.step-card {
  display: flex;
  flex-direction: column;
}

/* Screenshot zoom modal */
.step-figure {
  margin: 16px 0 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.step-figure img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top center;
  cursor: zoom-in;
}

.zoom-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(14, 124, 134, 0.92), rgba(12, 98, 106, 0.96));
  color: white;
  font-size: 1.05rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.zoom-btn:hover {
  background: linear-gradient(135deg, rgba(18, 147, 158, 0.96), rgba(13, 108, 117, 0.98));
}

.img-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 28, 0.84);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  z-index: 9999;
}

.img-modal.open {
  display: flex;
}

.img-modal img {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  background: white;
}

.img-modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: #132238;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}


/* Timeline component */
.step-card {
  display: flex;
  flex-direction: column;
}

.step-figure {
  margin: 16px 0 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.step-figure img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top center;
  cursor: zoom-in;
}

.zoom-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(14, 124, 134, 0.92), rgba(12, 98, 106, 0.96));
  color: white;
  font-size: 1.05rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.zoom-btn:hover {
  background: linear-gradient(135deg, rgba(18, 147, 158, 0.96), rgba(13, 108, 117, 0.98));
}

.img-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 28, 0.84);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  z-index: 9999;
}

.img-modal.open {
  display: flex;
}

.img-modal img {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  background: white;
}

.img-modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: #132238;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 24px;
  overflow-x: auto;
}


.timeline-grid {
  --timeline-label-width: 180px;
  --timeline-gap: 18px;
  min-width: 980px;
}

.timeline-scale-row,
.timeline-row {
  display: grid;
  grid-template-columns: var(--timeline-label-width) 1fr;
  align-items: center;
  gap: var(--timeline-gap);
}

.timeline-scale-row {
  margin-bottom: 18px;
}

.timeline-scale-spacer {
  min-height: 1px;
}

.timeline-scale {
  display: grid;
  grid-template-columns: repeat(48, minmax(12px, 1fr));
  gap: 2px;
}

.timeline-scale div {
  min-height: 24px;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.timeline-scale-empty {
  color: transparent;
}

.timeline-label {
  font-weight: 700;
  color: var(--text);
}

.timeline-row {
  position: relative;
  margin-bottom: 14px;
}

.timeline-row > .timeline-bar {
  grid-column: 2;
}

.timeline-row::after {
  content: "";
  position: absolute;
  left: calc(var(--timeline-label-width) + var(--timeline-gap));
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 10px;
  background:
    repeating-linear-gradient(
      to right,
      rgba(31,111,178,0.06),
      rgba(31,111,178,0.06) calc(100% / 48 - 1px),
      transparent calc(100% / 48 - 1px),
      transparent calc(100% / 48)
    );
  border-radius: 999px;
  z-index: 0;
}

.timeline-bar {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  justify-content: center;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  grid-column: 2;
  width: calc((var(--end) - var(--start) + 1) * (100% / 48));
  margin-left: calc((var(--start) - 1) * (100% / 48));
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}


.timeline-bar:hover,
.timeline-bar.active {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.12);
  filter: saturate(1.06);
}

.timeline-bar.admin  { background: linear-gradient(135deg, #7f8ea3, #96a5ba); }
.timeline-bar.phase1 { background: linear-gradient(135deg, #0e7c86, #2c9ea8); }
.timeline-bar.phase2 { background: linear-gradient(135deg, #2f5d9f, #4d7abc); }
.timeline-bar.phase3 { background: linear-gradient(135deg, #3b9099, #66aeb5); }

.timeline-detail {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,250,255,0.88));
  border: 1px solid var(--line);
}

.timeline-detail h3 {
  margin: 0 0 6px;
}

.timeline-detail p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .timeline-scale-row,
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .timeline-scale-spacer {
    display: none;
  }

  .timeline-row::after {
    left: 0;
    top: calc(100% - 22px);
  }

  .timeline-bar {
    width: calc((var(--end) - var(--start) + 1) * (100% / 48));
    margin-left: calc((var(--start) - 1) * (100% / 48));
  }
}

/* Secondments form and editable rows */
.secondments-card {
  overflow: hidden;
}

.secondments-topbar,
.secondments-actions,
.secondments-bottom {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}

.secondments-topbar {
  margin-bottom: 16px;
}

.secondments-bottom {
  justify-content: flex-start;
  margin-top: 20px;
}

.secondments-submit-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.secondments-status-inline {
  min-height: auto;
  margin-bottom: 0;
  white-space: normal;
  font-weight: 700;
}

.secondments-status-inline.is-loading {
  color: var(--muted);
}

.secondments-submit-inline .btn {
  flex: 0 0 auto;
}

.secondments-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 260px;
}

.secondments-field label {
  font-weight: 700;
  color: var(--text);
}

.secondments-field input,
.secondments-field select,
.secondments-row input,
.secondments-row select,
.secondments-row textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  font: inherit;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.secondments-field input:focus,
.secondments-field select:focus,
.secondments-row input:focus,
.secondments-row select:focus,
.secondments-row textarea:focus {
  outline: none;
  border-color: #67a9b0;
  box-shadow: 0 0 0 3px rgba(14, 124, 134, 0.18);
  background: #fbfdff;
}
.secondments-field select,
.secondments-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.secondments-row textarea {
  min-height: 110px;
  resize: vertical;
}

.secondments-status {
  min-height: 24px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 600;
}

.secondments-status.is-error {
  color: #b42318;
}

.secondments-status.is-success {
  color: #157347;
}

.secondments-table-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.secondments-table-head,
.secondments-row {
  display: grid;
  grid-template-columns: 1.15fr 0.7fr 0.8fr 0.52fr 0.52fr 0.5fr 2.5fr 0.5fr;
  gap: 12px;
  align-items: start;
}

.secondments-table-head {
  padding: 0 1px 6px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  color: var(--text);
}

.participants-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}

.secondments-row {
  padding: 14px;
  border: 3px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,252,255,0.92));
  align-items: center;
}

.row-action {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.btn-danger {
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid #f1c0c0;
  background: linear-gradient(180deg, #fff6f6, #ffeded);
  color: #a61b1b;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger:focus-visible,
.btn:focus-visible,
.timeline-bar:focus-visible,
.zoom-btn:focus-visible,
.img-modal-close:focus-visible {
  outline: 3px solid rgba(14, 124, 134, 0.35);
  outline-offset: 2px;
}

.btn-danger:hover {
  background: #ffe9e9;
}

@media (max-width: 1100px) {
  .secondments-table-head {
    display: none;
  }

  .secondments-row {
    grid-template-columns: 1fr;
  }

  .row-action {
    justify-content: flex-start;
  }
  .secondments-submit-inline {
    align-items: flex-start;
  }

}

/* Live statistics section */
.container-wide {
  width: min(calc(100% - clamp(24px, 3.5vw, 40px)), 1600px);
}

.stats-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stats-card {
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,252,255,0.87));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.stats-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.stats-card-head p {
  margin: 0;
  color: var(--muted);
}

.stats-feedback {
  min-height: 24px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--muted);
}

.stats-feedback.is-loading {
  color: var(--muted);
}

.stats-feedback.is-success {
  color: #157347;
}

.stats-feedback.is-error {
  color: #b42318;
}

.stats-chart {
  width: 100%;
  min-height: 420px;
  border-radius: 14px;
}

.stats-chart-tall {
  min-height: 500px;
}

@media (max-width: 720px) {
  .container-wide {
    width: min(calc(100% - 22px), 1600px);
  }

  .stats-card {
    padding: 20px;
  }

  .stats-chart {
    min-height: 360px;
  }

  .stats-chart-tall {
    min-height: 420px;
  }
}
