:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --ink: #13203a;
    --muted: #69758a;
    --line: #e3e8f0;
    --primary: #ff5b35;
    --primary-dark: #e54320;
    --navy: #111a2e;
    --navy-2: #182440;
    --success: #159a68;
    --warning: #d78a10;
    --danger: #d93d48;
    --shadow: 0 24px 70px rgba(25, 38, 64, .12);
    --radius: 22px;
    --radius-sm: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 6px rgba(255,91,53,.12); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), #ff8a4c); color: white; font-weight: 900; box-shadow: 0 10px 24px rgba(255,91,53,.28); }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.brand-light strong { color: #fff; }
.brand-light small { color: #aeb9cf; }
.primary-btn, .secondary-btn, .danger-btn { border: 0; border-radius: 14px; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 22px; font-weight: 800; transition: .2s ease; }
.primary-btn { color: #fff; background: linear-gradient(135deg, var(--primary), #ff7447); box-shadow: 0 12px 28px rgba(255,91,53,.24); }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(255,91,53,.31); }
.primary-btn:disabled { opacity: .65; cursor: wait; transform: none; }
.secondary-btn { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.secondary-btn:hover { border-color: #cbd3df; background: #fbfcfe; }
.danger-btn { color: #fff; background: var(--danger); }
.link-btn { text-decoration: none; }
.compact { min-height: 40px; padding: 0 16px; font-size: 13px; }
.alert { margin: 0 0 20px; border-radius: 14px; padding: 13px 15px; font-size: 14px; font-weight: 650; }
.alert-error { color: #9d2631; background: #fff0f2; border: 1px solid #ffd3d8; }
.alert-success { color: #08764e; background: #ebfff6; border: 1px solid #c4f0dd; }

/* Landing */
.landing-body { min-height: 100vh; background: radial-gradient(circle at 12% 12%, #fff3ed 0, transparent 30%), radial-gradient(circle at 86% 78%, #edf2ff 0, transparent 34%), #f6f8fc; overflow-x: hidden; position: relative; }
.ambient { position: fixed; border-radius: 50%; filter: blur(3px); pointer-events: none; opacity: .6; }
.ambient-one { width: 220px; height: 220px; right: -80px; top: 120px; background: rgba(255,91,53,.12); }
.ambient-two { width: 280px; height: 280px; left: -140px; bottom: 20px; background: rgba(48,82,164,.1); }
.topbar { min-height: 94px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.admin-link { font-size: 13px; color: var(--muted); font-weight: 750; padding: 10px 14px; border-radius: 12px; }
.admin-link:hover { color: var(--ink); background: rgba(255,255,255,.7); }
.landing-grid { min-height: calc(100vh - 155px); display: grid; grid-template-columns: 1.08fr .82fr; gap: 80px; align-items: center; padding: 50px 0 75px; position: relative; z-index: 1; }
.hero-copy h1 { margin: 19px 0; max-width: 720px; font-size: clamp(44px, 6vw, 76px); line-height: .99; letter-spacing: -.055em; }
.hero-copy > p { max-width: 700px; color: var(--muted); font-size: 18px; }
.feature-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0; }
.feature-pill { min-width: 135px; display: flex; align-items: center; gap: 9px; padding: 12px 15px; border: 1px solid rgba(215,222,233,.9); border-radius: 14px; background: rgba(255,255,255,.64); backdrop-filter: blur(10px); }
.feature-pill strong { font-size: 18px; }
.feature-pill span { color: var(--muted); font-size: 12px; font-weight: 700; }
.info-card { max-width: 690px; display: flex; gap: 15px; padding: 18px; border-radius: 17px; background: #17223b; color: white; box-shadow: 0 18px 45px rgba(19,32,58,.18); }
.info-icon { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.12); font-weight: 900; }
.info-card strong { font-size: 14px; }
.info-card p { margin: 3px 0 0; color: #c8d0df; font-size: 13px; }
.start-card { padding: 34px; border: 1px solid rgba(226,231,239,.9); border-radius: 28px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.card-heading { margin-bottom: 25px; }
.step-badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; color: var(--primary-dark); background: #fff0ea; font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.card-heading h2 { margin: 13px 0 4px; font-size: 27px; letter-spacing: -.03em; }
.card-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.start-form > label:not(.check-row) { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 58px; padding: 0 16px 0 55px; border: 1px solid var(--line); border-radius: 15px; outline: none; background: #fff; transition: .2s; }
.input-wrap input:focus { border-color: rgba(255,91,53,.7); box-shadow: 0 0 0 4px rgba(255,91,53,.1); }
.input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: #f2f4f8; color: var(--primary); font-size: 12px; font-weight: 900; }
.timer-summary { display: flex; align-items: center; justify-content: space-between; margin: 18px 0; padding: 15px 16px; border-radius: 14px; background: #f5f7fb; }
.timer-summary span { color: var(--muted); font-size: 13px; }
.timer-summary strong { color: var(--primary-dark); }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; color: var(--muted); font-size: 12px; }
.check-row input { margin-top: 3px; accent-color: var(--primary); }
.start-form .primary-btn { width: 100%; }
.closed-state { text-align: center; padding: 25px 10px 10px; }
.closed-icon { margin: auto; display: grid; place-items: center; width: 55px; height: 55px; border-radius: 50%; color: var(--danger); background: #fff0f2; font-size: 26px; font-weight: 900; }
.closed-state h3 { margin: 14px 0 4px; }
.closed-state p { color: var(--muted); }
.footer-note { min-height: 55px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }

/* Quiz */
.quiz-body { background: #f3f5f9; }
.quiz-header { position: sticky; top: 0; z-index: 50; background: rgba(17,26,46,.97); backdrop-filter: blur(14px); box-shadow: 0 8px 28px rgba(5,13,28,.18); }
.quiz-header-inner { min-height: 83px; display: flex; align-items: center; justify-content: space-between; }
.timer-box { min-width: 170px; display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 13px; padding: 10px 15px; border: 1px solid rgba(255,255,255,.11); border-radius: 14px; background: rgba(255,255,255,.06); }
.timer-label { color: #aeb9cf; font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.timer-box strong { grid-row: span 2; grid-column: 2; color: #fff; font-size: 25px; line-height: 1; letter-spacing: -.04em; }
.save-state { color: #7ddbb7; font-size: 10px; font-weight: 700; }
.save-state.saving { color: #ffd58e; }
.save-state.error { color: #ff9ca5; }
.timer-box.timer-warning { border-color: rgba(255,181,66,.35); background: rgba(215,138,16,.14); }
.timer-box.timer-danger { border-color: rgba(255,92,105,.45); background: rgba(217,61,72,.18); animation: timerPulse 1s infinite; }
@keyframes timerPulse { 50% { box-shadow: 0 0 0 5px rgba(217,61,72,.09); } }
.progress-track { height: 3px; background: rgba(255,255,255,.08); }
.progress-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #ffae64); transition: width .25s; }
.quiz-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 32px; padding: 35px 0 80px; }
.quiz-sidebar { position: sticky; top: 116px; align-self: start; }
.sidebar-card { padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.sidebar-card h2 { margin: 7px 0 20px; font-size: 20px; }
.meta-list { display: grid; gap: 11px; }
.meta-list div { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.meta-list strong { color: var(--ink); }
.mini-progress { height: 7px; margin: 18px 0; border-radius: 99px; background: #edf0f5; overflow: hidden; }
.mini-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #ff9b5f); transition: width .25s; }
.sidebar-help { margin: 0; color: var(--muted); font-size: 11px; }
.question-nav { display: grid; gap: 7px; margin-top: 14px; }
.question-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--muted); border-radius: 12px; font-size: 12px; font-weight: 750; }
.question-nav a:hover { color: var(--ink); background: #fff; }
.question-nav span { color: var(--primary); font-size: 10px; font-weight: 900; }
.quiz-intro-card { padding: 30px; margin-bottom: 25px; border-radius: 22px; color: white; background: linear-gradient(135deg, #182440, #11182a); overflow: hidden; position: relative; }
.quiz-intro-card::after { content: ''; position: absolute; width: 240px; height: 240px; right: -80px; top: -100px; border-radius: 50%; background: rgba(255,91,53,.13); }
.quiz-intro-card h1 { margin: 9px 0; font-size: clamp(25px, 4vw, 36px); letter-spacing: -.04em; position: relative; z-index: 1; }
.quiz-intro-card p { max-width: 690px; margin: 0; color: #c3ccdc; font-size: 14px; position: relative; z-index: 1; }
.question-group { margin-bottom: 30px; scroll-margin-top: 115px; }
.group-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.group-heading > div { display: flex; align-items: center; gap: 14px; }
.group-number { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 15px; color: var(--primary); background: #fff0eb; font-size: 13px; font-weight: 900; }
.group-heading h2 { margin: 1px 0 0; font-size: 21px; letter-spacing: -.025em; }
.group-count { padding: 7px 11px; border-radius: 999px; color: var(--muted); background: #e9edf4; font-size: 10px; font-weight: 800; }
.question-card { margin-bottom: 13px; padding: 24px; border: 1px solid var(--line); border-radius: 19px; background: #fff; transition: .2s; }
.question-card:focus-within { border-color: rgba(255,91,53,.52); box-shadow: 0 12px 35px rgba(29,40,64,.08); }
.question-card.is-answered { border-left: 4px solid var(--success); }
.question-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.question-number { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.certificate-badge { padding: 6px 10px; border-radius: 9px; color: #9c351e; background: #fff0eb; font-size: 11px; font-weight: 900; }
.question-card > label { display: block; margin-bottom: 15px; font-size: 15px; font-weight: 800; line-height: 1.5; }
.textarea-shell { position: relative; }
.textarea-shell textarea { width: 100%; resize: vertical; min-height: 145px; padding: 15px 15px 30px; border: 1px solid #dfe4ed; border-radius: 13px; outline: none; color: var(--ink); background: #fafbfc; line-height: 1.6; transition: .2s; }
.textarea-shell textarea:focus { border-color: rgba(255,91,53,.55); background: #fff; box-shadow: 0 0 0 4px rgba(255,91,53,.08); }
.char-count { position: absolute; right: 13px; bottom: 10px; color: #9aa4b5; font-size: 10px; }
.submit-card { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px; border-radius: 21px; background: #fff; border: 1px solid var(--line); }
.submit-card h2 { margin: 6px 0 2px; font-size: 20px; }
.submit-card p { margin: 0; color: var(--muted); font-size: 12px; }
.confirm-modal[hidden] { display: none; }
.confirm-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(7,14,28,.68); backdrop-filter: blur(6px); }
.modal-card { position: relative; width: min(440px, 100%); padding: 32px; text-align: center; border-radius: 23px; background: #fff; box-shadow: 0 25px 80px rgba(0,0,0,.25); }
.modal-icon { margin: auto; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: white; background: var(--success); font-size: 24px; }
.modal-card h2 { margin: 15px 0 7px; }
.modal-card p { margin: 0; color: var(--muted); }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.modal-actions > * { flex: 1; }
.modal-open { overflow: hidden; }

/* Finish */
.finish-body { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at center, #fff 0, #f2f5fa 72%); }
.finish-shell { padding: 40px 0; }
.finish-card { max-width: 760px; margin: auto; padding: 50px; text-align: center; border: 1px solid var(--line); border-radius: 28px; background: #fff; box-shadow: var(--shadow); }
.success-ring { margin: 0 auto 20px; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: #e9fff5; box-shadow: 0 0 0 12px #f5fffa; }
.success-ring span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: white; background: var(--success); font-size: 27px; font-weight: 900; }
.finish-card h1 { margin: 10px 0; font-size: clamp(32px, 5vw, 49px); letter-spacing: -.045em; }
.finish-card > p { margin: auto; max-width: 520px; color: var(--muted); }
.finish-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 30px 0; }
.finish-stats div { padding: 18px 12px; border-radius: 15px; background: #f6f8fb; }
.finish-stats span, .finish-stats strong { display: block; }
.finish-stats span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.finish-stats strong { margin-top: 6px; font-size: 13px; }

/* Admin */
.admin-body { min-height: 100vh; padding-left: 265px; background: #f3f5f9; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 265px; display: flex; flex-direction: column; padding: 28px 22px; color: white; background: linear-gradient(180deg, #131d34, #0e1628); z-index: 20; }
.admin-sidebar nav { display: grid; gap: 7px; margin: 43px 0 25px; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 12px; color: #aeb9cf; font-size: 13px; font-weight: 700; }
.admin-sidebar nav a span { color: #6f7d98; font-size: 9px; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-warning { margin-top: auto; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.045); }
.sidebar-warning strong { font-size: 12px; color: #ffb39f; }
.sidebar-warning p { margin: 5px 0 0; color: #93a0b9; font-size: 10px; }
.sidebar-actions { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.back-site, .logout-link { color: #aeb9cf; font-size: 11px; font-weight: 700; }
.logout-link { color: #ffb39f; }
.back-site:hover, .logout-link:hover { color: #fff; }
.admin-main { width: min(1220px, calc(100% - 55px)); margin: 0 auto; padding: 35px 0 70px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.admin-topbar h1 { margin: 4px 0 0; font-size: 30px; letter-spacing: -.04em; }
.quiz-status { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 11px; font-weight: 800; }
.quiz-status span { width: 8px; height: 8px; border-radius: 50%; }
.quiz-status.is-open span { background: var(--success); box-shadow: 0 0 0 5px rgba(21,154,104,.1); }
.quiz-status.is-closed span { background: var(--danger); box-shadow: 0 0 0 5px rgba(217,61,72,.1); }
.admin-section { scroll-margin-top: 25px; margin-bottom: 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.stat-card strong { display: block; margin: 10px 0 3px; font-size: 32px; letter-spacing: -.05em; }
.stat-card small { font-size: 10px; }
.admin-panel { padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.03em; }
.panel-note { padding: 7px 10px; border-radius: 999px; color: var(--muted); background: #f0f3f8; font-size: 10px; font-weight: 800; }
.settings-form > label, .form-grid label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 15px; margin-bottom: 15px; }
.settings-form input[type=text], .settings-form input[type=number], .settings-form input[type=password], .settings-form textarea, .reset-form input, .table-tools input { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: none; background: #fbfcfe; }
.settings-form input[type=text], .settings-form input[type=number], .settings-form input[type=password], .reset-form input, .table-tools input { height: 47px; padding: 0 13px; }
.settings-form textarea { padding: 12px 13px; resize: vertical; }
.settings-form input:focus, .settings-form textarea:focus, .reset-form input:focus, .table-tools input:focus { border-color: rgba(255,91,53,.55); box-shadow: 0 0 0 4px rgba(255,91,53,.08); }
.switch-row { margin: 18px 0; padding: 16px; display: flex !important; grid-template-columns: 1fr auto auto; align-items: center; border-radius: 14px; background: #f6f8fb; position: relative; }
.switch-row span { margin-right: auto; }
.switch-row strong, .switch-row small { display: block; }
.switch-row small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row i { width: 48px; height: 27px; border-radius: 99px; background: #cdd4df; position: relative; transition: .2s; }
.switch-row i::after { content: ''; position: absolute; top: 4px; left: 4px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 2px 7px rgba(0,0,0,.16); }
.switch-row input:checked + i { background: var(--success); }
.switch-row input:checked + i::after { transform: translateX(21px); }
.table-tools { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 13px; }
.table-tools input { max-width: 300px; }
.table-tools > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.table-wrap { overflow-x: auto; }
.result-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.result-table th { padding: 10px 12px; text-align: left; color: var(--muted); background: #f6f8fb; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.result-table th:first-child { border-radius: 10px 0 0 10px; }
.result-table th:last-child { border-radius: 0 10px 10px 0; }
.result-table td { padding: 15px 12px; border-bottom: 1px solid #edf0f4; font-size: 12px; vertical-align: middle; }
.result-table td:first-child strong, .result-table td:first-child small { display: block; }
.result-table td:first-child small { margin-top: 3px; color: #9aa4b5; font-size: 9px; }
.status-badge { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.status-submitted { color: #08764e; background: #e8fbf3; }
.status-timed_out { color: #a66a0c; background: #fff5df; }
.status-in_progress { color: #275cb1; background: #eaf1ff; }
.table-action { color: var(--primary-dark); font-size: 11px; font-weight: 850; white-space: nowrap; }
.empty-cell { text-align: center; color: var(--muted); padding: 35px !important; }
.danger-panel { border-color: #f4d9dc; }
.danger-panel p { color: var(--muted); font-size: 13px; }
.reset-form { display: flex; gap: 10px; max-width: 520px; }
.reset-form input { flex: 1; }



/* Admin Login */
.admin-login-body { min-height: 100vh; display: grid; place-items: center; padding: 35px 20px; overflow-x: hidden; position: relative; background: radial-gradient(circle at 15% 12%, #fff0e9 0, transparent 32%), radial-gradient(circle at 88% 85%, #e9efff 0, transparent 35%), #f4f6fa; }
.login-ambient { position: fixed; border-radius: 50%; pointer-events: none; filter: blur(5px); }
.login-ambient-one { width: 260px; height: 260px; top: -100px; right: -70px; background: rgba(255,91,53,.12); }
.login-ambient-two { width: 300px; height: 300px; bottom: -140px; left: -90px; background: rgba(29,62,139,.1); }
.admin-login-shell { width: min(100%, 455px); position: relative; z-index: 2; }
.login-brand { margin: 0 auto 20px; display: flex; width: max-content; }
.login-brand strong { color: var(--ink); }
.admin-login-card { padding: 38px; border: 1px solid rgba(224,229,238,.95); border-radius: 26px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.login-lock { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--navy), #273a65); font-size: 25px; font-weight: 900; box-shadow: 0 12px 26px rgba(17,26,46,.22); }
.admin-login-card h1 { margin: 7px 0 6px; font-size: 31px; letter-spacing: -.045em; }
.admin-login-card > p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.admin-login-form { display: grid; gap: 17px; }
.admin-login-form > label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 800; }
.login-input-wrap { position: relative; }
.login-input-wrap > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--primary-dark); background: #fff0ea; font-size: 10px; font-weight: 900; }
.login-input-wrap input { width: 100%; height: 55px; padding: 0 62px 0 55px; border: 1px solid var(--line); border-radius: 14px; outline: none; background: #fbfcfe; }
.login-input-wrap input:focus { border-color: rgba(255,91,53,.6); box-shadow: 0 0 0 4px rgba(255,91,53,.09); }
.password-toggle { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); min-width: 47px; height: 34px; border: 0; border-radius: 9px; color: var(--muted); background: #eef1f6; font-size: 9px; font-weight: 800; }
.admin-login-form .primary-btn { width: 100%; margin-top: 3px; }
.login-back { display: block; margin-top: 22px; text-align: center; color: var(--muted); font-size: 11px; font-weight: 750; }
.login-footnote { margin: 16px 0 0; text-align: center; color: #8b96a8; font-size: 10px; }
.form-help { margin: 10px 0 16px; color: var(--muted); font-size: 11px; }
.security-grid { grid-template-columns: 1fr 1fr; }

/* Detail */
.detail-body { background: #f4f6fa; }
.detail-header { border-bottom: 1px solid var(--line); background: #fff; }
.detail-header .container { min-height: 72px; display: flex; align-items: center; justify-content: space-between; }
.detail-header a { color: var(--muted); font-size: 12px; font-weight: 800; }
.detail-main { padding: 40px 0 70px; }
.detail-summary { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.detail-summary h1 { margin: 4px 0; font-size: 38px; letter-spacing: -.045em; }
.detail-summary p { margin: 0; color: var(--muted); }
.detail-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 25px; }
.detail-meta div { padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.detail-meta span, .detail-meta strong { display: block; }
.detail-meta span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-meta strong { margin-top: 6px; font-size: 12px; }
.answer-list { display: grid; gap: 13px; }
.answer-card { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.answer-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.answer-head span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.answer-head strong { padding: 5px 9px; color: var(--primary-dark); background: #fff0eb; border-radius: 8px; font-size: 10px; }
.answer-card h2 { margin: 12px 0; font-size: 15px; line-height: 1.5; }
.answer-text { padding: 15px; border-radius: 12px; background: #f7f9fc; font-size: 13px; white-space: normal; }
.answer-text.is-empty { color: #a0a8b6; font-style: italic; }

@media (max-width: 1020px) {
    .landing-grid { grid-template-columns: 1fr; gap: 35px; padding-top: 25px; }
    .hero-copy { text-align: center; }
    .hero-copy > p, .info-card { margin-inline: auto; }
    .feature-row { justify-content: center; }
    .start-card { max-width: 620px; width: 100%; margin: auto; }
    .quiz-layout { grid-template-columns: 1fr; }
    .quiz-sidebar { position: static; }
    .question-nav { display: none; }
    .admin-body { padding-left: 0; }
    .admin-sidebar { position: static; width: auto; min-height: auto; flex-direction: row; align-items: center; gap: 20px; padding: 15px 20px; }
    .admin-sidebar nav, .sidebar-warning { display: none; }
    .sidebar-actions { margin: 0 0 0 auto; }
    .logout-link { margin-left: 14px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    .container { width: min(100% - 24px, 1180px); }
    .topbar { min-height: 75px; }
    .admin-link { font-size: 0; }
    .admin-link::after { content: 'Admin'; font-size: 11px; }
    .landing-grid { padding: 25px 0 55px; }
    .hero-copy h1 { font-size: 42px; }
    .hero-copy > p { font-size: 15px; }
    .feature-row { display: grid; grid-template-columns: repeat(3, 1fr); }
    .feature-pill { min-width: 0; flex-direction: column; gap: 0; }
    .start-card { padding: 24px; }
    .footer-note { display: none; }
    .quiz-header-inner { min-height: 76px; }
    .brand-light small { max-width: 95px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .timer-box { min-width: 146px; padding: 9px 11px; }
    .timer-box strong { font-size: 21px; }
    .quiz-layout { padding-top: 18px; }
    .quiz-intro-card { padding: 23px; }
    .group-heading { align-items: flex-end; }
    .group-count { display: none; }
    .question-card { padding: 18px; }
    .submit-card { align-items: stretch; flex-direction: column; }
    .modal-actions { flex-direction: column; }
    .finish-card { padding: 32px 20px; }
    .finish-stats { grid-template-columns: 1fr; }
    .admin-sidebar .brand > span:last-child { display: none; }
    .admin-main { width: min(100% - 24px, 1220px); padding-top: 22px; }
    .admin-topbar { align-items: flex-start; gap: 14px; }
    .admin-topbar h1 { font-size: 24px; }
    .quiz-status { padding: 8px 10px; font-size: 9px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 16px; }
    .form-grid, .security-grid { grid-template-columns: 1fr; }
    .panel-heading { align-items: flex-start; }
    .panel-note { display: none; }
    .reset-form { flex-direction: column; }
    .detail-summary { align-items: flex-start; flex-direction: column; }
    .detail-meta { grid-template-columns: 1fr 1fr; }
    .admin-login-card { padding: 28px 22px; }
    .admin-login-card h1 { font-size: 27px; }
}
@media print {
    body { background: #fff; }
    .no-print { display: none !important; }
    .detail-main { padding: 0; width: 100%; }
    .answer-card, .detail-meta div { break-inside: avoid; box-shadow: none; }
}


/* Landing page simplified */
.centered-topbar { position: relative; }
.brand-logo { gap: 14px; }
.brand-logo-image { width: 230px; height: auto; display: block; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-size: 22px; letter-spacing: -.03em; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.landing-single { min-height: calc(100vh - 175px); display: grid; place-items: center; padding: 25px 0 55px; position: relative; z-index: 1; }
.start-card-centered { width: min(100%, 680px); margin: 0 auto; }
.center-heading { text-align: center; }
.card-title-main { margin: 14px 0 10px; font-size: clamp(32px, 5vw, 52px); line-height: 1.05; letter-spacing: -.045em; }
.center-heading p { max-width: 560px; margin: 0 auto; color: var(--muted); font-size: 15px; }
.feature-row-centered { justify-content: center; }
.compact-pills { margin: 28px 0 24px; }
.full-btn { width: 100%; }
.footer-center { justify-content: center; gap: 22px; }

@media (max-width: 1020px) {
  .landing-single { min-height: auto; padding-top: 15px; }
}

@media (max-width: 680px) {
  .centered-topbar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 0 8px; }
  .brand-logo-image { width: 190px; }
  .brand-copy strong { font-size: 18px; }
  .brand-copy small { font-size: 9px; }
  .start-card-centered { padding: 22px; }
  .card-title-main { font-size: 34px; }
  .compact-pills { grid-template-columns: repeat(3,1fr); }
  .footer-center { display: none; }
}
