/* WEB-1 U1: the site's header for pages the site build does not write (the account page, app.commentcrate.com), drawn
   by assets/site-header.js. Same sizes and colours as header.site in style.css; scoped under .cc-head so it does not
   touch the page around it. */
.cc-head {
  --h-bg: #fbfaf7; --h-fg: #16263a; --h-muted: #55616a; --h-line: #ddd5ca; --h-line-soft: #ebe4da; --h-surface: #ffffff; --h-soft: #f4f0ea;
  --h-blue: #005eb8; --h-blue-strong: #00498f; --h-blue-soft: #e8f1fa; --h-accent: #b93c0b; --h-accent-strong: #8f2d07; --h-on: #ffffff;
  position: sticky; top: 0; z-index: 30; background: var(--h-bg); border-bottom: 1px solid var(--h-line-soft);
  font-family: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif; color: var(--h-fg);
}
.cc-head * { box-sizing: border-box; }
.cc-head [hidden] { display: none !important; } /* buttons styled with display: inline-flex stay hidden when the page hides them */
.cc-head .cc-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 8px 20px; min-height: 72px; flex-wrap: wrap; }
.cc-head .cc-brand { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--h-fg); text-decoration: none; font-size: 17px; letter-spacing: -0.02em; }
.cc-head .cc-brand img { width: 24px; height: 24px; border-radius: 6px; }
.cc-head .cc-nav { display: flex; align-items: center; justify-content: center; gap: 24px; flex: 1; }
.cc-head .cc-nav > a { color: var(--h-muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 6px 0; }
.cc-head .cc-nav > a:hover { color: var(--h-fg); }
.cc-head .cc-plat { position: relative; }
.cc-head .cc-plat-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; border: 0; background: transparent; color: var(--h-muted); font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; cursor: pointer; }
.cc-head .cc-plat-btn:hover, .cc-head .cc-plat-btn[aria-expanded="true"] { color: var(--h-fg); }
.cc-head .cc-plat-list { position: absolute; inset-inline-start: -12px; top: calc(100% + 10px); z-index: 40; min-width: 200px; margin: 0; padding: 6px; list-style: none; background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(62, 32, 12, 0.14); }
.cc-head .cc-plat-list a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--h-fg); text-decoration: none; font-size: 15px; }
.cc-head .cc-plat-list a:hover { background: var(--h-soft); }
.cc-head .cc-slot { display: flex; align-items: center; gap: 12px; }
.cc-head .cc-lang { position: relative; }
.cc-head .cc-lang-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--h-fg); font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: .04em; cursor: pointer; }
.cc-head .cc-lang-btn:hover, .cc-head .cc-lang-btn[aria-expanded="true"] { background: var(--h-soft); }
.cc-head .cc-lang-list { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 40; min-width: 180px; max-height: 70vh; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(62, 32, 12, 0.14); }
.cc-head .cc-lang-list button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--h-fg); font-family: inherit; font-size: 15px; text-align: start; cursor: pointer; }
.cc-head .cc-lang-list button:hover { background: var(--h-soft); }
.cc-head .cc-lang-list button[aria-current] { font-weight: 600; }
.cc-head .cc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 1px solid var(--h-blue); border-radius: 10px; background: transparent; color: var(--h-blue); font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; }
.cc-head .cc-btn:hover { background: var(--h-blue-soft); color: var(--h-blue-strong); border-color: var(--h-blue-strong); }
.cc-head .cc-btn.cc-cta { background: var(--h-accent); border-color: var(--h-accent); color: var(--h-on); }
.cc-head .cc-btn.cc-cta:hover { background: var(--h-accent-strong); border-color: var(--h-accent-strong); color: var(--h-on); }
.cc-head .cc-pro { padding: 1px 7px; border-radius: 999px; background: var(--h-blue); color: var(--h-on); font-size: 11px; font-weight: 700; }
.cc-head .cc-menu-btn { display: none; width: 44px; height: 44px; margin-inline-end: -8px; border: 0; border-radius: 12px; background: transparent; color: var(--h-fg); cursor: pointer; place-items: center; }
.cc-head .cc-bars, .cc-head .cc-bars::before, .cc-head .cc-bars::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
.cc-head .cc-bars { position: relative; }
.cc-head .cc-bars::before, .cc-head .cc-bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.cc-head .cc-bars::before { top: -6px; }
.cc-head .cc-bars::after { top: 6px; }
.cc-head .cc-btn:focus-visible, .cc-head button:focus-visible, .cc-head a:focus-visible { outline: 3px solid var(--h-blue); outline-offset: 3px; }
@media (max-width: 760px) {
  .cc-head .cc-wrap { min-height: 64px; }
  .cc-head .cc-menu-btn { display: inline-grid; }
  .cc-head .cc-cta { display: none; }
  .cc-head .cc-slot { margin-inline-start: auto; }
  .cc-head .cc-nav { display: none; order: 3; flex: 1 0 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0 0 8px; }
  .cc-head.cc-open .cc-nav { display: flex; }
  .cc-head .cc-nav > a { padding: 14px 2px; font-size: 18px; color: var(--h-fg); border-top: 1px solid var(--h-line-soft); }
  .cc-head .cc-plat-btn { width: 100%; justify-content: space-between; padding: 14px 2px; font-size: 18px; color: var(--h-fg); }
  .cc-head .cc-plat-list { position: static; min-width: 0; padding: 0 0 8px; border: 0; box-shadow: none; background: transparent; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .cc-head .cc-plat-list[hidden] { display: none; }
  .cc-head .cc-plat-list a { background: var(--h-surface); border: 1px solid var(--h-line-soft); min-height: 44px; }
}
/* SITE-2: on a narrow phone the language button, "Sign in" and the menu button fit on the logo's row (the app and the
   account page show the language button in the header; it pushed the menu button to a second row at 390px) */
@media (max-width: 430px) {
  .cc-head .cc-wrap { padding: 0 16px; column-gap: 8px; }
  .cc-head .cc-lang-btn { padding: 0 6px; }
}

/* WEB-2 stage 7: "My account" menu (Scan, Records, Settings, Account, Sign out), like the language menu */
.cc-acc { position: relative; }
.cc-acc-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit; }
.cc-acc-list { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; margin: 0; padding: 6px; list-style: none; background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 12px; box-shadow: 0 12px 32px #16263a1f; }
.cc-acc-list a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--h-fg); text-decoration: none; font-size: 15px; }
.cc-acc-list a:hover, .cc-acc-list a:focus-visible { background: var(--h-soft); }
.cc-acc-email { padding: 8px 12px 10px; color: var(--h-muted, #55616a); font-size: 13px; overflow-wrap: anywhere; border-bottom: 1px solid var(--h-line); margin-bottom: 4px; }
.cc-acc-sep { height: 1px; margin: 4px 6px; background: var(--h-line); }
.cc-acc-ico { display: none; }
/* WEB-2 stage 7: on a phone the header stays on one row (the account button shows a person mark, its word stays for
   screen readers) and the language menu is two columns that do not cover the page */
@media (max-width: 560px) {
  .cc-acc-ico { display: block; }
  .cc-acc-btn .cc-acc-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cc-acc-btn { padding-inline: 10px; gap: 5px; }
  .cc-head .cc-lang-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; min-width: 0; width: min(320px, calc(100vw - 32px)); max-height: 60vh; }
  .cc-head .cc-lang-list[hidden] { display: none; }
  .cc-head .cc-lang-list button { padding: 9px 10px; font-size: 14px; }
  .cc-acc-list { position: fixed; inset-inline: 12px; top: 64px; min-width: 0; }
}
@media (max-width: 560px) {
  .cc-head .cc-lang-list { position: fixed; inset-inline: 12px; top: 64px; width: auto; }
  .cc-acc-btn [aria-hidden="true"]:last-child { display: none; }
}
/* signed in on a narrow phone: the logo without its name, so language, account and menu stay on one row */
@media (max-width: 430px) {
  .cc-head:has(.cc-acc:not([hidden])) .cc-brand-name { display: none; }
}
