/* The header, the Reed line and the footer of every app page (issue #353, part, 25 Nov 2026), as on the public site (web/build/static/
   style.css, header and footer; markup app/templates/_shell_header.html and _shell_footer_nav.html). Loaded by base.html (after app.css) and
   base_site.html (after the site stylesheet and app-site.css), so both app shells draw the same header. Values are the site's, written out
   (the two shells name their tokens differently: app.css --accent, --rule; the site --teal, --line). Mobile first:
   below 640 px  the brand name is hidden visually (kept for screen readers; 560 px measured too narrow in Russian);
   below 960 px  the site links and the app links (Sign in, or the dashboard, Your tools in Claude, Sign out) are in the Menu;
   from 960 px   Sign in is in the row (a signed in person's three links from 1120 px), the site links stay in the Menu; the button keeps
                 its short label up to 1120 px, and at every width on a page in another language than English;
   from 1120 px  the site links are in the row as on the site and the Menu is gone. A signed in person keeps the site links in the Menu at
                 every width: the three app links take their room (measured: the Russian row of a signed in person needs about 1300 px, more
                 than the site's 1120 px content width). So does a page in another language than English: the site links are longer there
                 (Russian: 129 px too wide at 1120 px) and lead to the English site pages anyway. */
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.site-header, .reed-line, .site-footer, .dev-banner { --shell-line: #E1DED6; }
.site-header .wrap, .reed-line .wrap, .site-footer .wrap, .dev-banner .wrap { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.site-header { position: relative; border-bottom: 1px solid var(--shell-line); background: #FBFAF6; }
.site-header .head-row { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
.site-header .brand { display: flex; flex: none; align-items: center; gap: 6px; margin-right: auto; min-height: 44px; text-decoration: none; color: #1B1D1F;
  font-family: 'DM Serif Display', 'DM Serif Display Fallback', Georgia, 'Times New Roman', serif; font-weight: 400; font-size: 18px; white-space: nowrap; }
.site-header .brand svg { flex: none; }
.site-header .nav { display: flex; align-items: center; gap: 6px 16px; font-size: 15px; }
.site-header .nav-desktop, .site-header .nav-account { flex: none; }
.site-header .nav a, .site-header .nav .linklike { color: #1B1D1F; text-decoration: none; padding: 0 2px; min-height: 44px; display: inline-flex; align-items: center;
  font-size: 15px; background: none; border: 0; cursor: pointer; font-family: inherit; white-space: nowrap; }
.site-header .nav a:hover, .site-header .nav .linklike:hover { color: #0B5E5E; text-decoration: underline; }
.site-header .nav a[aria-current="page"] { font-weight: 700; }
.site-header .nav form { display: inline-flex; margin: 0; }
.site-header .nav-desktop, .site-header .nav-account { display: none; }
.site-header .btn.nav-cta { font-size: 15px; padding: 10px 12px; min-height: 44px; white-space: nowrap; flex: none; margin-left: 0; }
.site-header .nav-cta .cta-long { display: none; }
.site-header .nav-cta .cta-short { display: inline; }
.site-header .nav-menu { display: block; flex: none; }
.site-header .nav-menu summary { min-height: 44px; min-width: 44px; display: flex; align-items: center; margin: 0; padding: 0 10px; border: 1.5px solid #51565B;
  border-radius: 10px; cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; }
.site-header .nav-menu summary::-webkit-details-marker { display: none; }
.site-header .nav-mobile { display: none; }
.site-header .nav-menu[open] .nav-mobile { position: absolute; left: 0; right: 0; top: 100%; background: #FBFAF6; border-bottom: 1px solid var(--shell-line);
  display: flex; flex-direction: column; align-items: stretch; padding: 4px 20px 12px; z-index: 50; }
.site-header .nav-mobile a, .site-header .nav-mobile .linklike { padding: 0 4px; }
.site-header .nav-account-m { display: flex; flex-direction: column; align-items: stretch; border-top: 1px solid var(--shell-line); margin-top: 6px; padding-top: 6px; }
.site-header .lang-switch { flex: none; margin: 0; font-size: 14px; color: #51565B; white-space: nowrap; text-align: left; }
.site-header .lang-switch a { color: #51565B; padding: 0 2px; text-decoration: none; display: inline; min-height: 0; }
.site-header .lang-switch a.active { color: #1B1D1F; font-weight: 700; text-decoration: none; }
.site-header .lang-switch a:hover { color: #0B5E5E; text-decoration: underline; }
@media (max-width: 639px) { .site-header .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; } }
/* 360 to 414 px in Russian (the longest short label, Бесплатный разбор: 408 px at 390 before, the site skin too): tighter gaps, button
   padding, side padding and language switch below 420 px */
@media (max-width: 419px) {
  .site-header .head-row { gap: 4px; }
  .site-header .btn.nav-cta { padding: 10px 8px; font-size: 14px; }
  .site-header .lang-switch { font-size: 13px; }
  .site-header .lang-switch a { padding: 0 1px; }
  .site-header .wrap { padding-left: 12px; padding-right: 12px; }
  .site-header .nav-menu summary { padding: 0 6px; }
  .site-header .wrap.head-row { flex-wrap: wrap; }     /* only when it does not fit (Russian at 360 px, 320 px): the language switch wraps */
}
@media (min-width: 720px) {
  .site-header .wrap, .reed-line .wrap, .site-footer .wrap, .dev-banner .wrap { padding-left: 32px; padding-right: 32px; }
  .site-header .head-row { gap: 12px; }
  .site-header .nav-menu[open] .nav-mobile { padding: 4px 32px 12px; }
}
@media (min-width: 960px) {
  .site-header .nav-account { display: flex; gap: 6px 12px; }
  .site-header .nav-account-m { display: none; }
}
@media (min-width: 1120px) {
  .site-header .brand { font-size: 22px; gap: 10px; margin-right: 16px; }
  .site-header .nav-desktop { display: flex; margin-left: auto; }
  .site-header .nav-menu { display: none; }
  .site-header .nav-cta .cta-long { display: inline; }
  .site-header .nav-cta .cta-short { display: none; }
  .site-header:has(.nav-account form) .brand, html:not(:lang(en)) .site-header .brand { margin-right: auto; }
  .site-header:has(.nav-account form) .nav-desktop, html:not(:lang(en)) .site-header .nav-desktop { display: none; }
  .site-header:has(.nav-account form) .nav-menu, html:not(:lang(en)) .site-header .nav-menu { display: block; }
  html:not(:lang(en)) .site-header .nav-cta .cta-long { display: none; }
  html:not(:lang(en)) .site-header .nav-cta .cta-short { display: inline; }
}
@media (min-width: 960px) and (max-width: 1119px) {     /* a signed in person: the three app links come into the row from 1120 px (French measured) */
  .site-header:has(.nav-account form) .nav-account { display: none; }
  .site-header:has(.nav-account form) .nav-account-m { display: flex; }
}
/* the Reed line under the header (kept from the app; the site skin's tint) */
.reed-line { background: #EAF2F1; border-bottom: 1px solid var(--shell-line); font-size: 14px; color: #51565B; padding: 8px 0; }
.reed-line strong { color: #0B5E5E; }
/* footer, dark as on the site */
.site-footer { background: #1B1D1F; color: #FBFAF6; margin-top: 32px; padding: 40px 0 28px; font-size: 15px; border-top: 0; }
.site-footer a { color: #FBFAF6; }
.site-footer p { margin: 0 0 8px; }
.site-footer .cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.site-footer .brand-foot { display: flex; align-items: center; gap: 10px; font-family: 'DM Serif Display', 'DM Serif Display Fallback', Georgia, serif; font-size: 22px; margin-bottom: 10px; }
.site-footer .brand-foot svg { flex: none; }
.site-footer .foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 0; overflow-wrap: anywhere; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.site-footer h2 { font-family: 'DM Sans', 'DM Sans Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; font-weight: 700; font-size: 14px;
  letter-spacing: .1em; text-transform: uppercase; margin: 0 0 10px; color: #D6E7E5; }
.site-footer .fine { margin-top: 16px; color: #B9BDBF; font-size: 14px; }
.site-footer .fine + .fine { margin-top: 4px; }
.site-footer .fine a { color: #FBFAF6; }
@media (min-width: 720px) { .site-footer .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .site-footer .cols { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; } }
