:root {
  --site-ink: #13233a;
  --site-muted: #66758b;
  --site-line: #e3e8ef;
  --site-brand: #0bb9aa;
  --site-header-height: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body.community-site { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--site-ink); background: #f5f7fb; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
button, input, select, textarea { color: inherit; font: inherit; }
img { max-width: 100%; }
#community-main { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 1000; transform: translateY(-160%); padding: 9px 13px; border-radius: 8px; background: #13233a; color: #fff; text-decoration: none; }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 100; min-height: var(--site-header-height); border-bottom: 1px solid var(--site-line); background: rgba(255, 255, 255, .96); box-shadow: 0 4px 18px rgba(19, 35, 58, .06); backdrop-filter: blur(12px); }
.site-header__inner { width: 100%; min-height: var(--site-header-height); margin: 0; padding: 0 24px 0 8px; display: flex; align-items: center; gap: 28px; }
.site-brand { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; color: var(--site-brand); font-size: 1.9rem; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.site-brand img { width: 38px; height: 38px; object-fit: contain; }
.header-community-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-community-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 11px; border-radius: 9px; color: #53637a; font-size: .86rem; font-weight: 700; text-decoration: none; }
.header-community-links a:hover { background: #eaf8f6; color: #087e74; }
.header-community-links strong { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e25151; color: #fff; font-size: .65rem; }
.site-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-community-links + .site-actions { margin-left: 6px; }
.site-actions details { position: relative; }
.site-actions summary { list-style: none; cursor: pointer; }
.site-actions summary::-webkit-details-marker { display: none; }
.language-menu > summary { min-height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 10px; background: #e9faf8; color: #087e74; font-size: .8rem; font-weight: 800; }
.language-menu form, .account-menu__panel { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; min-width: 175px; padding: 7px; border: 1px solid var(--site-line); border-radius: 12px; background: #fff; box-shadow: 0 15px 35px rgba(19, 35, 58, .14); }
.language-menu button, .account-menu__panel a { width: 100%; display: block; padding: 9px 11px; border: 0; border-radius: 7px; background: transparent; color: #34445a; text-align: left; text-decoration: none; cursor: pointer; }
.language-menu button:hover, .language-menu button[aria-current="true"], .account-menu__panel a:hover { background: #eef9f8; color: #087e74; }
.account-menu > summary img { width: 38px; height: 38px; display: block; border: 2px solid #fff; border-radius: 50%; background: #eef2f6; object-fit: cover; box-shadow: 0 0 0 1px var(--site-line); }
.account-menu__panel strong { display: block; max-width: 210px; overflow: hidden; padding: 8px 11px; border-bottom: 1px solid var(--site-line); text-overflow: ellipsis; white-space: nowrap; }
.account-link { padding: 9px 13px; border: 1px solid var(--site-brand); border-radius: 9px; color: #087e74; font-weight: 700; text-decoration: none; }

.site-footer { border-top: 1px solid var(--site-line); background: #fff; color: var(--site-muted); }
.site-footer__inner { width: min(calc(100% - 40px), 1240px); min-height: 74px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: .82rem; }
.site-footer__inner p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.site-footer a { color: var(--site-muted); text-decoration: none; }
.site-footer a:hover { color: #087e74; }
.community-flashes .alert { margin-bottom: 10px; padding: 12px 15px; border: 1px solid #b9e4df; border-radius: 9px; background: #edfaf8; color: #17665f; }

@media (max-width: 1060px) {
  .site-header__inner { flex-wrap: wrap; gap: 0 14px; padding: 12px 0; }
  .site-brand { font-size: 1.65rem; }
  .site-actions { order: 2; }
}

@media (max-width: 620px) {
  .site-header__inner { width: 100%; padding: 0 10px 0 6px; }
  .site-brand span { font-size: 1.45rem; }
  .site-brand img { width: 34px; height: 34px; }
  .language-menu > summary span { display: none; }
  .header-community-links { gap: 2px; }
  .header-community-links a { width: 38px; padding: 0; justify-content: center; }
  .header-community-links a span { display: none; }
  .header-community-links strong { position: absolute; margin: -24px 0 0 24px; }
  .site-footer__inner { padding: 20px 0; align-items: flex-start; flex-direction: column; }
  .site-footer nav { justify-content: flex-start; gap: 10px 16px; }
}

[data-theme="dark"] { color-scheme: dark; }
[data-theme="dark"] body.community-site { background: #080b12; color: #e7edf7; }
[data-theme="dark"] .site-header { border-color: #273142; background: rgba(12, 17, 27, .96); box-shadow: 0 4px 18px rgba(0, 0, 0, .22); }
[data-theme="dark"] .header-community-links a { color: #aab8ca; }
[data-theme="dark"] .header-community-links a:hover { background: #143331; color: #68ded3; }
[data-theme="dark"] .language-menu > summary { background: #12302e; color: #68ded3; }
[data-theme="dark"] .language-menu form,
[data-theme="dark"] .account-menu__panel { border-color: #303b4e; background: #111827; }
[data-theme="dark"] .language-menu button,
[data-theme="dark"] .account-menu__panel a { color: #d6deea; }
[data-theme="dark"] .language-menu button:hover,
[data-theme="dark"] .language-menu button[aria-current="true"],
[data-theme="dark"] .account-menu__panel a:hover { background: #1b2938; color: #6ce6da; }
[data-theme="dark"] .site-footer { border-color: #273142; background: #0c111b; }

/* En-tête compact. */
:root{--site-header-height:58px}
.site-header__inner{min-height:58px;gap:18px}
.site-brand{font-size:1.55rem}
.site-brand img{width:31px;height:31px;display:block;flex:0 0 31px}
.header-community-links a{min-height:34px;padding:0 9px;font-size:.8rem}
.language-menu>summary{min-height:36px;padding:0 10px}
.account-menu>summary img{width:32px;height:32px}
