/* Shared BriefBrief visual identity. All rules are scoped to bb-* chrome. */
:root {
  --bb-ink: #202a34;
  --bb-paper: #f7f7f4;
  --bb-muted: #d5d9d5;
  --bb-brass: #c1a875;
}

.bb-public-header,
.bb-app-header {
  position: relative;
  z-index: 1100;
  color: #fff;
  background-color: #18232c;
  background-image: linear-gradient(rgba(14, 24, 32, .78), rgba(14, 24, 32, .82)), url('/static/images/Mazar-e-Sharif_web.jpg');
  background-size: cover;
  background-position: center 35%;
  border-bottom: 2px solid rgba(193, 168, 117, .82);
  box-shadow: 0 3px 12px rgba(12, 20, 27, .24);
  color-scheme: dark;
}

.bb-public-header { position: sticky; top: 0; padding: .55rem 1.4rem .6rem; transition: box-shadow .2s ease; }
.bb-public-header.scrolled { box-shadow: 0 5px 18px rgba(0,0,0,.34); }
.bb-app-header { position: sticky; top: 0; }
.bb-public-header-inner { max-width: 1320px; margin: 0 auto; }
.bb-public-primary,
.bb-public-secondary,
.bb-public-actions,
.bb-public-nav,
.bb-app-badges {
  display: flex;
  align-items: center;
}
.bb-public-primary { justify-content: space-between; gap: 1.25rem; min-height: 37px; }
.bb-wordmark {
  color: #fff;
  text-decoration: none;
  font: 700 1.36rem/1.1 Georgia, 'Times New Roman', serif;
  letter-spacing: -.025em;
  white-space: nowrap;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}
.bb-public-actions { gap: .9rem; flex-shrink: 0; }
.bb-public-actions a,
.bb-public-nav a,
.bb-public-more summary {
  color: #f5f3ec;
  text-decoration: none;
  font: 600 .82rem/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: .015em;
}
.bb-public-actions a:hover,
.bb-public-nav a:hover,
.bb-more-menu a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.bb-auth-link { padding: .35rem 0; }
.bb-auth-button {
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 2px;
  padding: .47rem .75rem;
  white-space: nowrap;
}
.bb-public-secondary { min-height: 35px; gap: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .15); margin-top: .25rem; padding-top: .35rem; }
.bb-public-nav { gap: 1.15rem; min-width: 0; }
.bb-public-nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--bb-brass); text-underline-offset: 5px; }
.bb-public-more { position: relative; margin-left: auto; }
.bb-public-more details { position: relative; }
.bb-public-more summary { cursor: pointer; list-style: none; padding: .35rem 0; }
.bb-public-more summary::-webkit-details-marker { display: none; }
.bb-public-more summary::after { content: '⌄'; margin-left: .35rem; color: #d6c69f; }
.bb-more-menu { position: absolute; right: 0; top: calc(100% + .4rem); min-width: 150px; padding: .35rem; background: #17232c; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.bb-more-menu a { display: block; color: #f5f3ec; font-size: .82rem; text-decoration: none; padding: .5rem .55rem; }
.bb-app-badges { gap: .55rem; flex-shrink: 0; margin-left: .15rem; }
.bb-app-badges a { display: inline-flex; align-items: center; }
.bb-app-badges img { display: block; width: auto; height: 27px; }
.bb-app-badges a:last-child img { height: 27px; }

/* App pages retain their own operational controls and navigation. */
.bb-app-header {
  padding: .65rem 1.25rem;
  background-position: center 38%;
  color: #fff;
}
.bb-app-header .brand-text,
.bb-app-header .bb-app-brand {
  color: #fff !important;
  font-size: 1.25rem !important;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  letter-spacing: -.02em;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .55);
  text-decoration: none;
}
.bb-app-header .btn-appstore,
.bb-app-header .btn-playstore {
  display: inline-flex !important;
  align-items: center;
  flex: 0 0 auto;
}
.bb-app-header .btn-appstore img,
.bb-app-header .btn-playstore img { display: block; height: 27px; width: auto; }
.bb-app-header .dashboard-indicators { min-width: 0; }
.bb-app-header .nav-links a { text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.preview-category-navigation { background: #25343e; color: #fff; border-bottom: 1px solid rgba(255,255,255,.15); }
.preview-category-navigation .nav-links { padding-top: .45rem; padding-bottom: .45rem; }

/* Landing page uses a stronger image wash and a clear edge above the SITREPs. */
body.bb-landing .bb-public-header {
  background-image: linear-gradient(rgba(13, 22, 29, .86), rgba(13, 22, 29, .9)), url('/static/images/Mazar-e-Sharif_web.jpg');
  background-position: center 57%;
  box-shadow: 0 5px 18px rgba(0,0,0,.34);
}

@media (max-width: 820px) {
  .bb-public-header { padding: .6rem .85rem .65rem; }
  .bb-public-primary { gap: .65rem; }
  .bb-wordmark { font-size: 1.22rem; }
  .bb-public-actions { gap: .55rem; }
  .bb-public-actions a { font-size: .76rem; }
  .bb-public-secondary { gap: .75rem; flex-wrap: wrap; }
  .bb-public-nav { gap: .85rem; }
  .bb-app-badges { gap: .35rem; }
  .bb-app-badges img,
  .bb-app-badges a:last-child img { height: 24px; }
}

@media (max-width: 520px) {
  .bb-public-header { padding: .55rem .7rem .6rem; }
  .bb-public-primary { min-height: 34px; }
  .bb-wordmark { font-size: 1.12rem; }
  .bb-public-actions { gap: .45rem; }
  .bb-public-actions a { font-size: .72rem; }
  .bb-auth-button { padding: .38rem .5rem; }
  .bb-public-secondary { display: grid; grid-template-columns: 1fr auto; gap: .35rem .55rem; }
  .bb-public-nav { grid-column: 1 / -1; grid-row: 1; display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
  .bb-public-nav a { font-size: .76rem; }
  .bb-public-more { grid-column: 1; grid-row: 2; margin-left: 0; }
  .bb-app-badges { grid-column: 2; grid-row: 2; justify-self: end; margin: 0; }
  .bb-app-badges img,
  .bb-app-badges a:last-child img { height: 22px; }
  .bb-app-header { padding: .55rem .7rem; }
  .bb-app-header .btn-appstore,
  .bb-app-header .btn-playstore { padding: 0 .15rem !important; }
  .bb-app-header .btn-appstore img,
  .bb-app-header .btn-playstore img { height: 23px; }
  .bb-app-header .brand-text,
  .bb-app-header .bb-app-brand { font-size: 1.05rem !important; }
}

@media (max-width: 768px) {
  .bb-app-header { position: fixed; top: 0; left: 0; right: 0; width: 100%; }
  body:has(.bb-app-header) { padding-top: 180px !important; }
}

@media (max-width: 360px) {
  .bb-public-primary { align-items: flex-start; flex-direction: column; }
  .bb-public-actions { align-self: stretch; justify-content: space-between; }
  .bb-public-secondary { grid-template-columns: 1fr; }
  .bb-public-nav { grid-column: 1; grid-row: 1; }
  .bb-public-more { grid-column: 1; grid-row: 2; }
  .bb-app-badges { grid-column: 1; grid-row: 3; justify-self: start; }
}
