/* =========================================================
   LIBRA — Interview System
   Design tokens: ink navy ground, brass accent, parchment
   panels, two-path color coding (State = slate blue,
   Crime = deep crimson). Fraunces for display, Inter for body.
   Includes a subtle animated gradient ground + motion on key
   interactive elements (mark buttons, mic, progress, score).
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #0c111c;
  --ink-panel: #131a29;
  --ink-panel-raised: #1a2235;
  --hairline: #2a3247;
  --parchment: #ece6d8;
  --parchment-dim: #d9d2bf;
  --brass: #c6a15b;
  --brass-bright: #dab876;
  --text-hi: #f1ede2;
  --text-mid: #b8bccb;
  --text-low: #7d8296;

  --state: #6f93b8;
  --state-deep: #3e5c76;
  --state-bg: rgba(62, 92, 118, 0.14);

  --crime: #c56464;
  --crime-deep: #8c3a3a;
  --crime-bg: rgba(140, 58, 58, 0.14);

  --good: #7fae7a;
  --good-bg: rgba(127, 174, 122, 0.14);
  --bad: #c56464;
  --bad-bg: rgba(197, 100, 100, 0.14);
  --warn: #d3ab5c;
  --warn-bg: rgba(211, 171, 92, 0.14);

  --radius-sm: 3px;
  --radius-md: 6px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-panel: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(ellipse 1200px 600px at 20% -10%, rgba(198, 161, 91, 0.08), transparent),
    radial-gradient(ellipse 900px 500px at 100% 0%, rgba(62, 92, 118, 0.10), transparent),
    radial-gradient(ellipse 700px 500px at 10% 100%, rgba(140, 58, 58, 0.06), transparent);
  background-size: 160% 160%, 160% 160%, 160% 160%;
  background-position: 0% 0%, 100% 0%, 0% 100%;
  animation: driftGround 26s ease-in-out infinite alternate;
  min-height: 100vh;
}

@keyframes driftGround {
  0%   { background-position: 0% 0%, 100% 0%, 0% 100%; }
  100% { background-position: 8% 6%, 92% 8%, 6% 92%; }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0 0 0.4em 0;
  color: var(--text-hi);
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em 0; color: var(--text-mid); max-width: 62ch; }

a { color: var(--brass-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* ---------- layout shells ---------- */

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text-hi);
}

.wordmark svg { width: 26px; height: 26px; flex-shrink: 0; }

.wordmark .server-name {
  background: linear-gradient(100deg, var(--brass) 0%, var(--brass-bright) 40%, var(--brass) 80%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerText 6s linear infinite;
}

@keyframes shimmerText {
  to { background-position: 220% center; }
}

.topbar nav a {
  color: var(--text-mid);
  font-size: 0.92rem;
  margin-left: 22px;
}
.topbar nav a:hover { color: var(--text-hi); }

/* ---------- hero ---------- */

.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.hero .scales {
  width: 74px;
  height: 74px;
  margin: 0 auto 28px;
  opacity: 0.92;
  animation: floatIcon 5s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 0.35em;
}

.hero .lede {
  max-width: 50ch;
  margin: 0 auto 8px;
  font-size: 1.06rem;
  color: var(--text-mid);
}

/* ---------- draft resume banner ---------- */

.draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(198, 161, 91, 0.08);
  border: 1px solid rgba(198, 161, 91, 0.35);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 0 0 24px;
}

/* ---------- two-path split ---------- */

.paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0 20px;
}

@media (max-width: 720px) {
  .paths { grid-template-columns: 1fr; }
}

.path-card {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--radius-md);
  background: var(--ink-panel);
  border: 1px solid var(--hairline);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.path-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -18px rgba(0,0,0,0.55); }

.path-card.state { border-top: 2px solid var(--state-deep); }
.path-card.crime { border-top: 2px solid var(--crime-deep); }

.path-card:hover.state { border-color: var(--state); }
.path-card:hover.crime { border-color: var(--crime); }

.path-card .tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.path-card.state .tag { color: var(--state); background: var(--state-bg); }
.path-card.crime .tag { color: var(--crime); background: var(--crime-bg); }

.path-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.path-card p { font-size: 0.94rem; margin-bottom: 18px; }

.path-card .go {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-hi);
  transition: letter-spacing 0.15s ease;
}
.path-card.state .go { color: var(--state); }
.path-card.crime .go { color: var(--crime); }
.path-card:hover .go { letter-spacing: 0.02em; }

/* ---------- panel / card ---------- */

.panel {
  background: var(--ink-panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-panel);
}

.panel-narrow { max-width: 560px; margin: 40px auto; }
.panel-wide { max-width: 720px; margin: 40px auto; }

.fade-in { animation: fadeInUp 0.28s ease; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- forms ---------- */

label {
  display: block;
  font-size: 0.86rem;
  color: var(--text-mid);
  margin-bottom: 6px;
  font-weight: 500;
}

.field { margin-bottom: 20px; }

input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hairline);
  color: var(--text-hi);
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.14);
}

input:disabled { opacity: 0.6; cursor: not-allowed; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--brass); color: #1b1406; position: relative; }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 18px -8px rgba(198, 161, 91, 0.55); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; filter: none; box-shadow: none; }

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.35) 48%, transparent 66%);
  background-size: 220% 100%;
  background-position: 120% 0;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.btn-primary:not(:disabled):hover::before {
  opacity: 1;
  animation: btnShine 0.9s ease;
}
@keyframes btnShine {
  from { background-position: 120% 0; }
  to   { background-position: -20% 0; }
}

.btn-ghost {
  background: transparent;
  color: var(--text-hi);
  border-color: var(--hairline);
}
.btn-ghost:hover { border-color: var(--text-mid); }

.btn-danger { background: transparent; color: var(--bad); border-color: rgba(197, 100, 100, 0.4); }
.btn-danger:hover { background: rgba(197, 100, 100, 0.1); }

.btn-block { width: 100%; }

.error-msg {
  background: rgba(197, 100, 100, 0.1);
  border: 1px solid rgba(197, 100, 100, 0.3);
  color: #e0a3a3;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.hint { font-size: 0.82rem; color: var(--text-low); margin-top: 6px; min-height: 1em; }

/* ---------- interview toolbar (progress / timer / score) ---------- */

.interview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 180px;
}

.quiz-progress .bar {
  flex: 1;
  height: 4px;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.quiz-progress .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--state-deep), var(--brass) 50%, var(--crime-deep));
  background-size: 250% 100%;
  animation: progressShimmer 4s linear infinite;
  transition: width 0.3s ease;
}
@keyframes progressShimmer {
  to { background-position: -250% 0; }
}
.quiz-progress .count { font-size: 0.84rem; color: var(--text-low); white-space: nowrap; }

.chips { display: flex; gap: 8px; }
.chip {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ink);
  border: 1px solid var(--hairline);
  color: var(--text-mid);
}
.chip-score { color: var(--brass-bright); border-color: rgba(198, 161, 91, 0.4); transition: color 0.2s ease, transform 0.2s ease; }
.chip-score.bump { animation: chipBump 0.3s ease; }
@keyframes chipBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}

.chip-keys {
  display: none;
  align-items: center;
  gap: 4px;
  color: var(--text-low);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 720px) {
  .chip-keys { display: inline-flex; }
}

.question-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.question-prompt {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.35;
  animation: promptIn 0.32s ease;
}
@keyframes promptIn {
  from { opacity: 0; transform: translateX(6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.q-edit-btn {
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-low);
}
.q-edit-btn:hover { color: var(--brass-bright); border-color: var(--brass); }

/* ---------- reference answer (staff-only reveal) ---------- */

.ref-toggle {
  background: transparent;
  border: 1px dashed var(--hairline);
  color: var(--text-mid);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}
.ref-toggle:hover { border-color: var(--brass); color: var(--brass-bright); }

.ref-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
  background: rgba(198, 161, 91, 0.06);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-mid);
}
.ref-answer.open {
  max-height: 260px;
  opacity: 1;
  margin-top: 10px;
  padding: 12px 14px;
  border-color: rgba(198, 161, 91, 0.25);
}

/* ---------- transcript + mic ---------- */

.transcript-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.transcript-row textarea { flex: 1; resize: vertical; }

.mic-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--ink);
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.mic-btn:hover { border-color: var(--brass); color: var(--brass-bright); }
.mic-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.mic-btn.recording {
  color: #fff;
  background: var(--crime-deep);
  border-color: var(--crime);
  animation: micPulse 1.2s ease-in-out infinite;
}
@keyframes micPulse {
  0%   { box-shadow: 0 0 0 0 rgba(197, 100, 100, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(197, 100, 100, 0); }
  100% { box-shadow: 0 0 0 0 rgba(197, 100, 100, 0); }
}

/* ---------- mark buttons ---------- */

.mark-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.mark-btn {
  flex: 1;
  min-width: 110px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--ink);
  color: var(--text-mid);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.mark-btn:hover { transform: translateY(-1px); }
.mark-btn:active { transform: scale(0.96); }

.mark-btn.selected { animation: markPop 0.28s ease; }
@keyframes markPop {
  0%   { transform: scale(0.94); }
  55%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.mark-btn.mark-correct.selected { background: var(--good-bg); border-color: var(--good); color: var(--good); box-shadow: 0 0 0 3px rgba(127, 174, 122, 0.16); }
.mark-btn.mark-partial.selected { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); box-shadow: 0 0 0 3px rgba(211, 171, 92, 0.16); }
.mark-btn.mark-incorrect.selected { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); box-shadow: 0 0 0 3px rgba(197, 100, 100, 0.16); }

.mark-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--ink-panel-raised);
  color: var(--text-low);
  white-space: nowrap;
}
.mark-pill.mark-correct { background: var(--good-bg); color: var(--good); }
.mark-pill.mark-partial { background: var(--warn-bg); color: var(--warn); }
.mark-pill.mark-incorrect { background: var(--bad-bg); color: var(--bad); }

/* ---------- summary / transcript review ---------- */

.summary-list { margin-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.summary-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}
.summary-row:last-child { border-bottom: none; }
.summary-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
}
.summary-row-head span:nth-child(2) { flex: 1; }
.summary-answer {
  margin: 6px 0 0 22px;
  font-size: 0.88rem;
  color: var(--text-mid);
}
.summary-answer em { color: var(--text-low); }

/* ---------- results ---------- */

.result-score {
  text-align: center;
  padding: 20px 0 8px;
}

.result-score .big-number {
  font-family: var(--font-display);
  font-size: 4.2rem;
  line-height: 1;
  color: var(--brass-bright);
}
.big-number.pulse { animation: bigNumberPulse 0.6s ease; }
@keyframes bigNumberPulse {
  0% { transform: scale(0.85); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}
.result-score .of {
  font-size: 1rem;
  color: var(--text-low);
  margin-top: 6px;
}

/* ---------- confetti (strong-score celebration) ---------- */

.confetti-host {
  position: relative;
  height: 0;
  overflow: visible;
}
.confetti-piece {
  position: absolute;
  top: -10px;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  opacity: 0.95;
  animation-name: confettiFall;
  animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation-fill-mode: forwards;
}
@keyframes confettiFall {
  0%   { transform: translate(0, -12px) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--drift), 92px) rotate(360deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti-piece { display: none; }
}

.result-breakdown {
  margin-top: 28px;
  border-top: 1px solid var(--hairline);
  padding-top: 20px;
}
.result-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.9rem;
}
.result-row:last-child { border-bottom: none; }
.result-icon { flex-shrink: 0; width: 18px; text-align: center; }
.result-icon.correct { color: var(--good); }
.result-icon.incorrect { color: var(--bad); }

/* ---------- badges ---------- */

.badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.badge.state { color: var(--state); background: var(--state-bg); }
.badge.crime { color: var(--crime); background: var(--crime-bg); }
.badge.passed { color: var(--good); background: var(--good-bg); }
.badge.failed { color: var(--bad); background: var(--bad-bg); }
.badge.pending { color: var(--brass); background: rgba(198, 161, 91, 0.14); }

/* ---------- unified app shell / top navigation ---------- */
/* One staff portal now — the old split between a separate interview
   console and review dashboard is gone. Everything hangs off a single
   sticky top bar with tabs; the content below fades/slides on switch. */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(19, 26, 41, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.app-topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 28px 0;
}
@media (max-width: 720px) {
  .app-topbar-inner { padding: 14px 18px 0; }
}

.app-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-low);
}
.user-chip .who { color: var(--text-mid); }
.user-chip .who strong { color: var(--text-hi); font-weight: 600; }
.user-chip .signout {
  cursor: pointer;
  color: var(--text-low);
  transition: color 0.15s ease;
}
.user-chip .signout:hover { color: var(--crime); text-decoration: underline; }

.nav-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  background: transparent;
  border: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}
.nav-tab:hover { color: var(--text-hi); }
.nav-tab.active { color: var(--brass-bright); }
.nav-tab.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brass), var(--brass-bright));
  animation: tabUnderline 0.22s ease;
  transform-origin: center;
}
@keyframes tabUnderline {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

.nav-tab .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass-bright);
  animation: dotPulse 1.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.tab-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 40px;
  width: 100%;
  flex: 1;
}
@media (max-width: 720px) {
  .tab-content { padding: 0 18px 32px; }
}

.tab-content-inner { animation: tabSwitch 0.24s ease; }
@keyframes tabSwitch {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 30px 0 26px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- stats bar ---------- */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
@media (max-width: 900px) {
  .stats-bar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
  background: var(--ink-panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover { border-color: var(--brass); transform: translateY(-2px); box-shadow: 0 10px 26px -16px rgba(198, 161, 91, 0.4); }
.stat-num { font-family: var(--font-display); font-size: 1.8rem; color: var(--text-hi); }
.stat-suffix { font-size: 1.1rem; color: var(--text-low); margin-left: 1px; }
.stat-label { font-size: 0.76rem; color: var(--text-low); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th {
  text-align: left;
  color: var(--text-low);
  font-weight: 500;
  font-size: 0.78rem;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
}
td { padding: 12px; border-bottom: 1px solid var(--hairline); color: var(--text-hi); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr { transition: background 0.12s ease; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
.table-wrap { overflow-x: auto; background: var(--ink-panel); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.table-wrap table { min-width: 720px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }

.pill-filter {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  color: var(--text-mid);
  font-size: 0.84rem;
  cursor: pointer;
  background: transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pill-filter.active { border-color: var(--brass); color: var(--brass-bright); }

.empty-state {
  padding: 50px 20px;
  text-align: center;
  color: var(--text-low);
}

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeInUp 0.15s ease;
}
.modal-box {
  background: var(--ink-panel-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 30px;
  max-width: 560px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  animation: modalIn 0.22s cubic-bezier(0.2, 0.8, 0.3, 1.15);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.footer-note {
  text-align: center;
  color: var(--text-low);
  font-size: 0.82rem;
  padding: 40px 0 60px;
}

.loading-text { color: var(--text-low); font-size: 0.9rem; padding: 20px 0; }

/* ---------- staggered row / card entrance ---------- */

.row-in {
  animation: rowIn 0.32s ease both;
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- button press ripple ---------- */

.btn, .path-card, .pill-filter, .nav-tab, .icon-btn {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  animation: rippleOut 0.5s ease-out;
}
@keyframes rippleOut {
  to { transform: scale(2.6); opacity: 0; }
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--text-mid);
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { border-color: var(--text-mid); color: var(--text-hi); }

/* ---------- toasts ---------- */

.toast-host {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}
.toast {
  background: var(--ink-panel-raised);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--brass);
  color: var(--text-hi);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  box-shadow: var(--shadow-panel);
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-left-color: var(--good); }
.toast-error { border-left-color: var(--bad); }
