:root {
    --surface: #f6f5f2;
    --panel: #ffffff;
    --ink: #0a0a0a;
    --muted: #666666;
    --line: #d8d5ce;
    --soft: #f4f3f0;
    --blue: #4a9fd8;
    --blue-soft: #eef7fc;
    --success: #2d7a5f;
    --shadow: 0 18px 48px rgba(10, 10, 10, .08);
    --content-width: 1180px;
    --font-body: "MBCorpoSText", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "MBCorpoATextCond", "MBCorpoSText", Inter, system-ui, sans-serif;
    --font-mono: "MBCorpoATextCond", "SFMono-Regular", Consolas, monospace;
}

@font-face {
    font-family: "MBCorpoSText";
    src:
        url("/assets/fonts/MBCorpoSText-Regular.woff2") format("woff2"),
        url("/assets/fonts/MBCorpoSText-Regular.woff") format("woff");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "MBCorpoATextCond";
    src:
        url("/assets/fonts/MBCorpoATextCond-Regular-Web.woff2") format("woff2"),
        url("/assets/fonts/MBCorpoATextCond-Regular-Web.woff") format("woff");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
    letter-spacing: 0;
}

button,
input,
textarea {
    font: inherit;
}

input,
select,
textarea {
    font-size: 16px;
}

button,
a {
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

button:hover,
a:hover {
    transform: translateY(-1px);
}

.hero {
    min-height: 520px;
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .95) 0%, rgba(0, 0, 0, .86) 44%, rgba(0, 0, 0, .28) 100%),
        url("/assets/brand/fundal-stelute.png") center / cover no-repeat,
        #0a0a0a;
}

.topbar {
    width: min(var(--content-width), calc(100% - 48px));
    margin: 0 auto;
    padding: 30px 0 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.brand-lockup,
.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
}

.brand-lockup {
    width: auto;
    justify-content: flex-start;
}

.admin-brand {
    width: 100%;
    justify-content: center;
}

.brand-logo {
    display: block;
    width: 128px;
    height: 120px;
    object-fit: contain;
    object-position: left center;
}

.admin-logo {
    display: block;
    width: 154px;
    height: 144px;
    object-fit: contain;
    object-position: center;
}

.step-pills,
.meta-row,
.chip-row,
.admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.step-pills {
    flex-wrap: nowrap;
}

.step-pills span,
.meta-row span,
.premium-link,
.chip span,
.status-pill,
.metric-grid em {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--soft);
    color: var(--ink);
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.premium-link {
    text-decoration: none;
}

.step-pills span {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-color: rgba(255, 255, 255, .18);
}

.meta-row .premium-link {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}

.meta-row .premium-link:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.step-pills .active,
.chip input:checked + span,
.metric-grid article:nth-child(2) em {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.hero-copy {
    width: min(610px, calc(100% - 40px));
    margin-left: max(24px, calc((100% - var(--content-width)) / 2));
    padding-top: 20px;
}

.micro {
    margin: 0 0 18px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    letter-spacing: 0;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.03;
    font-weight: 650;
}

.hero-copy > p:not(.micro) {
    max-width: 590px;
    margin: 18px 0 20px;
    color: #ececec;
    font-size: 17px;
    line-height: 1.55;
}

.form-shell {
    width: min(var(--content-width), calc(100% - 48px));
    margin: 0 auto;
    padding: 42px 0 72px;
    display: grid;
    grid-template-columns: 258px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.progress-rail,
.question-card,
.metric-grid article,
.chart-panel,
.insights-panel,
.response-table,
.builder-preview .question-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.progress-rail {
    position: sticky;
    top: 24px;
    padding: 20px;
}

.progress-rail h2,
.section-heading h2,
.chart-panel h2,
.insights-panel h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
}

.progress-rail ol {
    margin: 18px 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 16px;
}

.progress-rail li {
    position: relative;
    padding-left: 24px;
    color: var(--muted);
    font-size: 14px;
}

.progress-rail li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--line);
}

.progress-rail li.done {
    color: var(--ink);
}

.progress-rail li.done::before {
    background: var(--blue);
}

.progress-rail p,
.section-heading p,
.question-title p,
.question-editor p,
.admin-header p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.feedback-form {
    display: grid;
    gap: 22px;
}

.section-heading {
    display: grid;
    gap: 8px;
}

.section-heading h2 {
    font-size: 29px;
}

.section-heading p {
    margin: 0;
    font-size: 15px;
}

.question-card {
    padding: 22px;
    display: grid;
    gap: 16px;
}

.question-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.question-title > span {
    min-width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
}

.question-title h3 {
    margin: 0;
    font-size: 19px;
    line-height: 1.22;
    font-weight: 650;
}

.question-title p {
    margin: 6px 0 0;
}

.scale-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 10px;
}

.scale-button {
    height: 64px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
}

.scale-button.selected,
.scale-button:focus-visible {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
    outline: none;
}

textarea,
.question-editor input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafaf8;
    color: var(--ink);
}

textarea {
    min-height: 112px;
    padding: 16px;
    resize: vertical;
}

.choice-grid {
    display: grid;
    gap: 10px;
}

.choice-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-grid label,
.radio-dot,
.chip {
    cursor: pointer;
}

.choice-grid label {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
}

.choice-grid label:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.matrix {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.matrix-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(5, 54px);
    align-items: center;
    min-height: 58px;
    border-top: 1px solid var(--line);
}

.matrix-row:first-child {
    border-top: 0;
}

.matrix-head {
    min-height: 44px;
    background: var(--soft);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.matrix-row > span {
    padding: 14px;
    font-size: 14px;
    line-height: 1.35;
}

.matrix-row > b {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 13px;
}

.radio-dot {
    display: grid;
    place-items: center;
}

.radio-dot input,
.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-dot span {
    width: 18px;
    height: 18px;
    border: 1px solid #bcb7ae;
    border-radius: 999px;
    background: #fff;
}

.radio-dot input:checked + span {
    border-color: var(--ink);
    background: var(--ink);
    box-shadow: inset 0 0 0 5px #fff;
}

.profile-card {
    gap: 20px;
}

.chip-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 10px;
}

.chip-fieldset legend {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 650;
}

.chip {
    display: inline-flex;
}

.form-submit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
}

.form-submit p {
    margin: 0;
    line-height: 1.45;
}

.form-submit button,
.admin-actions a,
.admin-actions button,
.question-editor button {
    border: 1px solid var(--ink);
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    padding: 11px 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.admin-page {
    min-height: 100vh;
}

.admin-shell,
.builder-shell {
    min-height: 100vh;
    display: grid;
}

.admin-shell {
    grid-template-columns: 260px minmax(0, 1fr);
}

.admin-sidebar {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .96), rgba(0, 0, 0, .92)),
        url("/assets/brand/fundal-stelute.png") left top / 760px auto no-repeat,
        var(--ink);
    color: #fff;
    padding: 26px 22px;
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

.admin-sidebar a,
.admin-logout-form button {
    color: #bdbdbd;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.admin-sidebar a.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.admin-logout-form {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.admin-logout-form button {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    text-align: left;
    cursor: pointer;
}

.admin-logout-form button:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .1);
}

.admin-login-shell {
    min-height: 100vh;
    padding: 24px;
    display: grid;
    place-items: center;
}

.admin-login-card {
    width: min(430px, 100%);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
    display: grid;
    gap: 24px;
}

.admin-login-card .premium-logo-link img {
    width: 118px;
    height: 112px;
}

.admin-login-kicker {
    margin: 0 0 8px;
    color: var(--blue);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-login-card h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.08;
}

.admin-login-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.45;
}

.admin-login-form {
    display: grid;
    gap: 15px;
}

.admin-login-form label {
    display: grid;
    gap: 8px;
}

.admin-login-form label span {
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.admin-login-form input {
    height: 48px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    background: #fff;
    color: var(--ink);
    font-size: 16px;
    outline: none;
}

.admin-login-form input:focus {
    border-color: #050505;
    box-shadow: 0 0 0 4px rgba(74, 159, 216, .16);
}

.admin-login-error {
    margin: 0;
    color: #9d1d1d;
    font-size: 13px;
    font-weight: 650;
}

.admin-login-form button {
    height: 48px;
    border: 1px solid #050505;
    border-radius: 8px;
    background: #050505;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.admin-workspace {
    padding: 34px 32px;
    display: grid;
    gap: 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.admin-header h1,
.question-editor h1,
.builder-preview h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
}

.admin-header p,
.question-editor p {
    margin: 6px 0 0;
}

.admin-actions button {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}

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

.metric-grid article {
    padding: 20px;
}

.metric-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.metric-grid strong {
    display: block;
    margin: 10px 0;
    font-family: var(--font-mono);
    font-size: 34px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 18px;
}

.chart-panel,
.insights-panel {
    padding: 22px;
}

.bar-chart {
    height: 260px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
    padding-top: 24px;
}

.bar-chart div {
    display: grid;
    gap: 8px;
    align-items: end;
    text-align: center;
}

.bar-chart span {
    width: 100%;
    border-radius: 4px 4px 0 0;
    background: var(--ink);
}

.bar-chart div:nth-child(-n+2) span {
    background: var(--line);
}

.bar-chart div:nth-child(3) span {
    background: var(--blue);
}

.bar-chart b {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 13px;
}

.insights-panel ol {
    margin: 18px 0 0;
    padding-left: 22px;
    display: grid;
    gap: 16px;
}

.insights-panel li::marker {
    color: var(--blue);
    font-family: var(--font-mono);
}

.response-table {
    overflow: hidden;
}

.table-row {
    display: grid;
    grid-template-columns: 150px 90px minmax(220px, 1fr) 110px 130px 110px;
    min-height: 58px;
    border-top: 1px solid var(--line);
}

.table-row:first-child {
    border-top: 0;
}

.table-row span {
    padding: 14px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.table-empty {
    padding: 22px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.table-link {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.table-link:hover {
    color: var(--blue);
}

.table-head {
    min-height: 44px;
    background: var(--soft);
    font-size: 12px;
    font-weight: 800;
}

.builder-shell {
    grid-template-columns: 430px minmax(0, 1fr);
}

.question-admin-grid {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.question-editor {
    padding: 32px 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .98)),
        url("/assets/brand/fundal-stelute.png") left top / 880px auto no-repeat,
        #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.question-editor label {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.question-editor label span {
    font-size: 12px;
    font-weight: 800;
}

.question-editor input {
    height: 44px;
    padding: 0 14px;
}

.question-editor button {
    margin-top: 20px;
}

.builder-preview {
    padding: 32px;
    display: grid;
    align-content: start;
    gap: 20px;
}

.question-inventory {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.question-inventory div {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    min-height: 48px;
    padding: 0 16px;
    border-top: 1px solid var(--line);
}

.question-inventory div:first-child {
    border-top: 0;
}

.drag-handle {
    color: var(--muted);
}

.question-inventory strong {
    font-size: 14px;
}

.question-inventory em {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--soft);
    font-size: 12px;
    font-style: normal;
}

.admin-card-grid,
.answer-detail-grid,
.settings-list {
    display: grid;
    gap: 14px;
}

.admin-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.answer-detail-grid,
.settings-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card-grid article,
.answer-detail-grid article,
.settings-list article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    box-shadow: var(--shadow);
}

.admin-card-grid span,
.answer-detail-grid span,
.settings-list span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-card-grid h2 {
    margin: 10px 0 8px;
    font-size: 22px;
}

.admin-card-grid p {
    margin: 0 0 14px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.admin-card-grid a {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.answer-detail-grid strong,
.settings-list strong {
    display: block;
    margin-top: 8px;
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.admin-notice {
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 14px 16px;
    box-shadow: var(--shadow);
    font-weight: 750;
}

.admin-notice.is-error {
    border-color: #c94a4a;
    color: #8b1717;
}

.question-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.question-edit-form,
.question-edit-preview {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 22px;
    box-shadow: var(--shadow);
}

.question-edit-form {
    display: grid;
    gap: 16px;
}

.question-edit-form label {
    display: grid;
    gap: 8px;
}

.question-edit-form label span,
.question-edit-preview span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.question-edit-form input,
.question-edit-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 12px 14px;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    outline: none;
}

.question-edit-form textarea {
    min-height: 110px;
    resize: vertical;
}

.question-edit-form input:focus,
.question-edit-form textarea:focus {
    border-color: #050505;
    box-shadow: 0 0 0 4px rgba(74, 159, 216, .16);
}

.question-edit-form label em {
    color: #8b1717;
    font-size: 12px;
    font-style: normal;
}

.question-edit-form button {
    justify-self: start;
    border: 1px solid var(--ink);
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    padding: 12px 16px;
    font-weight: 800;
    cursor: pointer;
}

.question-edit-preview {
    position: sticky;
    top: 24px;
}

.question-edit-preview h2 {
    margin: 12px 0;
    font-size: 26px;
    line-height: 1.1;
}

.question-edit-preview p {
    color: var(--muted);
    line-height: 1.45;
}

.analytics-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.analytics-hero-grid article,
.analytics-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.analytics-hero-grid article {
    padding: 20px;
    display: grid;
    gap: 8px;
}

.analytics-hero-grid span,
.panel-heading span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.analytics-hero-grid strong {
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1;
}

.analytics-hero-grid em {
    width: fit-content;
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--blue-soft);
    color: #185a84;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 18px;
}

.analytics-panel {
    padding: 22px;
    display: grid;
    align-content: start;
    gap: 20px;
}

.analytics-panel.wide {
    grid-row: span 2;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
}

.panel-heading h2 {
    margin: 0;
    font-size: 19px;
}

.funnel-bars,
.rank-bars {
    display: grid;
    gap: 14px;
}

.funnel-bars div,
.rank-bars div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 54px;
    gap: 12px;
    align-items: center;
}

.funnel-bars span,
.rank-bars span,
.split-legend span,
.dropoff-list span,
.device-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.funnel-bars i,
.rank-bars i,
.split-meter {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--soft);
}

.funnel-bars i,
.rank-bars i,
.split-meter i {
    display: block;
    background: linear-gradient(90deg, #0a0a0a, var(--blue));
}

.funnel-bars b,
.rank-bars b {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 13px;
}

.dropoff-list {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    list-style: none;
}

.dropoff-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.dropoff-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dropoff-list strong {
    font-family: var(--font-mono);
}

.split-meter {
    height: 16px;
}

.split-meter i {
    height: 100%;
}

.split-legend,
.device-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.device-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.device-grid div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    display: grid;
    gap: 4px;
    background: var(--soft);
}

.device-grid strong {
    font-size: 22px;
}

.premium-page {
    min-height: 100vh;
    background:
        linear-gradient(120deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .62)),
        url("/assets/brand/fundal-stelute.png") center / cover fixed no-repeat,
        #050505;
}

.premium-shell {
    min-height: 100vh;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 28px;
}

.premium-brand-panel,
.premium-card {
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
}

.premium-brand-panel {
    position: sticky;
    top: 28px;
    min-height: calc(100vh - 56px);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: #fff;
    background: rgba(5, 5, 5, .74);
    overflow: hidden;
}

.premium-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(74, 159, 216, .28), transparent 28%),
        radial-gradient(circle at 80% 88%, rgba(255, 255, 255, .16), transparent 22%);
    pointer-events: none;
}

.premium-brand-panel > * {
    position: relative;
    z-index: 1;
}

.premium-language-switch {
    width: fit-content;
    display: inline-flex;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: 4px;
    background: rgba(255, 255, 255, .07);
}

.premium-language-switch button {
    min-width: 42px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, .72);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
}

.premium-language-switch button.active {
    background: #fff;
    color: #050505;
}

.premium-logo-link {
    display: inline-flex;
    width: fit-content;
}

.premium-logo-link img {
    width: 138px;
    height: 130px;
    object-fit: contain;
    object-position: left center;
}

.premium-intro-copy {
    margin-top: auto;
}

.premium-intro-copy h1 {
    margin: 0;
    max-width: 300px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1;
    font-weight: 650;
}

.premium-stats,
.premium-step-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.premium-stats span {
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: 8px 11px;
    color: rgba(255, 255, 255, .82);
    background: rgba(255, 255, 255, .06);
    font-size: 12px;
    font-weight: 650;
}

.premium-progress-block {
    display: grid;
    gap: 10px;
}

.premium-progress-block > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 650;
}

.premium-progress-block strong {
    color: #fff;
    font-family: var(--font-mono);
}

.premium-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.premium-progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4a9fd8, #ffffff);
}

.premium-step-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .28);
}

.premium-step-dots button.active {
    width: 24px;
    background: #fff;
}

.premium-stage {
    min-height: calc(100vh - 56px);
    display: grid;
    place-items: center;
}

.premium-card {
    width: min(860px, 100%);
    max-height: calc(100vh - 56px);
    overflow: auto;
    padding: clamp(22px, 3vw, 40px);
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
}

.premium-question-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.premium-question-header > span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #050505;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 800;
}

.premium-question-header p {
    margin: 0 0 10px;
    color: var(--blue);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.premium-question-header h2 {
    margin: 0;
    max-width: 720px;
    font-size: clamp(22px, 1.8vw, 28px);
    line-height: 1.18;
    font-weight: 660;
    text-wrap: balance;
}

.premium-question-header em {
    display: block;
    margin-top: 14px;
    color: var(--muted);
    font-size: 15px;
    font-style: normal;
    line-height: 1.4;
}

.premium-scale {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.premium-scale.long {
    grid-template-columns: repeat(11, minmax(0, 1fr));
}

.premium-scale button,
.premium-matrix-row button,
.premium-choice-list button,
.premium-profile button {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 750;
}

.premium-scale button {
    min-width: 0;
    height: 64px;
    padding: 0;
    overflow: hidden;
    font-size: 20px;
}

.premium-scale button i {
    position: absolute;
    inset: 0;
    background: #050505;
}

.premium-scale button span {
    position: relative;
    z-index: 1;
}

.premium-scale button.selected,
.premium-matrix-row button.selected,
.premium-choice-list button.selected,
.premium-profile button.selected {
    border-color: #050505;
    color: #fff;
    background: #050505;
}

.premium-textarea {
    width: 100%;
    min-height: 190px;
    margin-top: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #fff;
    color: var(--ink);
    resize: vertical;
    outline: none;
}

.premium-textarea:focus {
    border-color: #050505;
    box-shadow: 0 0 0 4px rgba(74, 159, 216, .16);
}

.premium-choice-list {
    margin-top: 28px;
    display: grid;
    gap: 10px;
}

.premium-choice-list button {
    min-height: 54px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    text-align: left;
    font-size: 15px;
}

.premium-choice-list button span {
    width: 18px;
    height: 18px;
    border: 1px solid currentColor;
    border-radius: 999px;
}

.premium-choice-list button.selected span {
    box-shadow: inset 0 0 0 5px #050505, inset 0 0 0 8px #fff;
}

.premium-matrix,
.premium-profile {
    margin-top: 28px;
    display: grid;
    gap: 12px;
}

.premium-matrix-row,
.premium-profile fieldset {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: rgba(255, 255, 255, .72);
}

.premium-matrix-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.premium-matrix-row p,
.premium-profile legend {
    margin: 0;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 650;
}

.premium-matrix-row div,
.premium-profile fieldset > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.premium-matrix-row button {
    width: 38px;
    height: 38px;
    padding: 0;
}

.premium-profile fieldset {
    display: grid;
    gap: 12px;
}

.premium-profile button {
    padding: 9px 12px;
    font-size: 13px;
}

.premium-actions {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
}

.premium-primary,
.premium-secondary {
    border: 0;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 800;
}

.premium-primary {
    justify-self: end;
    background: #050505;
    color: #fff;
}

.premium-secondary {
    justify-self: start;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.premium-secondary:disabled {
    opacity: .36;
    transform: none;
    cursor: default;
}

.premium-step-count {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 800;
}

.premium-complete {
    display: grid;
    justify-items: center;
    text-align: center;
}

.premium-check {
    width: 82px;
    height: 82px;
    margin-bottom: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #050505;
    color: #fff;
    font-size: 40px;
    font-weight: 900;
}

.premium-complete p {
    margin: 0 0 12px;
    color: var(--blue);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
}

.premium-complete h2 {
    margin: 0;
    max-width: 560px;
    font-size: clamp(30px, 4.5vw, 56px);
    line-height: 1.02;
}

.premium-complete span {
    max-width: 520px;
    margin: 16px 0 28px;
    color: var(--muted);
    line-height: 1.5;
}

@media (max-width: 980px) {
    .topbar,
    .admin-header,
    .form-submit {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-shell,
    .admin-shell,
    .builder-shell,
    .question-admin-grid {
        grid-template-columns: 1fr;
    }

    .progress-rail {
        display: none;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-sidebar nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .metric-grid,
    .dashboard-grid,
    .choice-grid.two,
    .admin-card-grid,
    .answer-detail-grid,
    .settings-list,
    .question-edit-grid,
    .analytics-hero-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .premium-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .premium-brand-panel {
        position: relative;
        top: auto;
        min-height: auto;
    }

    .premium-intro-copy {
        margin-top: 0;
    }

    .premium-stage,
    .premium-card {
        min-height: auto;
        max-height: none;
    }
}

@media (min-width: 641px) and (max-width: 980px) {
    .hero {
        min-height: 460px;
    }

    .topbar,
    .form-shell {
        width: min(760px, calc(100% - 40px));
    }

    .brand-logo {
        width: 112px;
        height: 104px;
    }

    .hero-copy {
        width: min(560px, 100%);
        margin-left: max(20px, calc((100% - 760px) / 2));
        padding-top: 18px;
    }

    .hero h1 {
        font-size: 46px;
    }

    .form-shell {
        padding-top: 34px;
    }

    .question-card {
        padding: 20px;
    }

    .question-title h3 {
        font-size: 17px;
    }

    .question-title > span {
        min-width: 34px;
        height: 34px;
        font-size: 12px;
    }

    .scale-button {
        height: 54px;
        font-size: 18px;
    }

    .premium-shell {
        padding: 22px;
        gap: 20px;
    }

    .premium-brand-panel {
        padding: 22px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
    }

    .premium-language-switch {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .premium-logo-link img {
        width: 96px;
        height: 90px;
    }

    .premium-intro-copy {
        grid-column: 2;
    }

    .premium-intro-copy h1 {
        max-width: none;
        font-size: 34px;
    }

    .premium-stats,
    .premium-progress-block,
    .premium-step-dots {
        grid-column: 1 / -1;
    }

    .premium-card {
        padding: 28px;
    }

    .premium-question-header h2 {
        font-size: 24px;
        line-height: 1.18;
    }

    .premium-scale.long {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    body {
        background: #f5f4f1;
    }

    .hero {
        min-height: 342px;
        background:
            linear-gradient(180deg, rgba(0, 0, 0, .96) 0%, rgba(0, 0, 0, .74) 100%),
            url("/assets/brand/fundal-stelute.png") center / cover no-repeat,
            #0a0a0a;
    }

    .topbar {
        width: calc(100% - 28px);
        padding: 12px 0 4px;
    }

    .brand-logo {
        width: 72px;
        height: 68px;
    }

    .step-pills {
        display: none;
    }

    .hero-copy {
        width: calc(100% - 28px);
        margin-left: 14px;
        padding-top: 8px;
    }

    .hero h1 {
        font-size: 30px;
        line-height: 1.02;
        max-width: 330px;
    }

    .micro {
        margin-bottom: 10px;
        font-size: 10px;
    }

    .hero-copy > p:not(.micro) {
        margin: 12px 0 14px;
        font-size: 12px;
        line-height: 1.38;
        max-width: 330px;
    }

    .meta-row {
        gap: 6px;
    }

    .meta-row span {
        padding: 5px 9px;
        font-size: 10px;
    }

    .form-shell,
    .admin-workspace,
    .builder-preview {
        width: 100%;
        padding: 14px 10px 40px;
    }

    .feedback-form {
        gap: 14px;
    }

    .section-heading {
        gap: 3px;
    }

    .section-heading h2 {
        font-size: 22px;
        line-height: 1.05;
    }

    .section-heading p {
        font-size: 12px;
    }

    .question-card,
    .chart-panel,
    .insights-panel {
        padding: 14px;
        gap: 12px;
        border-radius: 7px;
    }

    .question-title {
        gap: 10px;
    }

    .question-title > span {
        min-width: 30px;
        height: 30px;
        font-size: 10px;
    }

    .question-title h3 {
        font-size: 15px;
        line-height: 1.17;
    }

    .question-title p,
    .progress-rail p,
    .section-heading p {
        font-size: 11px;
    }

    .scale-row {
        display: grid;
        grid-auto-flow: row;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .scale-button {
        width: 100%;
        height: 40px;
        padding: 0;
        font-size: 15px;
        border-radius: 6px;
    }

    .scale-row:has(.scale-button:nth-child(11)) {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .matrix {
        overflow: hidden;
    }

    .matrix-row {
        min-height: 44px;
        grid-template-columns: minmax(0, 1fr) repeat(5, 24px);
    }

    .matrix-row > span {
        padding: 8px;
        font-size: 9px;
        line-height: 1.25;
    }

    .matrix-row > b,
    .matrix-head {
        font-size: 9px;
    }

    .radio-dot span {
        width: 14px;
        height: 14px;
    }

    .radio-dot input:checked + span {
        box-shadow: inset 0 0 0 4px #fff;
    }

    textarea {
        min-height: 88px;
        padding: 12px;
        font-size: 12px;
    }

    .choice-grid {
        gap: 7px;
    }

    .choice-grid label {
        padding: 9px 10px;
        font-size: 12px;
    }

    .chip-fieldset {
        gap: 7px;
    }

    .chip-fieldset legend {
        font-size: 12px;
    }

    .chip-row {
        gap: 6px;
    }

    .chip span {
        padding: 5px 8px;
        font-size: 10px;
    }

    .table-row {
        min-width: 820px;
    }

    .form-submit {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 12px;
        font-size: 12px;
    }

    .form-submit button {
        width: 100%;
        padding: 10px 12px;
        font-size: 12px;
    }

    .response-table {
        overflow-x: auto;
    }

    .admin-sidebar nav {
        grid-template-columns: 1fr 1fr;
    }

    .analytics-panel,
    .analytics-hero-grid article {
        padding: 15px;
    }

    .funnel-bars div,
    .rank-bars div {
        grid-template-columns: 86px minmax(0, 1fr) 44px;
        gap: 8px;
    }

    .device-grid {
        grid-template-columns: 1fr;
    }

    .premium-page {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, .98), rgba(0, 0, 0, .72)),
            url("/assets/brand/fundal-stelute.png") center / cover fixed no-repeat,
            #050505;
    }

    .premium-shell {
        padding: 10px;
        gap: 10px;
    }

    .premium-brand-panel {
        padding: 14px;
        gap: 12px;
        border-radius: 7px;
    }

    .premium-logo-link img {
        width: 66px;
        height: 62px;
    }

    .premium-language-switch {
        align-self: flex-end;
    }

    .premium-language-switch button {
        min-width: 36px;
        height: 26px;
        font-size: 10px;
    }

    .premium-intro-copy h1 {
        max-width: 260px;
        font-size: 25px;
    }

    .premium-stats {
        gap: 6px;
    }

    .premium-stats span {
        padding: 6px 8px;
        font-size: 10px;
    }

    .premium-step-dots {
        display: none;
    }

    .premium-stage {
        display: block;
    }

    .premium-card {
        padding: 15px;
        border-radius: 7px;
    }

    .premium-question-header {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .premium-question-header > span {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    .premium-question-header p {
        margin-bottom: 6px;
        font-size: 9px;
    }

    .premium-question-header h2 {
        max-width: 100%;
        font-size: 20px;
        line-height: 1.12;
    }

    .premium-question-header em {
        margin-top: 9px;
        font-size: 12px;
    }

    .premium-scale {
        margin-top: 18px;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 7px;
    }

    .premium-scale.long {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .premium-scale button {
        height: 42px;
        border-radius: 7px;
        font-size: 15px;
    }

    .premium-textarea {
        min-height: 120px;
        margin-top: 18px;
        padding: 12px;
        font-size: 16px;
        line-height: 1.45;
    }

    .premium-choice-list {
        margin-top: 16px;
        gap: 8px;
    }

    .premium-choice-list button {
        min-height: 44px;
        padding: 10px 11px;
        font-size: 13px;
    }

    .premium-matrix,
    .premium-profile {
        margin-top: 18px;
        gap: 8px;
    }

    .premium-matrix-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .premium-matrix-row p,
    .premium-profile legend {
        font-size: 12px;
    }

    .premium-matrix-row button {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .premium-profile fieldset {
        padding: 10px;
    }

    .premium-profile button {
        padding: 7px 9px;
        font-size: 11px;
    }

    .premium-actions {
        margin-top: 20px;
        grid-template-columns: 1fr 44px 1fr;
        gap: 8px;
    }

    .premium-primary,
    .premium-secondary {
        padding: 11px 10px;
        font-size: 12px;
    }

    .premium-step-count {
        text-align: center;
        font-size: 11px;
    }

    .premium-check {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
}
