:root {
    --ink: #142026;
    --muted: #60707a;
    --line: #dfe7e8;
    --paper: #f7faf9;
    --white: #ffffff;
    --teal: #087f8c;
    --teal-dark: #07535d;
    --coral: #d86b4a;
    --gold: #c99a35;
    --green: #2c7a61;
    --shadow: 0 20px 60px rgba(11, 37, 45, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

body.theme-dark {
    --ink: #edf5f4;
    --muted: #a8b8bd;
    --line: #294349;
    --paper: #0f181c;
    --white: #16242a;
    --teal: #13a1ad;
    --teal-dark: #79d4db;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.site-header,
.admin-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 54px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

body.theme-dark .site-header,
body.theme-dark .admin-header {
    background: rgba(18, 31, 36, 0.94);
}

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

.brand-logo {
    width: 78px;
    height: 52px;
    flex: 0 0 78px;
    object-fit: contain;
}

.brand strong {
    display: block;
    font-size: 20px;
    line-height: 1.15;
}

.main-nav,
.admin-header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.edition-switcher {
    min-width: 220px;
}

.edition-switcher label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.edition-switcher select {
    min-height: 38px;
}

.main-nav a,
.admin-header nav a {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.main-nav a.active,
.main-nav a:hover,
.admin-header nav a.active,
.admin-header nav a:hover {
    color: var(--ink);
    background: #edf5f3;
}

body.theme-dark .main-nav a.active,
body.theme-dark .main-nav a:hover,
body.theme-dark .admin-header nav a.active,
body.theme-dark .admin-header nav a:hover,
body.theme-dark .button.archive-button,
body.theme-dark .date-radio span,
body.theme-dark .table-button.edit {
    background: #20343b;
}

.main-nav .nav-admin {
    color: var(--teal-dark);
}

.hero {
    position: relative;
    min-height: min(760px, calc(100vh - 72px));
    display: grid;
    align-items: end;
    overflow: hidden;
    background: #101a1e;
}

.hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(9, 24, 30, 0.84), rgba(9, 24, 30, 0.42) 50%, rgba(9, 24, 30, 0.12)),
        linear-gradient(0deg, rgba(9, 24, 30, 0.78), transparent 45%);
}

.hero-overlay {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    padding: clamp(54px, 8vw, 90px) clamp(20px, 5vw, 72px);
    color: white;
}

.hero-logo {
    width: min(520px, 78vw);
    max-height: 260px;
    object-fit: contain;
    margin: 0 0 28px;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.36));
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--coral);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    max-width: 860px;
    font-size: clamp(42px, 8vw, 88px);
    line-height: 0.98;
    letter-spacing: 0;
}

.hero p:not(.eyebrow) {
    max-width: 740px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.icon-button {
    gap: 9px;
}

.icon-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button.primary {
    color: white;
    background: var(--teal);
}

.button.secondary {
    color: white;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
}

.button.archive-button {
    color: var(--teal-dark);
    background: #edf5f3;
    border-color: var(--line);
}

.stats-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
}

.stats-band div {
    min-height: 132px;
    padding: 26px clamp(18px, 3vw, 42px);
    background: white;
}

body.theme-dark .stats-band div,
body.theme-dark .focus-grid article,
body.theme-dark .person-card,
body.theme-dark .gallery-card,
body.theme-dark .edition-grid article,
body.theme-dark .timeline article,
body.theme-dark .live-case-list article,
body.theme-dark .admin-card,
body.theme-dark .login-panel,
body.theme-dark .current-image {
    background: var(--white);
}

.stats-band strong {
    display: block;
    color: var(--teal-dark);
    font-size: 32px;
    line-height: 1;
}

.stats-band span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.section {
    padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 72px);
}

.live-cases-section {
    padding-top: clamp(30px, 4vw, 48px);
    padding-bottom: clamp(30px, 4vw, 48px);
}

.live-cases-section + .live-cases-section {
    padding-top: 8px;
}

.section.split {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(300px, 1.4fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

.section.dark {
    color: white;
    background: #12262b;
}

.section-heading {
    max-width: 780px;
    margin-bottom: 28px;
}

.section h2,
.page-hero h1,
.admin-title h1 {
    margin: 0;
}

.section h2 {
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.05;
}

.focus-grid,
.person-grid,
.gallery-grid,
.center-list,
.edition-grid,
.admin-stats {
    display: grid;
    gap: 18px;
}

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

.focus-grid article,
.center-list article,
.edition-grid article,
.admin-card,
.admin-stats article {
    padding: 24px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-card + .admin-card {
    margin-top: 18px;
}

.focus-grid h3,
.center-list h3,
.center-list h2,
.person-card h3,
.gallery-card h3 {
    margin: 0 0 10px;
}

.focus-grid p,
.center-list p,
.person-card p,
.gallery-card p {
    margin: 0;
    color: var(--muted);
}

.section.dark .center-list article {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.section.dark .center-list p,
.section.dark .center-list span {
    color: rgba(255, 255, 255, 0.74);
}

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

.center-list.light {
    grid-template-columns: repeat(2, 1fr);
}

.live-center-list article,
.live-center-list .live-center-tile {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 0;
    padding: 0;
    color: inherit;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.live-center-list .live-center-tile:hover {
    box-shadow: 0 14px 34px rgba(17, 29, 33, 0.14);
    transform: translateY(-1px);
}

.live-center-list img {
    width: 240px;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    background: #dce8e9;
}

.live-center-list article > div,
.live-center-list .live-center-tile > div {
    padding: 18px;
}

.live-center-list h2 {
    font-size: 20px;
    line-height: 1.18;
}

.center-list span,
.edition-grid span,
.person-card span,
.gallery-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--coral);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

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

.edition-grid h2 {
    margin: 0 0 10px;
}

.edition-grid p {
    margin: 0 0 10px;
    color: var(--muted);
}

.session-type {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--coral);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.program-list {
    margin-bottom: 40px;
}

.program-session-group {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 26px;
    align-items: stretch;
}

.program-session-group > time {
    padding-top: 18px;
    color: var(--teal-dark);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.35;
    white-space: nowrap;
}

.program-session-items {
    display: grid;
    gap: 0;
}

.program-session-name {
    margin: 0;
    padding: 14px 22px;
    color: white;
    background: var(--teal-dark);
    border-radius: 8px 8px 0 0;
    font-size: 18px;
}

.program-list .program-item {
    display: block;
    padding: 18px 22px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 0;
}

.program-list .program-item + .program-item {
    border-top: 0;
}

.program-session-items .program-item:first-child {
    border-radius: 8px 8px 0 0;
}

.program-session-name + .program-item,
.program-session-items .program-session-name:first-child + .program-item {
    border-top: 0;
    border-radius: 0;
}

.program-session-items .program-item:last-child {
    border-radius: 0 0 8px 8px;
}

.program-session-items .program-item:only-child {
    border-radius: 8px;
}

.program-item h2 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.35;
}

.program-item .program-speaker {
    margin: 0 0 8px;
    color: var(--teal-dark);
    font-size: 20px;
    font-weight: 400;
}

.program-speaker strong {
    font-weight: 800;
}

.program-speaker span::before {
    content: " · ";
}

.debate-line {
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.debate-line:first-of-type {
    border-top: 0;
}

.program-day-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.program-day-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--teal-dark);
    background: #edf5f3;
    font-weight: 900;
    text-decoration: none;
}

.program-day-switch a.active,
.program-day-switch a:hover {
    color: white;
    background: var(--teal);
    border-color: var(--teal);
}

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

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

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

.section:not(.split) .director-grid {
    grid-template-columns: repeat(2, minmax(260px, 35%));
    justify-content: start;
}

.person-card,
.gallery-card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(10, 35, 42, 0.06);
}

.person-card {
    display: flex;
    flex-direction: column;
    height: 520px;
}

.person-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 0.62;
    object-fit: cover;
    background: #e5efef;
    flex: 0 0 auto;
}

.person-card div,
.gallery-card div {
    padding: 20px;
}

.person-card div {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    padding: 14px;
}

.person-card h3 {
    font-size: 18px;
    line-height: 1.18;
}

.person-card .meta {
    margin-bottom: 8px;
    color: var(--teal-dark);
    font-weight: 700;
}

.person-card .affiliation {
    margin-bottom: 10px;
}

.person-card .bio {
    flex: 0 0 186px;
    min-height: 0;
    height: 186px;
    margin-bottom: 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    overflow-y: auto;
}

.operator-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, calc((100% - 54px) / 3.6)));
}

.operator-grid .person-card {
    height: 500px;
}

.operator-grid .person-card .bio {
    flex-basis: 176px;
    height: 176px;
    padding: 10px 0 0;
}

.director-grid .person-card {
    height: auto;
}

.director-grid .person-card img {
    height: auto;
    aspect-ratio: 4 / 3;
    flex-basis: auto;
}

.director-grid .person-card div {
    display: block;
    padding: 20px;
}

.director-grid .person-card h3 {
    font-size: inherit;
    line-height: inherit;
}

.director-grid .person-card .affiliation {
    margin-bottom: 14px;
}

.director-grid .person-card .bio {
    max-height: 180px;
    height: auto;
    overflow-y: auto;
}

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

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

.partner-grid {
    --partner-tile-height: 180px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.partner-tile {
    display: grid;
    grid-template-columns: calc(var(--partner-tile-height) * 1.6) minmax(0, 1fr);
    align-items: center;
    height: var(--partner-tile-height);
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.partner-tile:hover {
    box-shadow: 0 14px 34px rgba(17, 29, 33, 0.14);
    transform: translateY(-1px);
}

.partner-grid img {
    width: 100%;
    height: var(--partner-tile-height);
    object-fit: contain;
    object-position: center;
    background: #f7faf9;
}

.partner-tile:not(.sponsor-tile) img {
    padding-right: 18px;
    padding-left: 18px;
}

.partner-tile div {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 22px;
}

.partner-grid h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.partner-grid p {
    flex: 1;
    min-height: 0;
    margin: 0;
    color: var(--muted);
    overflow-y: auto;
}

.partner-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--coral);
    font-weight: 800;
}

.partner-grid .empty-partners {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
}

.sponsor-tile div {
    justify-content: center;
}

.gallery-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #dce8e9;
}

.page-hero {
    --page-hero-image: url("../images/a3c-hero.png");
    padding: clamp(70px, 10vw, 128px) clamp(20px, 5vw, 72px);
    color: white;
    background:
        linear-gradient(90deg, rgba(13, 51, 58, 0.47), rgba(13, 51, 58, 0.39)),
        var(--page-hero-image) center / cover;
}

.timeline {
    display: grid;
    gap: 20px;
}

.live-case-list {
    display: grid;
    gap: 12px;
}

.live-case-list article {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 20px;
    align-items: start;
    padding: 20px 22px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.live-case-list strong {
    color: var(--teal-dark);
    font-size: 18px;
}

.live-case-list h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.live-case-list p {
    margin: 4px 0;
    color: var(--muted);
}

.live-case-list p span {
    color: var(--ink);
    font-weight: 800;
}

.timeline article {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    padding: 26px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.timeline time {
    color: var(--teal-dark);
    font-weight: 900;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 30px clamp(20px, 5vw, 72px);
    color: rgba(255, 255, 255, 0.78);
    background: #111d21;
}

.site-footer div {
    display: grid;
    gap: 6px;
}

.footer-main {
    max-width: 520px;
}

.footer-meta {
    max-width: 760px;
    text-align: right;
}

.site-footer small {
    color: rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.admin-body {
    background: #edf3f2;
}

.admin-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 80px;
}

.admin-title {
    margin-bottom: 18px;
}

.admin-title h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.admin-title p,
.login-panel p {
    color: var(--muted);
}

.admin-stats {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 18px;
}

.admin-stats strong {
    display: block;
    color: var(--teal-dark);
    font-size: 34px;
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.inline-admin-form {
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
    align-items: end;
}

.theme-form {
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: end;
}

.user-form {
    align-items: end;
}

.form-row {
    display: grid;
    gap: 16px;
    align-items: end;
}

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

.form-row.two-thirds {
    grid-template-columns: minmax(140px, 220px) minmax(260px, 1fr);
}

.form-row.three {
    grid-template-columns: minmax(180px, 1fr) minmax(140px, 180px) minmax(140px, 180px);
}

.form-row.three.partner-entry-row {
    grid-template-columns: minmax(410px, 1fr) minmax(230px, auto) minmax(430px, 1fr);
}

.gallery-entry-row {
    grid-template-columns: minmax(280px, 1fr) minmax(180px, 220px) minmax(92px, 120px);
}

.program-row-main {
    grid-template-columns: 86px minmax(280px, 1fr) minmax(140px, 180px) minmax(140px, 180px);
}

.program-session-number input {
    width: 5.2ch;
    min-width: 5.2ch;
    text-align: center;
}

.admin-form label,
.login-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 800;
}

.admin-form small {
    color: var(--muted);
    font-weight: 600;
}

.admin-form .wide {
    grid-column: 1 / -1;
}

.current-image {
    display: grid;
    gap: 8px;
    align-items: start;
    width: 142px;
    padding: 10px;
    background: #f3f8f7;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.current-image span {
    color: var(--teal-dark);
    font-weight: 900;
}

.current-image img {
    width: 120px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #e5efef;
}

.current-image.empty img {
    opacity: 0.72;
}

.photo-upload-row {
    display: grid;
    grid-template-columns: 142px minmax(220px, 1fr);
    gap: 18px;
    align-items: end;
}

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

.settings-card-title {
    margin: 0 0 18px;
    font-size: 22px;
    line-height: 1.2;
}

.media-upload-field {
    display: grid;
    grid-template-columns: 180px minmax(240px, 1fr);
    gap: 18px;
    align-items: end;
}

.media-preview {
    width: 180px;
}

.media-preview img {
    width: 158px;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

.date-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.date-button-group legend {
    width: 100%;
    margin-bottom: 2px;
    color: var(--muted);
    font-weight: 800;
}

.role-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.role-checkbox-group legend {
    width: 100%;
    margin-bottom: 2px;
    color: var(--muted);
    font-weight: 800;
}

.role-online-switch {
    display: inline-grid;
    grid-template-columns: auto 54px;
    gap: 10px;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
}

.role-online-switch span {
    color: var(--teal-dark);
    font-weight: 900;
}

.form-actions.centered {
    display: flex;
    justify-content: center;
}

.segmented-field {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: end;
    margin: 0;
    padding: 0;
    border: 0;
}

.segmented-field legend {
    width: 100%;
    margin-bottom: -1px;
    color: var(--muted);
    font-weight: 800;
}

.partner-entry-row .segmented-field {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 0;
    align-items: end;
}

.partner-entry-row .segmented-field legend {
    grid-column: 1 / -1;
}

.partner-entry-row .segmented-field .role-checkbox + .role-checkbox {
    margin-left: -1px;
}

.partner-entry-row .segmented-field .role-checkbox span {
    border-radius: 0;
}

.partner-entry-row .segmented-field .role-checkbox:first-of-type span {
    border-radius: 999px 0 0 999px;
}

.partner-entry-row .segmented-field .role-checkbox:last-of-type span {
    border-radius: 0 999px 999px 0;
}

.date-radio input,
.role-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.date-radio span,
.role-checkbox span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--teal-dark);
    background: #edf5f3;
    font-weight: 900;
    cursor: pointer;
}

.date-radio input:checked + span,
.role-checkbox input:checked + span {
    color: white;
    background: var(--teal);
    border-color: var(--teal);
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cfdadb;
    border-radius: 8px;
    color: var(--ink);
    background: white;
    font: inherit;
}

textarea {
    font-weight: 400;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    border-color: #3a5660;
    color: var(--ink);
    background-color: #0f1d22;
}

.admin-form .button {
    min-height: 44px;
    height: 44px;
    align-self: end;
}

select {
    appearance: none;
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--teal-dark) 50%),
        linear-gradient(135deg, var(--teal-dark) 50%, transparent 50%),
        linear-gradient(to right, #edf5f3, #edf5f3);
    background-position:
        calc(100% - 20px) 19px,
        calc(100% - 14px) 19px,
        100% 0;
    background-size:
        6px 6px,
        6px 6px,
        42px 100%;
    background-repeat: no-repeat;
}

body.theme-dark select {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--teal-dark) 50%),
        linear-gradient(135deg, var(--teal-dark) 50%, transparent 50%),
        linear-gradient(to right, #20343b, #20343b);
}

.admin-form select {
    border-color: var(--teal);
    box-shadow: 0 2px 0 rgba(8, 127, 140, 0.08);
}

.switch-field {
    display: grid;
    grid-template-columns: 1fr 54px;
    gap: 12px;
    align-items: center;
    min-height: 44px;
}

.menu-visibility-form .switch-field {
    grid-template-columns: 54px 1fr;
    justify-content: start;
}

.menu-visibility-form .switch-field i {
    grid-column: 1;
    grid-row: 1;
}

.menu-visibility-form .switch-field span {
    grid-column: 2;
    grid-row: 1;
}

.switch-field input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-field i {
    position: relative;
    display: block;
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: #cfdadb;
    transition: background 160ms ease;
}

body.theme-dark .switch-field i {
    background: #49626b;
}

.switch-field i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 6px rgba(20, 32, 38, 0.22);
    transition: transform 160ms ease;
}

.switch-field input:checked + i {
    background: var(--teal);
}

.switch-field input:checked + i::after {
    transform: translateX(24px);
}

textarea {
    resize: vertical;
}

.table-card {
    margin-top: 18px;
    overflow-x: auto;
}

.table-title {
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.2;
}

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

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

th {
    color: var(--teal-dark);
    font-size: 12px;
    text-transform: uppercase;
}

th button[data-sort-column] {
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
}

th button[data-sort-column]::after {
    content: "↕";
    margin-left: 6px;
    color: var(--muted);
    font-size: 11px;
}

th button[data-sort-column][data-direction="asc"]::after {
    content: "↑";
}

th button[data-sort-column][data-direction="desc"]::after {
    content: "↓";
}

.admin-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #e5efef;
}

.actions-cell {
    min-width: 178px;
    white-space: nowrap;
}

.drag-column,
.drag-cell {
    width: 72px;
}

.drag-handle {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--teal-dark);
    background: #edf5f3;
    font-weight: 900;
    cursor: grab;
}

.draggable-program-table tr.dragging {
    opacity: 0.55;
}

.action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.action-buttons form {
    display: inline-flex;
    margin: 0;
}

.table-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.table-button.edit {
    color: var(--teal-dark);
    background: #edf5f3;
}

.table-button.delete {
    color: #9b3425;
    background: #fff1ec;
    border-color: #f2c9bd;
}

body.theme-dark .table-button.delete,
body.theme-dark .alert {
    color: #ffd8cf;
    background: #4b201b;
    border-color: #7a382f;
}

.login-panel {
    width: min(440px, calc(100% - 32px));
    margin: 12vh auto;
    padding: 28px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-panel form {
    display: grid;
    gap: 16px;
}

.alert {
    margin: 14px 0;
    padding: 12px;
    color: #812a1f;
    background: #ffe9e1;
    border: 1px solid #f6c6b7;
    border-radius: 8px;
}

@media (max-width: 940px) {
    .site-header,
    .admin-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-meta {
        text-align: left;
    }

    .site-footer small {
        white-space: normal;
    }

    .main-nav,
    .admin-header nav {
        justify-content: flex-start;
    }

    .stats-band,
    .focus-grid,
    .center-list,
    .center-list.light,
    .person-grid,
    .person-grid.compact,
    .section:not(.split) .director-grid,
    .gallery-grid,
    .gallery-grid.large,
    .partner-grid,
    .edition-grid,
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .section.split,
    .timeline article,
    .program-session-group,
    .live-case-list article {
        grid-template-columns: 1fr;
    }

    .hero-logo {
        width: min(420px, 80vw);
    }
}

@media (max-width: 640px) {
    .brand {
        min-width: 0;
    }

    .brand-logo {
        width: 64px;
        height: 44px;
        flex-basis: 64px;
    }

    .hero {
        min-height: 680px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 42px;
    }

    .stats-band,
    .focus-grid,
    .center-list,
    .center-list.light,
    .person-grid,
    .person-grid.compact,
    .gallery-grid,
    .gallery-grid.large,
    .edition-grid,
    .admin-stats,
    .admin-form {
        grid-template-columns: 1fr;
    }

    .inline-admin-form,
    .form-row.two,
    .form-row.two-thirds,
    .form-row.three,
    .gallery-entry-row,
    .theme-form,
    .media-upload-field {
        grid-template-columns: 1fr;
    }

    .live-center-list article,
    .live-center-list .live-center-tile {
        grid-template-columns: 1fr;
    }

    .partner-tile {
        grid-template-columns: 1fr;
        height: auto;
    }

    .partner-grid img {
        height: auto;
        aspect-ratio: 1.6 / 1;
    }

    .live-center-list img {
        width: 100%;
        height: 180px;
        min-height: 0;
    }

    .main-nav a,
    .admin-header nav a {
        padding: 9px 10px;
        font-size: 13px;
    }

    .current-image {
        grid-template-columns: 1fr;
    }

    .photo-upload-row {
        grid-template-columns: 1fr;
    }
}
