/* CHS content briefs overlay. Works with briefs.js and briefs-data.js. */
:root {
  --bf: #2f5d50;
  --bf-soft: #e3ece7;
}

.bf-toggle, .bf-pagebtn {
  font: inherit;
  font-size: 12px;
  margin-left: 12px;
  padding: 3px 10px;
  border: 1px solid #f3efe6;
  background: transparent;
  color: #f3efe6;
  cursor: pointer;
  border-radius: 999px;
}
.bf-toggle[aria-pressed="true"] { background: var(--bf); border-color: var(--bf); }
.bf-state { font-weight: 600; }
.bf-pagebtn { display: none; margin-left: 6px; }
.bf-on .bf-pagebtn { display: inline-block; }

/* Areas and tags */
.bf-tag { display: none; }
.bf-on .bf-area { position: relative; outline: 1px dashed var(--bf); outline-offset: 4px; padding-top: 34px; }
.bf-on .card.bf-area { padding-top: 40px; }
.bf-on .bf-area.bf-active { outline: 2px solid var(--bf); }
.bf-on .bf-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: 2px;
  left: 0;
  z-index: 5;
  font: 400 11px/22px "Public Sans", sans-serif;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  border: 0;
  padding: 0 8px 0 0;
  background: var(--bf-soft);
  color: var(--bf);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  max-width: 100%;
}
.bf-on .bf-tag:hover, .bf-on .bf-tag:focus-visible { background: var(--bf); color: #fff; }
.bf-num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bf);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.bf-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Panel */
.bf-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(0,0,0,.08);
  z-index: 50;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.bf-panel[hidden] { display: none; }
@media (min-width: 1200px) { .bf-panel-open main { margin-right: 440px; margin-left: 24px; } }

.bf-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 0 16px; border-bottom: 1px solid var(--line); }
.bf-tab { font: inherit; font-size: 13px; background: none; border: 0; padding: 10px 4px 12px; margin-right: 16px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.bf-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--bf); font-weight: 600; }
.bf-tab:disabled { opacity: .4; cursor: default; }
.bf-close { font-size: 22px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px 8px; }
.bf-body { overflow-y: auto; padding: 18px 20px 40px; }

.bf-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.bf-head .bf-num { width: 26px; height: 26px; font-size: 13px; margin-top: 2px; }
.bf-head h3 { font-size: 22px; margin: 0; }
.bf-shared { font-size: 12px; color: var(--bf); margin-top: 4px; }
.bf-shows { font-size: 13px; background: var(--bf-soft); padding: 8px 10px; margin: 8px 0; }
.bf-purpose { margin: 10px 0 14px; }

.bf-facts { display: grid; gap: 8px; margin: 0 0 16px; padding: 12px; background: var(--paper); }
.bf-facts > div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.bf-facts dt { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.bf-facts dd { font-weight: 600; }

.bf-body h4 { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; font-family: inherit; }
.bf-fields { width: 100%; border-collapse: collapse; }
.bf-fields th, .bf-fields td { text-align: left; vertical-align: top; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.bf-fields th { width: 38%; font-weight: 600; padding-right: 10px; }
.bf-fields td b { font-weight: 600; }
.bf-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.bf-req { color: var(--accent); }

.bf-dd { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bf-dd ul { padding-left: 16px; font-size: 13px; }
.bf-dd li { margin: 3px 0; }
.bf-sample { border-left: 3px solid var(--bf); padding: 4px 0 4px 12px; font-family: Fraunces, Georgia, serif; }
.bf-sample p { margin: 6px 0; }
.bf-sample .bf-sub { font-family: "Public Sans", sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }

/* Whole-page view */
.bf-pagehead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.bf-print { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; white-space: nowrap; }
.bf-index { list-style: none; }
.bf-index a { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; }
.bf-index a:hover b { text-decoration: underline; }
.bf-pill { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--bf); border: 1px solid var(--bf); padding: 0 5px; border-radius: 999px; margin-left: 4px; }
.bf-all { display: none; }

@media print {
  body.bf-panel-open > *:not(.bf-panel) { display: none !important; }
  body.bf-panel-open .bf-panel { position: static; width: auto; box-shadow: none; border: 0; }
  .bf-bar, .bf-print, .bf-index { display: none !important; }
  .bf-panel[data-mode="page"] .bf-all { display: block; }
  .bf-one { -webkit-print-color-adjust: exact; print-color-adjust: exact; border-top: 1px solid #999; padding-top: 14px; margin-top: 18px; }
  .bf-body { overflow: visible; }
  .bf-head, .bf-fields tr, .bf-dd, .bf-sample { break-inside: avoid; }
}

/* Tags placed inside label rows (.meta) must not pick up the label-chip style */
.bf-tag .bf-hint, .bf-tag .bf-num { border: 0; text-transform: none; letter-spacing: normal; font-size: 11px; }
.bf-tag .bf-hint { padding: 0; color: inherit; }
.bf-tag .bf-num { padding: 0; color: #fff; }
