:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --line: #dbe2ea;
    --line-strong: #cbd5e1;
    --text: #111827;
    --muted: #243b64;
    --brand: #1d4ed8;
    --brand-strong: #1e3a8a;
    --brand-soft: #eff6ff;
    --accent: #d97706;
    --info: #2563eb;
    --danger: #b42318;
    --success: #047857;
    --warning: #b45309;
    --shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
    --pico-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    --pico-background-color: var(--bg);
    --pico-color: var(--text);
    --pico-muted-color: var(--muted);
    --pico-primary: var(--brand);
    --pico-primary-background: var(--brand);
    --pico-primary-border: var(--brand);
    --pico-primary-hover-background: var(--brand-strong);
    --pico-primary-hover-border: var(--brand-strong);
    --pico-border-radius: 8px;
    --pico-form-element-spacing-vertical: 0.65rem;
    --pico-form-element-spacing-horizontal: 0.75rem;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    background: var(--bg);
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    word-break: keep-all;
}

body > main {
    padding-block: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
.button:focus-visible,
.main-nav a:focus-visible,
.course-card-link:focus-visible,
.quick-filter-bar a:focus-visible,
.active-filter-chip:focus-visible,
.detail-link-grid a:focus-visible,
.recent-course-card:focus-visible,
.region-grid a:focus-visible,
.quick-link-grid a:focus-visible,
.region-directory a:focus-visible,
.tag-grid a:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 3px;
}

img,
svg {
    max-width: 100%;
}

code {
    display: inline-block;
    max-width: 100%;
    padding: 2px 6px;
    overflow-wrap: anywhere;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    background: #f1f5f9;
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 800;
    text-decoration: none;
}

.brand span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 7px;
    color: #fff;
    background: var(--brand-strong);
}

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

.main-nav a {
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.main-nav a:hover {
    color: var(--brand-strong);
    background: var(--brand-soft);
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: clamp(22px, 4vw, 48px);
    align-items: center;
    min-height: 330px;
    padding: 42px 0 30px;
    border-bottom: 1px solid var(--line);
}

.hero-copy h1,
.page-title h1,
.detail-header h1 {
    margin: 0;
    letter-spacing: 0;
    line-height: 1.12;
}

.hero-copy h1 {
    max-width: 620px;
    font-size: 40px;
    color: var(--text);
    font-weight: 800;
}

.hero-copy p {
    max-width: 560px;
    color: var(--muted);
    font-size: 16px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search-panel label,
.stack-form label {
    display: grid;
    gap: 7px;
    min-width: 0;
    margin: 0;
}

.search-panel label span,
.stack-form label span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    color: var(--text);
    background: #fff;
    font: inherit;
    margin: 0;
}

::placeholder {
    color: #4b628c;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(37, 99, 235, 0.16);
    border-color: var(--info);
}

.check-row {
    grid-template-columns: auto 1fr;
    align-items: center;
    align-content: end;
}

.check-row input {
    width: 18px;
    min-height: 18px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    color: var(--text);
    background: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    margin: 0;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
    border-color: var(--brand);
    color: var(--brand-strong);
    background: var(--brand-soft);
}

.button.primary {
    border-color: var(--brand);
    color: #fff;
    background: var(--brand);
}

.button.primary:hover {
    color: #fff;
    background: var(--brand-strong);
}

.button.full {
    width: 100%;
}

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

.button-row.compact {
    gap: 6px;
}

.button-row.compact .button {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0 42px;
}

.stats-grid div {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.stats-grid strong {
    display: block;
    color: var(--text);
    font-size: 28px;
    line-height: 1.1;
}

.stats-grid span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.section {
    margin: 38px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.section-heading h2,
.detail-main h2,
.detail-side h2,
.admin-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 21px;
    letter-spacing: 0;
}

.section-heading a {
    color: var(--brand);
    font-weight: 800;
}

.region-grid,
.quick-link-grid,
.region-directory,
.tag-grid,
.course-grid {
    display: grid;
    gap: 14px;
}

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

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

.region-grid a,
.quick-link-grid a,
.region-directory a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 66px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.region-grid a:hover,
.quick-link-grid a:hover,
.region-directory a:hover,
.tag-grid a:hover,
.course-card-link:hover {
    border-color: #93b4e8;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.region-grid span,
.quick-link-grid span,
.region-directory span {
    flex: 0 0 auto;
    color: var(--muted);
    font-weight: 700;
}

.region-directory a {
    align-items: flex-start;
    flex-direction: column;
}

.region-directory span {
    flex: 0 1 auto;
    font-size: 14px;
}

.quick-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 18px 0 0;
}

.quick-filter-bar a {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.quick-filter-bar a:hover {
    color: var(--brand-strong);
    border-color: #93b4e8;
    background: var(--brand-soft);
}

.data-freshness {
    display: flex;
    gap: 8px 14px;
    flex-wrap: wrap;
    margin: 14px 0 4px;
    color: var(--muted);
    font-size: 13px;
}

.data-freshness span {
    padding: 4px 0;
}

.active-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0 0;
}

.active-filter-label {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid #bfd3f2;
    border-radius: 999px;
    color: var(--text);
    background: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

a.active-filter-chip:hover {
    border-color: #93b4e8;
    color: var(--brand-strong);
    background: var(--brand-soft);
}

.active-filter-chip.locked {
    border-color: var(--line);
    color: var(--muted);
    background: var(--surface-muted);
}

.active-filter-chip span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.chip-remove {
    color: var(--danger);
    font-weight: 900;
    line-height: 1;
}

.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.list-toolbar-summary {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.list-toolbar-summary strong {
    color: var(--text);
    font-size: 16px;
    line-height: 1.25;
}

.list-toolbar-summary span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.sort-form {
    display: flex;
    align-items: end;
    gap: 8px;
    margin: 0;
}

.sort-form label {
    display: grid;
    gap: 5px;
    min-width: 150px;
    margin: 0;
}

.sort-form label span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.sort-form select {
    min-height: 38px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.sort-submit {
    min-height: 38px;
    padding: 7px 12px;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

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

.tag-grid a {
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

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

.course-card,
.detail {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.course-card-link {
    display: grid;
    gap: 9px;
    min-height: 100%;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.badge {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 5px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 900;
}

.badge-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge.secondary {
    border-color: #a7d9c4;
    color: var(--success);
    background: #ecfdf5;
}

.badge.status-urgent {
    border-color: #f3c175;
    color: var(--warning);
    background: #fff7ed;
}

.badge.status-open {
    border-color: #a7d9c4;
    color: var(--success);
    background: #ecfdf5;
}

.badge.status-soon,
.badge.status-running {
    border-color: #bfdbfe;
    color: var(--brand);
    background: #eff6ff;
}

.badge.status-closed {
    border-color: #dbe2ea;
    color: var(--muted);
    background: #f8fafc;
}

.course-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.28;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

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

.meta-list,
.detail-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.meta-list div,
.detail-list div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
}

.meta-list dt,
.detail-list dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.meta-list dd,
.detail-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.page-title {
    padding: 38px 0 18px;
}

.page-title.compact {
    padding-top: 24px;
}

.page-title h1 {
    font-size: 36px;
    color: var(--text);
    font-weight: 800;
}

.page-title p {
    color: var(--muted);
}

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

.pagination a,
.pagination span {
    min-width: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    text-align: center;
    font-weight: 800;
}

.pagination a:hover {
    border-color: #93b4e8;
    color: var(--brand-strong);
    background: var(--brand-soft);
}

.empty-state {
    margin: 32px 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
}

.empty-state strong {
    display: block;
    color: var(--text);
    font-size: 18px;
}

.empty-state p {
    margin: 8px 0 16px;
    color: var(--muted);
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 28px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--brand);
    font-weight: 800;
}

.detail-header {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.detail-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.detail-hero-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.detail-hero-actions .button {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 14px;
}

.detail-header h1 {
    margin-top: 14px;
    font-size: 36px;
    color: var(--brand-strong);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.detail-header p {
    max-width: 760px;
    color: var(--muted);
    font-size: 17px;
    font-weight: 600;
}

.detail-fact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.detail-fact-grid div {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.detail-fact-grid span,
.detail-fact-grid strong {
    display: block;
}

.detail-fact-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.detail-fact-grid strong {
    margin-top: 5px;
    color: var(--text);
    font-size: 15px;
    overflow-wrap: anywhere;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.detail-main,
.detail-side,
.admin-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.detail-main {
    display: grid;
    gap: 16px;
}

.summary-box {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 4px solid #93b4e8;
    border-radius: 8px;
    background: var(--surface-muted);
}

.summary-box h2,
.summary-box p {
    margin: 0;
}

.summary-box h2 {
    font-size: 18px;
}

.summary-box p {
    color: var(--muted);
}

.detail-link-panel {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}

.detail-link-panel h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
}

.detail-link-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-link-grid a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid #bfd3f2;
    border-radius: 999px;
    color: var(--text);
    background: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.detail-link-grid a:hover {
    border-color: #93b4e8;
    color: var(--brand-strong);
    background: var(--brand-soft);
}

.recent-course-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.recent-course-card {
    display: grid;
    gap: 6px;
    min-height: 92px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: var(--surface);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.recent-course-card:hover {
    border-color: #93b4e8;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.recent-course-card strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.recent-course-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.recent-clear-button {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-list details {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.faq-list summary {
    cursor: pointer;
    font-weight: 900;
}

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

.detail-side {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 18px;
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 70px auto 0;
    padding: 26px 0 42px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.site-footer a {
    color: var(--brand);
    font-weight: 800;
    text-decoration: none;
}

.footer-links {
    display: flex;
    gap: 8px 14px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.mobile-cta {
    display: none;
}

.admin-body main,
.admin-main {
    width: min(1180px, calc(100% - 32px));
}

.admin-main {
    margin: 0 auto;
    padding: 24px 0 60px;
}

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

.admin-card.narrow {
    max-width: 520px;
    margin: 44px auto;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

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

.stack-form.wide {
    max-width: 780px;
}

.landing-path-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.dashboard-filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 260px) auto auto auto;
    gap: 12px;
    align-items: end;
}

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

.check-item {
    display: flex;
    min-height: 138px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.check-item h3 {
    margin: 8px 0 4px;
    font-size: 17px;
}

.check-item p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

.score-meter {
    width: 96px;
    height: 8px;
    margin-bottom: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6eaef;
}

.score-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
}

.status-pill {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    margin: 2px 2px 2px 0;
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.status-pill.good {
    border-color: #a7d9c4;
    color: var(--success);
    background: #ecfdf5;
}

.status-pill.warn {
    border-color: #f3c175;
    color: var(--warning);
    background: #fff7ed;
}

.status-pill.bad {
    border-color: #f2b8b5;
    color: var(--danger);
    background: #fff1f0;
}

.flash {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #a7d9c4;
    border-radius: 8px;
    color: var(--success);
    background: #ecfdf5;
    font-weight: 700;
}

.flash.error {
    border-color: #f2b8b5;
    color: var(--danger);
    background: #fff1f0;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    background: var(--surface);
}

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

th {
    color: var(--muted);
    background: var(--surface-muted);
    font-size: 13px;
}

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

    .hero,
    .detail-layout,
    .admin-grid,
    .check-grid,
    .split-section {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 0;
    }

    .hero-copy h1,
    .page-title h1,
    .detail-header h1 {
        font-size: 36px;
    }

    .detail-side {
        position: static;
    }

    .stats-grid,
    .detail-fact-grid,
    .recent-course-grid,
    .region-grid,
    .quick-link-grid,
    .region-directory,
    .tag-grid,
    .course-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    main,
    .site-footer,
    .admin-main {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        padding-top: 34px;
    }

    .hero-copy h1 {
        font-size: 31px;
    }

    .page-title h1,
    .detail-header h1 {
        font-size: 30px;
    }

    .search-panel,
    .landing-path-form,
    .dashboard-filter-form,
    .submit-url-grid,
    .stats-grid,
    .detail-fact-grid,
    .recent-course-grid,
    .region-grid,
    .quick-link-grid,
    .region-directory,
    .tag-grid,
    .course-grid {
        grid-template-columns: 1fr;
    }

    .search-panel {
        padding: 14px;
    }

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

    .detail-header-top {
        flex-direction: column;
    }

    .list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .sort-form {
        width: 100%;
    }

    .sort-form label {
        flex: 1 1 auto;
        min-width: 0;
    }

    .detail-hero-actions {
        width: 100%;
        justify-content: stretch;
    }

    .detail-hero-actions .button {
        flex: 1 1 auto;
    }

    .meta-list div,
    .detail-list div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav a {
        flex: 0 0 auto;
        padding-left: 8px;
        padding-right: 8px;
    }

    .check-item {
        flex-direction: column;
        min-height: 0;
    }

    .check-item .button {
        width: 100%;
    }

    .mobile-cta {
        position: sticky;
        bottom: 0;
        z-index: 30;
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 8px;
        margin: 24px -12px 0;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
    }

    .mobile-cta .button:only-child {
        grid-column: 1 / -1;
    }
}
