@font-face {
    font-family: "Lemon Milk";
    src: url("/assets/uploads/fonts/LEMONMILK-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lemon Milk";
    src: url("/assets/uploads/fonts/LEMONMILK-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Louis George Cafe";
    src: url("/assets/uploads/fonts/Louis-George-Cafe.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Louis George Cafe";
    src: url("/assets/uploads/fonts/Louis-George-Cafe-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --dcts-green: #145c35;
    --dcts-green-dark: #0b3a24;
    --dcts-green-deep: #062417;
    --dcts-gold: #f2b705;
    --dcts-black: #020403;
    --dcts-white: #ffffff;
    --dcts-cream: #f7f5ee;
    --dcts-green-light: #e8f3ed;
    --dcts-line: #d9ded6;
    --dcts-text: #17231d;
    --dcts-muted: #5f6f67;
    --font-heading: "Lemon Milk", Arial, Helvetica, sans-serif;
    --font-body: "Louis George Cafe", Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    background: var(--dcts-cream);
    color: var(--dcts-text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.55;
}

a {
    color: var(--dcts-green);
    font-weight: 700;
}

.top-strip {
    background: var(--dcts-green);
    border-bottom: 2px solid var(--dcts-gold);
    height: 28px;
}

.site-header {
    align-items: center;
    background: var(--dcts-black);
    border-bottom: 4px solid var(--dcts-green);
    display: flex;
    justify-content: space-between;
    padding: 18px clamp(16px, 4vw, 52px);
}

.session-mode-header {
    align-items: center;
    background: var(--dcts-black);
    border-bottom: 3px solid var(--dcts-green);
    display: flex;
    justify-content: space-between;
    padding: 10px clamp(16px, 3vw, 36px);
}

.session-mode-brand {
    align-items: center;
    color: var(--dcts-white);
    display: flex;
    gap: 10px;
    text-decoration: none;
}

.session-mode-brand img {
    height: 38px;
    object-fit: contain;
    width: 38px;
}

.session-mode-brand span,
.session-mode-label {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.session-mode-label {
    color: var(--dcts-white);
}

.brand {
    align-items: center;
    color: var(--dcts-white);
    display: flex;
    gap: 16px;
    min-width: 260px;
    text-decoration: none;
}

.brand img {
    height: 70px;
    width: 70px;
    object-fit: contain;
}

.brand span {
    display: grid;
    gap: 2px;
    line-height: 1;
}

.brand strong,
.brand em,
h1,
h2,
h3,
.eyebrow {
    font-family: var(--font-heading);
    font-style: normal;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand strong,
.brand em {
    color: var(--dcts-white);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.nav a {
    color: var(--dcts-white);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    padding: 10px 12px;
    text-decoration: none;
    text-transform: uppercase;
}

.nav a:hover,
.nav a:focus {
    color: var(--dcts-gold);
}

.container {
    margin: 0 auto;
    max-width: 1180px;
    min-height: calc(100vh - 260px);
    padding: 32px 16px 52px;
}

.session-mode-main {
    min-height: calc(100vh - 62px);
    max-width: 100%;
    padding: 10px 12px 18px;
}

.wide-page {
    margin-left: calc(50% - 50vw + 16px);
    margin-right: calc(50% - 50vw + 16px);
}

.welcome,
.auth-panel,
.confirm,
.detail,
.note,
.form-narrow,
.question-form {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-radius: 4px;
    box-shadow: 0 12px 30px rgba(6, 36, 23, 0.08);
    padding: clamp(22px, 4vw, 34px);
}

.docs-panel {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-gold);
    margin-bottom: 18px;
    padding: clamp(20px, 3vw, 30px);
}

.docs-panel pre {
    background: #f4f6f2;
    border: 1px solid var(--dcts-line);
    overflow-x: auto;
    padding: 14px;
}

.docs-panel code {
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92rem;
}

.hero-panel {
    background:
        linear-gradient(90deg, rgba(6, 36, 23, 0.94), rgba(20, 92, 53, 0.9)),
        url("/assets/uploads/Logo_Dauphin-County-Technical-School.png") right 32px center / 280px no-repeat;
    border: 0;
    color: var(--dcts-white);
    max-width: none;
    min-height: 360px;
    padding: clamp(32px, 7vw, 76px);
}

.hero-panel p {
    max-width: 620px;
}

.hero-panel h1 {
    color: var(--dcts-white);
}

.auth-panel,
.form-narrow {
    max-width: 620px;
}

.form-narrow + .note,
.question-form + .note {
    margin-top: 28px;
}

.page-heading {
    align-items: flex-start;
    border-bottom: 4px solid var(--dcts-gold);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 18px;
}

.section-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin: 34px 0 14px;
}

.section-heading h2 {
    margin: 0;
}

.section-heading a,
.table-note a {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.table-note {
    margin-top: 10px;
}

h1,
h2,
h3 {
    color: var(--dcts-green);
    line-height: 1.15;
    margin: 0 0 12px;
}

h1 {
    font-size: clamp(1.8rem, 4.2vw, 2.9rem);
}

h2 {
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
}

p {
    margin-top: 0;
}

.eyebrow {
    color: var(--dcts-gold);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.muted,
.empty {
    color: var(--dcts-muted);
}

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

.actions-cell {
    display: table-cell;
    text-align: left;
    vertical-align: middle;
}

.button,
button {
    background: var(--dcts-green);
    border: 2px solid var(--dcts-gold);
    border-radius: 6px;
    color: var(--dcts-white);
    cursor: pointer;
    display: inline-block;
    font: 700 0.82rem var(--font-heading);
    letter-spacing: 0;
    padding: 11px 16px;
    text-decoration: none;
    text-transform: uppercase;
}

.button:hover,
button:hover,
.button:focus,
button:focus {
    background: var(--dcts-green-dark);
    border-color: var(--dcts-gold);
    color: var(--dcts-white);
}

.button.secondary,
button.secondary {
    background: var(--dcts-white);
    border-color: var(--dcts-green);
    color: var(--dcts-green);
}

.page-heading .actions .button,
.page-heading .actions button {
    background: var(--dcts-white);
    border-color: var(--dcts-green);
    color: var(--dcts-green);
}

.button.secondary:hover,
.button.secondary:focus,
button.secondary:hover,
button.secondary:focus {
    background: var(--dcts-green-light);
    border-color: var(--dcts-green);
    color: var(--dcts-green);
}

.page-heading .actions .button:hover,
.page-heading .actions .button:focus,
.page-heading .actions button:hover,
.page-heading .actions button:focus {
    background: var(--dcts-green-light);
    border-color: var(--dcts-green);
    color: var(--dcts-green);
}

button.danger {
    background: #8d1f17;
    border-color: #63160f;
}

button.danger:hover,
button.danger:focus {
    background: #63160f;
    border-color: #63160f;
}

.sr-only {
    height: 1px;
    left: -10000px;
    overflow: hidden;
    position: absolute;
    top: auto;
    width: 1px;
}

form {
    display: grid;
    gap: 14px;
}

label {
    color: var(--dcts-green-dark);
    font-weight: 700;
}

.help-tip {
    align-items: center;
    background: var(--dcts-green-light);
    border: 1px solid rgba(14, 96, 55, 0.38);
    border-radius: 999px;
    color: var(--dcts-green);
    cursor: help;
    display: inline-flex;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    height: 18px;
    justify-content: center;
    line-height: 1;
    margin-left: 6px;
    position: relative;
    text-transform: none;
    vertical-align: middle;
    width: 18px;
}

.help-tip::after {
    background: var(--dcts-black);
    border-radius: 4px;
    bottom: calc(100% + 8px);
    color: var(--dcts-white);
    content: attr(data-help);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 400;
    left: 50%;
    line-height: 1.35;
    opacity: 0;
    padding: 9px 10px;
    pointer-events: none;
    position: absolute;
    text-align: left;
    text-transform: none;
    transform: translateX(-50%) translateY(3px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    visibility: hidden;
    width: min(260px, 72vw);
    z-index: 20;
}

.help-tip:hover::after,
.help-tip:focus::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

input,
select,
textarea {
    background: var(--dcts-white);
    border: 1px solid #b9c3bc;
    border-radius: 0;
    color: var(--dcts-text);
    font: inherit;
    padding: 11px 12px;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--dcts-green);
    box-shadow: 0 0 0 3px rgba(242, 183, 5, 0.28);
    outline: none;
}

input[type="checkbox"]:focus,
input[type="checkbox"]:focus-visible,
input[type="checkbox"]:active {
    box-shadow: none;
    outline: none;
}

textarea {
    resize: vertical;
}

.grid-2,
.grid-3 {
    display: grid;
    gap: 14px;
}

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

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

.check-row {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-top: 30px;
}

.check-row input {
    accent-color: var(--dcts-green);
    width: auto;
}

.field-help {
    color: var(--dcts-muted);
    font-size: 0.95rem;
    margin: -4px 0 4px;
}

.new-taxonomy-field {
    margin-top: 8px;
}

.taxonomy-add-form,
.taxonomy-category-card {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-green);
    margin-bottom: 16px;
    padding: 14px;
}

.taxonomy-add-form h2 {
    margin-bottom: 12px;
}

.taxonomy-add-grid,
.taxonomy-standard-row {
    align-items: end;
    display: grid;
    gap: 10px;
}

.taxonomy-add-grid {
    grid-template-columns: minmax(180px, 0.8fr) 110px minmax(280px, 1.4fr) auto;
}

.taxonomy-management {
    display: grid;
    gap: 14px;
}

.taxonomy-category-card summary {
    cursor: pointer;
    font-family: var(--font-heading);
}

.taxonomy-category-card summary small {
    color: var(--dcts-muted);
    display: block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin-top: 4px;
    text-transform: none;
}

.taxonomy-category-actions {
    align-items: end;
    border-top: 1px solid var(--dcts-line);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(260px, 1fr) auto;
    margin-top: 12px;
    padding-top: 12px;
}

.taxonomy-inline-form,
.taxonomy-delete-form,
.taxonomy-row-actions {
    align-items: end;
    display: flex;
    gap: 10px;
}

.taxonomy-inline-form label {
    flex: 1;
}

.taxonomy-standard-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.taxonomy-standard-row {
    background: #fbfefc;
    border: 1px solid rgba(20, 92, 53, 0.18);
    grid-template-columns: minmax(180px, 0.8fr) 90px minmax(280px, 1.4fr) 110px auto;
    padding: 10px;
}

.taxonomy-standard-row textarea {
    min-height: 58px;
}

.taxonomy-question-count {
    color: var(--dcts-muted);
    font-weight: 700;
    padding-bottom: 12px;
}

.audit-intro {
    margin-bottom: 18px;
}

.audit-list {
    display: grid;
    gap: 16px;
}

.audit-fix-all {
    align-items: center;
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-green);
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr auto;
    margin-bottom: 18px;
    padding: 14px;
}

.audit-fix-all h2,
.audit-fix-all p {
    margin: 0;
}

.audit-fix-all p {
    color: var(--dcts-muted);
    margin-top: 6px;
}

.audit-card {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-yellow);
    padding: 16px;
}

.audit-question {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, 1fr) minmax(240px, 0.45fr);
}

.audit-question h2 {
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    margin-bottom: 8px;
}

.audit-question p {
    margin: 0;
}

.audit-old-home {
    background: var(--dcts-green-light);
    border: 1px solid rgba(20, 92, 53, 0.2);
    display: grid;
    gap: 4px;
    padding: 12px;
}

.audit-old-home span,
.audit-suggestion span {
    color: var(--dcts-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.audit-old-home strong {
    color: var(--dcts-green-dark);
    font-family: var(--font-body);
    font-weight: 700;
    margin-bottom: 6px;
}

.audit-suggestion {
    background: #f8fbf7;
    border: 1px solid rgba(20, 92, 53, 0.18);
    margin-top: 14px;
    padding: 12px;
}

.audit-suggestion p {
    color: var(--dcts-muted);
    margin: 8px 0 0;
}

.audit-actions {
    align-items: end;
    border-top: 1px solid var(--dcts-line);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(320px, 1fr) auto auto;
    margin-top: 14px;
    padding-top: 14px;
}

.audit-actions > div {
    display: grid;
    gap: 8px;
}

.audit-delete-option {
    margin: 0;
}

.audit-save-bar {
    align-items: center;
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-green);
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr auto;
    padding: 14px;
}

.audit-save-bar h2,
.audit-save-bar p {
    margin: 0;
}

.audit-save-bar p {
    color: var(--dcts-muted);
    margin-top: 6px;
}

.checkbox-group {
    border: 1px solid var(--dcts-line);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px;
}

.checkbox-group legend {
    color: var(--dcts-green-dark);
    font-weight: 700;
    padding: 0 8px;
}

.checkbox-group label {
    align-items: center;
    display: flex;
    gap: 8px;
}

.checkbox-group input {
    accent-color: var(--dcts-green);
    width: auto;
}

.filter-picker {
    background: #fbfcf9;
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-green);
}

.filter-picker summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    list-style: none;
    padding: 14px;
}

.filter-picker summary::-webkit-details-marker {
    display: none;
}

.filter-picker summary::after {
    color: var(--dcts-green);
    content: "▼";
    font-size: 0.8rem;
}

.filter-picker[open] summary::after {
    content: "▲";
}

.filter-picker summary span {
    color: var(--dcts-green-dark);
    font-weight: 700;
}

.filter-picker summary strong {
    color: var(--dcts-muted);
    font-size: 0.92rem;
}

.filter-picker-body {
    border-top: 1px solid var(--dcts-line);
    display: grid;
    gap: 10px;
    padding: 14px;
}

.filter-picker-body .field-help {
    margin: 0;
}

.choice-search {
    padding: 9px 10px;
}

.choice-scroll {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    display: grid;
    gap: 0;
    max-height: 260px;
    overflow-y: auto;
}

.choice-scroll label {
    align-items: flex-start;
    border-bottom: 1px solid #edf0ea;
    display: flex;
    gap: 9px;
    font-weight: 400;
    padding: 9px 10px;
}

.choice-scroll label:last-child {
    border-bottom: 0;
}

.choice-scroll label:hover {
    background: var(--dcts-green-light);
}

.choice-scroll input {
    accent-color: var(--dcts-green);
    flex: 0 0 auto;
    margin-top: 5px;
    width: auto;
}

.code-pill {
    align-items: center;
    background: var(--dcts-green-light);
    border: 1px solid rgba(20, 92, 53, 0.42);
    border-radius: 6px;
    color: var(--dcts-green);
    display: inline-grid;
    gap: 3px;
    justify-items: center;
    font-family: var(--font-heading);
    line-height: 1;
    min-width: 118px;
    padding: 10px 14px 8px;
}

button.code-pill {
    cursor: pointer;
    text-transform: uppercase;
}

.code-pill span {
    font-size: 1.45rem;
}

.code-pill small {
    color: var(--dcts-muted);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
}

button.code-pill:hover,
button.code-pill:focus {
    background: #dcece4;
    border-color: var(--dcts-green);
    color: var(--dcts-green);
}

button.code-pill.is-copied {
    background: var(--dcts-green);
    border-color: var(--dcts-green);
    color: var(--dcts-white);
}

button.code-pill.is-inactive {
    background: #fff0ee;
    border-color: #b42318;
    color: #8d1f17;
}

button.code-pill.is-inactive:hover,
button.code-pill.is-inactive:focus {
    background: #ffe3df;
    border-color: #8d1f17;
    color: #8d1f17;
}

button.code-pill.is-copied small {
    color: rgba(255, 255, 255, 0.82);
}

.code-panel {
    align-items: center;
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-gold);
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 18px;
    padding: 18px;
    text-align: center;
}

.code-panel span {
    color: var(--dcts-muted);
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.code-panel strong {
    color: var(--dcts-green);
    font-family: var(--font-heading);
    font-size: clamp(3.4rem, 11vw, 7rem);
    line-height: 1;
}

.student-code-display {
    display: grid;
    gap: 8px;
    justify-items: center;
    width: 100%;
}

button.large-code-copy {
    background: var(--dcts-green-light);
    border: 1px solid rgba(20, 92, 53, 0.42);
    border-radius: 6px;
    color: var(--dcts-green);
    cursor: pointer;
    display: grid;
    gap: 6px;
    justify-items: center;
    min-width: min(100%, 360px);
    padding: 16px 22px 12px;
    text-transform: none;
}

button.large-code-copy:hover,
button.large-code-copy:focus {
    background: #dcece4;
    border-color: var(--dcts-green);
    color: var(--dcts-green);
}

button.large-code-copy strong {
    color: inherit;
    font-size: clamp(2.8rem, 8vw, 4.6rem);
    line-height: 1;
}

button.large-code-copy small {
    color: var(--dcts-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: none;
}

button.large-code-copy.is-copied small {
    color: var(--dcts-green);
}

button.large-code-copy.is-copied {
    background: var(--dcts-green-light);
    color: var(--dcts-green);
}

.export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 28px;
}

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

.stats div {
    background: var(--dcts-green);
    border-bottom: 5px solid var(--dcts-gold);
    color: var(--dcts-white);
    padding: 20px;
}

.stats strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.25rem;
    line-height: 1;
}

.stats span {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.table-wrap {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    overflow-x: auto;
}

.bulk-form {
    gap: 16px;
}

.filter-toolbar {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-green);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1.3fr) repeat(4, minmax(130px, 1fr)) auto;
    margin-bottom: 16px;
    padding: 14px;
}

.filter-toolbar label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.filter-actions {
    align-items: end;
    display: flex;
    gap: 8px;
}

.result-count {
    color: var(--dcts-muted);
    font-weight: 700;
    margin-bottom: 10px;
}

.pagination {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 18px;
}

.pagination span {
    color: var(--dcts-muted);
    font-weight: 700;
}

.bulk-toolbar {
    align-items: end;
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-gold);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(160px, 0.75fr) minmax(210px, 1fr) minmax(180px, 1fr) auto;
    padding: 14px;
}

.question-set-bulk-toolbar {
    align-items: center;
    grid-template-columns: minmax(160px, 0.7fr) minmax(260px, 1fr) auto;
    margin-bottom: 16px;
}

.question-set-bulk-toolbar button.danger {
    padding: 8px 12px;
}

.bulk-toolbar label {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.bulk-summary {
    align-self: center;
    display: grid;
    gap: 2px;
}

.bulk-summary strong {
    color: var(--dcts-green);
    font-family: var(--font-heading);
    font-size: 0.86rem;
    text-transform: uppercase;
}

.bulk-summary span,
.bulk-warning {
    color: var(--dcts-muted);
    font-weight: 700;
}

.bulk-option,
.bulk-warning {
    display: none;
}

.bulk-option.is-visible,
.bulk-warning.is-visible {
    display: block;
}

.bulk-taxonomy-option {
    min-width: 280px;
}

.bulk-taxonomy-option input,
.bulk-taxonomy-option select {
    margin-top: 6px;
}

.bulk-new-standard-fields {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.bulk-warning {
    align-self: center;
    margin: 0;
}

.question-table-wrap {
    width: 100%;
}

.question-set-table th:nth-child(1),
.question-set-table td:nth-child(1) {
    width: 44px;
}

.question-set-table th:nth-child(2),
.question-set-table td:nth-child(2) {
    width: 27%;
}

.question-set-table th:nth-child(3),
.question-set-table td:nth-child(3) {
    width: 18%;
}

.question-set-table th:nth-child(4),
.question-set-table td:nth-child(4) {
    width: 18%;
}

.question-set-table th:nth-child(5),
.question-set-table td:nth-child(5) {
    width: 27%;
}

.question-set-table th:nth-child(6),
.question-set-table td:nth-child(6) {
    width: 100px;
}

table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}

th,
td {
    border-bottom: 1px solid var(--dcts-line);
    padding: 13px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--dcts-green);
    color: var(--dcts-white);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    text-transform: uppercase;
}

th a {
    color: var(--dcts-white);
    display: inline-block;
    text-decoration: none;
}

th a:hover,
th a:focus {
    color: var(--dcts-gold);
}

.question-table th,
.question-table td {
    font-size: 0.92rem;
}

.question-table th:nth-child(1),
.question-table td:nth-child(1) {
    width: 44px;
}

.question-table th:nth-child(2),
.question-table td:nth-child(2) {
    width: 23%;
}

.question-table th:nth-child(3),
.question-table td:nth-child(3) {
    width: 18%;
}

.question-table th:nth-child(4),
.question-table td:nth-child(4) {
    width: 14%;
}

.question-table th:nth-child(5),
.question-table td:nth-child(5) {
    width: 21%;
}

.question-table th:nth-child(6),
.question-table td:nth-child(6) {
    width: 90px;
}

.question-table th:nth-child(7),
.question-table td:nth-child(7) {
    width: 100px;
}

.question-table th:nth-child(8),
.question-table td:nth-child(8) {
    width: 104px;
}

.question-table .actions-cell {
    display: table-cell;
    text-align: left;
}

.select-col {
    text-align: center;
}

.select-col input {
    accent-color: var(--dcts-green);
    width: auto;
}

tr:nth-child(even) td {
    background: #f9faf7;
}

.question-table .actions-cell a {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-green);
    border-radius: 4px;
    color: var(--dcts-green);
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.62rem;
    line-height: 1;
    margin: 0 4px 5px 0;
    padding: 5px 7px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.question-table .actions-cell a:hover,
.question-table .actions-cell a:focus {
    background: var(--dcts-green-light);
    color: var(--dcts-green);
}

.dashboard-table th:last-child,
.dashboard-table td:last-child {
    width: 240px;
}

.dashboard-table td:last-child {
    vertical-align: middle;
}

.table-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.table-actions a {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-green);
    border-radius: 4px;
    color: var(--dcts-green);
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    padding: 5px 7px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-actions a:hover,
.table-actions a:focus {
    background: var(--dcts-green-light);
    color: var(--dcts-green);
}

.row-primary-link {
    color: var(--dcts-green-dark);
    font-weight: 700;
    text-decoration: none;
}

.row-primary-link:hover,
.row-primary-link:focus {
    color: var(--dcts-green);
    text-decoration: underline;
}

.alert {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 6px solid var(--dcts-gold);
    box-shadow: 0 4px 14px rgba(6, 36, 23, 0.06);
    margin-bottom: 16px;
    padding: 12px 14px;
}

.alert-success {
    background: #fbfefc;
    border-color: var(--dcts-green);
}

.alert-error {
    background: #fffaf0;
    border-color: var(--dcts-gold);
}

.ai-layout {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
    margin-bottom: 28px;
}

.ai-session-form,
.ai-empty-state {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-green);
    border-radius: 4px;
    padding: 20px;
}

.ai-session-centered {
    margin: 0 auto;
    max-width: 820px;
}

.choice-grid {
    border: 1px solid var(--dcts-line);
    border-radius: 4px;
    display: grid;
    gap: 0;
}

.choice-grid .check-row {
    border-bottom: 1px solid var(--dcts-line);
    margin: 0;
    padding: 10px 12px;
}

.choice-grid .check-row:last-child {
    border-bottom: 0;
}

[data-ai-scope-panel],
[data-goal-count] {
    display: none;
}

[data-ai-scope-panel].is-visible,
[data-goal-count].is-visible {
    display: block;
}

.ai-progress {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto 10px;
    max-width: 1480px;
    padding: 8px 10px;
    position: relative;
}

.ai-progress span {
    background: var(--dcts-green-light);
    border: 1px solid rgba(20, 92, 53, 0.25);
    border-radius: 4px;
    padding: 5px 9px;
}

.ai-progress.has-goal-progress::after {
    background: var(--dcts-gold);
    bottom: -1px;
    content: "";
    height: 4px;
    left: -1px;
    position: absolute;
    width: calc(var(--goal-progress) + 2px);
}

.ai-progress.is-unlimited::after {
    background: var(--dcts-line);
    bottom: -1px;
    content: "";
    height: 4px;
    left: -1px;
    position: absolute;
    right: -1px;
}

.ai-review-card {
    gap: 8px;
    margin: 0 auto;
    max-width: 1480px;
    padding: 14px 18px;
    width: 100%;
}

.ai-review-card textarea,
.ai-review-card input,
.ai-review-card select {
    padding-bottom: 6px;
    padding-top: 6px;
}

.ai-review-card label {
    font-size: 0.92rem;
}

.ai-question-block,
.ai-generation-answers {
    display: grid;
    gap: 8px;
}

.ai-primary-review {
    background: #fbfefc;
    border: 1px solid rgba(20, 92, 53, 0.22);
    border-left: 5px solid var(--dcts-green);
    display: grid;
    gap: 10px;
    padding: 12px;
}

.ai-generation-answers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-details-grid {
    margin-top: 2px;
}

.ai-details-grid label,
.ai-details-grid select {
    color: var(--dcts-muted);
}

.ai-action-grid {
    align-items: center;
    border-top: 1px solid var(--dcts-line);
    display: grid;
    column-gap: 34px;
    row-gap: 14px;
    grid-template-columns: max-content max-content max-content;
    justify-content: center;
    padding-top: 10px;
}

.approve-button {
    border-color: var(--dcts-green);
}

.approve-button:hover,
.approve-button:focus {
    background: var(--dcts-green-dark);
    border-color: var(--dcts-green);
}

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

.reject-reason-wrap {
    align-items: center;
    display: flex;
    gap: 6px;
}

.reject-reason-wrap .help-tip {
    flex: 0 0 auto;
    margin-left: 0;
}

.reject-control select,
.reject-control button,
.ai-action-grid > button {
    min-height: 44px;
}

.reject-control select {
    line-height: 1.25;
    margin: 0;
    min-width: 170px;
    padding-right: 36px;
}

.reject-button {
    min-width: 92px;
}

.ai-finish-row {
    display: flex;
    justify-content: center;
    margin: 10px auto 0;
}

.ai-finish-button {
    font-size: 0.95rem;
    min-width: 220px;
    padding: 12px 20px;
}

.ai-session-footer {
    display: flex;
    justify-content: center;
    margin: 10px auto 0;
    max-width: 1480px;
}

.ai-keyboard-hints {
    align-items: center;
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    color: var(--dcts-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 8px 10px;
}

.ai-keyboard-hints span {
    color: var(--dcts-green);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.ai-keyboard-hints kbd {
    background: var(--dcts-green-light);
    border: 1px solid rgba(20, 92, 53, 0.25);
    color: var(--dcts-green);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    padding: 2px 7px;
}

.ai-adjustment-modal {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-green);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    left: 50%;
    max-width: 640px;
    padding: 22px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(640px, calc(100vw - 32px));
    z-index: 40;
}

.ai-adjustment-backdrop {
    background: rgba(0, 0, 0, 0.38);
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 39;
}

.ai-adjustment-header {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.ai-adjustment-header h2 {
    margin: 0;
}

.ai-adjustment-options {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin: 18px 0;
}

.compact-button {
    padding: 8px 12px;
}

.ai-loading-overlay {
    align-items: center;
    background: rgba(245, 242, 235, 0.76);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 60;
}

.ai-loading-card {
    align-items: center;
    background: var(--dcts-white);
    border: 1px solid var(--dcts-green);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
    color: var(--dcts-green);
    display: flex;
    gap: 12px;
    padding: 18px 22px;
}

.ai-spinner {
    animation: ai-spin 0.8s linear infinite;
    border: 3px solid rgba(14, 96, 55, 0.18);
    border-top-color: var(--dcts-green);
    border-radius: 999px;
    height: 24px;
    width: 24px;
}

@keyframes ai-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 760px) {
    .ai-action-grid {
        grid-template-columns: 1fr;
    }

    .ai-action-grid > button,
    .reject-control {
        width: 100%;
    }

    .reject-control {
        align-items: stretch;
        flex-direction: column;
    }

    .reject-reason-wrap {
        width: 100%;
    }

    .reject-control select {
        flex: 1;
        width: 100%;
    }

    .ai-answer-edit-grid,
    .ai-final-details-row,
    .ai-final-question-row {
        grid-template-columns: 1fr;
    }

    .ai-review-tools {
        grid-template-columns: 1fr;
    }

    .ai-select-all-control,
    .ai-final-card-select {
        justify-content: flex-end;
    }

    .ai-feedback-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.ai-standard-table th:nth-child(1),
.ai-standard-table td:nth-child(1) {
    width: 28%;
}

.ai-standard-table th:nth-child(3),
.ai-standard-table td:nth-child(3) {
    width: 110px;
}

.ai-final-review textarea,
.ai-final-review select {
    margin-bottom: 6px;
    padding: 7px 9px;
    width: 100%;
}

.ai-session-feedback-panel {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-green);
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px;
}

.ai-session-feedback-panel h2,
.ai-session-feedback-panel p {
    margin: 0;
}

.ai-feedback-page-panel {
    margin: 0 auto;
    max-width: 1180px;
}

.ai-feedback-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 4px;
}

.ai-finalize-panel {
    align-items: center;
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-gold);
    display: grid;
    gap: 8px;
    justify-items: center;
    margin-bottom: 16px;
    padding: 18px;
    text-align: center;
}

.ai-finalize-main {
    font-size: 1rem;
    min-width: 260px;
    padding: 15px 24px;
}

.ai-finalize-panel span {
    color: var(--dcts-muted);
    font-weight: 700;
}

.ai-review-tools {
    align-items: center;
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.ai-select-all-control {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.ai-select-all-control input {
    margin: 0;
    width: auto;
}

.ai-final-card-list {
    display: grid;
    gap: 14px;
}

.ai-final-question-card {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    display: grid;
    gap: 10px;
    padding: 12px;
}

.ai-final-question-card.is-duplicate {
    background: #fff9ed;
}

.ai-final-card-select {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    min-height: 28px;
}

.ai-final-card-select label {
    align-items: center;
    display: flex;
    gap: 10px;
}

.ai-final-card-select input {
    margin: 0;
    width: auto;
}

.ai-final-card-body {
    display: grid;
    gap: 10px;
}

.ai-final-question-row {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 180px;
}

.ai-final-question-row textarea {
    font-size: 1rem;
    min-height: 78px;
}

.ai-answer-edit-grid,
.ai-final-details-row {
    display: grid;
    gap: 10px;
}

.ai-answer-edit-grid {
    background: #fbfefc;
    border: 1px solid rgba(20, 92, 53, 0.2);
    border-left: 5px solid var(--dcts-green);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 10px;
}

.ai-final-details-row {
    grid-template-columns: minmax(200px, 0.8fr) minmax(260px, 1fr) minmax(320px, 1.2fr);
}

.ai-answer-edit-grid textarea {
    min-height: 68px;
}

.ai-final-details-row textarea {
    min-height: 58px;
}

.ai-explanation-field textarea {
    min-height: 88px;
}

.ai-correct-answer {
    color: var(--dcts-green);
}

.ai-answer-edit-grid label,
.ai-final-details-row label,
.ai-final-question-row label {
    display: block;
    font-size: 0.86rem;
}

.duplicate-note {
    color: #8d1f17;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.question-accordion {
    display: grid;
    font-family: var(--font-body);
    gap: 0;
}

.question-accordion-select {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-left: 5px solid var(--dcts-green);
    margin: 0;
    padding: 12px 14px;
}

.category-accordion,
.standard-accordion {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-line);
    border-radius: 0;
    border-top: 0;
}

.category-accordion > summary,
.standard-accordion > summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 14px;
    list-style: none;
    padding: 14px 16px;
}

.category-accordion > summary {
    grid-template-columns: minmax(0, 1fr) 120px 120px 90px 64px 24px;
}

.standard-accordion > summary {
    grid-template-columns: minmax(0, 1fr) 120px 90px 64px 24px;
}

.accordion-select {
    align-items: center;
    display: flex;
    justify-content: flex-end;
}

.accordion-select input {
    margin: 0;
}

.accordion-generate a {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-green);
    border-radius: 4px;
    color: var(--dcts-green);
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    padding: 5px 7px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.accordion-generate a:hover,
.accordion-generate a:focus {
    background: var(--dcts-green-light);
    color: var(--dcts-green);
}

.category-accordion > summary::-webkit-details-marker,
.standard-accordion > summary::-webkit-details-marker {
    display: none;
}

.category-accordion > summary::after,
.standard-accordion > summary::after {
    color: var(--dcts-green);
    content: "▼";
    font-size: 0.78rem;
    text-align: right;
}

.category-accordion[open] > summary::after,
.standard-accordion[open] > summary::after {
    content: "▲";
}

.category-accordion > summary .accordion-name,
.standard-accordion > summary .accordion-name {
    color: var(--dcts-green-dark);
    font-family: var(--font-body);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.accordion-stat {
    color: var(--dcts-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.standard-accordion-list {
    border-top: 1px solid var(--dcts-line);
    display: grid;
    gap: 0;
    padding: 0 0 0 24px;
}

.standard-accordion {
    background: #fbfcfb;
}

.standard-accordion > summary {
    padding: 12px 14px;
}

.question-list {
    border-top: 1px solid var(--dcts-line);
    display: grid;
    gap: 0;
    padding: 0;
}

.question-list-item {
    align-items: start;
    background: var(--dcts-white);
    border: 0;
    border-top: 1px solid var(--dcts-line);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(260px, 1.2fr) minmax(160px, 0.75fr) 90px 90px 150px 64px;
    padding: 12px;
}

.question-select {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.question-list-main {
    display: grid;
    font-family: var(--font-body);
    gap: 6px;
}

.question-list-main p {
    margin: 0;
}

.question-list-main p:not(.question-explanation),
.question-list-head span {
    display: none;
}

.question-list-head {
    display: grid;
    gap: 4px;
}

.question-list-head strong {
    color: var(--dcts-green-dark);
    font-family: var(--font-body);
}

.question-list-head span,
.question-explanation {
    color: var(--dcts-muted);
}

.question-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.question-list-actions a {
    background: var(--dcts-white);
    border: 1px solid var(--dcts-green);
    border-radius: 4px;
    color: var(--dcts-green);
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    padding: 5px 7px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.question-list-actions a:hover,
.question-list-actions a:focus {
    background: var(--dcts-green-light);
    color: var(--dcts-green);
}

.compact-empty {
    margin: 0;
    padding: 12px 14px;
}

.accordion-table-head {
    background: var(--dcts-green-light);
    border: 1px solid var(--dcts-line);
    color: var(--dcts-green-dark);
    display: grid;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    gap: 14px;
    padding: 10px 16px;
    text-transform: uppercase;
}

.category-head {
    border-bottom: 0;
    grid-template-columns: minmax(0, 1fr) 120px 120px 90px 64px 24px;
}

.standard-head {
    border-left: 0;
    border-right: 0;
    grid-template-columns: minmax(0, 1fr) 120px 90px 64px 24px;
}

.question-head {
    border-left: 0;
    border-right: 0;
    grid-template-columns: minmax(260px, 1.2fr) minmax(160px, 0.75fr) 90px 90px 150px 64px;
}

.detail dl {
    display: grid;
    gap: 10px 18px;
    grid-template-columns: 190px 1fr;
}

.detail dt {
    color: var(--dcts-green);
    font-family: var(--font-heading);
    font-size: 0.8rem;
}

.detail dd {
    margin: 0;
}

.question-review {
    display: grid;
    gap: 18px;
}

.question-main {
    border-bottom: 1px solid var(--dcts-line);
    padding-bottom: 18px;
}

.review-label {
    color: var(--dcts-green);
    display: block;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.review-question {
    color: var(--dcts-text);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    max-width: 900px;
}

.answer-callout {
    background: var(--dcts-green-light);
    border-left: 5px solid var(--dcts-green);
    padding: 16px 18px;
}

.answer-review {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.answer-callout p,
.review-section p {
    font-size: 1.05rem;
    margin: 0;
}

.review-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.review-section {
    border-top: 1px solid var(--dcts-line);
    padding-top: 18px;
}

.wrong-answer-review {
    border-top: 0;
    padding-top: 0;
}

.review-section h2 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.answer-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
}

.answer-list li::marker {
    color: var(--dcts-green);
    font-weight: 700;
}

blockquote {
    border-left: 5px solid var(--dcts-gold);
    margin: 16px 0;
    padding-left: 14px;
}

.site-footer {
    align-items: center;
    background: var(--dcts-black);
    border-top: 5px solid var(--dcts-green);
    color: var(--dcts-white);
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: center;
    padding: 34px 16px;
    text-align: center;
}

.site-footer img {
    height: 72px;
    object-fit: contain;
    width: 72px;
}

.site-footer div {
    align-items: center;
    display: flex;
    flex-direction: column;
}

.site-footer strong {
    display: block;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.site-footer span {
    color: rgba(255, 255, 255, 0.82);
    display: block;
    max-width: 520px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.62);
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    margin-top: 8px;
    text-transform: uppercase;
}

.footer-link:hover,
.footer-link:focus {
    color: var(--dcts-white);
}

@media (max-width: 820px) {
    .site-header,
    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .brand {
        min-width: 0;
    }

    .nav {
        justify-content: flex-start;
    }

    .page-heading .actions,
    .section-heading {
        align-items: stretch;
    }

    .page-heading .actions .button,
    .page-heading .actions button,
    .filter-actions .button,
    .filter-actions button {
        text-align: center;
        width: 100%;
    }

    .hero-panel {
        background:
            linear-gradient(90deg, rgba(6, 36, 23, 0.95), rgba(20, 92, 53, 0.92)),
            url("/assets/uploads/Logo_Dauphin-County-Technical-School.png") right 16px bottom 16px / 160px no-repeat;
    }

    .grid-2,
    .grid-3,
    .stats,
    .account-grid,
    .taxonomy-add-grid,
    .taxonomy-category-actions,
    .taxonomy-standard-row,
    .audit-fix-all,
    .audit-question,
    .audit-actions,
    .audit-save-bar,
    .code-panel,
    .answer-review,
    .review-grid,
    .ai-layout,
    .detail dl,
    .bulk-toolbar,
    .filter-toolbar {
        grid-template-columns: 1fr;
    }

    .ai-answer-edit-grid,
    .ai-final-details-row,
    .ai-final-question-row {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .taxonomy-inline-form,
    .taxonomy-delete-form,
    .taxonomy-row-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pagination {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }

    .wide-page {
        margin-left: 0;
        margin-right: 0;
    }

    .check-row {
        margin-top: 0;
    }

    .site-footer {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 620px) {
    body {
        font-size: 16px;
    }

    .top-strip {
        height: 12px;
    }

    .site-header {
        gap: 14px;
        padding: 14px;
    }

    .brand {
        gap: 10px;
    }

    .brand img {
        height: 52px;
        width: 52px;
    }

    .brand strong,
    .brand em {
        font-size: 1rem;
    }

    .nav {
        flex-wrap: nowrap;
        gap: 2px;
        margin: 0 -4px;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .nav a {
        flex: 0 0 auto;
        font-size: 0.68rem;
        padding: 9px 8px;
    }

    .container {
        padding: 22px 10px 38px;
    }

    .welcome,
    .auth-panel,
    .confirm,
    .detail,
    .note,
    .form-narrow,
    .question-form,
    .docs-panel {
        padding: 18px;
    }

    .page-heading {
        gap: 12px;
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    h1 {
        font-size: clamp(1.75rem, 10vw, 2.25rem);
    }

    h2 {
        font-size: clamp(1.2rem, 7vw, 1.55rem);
    }

    .hero-panel {
        min-height: 0;
        padding: 28px 20px;
    }

    .hero-panel h1 {
        font-size: clamp(2rem, 12vw, 3rem);
    }

    .actions,
    .export-actions {
        flex-direction: column;
    }

    .actions .button,
    .actions button,
    .export-actions .button,
    .export-actions button,
    .question-form > button,
    .form-narrow > button {
        text-align: center;
        width: 100%;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .table-wrap {
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
    }

    table {
        min-width: 720px;
        table-layout: auto;
    }

    .question-table,
    .question-set-table {
        min-width: 980px;
    }

    th,
    td {
        padding: 11px 10px;
    }

    .dashboard-table th:last-child,
    .dashboard-table td:last-child {
        width: auto;
    }

    .table-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-actions a,
    .question-table .actions-cell a,
    .question-list-actions a {
        text-align: center;
        width: 100%;
    }

    .category-accordion > summary,
    .standard-accordion > summary,
    .question-list-item {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .category-accordion > summary,
    .standard-accordion > summary {
        display: grid;
    }

    .category-accordion > summary strong,
    .standard-accordion > summary strong {
        flex: 1 1 auto;
    }

    .accordion-table-head {
        display: none;
    }

    .standard-accordion-list {
        padding-left: 0;
    }

    .code-pill {
        min-width: 104px;
        padding: 9px 10px 7px;
    }

    .code-pill span {
        font-size: 1.2rem;
    }

    button.large-code-copy {
        min-width: 0;
        width: 100%;
    }

    button.large-code-copy strong {
        font-size: clamp(2.4rem, 16vw, 3.4rem);
    }

    .bulk-toolbar,
    .question-set-bulk-toolbar {
        align-items: stretch;
    }

    .bulk-toolbar button,
    .question-set-bulk-toolbar button {
        width: 100%;
    }

    .help-tip::after {
        left: auto;
        right: 0;
        transform: translateY(3px);
    }

    .help-tip:hover::after,
    .help-tip:focus::after {
        transform: translateY(0);
    }
}
