/*
Theme Name: Spendabes
Description: Tema Spendabes dengan galeri sekolah, dokumentasi kegiatan, dan layanan akademik.
Version: 1.2.1
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: spendabes
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: education, custom-logo, custom-menu, featured-images, responsive-layout
*/

:root {
    --ink: #2f211e;
    --muted: #63504a;
    --brick: #87372c;
    --brick-dark: #6d2a22;
    --line: #e8d9cc;
    --paper: #fdfaf5;
    --wash: #f7eee3;
    --round: 22px;
    --shell: 1232px;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 280px; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1rem/1.65 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
img { max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
a { color: var(--brick); text-underline-offset: .21em; }
a:hover { color: var(--brick-dark); }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #a44732; outline-offset: 4px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 105px; }
.site-shell { width: min(var(--shell), calc(100% - 3.5rem)); margin-inline: auto; }
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip-link:focus {
    z-index: 20;
    top: .5rem;
    left: .5rem;
    width: auto;
    height: auto;
    padding: .65rem 1rem;
    clip-path: none;
    border-radius: 8px;
    background: white;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid var(--line);
    background: #fffdf8;
}
.admin-bar .site-header { top: 32px; }
.header-inner {
    min-height: 81px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
}
.school-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--ink);
    text-decoration: none;
    flex-shrink: 0;
}
.school-brand strong { display: block; font-size: 1.01rem; letter-spacing: -.025em; line-height: 1.3; }
.school-brand small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.35; }
.school-logo { display: block; width: 3.15rem; height: 3.15rem; object-fit: contain; }
.site-navigation, .site-navigation .menu { display: flex; align-items: center; gap: .24rem; }
.site-navigation { gap: 1.1rem; }
.site-navigation ul { list-style: none; margin: 0; padding: 0; }
.site-navigation li { position: relative; }
.site-navigation .menu a {
    display: block;
    padding: .62rem .57rem;
    border-radius: 9px;
    color: var(--ink);
    font-size: .91rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}
.site-navigation .menu a:hover,
.site-navigation .menu [aria-current="page"] { background: #f7e8dc; color: var(--brick); }
.site-navigation .sub-menu {
    display: none;
    position: absolute;
    inset: 100% auto auto 0;
    min-width: 12.5rem;
    padding: .45rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    box-shadow: 0 8px 20px #2f211e17;
}
.site-navigation .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: .35rem;
    height: .35rem;
    margin-left: .42rem;
    vertical-align: .19em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}
.site-navigation li:hover > .sub-menu,
.site-navigation li:focus-within > .sub-menu { display: block; }
.menu-toggle {
    display: none;
    align-items: center;
    gap: .5rem;
    padding: .6rem .8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
}
.menu-toggle-icon { width: 1rem; height: 12px; border-block: 2px solid currentColor; position: relative; }
.menu-toggle-icon::after { content: ''; position: absolute; inset: 3px 0 auto; border-top: 2px solid currentColor; }

.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 50px;
    padding: .65rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 11px;
    background: var(--brick);
    color: white;
    font-size: .96rem;
    font-weight: 710;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease;
}
.button:hover { background: var(--brick-dark); color: white; }
.button-outline { background: white; color: var(--ink); border-color: #d8c2af; }
.button-outline:hover { background: #f9eee0; border-color: #bf9b83; color: var(--brick); }

.glyph { display: inline-block; position: relative; width: 1.25rem; height: 1.25rem; flex: 0 0 auto; color: inherit; }
.glyph-book::before, .glyph-book::after {
    content: '';
    position: absolute;
    top: .15rem;
    width: .62rem;
    height: .95rem;
    border: 1.7px solid currentColor;
}
.glyph-book::before { left: 0; border-radius: .2rem 0 .08rem .2rem; transform: skewY(6deg); }
.glyph-book::after { right: 0; border-radius: 0 .2rem .2rem .08rem; transform: skewY(-6deg); }
.glyph-notice { border: 1.7px solid currentColor; border-radius: .18rem; height: 1.1rem; }
.glyph-notice::before { content: ''; position: absolute; left: .14rem; top: .2rem; right: .14rem; height: .43rem; border-block: 1.6px solid currentColor; }
.glyph-person::before { content: ''; position: absolute; inset: .06rem auto auto .41rem; width: .43rem; height: .43rem; border: 1.6px solid currentColor; border-radius: 50%; }
.glyph-person::after { content: ''; position: absolute; inset: .62rem auto auto .17rem; width: .91rem; height: .5rem; border: 1.6px solid currentColor; border-radius: .5rem .5rem .15rem .15rem; }
.glyph-pin::before { content: ''; position: absolute; left: .2rem; top: .05rem; width: .83rem; height: .9rem; border: 1.7px solid currentColor; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.glyph-pin::after { content: ''; position: absolute; left: .5rem; top: .34rem; width: .25rem; height: .25rem; border-radius: 50%; background: currentColor; }

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #321916;
    color: #fffaf2;
}
.hero-grid {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 550px;
    padding-block: 4.2rem 5.35rem;
}
.hero-copy { width: min(51%, 570px); }
.eyebrow {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .95rem;
    color: #f1c38b;
    font-size: .87rem;
    font-weight: 750;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.eyebrow span { width: 2rem; height: 2px; background: #e4aa71; }
.hero h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(3.1rem, 6.2vw, 5.65rem);
    font-weight: 700;
    letter-spacing: -.057em;
    line-height: .98;
}
.hero h1 span { display: block; margin-top: .055em; color: #f4c28c; }
.hero-lead {
    margin-block: 1.25rem 1.6rem;
    max-width: 33ch;
    color: #f6e7da;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}
.hero-visual {
    position: absolute;
    inset: 0 0 0 auto;
    width: 69%;
    height: 100%;
    background: #563025;
}
.hero-visual::before, .hero-visual::after {
    content: '';
    position: absolute;
    z-index: 1;
    pointer-events: none;
}
.hero-visual::before {
    inset: 0;
    background: linear-gradient(90deg, #321916 0%, #321916cb 15%, #32191642 39%, transparent 62%);
}
.hero-visual::after {
    inset: 70% 0 0;
    background: linear-gradient(0deg, #2d100cd1, transparent);
}
.hero-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 59% center; }
.hero-visual figcaption {
    position: absolute;
    z-index: 2;
    right: max(1.25rem, calc((100vw - var(--shell)) / 2));
    bottom: 3.7rem;
    color: #fff4e6;
    font-size: .9rem;
    font-weight: 650;
}
.button-gold { background: #f0c38c; color: #341e18; }
.button-gold:hover { background: #ffd5a5; color: #341e18; }
.button-on-dark { background: transparent; color: #fff9ee; border-color: #e9c9ad99; }
.button-on-dark:hover { background: #fff5e51c; color: #fff9ee; border-color: #fff3e6; }
.hero :focus-visible { outline-color: #ffd29b; }

.quick-section { position: relative; z-index: 3; margin-top: -2.25rem; padding-bottom: 2.55rem; }
.section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.85rem, 3vw, 2.48rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.037em;
}
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fffdf9;
    box-shadow: 0 9px 26px #3d201016;
}
.quick-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-height: 94px;
    padding: 1rem .95rem;
    border-right: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.quick-card:last-child { border-right: 0; }
.quick-card:hover { background: #f8ecdf; }
.quick-card:focus-visible { outline-offset: -4px; }
.quick-card strong { display: block; margin-bottom: .15rem; font-size: 1.06rem; line-height: 1.3; }
.quick-card small { display: block; font-size: .91rem; line-height: 1.35; color: var(--muted); }
.tile-icon { width: 2.9rem; aspect-ratio: 1; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: var(--brick); }
.tile-sand { background: #f7ecd6; color: #765227; }
.tile-brick { background: #f6e3d9; }
.tile-sage { background: #e8eddf; color: #485641; }

.section-band { background: var(--wash); border-block: 1px solid var(--line); }
.updates-grid {
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    align-items: start;
    gap: clamp(1.55rem, 4vw, 3.2rem);
    padding-block: 3.35rem;
}
.notice-panel {
    padding: 1.75rem;
    border-radius: var(--round);
    background: #592e26;
    color: white;
}
.notice-panel p { color: #fff2e4; }
.notice-panel h2 + p { margin-top: 1rem; }
.notice-panel p + p { margin-top: .7rem; }
.notice-panel .text-link { color: #ffe3c3; }
.notice-panel :focus-visible, .site-footer :focus-visible { outline-color: #f6c67f; }
.notice-list { list-style: none; margin: .65rem 0 0; padding: 0; }
.notice-list li { padding: .9rem 0; border-bottom: 1px solid #ffffff30; }
.notice-list time { display: block; color: #f3d9c5; font-size: .87rem; margin-bottom: .26rem; }
.notice-list a { color: #fff; font-weight: 700; text-decoration-thickness: 1px; }
.text-link { display: inline-block; margin-top: 1rem; font-weight: 700; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; }
.section-heading .text-link { margin-top: 0; }
.news-list, .empty-panel { margin-top: 1rem; }
.news-list { display: grid; gap: .8rem; }
.empty-panel { padding: 1.35rem; border: 1px solid var(--line); border-radius: 15px; background: white; color: var(--muted); }
.entry-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: white;
}
.entry-thumbnail { display: block; width: 110px; flex: 0 0 auto; aspect-ratio: 1.42; border-radius: 8px; overflow: hidden; }
.entry-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.entry-card time { display: block; margin-bottom: .25rem; color: var(--muted); font-size: .87rem; }
.entry-card h3 { font-size: 1.16rem; line-height: 1.3; overflow-wrap: anywhere; }
.entry-card h3 a { color: var(--ink); text-decoration: none; }
.entry-card h3 a:hover { color: var(--brick); text-decoration: underline; }
.entry-card p { margin-top: .45rem; color: var(--muted); font-size: .95rem; }

.school-facts { display: flex; flex-wrap: wrap; gap: .55rem; margin: .95rem 0 0; }
.school-facts div { background: var(--wash); padding: .43rem .72rem; border-radius: 9px; }
.school-facts dt { color: var(--muted); font-size: .87rem; }
.school-facts dd { margin: 0; color: var(--ink); font-weight: 760; }
.school-address { font-style: normal; overflow-wrap: anywhere; }
.school-address p + p { margin-top: .35rem; }
.home-page-content { padding-bottom: 3.25rem; }

.site-footer { background: #34231f; color: #f7e8dc; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .8fr 1fr; gap: 1.5rem 2rem; padding-block: 2.65rem; }
.footer-name { margin-bottom: .45rem; color: white; font-size: 1.34rem; font-weight: 760; letter-spacing: -.033em; }
.footer-grid h2 { margin-bottom: .65rem; color: white; font-size: 1.05rem; font-weight: 700; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li + li { margin-top: .25rem; }
.site-footer a { color: #ffe5c9; text-decoration-thickness: 1px; }
.site-footer a:hover { color: white; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding-block: 1rem; border-top: 1px solid #ffffff30; font-size: .88rem; }

.page-banner { padding-block: 2.25rem 2.6rem; border-bottom: 1px solid var(--line); background: linear-gradient(112deg, #fdf6e9, #f4e3d3); }
.page-banner h1 { max-width: 28ch; margin-top: .5rem; font-size: clamp(2.2rem, 5.3vw, 4rem); line-height: 1.06; letter-spacing: -.056em; overflow-wrap: anywhere; }
.breadcrumb { font-weight: 650; }
.post-date { display: block; margin-top: .8rem; color: var(--muted); }
.article-list, .entry-wrap { min-height: 270px; padding-block: 2rem 3.2rem; }
.archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.entry-wrap > .entry-content { max-width: 76ch; }
.entry-content :where(p, ul, ol, figure, table, blockquote, h2, h3, h4, .wp-block-buttons) { margin-bottom: 1rem; }
.entry-content :where(h2, h3, h4):not(:first-child) { margin-top: 1.8rem; }
.entry-content img { height: auto; }
.entry-content table { border-collapse: collapse; max-width: 100%; }
.entry-content :where(td, th) { padding: .6rem .8rem; border: 1px solid var(--line); }
.entry-content iframe { max-width: 100%; }
.post-featured { margin: 0 0 1.6rem; max-width: 76ch; }
.post-featured img { display: block; border-radius: 16px; }
.wp-block-button__link { background: var(--brick); border-radius: 11px; }
.nav-links, .search-form { margin-top: 1.2rem; display: flex; gap: .55rem; flex-wrap: wrap; }
.nav-links .page-numbers { padding: .48rem .65rem; border: 1px solid var(--line); border-radius: 8px; }
.nav-links .current { background: var(--brick); color: white; }
.search-form .search-field { max-width: 100%; padding: .54rem .65rem; border: 1px solid #b89d88; border-radius: 8px; }
.search-form .search-submit { padding: .54rem .75rem; border: 0; border-radius: 8px; background: var(--brick); color: white; cursor: pointer; }

@media (max-width: 1140px) {
    .header-inner { min-height: 73px; flex-wrap: wrap; row-gap: 0; }
    .menu-ready .menu-toggle { display: inline-flex; }
    .site-navigation { width: 100%; padding-bottom: .85rem; align-items: flex-start; flex-direction: column; gap: .6rem; }
    .menu-ready .site-navigation { display: none; }
    .menu-ready.menu-open .site-navigation { display: flex; }
    .site-navigation .menu { width: 100%; flex-direction: column; align-items: stretch; }
    .site-navigation .sub-menu { display: block; position: static; min-width: auto; padding: .1rem 0 .1rem .75rem; border: 0; box-shadow: none; }
    .site-navigation .menu a { padding: .56rem .68rem; }
}
@media (max-width: 750px) {
    .site-shell { width: calc(100% - 2rem); }
    .updates-grid { grid-template-columns: minmax(0, 1fr); }
    .updates-grid { padding-block: 2.1rem; }
    .archive-grid { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
    .notice-panel { padding: 1.25rem; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); padding-block: 1.8rem; }
}
@media (max-width: 370px) {
    .school-logo { width: 2.4rem; height: 2.4rem; }
    .school-brand { gap: .5rem; }
    .school-brand strong { font-size: .92rem; }
    .menu-toggle { padding-inline: .55rem; }
    .entry-thumbnail { width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

.comments-area { max-width: 76ch; margin-top: 2rem; }
.comments-area :where(textarea, input) { max-width: 100%; }
.comments-area :where(label, p) { display: block; margin-block: .3rem; }

.principal-section { padding-bottom: 2.75rem; }
.principal-panel {
    display: grid;
    grid-template-columns: minmax(190px, 264px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "portrait title" "portrait message";
    align-items: start;
    gap: .85rem clamp(1.45rem, 3.55vw, 3rem);
    padding: clamp(1.25rem, 3.65vw, 2.75rem);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(112deg, #f8ebdd 0%, #fffaf2 83%);
}
.principal-title { grid-area: title; }
.principal-portrait { grid-area: portrait; overflow: hidden; border-radius: 10px; border: 1px solid #c9aa90; }
.principal-portrait img { display: block; width: 100%; height: auto; }
.principal-copy { grid-area: message; max-width: 70ch; }
.principal-message { color: var(--muted); }
.principal-message p + p { margin-top: .8rem; }
.principal-byline { margin-top: 1.05rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.principal-byline strong, .principal-byline span { display: block; }
.principal-byline span { color: var(--muted); font-size: .94rem; }

.identity-grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(1.3rem, 4vw, 3.5rem);
    padding-block: .65rem 3.5rem;
}
.profile-panel { padding-block: .9rem; }
.profile-panel > p { margin-top: 1rem; max-width: 44ch; color: var(--muted); }
.vision-panel {
    padding: clamp(1.1rem, 3.2vw, 2rem);
    border: 1px solid var(--line);
    border-radius: 16px;
    align-self: start;
    background: #f7ebdd;
}
.school-vision {
    margin: 1rem 0;
    padding: .5rem .9rem;
    border-left: 3px solid #a55d43;
    color: #6d2a22;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.22rem, 2vw, 1.62rem);
    font-weight: 700;
    line-height: 1.35;
}
.mission-details { margin-top: 1.05rem; }
.mission-details summary { padding: .75rem .85rem; border: 1px solid #e2cbb5; border-radius: 8px; background: #fffaf2; color: var(--ink); font-weight: 670; cursor: pointer; }
.mission-details[open] summary { margin-bottom: .85rem; }
.directory-panel { margin-top: 1.6rem; padding-top: 1.05rem; border-top: 1px solid var(--line); }
.directory-panel h3 { margin-bottom: .45rem; font-size: 1.12rem; }
.directory-panel p { color: var(--muted); }
.mission-list { margin: .55rem 0 0; padding-inline-start: 1.22rem; color: var(--muted); }
.mission-list li + li { margin-top: .35rem; }
.source-links { display: flex; flex-wrap: wrap; gap: .55rem 1.15rem; margin-top: .8rem; font-weight: 650; font-size: .93rem; }

.academic-feature {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.4rem, 4vw, 2.65rem);
    border-radius: 17px;
    background: linear-gradient(120deg, #374735 14%, #4b593d 100%);
    color: #fffdf6;
}
.academic-copy { max-width: 65ch; }
.section-label { margin-bottom: .48rem; color: #f1e2c3; font-size: .89rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.academic-copy p { margin-top: .7rem; color: #f3eee2; }
.academic-feature .button { flex-shrink: 0; }
.academic-feature :focus-visible { outline-color: #f6c67f; }

.campus-section { padding-block: 3rem; }
.record-grid, .timeline-grid, .social-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
    margin-top: 1.15rem;
}
.social-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.source-record {
    min-width: 0;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fffdf8;
}
.achievement-grid .source-record { border-left: 3px solid #a65a43; }
.record-meta { margin-bottom: .45rem; color: #84412f; font-size: .89rem; font-weight: 700; line-height: 1.4; }
.source-record h3 { font-size: 1.18rem; line-height: 1.26; letter-spacing: -.016em; }
.record-body { margin-top: .5rem; color: var(--muted); }
.source-record .text-link { margin-top: .63rem; font-size: .94rem; }
.record-source { display: block; margin-top: .2rem; color: var(--muted); font-size: .87rem; }
.timeline-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.timeline-grid .source-record { border: 0; border-top: 2px solid #bc8668; border-radius: 0; background: transparent; padding-inline: .1rem 1rem; }
.timeline-grid .record-meta { font-family: Georgia, 'Times New Roman', serif; font-size: 1.55rem; }
.documentation-grid .source-record { background: #fcf3e7; }
.entry-content .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry-content .source-record :where(h3, p) { margin-bottom: 0; }

@media (max-width: 960px) {
    .timeline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 750px) {
    .principal-section { padding-bottom: 1.8rem; }
    .principal-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "title" "portrait" "message"; gap: 1.05rem; }
    .principal-portrait { width: min(100%, 236px); margin-inline: auto; }
    .identity-grid { grid-template-columns: minmax(0, 1fr); padding-block: .65rem 2rem; }
    .profile-panel { padding-block: .2rem; }
    .academic-feature { flex-direction: column; align-items: flex-start; gap: 1.05rem; }
    .campus-section { padding-block: 2.2rem; }
    .record-grid, .timeline-grid, .social-grid, .entry-content .social-grid { grid-template-columns: minmax(0, 1fr); }
    .source-record { padding: 1rem 1.12rem; }
}

.admission-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem 2rem;
    align-items: center;
    padding-block: 2.65rem;
}
.admission-panel p { margin-top: .7rem; max-width: 60ch; color: var(--muted); }
.admission-links { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.05rem; }
.admission-links > a:not(.button) { font-weight: 650; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.2rem 0 1.6rem;
}
.gallery-tile {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fffdf9;
}
.gallery-image { display: block; overflow: hidden; aspect-ratio: 1.65; background: #ede0d2; }
.gallery-image:focus-visible { outline-offset: -4px; }
.gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 46%; }
.gallery-tile:first-child img { object-position: 62% center; }
.gallery-tile figcaption { padding: .7rem .85rem; font-weight: 680; font-size: .95rem; line-height: 1.35; }
.photo-dialog {
    width: min(930px, calc(100% - 1.5rem));
    max-height: calc(100dvh - 1.5rem);
    padding: 1rem;
    color: var(--ink);
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.photo-dialog::backdrop { background: #1f120ee0; }
.photo-dialog-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.photo-dialog-title { font-size: 1.17rem; }
.photo-dialog-image { display: block; width: 100%; max-height: calc(100dvh - 9rem); object-fit: contain; }
.documentation-grid .source-record:last-child:nth-child(odd) { grid-column: 1 / -1; }

@media (max-width: 1090px) {
    .quick-card { gap: .55rem; }
    .admission-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 875px) {
    .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-card { min-height: 85px; border-bottom: 1px solid var(--line); }
    .quick-card:nth-child(2n) { border-right: 0; }
    .quick-card:nth-child(n+3) { border-bottom: 0; }
}
@media (max-width: 780px) {
    .hero-grid { min-height: auto; padding-block: 2.6rem 1.8rem; }
    .hero-copy { width: 100%; }
    .hero h1 { font-size: clamp(2.85rem, 10vw, 4.5rem); }
    .hero-lead { margin-block: 1rem 1.25rem; }
    .hero-visual { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 1.75; }
    .hero-visual::before { display: none; }
    .hero-visual figcaption { right: 1rem; bottom: .6rem; }
    .quick-section { margin-top: 1.05rem; padding-bottom: 1.7rem; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .gallery-tile:first-child { grid-column: 1 / -1; }
    .gallery-tile figcaption { padding: .6rem; }
}
@media (max-width: 560px) {
    .hero .button { padding-inline: .86rem; }
    .admin-bar .site-header { top: 0; }
    .quick-card { display: flex; flex-direction: column; align-items: flex-start; gap: .48rem; min-height: 110px; padding: .7rem; }
    .tile-icon { width: 2rem; border-radius: 8px; }
    .quick-card small { font-size: .84rem; }
    .photo-dialog { padding: .7rem; }
}
