/* Operation Bone Idle — Junior Agent commendation report
   Self-contained skin (same pattern as Junior Depth handbook). */

.bi-body *, .bi-body *::before, .bi-body *::after { box-sizing: border-box; }
.bi-body h1, .bi-body h2, .bi-body h3, .bi-body p, .bi-body figure { margin-top: 0; }

.bi-body {
  --bi-deep: #0a1a2b;
  --bi-paper: #f5ead6;
  --bi-ink: #1d2b3a;
  --bi-brass: #f0b429;
  --bi-teal: #2dd4bf;
  --bi-signal: #e8443a;
  --bi-purple: #c084fc;
  --bi-cream: #fff3dc;
  --bi-mono: "Share Tech Mono", ui-monospace, Consolas, monospace;
  --bi-sans: "Barlow Condensed", system-ui, "Arial Narrow", sans-serif;
  margin: 0;
  min-height: 100dvh;
  color: var(--bi-cream);
  background: var(--bi-deep);
  font-family: var(--bi-sans);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
.bi-body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 100% 50% at 80% 0%, rgba(192,132,252,0.12), transparent 55%),
    radial-gradient(ellipse 90% 45% at 20% 10%, rgba(45,212,191,0.12), transparent 55%),
    linear-gradient(180deg, #0e2337 0%, #0a1a2b 50%, #061220 100%);
}

.bi-skip {
  position: absolute; left: -999px; top: 0;
  background: var(--bi-brass); color: #111; padding: 0.5rem 1rem; z-index: 999;
}
.bi-skip:focus { left: 0.5rem; top: 0.5rem; }

.bi-top {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.55rem 0.85rem;
  background: rgba(6, 18, 32, 0.94);
  border-bottom: 1px solid rgba(240,180,41,0.28);
  backdrop-filter: blur(10px);
}
.bi-brand {
  display: flex; align-items: center; gap: 0.65rem;
  text-decoration: none; color: inherit;
}
.bi-brand img { display: block; border-radius: 4px; }
.bi-brand strong {
  display: block; font-family: var(--bi-mono);
  letter-spacing: 0.12em; font-size: 0.78rem; color: #fff;
}
.bi-brand em {
  display: block; font-style: normal; font-family: var(--bi-mono);
  font-size: 0.62rem; letter-spacing: 0.1em; color: var(--bi-brass);
}

.bi-rail {
  position: sticky; top: 56px; z-index: 90;
  background: rgba(6, 18, 32, 0.92);
  border-bottom: 1px solid rgba(45,212,191,0.22);
  backdrop-filter: blur(10px);
}
.bi-rail-inner {
  display: flex; gap: 0.35rem; overflow-x: auto;
  padding: 0.45rem 0.75rem; scrollbar-width: none;
  max-width: 920px; margin: 0 auto;
}
.bi-rail-inner::-webkit-scrollbar { display: none; }
.bi-rail a {
  flex: 0 0 auto; text-decoration: none;
  font-family: var(--bi-mono); font-size: 0.65rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #9fb3c8; border: 1px solid rgba(45,212,191,0.25);
  border-radius: 999px; padding: 0.45rem 0.75rem; min-height: 40px;
  display: inline-flex; align-items: center;
}
.bi-rail a:hover, .bi-rail a.is-current {
  color: var(--bi-teal); border-color: var(--bi-teal);
}

.bi-wrap { max-width: 920px; margin: 0 auto; padding: 1rem; }
.bi-section { padding: 1.25rem 0 0.5rem; }
.bi-label {
  font-family: var(--bi-mono); font-size: 0.7rem;
  letter-spacing: 0.14em; color: var(--bi-teal); text-transform: uppercase;
  margin: 0 0 0.35rem;
}
.bi-section h2 {
  font-size: clamp(1.45rem, 5vw, 2rem); color: #fff;
  margin: 0 0 0.75rem; letter-spacing: 0.02em;
}
.bi-lede { font-size: 1.05rem; line-height: 1.5; color: var(--bi-cream); max-width: 40rem; }
.bi-sub {
  font-family: var(--bi-mono); font-size: 0.78rem; color: #9fb3c8; margin: 0 0 0.75rem;
}

.bi-stamps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.85rem; }
.bi-stamp {
  font-family: var(--bi-mono); font-size: 0.58rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700;
  padding: 0.28rem 0.5rem; border: 1.5px solid currentColor;
}
.s-red { color: #fb7185; }
.s-brass { color: var(--bi-brass); }
.s-teal { color: var(--bi-teal); }
.s-purple { color: var(--bi-purple); }

.bi-hero-grid {
  display: grid; gap: 1rem; align-items: center;
}
@media (min-width: 720px) {
  .bi-hero-grid { grid-template-columns: 1.2fr 0.8fr; }
}
.bi-hero-badge {
  justify-self: center; width: min(280px, 70vw);
  filter: drop-shadow(0 12px 28px rgba(240,180,41,0.25));
}
.bi-hero-badge img { width: 100%; height: auto; display: block; }

.bi-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; margin: 1rem 0;
  font-family: var(--bi-mono); font-size: 0.68rem;
}
@media (min-width: 560px) { .bi-meta { grid-template-columns: repeat(4, 1fr); } }
.bi-meta div {
  background: rgba(18,41,63,0.85); border: 1px solid rgba(240,180,41,0.25);
  border-radius: 4px; padding: 0.55rem 0.65rem;
}
.bi-meta b { display: block; color: var(--bi-brass); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.2rem; }
.bi-meta span { color: #9fb3c8; }

.bi-paper {
  background: var(--bi-paper); color: var(--bi-ink);
  border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(240,180,41,0.35);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}
.bi-paper-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  padding: 0.55rem 0.85rem; background: #e8d9bd;
  font-family: var(--bi-mono); font-size: 0.65rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: #5a4630;
}
.bi-paper-body { padding: 1rem 1.1rem 1.15rem; }
.bi-paper-body h3 { margin: 0 0 0.5rem; font-size: 1.25rem; color: var(--bi-ink); }
.bi-paper-body p { margin: 0 0 0.75rem; line-height: 1.5; font-size: 0.98rem; }
.bi-paper-body p:last-child { margin-bottom: 0; }
.bi-callout {
  margin: 0.85rem 0 0; padding: 0.65rem 0.75rem;
  border-left: 4px solid var(--bi-signal);
  background: rgba(232,68,58,0.08);
  font-family: var(--bi-mono); font-size: 0.78rem; color: #7a2e28;
}

.bi-chapter {
  margin: 1rem 0 0; border: 1px solid rgba(45,212,191,0.28);
  border-radius: 8px; overflow: hidden; background: rgba(18,41,63,0.75);
}
.bi-chapter-head {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; align-items: center;
  padding: 0.65rem 0.9rem; background: rgba(0,0,0,0.35);
  font-family: var(--bi-mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--bi-teal);
  border-bottom: 1px solid rgba(45,212,191,0.22);
}
.bi-chapter-body { padding: 0.85rem; }
.bi-chapter-body > p { margin: 0 0 0.85rem; color: #c5d4e4; line-height: 1.5; }

.bi-grid2 { display: grid; gap: 0.65rem; }
@media (min-width: 560px) { .bi-grid2 { grid-template-columns: 1fr 1fr; } }
.bi-grid3 { display: grid; gap: 0.55rem; }
@media (min-width: 560px) { .bi-grid3 { grid-template-columns: repeat(3, 1fr); } }

.bi-fig {
  margin: 0; border: 1px solid rgba(240,180,41,0.3);
  border-radius: 4px; overflow: hidden; background: #000;
}
.bi-fig img { display: block; width: 100%; height: auto; }
.bi-fig.is-narrow {
  max-width: min(420px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.bi-fig.is-narrow img { width: 100%; height: auto; }
.bi-fig figcaption {
  font-family: var(--bi-mono); font-size: 0.62rem; line-height: 1.35;
  color: #fde68a; padding: 0.5rem 0.6rem;
  background: rgba(8,14,22,0.92); border-top: 1px solid rgba(240,180,41,0.25);
}

.bi-ci {
  margin: 1rem 0 0; padding: 0.85rem 1rem;
  border: 1px dashed rgba(192,132,252,0.45);
  border-radius: 8px; background: rgba(88,28,135,0.18);
}
.bi-ci h3 {
  margin: 0 0 0.45rem; font-family: var(--bi-mono);
  font-size: 0.78rem; letter-spacing: 0.1em; color: var(--bi-purple);
  text-transform: uppercase;
}
.bi-ci p { margin: 0 0 0.55rem; color: #e9d5ff; line-height: 1.45; font-size: 0.95rem; }

.bi-award {
  display: grid; gap: 1rem; margin-top: 1rem; align-items: center;
}
@media (min-width: 640px) { .bi-award { grid-template-columns: 0.9fr 1.1fr; } }
.bi-award-badge img {
  width: min(240px, 60vw); height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 10px 24px rgba(240,180,41,0.3));
}

.bi-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.bi-btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.65rem 1rem;
  font-family: var(--bi-mono); font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 700;
  background: var(--bi-brass); color: #111; border-radius: 4px;
}
.bi-btn-ghost {
  background: transparent; color: var(--bi-teal);
  border: 1px solid rgba(45,212,191,0.45);
}
.bi-btn:hover { filter: brightness(1.05); }

.bi-score { display: grid; gap: 0.45rem; margin: 1rem 0; }
.bi-score-row {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--bi-mono); font-size: 0.78rem;
  padding: 0.55rem 0.7rem; border-radius: 4px;
  background: rgba(18,41,63,0.85); border: 1px solid rgba(240,180,41,0.22);
}
.bi-score-row b { color: var(--bi-brass); }
.bi-verdict {
  font-family: var(--bi-mono); font-size: 0.85rem; letter-spacing: 0.06em;
  color: var(--bi-teal); border: 1px solid rgba(45,212,191,0.4);
  display: inline-block; padding: 0.55rem 0.75rem; border-radius: 3px;
  margin: 0.5rem 0 0;
}

/* Qual board — earn Bone Idle patch */
.bi-qual {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-top: 1rem;
}
@media (min-width: 700px) {
  .bi-qual { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bi-qual-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-height: 150px;
  padding: 0.9rem 0.6rem;
  border-radius: 12px;
  border: 2px solid rgba(240,180,41,0.18);
  background: rgba(18, 41, 63, 0.85);
  color: var(--bi-cream);
  font: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.bi-qual-item:active { transform: scale(0.97); }
.bi-qual-item .bi-qual-icon {
  width: 56px; height: 56px; flex: 0 0 auto;
  color: #7c93a8; transition: color 0.25s, transform 0.3s;
}
.bi-qual-item strong {
  display: block; font-size: 1.02rem; line-height: 1.15;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.bi-qual-item small {
  display: block; font-family: var(--bi-mono);
  font-size: 0.58rem; letter-spacing: 0.07em;
  color: #8fa6ba; line-height: 1.4;
}
.bi-qual-tick {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(240,180,41,0.2);
  display: grid; place-items: center;
  color: transparent; font-size: 15px; font-weight: 700; line-height: 1;
  transition: all 0.25s;
}
.bi-qual-item.is-done {
  border-color: var(--bi-teal);
  background: rgba(45, 212, 191, 0.13);
}
.bi-qual-item.is-done .bi-qual-icon { color: var(--bi-teal); transform: scale(1.06); }
.bi-qual-item.is-done .bi-qual-tick {
  background: var(--bi-teal); border-color: var(--bi-teal); color: #04231f;
}
.bi-qual-status {
  font-family: var(--bi-mono); font-size: 0.82rem;
  letter-spacing: 0.08em; color: var(--bi-brass);
  margin: 1rem 0 0; text-align: center;
}
.bi-qual-bar {
  height: 12px; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(240,180,41,0.18);
  overflow: hidden; margin-top: 0.5rem;
}
.bi-qual-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--bi-teal), var(--bi-brass));
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bi-reward {
  margin-top: 1.25rem; display: grid; place-items: center; gap: 0.6rem;
  padding: 1.25rem 1rem; border-radius: 14px;
  border: 2px dashed rgba(240,180,41,0.22);
  background: rgba(6, 18, 32, 0.5); text-align: center;
}
.bi-reward.is-on {
  border-color: var(--bi-brass); border-style: solid;
  background: rgba(240, 180, 41, 0.08);
}
.bi-reward-badge {
  width: min(210px, 56vw);
  opacity: 0.18; filter: grayscale(1);
  transition: opacity 0.5s, filter 0.5s, transform 0.5s;
}
.bi-reward-badge img { width: 100%; height: auto; display: block; }
.bi-reward.is-on .bi-reward-badge { opacity: 1; filter: none; }
@media (prefers-reduced-motion: no-preference) {
  .bi-reward.is-on .bi-reward-badge {
    animation: bi-stamp 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) both;
  }
}
@keyframes bi-stamp {
  0%   { transform: scale(2.1) rotate(-12deg); opacity: 0; }
  60%  { transform: scale(0.94) rotate(3deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0);        opacity: 1; }
}
.bi-reward-line {
  font-family: var(--bi-mono); font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: #7c93a8;
}
.bi-reward.is-on .bi-reward-line { color: var(--bi-brass); }

/* Best Friend of Bob interactive */
.bi-bob {
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .bi-bob { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}
.bi-bob-note {
  background: var(--bi-paper);
  color: var(--bi-ink);
  border-radius: 8px;
  border: 1px solid rgba(240,180,41,0.35);
  overflow: hidden;
}
.bi-bob-note-head {
  padding: 0.55rem 0.85rem;
  background: #e8d9bd;
  font-family: var(--bi-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a4630;
}
.bi-bob-note-body { padding: 1rem 1.1rem 1.15rem; }
.bi-bob-note-body h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.bi-bob-note-body p { margin: 0 0 0.7rem; line-height: 1.5; font-size: 0.98rem; }
.bi-bob-note-body p:last-child { margin-bottom: 0; }
.bi-bob-quote {
  margin: 0.75rem 0;
  padding: 0.65rem 0.75rem;
  border-left: 4px solid var(--bi-teal);
  background: rgba(45,212,191,0.12);
  font-family: var(--bi-mono);
  font-size: 0.85rem;
  color: #0f5c56;
}
.bi-bob-panel {
  border: 2px dashed rgba(45,212,191,0.35);
  border-radius: 14px;
  background: rgba(6,18,32,0.55);
  padding: 1rem;
  text-align: center;
}
.bi-bob-panel.is-on {
  border-style: solid;
  border-color: var(--bi-brass);
  background: rgba(240,180,41,0.08);
}
.bi-bob-panel img {
  width: min(260px, 70vw);
  height: auto;
  display: block;
  margin: 0.75rem auto 0;
  opacity: 0.2;
  filter: grayscale(1);
  transition: opacity 0.45s, filter 0.45s, transform 0.45s;
}
.bi-bob-panel.is-on img {
  opacity: 1;
  filter: none;
}
@media (prefers-reduced-motion: no-preference) {
  .bi-bob-panel.is-on img {
    animation: bi-stamp 0.55s cubic-bezier(0.2, 1.3, 0.4, 1) both;
  }
}
.bi-bob-status {
  font-family: var(--bi-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #8fa6ba;
  margin: 0.65rem 0 0;
}
.bi-bob-panel.is-on .bi-bob-status { color: var(--bi-brass); }

.bi-footer {
  margin-top: 2rem; padding: 1.5rem 1rem 2.5rem;
  border-top: 1px solid rgba(240,180,41,0.22);
  font-size: 0.85rem; color: #9fb3c8; line-height: 1.5;
}
.bi-footer a { color: var(--bi-teal); }

@supports (padding: max(0px)) {
  .bi-wrap, .bi-top, .bi-rail-inner {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}
