:root {
  --ink: #14243c;
  --heading: #10233c;
  --muted: #66758a;
  --line: #dfe6ed;
  --border-soft: #edf1f4;
  --input-border: #ccd7df;
  --soft: #f5f8fa;
  --surface-2: #f6f9fa;
  --paper: #ffffff;
  --navy: #10233c;
  --navy-2: #183754;
  --teal: #10a69a;
  --teal-dark: #087d75;
  --teal-soft: #e8f8f6;
  --violet: #7059c5;
  --violet-soft: #f0edfc;
  --amber: #e6a82d;
  --amber-soft: #fff5dc;
  --red: #d34c5d;
  --red-soft: #fff0f2;
  --green: #168c68;
  --green-soft: #e9f8f1;
  --blue: #3f78c8;
  --overlay: rgba(255, 255, 255, .65);
  --overlay-strong: rgba(255, 255, 255, .96);
  --shadow: 0 14px 42px rgba(23, 47, 75, 0.09);
  --radius: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #dfe7ee;
    --heading: #f3f7fb;
    --muted: #93a7bb;
    --line: #24374c;
    --border-soft: #1c2c3e;
    --input-border: #34506a;
    --soft: #0a121c;
    --surface-2: #17273a;
    --paper: #101c2c;
    --overlay: rgba(8, 15, 24, .6);
    --overlay-strong: rgba(9, 17, 27, .92);
    --shadow: 0 14px 42px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink: #dfe7ee;
  --heading: #f3f7fb;
  --muted: #93a7bb;
  --line: #24374c;
  --border-soft: #1c2c3e;
  --input-border: #34506a;
  --soft: #0a121c;
  --surface-2: #17273a;
  --paper: #101c2c;
  --overlay: rgba(8, 15, 24, .6);
  --overlay-strong: rgba(9, 17, 27, .92);
  --shadow: 0 14px 42px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--soft); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--soft); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; transition: background-color .15s ease, color .15s ease; }
body.nav-open-lock { overflow: hidden; }
input, select, textarea, dialog { color: var(--ink); background: var(--paper); }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); }
button, input, select, textarea { font: inherit; }
button, .button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.topbar { position: sticky; top: 0; z-index: 40; min-height: 76px; display: flex; align-items: center; gap: 32px; padding: 0 max(34px, calc((100% - 1180px) / 2)); color: #fff; background: linear-gradient(120deg, #0c2038, #153b53); box-shadow: 0 6px 24px rgba(9, 28, 48, 0.2); }
.admin-topbar { gap: 20px; background: linear-gradient(120deg, #241a3d, #3c2a5c); }
.admin-badge { padding: 4px 10px; color: #e2d8ff; background: rgba(255, 255, 255, .1); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 170px; color: #fff; font-size: 20px; letter-spacing: -0.03em; }
.brand:hover { color: #fff; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand strong { color: #62d5c8; }
.brand small { margin-top: 6px; color: #9fb2c4; font-size: 9px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.brand-mark { width: 39px; height: 43px; display: inline-grid; place-items: center; flex: 0 0 auto; color: #fff; background: linear-gradient(155deg, #1ec6b7, #0c8d84); border: 2px solid rgba(255,255,255,.5); border-radius: 10px 10px 15px 15px; font-weight: 900; box-shadow: inset 0 -5px 10px rgba(0,0,0,.12); }
.brand-mark.large { width: 56px; height: 61px; font-size: 27px; border-radius: 15px 15px 21px 21px; }
.main-nav { display: flex; align-items: stretch; align-self: stretch; gap: 4px; }
.main-nav a { position: relative; display: flex; align-items: center; padding: 0 12px; color: #b9c8d5; font-size: 14px; font-weight: 650; }
.main-nav a:hover, .main-nav a.active { color: #fff; }
.main-nav a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: #41cbbb; border-radius: 5px 5px 0 0; }
.theme-toggle { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; margin-left: auto; border: 1px solid rgba(255,255,255,.16); color: #fff; background: rgba(255,255,255,.06); border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; transition: background .15s ease, transform .15s ease; }
.theme-toggle:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.user-menu { position: relative; margin-left: 12px; }
.user-menu-trigger { display: flex; align-items: center; gap: 10px; border: 0; padding: 8px 9px; color: #fff; background: none; border-radius: 12px; cursor: pointer; }
.user-menu-trigger:hover, .user-menu-trigger[aria-expanded="true"] { background: rgba(255, 255, 255, .08); }
.avatar { width: 35px; height: 35px; flex: none; display: grid; place-items: center; overflow: hidden; color: #14364d; background: #a9eee5; border-radius: 50%; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.large { width: 62px; height: 62px; font-size: 24px; }
.profile-fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 30px; padding: 4px 2px; }
.profile-fact-grid small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.profile-fact-grid strong { color: var(--ink); font-size: 14px; font-weight: 650; }
.field-error { color: var(--red); font-size: 12px; font-weight: 700; }
.profile-summary { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.avatar-upload { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.avatar-upload-actions { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.avatar-upload-actions form { display: contents; }
.avatar-upload-actions .text-button { padding: 3px 4px; font-size: 11px; }
.profile-summary h2 { margin: 0; font-size: 21px; }
.profile-summary p { display: flex; align-items: center; gap: 8px; margin: 5px 0; color: var(--muted); font-size: 13px; }
.profile-summary small { color: var(--muted); font-size: 11px; }
.user-name { display: flex; flex-direction: column; min-width: 94px; text-align: left; font-size: 13px; line-height: 1.2; }
.user-name small { margin-top: 4px; color: #91a8ba; font-size: 10px; text-transform: capitalize; }
.user-menu-caret { color: #91a8ba; font-size: 12px; transition: transform .15s; }
.user-menu-trigger[aria-expanded="true"] .user-menu-caret { transform: rotate(180deg); }
.user-menu-dropdown { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: 230px; display: flex; flex-direction: column; padding: 8px; background: var(--paper); border-radius: 13px; box-shadow: 0 15px 40px rgba(10, 30, 50, .22); }
.user-menu-dropdown a, .user-menu-dropdown .text-button { display: flex; align-items: center; min-height: 38px; padding: 0 11px; color: var(--ink); border-radius: 9px; font-size: 13px; font-weight: 650; }
.user-menu-dropdown a:hover, .user-menu-dropdown .text-button:hover { color: var(--teal-dark); background: var(--teal-soft); }
.user-menu-dropdown a[href^="/admin"] { color: var(--violet); }
.user-menu-dropdown hr { margin: 6px 4px; }
.user-menu-dropdown form { display: contents; }
.user-menu-dropdown .text-button { width: 100%; border: 0; background: none; padding: 0 11px; cursor: pointer; }
.text-button { border: 0; padding: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.text-button:hover { color: var(--teal-dark); }
.nav-toggle { display: none; border: 0; color: #fff; background: transparent; font-size: 23px; }
.mobile-avatar-link { display: none; }
.mobile-avatar-link:hover { color: #14364d; }
.nav-backdrop { position: fixed; inset: 0; z-index: 65; border: 0; padding: 0; background: rgba(4, 12, 22, .55); cursor: default; }

.page-shell { width: min(1320px, calc(100% - 48px)); min-height: calc(100vh - 130px); margin: 0 auto; padding: 35px 0 56px; }
.page-shell.narrow { width: min(1030px, calc(100% - 48px)); }
.site-footer { min-height: 54px; display: flex; justify-content: space-between; align-items: center; padding: 0 max(34px, calc((100% - 1320px)/2)); border-top: 1px solid var(--line); color: var(--muted); background: var(--surface-2); font-size: 12px; }
.eyebrow { margin: 0 0 8px; color: var(--teal-dark); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.accent { color: var(--violet); }
.muted { color: var(--muted); }

.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; padding: 9px 18px; border-radius: 11px; cursor: pointer; font-weight: 750; font-size: 14px; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: linear-gradient(135deg, #0da99d, #088b83); box-shadow: 0 8px 18px rgba(11, 155, 145, .18); }
.button.primary:hover { color: #fff; background: linear-gradient(135deg, #13b9ac, #087b75); }
.button.secondary { color: var(--teal-dark); border-color: #a8dcd7; background: var(--teal-soft); }
.button.ghost { color: var(--muted); border-color: var(--line); background: var(--paper); }
.button.small { min-height: 35px; padding: 6px 12px; border-radius: 9px; font-size: 12px; }
.button.wide { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 22px; }

.alert { margin-bottom: 18px; border: 1px solid; padding: 13px 16px; border-radius: 11px; font-size: 14px; }
.alert.error { color: #9c2f3d; border-color: #f1b9c0; background: var(--red-soft); }
.alert.success { color: #116d53; border-color: #a9dfcb; background: var(--green-soft); }

.hero-card { min-height: 250px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: center; gap: 36px; overflow: hidden; position: relative; padding: 40px 46px; color: #fff; background: radial-gradient(circle at 88% 30%, rgba(50, 211, 193, .22), transparent 24%), linear-gradient(115deg, #112842, #173c56); border-radius: 24px; box-shadow: var(--shadow); }
.hero-card::after { content: ""; position: absolute; width: 330px; height: 330px; right: -120px; bottom: -220px; border: 34px solid rgba(111, 226, 214, .08); border-radius: 50%; }
.hero-card .eyebrow { color: #6edcd0; }
.hero-card h1 { max-width: 690px; margin: 0; font-size: clamp(26px, 3vw, 40px); line-height: 1.15; letter-spacing: -.035em; }
.hero-card p:not(.eyebrow) { max-width: 700px; margin: 13px 0 0; color: #c1d0dc; }
.hero-card .button.secondary { color: #d4e5ed; border-color: #557086; background: rgba(255,255,255,.05); }
.hero-score { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px solid rgba(125, 226, 214, .3); background: rgba(11, 36, 56, .45); border-radius: 50%; text-align: center; box-shadow: inset 0 0 0 12px rgba(255,255,255,.025); }
.hero-score .score-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-score .score-ring circle { transition: stroke-dashoffset .5s ease; }
.hero-score span, .hero-score strong, .hero-score small { position: relative; z-index: 1; }
.hero-score span { color: #a9bbc7; font-size: 12px; }
.hero-score strong { margin: 3px 0; color: #6fe2d5; font-size: 48px; line-height: 1; }
.hero-score small { color: #9fb2bf; font-size: 11px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.metric-card { min-height: 120px; display: flex; align-items: center; gap: 15px; padding: 22px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(25, 47, 71, .045); }
.metric-card > div { min-width: 0; display: flex; flex-direction: column; }
.metric-card small { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.metric-card strong { margin: 2px 0; color: var(--heading); font-size: 26px; line-height: 1.2; }
.metric-card span:not(.metric-icon), .metric-card a { color: var(--muted); font-size: 11px; }
.metric-card a { color: var(--teal-dark); font-weight: 700; }
.metric-icon { width: 45px; height: 45px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; font-size: 20px; font-weight: 900; }
.metric-icon.teal { color: var(--teal-dark); background: var(--teal-soft); }
.metric-icon.violet { color: var(--violet); background: var(--violet-soft); }
.metric-icon.amber { color: #b87e13; background: var(--amber-soft); }
.metric-icon.blue { color: var(--blue); background: #eaf2fd; }

.two-column { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.panel { min-width: 0; border: 1px solid var(--line); padding: 24px; background: var(--paper); border-radius: var(--radius); box-shadow: 0 7px 25px rgba(21, 45, 71, .045); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.panel-heading h2 { margin: 0; font-size: 19px; }
.panel-heading a { font-size: 12px; font-weight: 750; }
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid #edf1f4; color: var(--ink); }
.activity-item:first-child { border-top: 0; }
.activity-item > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.activity-item strong { font-size: 13px; }
.activity-item small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.activity-item time { color: var(--muted); font-size: 10px; }
.result-dot { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.result-dot.correct { color: var(--green); background: var(--green-soft); }
.result-dot.wrong { color: var(--red); background: var(--red-soft); }
.area-list { display: flex; flex-direction: column; gap: 12px; }
.area-item { display: flex; flex-direction: column; gap: 8px; padding: 13px 14px; background: var(--surface-2); border-radius: 11px; }
.area-item-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.area-item-head > span { min-width: 0; display: flex; flex-direction: column; }
.area-item strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.area-item small { color: var(--muted); font-size: 10px; }
.area-item b { flex: none; color: var(--teal-dark); font-size: 14px; }
.area-bar { position: relative; height: 7px; background: var(--border-soft); border-radius: 999px; }
.area-bar i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.area-bar em { position: absolute; top: -3px; width: 2px; height: 13px; margin-left: -1px; background: var(--ink); border-radius: 2px; font-style: normal; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 25px; }
.page-heading h1 { margin: 0; color: var(--heading); font-size: clamp(28px, 3vw, 38px); letter-spacing: -.035em; }
.page-heading p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); }
.filter-bar { display: grid; grid-template-columns: 1.7fr repeat(3, minmax(135px, .7fr)) auto auto auto; gap: 11px; align-items: end; padding: 18px; border: 1px solid var(--line); background: var(--paper); border-radius: 16px; box-shadow: 0 6px 24px rgba(20, 47, 72, .045); }
.filter-bar label, .stack-form label, .study-form > label, .admin-form label { display: flex; flex-direction: column; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 700; }
.filter-bar input, .filter-bar select, .stack-form input, .study-form select, .admin-form input, .admin-form select, .admin-form textarea { width: 100%; border: 1px solid var(--input-border); padding: 10px 12px; color: var(--ink); background: var(--paper); border-radius: 9px; outline: 0; }
.filter-bar input:focus, .filter-bar select:focus, .stack-form input:focus, .study-form select:focus, .admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 165, 154, .11); }
.filter-bar .check-line { min-height: 43px; flex-direction: row; align-items: center; padding: 0 3px; white-space: nowrap; }
.filter-bar .check-line input { width: auto; }
.result-heading { display: flex; justify-content: space-between; margin: 24px 2px 12px; color: var(--muted); font-size: 12px; }
.result-heading strong { color: var(--ink); }
.question-list { display: flex; flex-direction: column; gap: 10px; }
.question-row { display: grid; grid-template-columns: 125px 1fr auto; gap: 20px; align-items: center; min-height: 128px; padding: 19px 22px; border: 1px solid var(--line); background: var(--paper); border-radius: 15px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.question-row.no-number { grid-template-columns: 1fr auto; }
.question-row:hover { border-color: #b5d8d4; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(25, 58, 80, .06); }
.question-number { color: var(--muted); font-size: 12px; font-weight: 800; }
.question-copy { min-width: 0; }
.question-copy h2 { margin: 8px 0 5px; font-size: 15px; line-height: 1.45; }
.question-copy h2 a { color: var(--ink); }
.question-copy p { overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.question-actions { display: flex; align-items: center; gap: 12px; }
.favorite-static { border: 0; padding: 2px; color: var(--muted); background: none; font-size: 20px; line-height: 1; cursor: pointer; }
.favorite-static:hover { color: var(--amber); }
.favorite-static.active { color: var(--amber); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; max-width: 100%; padding: 4px 8px; overflow: hidden; color: var(--muted); background: var(--surface-2); border-radius: 999px; font-size: 9px; font-weight: 800; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.chip.teal { color: var(--teal-dark); background: var(--teal-soft); }
.chip.violet { color: var(--violet); background: var(--violet-soft); }
.chip.amber { color: #9a6710; background: var(--amber-soft); }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 24px; font-size: 13px; }
.pagination a:last-child { text-align: right; }
.pagination strong { color: var(--muted); font-size: 11px; }

.question-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; font-size: 13px; }
.question-toolbar > div { display: flex; gap: 8px; }
.icon-button { min-height: 35px; border: 1px solid var(--line); padding: 6px 11px; color: var(--muted); background: var(--paper); border-radius: 9px; cursor: pointer; }
.icon-button.active { color: #a56d0d; border-color: #f0d18f; background: var(--amber-soft); }
.question-card { padding: 30px 38px 38px; border: 1px solid var(--line); background: var(--paper); border-radius: 20px; box-shadow: var(--shadow); }
.question-meta { display: flex; flex-direction: column; gap: 11px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.question-meta > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.question-meta .question-id { color: var(--teal-dark); font-weight: 900; letter-spacing: .08em; }
.exam-line { margin-top: 17px; padding: 10px 12px; color: var(--muted); background: var(--surface-2); border-radius: 9px; font-size: 11px; }
.support-text { margin: 24px 0; padding: 18px; color: var(--ink); background: var(--surface-2); border-left: 4px solid #9db3c6; white-space: pre-wrap; }
.statement { margin: 26px 0 24px; color: var(--ink); font-size: 14px; font-weight: 400; line-height: 1.6; white-space: pre-wrap; }
.multiple-note { margin: -10px 0 18px; color: var(--violet); font-size: 12px; font-weight: 700; }
.media-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 24px; }
.media-button { min-height: 150px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); padding: 8px; background: var(--surface-2); border-radius: 12px; cursor: zoom-in; }
.media-button img { max-height: 330px; object-fit: contain; }
.media-file { min-height: 110px; display: grid; place-items: center; border: 1px solid #b9d9d5; padding: 16px; color: var(--teal-dark); background: var(--teal-soft); border-radius: 12px; font-size: 13px; font-weight: 800; text-align: center; }
.statement-media { margin: -6px 0 26px; }
.support-media { margin-bottom: 24px; }
.alternatives { display: flex; flex-direction: column; gap: 10px; }
.alternative-block { border-radius: 13px; }
.alternative-row { display: flex; align-items: center; gap: 5px; }
.alternative-eliminate { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border: 0; padding: 0; color: var(--muted); background: none; border-radius: 50%; font-size: 13px; line-height: 1; cursor: pointer; transition: color .14s; }
.alternative-eliminate:hover { color: var(--red); }
.alternative-eliminate.active { color: var(--red); }
.alternative-block.eliminated .alternative-text { color: var(--muted); text-decoration: line-through; }
.alternative-block.eliminated .alternative { border-color: var(--border-soft); background: var(--surface-2); }
.alternative-block.eliminated .alternative-letter { color: var(--muted); background: var(--surface-2); }
.alternative-block.correct .alternative-eliminate, .alternative-block.wrong .alternative-eliminate, .alternative-block.dimmed .alternative-eliminate { visibility: hidden; }
.alternative { flex: 1; min-width: 0; display: grid; grid-template-columns: 24px 40px 1fr 26px; gap: 12px; align-items: center; min-height: 68px; border: 1px solid var(--line); padding: 13px 15px; border-radius: 13px; cursor: pointer; transition: border-color .14s, background .14s, transform .14s; }
.alternative:hover { border-color: #9ecfc9; transform: translateX(2px); }
.alternative input { width: 17px; height: 17px; accent-color: var(--teal); }
.alternative-letter { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink); background: var(--surface-2); border-radius: 9px; font-size: 13px; font-weight: 900; }
.alternative-text { color: var(--ink); font-size: 14px; white-space: pre-wrap; }
.alternative-block.correct .alternative { border-color: #7bc7a9; background: var(--green-soft); }
.alternative-block.correct .alternative-letter { color: #fff; background: var(--green); }
.alternative-block.correct .alternative-text { color: #116d53; }
.alternative-block.wrong .alternative { border-color: #e5a3ad; background: var(--red-soft); }
.alternative-block.wrong .alternative-letter { color: #fff; background: var(--red); }
.alternative-block.wrong .alternative-text { color: #9c2f3d; }
.alternative-block.dimmed { opacity: .62; }
.alternative-result { font-weight: 900; }
.alternative-block.correct .alternative-result { color: var(--green); }
.alternative-block.wrong .alternative-result { color: var(--red); }
.alternative-media { grid-template-columns: repeat(auto-fit, minmax(150px, 260px)); margin: 8px 12px 15px 103px; }
.alternative-media .media-button { min-height: 110px; }
.answer-actions { display: flex; align-items: center; gap: 17px; margin-top: 20px; }
.answer-message { color: var(--muted); font-size: 13px; font-weight: 750; }
.answer-message.correct { color: var(--green); }
.answer-message.wrong { color: var(--red); }
.solution-panel { margin-top: 28px; border: 1px solid var(--line); padding: 24px; background: var(--paper); border-radius: 15px; }
.solution-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.solution-heading > span { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--teal); border-radius: 50%; font-weight: 900; }
.solution-heading h2 { margin: 0; font-size: 18px; }
.solution-heading .eyebrow { margin-bottom: 2px; }
.solution-text, .alternative-solution { color: var(--ink); font-size: 14px; white-space: pre-wrap; }
.alternative-solutions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.alternative-solution { border-top: 1px solid #d7eae6; padding-top: 12px; }
.alternative-solution strong { color: var(--teal-dark); }
.solution-panel .media-gallery { grid-template-columns: repeat(auto-fit, minmax(180px, 340px)); margin: 16px 0 4px; }
.question-navigation { display: flex; justify-content: space-between; margin-top: 16px; }
.image-dialog { width: min(1100px, 92vw); max-height: 92vh; border: 0; padding: 42px 18px 18px; background: var(--paper); border-radius: 15px; box-shadow: 0 25px 90px rgba(0,0,0,.4); }
.image-dialog::backdrop { background: rgba(6, 20, 34, .76); }
.image-dialog > button { position: absolute; top: 8px; right: 12px; border: 0; color: var(--muted); background: transparent; font-size: 28px; cursor: pointer; }
.image-dialog img { display: block; max-height: 80vh; margin: auto; object-fit: contain; }

.study-hero { padding: 40px 20px 25px; text-align: center; }
.study-hero h1 { margin: 0; font-size: clamp(29px, 4vw, 42px); letter-spacing: -.04em; }
.study-hero p:not(.eyebrow) { max-width: 650px; margin: 10px auto 0; color: var(--muted); }
.study-icon { width: 63px; height: 63px; display: grid; place-items: center; margin: 0 auto 18px; padding-left: 4px; color: #fff; background: linear-gradient(140deg, #19bbae, #0a817a); border-radius: 20px; box-shadow: 0 12px 26px rgba(12, 148, 139, .25); font-size: 23px; }
.study-form { max-width: 720px; margin: 0 auto; padding: 30px; }
.study-form > label { margin-bottom: 19px; font-size: 13px; }
.study-form select { min-height: 47px; }
.study-form small { color: var(--muted); font-size: 10px; font-weight: 500; }
.study-form .study-check { flex-direction: row; align-items: center; padding: 15px; background: var(--surface-2); border-radius: 11px; }
.study-check input { width: 18px; height: 18px; accent-color: var(--teal); }
.study-check span { display: flex; flex-direction: column; }
.study-shortcuts { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 20px; font-size: 12px; font-weight: 750; }

.filter-heading { margin-bottom: 18px; }
.filter-workspace { overflow: hidden; padding: 0; }
.filter-tabs { display: grid; grid-template-columns: 1.35fr repeat(4, .8fr) 1.15fr; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.filter-tabs button { position: relative; min-height: 58px; border: 0; padding: 10px 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 750; }
.filter-tabs button::before { content: "✓"; margin-right: 6px; color: #b1bbc4; }
.filter-tabs button.active { color: var(--teal-dark); background: var(--paper); }
.filter-tabs button.active::after { content: ""; position: absolute; right: 12px; bottom: -1px; left: 12px; height: 3px; background: var(--teal); border-radius: 5px 5px 0 0; }
.filter-tabs button:last-child::before { content: ""; margin: 0; }
.filter-columns { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); min-height: 520px; }
.filter-picker { border-right: 1px solid var(--line); }
.filter-picker-head { display: flex; justify-content: space-between; gap: 14px; padding: 18px 22px 10px; color: var(--muted); font-size: 11px; }
.filter-picker-head strong { color: var(--teal-dark); }
.filter-search { display: flex; align-items: center; gap: 8px; margin: 8px 18px 14px; border: 1px solid var(--border-soft); padding: 0 12px; background: var(--surface-2); border-radius: 10px; }
.filter-search span { color: var(--muted); font-size: 18px; }
.filter-search input { width: 100%; min-height: 42px; border: 0; outline: 0; background: transparent; }
.filter-option-list { height: 420px; overflow-y: auto; border-top: 1px solid #edf1f4; }
.filter-option { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: center; min-height: 49px; padding: 9px 22px; border-bottom: 1px solid var(--border-soft); color: var(--ink); cursor: pointer; font-size: 12px; }
.filter-option:hover { background: var(--surface-2); }
.filter-option input { width: 16px; height: 16px; accent-color: var(--teal); }
.filter-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.taxonomy-option { grid-template-columns: 24px minmax(0, 1fr); padding-left: calc(16px + var(--tree-depth, 0) * 22px); cursor: default; }
.taxonomy-choice { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 30px; cursor: pointer; }
.taxonomy-expand { display: grid; width: 24px; height: 28px; place-items: center; border: 0; border-radius: 6px; color: var(--teal-dark); background: transparent; cursor: pointer; font-size: 21px; line-height: 1; }
.taxonomy-expand:hover { background: var(--teal-soft); }
.taxonomy-expand-spacer { width: 24px; }
.taxonomy-children[hidden] { display: none; }
.tree-loading { min-height: 44px; padding-left: 54px; }
.filter-loading { padding: 30px; color: var(--muted); text-align: center; }
.filter-summary { padding: 24px 28px; background: var(--surface-2); }
.filter-count { display: flex; align-items: baseline; gap: 7px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.filter-count strong { color: var(--teal-dark); font-size: 24px; }
.filter-count span { color: var(--muted); font-size: 12px; }
.summary-search { display: flex; flex-direction: column; gap: 6px; margin: 19px 0; color: var(--ink); font-size: 11px; font-weight: 750; }
.summary-search small { color: var(--muted); font-weight: 500; }
.summary-search input { min-height: 42px; border: 1px solid var(--input-border); padding: 9px 12px; border-radius: 9px; outline: 0; }
.filter-summary h2 { margin: 22px 0 12px; font-size: 14px; }
.selected-filter-groups { display: flex; max-height: 310px; flex-direction: column; gap: 12px; overflow-y: auto; }
.selected-group strong { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.selected-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.selected-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; border: 1px solid #b8d8d4; padding: 6px 8px; color: var(--teal-dark); background: var(--teal-soft); border-radius: 999px; font-size: 10px; }
.selected-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-chip button { border: 0; color: inherit; background: transparent; cursor: pointer; font-weight: 900; }
.no-selection { color: var(--muted); font-size: 12px; }
.filter-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding: 16px 22px; }
.filter-actions > div { display: flex; gap: 10px; }
.link-button { border: 0; padding: 8px; color: var(--teal-dark); background: transparent; cursor: pointer; font-weight: 800; text-decoration: underline; }
.advanced-filter { height: 500px; overflow-y: auto; }
.advanced-filter h2 { margin: 0; border-bottom: 1px solid var(--line); padding: 16px 20px 10px; color: var(--ink); font-size: 12px; }
.advanced-filter label { display: flex; align-items: center; gap: 12px; min-height: 50px; border-bottom: 1px solid var(--border-soft); padding: 9px 22px; color: var(--ink); font-size: 12px; cursor: pointer; }
.advanced-filter input { width: 34px; height: 19px; accent-color: var(--teal); }

.empty-state { display: flex; min-height: 330px; flex-direction: column; align-items: center; justify-content: center; padding: 35px; color: var(--muted); border: 1px dashed var(--line); background: var(--overlay); border-radius: var(--radius); text-align: center; }
.empty-state > span { margin-bottom: 8px; color: #9eb0bd; font-size: 42px; }
.empty-state h2 { margin: 0; color: var(--ink); }
.empty-state p { margin: 7px 0 16px; }
.empty-state.compact { min-height: 190px; padding: 20px; border: 0; background: var(--surface-2); }
.empty-state.compact > span { font-size: 28px; }

.performance-metrics { grid-template-columns: repeat(3, 1fr); }
.performance-layout { grid-template-columns: .8fr 1.2fr; align-items: start; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.day-card { min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 12px 4px; background: var(--surface-2); border-radius: 10px; }
.day-card span, .day-card small { color: var(--muted); font-size: 9px; }
.day-card strong { margin: 4px 0; color: var(--teal-dark); font-size: 19px; }
.data-table { overflow-x: auto; }
.table-row { min-width: 480px; display: grid; grid-template-columns: 1fr 90px 75px 55px; gap: 12px; padding: 12px 8px; border-top: 1px solid #edf1f4; font-size: 12px; }
.table-row.header { color: var(--muted); border-top: 0; background: var(--surface-2); border-radius: 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.table-row b { color: var(--teal-dark); }

.admin-form { display: flex; flex-direction: column; gap: 15px; }
.form-section { display: grid; grid-template-columns: 45px 1fr; gap: 18px; }
.section-number { width: 38px; height: 38px; display: grid; place-items: center; color: var(--teal-dark); background: var(--teal-soft); border-radius: 11px; font-weight: 900; }
.section-content { min-width: 0; }
.section-content > h2, .section-heading h2 { margin: 3px 0 16px; font-size: 19px; }
.section-content > label { margin-top: 14px; }
.admin-form textarea { resize: vertical; line-height: 1.5; }
.admin-form label small { color: var(--muted); font-weight: 500; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.section-heading h2 { margin-bottom: 3px; }
.section-heading p { margin: 0 0 15px; color: var(--muted); font-size: 12px; }
.alternative-editor { display: flex; flex-direction: column; gap: 12px; }
.edit-alternative { border: 1px solid var(--line); padding: 14px; background: var(--surface-2); border-radius: 11px; }
.edit-alt-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.edit-alt-head strong { font-size: 12px; }
.correct-check { margin-left: auto; flex-direction: row !important; align-items: center; color: var(--green) !important; }
.correct-check input { width: 17px; accent-color: var(--green); }
.remove-alt { border: 0; color: #a27078; background: transparent; cursor: pointer; font-size: 20px; }
.edit-alt-grid { display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.edit-alternative > label { margin-top: 10px; }
.form-submit { display: flex; align-items: center; gap: 15px; padding: 8px 0 18px 63px; }
.form-submit span { color: var(--muted); font-size: 11px; }

/* Telas de acesso (login, 2FA, convite, primeiro acesso): painel azul + cartao branco. */
.auth-page { overflow-x: hidden; background: #f2f5f8; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 38%) 1fr; }
.auth-visual { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 48px 40px; color: #fff; text-align: center; background: linear-gradient(160deg, #10233c 0%, #183a57 100%); }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.auth-logo .auth-logo-symbol { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(1, 17, 34, .3)); }
.auth-logo .auth-logo-word { width: 210px; height: auto; }
.auth-visual h1 { margin: 38px 0 0; color: #fff; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -.03em; }
.auth-logo-text { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.auth-slogan { color: #5fd6ca; font-size: 12px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; white-space: nowrap; }
.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 24px 48px; }
.auth-back { position: absolute; top: 26px; right: 32px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.auth-back:hover { color: var(--heading); }
.auth-card { width: min(100%, 440px); padding: 36px 34px 28px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(16, 35, 60, .1); }
.auth-card h2 { margin: 0; color: var(--heading); font-size: 26px; letter-spacing: -.03em; }
.auth-card > p.muted { margin: 6px 0 24px; font-size: 14px; }
.auth-card .eyebrow { margin-bottom: 8px; }
.stack-form { display: flex; flex-direction: column; gap: 17px; }
.stack-form input { min-height: 47px; }
.stack-form small { color: var(--muted); font-weight: 500; }
.auth-card .stack-form input { background: #f6f8fb; border-color: #d9e1e9; border-radius: 12px; }
.auth-card .stack-form input:focus { background: #fff; }
.auth-card .button.primary.wide { min-height: 48px; margin-top: 4px; border-radius: 12px; font-size: 15px; }
.password-field { position: relative; display: block; }
.password-field input { width: 100%; padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 6px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: var(--muted); background: none; border: 0; border-radius: 9px; cursor: pointer; transform: translateY(-50%); }
.password-toggle:hover { color: var(--heading); background: rgba(16, 35, 60, .06); }
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle .icon-hide, .password-toggle[aria-pressed="true"] .icon-show { display: none; }
.password-toggle[aria-pressed="true"] .icon-hide { display: block; }
.auth-forgot { margin-top: -8px; font-size: 13px; text-align: right; }
.auth-forgot summary { display: inline; color: var(--teal-dark); font-weight: 700; cursor: pointer; list-style: none; }
.auth-forgot summary::-webkit-details-marker { display: none; }
.auth-forgot p { margin: 8px 0 0; padding: 10px 12px; color: var(--muted); background: var(--soft); border-radius: 10px; text-align: left; }
.auth-turnstile { min-height: 65px; padding: 8px; background: #f6f8fb; border: 1px solid #e3e9ef; border-radius: 12px; }
.auth-turnstile .cf-turnstile { width: 100%; }
.auth-divider { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-footnote { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.auth-footnote:first-of-type { margin-top: 18px; }
.auth-divider .auth-footnote:first-child { margin-top: 0; }
@media (max-width: 800px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { padding: 34px 24px 30px; }
  .auth-logo { flex-direction: row; gap: 12px; }
  .auth-logo .auth-logo-symbol { width: 48px; height: 48px; }
  .auth-logo .auth-logo-word { width: 150px; }
  .auth-visual h1 { margin-top: 18px; font-size: 22px; }
  .auth-logo-text { align-items: flex-start; gap: 6px; }
  .auth-slogan { font-size: 10px; letter-spacing: .24em; }
  .auth-main { justify-content: flex-start; padding: 56px 16px 40px; }
  .auth-back { top: 18px; right: 18px; }
  .auth-card { padding: 28px 18px 22px; }
  .auth-turnstile { padding: 0; background: none; border: 0; }
}
.arena-orbit { position: relative; width: 140px; height: 140px; margin-top: 45px; border: 1px solid rgba(91, 218, 205, .22); border-radius: 50%; }
.arena-orbit::before { content: "M"; position: absolute; inset: 37px; display: grid; place-items: center; color: #fff; background: var(--teal); border-radius: 50%; font-size: 32px; font-weight: 900; }
.arena-orbit span { position: absolute; width: 12px; height: 12px; background: #78ded3; border-radius: 50%; }
.arena-orbit span:nth-child(1) { top: -6px; left: 64px; }
.arena-orbit span:nth-child(2) { bottom: 13px; left: 7px; }
.arena-orbit span:nth-child(3) { bottom: 12px; right: 7px; }

.error-page { min-height: calc(100vh - 130px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; }
.error-page > span { color: #cae6e2; font-size: 110px; font-weight: 900; line-height: 1; }
.error-page h1 { margin: -14px 0 3px; font-size: 31px; }
.error-page p { margin: 0 0 20px; color: var(--muted); }

@media (max-width: 1120px) {
  .topbar { gap: 16px; padding: 0 20px; }
  .main-nav a { padding: 0 7px; font-size: 12px; }
  .user-name { display: none; }
  .filter-bar { grid-template-columns: repeat(4, 1fr); }
  .search-field { grid-column: span 2; }
  .filter-bar .check-line { grid-column: span 2; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-tabs { display: flex; overflow-x: auto; }
  .filter-tabs button { min-width: 145px; }
}

@media (max-width: 800px) {
  .topbar { min-height: 66px; flex-wrap: wrap; }
  .brand { min-width: 0; }
  .brand small { display: none; }
  .nav-toggle { display: block; }
  .main-nav { position: fixed; top: 0; left: 0; z-index: 70; width: min(78vw, 300px); height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 90px 12px 20px; background: linear-gradient(165deg, #0c2038, #153b53); box-shadow: 6px 0 30px rgba(2, 10, 20, .35); transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { min-height: 44px; padding: 0 14px; border-radius: 10px; }
  .main-nav a:hover { background: rgba(255, 255, 255, .06); }
  .main-nav a.active::after { width: 3px; height: auto; left: 0; right: auto; top: 7px; bottom: 7px; border-radius: 0 5px 5px 0; }
  .user-menu { margin-left: 0; }
  .page-shell, .page-shell.narrow { width: min(100% - 24px, 1000px); padding-top: 20px; }
  .hero-card { grid-template-columns: 1fr; padding: 30px 25px; }
  .hero-score { width: 190px; justify-self: center; }
  .two-column, .performance-layout { grid-template-columns: 1fr; }
  .question-row { grid-template-columns: 1fr auto; gap: 12px; }
  .question-number { grid-column: 1 / -1; }
  .question-copy { grid-column: 1; }
  .question-actions { grid-column: 2; }
  .question-card { padding: 24px 19px; }
  .alternative { grid-template-columns: 21px 34px 1fr 20px; gap: 8px; padding: 11px; }
  .alternative-letter { width: 32px; height: 32px; }
  .week-grid { grid-template-columns: repeat(4, 1fr); }
  .filter-columns { grid-template-columns: 1fr; }
  .filter-picker { border-right: 0; border-bottom: 1px solid var(--line); }
  .filter-option-list { height: 340px; }
  .filter-actions { align-items: stretch; flex-direction: column; }
  .filter-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .alternative-media { margin-left: 81px; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 12px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 34px; height: 38px; }
  .user-menu { display: none; }
  .mobile-avatar-link { display: grid; margin-left: auto; }
  .metric-grid, .performance-metrics { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .filter-bar { grid-template-columns: 1fr; }
  .search-field, .filter-bar .check-line { grid-column: auto; }
  .question-row { grid-template-columns: 1fr; padding: 16px; }
  .question-row.no-number { grid-template-columns: 1fr; }
  .question-copy, .question-actions { grid-column: 1; }
  .question-actions { justify-content: flex-end; }
  .question-toolbar { align-items: flex-start; gap: 12px; }
  .question-toolbar > div { flex-direction: column; align-items: flex-end; }
  .alternative { grid-template-columns: 20px 32px 1fr; }
  .alternative-result { grid-column: 3; }
  .answer-actions { align-items: flex-start; flex-direction: column; }
  .question-navigation { gap: 9px; }
  .question-navigation .button { padding: 8px 11px; font-size: 11px; }
  .form-section { grid-template-columns: 1fr; }
  .section-number { width: 32px; height: 32px; }
  .edit-alt-grid { grid-template-columns: 58px 1fr; }
  .form-submit { padding-left: 0; align-items: flex-start; flex-direction: column; }
  .site-footer { padding: 0 14px; }
  .site-footer span:last-child { display: none; }
  .filter-summary { padding: 20px 16px; }
  .filter-actions > div { grid-template-columns: 1fr; }
}

/* Recursos pessoais e colaborativos — preservados da v1.4 */
.stack-form textarea, .stack-form select, .feature-form textarea, .feature-form select,
.compact-form textarea, .compact-form select { width: 100%; border: 1px solid var(--input-border); padding: 10px 12px; color: var(--ink); background: var(--paper); border-radius: 9px; outline: 0; resize: vertical; }
.stack-form textarea:focus, .stack-form select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,165,154,.11); }
.compact-form { gap: 10px; }
.feature-form { padding: 28px; }
.feature-form fieldset { border: 1px solid var(--line); padding: 18px; border-radius: 13px; }
.feature-form legend { padding: 0 8px; color: var(--heading); font-weight: 800; }
.quantity-row { display: grid !important; grid-template-columns: minmax(0,1fr) 90px; align-items: center; gap: 15px !important; padding: 9px 0; border-bottom: 1px solid #edf1f4; }
.quantity-row:last-child { border-bottom: 0; }
.quantity-row input[type="number"] { min-height: 40px; }
.alert.neutral { color: var(--ink); border-color: var(--input-border); background: var(--soft); }
.button.danger-soft { color: #a23b49; border-color: #efc4ca; background: var(--red-soft); }
.danger-text { color: var(--red) !important; }
.chip.rose, .metric-icon.rose { color: var(--red); background: var(--red-soft); }
.heading-actions, .inline-actions, .filter-action-group { display: flex; flex-wrap: wrap; gap: 9px; }
.inline-form { display: flex; gap: 7px; }
.inline-form input { min-width: 0; width: 100%; border: 1px solid var(--input-border); padding: 8px 10px; border-radius: 8px; }
hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.accuracy-pill { display: inline-flex; align-items: center; padding: 3px 9px; color: var(--teal-dark); background: var(--teal-soft); border-radius: 999px; font-size: 10px; font-weight: 800; }
.topic-toggle { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; border: 0; border-radius: 7px; background: none; padding: 0; color: var(--muted); cursor: pointer; }
.topic-toggle:hover, .topic-toggle[aria-expanded="true"] { color: var(--teal-dark); background: var(--teal-soft); }
.alternative-stat { margin: 10px 8px 5px 102px; }
.alternative-stat > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 750; }
.alternative-stat > div { height: 5px; overflow: hidden; background: var(--border-soft); border-radius: 999px; }
.alternative-stat i { display: block; height: 100%; min-width: 2px; border-radius: inherit; }
.alternative-stat.correct i { background: var(--green); }
.alternative-stat.wrong i { background: #d97886; }

.question-community { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 27px; }
.community-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.mini-panel { border: 1px solid var(--line); padding: 18px; background: var(--surface-2); border-radius: 13px; }
.mini-panel h3, .comments-panel h3 { margin: 0 0 12px; font-size: 15px; }
.comments-panel { margin-top: 18px; border: 1px solid var(--line); padding: 20px; border-radius: 14px; }
.comment-compose { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.comment-compose textarea { width: 100%; border: 1px solid var(--input-border); padding: 11px; border-radius: 9px; resize: vertical; }
.comment-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.comment-card { border: 1px solid var(--border-soft); padding: 15px; background: var(--paper); border-radius: 11px; }
.comment-card p { color: var(--ink); white-space: pre-wrap; }
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-author > div { display: flex; flex-direction: column; }
.comment-author strong { font-size: 12px; }
.comment-author small { color: var(--muted); font-size: 10px; }
.comment-card details { margin-top: 8px; color: var(--teal-dark); font-size: 11px; }
.comment-card details form { margin-top: 8px; }
.report-link { text-align: right; font-size: 12px; }

.library-layout { grid-template-columns: 290px minmax(0,1fr); align-items: start; }
.folder-sidebar { position: sticky; top: 96px; }
.folder-list { display: flex; flex-direction: column; gap: 7px; margin-top: 15px; }
.folder-row { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 10px; background: var(--surface-2); border-radius: 9px; font-size: 12px; }
.folder-row small { color: var(--muted); }
.folder-row summary { cursor: pointer; list-style: none; }
.folder-row details[open] { width: 100%; padding: 8px; background: var(--paper); border-radius: 8px; }
.list-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.list-card { display: flex; min-height: 230px; flex-direction: column; justify-content: space-between; gap: 12px; border: 1px solid var(--line); padding: 18px; border-radius: 13px; }
.list-card h3 { margin: 10px 0 4px; }
.list-card p { margin: 0; color: var(--muted); font-size: 12px; }
.list-progress > div { display: flex; justify-content: space-between; font-size: 11px; }
.list-progress progress { width: 100%; height: 8px; accent-color: var(--teal); }
.list-progress small { display: block; color: var(--muted); font-size: 10px; }
.compact-metrics .metric-card { min-height: 88px; }
.list-detail-layout { grid-template-columns: minmax(0,1fr) 300px; align-items: start; }
.list-settings { position: sticky; top: 96px; }
.list-controls { align-items: center; margin-top: 0; }
.list-controls > div { display: flex; gap: 10px; }
.list-controls label { display: flex; align-items: center; gap: 5px; }
.list-controls select { border: 1px solid var(--line); padding: 5px; border-radius: 7px; }
.share-list, .report-list { display: flex; flex-direction: column; gap: 12px; }
.share-list article { border: 1px solid var(--line); padding: 16px; border-radius: 12px; }
.share-list h3 { margin: 5px 0; }
.share-list p, .share-list small { color: var(--muted); }
.share-list form { display: flex; gap: 8px; }
.share-list input { min-width: 0; border: 1px solid var(--line); padding: 8px; border-radius: 8px; }

.status-chip { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.status-chip.pending, .status-chip.draft { color: #966510; background: var(--amber-soft); }
.status-chip.reviewing, .status-chip.running { color: #315f9d; background: #eaf2fd; }
.status-chip.resolved, .status-chip.finished { color: var(--green); background: var(--green-soft); }
.status-chip.rejected { color: var(--red); background: var(--red-soft); }
.report-card h3 { margin: 10px 0; }
.report-card blockquote { margin: 12px 0 0; border-left: 3px solid var(--teal); padding: 10px 14px; background: var(--teal-soft); }
.report-card-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }

.simulation-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.simulation-card { display: flex; min-height: 260px; flex-direction: column; gap: 14px; border: 1px solid var(--line); padding: 19px; border-radius: 13px; }
.simulation-card h2 { margin: 9px 0 3px; font-size: 18px; }
.simulation-card p, .simulation-card small { color: var(--muted); }
.simulation-card > div:nth-child(2) { display: flex; flex-direction: column; margin-top: auto; }
.duration-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.simulation-intro { max-width: 760px; margin: 35px auto; padding: 35px; }
.simulation-intro h1 { margin-top: 0; font-size: 35px; }
.simulation-intro li { margin: 9px 0; color: var(--ink); }
.simulation-toolbar { position: sticky; top: 86px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 13px; border: 1px solid var(--line); padding: 12px 16px; background: var(--overlay-strong); border-radius: 13px; box-shadow: 0 7px 20px rgba(20,42,65,.08); }
.simulation-toolbar > div:first-child, .simulation-clock { display: flex; flex-direction: column; }
.simulation-toolbar small, .simulation-clock span { color: var(--muted); font-size: 10px; }
.simulation-clock strong { color: var(--teal-dark); font-size: 20px; font-variant-numeric: tabular-nums; }
.simulation-clock strong.urgent { color: var(--red); }
.review-list { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.result-review .question-meta { flex-direction: row; justify-content: space-between; }
.result-alternative { margin: 9px 0; border: 1px solid var(--line); padding: 12px; border-radius: 10px; }
.result-alternative.correct { border-color: #8bcdb3; background: var(--green-soft); color: #116d53; }
.result-alternative.wrong { border-color: #e4aab2; background: var(--red-soft); color: #9c2f3d; }
.result-alternative.correct .alternative-review-solution, .result-alternative.correct .alternative-stat > span { color: #116d53; }
.result-alternative.wrong .alternative-review-solution, .result-alternative.wrong .alternative-stat > span { color: #9c2f3d; }
.result-alternative .alternative-stat { margin: 0 0 8px; }
.alternative-review-solution { margin: 10px 0 0; border-top: 1px solid rgba(50,80,100,.12); padding-top: 9px; color: var(--ink); font-size: 12px; }
.result-comments { margin: 12px 0; color: var(--teal-dark); font-size: 12px; }
.result-comments p { color: var(--ink); }

.admin-section { margin-top: 30px; }
.admin-section .eyebrow { margin-bottom: 13px; }
.admin-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.admin-card { display: flex; gap: 18px; min-height: 170px; align-items: center; border: 1px solid var(--line); padding: 24px; color: var(--ink); background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); }
.admin-card > span { font-size: 34px; }
.admin-card h2 { margin: 2px 0; }
.admin-card p { margin: 0; color: var(--muted); }
.admin-card strong { color: var(--teal-dark); font-size: 24px; }
.admin-users-layout { grid-template-columns: 360px minmax(0,1fr); align-items: start; }
.user-admin-list { display: flex; flex-direction: column; gap: 9px; }
.user-admin-list article { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding: 10px 0; }
.area-performance-table .table-row { grid-template-columns: 1fr repeat(5, 72px); min-width: 650px; }
.performance-metrics-wide { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1120px) {
  .performance-metrics-wide { grid-template-columns: repeat(3, 1fr); }
  .simulation-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .library-layout, .list-detail-layout, .admin-users-layout { grid-template-columns: 1fr; }
  .folder-sidebar, .list-settings { position: static; }
  .community-grid, .list-card-grid, .admin-card-grid { grid-template-columns: 1fr; }
  .simulation-toolbar { top: 74px; flex-wrap: wrap; }
  .alternative-stat { margin-left: 81px; }
}
@media (max-width: 560px) {
  .simulation-grid, .performance-metrics-wide { grid-template-columns: 1fr; }
  .simulation-toolbar { position: static; }
  .quantity-row { grid-template-columns: 1fr; }
  .share-list form, .inline-form { flex-direction: column; }
}

/* Fundação do Beta — v1.5 */
.brand-logo { width: 148px; max-height: 48px; object-fit: contain; object-position: left center; }
.button:disabled, button:disabled { cursor: not-allowed; opacity: .55; transform: none !important; }
.alert.warning { color: #845b10; border-color: #edd18c; background: var(--amber-soft); }

.question-action-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.question-action-icons { display: flex; gap: 7px; }
.compact-action { min-width: 62px; min-height: 48px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line); padding: 5px 9px; color: var(--muted); background: var(--surface-2); border-radius: 10px; cursor: pointer; }
.compact-action:hover { color: var(--teal-dark); border-color: #a5d8d2; background: var(--teal-soft); }
.compact-action span { font-size: 18px; line-height: 1; }
.compact-action b { font-size: 9px; font-weight: 800; }
.solution-trigger { min-width: 265px; }
.solution-trigger.locked { color: var(--muted); border-color: var(--line); background: var(--surface-2); box-shadow: none; }

dialog { color: var(--ink); }
dialog::backdrop { background: rgba(5, 18, 31, .68); backdrop-filter: blur(3px); }
.action-dialog { width: min(520px, calc(100% - 28px)); border: 0; padding: 25px; border-radius: 18px; box-shadow: 0 28px 90px rgba(4, 20, 38, .32); }
.dialog-head, .solution-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.dialog-head h2, .solution-modal-head h2 { margin: 0; }
.dialog-head > button, .solution-modal-head > button { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; flex: 0 0 auto; border: 0; color: var(--muted); background: var(--surface-2); border-radius: 50%; cursor: pointer; }
.dialog-head > button .icon-close, .solution-modal-head > button .icon-close { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
.action-dialog textarea, .action-dialog select { width: 100%; border: 1px solid var(--input-border); padding: 10px 12px; border-radius: 9px; }
.share-link-result, .share-link-banner { display: flex; align-items: center; gap: 8px; margin: 14px 0; }
.share-link-result input, .share-link-banner input { min-width: 0; flex: 1; border: 1px solid var(--line); padding: 9px 11px; background: var(--surface-2); border-radius: 9px; }
.share-link-banner { margin: -12px 0 18px; border: 1px solid #b9dcd8; padding: 11px; background: var(--teal-soft); border-radius: 12px; }

.solution-dialog { width: min(1180px, 94vw); height: min(900px, 92vh); max-width: none; max-height: none; overflow: hidden; border: 0; padding: 0; background: var(--surface-2); border-radius: 19px; box-shadow: 0 35px 110px rgba(3, 17, 32, .42); }
.solution-dialog[open] { display: flex; flex-direction: column; }
.solution-dialog > .solution-modal-head, .solution-dialog > .solution-tabs { flex-shrink: 0; }
.solution-modal-head { position: sticky; top: 0; z-index: 3; align-items: center; margin: 0; padding: 15px 21px; color: #fff; background: linear-gradient(120deg, #0c2038, #173f58); }
.solution-modal-head img { width: 48px; height: 48px; object-fit: contain; }
.solution-modal-head > div:nth-child(2) { margin-right: auto; }
.solution-modal-head .eyebrow { margin-bottom: 2px; color: #69ddd1; }
.solution-modal-head h2 { font-size: 20px; }
.solution-modal-head > button { color: #fff; background: rgba(255,255,255,.1); }
.solution-tabs { position: sticky; top: 78px; z-index: 2; display: flex; gap: 4px; padding: 0 21px; border-bottom: 1px solid var(--line); background: var(--paper); }
.solution-tabs button { border: 0; border-bottom: 3px solid transparent; padding: 14px 15px 11px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; }
.solution-tabs button:hover { color: var(--teal-dark); border-bottom-color: var(--teal); }
.solution-modal-body { flex: 1; min-height: 0; overflow-y: auto; scroll-behavior: smooth; padding: 25px; }
.solution-modal-body > section { max-width: 940px; margin: 0 auto 20px; border: 1px solid var(--line); padding: 25px; background: var(--paper); border-radius: 15px; }
.solution-question-recap h3, .solution-content h3, .solution-comments h3 { margin-top: 0; }
.solution-question-recap > p:first-of-type { white-space: pre-wrap; }
.solution-recap-alt { margin: 7px 0; border: 1px solid var(--border-soft); padding: 10px 12px; color: var(--ink); border-radius: 9px; white-space: pre-wrap; }
.solution-recap-alt.correct { color: #116d53; border-color: #a5d8c4; background: var(--green-soft); }
.solution-content .solution-text { color: var(--ink); white-space: pre-wrap; }
.solution-recap-text, .solution-recap-alt > p { white-space: pre-wrap; }
.solution-recap-alt { white-space: normal; }
.solution-recap-alt > p { margin: 0; }
.solution-reading { color: var(--ink); font-family: inherit; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.solution-section-label { margin: 0 0 15px; color: var(--heading); font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: .1em; line-height: 1.6; text-transform: uppercase; }
.solution-prose > p { margin: 0 0 15px; white-space: pre-wrap; }
.solution-prose > p:last-child { margin-bottom: 0; }
.solution-general-comment { margin-bottom: 28px; }
.solution-general-comment:last-child { margin-bottom: 0; }
.solution-reading .solution-media { grid-template-columns: minmax(0, 1fr); margin: 22px 0 0; }
.solution-reading .solution-media .media-button img { max-height: none; height: auto; }
.solution-alternative-card { margin: 0 0 15px; border: 1px solid var(--line); border-left: 3px solid var(--red); padding: 17px 19px; background: var(--paper); border-radius: 11px; }
.solution-alternative-card:last-child { margin-bottom: 0; }
.solution-alternative-card.is-correct { border-left-color: var(--green); }
.solution-alternative-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 12px; }
.solution-alternative-heading h5 { margin: 0; color: var(--heading); font-family: inherit; font-size: inherit; font-weight: 750; }
.solution-alternative-letter { width: 28px; height: 28px; display: grid; place-items: center; color: #a72d41; background: var(--red-soft); border-radius: 7px; font-weight: 800; }
.solution-alternative-card.is-correct .solution-alternative-letter { color: #116d53; background: var(--green-soft); }
.solution-alternative-verdict { margin-left: auto; color: var(--muted); font-weight: 700; }
.solution-alternative-option { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.solution-reading .alternative-solution-media { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 340px)); margin: 18px 0 0; }
.solution-unavailable { margin: 0; color: var(--muted); }
.editorial-solution { color: var(--ink); font-family: inherit; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.editorial-solution h4 { margin: 0 0 15px; color: var(--heading); font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: .1em; line-height: 1.6; text-transform: uppercase; }
.editorial-general { margin-bottom: 28px; }
.editorial-paragraph { margin: 0 0 15px; font-family: inherit; }
.editorial-paragraph:last-child { margin-bottom: 0; }
.editorial-figure { margin: 22px 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--paper); }
.editorial-figure figcaption { padding: 13px 16px; color: #fff; background: var(--navy); font-size: 13px; font-weight: 700; }
.editorial-table-scroll, .editorial-flow-scroll { max-width: 100%; overflow-x: auto; }
.editorial-table { width: 100%; min-width: 0; border-collapse: collapse; font-family: inherit; font-size: 13px; line-height: 1.65; }
.editorial-table thead { color: #fff; background: var(--navy-2); }
.editorial-table th, .editorial-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: pre-line; }
.editorial-table tbody tr:nth-child(even) { background: var(--surface-2); }
.editorial-table tbody tr:last-child > * { border-bottom: 0; }
.editorial-table tbody th { font-weight: 700; }
.solution-native-general { font-family: inherit; font-size: inherit; line-height: 1.7; min-width: 0; }
.solution-native-general > ul, .solution-native-general > ol { padding-left: 24px; }
.solution-native-general li > p { margin-bottom: 6px; }
.solution-native-heading { margin: 20px 0 12px; font-family: inherit; font-size: 1em; color: var(--ink); }
.solution-native-table { font-family: inherit; font-size: inherit; }
.solution-native-table-heading { color: #fff; background: var(--navy-2); }
.solution-native-table-heading > th { color: #fff; background: var(--navy-2); }
.solution-native-table p { margin: 0; }
.solution-native-table p + p { margin-top: 8px; }
.solution-visual-replacement { width: 100%; min-width: 0; font-family: inherit; }
.solution-visual-replacement > .editorial-paragraph { padding: 15px 18px; background: var(--surface-2); border-left: 3px solid var(--navy-2); border-radius: 8px; }
.editorial-note { margin: 12px 16px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.editorial-alternative { margin-bottom: 15px; border: 1px solid var(--line); border-left: 3px solid var(--red); padding: 17px 19px; background: var(--paper); border-radius: 11px; }
.editorial-alternative.is-correct { border-left-color: var(--green); }
.editorial-alternative header { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 12px; }
.editorial-letter { width: 28px; height: 28px; display: grid; place-items: center; color: #a72d41; background: var(--red-soft); border-radius: 7px; font-weight: 800; }
.editorial-alternative.is-correct .editorial-letter { color: #116d53; background: var(--green-soft); }
.editorial-verdict { margin-left: auto; color: var(--muted); font-weight: 700; }
.editorial-option { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.editorial-flow-scroll svg { display: block; max-width: none; margin: auto; font-family: inherit; }
.flow-node { fill: var(--navy-2); stroke: #557b9e; stroke-width: 1.5; }
.flow-node-text { fill: #fff; font-size: 14px; }
.flow-edge { stroke: #557b9e; stroke-width: 2; fill: none; }
.flow-arrow { fill: #557b9e; }
.flow-label-bg { fill: var(--paper); }
.flow-label { fill: var(--ink); font-size: 12px; }
.flow-description { padding: 10px 16px; color: var(--muted); font-size: 12px; }
.editorial-review-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 22px; align-items: start; }
.editorial-review-grid > * { min-width: 0; }
.editorial-original { white-space: pre-wrap; font-size: 14px; line-height: 1.8; }
.editorial-original-media { margin: 20px 0; }
.editorial-original-media img { display: block; max-width: 100%; max-height: 340px; object-fit: contain; margin: auto; }
.editorial-source-data { overflow: auto; max-height: 400px; font-size: 12px; }
.editorial-status-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.editorial-queue-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.editorial-queue-row:last-child { border-bottom: 0; }
.editorial-queue-row p { margin: 4px 0; color: var(--muted); font-size: 13px; }
.editorial-review-actions form { margin-bottom: 15px; }
.editorial-review-actions label { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
@media (max-width: 900px) { .editorial-review-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .editorial-alternative { padding: 14px 12px; } .editorial-table th, .editorial-table td { padding: 10px; } }
.solution-comments .comment-list { margin-top: 18px; }
.comment-actions { display: flex; gap: 10px; }
.comment-actions .text-button { padding-left: 0; color: var(--teal-dark); }
.reply-form { display: flex; align-items: flex-end; gap: 8px; margin: 10px 0; }
.reply-form textarea { width: 100%; border: 1px solid var(--input-border); padding: 9px; border-radius: 8px; resize: vertical; }
.comment-replies { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0 35px; border-left: 3px solid #d8e8e6; padding-left: 12px; }
.comment-replies article { padding: 10px; background: var(--surface-2); border-radius: 9px; }
.comment-replies p { margin-bottom: 0; }
.solution-locked { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; }
.solution-locked > span { font-size: 50px; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .45fr); gap: 20px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.privacy-note { margin: 0; border-left: 3px solid var(--teal); padding: 9px 12px; color: var(--muted); background: var(--teal-soft); font-size: 11px; }
.profile-details { margin-top: 20px; }
.timeline-list { display: flex; flex-direction: column; gap: 10px; }
.timeline-list > article { display: flex; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.timeline-list > article:last-child { border-bottom: 0; }
.timeline-list > article > div { min-width: 0; display: flex; flex-direction: column; }
.timeline-list strong { font-size: 13px; }
.timeline-list small, .timeline-list p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-top: 20px; border-color: #efc7cc; }
.danger-zone h2 { margin: 0; }
.danger-zone p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); }

.feature-admin-list { display: flex; flex-direction: column; gap: 13px; }
.feature-admin-card { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; align-items: start; }
.feature-admin-card h2 { margin: 8px 0 2px; font-size: 18px; }
.feature-admin-card p { margin: 0 0 5px; color: var(--muted); }
.feature-admin-card small { color: var(--muted); }
.feature-admin-card details { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; }
.feature-admin-card summary { color: var(--teal-dark); cursor: pointer; font-size: 12px; font-weight: 800; }
.feature-state-form { display: flex; flex-direction: column; gap: 8px; }
.feature-state-form select { width: 100%; border: 1px solid var(--line); padding: 9px; border-radius: 8px; }
.tester-picker > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 12px 0; }
.tester-picker label { display: flex; align-items: flex-start; gap: 8px; border: 1px solid var(--line); padding: 8px; border-radius: 8px; }
.tester-picker label span { display: flex; flex-direction: column; font-size: 11px; }
.tester-picker small { font-size: 9px; }
.commercial-layout { grid-template-columns: 380px minmax(0, 1fr); margin-bottom: 20px; }
.user-admin-actions { display: flex; flex-direction: column; align-items: flex-end; }
.user-admin-actions details { position: relative; }
.user-admin-actions summary { color: var(--teal-dark); cursor: pointer; font-size: 11px; }
.user-admin-actions details[open] form { position: absolute; z-index: 5; right: 0; width: 260px; border: 1px solid var(--line); padding: 15px; background: var(--paper); border-radius: 12px; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .question-action-bar { align-items: stretch; flex-direction: column; }
  .solution-trigger { width: 100%; }
  .profile-grid, .commercial-layout { grid-template-columns: 1fr; }
  .feature-admin-card { grid-template-columns: 1fr; }
  .feature-admin-card details { grid-column: 1; }
  .tester-picker > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .brand-logo { width: 112px; }
  .question-action-icons { justify-content: space-between; }
  .compact-action { min-width: 0; flex: 1; }
  .compact-action b { display: none; }
  .solution-dialog { width: 100vw; height: 100vh; border-radius: 0; }
  .solution-tabs { top: 78px; overflow-x: auto; }
  .solution-modal-body { padding: 12px; }
  .solution-modal-body > section { padding: 17px; }
  .solution-alternative-card { padding: 14px 12px; }
  .solution-modal-head { gap: 10px; padding: 14px; }
  .solution-modal-head h2 { font-size: 18px; }
  .solution-modal-head img { width: 38px; height: 38px; }
  .solution-tabs { padding-inline: 12px; }
  .solution-tabs button { flex-shrink: 0; padding-inline: 10px; font-size: 11px; }
  .form-grid.two, .tester-picker > div { grid-template-columns: 1fr; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .share-link-banner, .reply-form { align-items: stretch; flex-direction: column; }
}

/* Convites */
.invite-row > div:first-child { min-width: 0; }
.invite-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.invite-row .share-link-result { margin: 8px 0 0; }
.invite-created .share-link-result { margin: 10px 0 0; }

/* Verificacao em duas etapas */
.otp-input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.qr-box { width: min(240px, 100%); margin: 12px 0; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--line, #dde3ea); }
.qr-box svg { display: block; width: 100%; height: auto; }
.secret-key code { font-size: 1.05rem; letter-spacing: .08em; word-break: break-all; }
.recovery-panel { border: 2px solid var(--warning, #d99a1e); margin-bottom: 20px; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 20px; padding-left: 1.4em; margin: 14px 0; }
.recovery-codes code { font-size: 1.05rem; letter-spacing: .06em; }
.two-factor-setup h2 + p { margin-bottom: 14px; }

/* ===== Pagina inicial publica (landing) ===== */
.landing-page { background: var(--paper); }
.lp-container { width: min(1180px, 100% - 32px); margin: 0 auto; }
.lp-header { position: sticky; top: 0; z-index: 50; background: linear-gradient(120deg, #0c2038, #153b53); box-shadow: 0 6px 24px rgba(9, 28, 48, 0.2); }
.lp-header-inner { min-height: 70px; display: flex; align-items: center; gap: 28px; }
.lp-logo { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.lp-slogan { color: #5fd6ca; font-size: 9px; font-weight: 800; letter-spacing: .3em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.lp-footer-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lp-logo img { height: 30px; width: auto; }
.lp-nav { display: flex; gap: 26px; margin-left: 12px; }
.lp-nav a { color: #b9cad6; font-size: 14px; font-weight: 650; }
.lp-nav a:hover { color: #fff; }
.lp-enter { min-height: 40px; margin-left: auto; }
.lp-big { min-height: 50px; padding: 12px 24px; font-size: 15px; border-radius: 13px; }
.lp-outline { color: var(--heading); border-color: var(--line); background: var(--paper); }
.lp-outline:hover { color: var(--heading); border-color: var(--teal); }

.lp-hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); background: radial-gradient(circle at 8% 90%, color-mix(in srgb, var(--teal) 14%, transparent), transparent 32%), radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--violet) 14%, transparent), transparent 30%), var(--paper); }
.lp-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.lp-kicker { display: inline-flex; margin: 0 0 18px; padding: 6px 12px; color: var(--teal-dark); background: var(--teal-soft); border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lp-hero h1 { margin: 0; color: var(--heading); font-size: clamp(36px, 5.2vw, 62px); line-height: 1.05; letter-spacing: -.045em; }
.lp-hero h1 span { color: var(--teal); }
.lp-lead { max-width: 600px; margin: 22px 0 0; color: var(--muted); font-size: clamp(16px, 1.6vw, 18.5px); }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.lp-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.lp-checks li::before { content: "✓"; margin-right: 7px; color: var(--teal); font-weight: 900; }

.lp-preview { position: relative; padding: 22px 26px 36px 0; }
.lp-window { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 70px rgba(16, 35, 60, .16); transform: rotate(-1.2deg); }
.lp-window-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: var(--soft); border-bottom: 1px solid var(--line); }
.lp-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.lp-window-bar span { margin-left: 10px; padding: 3px 12px; color: var(--muted); background: var(--paper); border-radius: 999px; font-size: 11px; }
.lp-window-body { padding: 18px; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.lp-chips b { padding: 5px 10px; color: var(--teal-dark); background: var(--teal-soft); border-radius: 999px; font-size: 11px; }
.lp-chips .lp-chip-muted { color: var(--violet); background: var(--violet-soft); }
.lp-q { padding: 16px; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--surface-2); }
.lp-q-meta { display: flex; gap: 8px; margin-bottom: 14px; }
.lp-q-meta span { width: 110px; height: 9px; border-radius: 9px; background: color-mix(in srgb, var(--violet) 35%, transparent); }
.lp-q-meta span.short { width: 50px; background: color-mix(in srgb, var(--muted) 30%, transparent); }
.lp-line { height: 9px; margin: 8px 0; border-radius: 9px; background: color-mix(in srgb, var(--muted) 24%, transparent); }
.lp-line.w70 { width: 70%; }
.lp-alts { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.lp-alts li { display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.lp-alts em { width: 24px; height: 24px; display: grid; place-items: center; flex: none; color: var(--muted); border: 1px solid var(--line); border-radius: 50%; font-size: 11px; font-style: normal; font-weight: 800; }
.lp-alts span { height: 8px; border-radius: 8px; background: color-mix(in srgb, var(--muted) 24%, transparent); }
.lp-alts .w80 { width: 80%; } .lp-alts .w60 { width: 60%; } .lp-alts .w75 { width: 75%; } .lp-alts .w55 { width: 55%; }
.lp-alts li.ok { border-color: color-mix(in srgb, var(--green) 55%, transparent); background: var(--green-soft); }
.lp-alts li.ok em { color: #fff; border-color: var(--green); background: var(--green); }
.lp-alts li.ok span { background: color-mix(in srgb, var(--green) 35%, transparent); }
.lp-alts li.ok strong { margin-left: auto; color: var(--green); }
.lp-float { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.lp-float strong { display: block; color: var(--heading); font-size: 14px; }
.lp-float small { color: var(--muted); font-size: 12px; }
.lp-float-score { right: 0; bottom: 0; }
.lp-float-streak { left: -18px; top: 46%; flex-direction: column; gap: 0; align-items: flex-start; }
.lp-float-streak strong { color: var(--teal); font-size: 22px; }
.lp-ring { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal) 0 78%, var(--line) 78% 100%); }
.lp-ring span { width: 36px; height: 36px; display: grid; place-items: center; color: var(--heading); background: var(--paper); border-radius: 50%; font-size: 11px; font-weight: 850; }

.lp-strip { padding: 26px 0; background: var(--soft); border-block: 1px solid var(--border-soft); }
.lp-strip p { margin: 0 0 14px; color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; }
.lp-strip ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; margin: 0; padding: 0; list-style: none; }
.lp-strip li { color: var(--heading); font-size: 17px; font-weight: 800; letter-spacing: -.01em; opacity: .75; }
.lp-strip li.lp-more { color: var(--teal-dark); font-size: 14px; opacity: 1; align-self: center; }

.lp-section { padding: clamp(60px, 8vw, 100px) 0; }
.lp-alt { background: var(--soft); }
.lp-title { max-width: 720px; margin: 0 0 34px; color: var(--heading); font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -.035em; }
.lp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.lp-steps li { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.lp-steps span { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0da99d, #088b83); border-radius: 11px; font-weight: 850; }
.lp-steps h3, .lp-features h3 { margin: 16px 0 6px; color: var(--heading); font-size: 17px; }
.lp-steps p, .lp-features p { margin: 0; color: var(--muted); font-size: 14.5px; }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-features article { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .15s ease, box-shadow .15s ease; }
.lp-features article:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lp-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; font-size: 19px; font-weight: 900; }
.lp-icon.teal { color: var(--teal-dark); background: var(--teal-soft); }
.lp-icon.violet { color: var(--violet); background: var(--violet-soft); }
.lp-icon.amber { color: #a86f00; background: var(--amber-soft); }
.lp-icon.blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); }
.lp-icon.green { color: var(--green); background: var(--green-soft); }
.lp-icon.red { color: var(--red); background: var(--red-soft); }

.lp-numbers { padding: 46px 0; color: #fff; background: radial-gradient(circle at 15% 50%, rgba(17, 188, 173, .25), transparent 35%), linear-gradient(120deg, #0c2038, #153b53); }
.lp-numbers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; text-align: center; }
.lp-numbers strong { display: block; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; }
.lp-numbers span { color: #b9cad6; font-size: 14px; font-weight: 600; }

.lp-access { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.lp-access > div > p:not(.eyebrow) { max-width: 600px; color: var(--muted); font-size: 16.5px; }
.lp-list { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--ink); }
.lp-list li::before { content: "→"; margin-right: 10px; color: var(--teal); font-weight: 900; }
.lp-access-card { padding: 34px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.lp-access-card img { width: 64px; height: 64px; }
.lp-access-card h3 { margin: 14px 0 6px; color: var(--heading); font-size: 21px; }
.lp-access-card p { margin: 0 0 22px; color: var(--muted); }

.lp-faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.lp-faq-list { display: grid; gap: 12px; }
.lp-faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.lp-faq summary { position: relative; padding: 18px 50px 18px 20px; color: var(--heading); font-weight: 750; cursor: pointer; list-style: none; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--teal); font-size: 22px; font-weight: 500; }
.lp-faq details[open] summary::after { content: "–"; }
.lp-faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

.lp-footer { padding: 34px 0; color: #b9cad6; background: #0b1b2e; }
.lp-footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.lp-footer img { height: 26px; width: auto; }
.lp-footer p { margin: 0; font-size: 13px; }
.lp-footer a { margin-left: auto; color: #68dfd2; font-weight: 700; }


@media (max-width: 980px) {
  .lp-nav { display: none; }
  .lp-hero-grid, .lp-access, .lp-faq { grid-template-columns: 1fr; }
  .lp-preview { max-width: 560px; }
  .lp-steps { grid-template-columns: repeat(2, 1fr); }
  .lp-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .lp-header-inner { gap: 12px; min-height: 62px; }
  .lp-logo img { height: 24px; }
  .lp-steps, .lp-features { grid-template-columns: 1fr; }
  .lp-preview { padding: 10px 0 30px; }
  .lp-float-streak { display: none; }
  .lp-cta .button { flex: 1 1 100%; }
  .lp-footer a { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-features article { transition: none; }
}

/* Uso da plataforma (/admin/uso) */
.usage-panel { margin-top: 22px; }
.usage-table-wrap { overflow-x: auto; }
.usage-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.usage-table th { text-align: left; padding: 9px 10px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.usage-table td { padding: 10px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.usage-table td small { display: block; color: var(--muted); font-size: 11px; }
.usage-table .usage-alert { color: #c0392b; font-weight: 700; }
.usage-rules { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.8; }
