@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Zenith Project Surveys — in-game Zenith UI theme */

:root {
    --bg:             #080A0D;
    --bg-dark:        rgba(12, 14, 18, 0.96);
    --surface:        #12141A;
    --surface-2:      #181B23;
    --surface-3:      #202430;
    --surface-active: #1C2232;
    --bg-input:       #0E1016;
    --bg-header:      #0A0C10;
    --border:         #282C37;
    --border-soft:    #1E222C;
    --border-hover:   #464B5A;

    --text:           #D2D7DC;
    --text-muted:     #828791;
    --text-dim:       #50555F;

    --gold:           #C3A03C;
    --gold-bright:    #DCB946;
    --gold-soft:      rgba(195, 160, 60, 0.12);
    --gold-dim:       rgba(140, 115, 40, 0.7);
    --silver:         #BEC3B8;
    --silver-soft:    rgba(190, 195, 184, 0.14);
    --bronze:         #8C7328;

    --foundation:     #1E64B4;
    --chaos:          #2D8C32;
    --tiu:            #DD6723;
    --chicago:        #5E544E;

    --success:        #3CB45A;
    --error:          #B43232;
    --warning:        #C88C28;

    --shadow-1:       0 1px 2px rgba(0, 0, 0, 0.42);
    --shadow-2:       0 10px 28px rgba(0, 0, 0, 0.36);
    --shadow-3:       0 20px 52px rgba(0, 0, 0, 0.44);
    --focus-ring:     0 0 0 3px rgba(195, 160, 60, 0.22);

    --radius:         6px;
    --radius-sm:      4px;
    --radius-lg:      8px;
    --sidebar-width:  300px;

    --mono:           "Fira Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --sans:           "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --display:        "Outfit", var(--sans);
}

* { box-sizing: border-box; }

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.12s ease;
}
a:hover { color: var(--gold-bright); }

::selection { background: var(--gold-soft); color: var(--text); }

h1, h2, h3, h4 {
    color: var(--text);
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 0.5em;
}
h1 {
    color: var(--text);
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.08;
}
h2 { color: var(--gold-bright); font-size: 1.28rem; }
h3 { color: var(--text); font-size: 1.05rem; }

p { margin: 0 0 1em; }
p.muted { color: var(--text-muted); }

hr {
    border: 0;
    border-top: 1px solid var(--border-soft);
    margin: 1.5rem 0;
}

/* ---- Layout ----------------------------------------------------------- */

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 42px;
    width: 100%;
}

main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 48px 0 80px;
}

/* ---- Nav -------------------------------------------------------------- */

.nav {
    background: var(--bg-header);
    border-right: 1px solid var(--border);
    bottom: 0;
    box-shadow: 16px 0 48px rgba(0, 0, 0, 0.22);
    padding: 30px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    z-index: 20;
    overflow-y: auto;
}
.nav-inner {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 22px;
    height: 100%;
    max-width: none;
    padding: 0;
}
.brand {
    font-family: var(--display);
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}
.brand-mark {
    width: 56px;
    height: 56px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    display: inline-block;
    object-fit: contain;
    filter: none;
    box-shadow: none;
}
.brand:hover { color: var(--text); }
.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}
.brand-title,
.brand-tag {
    font-family: var(--display);
    font-size: 1.2rem;
    font-weight: 800;
}
.brand-title {
    color: var(--text);
}
.brand-tag {
    color: var(--gold-bright);
    letter-spacing: 0;
    margin-top: 2px;
    text-transform: none;
}

.nav-links {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}
.nav-links a {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    font-size: 0.92rem;
    font-weight: 500;
    min-height: 40px;
    padding: 9px 13px;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
}
.nav-links a:hover {
    color: var(--text);
    background: var(--surface-2);
    border-color: var(--border);
}
.nav-links .active {
    color: var(--gold-bright);
    background: var(--gold-soft);
    border-color: rgba(195, 160, 60, 0.38);
    font-weight: 600;
}

.nav-user {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 0.92rem;
}
.nav-user > .btn:only-child {
    margin: 0 auto;
}
.nav-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
}
.nav-user .role {
    background: var(--gold-soft);
    border: 1px solid rgba(195, 160, 60, 0.26);
    color: var(--gold-bright);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0;
    font-weight: 600;
}
.nav-user .role.user {
    background: rgba(80, 85, 95, 0.22);
    border-color: rgba(80, 85, 95, 0.42);
    color: var(--silver);
}

/* ---- Buttons ---------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
    text-decoration: none;
    min-height: 40px;
}
.btn:hover {
    background: var(--surface-3);
    color: var(--text);
    border-color: var(--border-hover);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.btn-primary {
    background: var(--gold);
    color: var(--bg-header);
    border-color: var(--gold-bright);
    font-weight: 600;
    box-shadow: 0 0 18px rgba(195, 160, 60, 0.12);
}
.btn-primary:hover {
    background: var(--gold);
    border-color: var(--gold-bright);
    color: var(--bg-header);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover {
    background: var(--gold-soft);
    color: var(--text);
    border-color: rgba(195, 160, 60, 0.28);
}

.btn-danger {
    color: var(--error);
    border-color: rgba(180, 50, 50, 0.44);
}
.btn-danger:hover {
    background: rgba(180, 50, 50, 0.14);
    color: #E66E6E;
    border-color: var(--error);
}

.btn-sm {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 0.85rem;
}

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Cards ------------------------------------------------------------ */

.card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-2);
    overflow-x: auto;
    position: relative;
}
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
    opacity: 0.52;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card:hover { border-color: var(--border-hover); }
.card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.card-title h2 { margin: 0; }
.card-meta { color: var(--text-muted); font-size: 0.9rem; }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.stat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-1);
}
.stat::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gold);
    opacity: 0.68;
}
.stat .label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.stat .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.stat-compact .value {
    font-size: 1.05rem;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0;
}

/* ---- Forms ------------------------------------------------------------ */

label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0;
}
label.inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0;
}

input[type=text], input[type=number], input[type=datetime-local],
input[type=password], input[type=email], textarea, select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 12px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--gold);
    background: var(--surface-active);
    box-shadow: 0 0 0 1px rgba(195, 160, 60, 0.28);
}
textarea { resize: vertical; min-height: 80px; }

input[type=checkbox], input[type=radio] {
    accent-color: var(--gold);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.field { margin-bottom: 16px; }
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-error {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ---- Group management ------------------------------------------------- */

.member-add-form {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.member-add-field {
    min-width: 0;
}
.member-add-field label {
    margin-bottom: 5px;
}
.member-add-submit {
    min-width: 116px;
    min-height: 42px;
}
.member-add-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.staff-promote-form {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(140px, 180px) auto;
    gap: 10px;
    align-items: end;
}
.staff-promote-id {
    min-width: 0;
}
.staff-promote-submit {
    min-width: 112px;
    min-height: 42px;
}

/* ---- Tables ----------------------------------------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}
th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.93rem;
}
th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0;
    background: var(--bg-input);
}
tbody tr:hover { background: var(--gold-soft); }
td .avatar {
    width: 24px; height: 24px; border-radius: 50%;
    border: 1px solid var(--border);
    vertical-align: middle;
    margin-right: 8px;
}

/* ---- Badges ----------------------------------------------------------- */

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0;
    border: 1px solid transparent;
}
.badge-draft     { background: rgba(80, 85, 95, 0.22); color: var(--text-muted); border-color: rgba(80, 85, 95, 0.4); }
.badge-published { background: rgba(60, 180, 90, 0.13); color: var(--success); border-color: rgba(60, 180, 90, 0.35); }
.badge-closed    { background: rgba(180, 50, 50, 0.14); color: #E66E6E; border-color: rgba(180, 50, 50, 0.4); }
.badge-scheduled { background: rgba(200, 140, 40, 0.13); color: var(--warning); border-color: rgba(200, 140, 40, 0.35); }
.badge-anon      { background: var(--silver-soft); color: var(--silver); border-color: rgba(190, 195, 184, 0.22); }
.badge-gold      { background: var(--gold-soft); color: var(--gold-bright); border-color: rgba(195, 160, 60, 0.32); }

/* ---- Flash messages --------------------------------------------------- */

.flash-stack { margin-bottom: 18px; }
.flash {
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
}
.flash.success { background: rgba(60, 180, 90, 0.09); border-color: rgba(60, 180, 90, 0.35); color: var(--success); }
.flash.error   { background: rgba(180, 50, 50, 0.09); border-color: rgba(180, 50, 50, 0.35); color: #E66E6E; }
.flash.info    { background: var(--surface-2); border-color: var(--border); color: var(--text); }

/* ---- Survey list (home/admin) ---------------------------------------- */

.page-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 24px;
    padding: 0 0 24px;
    border-bottom: 1px solid var(--border);
}
.page-hero::after {
    content: "";
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: -1px;
    height: 1px;
    max-width: 1160px;
    margin: 0 auto;
    background: linear-gradient(90deg, rgba(195,160,60,0.72), rgba(140,115,40,0.24), rgba(40,44,55,0));
    pointer-events: none;
}
.page-hero {
    position: relative;
}
.page-hero h1 {
    margin-bottom: 8px;
}
.page-hero p {
    max-width: 620px;
    margin: 0;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-bright);
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--gold);
}
.callout-card {
    max-width: 720px;
    margin: 0 auto 24px;
    border-color: rgba(195,160,60,0.26);
}

.survey-list { display: grid; gap: 14px; }
.survey-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-1);
    transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.survey-item::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: var(--gold);
    opacity: 0.84;
}
.survey-item:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
    box-shadow: var(--shadow-2);
    background: var(--surface-3);
}
.survey-item .meta {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 4px;
}
.survey-item h3 {
    color: var(--text);
    margin: 0;
    font-size: 1.12rem;
}
.survey-actions {
    flex: 0 0 auto;
}
.survey-cta {
    min-width: 118px;
    min-height: 42px;
    padding: 9px 18px;
    white-space: nowrap;
    box-shadow: 0 0 18px rgba(195,160,60,0.1);
}

/* ---- Survey take page (paginated) ------------------------------------ */

/* Everything inside the take view aligns to this 640px column. */
.survey-take {
    max-width: 640px;
    margin: 0 auto;
}
.survey-head {
    text-align: center;
    margin-bottom: 28px;
}
.survey-head h1 {
    margin: 0 0 6px;
    font-size: 1.6rem;
}
.survey-head .badge {
    display: inline-block;
    margin-bottom: 10px;
}
.survey-head .survey-desc {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.98rem;
}

.progress-header {
    margin: 0 auto 22px;
    width: 100%;
}
.progress-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 0;
    text-transform: uppercase;
    font-weight: 600;
}
.progress-text .progress-current {
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}
.progress-bar {
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bronze), var(--gold-bright));
    width: 0%;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(195, 160, 60, 0.42);
}

.q-stage {
    position: relative;
    padding: 4px 0;
}
.q-page {
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    will-change: opacity, transform;
}
.q-page.active {
    opacity: 1;
    transform: translateY(0);
}
.q-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-3);
}
.q-prompt {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 22px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
}
.q-prompt .req {
    color: var(--gold);
    margin-left: 4px;
}
.q-inline-error {
    margin-top: 14px;
    text-align: center;
}

.q-nav {
    margin: 24px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.q-nav .q-nav-meta {
    font-size: 0.82rem;
    flex: 1;
    text-align: center;
}
.q-nav .btn-back:disabled {
    visibility: hidden; /* keep layout, hide visually */
}

/* Yes/No: wider hit targets */
.rating-scale.yesno {
    justify-content: center;
}
.rating-scale.yesno .yn {
    width: auto;
    padding: 0 28px;
    font-size: 1rem;
}

@media (max-width: 640px) {
    .q-card { padding: 22px 18px; }
    .q-prompt { font-size: 1.1rem; }
    .q-nav { flex-wrap: wrap; }
    .q-nav .q-nav-meta { order: 3; flex-basis: 100%; }
}
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.12s;
    /* Override the global label rule so choice text isn't shouty. */
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 500;
    margin-bottom: 0;
}
.choice:hover {
    background: var(--surface-3);
    border-color: var(--border-hover);
}
.choice input { flex-shrink: 0; }
.choice input:checked ~ span { color: var(--gold-bright); }
.choice:has(input:checked) {
    border-color: var(--gold);
    background: var(--gold-soft);
}

.rating-scale {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.rating-scale label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
    font-weight: 600;
    transition: all 0.12s;
}
.rating-scale input { display: none; }
.rating-scale input:checked + label,
.rating-scale label:hover {
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--gold-bright);
}

/* ---- Admin survey builder -------------------------------------------- */

.builder-q {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 12px;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.builder-q:hover { border-color: var(--border-hover); }
.builder-q.dragging {
    opacity: 0.4;
    border-color: var(--gold);
}
.builder-q.drop-above {
    box-shadow: 0 -3px 0 0 var(--gold) inset, 0 -3px 0 0 var(--gold);
    border-top-color: var(--gold);
}
.builder-q header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 8px;
}
.builder-q .q-num {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    font-family: var(--mono);
    min-width: 28px;
}
.builder-q .q-actions { display: flex; gap: 6px; }

.drag-handle {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    padding: 6px 6px;
    border-radius: var(--radius);
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.drag-handle:hover {
    color: var(--gold);
    background: var(--surface-2);
    border-color: var(--border-hover);
}
.drag-handle:active { cursor: grabbing; }
.drag-handle svg { fill: currentColor; display: block; }

/* Answer editor (MC questions) */
.answer-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.answer-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.answer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 10px 6px 12px;
    transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}
.answer-row:hover { border-color: var(--border-hover); }
.answer-row:focus-within {
    border-color: var(--gold);
    background: var(--surface-3);
}
.answer-row.shake {
    animation: shake 0.3s ease-in-out;
    border-color: var(--error);
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.answer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    flex-shrink: 0;
}
.answer-icon svg { display: block; fill: currentColor; opacity: 0.7; }

.answer-input {
    flex: 1;
    background: transparent !important;
    border: 0 !important;
    padding: 8px 0 !important;
    color: var(--text);
    font-size: 0.98rem;
    min-width: 0;
}
.answer-input:focus { outline: none; }
.answer-input::placeholder { color: var(--text-dim); }

.answer-remove {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    padding: 6px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.answer-remove svg { display: block; fill: currentColor; }
.answer-remove:hover {
    color: #E66E6E;
    background: rgba(180,50,50,0.12);
    border-color: rgba(180,50,50,0.34);
}

.add-answer-wrap {
    display: flex;
    justify-content: flex-end;
}
.add-answer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.12s ease;
}
.add-answer svg { fill: var(--gold); display: block; }
.add-answer:hover {
    background: var(--surface-3);
    border-color: var(--gold);
    color: var(--gold);
}
.add-answer:hover svg { fill: var(--gold-bright); }

.answer-warn {
    color: var(--error);
    font-size: 0.85rem;
    text-align: right;
    margin-top: -4px;
}

.add-q-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px;
    background: rgba(18,20,26,0.88);
    border: 1px dashed rgba(195,160,60,0.38);
    border-radius: var(--radius-lg);
    margin: 16px 0;
}
.add-q-bar span {
    color: var(--text-muted);
    margin-right: 8px;
    align-self: center;
    font-size: 0.9rem;
}

/* ---- Charts ----------------------------------------------------------- */

.chart-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 14px;
}
.chart-card h3 {
    color: var(--text);
    margin-bottom: 14px;
}
.chart-card .chart-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0;
}
.chart-card .rating-avg {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    margin-bottom: 14px;
}
.chart-card .rating-avg span {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0;
}
.chart-canvas-wrap {
    position: relative;
    height: 280px;
}
.results-hero {
    align-items: center;
}
.result-card {
    padding: 0;
    overflow: hidden;
}
.result-card-head {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: start;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border);
}
.result-card-head h3 {
    color: var(--text);
    margin: 0 0 5px;
    line-height: 1.35;
}
.question-index {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gold-soft);
    border: 1px solid rgba(195,160,60,0.32);
    color: var(--gold-bright);
    font-family: var(--mono);
    font-weight: 700;
    box-shadow: 0 0 0 4px rgba(195,160,60,0.06);
}
.result-visual-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) minmax(260px, 0.8fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
}
.result-breakdown {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.result-bar-row {
    display: grid;
    gap: 7px;
}
.result-bar-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--text);
    font-size: 0.92rem;
}
.result-bar-top span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.result-bar-top strong {
    color: var(--silver);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.result-bar-top em {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 600;
    margin-left: 4px;
}
.result-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--bg-input);
    border: 1px solid var(--border);
}
.result-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--bronze), var(--gold-bright));
    box-shadow: 0 0 12px rgba(195,160,60,0.24);
}
.result-voters {
    margin-top: 5px;
}
.result-voter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    max-height: 142px;
    overflow-y: auto;
    padding-right: 2px;
}
.result-voter-chip {
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    display: inline-flex;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    padding: 6px 8px;
}
.result-voter-chip:hover {
    background: var(--gold-soft);
    border-color: rgba(195, 160, 60, 0.3);
    color: var(--text);
}
.result-voter-chip img {
    border-radius: 50%;
    flex: 0 0 auto;
    height: 24px;
    width: 24px;
}
.result-voter-chip span {
    display: grid;
    min-width: 0;
}
.result-voter-chip strong {
    color: var(--text);
    font-size: 0.78rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.result-voter-chip small {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.66rem;
    line-height: 1.15;
}
.result-voter-empty {
    color: var(--text-dim);
    font-size: 0.78rem;
    font-style: italic;
}
.text-answers {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.text-answer-grid {
    max-height: 440px;
    padding: 24px;
    gap: 12px;
}
.text-answer {
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius);
}
.text-answer .author {
    color: var(--gold-bright);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0;
}
.text-answer .body { color: var(--text); }
.result-card-empty {
    padding: 24px;
    margin: 0;
}
.identity-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    margin: 0 0 18px;
    border: 1px solid rgba(195,160,60,0.34);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(195,160,60,0.12), rgba(24,27,35,0.94) 34%, rgba(18,20,26,0.96)),
        var(--surface);
    box-shadow: var(--shadow-2);
}
.identity-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.identity-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(195,160,60,0.58);
    box-shadow: 0 0 0 5px rgba(195,160,60,0.09), 0 10px 28px rgba(0,0,0,0.28);
}
.identity-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-3);
    color: var(--gold-bright);
    font-size: 1.5rem;
    font-weight: 700;
}
.identity-kicker {
    color: var(--gold-bright);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.identity-card h2 {
    margin: 0 0 5px;
}
.identity-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.82rem;
}
.identity-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-input);
}
.answer-review-list {
    display: grid;
    gap: 14px;
}
.answer-review-card .result-card-head {
    background: linear-gradient(90deg, rgba(195,160,60,0.06), rgba(24,27,35,0));
}
.answer-review-body {
    padding: 22px 24px 24px;
}
.answer-text {
    padding: 16px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
}
.answer-empty {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: var(--radius);
    border: 1px dashed var(--border-hover);
    color: var(--text-muted);
    background: var(--bg-input);
}
.answer-token-list {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}
.answer-token {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--gold);
    background: var(--gold-soft);
    border: 1px solid rgba(195,160,60,0.32);
    font-weight: 700;
}
.answer-rating {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    background: var(--gold-soft);
    border: 1px solid rgba(195,160,60,0.32);
}
.answer-rating span {
    color: var(--gold-bright);
    font-size: 2.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.answer-rating small {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}
.respondents-card table {
    margin-bottom: 0;
}
.respondents-table tbody tr {
    transition: background 0.12s ease;
}
.respondents-table tbody tr:hover {
    background: var(--gold-soft);
}
.respondent-person {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
}
.respondent-person:hover {
    color: var(--gold);
}
.respondent-link {
    border-radius: 999px;
}
.text-answer .respondent-link {
    display: inline-flex;
    width: fit-content;
}
.steam-id {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-family: var(--mono);
    margin-left: 8px;
}

/* ---- Footer ----------------------------------------------------------- */

.footer {
    border-top: 1px solid var(--border);
    margin-left: var(--sidebar-width);
    padding: 18px 0;
    color: var(--text-dim);
    font-size: 0.85rem;
}
.footer-inner {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.footer a {
    color: var(--text-muted);
}
.footer a:hover {
    color: var(--gold-bright);
}
.footer-link {
    border-left: 1px solid var(--border);
    padding-left: 14px;
}

/* ---- Misc utilities --------------------------------------------------- */

.muted { color: var(--text-muted); }
.right { text-align: right; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.gap-sm { gap: 6px; }

.empty-state {
    padding: 56px 24px;
    text-align: center;
    color: var(--text-muted);
    background: var(--surface-2);
    border: 1px dashed var(--border-hover);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
}
.empty-state .icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 14px;
    color: var(--bronze);
    background: var(--gold-soft);
    border: 1px solid rgba(195,160,60,0.24);
    border-radius: 50%;
}

.steam-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: var(--surface-2);
    border: 1px solid var(--gold);
    color: var(--gold-bright);
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
    min-height: 44px;
    white-space: nowrap;
    box-shadow: 0 0 18px rgba(195,160,60,0.1);
}
.steam-btn:hover {
    background: var(--gold-soft);
    color: var(--gold-bright);
    box-shadow: 0 0 0 1px var(--gold), 0 4px 12px rgba(195,160,60,0.16);
}

@media (max-width: 900px) {
    .container { padding: 0 18px; }
    main {
        margin-left: 0;
        padding: 26px 0 54px;
    }
    .footer { margin-left: 0; }
    .nav {
        position: static;
        width: auto;
        bottom: auto;
        padding: 14px 0;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: none;
        overflow: visible;
    }
    .nav-inner {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        height: auto;
        padding: 0 18px;
    }
    .brand { justify-content: center; }
    .nav-links {
        align-items: center;
        flex-direction: row;
        justify-content: center;
        overflow-x: auto;
        padding: 4px;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: var(--surface);
    }
    .nav-links a { white-space: nowrap; }
    .nav-user {
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 0;
        padding: 10px;
    }
    .page-hero {
        align-items: stretch;
        flex-direction: column;
        padding-top: 18px;
        gap: 16px;
    }
    .page-hero .steam-btn { width: 100%; justify-content: center; }
    .card { padding: 20px 18px; }
    .results-hero .row { justify-content: stretch; }
    .results-hero .btn { flex: 1; }
    .identity-card {
        align-items: stretch;
        flex-direction: column;
    }
    .identity-main {
        align-items: flex-start;
    }
    .identity-avatar {
        width: 52px;
        height: 52px;
    }
    .identity-card .btn {
        width: 100%;
    }
    .identity-meta {
        gap: 6px;
    }
    .result-card-head {
        grid-template-columns: 34px 1fr;
        padding: 18px;
    }
    .question-index {
        width: 34px;
        height: 34px;
    }
    .result-visual-grid {
        grid-template-columns: 1fr;
        padding: 18px;
    }
    .text-answer-grid { padding: 18px; }
    .answer-review-body { padding: 18px; }
    .answer-rating {
        width: 100%;
        justify-content: space-between;
    }
    .chart-canvas-wrap { height: 240px; }
    .steam-id {
        display: block;
        margin: 4px 0 0 32px;
    }
    .field-row { grid-template-columns: 1fr; }
    .member-add-form { grid-template-columns: 1fr; }
    .member-add-actions { justify-content: stretch; }
    .member-add-submit { width: 100%; }
    .staff-promote-form { grid-template-columns: 1fr; }
    .staff-promote-submit { width: 100%; }
    .survey-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 20px;
    }
    .survey-actions,
    .survey-cta { width: 100%; }
    h1 { font-size: 1.4rem; }
}

@media (max-width: 520px) {
    .nav-links { justify-content: flex-start; }
    .card-title,
    .row.between {
        align-items: stretch;
        flex-direction: column;
    }
    .row.between .row { flex-wrap: wrap; }
}

/* ---- Results PDF export --------------------------------------------- */

.pdf-export-page {
    background:
        radial-gradient(circle at top left, rgba(195, 160, 60, 0.08), transparent 30%),
        var(--bg);
    min-height: 100vh;
}
.pdf-export-page main {
    margin-left: 0;
    padding: 0;
}
.pdf-export-toolbar {
    align-items: center;
    background: rgba(8, 10, 13, 0.86);
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(12px);
}
.pdf-export-shell {
    margin: 0 auto;
    max-width: 1040px;
    padding: 34px 24px 56px;
}
.pdf-export-document {
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
    overflow: hidden;
}
.pdf-export-header {
    background:
        linear-gradient(135deg, rgba(195, 160, 60, 0.13), transparent 42%),
        var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 30px;
}
.pdf-export-brand {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}
.pdf-export-brand img {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    filter: none;
    height: 44px;
    object-fit: contain;
    padding: 0;
    width: 44px;
}
.pdf-brand-title,
.pdf-brand-subtitle {
    font-family: var(--display);
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.05;
}
.pdf-brand-title { color: var(--text); }
.pdf-brand-subtitle { color: var(--gold-bright); }
.pdf-export-kicker {
    color: var(--gold-bright);
    font-family: var(--mono);
    font-size: 0.78rem;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.pdf-export-header h1 {
    font-size: 1.9rem;
    max-width: 760px;
}
.pdf-export-description {
    color: var(--text-muted);
    max-width: 760px;
}
.pdf-export-meta-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 24px;
}
.pdf-export-meta-grid > div {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 0;
    padding: 12px;
}
.pdf-export-meta-grid span,
.pdf-response-head span,
.pdf-answer-prompt small,
.pdf-export-meta-grid small {
    color: var(--text-muted);
    display: block;
    font-size: 0.76rem;
}
.pdf-export-meta-grid strong {
    color: var(--text);
    display: block;
    line-height: 1.25;
    margin-top: 4px;
    overflow-wrap: anywhere;
}
.pdf-export-meta-grid small {
    font-family: var(--mono);
    margin-top: 3px;
    overflow-wrap: anywhere;
}
.pdf-empty-state {
    padding: 34px 30px 38px;
}
.pdf-empty-state h2 {
    color: var(--gold-bright);
}
.pdf-empty-state p {
    color: var(--text-muted);
}
.pdf-responses {
    display: grid;
    gap: 18px;
    padding: 24px;
}
.pdf-response-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.pdf-response-head {
    align-items: flex-start;
    background: rgba(8, 10, 13, 0.42);
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 18px 20px;
}
.pdf-response-head h2 {
    color: var(--text);
    font-size: 1.16rem;
    margin-bottom: 0;
}
.pdf-response-meta {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.76rem;
    text-align: right;
}
.pdf-answer-list {
    display: grid;
}
.pdf-answer-row {
    border-top: 1px solid var(--border-soft);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(230px, 0.85fr) minmax(0, 1.15fr);
    padding: 18px 20px;
}
.pdf-answer-row:first-child {
    border-top: 0;
}
.pdf-answer-prompt {
    align-items: flex-start;
    display: grid;
    gap: 12px;
    grid-template-columns: 34px 1fr;
}
.pdf-answer-prompt > span {
    align-items: center;
    background: var(--gold-soft);
    border: 1px solid rgba(195, 160, 60, 0.26);
    border-radius: var(--radius);
    color: var(--gold-bright);
    display: inline-flex;
    font-family: var(--mono);
    font-size: 0.84rem;
    height: 34px;
    justify-content: center;
    width: 34px;
}
.pdf-answer-prompt h3 {
    font-size: 0.98rem;
    line-height: 1.35;
    margin-bottom: 4px;
}
.pdf-answer-value {
    min-width: 0;
}
.pdf-answer-text {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
}
.pdf-answer-empty {
    color: var(--text-muted);
    font-style: italic;
}
.pdf-answer-rating {
    align-items: baseline;
    background: var(--gold-soft);
    border: 1px solid rgba(195, 160, 60, 0.24);
    border-radius: var(--radius);
    display: inline-flex;
    gap: 10px;
    padding: 10px 12px;
}
.pdf-answer-rating strong {
    color: var(--gold-bright);
    font-family: var(--display);
    font-size: 1.4rem;
}
.pdf-answer-rating span {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.pdf-token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pdf-token {
    background: var(--gold-soft);
    border: 1px solid rgba(195, 160, 60, 0.25);
    border-radius: var(--radius);
    color: var(--gold-bright);
    display: inline-flex;
    font-size: 0.86rem;
    line-height: 1.25;
    padding: 7px 10px;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .pdf-export-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .pdf-export-toolbar .btn {
        justify-content: center;
        width: 100%;
    }
    .pdf-export-shell {
        padding: 18px;
    }
    .pdf-export-header {
        padding: 22px;
    }
    .pdf-export-meta-grid {
        grid-template-columns: 1fr;
    }
    .pdf-response-head {
        flex-direction: column;
    }
    .pdf-response-meta {
        text-align: left;
    }
    .pdf-answer-row {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        margin: 14mm;
    }
    html,
    body,
    .pdf-export-page {
        background: var(--bg) !important;
    }
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .pdf-export-toolbar {
        display: none !important;
    }
    .pdf-export-shell {
        max-width: none;
        padding: 0;
    }
    .pdf-export-document {
        border-radius: 0;
        box-shadow: none;
    }
    .pdf-export-header,
    .pdf-response-card,
    .pdf-answer-row,
    .pdf-answer-text {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .pdf-responses {
        gap: 14px;
        padding: 18px;
    }
}
