/* The Ledger — Sealed Annex hero (Casual layer).
 *
 * The lone trace of the Immersive layer in the Casual terminal: a sealed
 * world file that reads like a classified document in an exchange archive.
 * Resting state is desaturated — muted copy on --panel-2 behind a faint
 * diagonal SEALED stamp. Hover lifts the top-right corner (pure-CSS fold,
 * no blur / no JS animation libs) to reveal a live excerpt of the world
 * feed. Clicking walks into the Immersive layer.
 *
 * Scope: everything lives under #panel-annex. Layout placement (the casual
 * grid cell "immersive") and the Immersive-mode kill switch live in
 * styles.css; all visual styling lives here. */

#panel-annex.annex-hero {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 150px;
  overflow: hidden;
  cursor: pointer;
  padding: 20px 26px 18px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-top-color: rgba(212, 180, 122, 0.4);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(212, 180, 122, 0.04);
  -webkit-tap-highlight-color: transparent;
}
#panel-annex.annex-hero:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(58, 168, 224, 0.18), inset 0 0 0 1px rgba(212, 180, 122, 0.12);
}

/* ── Corner peel — pure-CSS top-right fold ──────────────────────────────
   ::before = brass edge triangle (slightly larger), ::after = the folded
   page flap. Both are 0-size border triangles that grow on hover; the
   brass triangle peeking out behind the flap reads as the lifted corner's
   brass trim. No blur, no transforms on the host. */
#panel-annex.annex-hero::before,
#panel-annex.annex-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 0 0;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  transition: border-width 0.28s ease, opacity 0.28s ease;
}
#panel-annex.annex-hero::before {
  border-color: transparent var(--brass) transparent transparent;
}
#panel-annex.annex-hero::after {
  border-color: transparent #1a2130 transparent transparent;
}
#panel-annex.annex-hero:hover::before,
#panel-annex.annex-hero:focus-visible::before {
  border-width: 0 38px 38px 0;
  opacity: 1;
}
#panel-annex.annex-hero:hover::after,
#panel-annex.annex-hero:focus-visible::after {
  border-width: 0 32px 32px 0;
  opacity: 1;
}

/* ── SEALED stamp — faint diagonal classified-file mark ───────────────── */
#panel-annex .annex-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%) rotate(-24deg);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.42em;
  text-indent: 0.42em; /* counterbalance letter-spacing so it centers */
  text-transform: uppercase;
  color: var(--brass);
  opacity: 0.055;
  border: 2px solid currentColor;
  border-radius: 6px;
  padding: 10px 16px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.3s ease;
}
#panel-annex.annex-hero:hover .annex-stamp { opacity: 0.03; }

/* ── Document body — desaturated copy, left rail ──────────────────────── */
#panel-annex .annex-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  max-width: 66%;
  min-width: 0;
}
#panel-annex .annex-kicker {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
#panel-annex .annex-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.15;
  color: var(--muted);
  transition: color 0.28s ease;
}
#panel-annex.annex-hero:hover .annex-title { color: var(--text); }
#panel-annex .annex-sub {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.85;
}
#panel-annex .annex-blurb {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  opacity: 0.78;
}

/* ── CTA — resolves muted → brass on hover ───────────────────────────── */
#panel-annex .annex-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  background: transparent;
  transition: color 0.28s ease, border-color 0.28s ease, background-color 0.28s ease;
}
#panel-annex.annex-hero:hover .annex-cta,
#panel-annex.annex-hero:focus-visible .annex-cta {
  color: var(--brass);
  border-color: rgba(212, 180, 122, 0.55);
  background: rgba(212, 180, 122, 0.07);
}

/* ── Live preview strip — revealed under the lifted corner ────────────── */
#panel-annex .annex-preview {
  position: absolute;
  top: 32px;
  right: 24px;
  z-index: 3;
  width: 32%;
  max-width: 290px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
  pointer-events: none;
}
#panel-annex.annex-hero:hover .annex-preview,
#panel-annex.annex-hero:focus-visible .annex-preview {
  opacity: 1;
  transform: translateY(0);
}
#panel-annex .annex-preview-kicker {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(212, 180, 122, 0.65);
  border-bottom: 1px solid rgba(212, 180, 122, 0.22);
  padding-bottom: 5px;
}
#panel-annex .annex-preview-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#panel-annex .annex-line {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#panel-annex .annex-line.is-idle { opacity: 0.65; font-style: italic; }

/* Narrow terminals: let the copy breathe and drop the side preview so it
   cannot collide with the text column. The fold + brass CTA still work. */
@media (max-width: 700px) {
  #panel-annex .annex-inner { max-width: 100%; padding-right: 14px; }
  #panel-annex .annex-preview { display: none; }
}
