/* Public website theme, based on the guzheng competition landing page. */
:root {
    color-scheme: light;
    --ink: #142f31;
    --muted: #385958;
    --paper: #fbfcf8;
    --line: #dce8df;
    --teal: #085b55;
    --teal-hover: #064944;
    --mint: #e8f5ec;
    --cream: #fff9eb;
    --gold: #79501a;
    --gradient: linear-gradient(120deg, var(--mint), var(--cream));
    --card-radius: 16px;
    --hero-radius: 22px;
    --control-radius: 12px;
    --media-shadow: 0 12px 30px #163d3622;
}

body { font: 16px/1.75 system-ui, "Microsoft YaHei", "PingFang SC", sans-serif; }
a:focus-visible, button:focus-visible { outline: 3px solid #9e5900; outline-offset: 4px; }
body > header, body > footer { background: var(--paper); color: var(--ink); }
body > footer { border-top: 1px solid var(--line); }
.header-inner, .footer-inner, body > main { max-width: 1200px; }
.header-inner { padding-block: 16px; }
.brand, footer .brand { color: var(--ink); font-weight: 800; }
.header-inner > nav a:hover, .more:hover, .category-navigation a:hover { color: var(--teal); text-decoration: underline; }
.language-switch a { color: var(--muted); }
.language-switch a[aria-current=true] { color: var(--teal); border-color: var(--teal); }
.footer-message > a { color: var(--teal); }
.footer-inner p, .footer-legal { color: var(--muted); }

h1, h2, h3, html[lang=en] h2, html h1.english-title { font-family: inherit; font-weight: 750; }
h1, html h1.english-title { font-size: clamp(2rem, 4.3vw, 3.65rem); line-height: 1.14; letter-spacing: .015em; }
h2 { line-height: 1.3; }
.eyebrow, .hero-subtitle, .category-label, .card-top span, .cards small,
.news-card time, .news-detail time, .teacher-copy small, .teacher-pinyin {
    color: var(--gold);
    font-weight: 750;
}
.hero {
    margin-top: clamp(16px, 3vw, 36px);
    padding: clamp(22px, 5vw, 58px);
    background: var(--gradient);
    border-radius: var(--hero-radius);
    gap: clamp(24px, 5vw, 60px);
}
.hero-copy { min-width: 0; }
.hero-copy .description { color: var(--muted); margin-bottom: 24px; }
.hero + .section { border-top: 0; }
.hero-art, .activity-poster { border-radius: var(--hero-radius); box-shadow: var(--media-shadow); }
.sound-art { background: linear-gradient(145deg, #d2ebe2, #f6e9c9); }
.sound-disc {
    max-width: 82%;
    aspect-ratio: 1;
    height: auto;
    background: repeating-radial-gradient(circle, #125c55 0 2px, #26746a 3px 5px);
    box-shadow: 18px 25px 35px #154e4533;
}
.disc-center { inset: 35%; background: var(--cream); border-color: #dfce9e; }
.sound-art .art-caption, .sound-art .art-bottom, .art-word { color: var(--ink); }
.art-word { font-family: inherit; font-weight: 800; }
.sound-lines span { background: #fff9eb; box-shadow: 0 0 1px #fff9eb; }

.cards article, .news-card, .teacher-card, .video-card, .results-form-panel, .contact-form-panel, .result-card,
.registration-page .contact-form, .registration-page > section {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    background: #fff;
}
.news-card, .teacher-card, .video-card, .teacher-portrait, .news-detail :is(img, video) {
    border-radius: var(--card-radius);
    overflow: hidden;
}
.news-heading, .activity-updates, .news-empty {
    padding: clamp(22px, 4vw, 42px);
    background: var(--gradient);
    border-radius: var(--card-radius);
}
.news-heading { margin-bottom: 24px; }
.news-detail .news-heading { margin-top: 18px; }
.news-cover, .teacher-photo, .teacher-portrait, .video-cover { background: var(--mint); color: var(--gold); }
.teacher-photo > span, .video-placeholder { color: var(--gold); }
.video-stage { background: var(--ink); }
.video-play { background: #085b55de; }
.video-cover:hover .video-play { background: var(--teal-hover); }
.teacher-card:hover { border-color: var(--teal); }
.section, .entry-link, .category-navigation, .teacher-biography, .results-notice, .published-results, .contact-note { border-color: var(--line); }
.news-card-copy > p, .teacher-copy > p, .video-copy > p, .news-heading > p:not(.eyebrow),
.news-detail figcaption, .teacher-profile p:not(.eyebrow), .results-intro > p:not(.eyebrow),
.results-notice p, .result-card small, .contact-intro > p:not(.eyebrow), .contact-note p,
.activity-intro, .activity-updates p:not(.eyebrow), .news-empty, .letter-bottom { color: var(--muted); }
.entry-link, .more, .back-link, .card-top b, .result-score strong, .contact-note > span { color: var(--teal); }
.news-detail a:not(.button), .back-link { text-underline-offset: .22em; }
.news-detail a:not(.button):hover, .back-link:hover { text-decoration: underline; }

.button, .results-entry, .registration-page button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .6em 1.15em;
    border: 1px solid var(--teal);
    border-radius: var(--control-radius);
    background: var(--teal);
    color: #fff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}
.button:hover, .registration-page button:hover { background: var(--teal-hover); }
.results-entry, .button.button-outline { background: #fff; color: var(--teal); }
.results-entry:hover, .button.button-outline:hover { background: var(--mint); }
.competition-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-block: 28px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    background: var(--gradient);
}
.competition-account-link { color: var(--teal); text-decoration: underline; }
.button:disabled { opacity: .65; cursor: not-allowed; }
.letter-send { justify-content: space-between; }
.contact-topics span { border-color: var(--line); border-radius: 999px; background: var(--mint); color: var(--teal); }
.contact-status, .registration-page [role=status] { background: var(--mint); color: var(--ink); padding: 12px 15px; border-radius: var(--control-radius); }
.contact-status[role=alert] { background: #f9ebe5; color: #8a3527; }
.contact-form-panel :is(input,select,textarea), .results-form-panel input,
.registration-page .contact-form :is(input:not([type=hidden]),select) {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border: 1px solid #9eb5a8;
    border-radius: var(--control-radius);
    background: #fbfcfa;
    padding: 10px 12px;
    color: var(--ink);
    font: inherit;
}
.contact-form-panel :is(input,select,textarea):focus, .results-form-panel input:focus,
.registration-page :is(input,select):focus { outline: 2px solid var(--teal); outline-offset: 2px; }
.challenge-row > input { width: 45%; }
.registration-page { overflow-wrap: anywhere; }
.registration-page .contact-form, .registration-page > section {
    margin-block: 20px;
    padding: clamp(18px, 4vw, 32px);
}
.registration-page .contact-form { display: grid; gap: 16px; }
.registration-page .contact-form label { display: grid; gap: 6px; font-weight: 650; }
.registration-page a { color: var(--teal); text-decoration: underline; }
.registration-page form[action="/registration/logout"] button { background: #fff; color: var(--teal); }

@media (max-width: 700px) {
    .header-inner, .footer-inner, body > main { padding-inline: 16px; }
    .hero { grid-template-columns: minmax(0, 1fr); }
    .hero-art { height: clamp(260px, 61vw, 350px); }
    .results-entry { margin-left: 0; }
    .hero-copy > .button { margin-right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .news-card img { transition: none; }
    .cards article:has(.activity-entry):hover, .news-card:hover img { transform: none; }
}
