/* Thanh thông báo + menu (SITE.header) cho các trang không tải store.css: trang chủ, trang câu chuyện.
   Chép đúng quy tắc header trong store.css; biến màu đặt riêng trong thanh để không đụng biến của trang. */
.announce, .header {
  --wine: #860933; --ink: #1a1a1a; --muted: #6b6b6b; --line: #e6e6e6;
  --head: "Oswald", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  align-self: stretch; box-sizing: border-box; text-align: left;
}
.announce *, .header * { box-sizing: border-box; }
/* Trang câu chuyện có body đệm 16px hai bên: kéo thanh tràn hết bề ngang */
body > .announce, body > .header { margin-left: -16px; margin-right: -16px; }

.announce { position: relative; z-index: 3; background: var(--wine); color: #fff; text-align: center; font-family: var(--head); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; height: 36px; overflow: hidden; }
.announce p { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 16px; opacity: 0; transition: opacity .5s; margin: 0; }
.announce p.on { opacity: 1; }

.header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); color: var(--ink); font-family: var(--body); }
.header .container { max-width: 1320px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 68px; }
.header .logo { justify-self: center; font-family: var(--head); font-weight: 600; font-size: 26px; letter-spacing: .14em; text-transform: uppercase; color: var(--wine); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.header .logo i { width: 30px; height: 26px; background: var(--wine); -webkit-mask: url("/assets/khoa/tag.webp") center / contain no-repeat; mask: url("/assets/khoa/tag.webp") center / contain no-repeat; }
.header .nav { display: flex; gap: 28px; }
.header .nav a { font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 1.5px solid transparent; }
.header .nav a:hover, .header .nav a[aria-current="page"] { border-color: var(--ink); }
.header .icons { justify-self: end; display: flex; align-items: center; gap: 6px; }
.header .icon-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; text-decoration: none; color: var(--ink); }
.header .icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.header .icon-btn b { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--wine); color: #fff; font: 600 11px/18px var(--body); text-align: center; padding: 0 4px; }
.header .icon-btn b[hidden] { display: none; }
.header .burger { display: none; }
.header .lang-sw { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.header .lang-sw button { height: 28px; padding: 0 10px; border: 0; background: none; font: 500 12px var(--head); letter-spacing: .06em; color: var(--muted); cursor: pointer; }
.header .lang-sw button[aria-pressed="true"] { background: var(--wine); color: #fff; }

@media (max-width: 860px) {
  .header .container { grid-template-columns: auto 1fr auto; padding: 0 16px; }
  .header .logo { font-size: 22px; }
  .header .burger { display: grid; }
  .header .nav { display: none; position: fixed; inset: 104px 0 auto 0; background: #fff; flex-direction: column; gap: 0; padding: 8px 16px 20px; border-bottom: 1px solid var(--line); z-index: 19; }
  .header .nav.open { display: flex; }
  .header .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .announce { height: 40px; font-size: 11px; letter-spacing: .04em; }
  .announce p { line-height: 1.3; padding: 0 12px; }
}
