/* retainer.css — styles for retainer.js components (rt- prefix, no collisions)
   v3: bounded frames, adaptive grid, fluid staircase, terminal log. */
.rt-badge { background:#16181d; color:#fff; padding:3px 10px; border-radius:20px; font-size:12px; font-family:ui-monospace,Menlo,monospace; white-space:nowrap; }
.rt-banner { background:#16181d; color:#fff; border-radius:10px; padding:14px 18px; font-size:15px; line-height:1.6; margin-bottom:14px; }
.rt-banner strong { color:#9fd8c3; }
.rt-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:14px; }
.rt-kpi, .rt-card { background:#fff; border:1px solid #e3e5e8; border-radius:10px; padding:14px 16px; overflow:hidden; }
.rt-card { margin-bottom:14px; }
.rt-card h3 { margin:0 0 10px; font-size:12px; text-transform:uppercase; letter-spacing:.1em; color:#5b6068; }
.rt-v { font-size:22px; font-family:ui-monospace,Menlo,monospace; }
.rt-l { font-size:11px; color:#5b6068; text-transform:uppercase; letter-spacing:.08em; }
.rt-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(58px,1fr)); gap:4px; }
.rt-cell { border-radius:4px; background:#eceef0; padding:4px 2px; text-align:center; cursor:pointer; display:flex; flex-direction:column; justify-content:center; min-height:44px; }
.rt-cell-p { font-size:11px; font-family:ui-monospace,Menlo,monospace; font-weight:600; }
.rt-cell-w { font-size:9.5px; color:#5b6068; font-family:ui-monospace,Menlo,monospace; }
.rt-cell.rt-filled { background:var(--emerald,#0b6e4f); }
.rt-cell.rt-filled .rt-cell-p, .rt-cell.rt-filled .rt-cell-w { color:#fff; }
.rt-cell.rt-next { background:#fff; border:2px solid var(--emerald,#0b6e4f); }
.rt-cell.rt-keystone { box-shadow:inset 0 0 0 2px var(--gold,#b8860b); }
.rt-inspect { font-family:ui-monospace,Menlo,monospace; font-size:12.5px; background:#f7f8f7; border:1px dashed var(--emerald,#0b6e4f); border-radius:8px; padding:10px 12px; margin:10px 0; }
.rt-rail { overflow-x:auto; scroll-snap-type:x proximity; border:1px solid #e3e5e8; border-radius:8px; padding:8px; }
.rt-stairs { display:flex; align-items:flex-end; gap:2px; height:120px; padding-bottom:2px; min-width:min-content; }
.rt-st { flex:1 0 14px; text-align:center; scroll-snap-align:start; }
.rt-infer { background:#f7f8f7; border:1px solid #e3e5e8; border-left:4px solid var(--emerald,#0b6e4f); border-radius:8px; padding:10px 14px; font-size:13.5px; line-height:1.6; margin-bottom:14px; }
.rt-band { background:#fff8e6; border:1px solid #e8d48b; border-radius:8px; padding:10px 14px; font-size:13.5px; line-height:1.6; margin-bottom:14px; }
.rt-chips { display:flex; gap:8px; flex-wrap:wrap; align-items:center; font-size:13px; color:#5b6068; }
.rt-chip { background:#fff; border:1.5px solid #16181d; border-radius:20px; padding:5px 12px; font-size:13px; cursor:pointer; }
.rt-chip:hover { background:#16181d; color:#fff; }
.rt-st .rt-bar { background:#cfd4d8; border-radius:3px 3px 0 0; }
.rt-st.rt-done .rt-bar { background:var(--emerald,#0b6e4f); opacity:.45; }
.rt-st.rt-now .rt-bar { background:var(--emerald,#0b6e4f); }
.rt-st .rt-p { font-size:9px; font-family:ui-monospace,Menlo,monospace; margin-top:4px; display:none; }
.rt-st.rt-now .rt-p, .rt-st:last-child .rt-p { display:block; }
.rt-st .rt-g { font-size:9px; color:#5b6068; font-family:ui-monospace,Menlo,monospace; display:none; }
.rt-track { height:8px; background:#eceef0; border-radius:6px; overflow:hidden; }
.rt-fill { height:100%; background:var(--emerald,#0b6e4f); width:0%; transition:width .3s; }
.rt-log { font-family:ui-monospace,Menlo,monospace; font-size:12.5px; line-height:1.7; max-height:220px; overflow-y:auto; }
.rt-log .rt-sig { color:var(--emerald,#0b6e4f); }
.rt-mono { font-family:ui-monospace,Menlo,monospace; }
.rt-note { font-size:13px; color:#5b6068; }
.rt-locked { opacity:.92; border-style:dashed; }
.rt-locked label { display:inline-block; margin:6px 10px 6px 0; font-size:13px; }
.rt-locked input { padding:7px; font-size:14px; border-radius:6px; border:1px solid #e3e5e8; width:150px; }
button.rt-act { background:var(--emerald,#0b6e4f); color:#fff; border:none; padding:10px 16px; border-radius:8px; font-size:14px; cursor:pointer; }
button.rt-ghost { background:#fff; color:#16181d; border:1.5px solid #16181d; padding:9px 14px; border-radius:8px; font-size:14px; cursor:pointer; margin-left:8px; }
.rt-config label { display:block; margin:12px 0; font-size:14px; }
.rt-config input[type=range] { width:100%; }
.rt-config fieldset { border:1px solid #e3e5e8; border-radius:10px; margin:14px 0; padding:10px 16px 14px; }
.rt-config legend { font-size:12px; text-transform:uppercase; letter-spacing:.1em; color:#5b6068; padding:0 6px; }
.rt-config fieldset label { margin:8px 0; }
@media (max-width:820px){ .rt-kpis{grid-template-columns:repeat(2,1fr);} }
@media (min-width:821px){ .rt-st .rt-p { display:block; } .rt-st .rt-g { display:block; } }

/* --- Seat grid v3: gate groups (DRY) + tiles (SRP) + inspector --- */
.rt-seat-meta { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; font-size:13px; color:#5b6068; margin-bottom:10px; }
.rt-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin:0 4px 0 10px; }
.rt-dot-open { background:#eceef0; border:1px solid #cbd5e1; }
.rt-dot-filled { background:var(--emerald,#0b6e4f); }
.rt-gate-grid { display:grid; gap:12px; }
.rt-gate-group { border:1px solid #e3e5e8; border-radius:8px; padding:10px 12px; background:#fff; }
.rt-gate-header { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px; font-size:13.5px; margin-bottom:8px; padding-bottom:6px; border-bottom:1px solid #eef1f5; }
.rt-gate-price { font-weight:600; font-family:ui-monospace,Menlo,monospace; font-size:12.5px; }
.rt-gate-tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(46px,1fr)); gap:5px; }
.rt-tile { padding:7px 2px; border-radius:6px; border:1px solid #cbd5e1; background:#f8fafc; font-size:12.5px; font-variant-numeric:tabular-nums; cursor:pointer; text-align:center; font-family:ui-monospace,Menlo,monospace; }
.rt-tile-filled { background:var(--emerald,#0b6e4f); border-color:var(--emerald,#0b6e4f); color:#fff; font-weight:600; }
.rt-tile-selected { outline:2px solid #16181d; outline-offset:1px; }
.rt-tile.rt-keystone { box-shadow:inset 0 0 0 2px var(--gold,#b8860b); }

/* --- Gate Carousel + synced Price Staircase (v3.1) --- */
.rt-gc-toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; font-size:13.5px; }
.rt-gc-track { display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; scroll-behavior:smooth; padding-bottom:8px; }
.rt-gate-slide { flex:0 0 100%; scroll-snap-align:start; border:1px solid #cbd5e1; border-radius:10px; padding:14px 16px; background:#fff; }
.rt-gate-slide-top { display:flex; justify-content:space-between; align-items:baseline; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.rt-gate-slide-price { font-size:17px; font-weight:700; color:var(--emerald-deep,#065f46); background:var(--emerald-tint,#ecfdf5); padding:3px 9px; border-radius:6px; font-family:ui-monospace,Menlo,monospace; }
.rt-gate-slide-meta { font-size:12.5px; color:#475569; margin-bottom:10px; }
.rt-gate-slide-seats { display:grid; grid-template-columns:repeat(auto-fill,minmax(44px,1fr)); gap:5px; }
.rt-gseat { padding:6px 2px; border-radius:6px; border:1px solid #e2e8f0; background:#f8fafc; color:#64748b; opacity:.55; font-size:12px; font-variant-numeric:tabular-nums; cursor:pointer; font-family:ui-monospace,Menlo,monospace; transition:opacity 150ms ease, border-color 150ms ease; }
.rt-gseat-filled { opacity:.78; color:#0f172a; }
.rt-gseat-active { opacity:1; background:var(--emerald-tint,#ecfdf5); color:#064e3b; border-color:#10b981; box-shadow:0 0 0 2px rgba(16,185,129,.35); font-weight:700; }
.rt-staircase { display:grid; grid-template-columns:repeat(auto-fit,minmax(56px,1fr)); gap:6px; align-items:end; margin-top:10px; padding:10px; border-radius:8px; background:#f8fafc; border:1px solid #e2e8f0; }
.rt-stairstep { display:flex; flex-direction:column; align-items:center; justify-content:flex-end; min-height:76px; padding:6px 3px; border-radius:6px; border:1px solid #cbd5e1; background:#e2e8f0; cursor:pointer; font-size:12px; font-family:ui-monospace,Menlo,monospace; transition:all 160ms ease; }
.rt-stairstep-bar { display:block; width:100%; border-radius:4px; background:currentColor; opacity:.22; margin-bottom:4px; }
.rt-stairstep-seat { font-size:10px; }
.rt-stairstep-past { opacity:.55; filter:saturate(.45); background:#e2e8f0; color:#475569; }
.rt-stairstep-active { opacity:1; background:#d1fae5; border-color:#059669; color:#064e3b; box-shadow:0 0 0 2px #10b981, 0 4px 10px rgba(5,150,105,.18); transform:translateY(-2px); font-weight:700; }
.rt-stairstep-locked { opacity:.72; background:#cbd5e1; color:#334155; box-shadow:inset 0 3px 8px rgba(15,23,42,.28); }

/* Narrow-panel staircase ergonomics (STAR #10): steps keep a readable
   minimum width and scroll horizontally instead of squeezing labels. */
@media (max-width: 560px) {
  .rt-staircase { display:flex; overflow-x:auto; scroll-snap-type:x proximity; }
  .rt-stairstep { flex:0 0 64px; scroll-snap-align:start; }
  .rt-gate-slide-price { font-size:14px; }
}

/* Staircase progress states (nextSeat rules) + full capacity */
.rt-staircase { transition:border-color 180ms ease, background-color 180ms ease; }
.rt-staircase-full { border-color:#059669; background:var(--emerald-tint,#ecfdf5); }
.rt-staircase-full::after { content:"ALL SEATS FILLED"; grid-column:1 / -1; font-size:11px; font-weight:700; letter-spacing:.04em; color:var(--emerald-deep,#065f46); text-align:right; padding-top:2px; }
.rt-stairstep-last-cleared { opacity:.85; background:#eff6ff; border-color:#3b82f6; color:#1e3a8a; font-weight:600; }
.rt-stairstep-upcoming { opacity:.9; background:#fefce8; border-color:#eab308; color:#713f12; box-shadow:inset 0 2px 6px rgba(113,63,18,.14); font-weight:600; }

/* Publish polish: respect reduced motion (also calms scroll animation),
   and give every interactive element a visible keyboard focus. */
@media (prefers-reduced-motion: reduce) {
  .rt-gc-track { scroll-behavior: auto; }
  .rt-stairstep, .rt-gseat { transition: none; }
}
.rt-tile:focus-visible, .rt-gseat:focus-visible, .rt-stairstep:focus-visible,
.rt-act:focus-visible, .rt-ghost:focus-visible, .rt-chip:focus-visible {
  outline: 2px solid #16181d; outline-offset: 2px;
}

/* Print: the dashboard prints as a clean one-page cycle report.
   Controls, forms and nav disappear; carousel slides stack full-width. */
@media print {
  .rt-config, .rt-act, .rt-ghost, .rt-chip, .rt-gc-toolbar, button { display: none !important; }
  .rt-gc-track { display: block; overflow: visible; }
  .rt-gate-slide { page-break-inside: avoid; margin-bottom: 10px; border: 1px solid #999; }
  .rt-card, .rt-kpi, .rt-band, .rt-staircase { page-break-inside: avoid; box-shadow: none !important; }
  .rt-log { max-height: none; overflow: visible; }
  body { font-size: 12px; }
}
