:root {
    --brand: #31376d;
    --brand-dark: #242851;
    --brand-soft: #eef0f8;
    --ink: #171923;
    --muted: #5d6270;
    --line: #d9dce4;
    --surface: #ffffff;
    --background: #f6f7fa;
    --success: #17643a;
    --success-soft: #e8f5ed;
    --warning: #805400;
    --warning-soft: #fff4d6;
    --danger: #a12626;
    --danger-soft: #fbeaea;
    --focus: #111827;
    --control-border: #8a8f9d;
    --control-border-hover: #626a7b;
    --max: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--background);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

button,
input,
select,
textarea {
    min-width: 0;
    max-width: 100%;
    font: inherit;
    border-radius: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--brand);
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--brand-dark);
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3 {
    margin: 0 0 0.65em;
    overflow-wrap: anywhere;
    line-height: 1.16;
    letter-spacing: -0.025em;
}

h1 {
    max-width: 22ch;
    font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1rem;
    overflow-wrap: anywhere;
}

a,
button,
label,
legend,
li,
dt,
dd {
    overflow-wrap: anywhere;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 0.75rem;
    left: 0.75rem;
    transform: translateY(-160%);
    padding: 0.75rem 1rem;
    background: var(--ink);
    color: white;
    font-weight: 700;
}

.skip-link:focus {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 4px solid var(--brand);
    background: var(--surface);
}

.header-inner,
.page-shell,
.footer-inner {
    width: min(calc(100% - 2rem), var(--max));
    margin-inline: auto;
}

.header-inner {
    min-height: 5.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    text-decoration: none;
    line-height: 1;
}

.brand-logo {
    display: block;
    width: min(11rem, 43vw);
    height: auto;
}

.menu-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
}

.has-js .menu-toggle {
    display: block;
}

.site-nav {
    position: static;
    flex-basis: 100%;
    padding: 0.75rem;
    border: 1px solid var(--line);
    background: var(--surface);
}

.has-js .site-nav {
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
}

.site-nav[hidden] {
    display: none;
}

.nav-list {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link,
.nav-button {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.65rem 0.8rem;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.nav-link:hover,
.nav-link[aria-current="page"],
.nav-button:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

.nav-form {
    margin: 0;
}

.page-shell {
    flex: 1 0 auto;
    padding-block: clamp(1.5rem, 4vw, 3rem);
}

.site-footer {
    margin-top: 0;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.footer-inner {
    padding-block: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.eyebrow {
    margin-bottom: 0.75rem;
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 700;
}

.lead {
    max-width: 62ch;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.page-heading {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
}

.page-heading > div:first-child {
    min-width: 0;
    max-width: 52rem;
}

.page-heading h1 {
    margin-bottom: 0.4em;
}

.page-heading > div:first-child > :last-child,
.hero-content > :last-child,
.empty-state > :last-child {
    margin-bottom: 0;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.68rem 1rem;
    border: 2px solid var(--brand);
    background: var(--brand);
    color: white;
    cursor: pointer;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.button:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: white;
}

.button-secondary {
    background: var(--surface);
    color: var(--brand);
}

.button-secondary:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.button-danger {
    border-color: var(--danger);
    background: var(--surface);
    color: var(--danger);
}

.button-danger:hover {
    border-color: var(--danger);
    background: var(--danger);
    color: white;
}

.button-small {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.92rem;
}

.text-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
}

.hero {
    overflow: hidden;
    display: grid;
    background: var(--brand);
    color: white;
}

.hero-content {
    padding: clamp(2rem, 7vw, 5rem);
}

.hero .eyebrow,
.hero .lead {
    color: #e5e7f4;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero .button {
    border-color: white;
    background: white;
    color: var(--brand);
}

.hero .button:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.hero .button-secondary {
    background: transparent;
    color: white;
}

.hero .button-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.project-grid,
.stat-grid,
.split-grid,
.action-card-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
}

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

.project-grid > *,
.stat-grid > *,
.split-grid > *,
.action-card-grid > * {
    min-width: 0;
}

.action-card-grid {
    margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.card {
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--line);
    background: var(--surface);
}

.card > :last-child {
    margin-bottom: 0;
}

.clickable-card,
.clickable-row {
    position: relative;
}

.stretched-link::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    cursor: pointer;
}

.stretched-link:focus-visible {
    outline: none;
}

.clickable-card .stretched-link:focus-visible::after {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.clickable-card:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.role-card .button {
    margin-top: auto;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
    background: var(--brand-soft);
    object-fit: cover;
}

.project-cover {
    width: 100%;
    height: clamp(11rem, 28vw, 20rem);
    margin-bottom: 1.5rem;
    overflow: hidden;
    background: var(--brand-soft);
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-description {
    display: -webkit-box;
    max-height: calc(1.55em * 3);
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.project-card .project-meta {
    margin-top: auto;
}

.project-title a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
}

.clickable-card .project-title a {
    min-height: 0;
}

.project-title a:hover {
    color: var(--brand);
    text-decoration: underline;
}

.project-meta,
.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-card {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
}

.stat-value {
    margin: 0;
    color: var(--brand);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.3;
}

.section {
    margin-top: clamp(1.75rem, 4vw, 3rem);
}

.section-heading {
    margin-bottom: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.section-heading > * {
    min-width: 0;
}

.section-heading h2 {
    margin: 0;
}

.panel {
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
}

.panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    background: #fbfbfd;
}

.panel-body {
    padding: clamp(1rem, 3vw, 1.5rem);
}

.folder-section {
    scroll-margin-top: 1rem;
}

.folder-create-form {
    display: grid;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 0.75rem;
}

.folder-create-form .button {
    width: 100%;
}

.folder-list {
    overflow: visible;
}

.folder-row {
    position: relative;
    display: grid;
    gap: 0.65rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--line);
}

.folder-row:last-child {
    border-bottom: 0;
}

.folder-row.is-current {
    box-shadow: inset 4px 0 0 var(--brand);
    background: var(--brand-soft);
}

.folder-row-primary {
    min-width: 0;
}

.folder-link {
    display: block;
    min-height: 44px;
    padding-block: 0.55rem;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.folder-link::before {
    content: "Ordner";
    display: block;
    margin-bottom: 0.05rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.folder-meta {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.folder-row-actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: start;
}

.folder-row-actions > form,
.folder-row-actions > details {
    margin: 0;
}

.folder-edit-details > summary {
    list-style: none;
}

.folder-edit-details > summary::-webkit-details-marker {
    display: none;
}

.folder-edit-form {
    display: grid;
    grid-template-columns: minmax(8rem, 1fr) auto;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.folder-edit-form input {
    min-height: 44px;
}

.folder-back {
    margin: -0.35rem 0 0.85rem;
}

.empty-state {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px dashed var(--control-border);
    background: var(--surface);
    text-align: center;
}

.empty-state p {
    max-width: 48ch;
    margin-inline: auto;
    color: var(--muted);
}

.badge {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border: 1px solid currentColor;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

.badge-success {
    background: var(--success-soft);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.notice {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-left: 5px solid var(--brand);
    background: var(--brand-soft);
}

.notice-success {
    border-color: var(--success);
    background: var(--success-soft);
    color: #103f27;
}

.notice-warning {
    border-color: var(--warning);
    background: var(--warning-soft);
    color: #5d3d00;
}

.notice-error {
    border-color: var(--danger);
    background: var(--danger-soft);
    color: #6d1818;
}

.notice > :last-child {
    margin-bottom: 0;
}

.error-list {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.error-list a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.form-card {
    max-width: 46rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.project-image-settings {
    display: grid;
    gap: 1.25rem;
    max-width: 58rem;
}

.project-image-preview {
    width: 100%;
    max-height: 22rem;
    background: var(--brand-soft);
    object-fit: cover;
}

.project-image-actions {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.project-image-actions form {
    margin: 0;
}

.filter-bar {
    display: grid;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 0.9rem;
    border: 1px solid var(--line);
    background: var(--surface);
}

.settings-admins + .settings-grid {
    margin-top: clamp(1.75rem, 4vw, 3rem);
}

.admin-create-form {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.admin-create-submit {
    align-self: end;
}

.admin-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.admin-status-form {
    display: grid;
    gap: 0.4rem;
    min-width: min(16rem, 70vw);
    margin-top: 0.5rem;
}

.admin-status-form input[type="password"] {
    min-height: 44px;
}

.admin-status-form label {
    font-weight: 800;
}

.admin-status-details > summary {
    list-style: none;
}

.admin-status-details > summary::-webkit-details-marker {
    display: none;
}

.project-delete-details {
    max-width: 46rem;
}

.project-delete-details > summary {
    list-style: none;
}

.project-delete-details > summary::-webkit-details-marker {
    display: none;
}

.project-delete-content {
    margin-top: 0.75rem;
}

.pagination {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
    color: var(--muted);
    text-align: center;
}

.pagination-previous {
    grid-column: 1;
    justify-self: start;
}

.pagination-status {
    grid-column: 2;
}

.pagination-next {
    grid-column: 3;
    justify-self: end;
}

.field {
    min-width: 0;
}

.field label,
.field legend {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--ink);
    font-weight: 800;
}

.field-hint,
.field-status {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.field-error {
    margin: 0.35rem 0 0;
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 700;
}

.file-list {
    display: grid;
    gap: 0.25rem;
    margin: 0.6rem 0 0;
    padding-left: 1.25rem;
    color: var(--muted);
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 0.8rem;
    border: 2px solid var(--control-border);
    background: var(--surface);
    color: var(--ink);
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--control-border-hover);
}

[aria-invalid="true"] {
    border-color: var(--danger) !important;
}

.password-field {
    position: relative;
}

.password-toggle {
    display: none;
    min-height: 44px;
    margin-top: 0.4rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand);
    cursor: pointer;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.has-js .password-toggle {
    display: inline-flex;
    align-items: center;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.choice-list {
    display: grid;
    gap: 0.5rem;
}

.choice {
    min-height: 48px;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
}

.choice input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.1rem;
    accent-color: var(--brand);
}

.upload-box {
    padding: 1rem;
    border: 2px dashed var(--control-border);
    background: #fbfbfd;
}

.upload-box input[type="file"] {
    width: 100%;
    min-height: 44px;
    cursor: pointer;
}

.has-js .upload-box input[type="file"] {
    color: transparent;
}

.upload-box input[type="file"]::file-selector-button {
    min-height: 44px;
    margin-right: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--brand);
    background: var(--surface);
    color: var(--brand);
    cursor: pointer;
    font-weight: 800;
}

.form-actions {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

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

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

th,
td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f1f2f6;
    color: #383d49;
    font-size: 0.78rem;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.clickable-row:hover {
    background: var(--brand-soft);
}

.clickable-row .stretched-link:focus-visible::after {
    outline: 3px solid var(--focus);
    outline-offset: -3px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.responsive-table a:not(.button) {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.document-name {
    display: block;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.document-meta {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.copy-box {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 2px solid var(--success);
    background: var(--success-soft);
}

.copy-value {
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
}

.legal-copy {
    max-width: 76ch;
}

.legal-copy h2 {
    margin-top: 2.2rem;
}

.legal-copy h3 {
    margin-top: 1.5rem;
}

.legal-copy ul {
    padding-left: 1.4rem;
}

.legal-copy a,
.legal-copy p,
.legal-copy li,
.copy-value,
td {
    overflow-wrap: anywhere;
}

.definition-list {
    display: grid;
    grid-template-columns: minmax(8rem, 12rem) 1fr;
    gap: 0.55rem 1rem;
}

.definition-list dt {
    font-weight: 800;
}

.definition-list dd {
    margin: 0;
}

@media (min-width: 42rem) {
    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-image-settings.has-image {
        grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 0.7fr);
        align-items: start;
    }

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

    .filter-bar {
        grid-template-columns: minmax(14rem, 1fr) repeat(3, auto);
    }

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

    .copy-box {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .folder-create-form {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .folder-create-form .button {
        width: auto;
    }

    .folder-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@media (min-width: 60rem) {
    .has-js .menu-toggle {
        display: none;
    }

    .site-nav,
    .site-nav[hidden],
    .has-js .site-nav,
    .has-js .site-nav[hidden] {
        position: static;
        inset: auto;
        flex-basis: auto;
        display: block;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .nav-list {
        display: flex;
        align-items: center;
        gap: 0.15rem;
    }

    .nav-link,
    .nav-button {
        width: auto;
        padding-inline: 0.7rem;
    }

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

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

    .split-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.75fr);
        align-items: start;
    }

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

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

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

@media (min-width: 75rem) {
    .settings-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 22.5rem) {
    .hero h1 {
        font-size: clamp(1.65rem, 8.25vw, 2rem);
    }

    .legal-copy h1 {
        overflow-wrap: normal;
        word-break: normal;
        font-size: clamp(1.7rem, 8.5vw, 2rem);
    }
}

@media (max-width: 32rem) {
    .pagination {
        grid-template-columns: 1fr 1fr;
    }

    .pagination-status {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .pagination-previous,
    .pagination-next {
        grid-row: 2;
    }

    .pagination-previous {
        grid-column: 1;
    }

    .pagination-next {
        grid-column: 2;
    }
}

@media (max-width: 46rem) {
    .responsive-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .responsive-table thead tr,
    .responsive-table thead th {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        border: 0;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .responsive-table tr {
        padding: 0.6rem 0.75rem;
        border-bottom: 1px solid var(--line);
    }

    .responsive-table tr:last-child {
        border-bottom: 0;
    }

    .responsive-table td {
        padding: 0.35rem 0;
        border: 0;
    }

    .responsive-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.05rem;
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .table-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
        min-width: 0;
    }

    .folder-row-actions,
    .folder-row-actions > form,
    .folder-row-actions > details,
    .folder-row-actions .button {
        width: 100%;
    }

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

    .folder-edit-details[open] {
        grid-column: 1 / -1;
    }

    .folder-edit-form {
        grid-template-columns: 1fr;
    }

    .table-actions,
    .table-actions > *,
    .table-actions form,
    .table-actions .button {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    .responsive-table td > form,
    .responsive-table td > form .button {
        width: 100%;
    }

    .admin-status-details,
    .admin-status-details > summary,
    .admin-status-form,
    .admin-status-form .button {
        width: 100%;
    }

    .admin-status-form {
        min-width: 0;
    }

    .page-heading .action-row,
    .page-heading .action-row .button,
    .form-actions,
    .form-actions .button {
        width: 100%;
    }

    .definition-list {
        grid-template-columns: 1fr;
    }

    .definition-list dd {
        margin-bottom: 0.65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    .site-header,
    .site-footer,
    .action-row,
    .button,
    .skip-link,
    .sensitive-link-notice {
        display: none !important;
    }

    body,
    .card,
    .panel {
        background: white;
        box-shadow: none;
    }

    .page-shell {
        width: 100%;
        padding: 0;
    }
}
