/* ═══ binder.css — the five tabs as kraft delo folders ═══
   Contract unchanged: .btabs (row) > .btab[aria-selected="true"|.active|.on] > .btab-dot + label ; .bpane[hidden] (the open folder's sheet).
   Tabs: THE DESK / THE LEDGER / THE RECORD / THE KREMLIN / THE WORLD. Manila → kraft cardboard with a stitched edge; pushpin dots → small red stars;
   the active tab is the folder pulled forward with a gold edge. Optional wrapper: .binder. Motion: transform only; reduced motion = instant. */

.btabs, .binder-tabs { display: flex; gap: 3px; padding: 0 6px; align-items: flex-end; overflow-x: auto; scrollbar-width: none; position: relative; z-index: 2; }
.btabs::-webkit-scrollbar { display: none; }
.btab { all: unset; box-sizing: border-box; cursor: pointer; position: relative; flex: 1 0 auto; min-width: 62px; padding: 9px 10px 8px 22px; text-align: center; white-space: nowrap;
  font: 800 9.5px/1 var(--sans, -apple-system, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: #4a3014;
  border-radius: 7px 7px 0 0; transform: translateY(5px);
  background: repeating-linear-gradient(90deg, rgba(90,60,20,.07) 0 1px, transparent 1px 4px), linear-gradient(180deg, #c9a56a, #b08a4e);
  box-shadow: inset 0 1px 0 rgba(255,235,190,.45), inset 0 0 0 1px rgba(60,35,10,.35); transition: transform .25s cubic-bezier(.2, .8, .2, 1), filter .25s; filter: brightness(.82); }
.btab::after { content: ""; position: absolute; left: 6px; right: 6px; top: 3px; border-top: 1px dashed rgba(60,35,10,.45); }   /* stitched edge */
.btab:focus-visible { outline: 2px solid var(--gold, #d4a93c); outline-offset: 1px; }
.btab:hover { filter: brightness(.95); }
/* the pin: a small red star */
.btab-dot { position: absolute; left: 7px; top: 50%; width: 11px; height: 11px; margin-top: -5px; border-radius: 0; background: radial-gradient(circle, #ff8a8e 0 20%, #d9262d 45%, #7a0e16);
  clip-path: polygon(50% 0, 62% 34%, 98% 36%, 70% 58%, 80% 94%, 50% 72%, 20% 94%, 30% 58%, 2% 36%, 38% 34%); filter: drop-shadow(0 1px 0 rgba(0,0,0,.4)); }
.btab[aria-selected="true"], .btab.active, .btab.on { transform: translateY(0); filter: none; color: #2a1606; z-index: 3;
  background: repeating-linear-gradient(90deg, rgba(90,60,20,.05) 0 1px, transparent 1px 4px), linear-gradient(180deg, #e0be82, #c9a56a);
  box-shadow: inset 0 2px 0 var(--gold, #d4a93c), inset 1px 0 0 rgba(212,169,60,.55), inset -1px 0 0 rgba(212,169,60,.55), 0 -3px 8px -4px rgba(0,0,0,.6); }
.btab[aria-selected="true"] .btab-dot, .btab.active .btab-dot, .btab.on .btab-dot { filter: drop-shadow(0 0 4px #ff4a52); }
/* the open folder's sheet — READABILITY FIX: the pack's kraft interior put cream
   text on cardboard; the app's text is inked for the dark desk. The cardboard
   survives as the tabs above and the inner lip; the sheet itself is dark again. */
.bpane { position: relative; padding: 14px 12px 16px; margin-top: -1px; border-radius: 0 0 4px 4px; z-index: 1;
  border-top: 7px solid #a5803f;
  background: repeating-linear-gradient(90deg, rgba(255,240,205,.02) 0 1px, transparent 1px 4px), linear-gradient(180deg, #181017, #110b11 55%, #0c070c);
  box-shadow: inset 0 0 0 1px rgba(60,35,10,.4), inset 0 10px 18px -12px rgba(0,0,0,.55), 0 14px 26px -16px #000; }
.bpane:not([hidden]) { animation: bp-in .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes bp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .btab { transition: none; } .bpane:not([hidden]) { animation: none; } }
/* Narrow screens: the five full labels overflow the row — swap to short labels
   (data-short on each .btab) and let the tabs share the width evenly.
   Belt: the media query paints the swap instantly at ≤640px. Braces: app.js
   measures REAL overflow (system font scaling, odd viewports) and toggles
   .tabs-short on the row at any width — so the row can never stay clipped. */
@media (max-width: 640px) {
  .btab { flex: 1 1 0; min-width: 0; padding: 9px 6px 8px 19px; font: 800 8.5px/1 var(--sans, -apple-system, sans-serif); letter-spacing: .09em; }
  .btab .btab-label { display: none; }
  .btab::before { content: attr(data-short); }
}
.btabs.tabs-short .btab, .binder-tabs.tabs-short .btab { flex: 1 1 0; min-width: 0; padding: 9px 6px 8px 19px; font: 800 8.5px/1 var(--sans, -apple-system, sans-serif); letter-spacing: .09em; }
.btabs.tabs-short .btab .btab-label, .binder-tabs.tabs-short .btab .btab-label { display: none; }
.btabs.tabs-short .btab::before, .binder-tabs.tabs-short .btab::before { content: attr(data-short); }
