:root { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
* { min-width: 0; }
[hidden] { display: none !important; }
body { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid #c43d45; outline-offset: 4px; }
html[data-theme="dark"] :focus-visible { outline-color: #ffb4b8; }
a, button, input, select, textarea { touch-action: manipulation; }
button, .button, .nav a { min-height: 44px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.menu-toggle { display: none; }
.nav a[aria-current="page"], .panel-tabs a[aria-current="page"] { border-bottom: 3px solid var(--red); font-weight: 700; }
.article-page { max-width: 850px; padding-top: 64px; padding-bottom: 80px; }
.article-page.wide { max-width: 1180px; }
.article-page h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.08; margin: 16px 0 32px; }
.rich-content { font-size: 1.1rem; line-height: 1.85; }
.rich-content h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 2rem 0 .7rem; }
.rich-content p { margin: 0 0 1.1rem; }
.rich-content ul { padding-left: 1.5rem; }
.rich-content a { text-decoration: underline; text-underline-offset: 3px; }
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.news-grid .news-post { margin: 0; max-width: none; }
.news-post h2 { font-size: 1.65rem; line-height: 1.25; margin: 14px 0; }
.news-cover { display: block; width: 100%; height: 230px; object-fit: cover; border-radius: 6px; margin-bottom: 20px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 40px 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; border-radius: 6px; }
.gallery figcaption { font-size: .95rem; margin-top: 8px; }
.share-actions { padding-top: 24px; border-top: 1px solid var(--line); }
.search-form, .filter-form { margin: 24px 0; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { width: 100%; padding: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--navy); border-radius: 5px; font: inherit; }
label { display: block; margin: 14px 0 6px; font-weight: 600; }
label.check-label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 20px; }
fieldset { border: 1px solid var(--line); padding: 18px; margin: 24px 0; }
legend { font-weight: 700; padding: 0 8px; }
.form-actions { flex-wrap: wrap; gap: 14px; }
.form-actions input[type="search"] { flex: 1 1 240px; width: auto; }
.panel-main h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.panel-tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 0 0 14px; margin-bottom: 28px; }
.panel-tabs a { padding: 12px 16px; border-radius: 5px 5px 0 0; background: var(--surface); }
.availability { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; padding: 24px; border: 1px solid var(--line); margin-bottom: 32px; }
.availability div { flex: 1 1 320px; }
.availability h2 { font-size: 1.4rem; }
.editor { max-width: 100%; }
.editor h2 { font-size: 1.6rem; }
.editor h3 { font-size: 1.3rem; }
.editor button { margin-top: 10px; }
.format-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.format-toolbar button { padding: 8px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--navy); border-radius: 5px; }
.filter-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto auto; gap: 12px; align-items: end; }
.filter-form label { margin: 0; }
.post-row .row-actions { flex-wrap: wrap; align-items: center; }
.post-row h2 { font-size: 1.35rem; }
.media-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; max-height: 420px; overflow: auto; padding: 6px; }
.media-choice { padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.media-choice img { width: 100%; height: 120px; object-fit: cover; }
.media-choice span { display: flex; gap: 8px; margin-top: 8px; font-weight: 400; }
.media-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.media-item { background: var(--surface); border: 1px solid var(--line); padding: 20px; border-radius: 8px; }
.media-item > img { width: 100%; height: 200px; object-fit: contain; }
.preview-frame { width: 100%; height: 720px; border: 1px solid var(--line); display: block; margin: 16px auto; background: white; }
.preview-frame.mobile-preview { width: 375px; max-width: 100%; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
details { border-top: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; min-height: 44px; }
.secret-key { font-size: 1.2rem; padding: 16px; background: var(--surface); border: 1px solid var(--line); user-select: all; }
html[data-theme="dark"] .field-note, html[data-theme="dark"] .eyebrow, html[data-theme="dark"] time { color: #bdc8d7; }
@media(max-width: 920px) {
  .header-inner { gap: 12px; flex-direction: row; align-items: center; padding: 8px 0; min-height: 92px; }
  .header-actions { width: auto; flex-direction: row; align-items: center; flex-wrap: nowrap; justify-content: flex-end; gap: 10px; }
  .js .menu-toggle { display: inline-flex; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--navy); font: inherit; }
  .js #main-nav { display: none; }
  .js #main-nav.is-open { display: flex; position: absolute; top: 100%; left: 0; right: 0; padding: 20px; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 6px; box-shadow: 0 12px 25px #0002; }
  .site-header { position: relative; z-index: 5; }
  .nav a { display: inline-flex; align-items: center; }
  .theme-toggle [data-theme-label] { display: none; }
  .filter-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .news-grid { grid-template-columns: 1fr; }
  .post-row { display: block; }
  .row-actions { margin-top: 16px; }
  .editor { padding: 20px; }
}
@media(max-width: 480px) { .gallery { grid-template-columns: 1fr; } .article-page { padding-top: 36px; } .panel-tabs a { padding: 10px; } }
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

.nav a[aria-current="page"] { text-decoration: none; }
