/* Melola Stat: Discovery's main.css plus a teal accent, so users can tell the products apart (ADR 0032). */
.stat {
  --stat-accent: #0f766e;
  --stat-accent-soft: #ccfbf1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar--stat { border-bottom: 3px solid var(--stat-accent); }

.products { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: rgb(255 255 255 / 0.08); }
.products__link { color: #dbe6f3; font-size: 0.85rem; font-weight: 500; text-decoration: none; padding: 0.25rem 0.7rem; border-radius: 7px; }
.products__link:hover { color: #fff; background: rgb(255 255 255 / 0.1); }
.products__link[aria-current='page'] { color: #fff; background: var(--stat-accent); }

.stat-home { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 48px 16px 64px; }

.stat-hero { max-width: 720px; }
.stat-badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--stat-accent-soft);
  color: var(--stat-accent);
  font-size: 0.85rem;
  font-weight: 600;
}
.stat-hero__title { margin: 0 0 16px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; }
.stat-hero__lead { margin: 0 0 20px; font-size: 1.1rem; color: var(--ink-muted); }
.stat-notice {
  margin: 0;
  padding: 12px 16px;
  border-left: 4px solid var(--stat-accent);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 40px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.stat-card__title { margin: 0 0 8px; font-size: 1.1rem; color: var(--stat-accent); }
.stat-card p { margin: 0; color: var(--ink-muted); }

.stat-account { margin-top: 32px; color: var(--ink-muted); }
.stat-account a { color: var(--link); }

.stat-footer { padding: 20px 16px; text-align: center; font-size: 0.85rem; color: var(--ink-muted); }
.stat-footer a { color: var(--link); }

/* Data pages (unggah, pemeriksaan). */
.stat-page { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 32px 16px 64px; }
.stat-page__title { margin: 0 0 8px; font-size: 1.8rem; }
.stat-page__lead { margin: 0 0 20px; color: var(--ink-muted); }
.stat-page .stat-notice { margin-bottom: 20px; }
.stat-page a:not(.btn) { color: var(--link); }

.stat-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.stat-panel { padding: 20px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.stat-panel__title { margin: 0 0 8px; font-size: 1.1rem; color: var(--stat-accent); }
.stat-panel p { margin: 0 0 12px; }
.stat-hint { font-size: 0.9rem; color: var(--ink-muted); }
.stat-panel .stat-hint { margin: 12px 0 0; }
.stat-facts { margin: 16px 0 0; padding-left: 1.2rem; font-size: 0.9rem; color: var(--ink-muted); }
.stat-facts li + li { margin-top: 4px; }

.stat-upload { display: grid; gap: 10px; justify-items: start; }
.stat-upload input[type='file'] { max-width: 100%; }
.stat-error { margin: 0; color: #b91c1c; font-weight: 500; }

.stat-ok { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--green); border-radius: 8px; background: #f0fdf4; }
.stat-issues { margin-bottom: 16px; padding: 16px 20px; border-left: 4px solid; border-radius: 8px; }
.stat-issues h2 { margin: 0 0 6px; font-size: 1.05rem; }
.stat-issues p { margin: 0 0 8px; }
.stat-issues ul { margin: 0; padding-left: 1.2rem; }
.stat-issues li + li { margin-top: 3px; }
.stat-issues--error { border-color: #b91c1c; background: #fef2f2; }
.stat-issues--warning { border-color: #b45309; background: #fffbeb; }

.stat-fields { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.stat-fields label { display: grid; gap: 4px; font-size: 0.9rem; font-weight: 500; }
.stat-fields input, .stat-fields select, .stat-table select {
  padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 0.9rem; background: #fff;
}
.stat-fields input { width: 6rem; }

.stat-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.stat-table th, .stat-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.stat-table thead th { font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.stat-table tbody th { font-weight: 600; }
.stat-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.stat-table__label { display: block; font-weight: 400; font-size: 0.8rem; color: var(--ink-muted); }

.stat-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.stat-actions form { margin: 0; }
.stat-mapping > .btn { margin-bottom: 8px; }
.stat-card p.stat-card__more { margin-top: 12px; }
.stat-card__more a { color: var(--link); font-weight: 500; }

/* Learning pages (belajar, modul, unit, kuis). */
.stat-crumbs { margin: 0 0 8px; font-size: 0.9rem; color: var(--ink-muted); }
.stat-badge--draft { margin: 0; background: #fef3c7; color: #92400e; }
.stat-module-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.stat-panel__title a { color: inherit; }

.stat-progress { margin: 0 0 12px; }
.stat-progress__bar { height: 8px; border-radius: 999px; background: var(--stat-accent-soft); overflow: hidden; }
.stat-progress__bar span { display: block; height: 100%; background: var(--stat-accent); }
.stat-progress__label { margin: 6px 0 0; font-size: 0.9rem; color: var(--ink-muted); }
.stat-panel .stat-progress__label { margin-bottom: 0; }
.stat-unit-page > .stat-progress { margin-bottom: 20px; }

.stat-outcomes { margin: 0; padding-left: 1.3rem; }
.stat-outcomes li + li { margin-top: 4px; }

.stat-units { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stat-unit { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.stat-unit__number { flex: 0 0 2rem; height: 2rem; display: grid; place-items: center; border-radius: 999px; background: var(--page); font-weight: 600; }
.stat-unit--selesai .stat-unit__number { background: var(--stat-accent); color: #fff; }
.stat-unit--sedang .stat-unit__number { background: var(--stat-accent-soft); color: var(--stat-accent); }
.stat-unit--soon { color: var(--ink-muted); }
.stat-unit__body a { font-weight: 600; }
.stat-unit__meta { display: block; font-size: 0.85rem; color: var(--ink-muted); }

.stat-section { margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); scroll-margin-top: 16px; }
.stat-section h2 { margin: 0 0 12px; font-size: 1.25rem; }
.stat-section--read { border-left: 4px solid var(--stat-accent); }
.stat-prose { line-height: 1.65; }
.stat-prose > :first-child { margin-top: 0; }
.stat-prose table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.92rem; display: block; overflow-x: auto; }
.stat-prose th, .stat-prose td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.stat-prose thead th { color: var(--ink-muted); }
.stat-prose blockquote { margin: 12px 0; padding: 8px 16px; border-left: 4px solid var(--stat-accent); background: var(--page); border-radius: 6px; font-variant-numeric: tabular-nums; }
.stat-prose blockquote p { margin: 0; }
.stat-section__read { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.stat-section__done { color: var(--stat-accent); font-weight: 600; font-size: 0.9rem; }
.stat-link-button { padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-size: 0.9rem; text-decoration: underline; cursor: pointer; }

.stat-sim { margin: 16px 0; padding: 16px; border: 1px solid var(--stat-accent-soft); border-radius: 12px; background: #f0fdfa; }
.stat-sim__controls { display: grid; gap: 12px; }
.stat-sim__controls label { display: grid; gap: 4px; font-weight: 500; }
.stat-sim__controls input { width: 100%; accent-color: var(--stat-accent); }
.stat-sim__result { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 16px 0 8px; }
.stat-sim__result div { padding: 8px 10px; border-radius: 8px; background: #fff; }
.stat-sim__result dt { font-size: 0.8rem; color: var(--ink-muted); }
.stat-sim__result dd { margin: 0; font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-sim__verdict { margin: 0 0 8px; font-weight: 500; }
.stat-sim__verdict[data-significant='true'] { color: var(--stat-accent); }
.stat-sim figcaption { font-size: 0.82rem; color: var(--ink-muted); }

.stat-question { margin: 0 0 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.stat-question legend { padding: 0; font-weight: 500; line-height: 1.5; float: left; width: 100%; margin-bottom: 12px; }
.stat-question__number { font-weight: 700; color: var(--stat-accent); }
.stat-option { clear: both; display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.stat-option:hover { background: var(--page); }
.stat-option input { margin-top: 0.3rem; accent-color: var(--stat-accent); }
.stat-answer { clear: both; display: grid; gap: 4px; font-weight: 500; }
.stat-answer input { width: 10rem; padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.stat-actions .stat-link-button { align-self: center; }

.stat-results { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.stat-result { padding: 16px 20px; border: 1px solid var(--line); border-left: 4px solid; border-radius: 12px; background: var(--surface); }
.stat-result p { margin: 0 0 6px; }
.stat-result--right { border-left-color: var(--green); }
.stat-result--wrong { border-left-color: #b45309; }
.stat-result__question { font-weight: 500; }
.stat-result__right { color: var(--ink-muted); }

/* Phones: the account links wrap instead of touching the screen edge. */
@media (max-width: 600px) {
  .topbar--stat .user-nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
  .topbar--stat .user-nav__name { max-width: 12ch; }
}

/* Analysis (model, interpretation, APA tables, residual charts). */
.stat-ok p { margin: 0 0 10px; }
.stat-practice { margin-top: 12px; }
.stat-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; margin: 16px 0; padding: 0; border: 0; }
.stat-choices legend { margin-bottom: 8px; font-size: 0.9rem; font-weight: 500; }
.stat-choices label { display: flex; gap: 8px; align-items: baseline; font-size: 0.92rem; }
.stat-choices .stat-hint { font-size: 0.8rem; }
.stat-model-form .stat-error { margin-bottom: 12px; }
.stat-results-block { margin-top: 32px; }
.stat-results-block > h2 { margin: 0 0 12px; font-size: 1.35rem; }
.stat-results-block h3 { margin: 20px 0 8px; font-size: 1.05rem; }
.stat-note { color: var(--ink-muted); }
.stat-issues--note { border-color: var(--line); background: var(--surface); }
.stat-assumptions { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.stat-assumption { padding: 10px 14px; border-left: 4px solid var(--green); border-radius: 8px; background: var(--surface); line-height: 1.55; }
.stat-assumption--peringatan { border-color: #b45309; background: #fffbeb; }
.stat-assumption--catatan { border-color: var(--line); }

.stat-apa { margin: 0 0 24px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow-x: auto; }
.stat-apa figcaption { margin-bottom: 8px; line-height: 1.5; }
.stat-apa table { border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; min-width: 100%; }
.stat-apa th, .stat-apa td { padding: 4px 10px; text-align: left; white-space: nowrap; }
.stat-apa thead tr:first-child th { border-top: 1px solid var(--ink); }
.stat-apa thead tr:last-child th, .stat-apa thead th[rowspan] { border-bottom: 1px solid var(--ink); }
.stat-apa tbody tr:last-child td { border-bottom: 1px solid var(--ink); }
.stat-apa thead th { font-weight: 500; }
.stat-apa__note { margin: 8px 0; font-size: 0.85rem; }

.stat-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.stat-chart { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.stat-chart svg { display: block; width: 100%; height: auto; }
.stat-chart figcaption { margin-top: 6px; font-size: 0.85rem; color: var(--ink-muted); }
.stat-downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.stat-downloads .btn { text-decoration: none; }
.stat-notice--review { margin: 0 0 16px; border-left-color: #b45309; background: #fffbeb; }
.stat-analysis-menu { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-analysis-menu .btn { text-decoration: none; }
.stat-guide-link { margin: 0 0 20px; }
.stat-guide-link .btn { text-decoration: none; }
.stat-choices--wide { grid-template-columns: 1fr; }
.stat-guide .stat-choices label { align-items: flex-start; }
.stat-tagline { margin: 0 0 8px; font-weight: 600; color: var(--stat-accent); }
.stat-level { margin-top: 24px; }
.stat-level__title { margin: 0 0 10px; font-size: 1.15rem; }
.stat-level__title span { display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: 999px; background: var(--stat-accent); color: #fff; font-size: 0.85rem; vertical-align: middle; }
.stat-level__soon { margin: 0; padding: 12px 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-muted); }
.stat-module-card h3 { font-size: 1.05rem; }

/* Qualitative coding (ADR 0033 langkah 2). */
.stat-page--wide { max-width: 1280px; }
.stat-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.stat-tabs a { padding: 8px 14px; color: var(--ink-muted); text-decoration: none; border-bottom: 3px solid transparent; font-weight: 500; }
.stat-tabs a[aria-current='page'] { color: var(--stat-accent); border-bottom-color: var(--stat-accent); }
.stat-list { margin: 0 0 12px; padding-left: 1.2rem; }
.stat-list li + li { margin-top: 6px; }
.stat-form { display: grid; gap: 8px; margin-bottom: 12px; }
.stat-form label, label.stat-form { display: grid; gap: 4px; font-size: 0.9rem; font-weight: 500; }
.stat-form input[type='text'], .stat-form textarea, .stat-form select, .stat-wide { width: 100%; padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 0.92rem; }
.stat-check { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; }
.stat-check input { margin-top: 0.3rem; }
.stat-inline { display: inline; margin: 0 0 0 6px; }
.stat-new { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.stat-new h3 { margin: 0; font-size: 1rem; }
.stat-danger summary { cursor: pointer; color: #b91c1c; font-weight: 600; }
.stat-coder-switch { margin-bottom: 12px; }

.stat-coding { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 960px) { .stat-coding { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; } }
.stat-coding__side { display: grid; gap: 16px; }
@media (min-width: 960px) { .stat-coding__form { position: sticky; top: 12px; } }
.stat-transcript { white-space: pre-wrap; line-height: 1.75; font-size: 0.98rem; overflow-wrap: anywhere; margin: 0; font-family: inherit; }
.stat-transcript--preview { max-height: 320px; overflow: auto; padding: 12px; background: var(--page); border-radius: 8px; font-size: 0.9rem; }
.stat-seg { color: inherit; border-radius: 3px; cursor: pointer; }
.stat-seg--1 { background: #ccfbf1; }
.stat-seg--2 { background: #99f6e4; }
.stat-seg--3 { background: #5eead4; }
.stat-quote { margin: 0 0 10px; padding: 8px 12px; border-left: 4px solid var(--stat-accent); background: var(--page); font-size: 0.9rem; max-height: 160px; overflow: auto; }
.stat-code-list { display: grid; gap: 4px; max-height: 260px; overflow: auto; margin: 0 0 10px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.stat-code-list label { display: flex; gap: 6px; align-items: baseline; font-size: 0.9rem; }
.stat-segments { margin: 0; padding-left: 1.2rem; display: grid; gap: 10px; font-size: 0.9rem; max-height: 480px; overflow: auto; }
.stat-segments q { display: block; }
.stat-chip { display: inline-block; margin: 2px 4px 0 0; padding: 1px 8px; border-radius: 999px; background: var(--stat-accent-soft); color: var(--stat-accent); font-size: 0.8rem; font-weight: 600; }
.stat-code { padding: 8px 0; border-bottom: 1px solid var(--line); }
.stat-code summary { cursor: pointer; }
.stat-code .stat-form { margin-top: 10px; }
.stat-heat--1 { background: #ccfbf1; }
.stat-heat--2 { background: #99f6e4; }
.stat-heat--3 { background: #5eead4; }
.stat-quotes { margin: 0 0 12px; padding-left: 1.2rem; display: grid; gap: 6px; }

/* Home: two paths, example slides, figures and icons. */
.stat-icon { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
.stat-hero--split { max-width: none; display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .stat-hero--split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.stat-paths { display: grid; gap: 12px; margin: 0 0 16px; }
@media (min-width: 560px) { .stat-paths { grid-template-columns: 1fr 1fr; } }
.stat-path { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--navy-800); color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgb(15 32 54 / 0.18); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.stat-path:hover, .stat-path:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(15 32 54 / 0.24); }
.stat-path--qual { background: var(--stat-accent); }
.stat-path strong { display: block; font-size: 1.02rem; }
.stat-path > span:last-child > span { display: block; margin-top: 2px; font-size: 0.85rem; color: rgb(255 255 255 / 0.82); }
.stat-path__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgb(255 255 255 / 0.14); }
.stat-guide-link a { display: inline-flex; gap: 6px; align-items: center; color: var(--link); font-weight: 500; }
.stat-home__notice { margin-top: 32px; }
.stat-badge--soon { margin: 0 0 0 6px; padding: 1px 8px; font-size: 0.75rem; background: #fef3c7; color: #92400e; }

.stat-show { position: relative; }
.stat-show__frame { position: relative; aspect-ratio: 16 / 11; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 40px rgb(15 32 54 / 0.12); overflow: hidden; }
.stat-show__slide { position: absolute; inset: 0; margin: 0; padding: 18px; display: grid; grid-template-rows: 1fr auto; gap: 10px; opacity: 0; transform: translateY(8px); transition: opacity 0.6s ease, transform 0.6s ease; pointer-events: none; }
.stat-show__slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.stat-show__slide svg { width: 100%; height: 100%; }
.stat-show__slide figcaption { font-size: 0.92rem; color: var(--ink-muted); }
.stat-show__slide figcaption strong { color: var(--ink); }
.stat-show__dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.stat-show__dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: width 0.2s ease, background 0.2s ease; }
.stat-show__dots button[aria-current='true'] { width: 26px; background: var(--stat-accent); }
@media (prefers-reduced-motion: reduce) { .stat-show__slide { transition: none; } }
.sv-bg { fill: #f8fafc; }
.sv-axis { stroke: #94a3b8; stroke-width: 1.5; fill: none; }
.sv-dots circle { fill: #0f766e; fill-opacity: 0.65; }
.sv-dots--small circle { fill-opacity: 0.8; }
.sv-line { stroke: #13263f; stroke-width: 2.5; fill: none; stroke-linecap: round; }
.sv-line--dash { stroke-dasharray: 5 4; stroke-width: 1.6; }
.sv-curve { stroke: #13263f; stroke-width: 2; fill: none; }
.sv-bars rect { fill: #5eead4; fill-opacity: 0.7; }
.sv-label { font: 600 12px Inter, sans-serif; fill: #0f766e; }
.sv-title { font: 600 13px Inter, sans-serif; fill: #0f172a; }
.sv-head { font: 600 12px Inter, sans-serif; fill: #475569; }
.sv-cell { font: 400 12px Inter, sans-serif; fill: #0f172a; }
.sv-rule { stroke: #0f172a; stroke-width: 1; }
.sv-mark { fill: #99f6e4; fill-opacity: 0.6; }
.sv-mark--2 { fill: #ccfbf1; }
.sv-chip { fill: #ccfbf1; stroke: #0f766e; stroke-width: 1; }
.sv-chip-text { font: 600 11px Inter, sans-serif; fill: #0f766e; }

.stat-figures { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat-figures li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-muted); font-size: 0.92rem; }
.stat-figures .stat-icon { color: var(--stat-accent); }
.stat-figures strong { color: var(--ink); margin-right: 2px; }
.stat-card { position: relative; }
.stat-card__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px; border-radius: 12px; background: var(--stat-accent-soft); color: var(--stat-accent); }
@media (max-width: 560px) { .stat-show__frame { aspect-ratio: 1 / 0.9; } }
