/*
 * ASERTIFKU
 * Arah desain: ramah dan tenang untuk remaja, satu motif identitas berupa gelembung percakapan
 * (inti aplikasi adalah cara berbicara saat menolak).
 * Warna: teal sebagai warna utama (tenang, tidak menghakimi), oranye sebagai satu aksen
 * (logo "KU", penanda langkah berikutnya), merah/kuning/hijau hanya untuk makna kategori.
 * Huruf: Poppins untuk judul (bulat, bersahabat), Nunito untuk teks (mudah dibaca di HP).
 */

:root {
    --bg: #f2f6f5;
    --surface: #ffffff;
    --surface-2: #e5efec;
    --ink: #132523;
    --ink-soft: #46605c;
    --line: #cddbd8;
    --primary: #0f766e;
    --primary-hover: #0b5f58;
    --primary-ink: #ffffff;
    --primary-soft: #d3eeea;
    --accent: #b03a0a;
    --accent-soft: #fde6d8;
    --low: #b42318;
    --low-soft: #fde4e1;
    --mid: #8a5a00;
    --mid-soft: #fbefcf;
    --high: #157a3c;
    --high-soft: #d9f3e2;
    --neutral-soft: #e8ecec;
    --focus: #0f766e;
    --shadow: 0 1px 2px rgba(19, 37, 35, .06), 0 4px 14px rgba(19, 37, 35, .06);

    --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
    --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --bubble-radius: 18px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0d1716;
        --surface: #142220;
        --surface-2: #1b2d2a;
        --ink: #e2eeeb;
        --ink-soft: #a4bab6;
        --line: #2a403c;
        --primary: #2cc5b3;
        --primary-hover: #5ad6c7;
        --primary-ink: #04201d;
        --primary-soft: #133b36;
        --accent: #fb9a5b;
        --accent-soft: #3b2417;
        --low: #ff8a80;
        --low-soft: #3d1d1a;
        --mid: #f2c14e;
        --mid-soft: #362c13;
        --high: #5fd68b;
        --high-soft: #15331f;
        --neutral-soft: #22302e;
        --focus: #5ad6c7;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0d1716;
    --surface: #142220;
    --surface-2: #1b2d2a;
    --ink: #e2eeeb;
    --ink-soft: #a4bab6;
    --line: #2a403c;
    --primary: #2cc5b3;
    --primary-hover: #5ad6c7;
    --primary-ink: #04201d;
    --primary-soft: #133b36;
    --accent: #fb9a5b;
    --accent-soft: #3b2417;
    --low: #ff8a80;
    --low-soft: #3d1d1a;
    --mid: #f2c14e;
    --mid-soft: #362c13;
    --high: #5fd68b;
    --high-soft: #15331f;
    --neutral-soft: #22302e;
    --focus: #5ad6c7;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
    color-scheme: dark;
}

/* ---------- Dasar ---------- */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
}

h1, h2, h3, h4, .h3, .h4 {
    font-family: var(--font-display);
    line-height: 1.25;
    margin: 0 0 .5em;
    text-wrap: balance;
}

h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3, .h3 { font-size: 1.15rem; font-weight: 600; }
h4, .h4 { font-size: 1rem; font-weight: 600; }

p { margin: 0 0 .75em; }

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

img { max-width: 100%; height: auto; }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 4px;
}

a[href], button, summary, select, label[for], input[type="checkbox"], input[type="radio"],
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 50;
    background: var(--primary); color: var(--primary-ink);
    padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700;
}
.skip-link:focus { top: 12px; color: var(--primary-ink); }

.muted { color: var(--ink-soft); }
.text-low { color: var(--low); }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.pre { white-space: pre-line; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9rem; }

.wrap {
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.page {
    padding-block: 28px 56px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 60vh;
}

/* ---------- Kepala halaman ---------- */

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    flex-wrap: wrap;
}

.brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: .02em;
    color: var(--ink);
    text-decoration: none;
}
.brand span { color: var(--accent); }
.brand:hover { color: var(--ink); }

.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.top-actions form { margin: 0; }

.user-chip {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ink); text-decoration: none;
    padding: 4px 10px 4px 4px; border-radius: 999px; min-height: 44px;
}
.user-chip:hover, .user-chip[aria-current="page"] { background: var(--surface-2); color: var(--ink); }

.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary);
    font-family: var(--font-display); font-weight: 700; font-size: .85rem;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta small { color: var(--ink-soft); font-size: .78rem; }

.mainnav { border-top: 1px solid var(--line); }
.mainnav ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 4px;
    overflow-x: auto; scrollbar-width: thin;
}
.mainnav a {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 46px; padding: 0 12px;
    color: var(--ink-soft); text-decoration: none; font-weight: 700; white-space: nowrap;
    border-bottom: 3px solid transparent;
}
.mainnav a:hover { color: var(--ink); background: var(--surface-2); }
.mainnav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }

.count {
    min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 999px; background: var(--accent); color: #fff;
    font-size: .75rem; display: inline-grid; place-items: center;
    font-variant-numeric: tabular-nums;
}
:root[data-theme="dark"] .count { color: #2a1206; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .count { color: #2a1206; } }

.count-soft {
    font-size: .8rem; color: var(--ink-soft);
    background: var(--surface-2); border-radius: 999px; padding: 0 8px;
}

.site-footer { border-top: 1px solid var(--line); padding-block: 20px; color: var(--ink-soft); font-size: .9rem; }
.site-footer p { margin: 0; }

/* ---------- Tombol ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 0 18px;
    border-radius: var(--radius-sm); border: 2px solid transparent;
    font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; text-align: center;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-sm { min-height: 40px; padding: 0 12px; font-size: .9rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-ink); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost:active { background: var(--surface-2); }

.btn-danger { background: transparent; color: var(--low); border-color: var(--low-soft); }
.btn-danger:hover { background: var(--low-soft); color: var(--low); border-color: var(--low); }

.btn-fav { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.btn-fav:hover { color: var(--accent); background: transparent; }

.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* ---------- Formulir ---------- */

.form { display: flex; flex-direction: column; gap: 16px; }
.form > :last-child { margin-bottom: 0; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend { font-weight: 700; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.field-row-3 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.field-xs { max-width: 110px; }
.field-grow { flex: 1 1 260px; }

input[type="text"], input:not([type]), input[type="email"], input[type="password"], input[type="search"],
input[type="date"], input[type="number"], select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--primary); }
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: .8; }

.hint { color: var(--ink-soft); font-size: .88rem; margin: 0; }

.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; min-height: 44px; padding-block: 8px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.check-inline { align-self: end; }

.consent {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: .93rem;
}
.consent-title { font-family: var(--font-display); font-weight: 600; margin-bottom: 4px; }

.role-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.role-pick legend { font-weight: 700; margin-bottom: 6px; width: 100%; }
.role-opt, .pill-opt, .likert-opt, .star-opt { position: relative; }
.role-opt input, .pill-opt input, .likert-opt input, .star-opt input {
    position: absolute; opacity: 0; width: 1px; height: 1px;
}
.role-opt span, .pill-opt span {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
    border: 1.5px solid var(--line); border-radius: 999px; font-weight: 700; background: var(--surface);
}
.role-opt:hover span, .pill-opt:hover span { border-color: var(--primary); }
.role-opt input:checked + span, .pill-opt input:checked + span {
    background: var(--primary-soft); border-color: var(--primary); color: var(--primary);
}
.role-opt input:focus-visible + span, .pill-opt input:focus-visible + span,
.likert-opt input:focus-visible + span, .star-opt input:focus-visible + span,
.option input:focus-visible + span {
    outline: 3px solid var(--focus); outline-offset: 2px;
}
.pill-options { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-bar {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px;
}
.filter-bar .field { flex: 1 1 180px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; flex: 1 1 auto; min-width: 0; }
.inline-form .field { flex: 1 1 200px; }
.inline-form-wide .field-grow { flex: 10 1 260px; }

/* ---------- Pesan & status ---------- */

.alert {
    padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600;
    border: 1.5px solid;
}
.alert-success { background: var(--high-soft); border-color: var(--high); color: var(--ink); }
.alert-error { background: var(--low-soft); border-color: var(--low); color: var(--ink); }
.alert-info { background: var(--mid-soft); border-color: var(--mid); color: var(--ink); }
.alert-dismissible { display: flex; align-items: center; gap: 12px; padding-right: 8px; }
.alert-dismissible > p { margin: 0; flex: 1; min-width: 0; }
.alert-close {
    flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm);
    border: 0; background: transparent; color: var(--ink-soft);
    font-size: 1.5rem; line-height: 1; display: grid; place-items: center;
}
.alert-close:hover { background: var(--line); color: var(--ink); }
.alert-close:active { background: var(--ink-soft); color: var(--surface); }

.chip {
    display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
    font-size: .82rem; font-weight: 700; white-space: nowrap; vertical-align: middle;
}
.chip-low { background: var(--low-soft); color: var(--low); }
.chip-mid { background: var(--mid-soft); color: var(--mid); }
.chip-high { background: var(--high-soft); color: var(--high); }
.chip-neutral { background: var(--neutral-soft); color: var(--ink-soft); }
.chip-accent { background: var(--accent-soft); color: var(--accent); }

.empty {
    text-align: center; padding: 36px 20px;
    border: 2px dashed var(--line); border-radius: var(--radius);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.empty-title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; margin: 0; }
.empty p { max-width: 52ch; }

.notice {
    display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
    background: var(--accent-soft); border-radius: var(--radius); padding: 18px 20px;
}
.notice .bubble { max-width: 640px; }
.notice .bubble-guru { background: var(--surface); }

/* ---------- Kartu & tata letak ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    min-width: 0;
}
.card-quiet { background: var(--surface-2); border-color: transparent; }
.card > :last-child { margin-bottom: 0; }

.page-head { max-width: 72ch; }
.page-head p:last-child { margin-bottom: 0; }
.page-head-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head-row > div { max-width: 72ch; }
.crumb { font-size: .9rem; color: var(--ink-soft); margin-bottom: 4px; }

.section-title { font-size: 1.2rem; margin: 8px 0 0; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; align-items: start; }
.narrow { max-width: 640px; margin-inline: auto; width: 100%; }
.narrow-form { max-width: 720px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row-actions form { margin: 0; }

.plain-list { list-style: none; padding: 0; margin: 0 0 1em; }
.plain-list li {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--line);
}
.plain-list li:last-child { border-bottom: 0; }
.plain-list.compact li { padding: 6px 0; }
.plain-list.numbered { counter-reset: n; }
.plain-list.numbered li::before { counter-increment: n; content: counter(n) "."; color: var(--ink-soft); font-weight: 700; }
.plain-list.numbered li span { flex: 1; }

.checklist { padding-left: 0; list-style: none; margin: 0 0 1em; display: flex; flex-direction: column; gap: 8px; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before {
    content: ""; position: absolute; left: 4px; top: .45em;
    width: 12px; height: 7px; border-left: 3px solid var(--primary); border-bottom: 3px solid var(--primary);
    transform: rotate(-45deg);
}

details > summary { font-weight: 700; padding-block: 8px; }
.disclosure > summary { font-family: var(--font-display); font-weight: 600; }
.disclosure[open] > summary { margin-bottom: 12px; }
.danger-zone { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td { font-variant-numeric: tabular-nums; }

.nowrap { white-space: nowrap; }
.row-actions.nowrap { flex-wrap: nowrap; }
.pendaftar strong { display: block; }
.pendaftar .muted { display: block; font-size: .85rem; overflow-wrap: anywhere; }
/* ---------- Persetujuan akun ---------- */

.approval-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }

/* Pilihan bersegmen: bayangan tipis hanya pada segmen aktif, sebagai penanda mana yang sedang dipilih. */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.seg a {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
    border-radius: var(--radius-sm); font-weight: 700; color: var(--ink-soft); text-decoration: none;
}
.seg a:hover { color: var(--ink); }
.seg a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg-n { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-soft); }

.card.approval { padding: 0; overflow: hidden; }
.approval-head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
    padding: 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.approval-head p { margin: 0; flex: 1 1 240px; }
.approval-head .check { padding-block: 0; min-height: 40px; align-self: center; align-items: center; }
.approval-head .check input { margin-top: 0; }

.approval-list { list-style: none; margin: 0; padding: 0; }
.approval-item {
    display: flex; align-items: center; gap: 14px 16px; flex-wrap: wrap;
    padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.approval-item:last-child { border-bottom: 0; }
.approval-check { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.approval-who { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.approval-who .muted { font-size: .88rem; overflow-wrap: anywhere; }
.approval-meta { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; flex: 2 1 300px; }
/* Lebar minimum per kolom supaya label sejajar dari baris ke baris. */
.approval-meta > div { min-width: 64px; }
.approval-meta > div:nth-last-child(2) { min-width: 128px; }
.approval-meta > div:last-child { min-width: 168px; }
.approval-meta dt { font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.approval-meta dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.approval-item .row-actions { flex: none; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Motif: gelembung percakapan ---------- */

.convo { display: flex; flex-direction: column; gap: 10px; }

.bubble {
    position: relative;
    max-width: min(560px, 92%);
    padding: 10px 16px 12px;
    border-radius: var(--bubble-radius);
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.bubble .who {
    display: block; font-size: .78rem; font-weight: 800; letter-spacing: .01em;
    margin-bottom: 2px; opacity: .85;
}
.bubble-friend {
    align-self: flex-start;
    background: var(--surface-2);
    color: var(--ink);
    border-bottom-left-radius: 4px;
}
.bubble-me {
    align-self: flex-end;
    background: var(--primary);
    color: var(--primary-ink);
    border-bottom-right-radius: 4px;
}
.bubble-example { background: var(--primary-soft); color: var(--ink); }
.bubble-guru {
    align-self: flex-start;
    background: var(--accent-soft);
    color: var(--ink);
    border-bottom-left-radius: 4px;
    margin-top: 6px;
}
.narasi { color: var(--ink-soft); font-style: italic; margin: 0; }

/* ---------- Halaman depan ---------- */

.landing { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.landing-intro { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; }
.landing-intro h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); max-width: 16ch; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 58ch; }
.landing .convo { max-width: 480px; padding: 18px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }

.feature-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; }
.feature-list div { border-top: 2px solid var(--primary); padding-top: 10px; }
.feature-list dt { font-family: var(--font-display); font-weight: 600; }
.feature-list dd { margin: 4px 0 0; color: var(--ink-soft); font-size: .95rem; }

.auth-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 8px 20px 24px;
    position: sticky; top: 84px;
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs [role="tab"], .tabs-links a {
    flex: 1 0 auto; min-height: 48px; padding: 0 14px;
    background: none; border: 0; border-bottom: 3px solid transparent;
    font: inherit; font-weight: 700; color: var(--ink-soft);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none;
}
.tabs [role="tab"]:hover, .tabs-links a:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"], .tabs-links a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }
.tabs-links { margin-bottom: 0; }
.js .tabpanel[data-hidden] { display: none; }
/* Panel bukan kontrol: fokus ditunjukkan di kolom isian di dalamnya, bukan di seluruh panel. */
.tabpanel:focus, .tabpanel:focus-visible { outline: none; }

/* ---------- Beranda siswa ---------- */

.stat-strip {
    margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.stat-strip > div { padding: 16px 20px; border-right: 1px solid var(--line); min-width: 0; }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip dt { font-size: .85rem; color: var(--ink-soft); font-weight: 700; }
.stat-strip dd { margin: 4px 0 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.stat-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-empty { color: var(--ink-soft); font-weight: 700; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.tile h3 { margin-bottom: 4px; }
.tile p { margin: 0; }
.tile-status { color: var(--ink-soft); font-size: .9rem; font-weight: 700; margin-top: 6px !important; }
.tile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
/* Satu kartu disorot sebagai langkah berikutnya: fokus utama beranda siswa. */
.tile-next { grid-column: 1 / -1; border: 2px solid var(--accent); }
.tile-flag { font-size: .8rem; font-weight: 800; color: var(--accent); }

/* ---------- Assessment & hasil ---------- */

.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width .25s ease; }

.stepper { display: flex; flex-direction: column; gap: 20px; }
.stepper-progress p { font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.step legend { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin-bottom: 14px; line-height: 1.4; }
.step + .step { border-top: 1px solid var(--line); padding-top: 20px; }
.js .stepper .step + .step { border-top: 0; padding-top: 0; }
.js .stepper .step[data-hidden] { display: none; }
.step-no { color: var(--primary); }

.likert { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.likert-opt span, .star-opt span {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 56px; padding: 8px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; height: 100%;
}
.likert-opt:hover span, .star-opt:hover span { border-color: var(--primary); }
.likert-opt input:checked + span, .star-opt input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

.stepper-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
[data-step-prev], [data-step-next] { display: none; }
.js [data-step-prev], .js [data-step-next] { display: inline-flex; }
.js [data-step-submit][data-hidden], .js [data-step-next][data-hidden], .js [data-step-prev][data-hidden] { display: none; }

.result {
    display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 28px;
    background: var(--surface); border-radius: var(--radius); padding: 24px;
    border: 1px solid var(--line); border-top: 6px solid var(--primary);
}
.result-low { border-top-color: var(--low); }
.result-mid { border-top-color: var(--mid); }
.result-high { border-top-color: var(--high); }
.score-big { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.score-big span { font-size: 4rem; font-weight: 700; color: var(--ink); line-height: 1; }
.meter { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.meter span { display: block; height: 100%; background: var(--primary); }
.result-low .meter span { background: var(--low); }
.result-mid .meter span { background: var(--mid); }
.result-high .meter span { background: var(--high); }
.result-text h2 { font-size: 1.4rem; }

/* ---------- Modul & kuis ---------- */

.slides { display: flex; flex-direction: column; gap: 14px; }
.slides-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-weight: 700; color: var(--ink-soft); }
.slides-bar p { margin: 0; }
.timer { font-variant-numeric: tabular-nums; }
.slide { padding: 24px; }
.slide-no { font-weight: 800; color: var(--accent); font-size: .85rem; margin-bottom: 4px; }
.js .slides .slide[data-hidden] { display: none; }
.slides-nav { display: none; justify-content: space-between; gap: 10px; }
.js .slides-nav { display: flex; }
.js .slides-nav [data-hidden] { visibility: hidden; }
.slide-end { border: 2px solid var(--primary); }

.prose { max-width: 68ch; font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; margin: 0 0 1em; }
.prose strong { color: var(--primary); }

.quiz { gap: 16px; }
.quiz-q legend { font-family: var(--font-display); font-weight: 600; margin-bottom: 12px; line-height: 1.4; }
.option-list { display: flex; flex-direction: column; gap: 8px; }
.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option span {
    display: block; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); min-height: 44px;
}
.option:hover span { border-color: var(--primary); }
.option input:checked + span { border-color: var(--primary); background: var(--primary-soft); }

.review-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.review { border-left-width: 1px; }
.review.is-right { border-color: var(--high); }
.review.is-wrong { border-color: var(--low); }
.review-q { font-weight: 700; }

.stars { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.stars legend { font-weight: 700; margin-bottom: 8px; }
.star-opt span { flex-direction: column; gap: 2px; font-size: .85rem; }
.star-opt strong { font-size: 1.2rem; }

/* ---------- Skenario ---------- */

.scenario-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.scenario-item {
    display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
.scenario-body { flex: 1 1 380px; min-width: 0; }
.scenario-body p { margin: 0; color: var(--ink-soft); }
.scenario-cat { font-size: .82rem; font-weight: 800; color: var(--accent) !important; margin-bottom: 2px !important; }
.scenario-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.scenario-side p { margin: 0; text-align: right; }

.scene { display: flex; flex-direction: column; gap: 20px; max-width: 820px; }
.scene-story .convo { padding: 8px 0; }
.feedback { border-top: 6px solid var(--line); }
.feedback-high { border-top-color: var(--high); }
.feedback-mid { border-top-color: var(--mid); }
.feedback-low { border-top-color: var(--low); }

/* ---------- Jurnal, refleksi, bank kalimat ---------- */

.journal-list { display: flex; flex-direction: column; gap: 14px; }
.journal { display: flex; flex-direction: column; gap: 8px; }
.journal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.journal-head h2, .journal-head p { margin: 0; }
.journal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.journal-actions form { margin: 0; }

.today {
    background: var(--primary); color: var(--primary-ink);
    border-radius: var(--bubble-radius); border-bottom-right-radius: 4px;
    padding: 20px 24px; max-width: 760px; align-self: flex-end; width: 100%;
}
.today h2 { color: inherit; opacity: .85; margin-bottom: 4px; }
.today-quote { font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem); font-weight: 600; margin: 0; }

.sentence-group h2 { margin-top: 8px; }
.sentence-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sentence { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.sentence .bubble { max-width: 100%; width: 100%; }
.sentence-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sentence-actions form { margin: 0; }

.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.timeline-item { display: flex; flex-direction: column; gap: 8px; }
.timeline-item p { margin: 0; }
.timeline-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.timeline-date { font-family: var(--font-display); font-weight: 600; }

/* ---------- Grafik & analisis ---------- */

.chart-box { position: relative; height: 300px; margin-bottom: 12px; }
.chart-sm { height: 230px; }
.chart-box canvas { max-width: 100%; }
.chart-status {
    position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
    color: var(--ink-soft); font-weight: 700; margin: 0; padding: 12px;
}
.chart-status[hidden] { display: none; }

.legend-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

.bar-list { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-direction: column; gap: 12px; }
.bar-list li { display: grid; grid-template-columns: minmax(0, 1fr) 46px; grid-template-areas: "label value" "track track"; gap: 4px 10px; }
.bar-label { grid-area: label; font-size: .92rem; }
.bar-value { grid-area: value; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.bar-track { grid-area: track; height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; }

.tone-low { background: var(--low); }
.tone-mid { background: var(--mid); }
.tone-high { background: var(--high); }
.tone-primary { background: var(--primary); }
.tone-neutral { background: var(--ink-soft); }

.stack-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.stack-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.stack-head p { margin: 0; }
.stack-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-2); margin: 6px 0; }
.stack-bar span { display: block; height: 100%; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; color: var(--ink-soft); margin: 0; }
.stack-legend strong { color: var(--ink); }

.quote-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.quote-list li { border-left: 3px solid var(--line); padding-left: 14px; }
.quote-list p { margin: 0; }

.template-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.template { text-align: left; height: auto; padding-block: 8px; }

/* ---------- Admin ---------- */

.edit-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.edit-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.edit-row > form { margin: 0; }
.edit-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.edit-main .bubble { align-self: flex-start; }
.edit-main p { margin: 0; }

/* ---------- Hero halaman depan ----------
   Foto siswa sebagai latar. Warna di sini sengaja tetap (putih di atas lapisan gelap)
   di mode terang maupun gelap, karena teks selalu berada di atas foto.
   Gradasi gelap ada untuk keterbacaan teks, lebih pekat di sisi judul. */

.lp-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(12px, 3vw, 36px);
}
.lp-copy { display: flex; flex-direction: column; gap: 18px; }
.lp-copy h1 { font-size: clamp(2.1rem, 1.2rem + 3.2vw, 3.6rem); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.lp-copy h1 em { font-style: normal; color: var(--primary); }
.lp-copy .lead { margin: 0; }
.lp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.lp-link { font-weight: 700; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.lp-link:hover { color: var(--primary); }
.lp-assure { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-soft); font-size: .93rem; font-weight: 600; }
.lp-assure li { padding-left: 22px; position: relative; }
.lp-assure li::before {
    content: ""; position: absolute; left: 2px; top: .5em;
    width: 10px; height: 6px; border-left: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary);
    transform: rotate(-45deg);
}

/* Kartu latihan: foto siswa di belakang, pertanyaan di depan. Bayangan dipakai hanya di sini
   dan di catatan mengambang, sebagai penanda bahwa kartu ini bisa dicoba. */
.shot-wrap { position: relative; padding-bottom: 26px; }
.shot {
    position: relative; isolation: isolate; overflow: hidden;
    border-radius: 26px; background: #0c1a18; color: #fff;
    box-shadow: 0 18px 40px rgba(12, 40, 36, .22);
    min-height: 430px; display: flex; flex-direction: column; justify-content: flex-end;
}
.shot-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 60% 25%; z-index: -2; }
.shot-placeholder { display: grid; place-items: start center; padding: 16px; background: #17302c; color: rgba(255, 255, 255, .8); font-weight: 700; font-size: .85rem; text-align: center; }
.shot-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 22, 20, .45) 0%, rgba(7, 22, 20, .82) 55%, rgba(7, 22, 20, .93) 100%); }
/* Ruang bawah 78px disisakan untuk catatan mengambang, supaya tidak menutupi pilihan. */
.shot-quiz { padding: 26px 24px 78px; }
.shot-quiz legend {
    font-family: var(--font-display); font-weight: 700; color: #fff;
    font-size: clamp(1.25rem, 1rem + 1.1vw, 1.65rem); line-height: 1.28; margin-bottom: 16px;
}
/* Legend di-float supaya mengikuti padding fieldset (bawaan browser menaruhnya di garis tepi). */
.shot-quiz legend { float: left; width: 100%; }
.shot-quiz .hq-opt { clear: both; }
.shot-kicker { display: block; font-family: var(--font-body); font-size: .85rem; font-weight: 700; color: rgba(255, 255, 255, .85); margin-bottom: 8px; }
.shot :focus-visible { outline-color: #fff; }
.shot-note {
    position: absolute; left: -22px; bottom: 0; max-width: 250px; z-index: 1;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line);
    border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow);
}
.shot-note p { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.shot-note p:first-child { color: var(--ink); font-size: .95rem; }

.lp-steps { border-top: 1px solid var(--line); padding-top: 28px; }
.lp-steps ol { list-style: none; counter-reset: langkah; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 40px; }
.lp-steps li { counter-increment: langkah; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; }
.lp-steps li::before {
    content: counter(langkah, decimal-leading-zero); grid-row: span 2;
    font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--primary); padding-top: 3px;
}
.lp-steps h3 { margin: 0 0 4px; }
.lp-steps p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

.auth-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 620px; margin-inline: auto; width: 100%; }
.auth-page .auth-card { position: static; }
.hq-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hq-opt {
    display: flex; align-items: center; min-height: 50px; padding: 12px 16px; margin-bottom: 10px;
    border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .08); color: #fff; font-weight: 600;
    transition: background-color .15s ease, border-color .15s ease;
}
.hq-opt:hover { border-color: #fff; background: rgba(255, 255, 255, .16); }
.hq-radio:focus-visible + .hq-opt { outline: 3px solid #fff; outline-offset: 2px; }
.hq-radio:checked + .hq-opt { background: #fff; border-color: #fff; color: #0b3f3a; }
.hq-fb { display: none; margin: 6px 0 0; color: rgba(255, 255, 255, .95); }
.hq-fb a { color: #fff; font-weight: 800; }
#hq-pasif:checked ~ .hq-feedback .hq-fb-pasif,
#hq-asertif:checked ~ .hq-feedback .hq-fb-asertif,
#hq-agresif:checked ~ .hq-feedback .hq-fb-agresif,
.hq-radio:checked ~ .hq-feedback .hq-fb-lanjut { display: block; }

.feature-steps {
    list-style: none; counter-reset: fitur; padding: 0; margin: 8px 0 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px 28px;
}
.feature-steps li { counter-increment: fitur; border-top: 2px solid var(--primary); padding-top: 10px; }
.feature-steps li::before {
    content: counter(fitur); font-family: var(--font-display); font-weight: 700;
    font-size: 1.4rem; color: var(--accent); line-height: 1.2;
}
.feature-steps h3 { margin: 2px 0 4px; }
.feature-steps p { margin: 0; color: var(--ink-soft); font-size: .97rem; }
.guru-note { background: var(--surface-2); border-radius: var(--radius); padding: 18px 20px; margin-top: 10px; }
.guru-note h3 { margin-bottom: 4px; }
.guru-note p { margin: 0; }
.photo-credit { margin: 0; font-size: .8rem; color: var(--ink-soft); }
#fitur, .auth-card { scroll-margin-top: 84px; }

/* ---------- Responsif ---------- */

@media (max-width: 900px) {
    .lp-hero { grid-template-columns: minmax(0, 1fr); }
    .shot-note { left: 12px; }
    .landing { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .auth-card { position: static; }
    .split-wide { grid-template-columns: minmax(0, 1fr); }
    .result { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

@media (max-width: 640px) {
    .page { padding-block: 20px 40px; gap: 18px; }
    .user-meta { display: none; }
    .tiles { grid-template-columns: minmax(0, 1fr); }
    .likert { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
    .stat-strip > div:last-child { border-bottom: 0; }
    .scenario-side { align-items: flex-start; }
    .scenario-side p { text-align: left; }
    .card, .tile, .slide { padding: 16px; }
    .result { padding: 18px; }
    .score-big span { font-size: 3.2rem; }
    .bubble { max-width: 100%; }
    .field-xs { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
