/* ============================================================
   progig — micro-task marketplace
   Dark exchange UI: near-black canvas, raised task cards with a
   green hairline, green accent.

   Typeface: Inter (SIL OFL) — self-hosted variable font, no external
   requests. License in assets/fonts/OFL-Inter.txt.
   ============================================================ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #141414;
  --header-bg: #0f0f0f;
  --card: #1c1c1c;
  --raised: #242424;
  --raised-hover: #2c2c2c;

  --border: #262626;
  --border-accent: #33501d;

  --text: #d6d6d6;
  --text-strong: #f5f5f5;
  --text-bright: #ffffff;
  --text-muted: #949494;

  /* The logo lime (#6aff04) is fully saturated, which glares and blurs small
     text on a dark canvas. The mark keeps it; the interface uses this toned
     version at the same hue — 61% saturation instead of 100%, still 10.2:1 on
     the canvas and 9.4:1 for the dark label it carries when used as a fill. */
  --brand: #6aff04;
  --accent: #8cd44b;
  --accent-hover: #9fe063;
  --accent-dim: #33501d;
  --accent-wash: rgba(140, 212, 75, 0.12);
  --on-accent: #06210f;
  --success: #8cd44b;
  --negative: #ff6a70;
  --warning: #f5b544;
  --info: #5aa9ff;

  --radius-card: 16px;
  --radius-control: 10px;  /* buttons, inputs — tightened */
  --radius-chip: 10px;     /* category filter buttons */
  --radius-sm: 8px;

  /* Floating chrome geometry */
  --header-h: 52px;
  --header-gap: 12px;
  --header-offset: calc(var(--header-h) + var(--header-gap));

  --z-sticky: 40;
  --z-dropdown: 50;
  --z-overlay: 60;
  --z-drawer: 70;
  --z-toast: 80;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shell-gap: 20px;
  --sidebar-w: 264px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; text-wrap: balance; color: var(--text-strong); }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--on-accent); }

/* Dark scrollbars — the default light ones break the theme on Windows */
html {
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a var(--bg);
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border: 3px solid var(--bg);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================================================
   Header
   ============================================================ */
/* Floating bar: detached from the viewport edges, glassy, elevated */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: var(--header-gap) 20px 0;
  background: transparent;
  animation: header-drop 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.header-inner {
  max-width: 1400px;
  margin-inline: auto;
  padding: 0 10px 0 14px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--header-bg) 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.9);
}
@keyframes header-drop {
  from { opacity: 0; translate: 0 -14px; }
  to   { opacity: 1; translate: 0 0; }
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding-right: 8px;
}
.logo svg { flex: none; }
.logo span { color: var(--text-strong); }

/* Wordmark image. Height-driven so it stays crisp at any header size; the
   artwork is light ink on transparency, so it only suits dark surfaces. */
.logo img {
  display: block;
  height: 22px;
  width: auto;
  flex: none;
}
.admin-aside .logo img { height: 20px; }
@media (max-width: 560px) {
  .logo img { height: 19px; }
}

.header-nav { display: flex; align-items: center; gap: 2px; margin-right: auto; }
.header-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.header-nav a:hover { background: var(--raised); color: var(--text-bright); }
.header-nav a svg { flex: none; opacity: 0.85; }

.header-tools { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--raised); color: var(--text-bright); }
.icon-btn .dot-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
}
.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 3px 3px 3px 14px;
  border-radius: 999px;
  background: var(--raised);
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s;
}
.balance-pill:hover { background: var(--raised-hover); }
.balance-pill .avatar { width: 32px; height: 32px; font-size: 12px; }

/* Mobile-only chrome — revealed inside the <=900px block */
.menu-btn, .search-btn, .menu-card, .drawer-scrim { display: none; }

/* Section rows inside the menu sheet */
.panel-head .menu-ico, .menu-card .menu-ico { flex: none; opacity: 0.85; }
.panel-head .label, .menu-card .label { flex: 1; min-width: 0; text-align: left; }
.panel-head .chev { flex: none; transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.panel-head[aria-expanded="false"] .chev { transform: rotate(180deg); }
.menu-signout { display: contents; }
.menu-signout .side-link {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* ============================================================
   App shell: sidebar + main
   ============================================================ */
.shell {
  max-width: 1400px;
  margin-inline: auto;
  padding: calc(var(--header-offset) + var(--shell-gap)) 20px 56px;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: var(--shell-gap);
  align-items: start;
}
.shell--wide { grid-template-columns: minmax(0, 1fr); }

/* Sits in the normal flow and scrolls with the page — no sticky, no
   inner scroll container, no second scrollbar. */
.sidebar-col {
  display: grid;
  gap: 12px;
  align-content: start;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 8px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.panel-head:hover { color: var(--text-bright); }
.panel-head svg { flex: none; }
.panel-body { display: grid; gap: 1px; padding-top: 2px; }
.panel-head[aria-expanded="false"] + .panel-body { display: none; }

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.side-link:hover { background: var(--raised); color: var(--text-bright); }
.side-link svg { flex: none; opacity: 0.75; }
.side-link .label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link .count {
  margin-left: auto;
  flex: none;
  min-width: 26px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #505050;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.side-link[aria-current="page"] {
  background: var(--accent-wash);
  color: var(--accent);
}
.side-link[aria-current="page"] svg { opacity: 1; }
.side-link[aria-current="page"] .count { background: var(--accent); color: var(--on-accent); }

.panel-title-sm {
  padding: 10px 10px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Top earnings widget */
.tabs-row {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 2px 8px;
  background: var(--bg);
  border-radius: 10px;
}
.tabs-row a,
.tabs-row button {
  flex: 1;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.tabs-row a:hover,
.tabs-row button:hover { color: var(--text); }
.tabs-row a.is-active,
.tabs-row button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.earner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.earner-row .rank { width: 14px; color: var(--text-muted); font-weight: 700; font-size: 12px; }
.earner-row .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.earner-row .amt { margin-left: auto; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============================================================
   Buttons / controls
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding-inline: 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: var(--raised); border-color: var(--border); color: var(--text-strong); }
.btn-outline:hover { background: var(--raised-hover); border-color: #3a3a3a; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--raised); color: var(--text-bright); }
.btn-danger { background: transparent; border-color: #4a2326; color: var(--negative); }
.btn-danger:hover { background: rgba(255, 106, 112, 0.12); }
.btn-sm { height: 32px; padding-inline: 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { height: 46px; padding-inline: 26px; font-size: 15px; }
.btn-block { width: 100%; }

.input, .select, .textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--raised);
  color: var(--text-strong);
  font-size: 14px;
  transition: border-color 0.15s, background-color 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--raised-hover);
}
.textarea { height: auto; min-height: 116px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23949494' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.select option { background: var(--card); color: var(--text-strong); }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.field .hint { font-size: 12px; color: var(--text-muted); }
.field .error-msg { font-size: 12px; color: var(--negative); }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ============================================================
   Badges & pills
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-fixed { background: var(--accent-wash); color: var(--accent); }
.badge-outline { border-color: var(--border); color: var(--text-muted); }
.badge-success { background: var(--accent-wash); color: var(--accent); }
.badge-warning { background: rgba(245, 181, 68, 0.14); color: var(--warning); }
.badge-info { background: rgba(90, 169, 255, 0.14); color: var(--info); }
.badge-muted { background: var(--raised); color: var(--text-muted); }
.badge-danger { background: rgba(255, 106, 112, 0.14); color: var(--negative); }

.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--raised);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-strong);
}
.rating svg { color: var(--accent); }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }

/* ============================================================
   Page furniture
   ============================================================ */
.page-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-bright);
}
.page-sub { margin-top: 6px; color: var(--text-muted); font-size: 14px; }

.search-row { display: flex; gap: 10px; margin-top: 20px; }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field svg {
  position: absolute;
  left: 15px;
  top: 50%;
  translate: 0 -50%;
  color: var(--text-muted);
  pointer-events: none;
}
.search-field .input { padding-left: 42px; }

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 22px 0 12px;
}
.list-head .count-label { font-size: 14px; color: var(--text-muted); }
.list-head .count-label strong { color: var(--text-strong); font-weight: 600; }
.sort-inline { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.sort-inline .select { height: 34px; width: auto; background: transparent; border-color: transparent; font-weight: 600; color: var(--text-strong); padding-left: 6px; }
.sort-inline .select:hover { background: var(--raised); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s,
              translate 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.chip:hover { background: var(--raised); color: var(--text-bright); translate: 0 -1px; }
.chip:active { translate: 0 0; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ============================================================
   Task cards — the marketplace list
   ============================================================ */
.task-list { display: grid; gap: 12px; }

.task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  background: var(--card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-card);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.2s, background-color 0.2s;
}
.task-card:hover { border-color: var(--accent); background: #1f1f1f; }

.task-main { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.task-card .title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-strong);
  text-wrap: pretty;
}
.task-card:hover .title { color: var(--text-bright); }
.task-card .blurb {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-card .blurb .flag { color: var(--negative); font-weight: 700; }

.task-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
}
.task-meta span { display: inline-flex; align-items: center; gap: 6px; }
.task-meta svg { flex: none; opacity: 0.7; }

.task-side {
  padding: 16px 20px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
/* done — remaining — in review */
.task-counter {
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.task-counter .done { color: var(--accent); }
.task-counter .left { color: var(--negative); }
.task-counter .review { color: var(--text-muted); }
.task-counter .sep { color: #3a3a3a; margin: 0 2px; }

.task-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
  min-width: 0;
}
.task-author .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.empty-state strong { display: block; color: var(--text-strong); font-size: 16px; margin-bottom: 6px; }

/* ============================================================
   Generic card surface
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.card-pad { padding: 20px; }
.card h2, .card h3 { font-size: 15px; font-weight: 600; color: var(--text-strong); }

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* "Additional information" — one card, compact label/value rows */
.info-heading { font-size: 15px; font-weight: 600; color: var(--text-strong); }
.info-list { margin: 12px 0 0; display: grid; gap: 0; }
.info-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.info-item:last-child { border-bottom: 0; padding-bottom: 0; }
.info-item:first-child { padding-top: 0; }
.info-item dt { color: var(--text-muted); flex: none; }
.info-item dd { margin: 0; color: var(--text-strong); font-weight: 500; text-align: right; }

/* Still used by the guest "How it works" strip on the home page */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.info-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}
.info-tile .k { font-size: 15px; font-weight: 600; color: var(--text-strong); }
.info-tile .v { margin-top: 4px; font-size: 13px; color: var(--text-muted); text-wrap: pretty; }

.notice {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
}
.notice > h2 { font-size: 17px; font-weight: 600; color: var(--text-bright); }
.notice > p { margin-top: 4px; font-size: 14px; color: var(--text-muted); }
.notice-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.notice-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 14px 16px;
}
.notice-item h3 { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.notice-item p { margin-top: 5px; font-size: 13px; line-height: 1.5; color: var(--text-muted); text-wrap: pretty; }

/* ============================================================
   Detail page
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.prose { max-width: 70ch; }
.prose h2 { font-size: 16px; font-weight: 600; margin-top: 22px; color: var(--text-strong); }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-top: 8px; color: var(--text); text-wrap: pretty; }
.prose ol, .prose ul { margin: 8px 0 0; padding-left: 20px; color: var(--text); }
.prose li { margin-top: 7px; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose a { color: var(--accent); text-decoration: none; }
.prose a:hover { text-decoration: underline; }

.stack { display: grid; gap: 16px; }
.sidebar-sticky { display: grid; gap: 12px; position: sticky; top: calc(var(--header-offset) + var(--shell-gap)); }

.pay-figure { display: flex; align-items: baseline; gap: 8px; }
.pay-figure .amount { font-size: 30px; font-weight: 600; color: var(--text-bright); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pay-figure .per { color: var(--text-muted); font-size: 14px; }
.stat-rows { display: grid; gap: 10px; margin-top: 16px; font-size: 14px; }
.stat-row { display: flex; justify-content: space-between; gap: 16px; }
.stat-row dt { color: var(--text-muted); }
.stat-row dd { margin: 0; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.fine-print { margin-top: 12px; font-size: 12px; color: var(--text-muted); text-align: center; }

.poster-row { display: flex; align-items: center; gap: 12px; }
.poster-row .name { font-weight: 600; font-size: 14px; color: var(--text-strong); }
.poster-row .sub { font-size: 12px; color: var(--text-muted); }

.proof-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.proof-form { display: grid; gap: 14px; margin-top: 14px; }

/* ============================================================
   Forms
   ============================================================ */
.form-shell { max-width: 720px; }
.form-section { margin-top: 20px; }
.form-section > h2 {
  font-size: 15px;
  font-weight: 600;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-strong);
}
.form-grid { display: grid; gap: 16px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { margin-top: 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card {
  position: relative;
  display: block;
  padding: 13px 15px;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.radio-card:hover { background: var(--raised-hover); }
.radio-card input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.radio-card .rc-title { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.radio-card .rc-sub { margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.radio-card:has(input:checked) .rc-title { color: var(--accent); }

.cost-summary { margin-top: 20px; }
.cost-summary .rows { display: grid; gap: 8px; font-size: 14px; }
.cost-summary .rows > div { display: flex; justify-content: space-between; }
.cost-summary .rows .label { color: var(--text-muted); }
.cost-summary .amount { font-variant-numeric: tabular-nums; color: var(--text-strong); }
.cost-summary .total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 700;
  color: var(--text-bright);
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
thead th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
td.num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; color: var(--text-strong); }
.cell-main { font-weight: 600; color: var(--text-strong); }
.cell-main a { text-decoration: none; }
.cell-main a:hover { color: var(--accent); }
.cell-sub { margin-top: 2px; font-size: 12px; color: var(--text-muted); }

/* ============================================================
   Stats
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px 20px; }
.stat-card .label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.stat-card .value { margin-top: 6px; font-size: 26px; font-weight: 600; color: var(--text-bright); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-card .delta { margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.stat-card .delta a { color: var(--accent); text-decoration: none; }
.stat-card .delta.up { color: var(--accent); }

.section { margin-top: 26px; }
.section > h2 { font-size: 17px; font-weight: 600; margin-bottom: 12px; color: var(--text-strong); }

/* ============================================================
   Alerts / pagination / toast
   ============================================================ */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-success { background: var(--accent-wash); border-color: var(--accent-dim); color: var(--accent); }
.alert-error { background: rgba(255, 106, 112, 0.1); border-color: #4a2326; color: var(--negative); }
.alert ul { margin: 0; padding-left: 18px; }
.alert svg { flex: none; margin-top: 2px; }
.alert a { color: inherit; }

/* Collapsible filter panel on the job list */
.filter-panel {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
}
.filter-panel[hidden] { display: none; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.filter-buttons { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn.has-filters { border-color: var(--accent-dim); color: var(--accent); }
.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 700;
}
@media (max-width: 560px) {
  .filter-actions { flex-direction: column; align-items: stretch; }
  .filter-buttons { margin-left: 0; }
  .filter-buttons .btn { flex: 1; justify-content: center; }
}

/* "How do you want to earn?" cards on the dashboard */
.earn-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.choice-card:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.choice-card .name { font-weight: 600; font-size: 15.5px; color: var(--text-strong); }
.choice-card .sub { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }
.choice-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  background: var(--accent-wash);
  color: var(--accent);
}
.choice-go { margin-left: auto; color: var(--accent); font-size: 18px; line-height: 1; }

/* Offer wall cards + embedded partner frame */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.offer-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.offer-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}
.offer-card-head { display: flex; align-items: center; gap: 12px; }
.offer-card-head .name { font-weight: 600; font-size: 15px; color: var(--text-strong); }
.offer-card-head .sub { font-size: 12.5px; color: var(--text-muted); }
.offer-card .blurb { font-size: 13.5px; color: var(--text-muted); margin: 0; flex: 1; }
.offer-card .offer-cta { align-self: flex-start; }
.offer-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 700;
  font-size: 17px;
}

.offer-frame-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--card);
}
.offer-frame {
  display: block;
  width: 100%;
  height: min(78vh, 900px);
  min-height: 520px;
  border: 0;
}
@media (max-width: 700px) {
  .offer-frame { height: 72vh; min-height: 420px; }
}

/* Invite link + copy button */
.copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.copy-row .input {
  flex: 1;
  min-width: 220px;
  font-size: 13.5px;
}
.copy-row .btn { flex: none; min-width: 108px; }
.copy-row .btn.is-copied { background: var(--accent-hover); }

/* Sitewide nudge shown until the signed-in account verifies its email. */
.verify-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 20px;
  font-size: 13.5px;
  color: var(--warning, #e8b33c);
  background: rgba(232, 179, 60, 0.1);
  border-bottom: 1px solid rgba(232, 179, 60, 0.25);
}
.verify-banner svg { flex: none; }
.verify-banner span { flex: 1; min-width: 200px; }
.verify-banner form { margin: 0; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.pagination .pages { display: flex; gap: 8px; }

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.7);
  opacity: 0;
  translate: 0 8px;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1), translate 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.show { opacity: 1; translate: 0 0; }

/* ============================================================
   Auth + install
   ============================================================ */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: calc(var(--header-offset) + 32px) 20px 40px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card-pad { padding: 26px; }
.auth-card h1 { font-size: 22px; font-weight: 600; color: var(--text-bright); }
.auth-card .sub { margin-top: 6px; font-size: 14px; color: var(--text-muted); }
.auth-card form { display: grid; gap: 16px; margin-top: 22px; }
.auth-card .swap { margin-top: 18px; text-align: center; font-size: 14px; color: var(--text-muted); }
.auth-card .swap a { color: var(--accent); font-weight: 600; text-decoration: none; }

.install-shell { max-width: 580px; margin: 48px auto 64px; padding-inline: 20px; }
.install-shell h1 { font-size: 26px; font-weight: 600; color: var(--text-bright); }
.install-shell .sub { margin-top: 8px; color: var(--text-muted); }
.req-list { list-style: none; margin: 12px 0 0; padding: 0; }
.req-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.req-list li:last-child { border-bottom: 0; }

/* ============================================================
   Admin
   ============================================================ */
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-aside {
  background: var(--header-bg);
  border-right: 1px solid var(--border);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-aside .logo { padding: 6px 10px 14px; }
.admin-aside a.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.admin-aside a.nav-item:hover { background: var(--raised); color: var(--text-bright); }
.admin-aside a.nav-item[aria-current="page"] { background: var(--accent-wash); color: var(--accent); font-weight: 600; }
.admin-aside .nav-item svg { flex: none; opacity: 0.8; }
.admin-aside .nav-label {
  padding: 14px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}
.admin-aside .aside-footer {
  margin-top: auto;
  padding: 12px 4px 4px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.admin-main { padding: 24px 28px 56px; min-width: 0; background: var(--bg); }
.admin-main > h1 { font-size: 24px; font-weight: 600; color: var(--text-bright); }
.count-pill {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.review-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   Utilities
   ============================================================ */
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-sm { font-size: 13px; }
.mt-2 { margin-top: 16px; }
.stack-lg > * + * { margin-top: 16px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  /* Price + "Start task" move above the description so the action is
     reachable without scrolling the whole brief. */
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar-sticky { position: static; order: -1; }
}

/* ============================================================
   Mobile (<= 900px)
   Phone layout: sections menu collapses inline behind the ⋮ button in
   the header, 44px touch targets, no iOS focus-zoom.
   ============================================================ */
@media (max-width: 900px) {
  :root { --header-h: 56px; --header-gap: 8px; }

  .shell {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 40px;
  }

  /* --- Menu sheet: fills the page below the header --- */
  .sidebar-col {
    position: fixed;
    top: calc(var(--header-h) + var(--header-gap) * 2);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-drawer);
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 10px 14px calc(24px + env(safe-area-inset-bottom));
    background: var(--bg);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    opacity: 0;
    translate: 0 -8px;
    visibility: hidden;
    transition: opacity 0.22s ease-out, translate 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
  }
  .sidebar-col::-webkit-scrollbar { display: none; }
  .sidebar-col.open { opacity: 1; translate: 0 0; visibility: visible; }
  body.menu-open { overflow: hidden; }

  /* Each section is a standalone rounded row card */
  .menu-card,
  .panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
  }
  .menu-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-strong);
    text-decoration: none;
  }
  .menu-card .menu-ico { color: var(--accent); opacity: 1; }
  .menu-card[aria-current="page"] { color: var(--text-bright); }

  .panel-head {
    gap: 12px;
    min-height: 56px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 0;
  }
  .panel-body { padding: 0 8px 8px; gap: 2px; }
  /* Leaderboard is desktop-rail content — it would bloat the nav sheet */
  .panel--earnings { display: none; }

  /* --- Header: ☰ far left, profile/auth far right, no logo --- */
  .logo { display: none; }
  .header-nav { display: none; }
  .header-tools { margin-left: auto; gap: 6px; }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--raised);
    color: var(--text-strong);
    transition: background-color 0.15s;
  }
  .menu-btn:active { background: var(--raised-hover); }
  .menu-btn .ico-close { display: none; }
  .menu-btn[aria-expanded="true"] .ico-open { display: none; }
  .menu-btn[aria-expanded="true"] .ico-close { display: block; }
  .search-btn { display: inline-flex; }
  .site-header { padding-inline: 12px; }
  .toast { left: 14px; right: 14px; }
  /* Sign-out lives in the menu; balance pill keeps the avatar at the edge */
  .header-tools form { display: none; }
  .auth-link { padding-inline: 8px; }

  /* --- Touch targets: nothing tappable under 44px --- */
  .btn { height: 46px; padding-inline: 20px; font-size: 15px; }
  .btn-sm { height: 44px; padding-inline: 14px; font-size: 14px; }
  .icon-btn { width: 44px; height: 44px; }
  .side-link { padding: 12px; font-size: 15px; min-height: 46px; }
  .logo { min-height: 44px; }
  .balance-pill { height: 44px; }
  .sort-inline .select { height: 44px; }
  .task-card { min-height: 44px; }
  .breadcrumb a, .pagination a { display: inline-flex; align-items: center; min-height: 44px; }
  /* Category chips are the exception to the 44px rule above: at that size the
     row dominates the screen before a single job is visible. They sit in a
     scrollable strip rather than being primary actions, so ~32px — comfortably
     over the 24px minimum target size — is the better trade here. */
  .chip { padding: 6px 12px; font-size: 13px; line-height: 1.35; }
  .tabs-row button { padding: 10px 8px; font-size: 13px; }
  .pagination .btn { min-width: 110px; }

  /* --- Inputs: 16px prevents iOS Safari zooming on focus --- */
  .input, .select, .textarea { font-size: 16px; height: 48px; }
  .textarea { height: auto; min-height: 132px; }
  .field label { font-size: 14px; }
  .check-row { padding: 6px 0; font-size: 15px; }
  .check-row input { width: 20px; height: 20px; }

  /* --- Filter chips scroll sideways instead of stacking 3 rows deep --- */
  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: -14px;
    padding-inline: 14px;
    padding-bottom: 4px;
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { flex: none; scroll-snap-align: start; }

  /* --- Task cards: price + counter top-right, author bottom-left --- */
  .task-card { grid-template-columns: minmax(0, 1fr) auto; }
  .task-main { grid-column: 1; padding: 14px 8px 14px 16px; gap: 7px; }
  .task-side {
    grid-column: 2;
    border-left: 0;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 2px;
    padding: 14px 16px 14px 0;
  }
  .task-price { font-size: 16px; }
  .task-card .blurb { -webkit-line-clamp: 4; line-clamp: 4; }
  .task-meta { gap: 10px 14px; }

  .form-grid-2, .radio-cards { grid-template-columns: 1fr; }

  /* Search + Filters collapse to square icon buttons. Spelling them out left
     the field showing about four characters. */
  .search-row { flex-wrap: nowrap; gap: 8px; }
  .search-row .btn {
    flex: none;
    width: 46px;
    padding-inline: 0;
    justify-content: center;
    position: relative;
  }
  .search-row .btn-label { display: none; }
  /* With the label gone the count sits on the corner instead of beside it. */
  .search-row .filter-count {
    position: absolute;
    top: -5px;
    right: -5px;
  }

  /* --- Tables: momentum scroll + edge hint --- */
  .table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

  /* --- Admin --- */
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-aside { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-aside .nav-label { display: none; }
  .admin-aside .aside-footer { margin: 0; border: 0; padding: 4px; }
  .admin-aside a.nav-item { min-height: 44px; }
  .admin-main { padding: 18px 14px 40px; }
}

@media (max-width: 640px) {
  .header-inner { padding: 0 8px 0 12px; gap: 4px; }
  .shell { padding-inline: 14px; padding-top: calc(var(--header-offset) + 14px); }
  .balance-pill { padding-left: 12px; font-size: 14px; height: 44px; }
  .page-title { font-size: 21px; }
  .card-pad { padding: 16px; }
  .list-head { margin: 18px 0 10px; }
  /* These live in the drawer and tab bar too — keep the header to one line */
  .icon-btn--optional { display: none; }
}

/* Taps shouldn't flash a blue box on Android/iOS */
@media (pointer: coarse) {
  a, button, .chip, .task-card, .side-link { -webkit-tap-highlight-color: rgba(2, 187, 119, 0.15); }
}

/* ============================================================
   Motion
   Entrances use `backwards` fill, never `forwards`: the element's
   resting state is its normal CSS, so content is visible even if the
   animation never runs (hidden tab, headless render, reduced motion)
   and hover transforms still work afterwards.
   ============================================================ */

@keyframes rise-in {
  from { opacity: 0; translate: 0 12px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slide-in-left {
  from { opacity: 0; translate: -10px 0; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes pop-in {
  from { opacity: 0; scale: 0.96; }
  to   { opacity: 1; scale: 1; }
}

/* --- Task feed: staggered reveal --- */
.task-card {
  animation: rise-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.task-card:nth-child(1) { animation-delay: 0.02s; }
.task-card:nth-child(2) { animation-delay: 0.06s; }
.task-card:nth-child(3) { animation-delay: 0.10s; }
.task-card:nth-child(4) { animation-delay: 0.14s; }
.task-card:nth-child(5) { animation-delay: 0.18s; }
.task-card:nth-child(6) { animation-delay: 0.22s; }
.task-card:nth-child(7) { animation-delay: 0.26s; }
.task-card:nth-child(n+8) { animation-delay: 0.30s; }

/* Lift on hover — `translate` is its own property, so it doesn't fight
   the entrance keyframes */
.task-card {
  transition: border-color 0.2s, background-color 0.2s,
              translate 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s;
}
.task-card:hover {
  translate: 0 -3px;
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.95);
}
.task-card:active { translate: 0 -1px; }

/* --- Sidebar rail: links cascade in --- */
.sidebar-col .panel { animation: rise-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.sidebar-col .panel:nth-child(2) { animation-delay: 0.05s; }
.sidebar-col .panel:nth-child(3) { animation-delay: 0.10s; }
.sidebar-col .panel:nth-child(4) { animation-delay: 0.15s; }
.sidebar-col .panel:nth-child(5) { animation-delay: 0.20s; }

.side-link {
  transition: background-color 0.16s, color 0.16s,
              padding-left 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.side-link:hover { padding-left: 14px; }
.side-link svg { transition: opacity 0.16s, scale 0.18s cubic-bezier(0.22, 1, 0.36, 1); }
.side-link:hover svg { scale: 1.12; }

/* --- Cards, tiles, stats --- */
.stat-card, .info-tile, .notice, .card {
  animation: rise-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.stat-grid > *:nth-child(2), .info-grid > *:nth-child(2) { animation-delay: 0.05s; }
.stat-grid > *:nth-child(3), .info-grid > *:nth-child(3) { animation-delay: 0.10s; }
.stat-grid > *:nth-child(4), .info-grid > *:nth-child(4) { animation-delay: 0.15s; }
.stat-grid > *:nth-child(5), .info-grid > *:nth-child(5) { animation-delay: 0.20s; }

.stat-card, .info-tile {
  transition: border-color 0.2s, translate 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.stat-card:hover, .info-tile:hover { border-color: var(--accent-dim); translate: 0 -2px; }

/* --- Page furniture --- */
.page-title { animation: rise-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.search-row { animation: rise-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.06s backwards; }
.chip-row   { animation: fade-in 0.5s ease-out 0.12s backwards; }
.breadcrumb { animation: slide-in-left 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards; }

/* --- Buttons --- */
.btn {
  transition: background-color 0.16s, border-color 0.16s, color 0.16s,
              translate 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s;
}
.btn-primary:hover { translate: 0 -1px; box-shadow: 0 6px 18px -8px var(--accent); }
.btn-primary:active, .btn:active { translate: 0 0; }

/* --- Badges & counters --- */
.badge-fixed { animation: pop-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.dot-badge   { animation: pop-in 0.35s cubic-bezier(0.34, 1.4, 0.64, 1) backwards; }

/* --- Table rows --- */
tbody tr { transition: background-color 0.14s; }

/* --- Panel collapse: body slides open --- */
.panel-head[aria-expanded="true"] + .panel-body {
  animation: rise-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

/* --- Avatars & icon buttons --- */
.icon-btn { transition: background-color 0.16s, color 0.16s, scale 0.16s cubic-bezier(0.22, 1, 0.36, 1); }
.icon-btn:hover { scale: 1.06; }
.icon-btn:active { scale: 0.96; }

/* Motion is decoration here — strip it entirely when asked. The global
   reduced-motion rule collapses durations; `backwards` fill means every
   element still lands on its normal, visible state. */
@media (prefers-reduced-motion: reduce) {
  .task-card:hover, .stat-card:hover, .info-tile:hover,
  .btn-primary:hover, .chip:hover { translate: 0 0; }
  .side-link:hover { padding-left: 10px; }
  .icon-btn:hover, .side-link:hover svg { scale: 1; }
}
