/* ============================================================================
   OPERATION JUNIOR DEPTH — Junior Agent Field Handbook skin
   jamesha.agency · OP-JRDEPTH-26 · SF AO

   Self-contained page skin, same pattern as recruitment.css (Bunker) and
   store.css (Commissary): its own body class, own background field, own
   header, own type scale. It does NOT extend field-mission-base.css — the
   generic .fm-* mission chrome is the dark classified look, and this page is
   deliberately the opposite: a bright cadet handbook the family can enjoy.

   Audience note: Junior Agents are children on phones and tablets. Every
   control here is >=56px tall, text steps up rather than down, and nothing
   depends on hover.

   Palette
     deep      #0a1a2b   sea below the boat
     paper     #f5ead6   handbook stock
     brass     #f0b429   badges, rivets, rank
     teal      #2dd4bf   junior agents, interactive affordances
     signal    #e8443a   stamps, alerts
     sepia     #c8a165   Chronovisor / temporal block only
   ========================================================================== */

/* Local reset.
   This page deliberately does not load styles.css, which is where the rest of
   the site gets `* { box-sizing: border-box }`. Without it, `width: 100%` plus
   padding and a border overflows its container — the cadet-name input pushed
   the document 14px wider than a 375px phone and gave the whole page a
   horizontal scroll. Any self-contained skin needs to bring its own reset. */
.jd-body *,
.jd-body *::before,
.jd-body *::after { box-sizing: border-box; }

.jd-body h1, .jd-body h2, .jd-body h3, .jd-body p, .jd-body figure { margin-top: 0; }

.jd-body {
  --jd-deep:      #0a1a2b;
  --jd-deeper:    #061220;
  --jd-hull:      #12293f;
  --jd-hull-2:    #1a3550;
  --jd-paper:     #f5ead6;
  --jd-paper-2:   #e8d9bd;
  --jd-ink:       #1d2b3a;
  --jd-ink-soft:  #4a5f75;
  --jd-brass:     #f0b429;
  --jd-brass-dk:  #a9760a;
  --jd-teal:      #2dd4bf;
  --jd-teal-dk:   #0f766e;
  --jd-signal:    #e8443a;
  --jd-sepia:     #c8a165;
  --jd-cream:     #fff3dc;

  --jd-line:      rgba(240, 180, 41, 0.28);
  --jd-line-soft: rgba(240, 180, 41, 0.14);

  --jd-mono: "Share Tech Mono", ui-monospace, Consolas, monospace;
  --jd-sans: "Barlow Condensed", system-ui, "Arial Narrow", sans-serif;

  margin: 0;
  min-height: 100dvh;
  color: var(--jd-cream);
  background: var(--jd-deep);
  font-family: var(--jd-sans);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* Fixed depth field. Fixed layer rather than background-attachment: fixed —
   the latter repaints the whole page every scroll frame. */
.jd-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 55% at 50% -10%, rgba(45, 212, 191, 0.14), transparent 60%),
    radial-gradient(ellipse 80% 40% at 15% 30%, rgba(240, 180, 41, 0.07), transparent 60%),
    linear-gradient(180deg, #0e2337 0%, #0a1a2b 45%, #061220 100%);
}

/* Sonar rings, very faint */
.jd-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    repeating-radial-gradient(circle at 50% 22%,
      transparent 0 58px,
      rgba(45, 212, 191, 0.35) 58px 59px);
}

@media (prefers-reduced-motion: no-preference) {
  .jd-body::after { animation: jd-sonar 14s ease-in-out infinite; }
}
@keyframes jd-sonar {
  0%, 100% { opacity: 0.10; }
  50%      { opacity: 0.20; }
}

/* ============================================================ skip + header */

.jd-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--jd-brass);
  color: #201200;
  font-family: var(--jd-mono);
  padding: 0.8rem 1.1rem;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.jd-skip:focus { left: 0; }

.jd-top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  padding-top: max(0.55rem, env(safe-area-inset-top, 0px));
  background: rgba(6, 18, 32, 0.94);
  border-bottom: 2px solid var(--jd-brass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.jd-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  min-height: 48px;
  flex: 1 1 auto;
  min-width: 0;
}
.jd-brand img { flex: 0 0 auto; border-radius: 6px; }
.jd-brand strong {
  display: block;
  font-size: 1.02rem;
  letter-spacing: 0.16em;
  color: var(--jd-cream);
  line-height: 1.1;
}
.jd-brand em {
  display: block;
  font-family: var(--jd-mono);
  font-style: normal;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--jd-brass);
  margin-top: 0.15rem;
}

/* ================================================================ chapter rail */

.jd-rail {
  position: sticky;
  top: var(--jd-head, 58px);
  z-index: 55;
  background: rgba(10, 26, 43, 0.96);
  border-bottom: 1px solid var(--jd-line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.jd-rail-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.45rem 0.75rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.jd-rail-inner::-webkit-scrollbar { display: none; }
.jd-rail a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--jd-line-soft);
  color: #cfe0ee;
  text-decoration: none !important;
  font-family: var(--jd-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.jd-rail a:hover { border-color: var(--jd-brass); color: var(--jd-brass); }
.jd-rail a.is-current {
  background: var(--jd-brass);
  border-color: var(--jd-brass);
  color: #201200;
  font-weight: 700;
}

/* ======================================================================= shell */

.jd-wrap { max-width: 980px; margin: 0 auto; padding: 0 0.9rem; }
@supports (padding: max(0px)) {
  .jd-wrap {
    padding-left: max(0.9rem, env(safe-area-inset-left));
    padding-right: max(0.9rem, env(safe-area-inset-right));
  }
}
.jd-section { padding: 1.75rem 0; scroll-margin-top: calc(var(--jd-head, 58px) + 62px); }

.jd-label {
  font-family: var(--jd-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jd-brass);
  margin: 0 0 0.35rem;
}
.jd-section h2 {
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  line-height: 1.02;
  margin: 0 0 0.7rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.jd-section p { line-height: 1.7; font-size: 1.02rem; }

.jd-stamp {
  display: inline-block;
  font-family: var(--jd-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.32rem 0.55rem;
  border: 2px solid currentColor;
  border-radius: 4px;
  font-weight: 700;
}
.s-red   { color: var(--jd-signal); }
.s-brass { color: var(--jd-brass); }
.s-teal  { color: var(--jd-teal); }
.s-paper { color: #d8e6f2; }

/* ======================================================================== hero */

.jd-hero { padding: 1.5rem 0 0.5rem; }
.jd-hero-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.85rem; }
.jd-kicker {
  font-family: var(--jd-mono);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  color: var(--jd-teal);
  text-transform: uppercase;
  margin: 0;
}
.jd-hero h1 {
  font-size: clamp(2.3rem, 12vw, 4.4rem);
  line-height: 0.9;
  margin: 0.35rem 0 0.5rem;
  color: #fff;
  text-transform: uppercase;
}
.jd-hero h1 span {
  display: block;
  color: var(--jd-brass);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.jd-sub {
  font-family: var(--jd-mono);
  font-size: 0.76rem;
  color: #9fb6c9;
  margin: 0 0 0.85rem;
  letter-spacing: 0.04em;
}
/* The kicker is wide-tracked mono; on a narrow phone that tracking pushes it
   to three lines and it starts competing with the headline. */
@media (max-width: 480px) {
  .jd-kicker { font-size: 0.58rem; letter-spacing: 0.08em; line-height: 1.5; }
  .jd-sub { font-size: 0.7rem; }
}

/* Short landscape phones: the sticky header + rail eat most of the viewport,
   so give the content back some room. */
@media (max-height: 500px) and (orientation: landscape) {
  .jd-top { position: static; }
  .jd-rail { top: 0; }
  .jd-hero { padding-top: 0.75rem; }
  .jd-hero h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .jd-section { padding: 1.1rem 0; }
}

.jd-lede { font-size: 1.06rem; line-height: 1.65; max-width: 44rem; }
.jd-lede strong { color: var(--jd-brass); }
.jd-lede em { color: var(--jd-teal); font-style: normal; font-weight: 600; }

/* Hero layout: copy beside the badge on wide screens */
.jd-hero-grid { display: grid; gap: 1.25rem; align-items: center; }
@media (min-width: 800px) {
  .jd-hero-grid { grid-template-columns: minmax(0, 1fr) 260px; }
}
.jd-hero-badge { justify-self: center; width: min(240px, 62vw); }
.jd-hero-badge svg, .jd-hero-badge img { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 26px rgba(0,0,0,0.55)); }

/* ================================================================= paper card */

.jd-paper {
  background:
    linear-gradient(180deg, var(--jd-paper) 0%, var(--jd-paper-2) 100%);
  color: var(--jd-ink);
  border-radius: 10px;
  padding: 1.1rem 1.1rem 1.2rem;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  border-left: 6px solid var(--jd-brass);
  position: relative;
}
.jd-paper h3 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  color: #12202e;
}
.jd-paper p { color: #2c3e52; line-height: 1.7; margin: 0 0 0.7rem; font-size: 1rem; }
.jd-paper p:last-child { margin-bottom: 0; }
.jd-paper strong { color: #12202e; }
.jd-paper-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: var(--jd-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7c6742;
  border-bottom: 1px dashed #bda87e;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

/* =============================================================== stat tiles */

.jd-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1.1rem 0;
}
@media (min-width: 620px) { .jd-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.jd-meta div {
  background: var(--jd-hull);
  border: 1px solid var(--jd-line-soft);
  border-top: 3px solid var(--jd-brass);
  border-radius: 8px;
  padding: 0.7rem 0.6rem;
  text-align: center;
}
.jd-meta b {
  display: block;
  font-family: var(--jd-mono);
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--jd-brass);
  margin-bottom: 0.25rem;
}
.jd-meta span { font-size: 0.95rem; color: var(--jd-cream); line-height: 1.25; display: block; }

/* ==================================================================== buttons */

.jd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 56px;
  padding: 0.75rem 1.3rem;
  border-radius: 10px;
  border: 2px solid var(--jd-brass);
  background: var(--jd-brass);
  color: #201200;
  font-family: var(--jd-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.12s, filter 0.18s, background 0.18s, color 0.18s;
}
.jd-btn:hover { filter: brightness(1.08); }
.jd-btn:active { transform: translateY(2px); }
.jd-btn-ghost {
  background: transparent;
  color: var(--jd-brass);
}
.jd-btn-ghost:hover { background: rgba(240, 180, 41, 0.14); }
.jd-btn-teal { background: var(--jd-teal); border-color: var(--jd-teal); color: #04231f; }
.jd-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.jd-actions .jd-btn { flex: 1 1 auto; min-width: 0; }
@media (min-width: 560px) { .jd-actions .jd-btn { flex: 0 0 auto; } }

/* =================================================================== chapters */

.jd-chapter {
  margin-top: 1.1rem;
  border: 1px solid var(--jd-line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(18, 41, 63, 0.72);
}
.jd-chapter-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.95rem;
  background: rgba(6, 18, 32, 0.75);
  border-bottom: 1px solid var(--jd-line-soft);
  font-family: var(--jd-mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #9fb6c9;
}
.jd-chapter-head .tag {
  color: var(--jd-teal);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 0.22rem 0.45rem;
}
.jd-chapter-body { padding: 0.95rem; }
.jd-chapter-body > p:first-child { margin-top: 0; }

/* photo grids */
.jd-figs {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin-top: 0.9rem;
}
@media (min-width: 640px) {
  .jd-figs { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
.jd-fig {
  margin: 0;
  border: 1px solid var(--jd-line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: #05101c;
}
.jd-fig img { width: 100%; height: auto; display: block; aspect-ratio: 3 / 4; object-fit: cover; }
.jd-fig figcaption {
  font-family: var(--jd-mono);
  font-size: 0.6rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: #9fb6c9;
  padding: 0.5rem 0.6rem 0.6rem;
  background: rgba(6, 18, 32, 0.7);
}

/* ============================================ CHRONOGRAPH / temporal block */

.jd-chrono-wrap {
  border: 2px solid var(--jd-sepia);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(200, 161, 101, 0.13), rgba(200, 161, 101, 0.04));
  margin-top: 1.1rem;
}
.jd-chrono-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 0.95rem;
  background: rgba(42, 24, 6, 0.72);
  border-bottom: 1px solid rgba(200, 161, 101, 0.4);
  font-family: var(--jd-mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--jd-sepia);
}
.jd-chrono-body { padding: 0.95rem; }

/* The toggle is the whole point of the block: it lets a reader see that the
   "old" pictures are the same afternoon, recorded differently. */
.jd-chrono-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem;
  margin: 0.2rem 0 1rem;
  border: 1px dashed var(--jd-sepia);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.jd-chrono-switch p {
  margin: 0;
  flex: 1 1 220px;
  font-family: var(--jd-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--jd-sepia);
}
.jd-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 56px;
  padding: 0.5rem 0.9rem 0.5rem 0.6rem;
  border-radius: 999px;
  border: 2px solid var(--jd-sepia);
  background: rgba(42, 24, 6, 0.6);
  color: var(--jd-sepia);
  font-family: var(--jd-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 700;
}
.jd-switch-track {
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #2a1806;
  border: 1px solid var(--jd-sepia);
  position: relative;
  flex: 0 0 auto;
}
.jd-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--jd-sepia);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.22s;
}
.jd-switch[aria-pressed="true"] { border-color: var(--jd-teal); color: var(--jd-teal); }
.jd-switch[aria-pressed="true"] .jd-switch-track { border-color: var(--jd-teal); background: #05261f; }
.jd-switch[aria-pressed="true"] .jd-switch-knob { transform: translateX(24px); background: var(--jd-teal); }

/* Chrono figures: the temporal artefacts sit ON TOP of the photo so they
   apply to whichever variant is currently loaded. */
.jd-chrono-fig { position: relative; }
.jd-chrono-fig::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s;
  background:
    repeating-linear-gradient(0deg,
      transparent 0 3px,
      rgba(0, 0, 0, 0.13) 3px 4px);
  mix-blend-mode: multiply;
}
.jd-chrono-wrap.is-live .jd-chrono-fig::after { opacity: 0; }
.jd-chrono-fig figcaption { color: var(--jd-sepia); }
.jd-chrono-wrap.is-live .jd-chrono-fig figcaption { color: var(--jd-teal); }

.jd-chrono-note {
  font-family: var(--jd-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--jd-sepia);
  border-left: 3px solid var(--jd-sepia);
  background: rgba(200, 161, 101, 0.08);
  padding: 0.65rem 0.8rem;
  margin: 1rem 0 0;
  border-radius: 0 6px 6px 0;
}

/* ================================================================ qual board */

.jd-qual {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-top: 1rem;
}
@media (min-width: 700px) { .jd-qual { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.jd-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 var(--jd-line-soft);
  background: rgba(18, 41, 63, 0.8);
  color: var(--jd-cream);
  font: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.12s;
}
.jd-qual-item:active { transform: scale(0.97); }
.jd-qual-item .jd-qual-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  color: #7c93a8;
  transition: color 0.25s, transform 0.3s;
}
.jd-qual-item strong {
  display: block;
  font-size: 1.02rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.jd-qual-item small {
  display: block;
  font-family: var(--jd-mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  color: #8fa6ba;
  line-height: 1.4;
}
.jd-qual-tick {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--jd-line-soft);
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.25s;
}
.jd-qual-item.is-done {
  border-color: var(--jd-teal);
  background: rgba(45, 212, 191, 0.13);
}
.jd-qual-item.is-done .jd-qual-icon { color: var(--jd-teal); transform: scale(1.06); }
.jd-qual-item.is-done .jd-qual-tick {
  background: var(--jd-teal);
  border-color: var(--jd-teal);
  color: #04231f;
}

.jd-qual-status {
  font-family: var(--jd-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--jd-brass);
  margin: 1rem 0 0;
  text-align: center;
}
.jd-qual-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--jd-line-soft);
  overflow: hidden;
  margin-top: 0.5rem;
}
.jd-qual-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--jd-teal), var(--jd-brass));
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Reward badge stamps in when all six stations clear */
.jd-reward {
  margin-top: 1.25rem;
  display: grid;
  place-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1rem;
  border-radius: 14px;
  border: 2px dashed var(--jd-line-soft);
  background: rgba(6, 18, 32, 0.5);
  text-align: center;
}
.jd-reward.is-on { border-color: var(--jd-brass); border-style: solid; background: rgba(240, 180, 41, 0.08); }
.jd-reward-badge { width: min(210px, 56vw); opacity: 0.18; filter: grayscale(1); transition: opacity 0.5s, filter 0.5s, transform 0.5s; }
.jd-reward-badge svg, .jd-reward-badge img { width: 100%; height: auto; display: block; }
.jd-reward.is-on .jd-reward-badge { opacity: 1; filter: none; }
@media (prefers-reduced-motion: no-preference) {
  .jd-reward.is-on .jd-reward-badge { animation: jd-stamp 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
}
@keyframes jd-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; }
}
.jd-reward-line {
  font-family: var(--jd-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7c93a8;
}
.jd-reward.is-on .jd-reward-line { color: var(--jd-brass); }

/* ============================================================== cadet ID card */

.jd-id {
  margin-top: 1.1rem;
  display: grid;
  gap: 1rem;
}
@media (min-width: 760px) { .jd-id { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

.jd-id-form {
  border: 1px solid var(--jd-line);
  border-radius: 12px;
  background: rgba(18, 41, 63, 0.75);
  padding: 1rem;
}
.jd-id-form label {
  display: block;
  font-family: var(--jd-mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--jd-brass);
  margin: 0 0 0.35rem;
}
.jd-id-form input[type="text"] {
  width: 100%;
  min-height: 56px;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 2px solid var(--jd-line-soft);
  background: #071726;
  color: var(--jd-cream);
  font-family: var(--jd-sans);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}
.jd-id-form input:focus-visible { outline: 3px solid var(--jd-teal); outline-offset: 2px; }
.jd-id-fieldset { border: 0; padding: 0; margin: 1rem 0 0; }
.jd-id-fieldset legend {
  font-family: var(--jd-mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--jd-brass);
  padding: 0;
  margin-bottom: 0.45rem;
}
.jd-spec-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.45rem; }
.jd-spec {
  min-height: 56px;
  border-radius: 10px;
  border: 2px solid var(--jd-line-soft);
  background: rgba(6, 18, 32, 0.6);
  color: var(--jd-cream);
  font-family: var(--jd-sans);
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.18s;
}
.jd-spec[aria-pressed="true"] { border-color: var(--jd-teal); background: rgba(45, 212, 191, 0.16); color: var(--jd-teal); font-weight: 700; }

/* the card itself */
.jd-id-card {
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--jd-brass);
  background: linear-gradient(150deg, #12293f 0%, #0a1a2b 60%, #061220 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}
.jd-id-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--jd-brass);
  color: #201200;
  font-family: var(--jd-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.jd-id-main { display: flex; gap: 0.85rem; padding: 0.95rem; align-items: center; }
.jd-id-photo {
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 2px solid var(--jd-line);
  background: #071726;
  display: grid;
  place-items: center;
  color: var(--jd-teal);
}
.jd-id-photo svg { width: 56px; height: 56px; }
.jd-id-fields { min-width: 0; flex: 1 1 auto; }
.jd-id-name {
  font-size: 1.5rem;
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 0.15rem;
  word-break: break-word;
}
.jd-id-code {
  font-family: var(--jd-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--jd-teal);
  margin: 0 0 0.3rem;
}
.jd-id-row {
  font-family: var(--jd-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: #9fb6c9;
  line-height: 1.6;
}
.jd-id-row b { color: var(--jd-brass); }
.jd-id-foot {
  padding: 0.5rem 0.75rem 0.7rem;
  border-top: 1px dashed var(--jd-line-soft);
  font-family: var(--jd-mono);
  font-size: 0.56rem;
  letter-spacing: 0.09em;
  color: #7c93a8;
  text-transform: uppercase;
}

/* =================================================================== evidence */

.jd-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0.9rem; }
.jd-filter {
  min-height: 48px;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 2px solid var(--jd-line-soft);
  background: transparent;
  color: #cfe0ee;
  font-family: var(--jd-mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.18s;
}
.jd-filter:hover { border-color: var(--jd-brass); color: var(--jd-brass); }
.jd-filter.is-on { background: var(--jd-brass); border-color: var(--jd-brass); color: #201200; }

.jd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}
@media (min-width: 640px) { .jd-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); } }
.jd-cell {
  position: relative;
  padding: 0;
  border: 2px solid var(--jd-line-soft);
  border-radius: 10px;
  overflow: hidden;
  background: #05101c;
  cursor: pointer;
  aspect-ratio: 3 / 4;
  transition: border-color 0.18s, transform 0.18s;
}
.jd-cell:hover, .jd-cell:focus-visible { border-color: var(--jd-brass); transform: translateY(-3px); }
.jd-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jd-cell[hidden] { display: none; }
.jd-cell-tag {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  font-family: var(--jd-mono);
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  color: var(--jd-cream);
  background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
  padding: 1rem 0.4rem 0.35rem;
  text-align: left;
  line-height: 1.2;
}
.jd-grid-count {
  font-family: var(--jd-mono);
  font-size: 0.66rem;
  color: #8fa6ba;
  margin: 0.8rem 0 0;
}

/* ==================================================================== tape */

.jd-tape { border: 2px solid var(--jd-line); border-radius: 12px; overflow: hidden; background: #05101c; }
.jd-tape video { width: 100%; height: auto; display: block; background: #000; }
.jd-tape-cap {
  font-family: var(--jd-mono);
  font-size: 0.64rem;
  line-height: 1.6;
  color: #9fb6c9;
  padding: 0.7rem 0.85rem;
  background: rgba(6, 18, 32, 0.75);
  margin: 0;
}

/* ================================================================= findings */

.jd-score { display: grid; gap: 0.5rem; margin-top: 1rem; }
.jd-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--jd-line-soft);
  background: rgba(18, 41, 63, 0.7);
  font-size: 1rem;
}
.jd-score-row b {
  font-family: var(--jd-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--jd-teal);
}
.jd-verdict {
  margin-top: 1.1rem;
  padding: 1rem;
  border-radius: 12px;
  border: 2px solid var(--jd-brass);
  background: linear-gradient(135deg, rgba(240,180,41,0.14), rgba(45,212,191,0.08));
  text-align: center;
  font-size: clamp(1.1rem, 5vw, 1.6rem);
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}

/* =================================================================== lightbox */

.jd-lb {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(4, 10, 18, 0.96);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.jd-lb[hidden] { display: none; }
.jd-lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  padding-top: max(0.6rem, env(safe-area-inset-top));
  border-bottom: 1px solid var(--jd-line-soft);
  font-family: var(--jd-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jd-brass);
}
.jd-lb-x {
  min-width: 56px;
  min-height: 48px;
  border-radius: 8px;
  border: 2px solid var(--jd-line);
  background: transparent;
  color: var(--jd-cream);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.jd-lb-x:hover { border-color: var(--jd-signal); color: var(--jd-signal); }
.jd-lb-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
  padding: 0.6rem;
  position: relative;
}
.jd-lb-stage img {
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}
.jd-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 78px;
  border-radius: 10px;
  border: 2px solid var(--jd-line);
  background: rgba(6, 18, 32, 0.8);
  color: var(--jd-brass);
  font-size: 1.6rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.jd-lb-prev { left: 0.5rem; }
.jd-lb-next { right: 0.5rem; }
.jd-lb-meta {
  padding: 0.75rem 0.9rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--jd-line-soft);
  background: rgba(6, 18, 32, 0.9);
  max-height: 32vh;
  overflow-y: auto;
}
.jd-lb-meta h3 {
  font-family: var(--jd-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--jd-brass);
  margin: 0 0 0.3rem;
  text-transform: uppercase;
}
.jd-lb-meta p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: #cfe0ee; }
html.jd-lb-open, html.jd-lb-open body { overflow: hidden; }

/* ===================================================================== footer */

.jd-footer {
  border-top: 2px solid var(--jd-line-soft);
  margin-top: 2rem;
  padding: 1.5rem 0 3rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #8fa6ba;
}
.jd-footer a { color: var(--jd-brass); }
.jd-footer p { margin: 0 0 0.7rem; }

/* ============================================================== a11y / motion */

.jd-body :focus-visible {
  outline: 3px solid var(--jd-teal);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .jd-body::after { animation: none; }
  .jd-reward.is-on .jd-reward-badge { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
