/* FilmySheet v6 - Royal Ivory.
   Warm ivory paper, ink line work, royal blue actions.
   Hand-drawn line iconography. "Rolls Royce: royal yet simple."
   Palette (exact): paper #FAF6EC, card #FFFDF8, ink #1C1B17,
   muted #6F6A5C, blue #2E3D6B, blue-soft #E8EBF5, hairline #E3DAC2. */

:root {
  --bg: #FAF6EC;
  --surface: #FFFDF8;
  --ink: #1C1B17;
  --muted: #6F6A5C;
  --faint: #7D7564;
  --silver: #D9CFB6;
  --line: #E3DAC2;
  --line-soft: #F3EDDC;
  --action: #2E3D6B;
  --action-ink: #FFFFFF;
  --accent: #2E3D6B;
  --chip-sel: #E8EBF5;
  --ok: #2E7D4F;
  --ok-bg: #EAF4EC;
  --warn: #9A6B1F;
  --warn-bg: #FFF3DC;
  --danger: #B3261E;
  --danger-bg: #FBEDEB;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28,27,23,.05), 0 10px 28px rgba(28,27,23,.06);
  --serif: "Albert Sans", Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sans: "Albert Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

h1, h2, h3, .serif { font-family: var(--serif); letter-spacing: -0.4px; font-weight: 700; }
h1 { font-size: 28px; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 26px 0 10px; }
h3 { font-size: 16px; margin: 18px 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--action); }
.sub { color: var(--muted); font-size: 13px; }
.eyebrow {
  font-size: 10px; letter-spacing: 2px; color: var(--faint);
  font-weight: 600; text-transform: uppercase; margin-bottom: 8px;
}

/* ---------- line icons ---------- */
.ic { display: inline-block; vertical-align: -4px; flex-shrink: 0; }
.ic .acc { stroke: var(--action); }
a .ic, button .ic { vertical-align: -4px; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: 1px;
  padding: 0 10px; display: flex; align-items: center; gap: 10px; color: var(--ink);
}
.brand-mark { display: inline-flex; color: var(--ink); }
.company { font-size: 12px; color: var(--muted); padding: 2px 10px 12px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; }
.sidebar nav a {
  color: var(--muted); text-decoration: none;
  padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 11px;
}
.sidebar nav a .ic { color: var(--faint); }
.sidebar nav a:hover { background: var(--line-soft); color: var(--ink); }
.sidebar nav a:hover .ic { color: var(--ink); }
.sidebar nav a.on { background: var(--chip-sel); color: var(--action); font-weight: 600; }
.sidebar nav a.on .ic { color: var(--action); }
.userbox {
  font-size: 13px; border-top: 1px solid var(--line);
  padding: 12px 10px 0; color: var(--muted);
}
.userbox strong { color: var(--ink); display: block; }
.userbox a { color: var(--muted); font-size: 12px; }

.content { flex: 1; padding: 28px; max-width: 1180px; min-width: 0; }
.content.narrow { max-width: 760px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; }
.page-head h1 .ic { color: var(--action); }

/* ---------- cards, grids ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card.flush { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat .num { font-size: 26px; font-weight: 700; font-family: var(--serif); }
.stat .lbl { color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.stat .stat-ic { color: var(--action); margin-bottom: 8px; display: block; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* visually hidden, still announced by screen readers (for real <label>s in compact filter bars) */
.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;
}

/* ---------- buttons, badges, chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--action); color: var(--action-ink);
  border: 1px solid var(--action); padding: 11px 20px; border-radius: 11px;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  font-family: var(--sans); white-space: nowrap;
}
.btn:hover { opacity: 0.9; }
/* Team 8 MEDIUM (10-agent QC): armed two-tap confirm buttons show the full
   consequence message - allow wrapping instead of truncating. */
.btn[data-armed="1"] { white-space: normal; text-align: center; line-height: 1.3; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--silver); }
.btn.ghost:hover { border-color: var(--ink); opacity: 1; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 8px 14px; font-size: 12px; }
/* QC fix (60-min cycle, MEDIUM T2-M6): touch targets. Phone users tap
   nav links and small action buttons (Approve/Reject/Release) - keep
   them comfortably tappable. */
@media (max-width: 760px) {
  .btn.small { padding: 12px 16px; font-size: 13px; min-height: 44px; }
}
.btn.current { box-shadow: inset 0 0 0 2px var(--silver); }

/* visible keyboard focus for buttons, nav and links (outline only: no layout shift) */
.btn:focus-visible, .chain-action:focus-visible, .veil-toggle:focus-visible,
.sidebar nav a:focus-visible, a:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; background: var(--line-soft); color: var(--muted); font-weight: 500;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--danger-bg); color: var(--danger); }

.chip {
  display: inline-block; font-size: 11px; color: var(--muted);
  background: var(--line-soft); border-radius: 12px; padding: 4px 10px; margin: 0 4px 4px 0;
}
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; border-radius: 14px; padding: 5px 11px;
}
.pill.done { background: var(--ok-bg); color: var(--ok); }
.pill.wait { background: var(--line-soft); color: var(--muted); }
.pill.on { background: var(--surface); border: 1.5px solid var(--action); color: var(--action); }
.pill.off { background: var(--surface); border: 1px dashed var(--silver); color: var(--faint); }
.pill.signed { background: var(--ok-bg); color: var(--ok); }
.pill.yours { background: var(--chip-sel); border: 1.5px solid var(--action); color: var(--action); }
.pill.pending { background: var(--line-soft); color: var(--muted); }
.pill.blocked { background: var(--danger-bg); color: var(--danger); }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="date"], select, textarea {
  width: 100%; padding: 10px 12px; font-size: 14px; font-family: var(--sans);
  border: 1px solid var(--silver); border-radius: 10px; background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--action); box-shadow: 0 0 0 3px var(--chip-sel);
}
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--action); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; margin: 12px 0; }
.check label { font-size: 13px; color: var(--muted); }
.check input { margin-top: 3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.chip-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick label { margin: 0; cursor: pointer; position: relative; }
.chip-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chip-pick span {
  display: inline-block; font-size: 12px; border: 1px solid var(--silver); border-radius: 16px;
  padding: 7px 14px; cursor: pointer; color: var(--muted); font-weight: 500; background: var(--surface);
}
.chip-pick input:checked + span { border-color: var(--action); color: var(--action); font-weight: 600; background: var(--chip-sel); }
.chip-pick input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 2px; }
.chip-grp { flex-basis: 100%; font-size: 10px; letter-spacing: 2px; color: var(--faint); font-weight: 700; text-transform: uppercase; margin-top: 10px; }
.chip-grp:first-child { margin-top: 0; }

/* ---------- flashes ---------- */
.flashes { margin-bottom: 14px; }
.flash {
  padding: 11px 15px; border-radius: 10px; font-size: 14px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.flash.error { border-color: var(--danger); color: var(--danger); }
.flash.success { border-color: var(--ok); color: var(--ok); }
.flash.info { color: var(--muted); }
/* QC fix: every flash gets a manual close button (errors never auto-dismiss). */
.flash { position: relative; padding-right: 40px; }
.flash-close {
  position: absolute; top: 2px; right: 4px; border: none; background: none;
  font-size: 18px; line-height: 1; cursor: pointer; color: inherit; opacity: 0.6;
  padding: 4px 6px; min-width: 44px; min-height: 44px;
}
.flash-close:hover { opacity: 1; }
/* QC fix: pagination for long lists (spend requests). */
.pager { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0 4px; }

/* ---------- auth / public ---------- */
.auth-wrap { max-width: 440px; margin: 6vh auto 40px; padding: 0 18px; }
.auth-card { text-align: left; padding: 32px 30px; }
.auth-card .brand { justify-content: center; padding: 0; margin-bottom: 6px; }
.auth-doodle {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--faint); margin: 14px 0 4px;
}
.auth-doodle .rule { width: 54px; border-top: 1px solid var(--line); }
.auth-tag { text-align: center; font-size: 12px; letter-spacing: 3px; color: var(--faint); margin-bottom: 18px; font-weight: 600; }

/* ---------- topbar (public pages) ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 26px; border-bottom: 1px solid var(--line); background: var(--surface);
  flex-wrap: wrap; gap: 8px;
}
@media (max-width: 480px) {
  input, select, textarea { font-size: 16px; }
}
.topbar .links { display: flex; gap: 16px; font-size: 13px; align-items: center; }
.topbar .links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.topbar .links a:hover { color: var(--action); }
/* Buttons in the topbar keep their own colors, not the muted link grey. */
.topbar .links a.btn { color: var(--action-ink); }
.topbar .links a.btn:hover { color: var(--action-ink); }
.topbar .links a.btn.ghost { color: var(--ink); }
.topbar .links a.btn.ghost:hover { color: var(--ink); }

/* ---------- v6 landing ---------- */
.land-wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; padding: 76px 0 60px; }
.hero .eyebrow { font-size: 12px; letter-spacing: 4px; color: var(--action); font-weight: 600; margin-bottom: 18px; text-transform: uppercase; }
.hero h1 { font-size: 52px; line-height: 1.08; letter-spacing: -0.5px; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--action); }
.hero .lede { font-size: 17px; line-height: 1.65; color: var(--muted); margin-bottom: 30px; max-width: 46ch; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.hero-art svg.scene { display: block; width: 100%; height: auto; }
.art-cap { text-align: center; font-size: 11px; color: var(--faint); letter-spacing: 3px; margin-top: 10px; font-weight: 600; }

.land-sec { padding: 60px 0; }
.sec-head { text-align: center; margin-bottom: 8px; }
.sec-head h2 { font-size: 30px; letter-spacing: -0.3px; margin: 0 0 4px; }
.sec-sub { text-align: center; color: var(--muted); font-size: 15px; margin-bottom: 30px; }

.role-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; max-width: 100%; }
.role-grid a.role-card { min-width: 0; overflow: hidden; }
a.role-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 16px; text-align: center; text-decoration: none; color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.role-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--action); }
a.role-card .r-ic { color: var(--ink); margin-bottom: 6px; display: block; }
a.role-card:hover .r-ic { color: var(--action); }
a.role-card strong { display: block; font-size: 13px; letter-spacing: 3px; margin: 12px 0 6px; font-weight: 600; }
a.role-card small { color: var(--muted); font-size: 12px; line-height: 1.5; }

/* role tiles: role cards carrying their own Login / Sign up buttons (landing) */
.role-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 16px 22px; text-align: center; color: var(--ink);
  display: flex; flex-direction: column; align-items: center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.role-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--action); }
.role-tile .r-ic { color: var(--ink); margin-bottom: 6px; display: block; }
.role-tile:hover .r-ic { color: var(--action); }
.role-tile strong { display: block; font-size: 13px; letter-spacing: 3px; margin: 12px 0 6px; font-weight: 600; }
.role-tile small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.tile-btns { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; justify-content: center; flex-wrap: wrap; }

/* industry marquee: every Indian screen industry, one slim scrolling strip */
.industry-strip { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.industry-track { display: flex; align-items: center; width: max-content; animation: industry-scroll 36s linear infinite; }
.industry-track span { padding: 11px 4px; font-size: 12.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); white-space: nowrap; font-weight: 600; }
.industry-track i { font-style: normal; color: var(--line); padding: 0 18px; font-size: 14px; }
@keyframes industry-scroll { to { transform: translateX(-50%); } }

.doodle-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.doodle-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); }
.doodle-panel svg { width: 100%; height: auto; max-height: 170px; color: var(--ink); }
.doodle-panel .p-cap { font-size: 12px; letter-spacing: 3px; color: var(--action); font-weight: 600; margin-top: 14px; }
.doodle-panel .p-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- journey : from idea to premiere ---------- */
.journey { position: relative; margin-top: 8px; }
.journey-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.j-stage { position: relative; text-align: center; padding: 26px 10px 6px; }
.j-stage .j-ic { width: 64px; height: 64px; margin: 0 auto 10px; border: 1.5px solid var(--ink); border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); box-shadow: var(--shadow); position: relative; z-index: 1; }
.j-stage:nth-child(even) .j-ic { transform: rotate(-4deg); }
.j-stage:nth-child(odd) .j-ic { transform: rotate(3deg); }
.j-stage .j-num { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-size: 10px; letter-spacing: 2px; font-weight: 700; color: var(--action); background: var(--bg); padding: 0 8px; z-index: 2; }
.j-stage h4 { font-size: 13px; letter-spacing: 1.5px; margin: 0 0 4px; text-transform: uppercase; }
.j-stage p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.5; }
.journey-note { text-align: center; margin-top: 26px; }
.journey-note .hand { display: inline-block; border: 1.5px dashed var(--action); border-radius: 999px; padding: 10px 22px; font-size: 13px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); text-wrap: balance; }
.journey-note .hand b { color: var(--action); }

.terms-body { max-width: 720px; }
.terms-body h3 { font-size: 15px; margin: 22px 0 6px; }
.terms-body p { font-size: 14px; color: var(--muted); margin: 0 0 10px; line-height: 1.65; }

.land-footer { padding: 36px 0 48px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); gap: 12px; flex-wrap: wrap; }
.land-footer.center { flex-direction: column; justify-content: center; text-align: center; gap: 8px; }
.land-footer .bharat { font-size: 15px; color: var(--ink); font-weight: 600; letter-spacing: 0.5px; }
.land-footer .terms a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--line); }
.land-footer .terms a:hover { color: var(--action); border-bottom-color: var(--action); }
.land-footer .copy { font-size: 12px; color: var(--faint); }

.layer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.layer { border-radius: var(--radius); padding: 36px 32px; box-shadow: var(--shadow); }
.layer.dark { background: var(--ink); color: #F4EFE2; }
.layer.light { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.layer .ic { margin-bottom: 16px; }
.layer.dark .ic { color: #F4EFE2; }
.layer h3 { font-size: 20px; margin: 0 0 10px; letter-spacing: -0.2px; }
.layer ul { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 2.1; }
.layer.dark ul { color: #B9B2A0; }
.layer.light ul { color: var(--muted); }
.layer.dark li::before { content: "\2014  "; color: #8FA0D8; }
.layer.light li::before { content: "\2014  "; color: var(--action); }

.stats-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-in { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 36px 0; gap: 18px; }
.stat b { font-size: 34px; font-weight: 700; color: var(--action); display: block; letter-spacing: -0.5px; }
.stat span { font-size: 12px; color: var(--muted); letter-spacing: 2px; font-weight: 600; }

.studio-link { text-align: center; font-size: 12.5px; color: var(--muted); padding: 0 0 30px; margin: 0; }
.studio-link a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--line); }
.studio-link a:hover { color: var(--action); border-bottom-color: var(--action); }
.land-footer .brand { font-size: 15px; padding: 0; }

/* ---------- discovery cards ---------- */
.person-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.person-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.person-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.person-card.sel { border-color: var(--action); box-shadow: 0 0 0 1.5px var(--action); }
.person-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #E7DCC3, #C9BC9C);
  color: var(--ink); font-weight: 700; display: flex; align-items: center; justify-content: center;
  font-size: 18px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-card h3 { margin: 0; font-size: 15px; font-family: var(--sans); }
.person-card h3 a { color: var(--ink); }
.person-meta { font-size: 12px; color: var(--muted); }
.rating { font-size: 13px; font-weight: 700; color: var(--ink); }
.rating small { color: var(--faint); font-weight: 400; }
.avail { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; }
.avail.free { color: var(--ok); }
.avail.busy { color: var(--warn); }
.avail.partial { color: var(--warn); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input, .filters select { width: auto; flex: 1 1 130px; padding: 8px 10px; }
/* 12px label text only on desktop: on phones the max-width:480px rule
   above forces 16px so iOS does not auto-zoom into filter fields. */
@media (min-width: 481px) {
  .filters input, .filters select { font-size: 12px; }
}
.filters .btn, .filters button { flex: 0 0 auto; }
/* QC fix (60-min cycle, HIGH T2-H2): visible caption labels above discover
   filter inputs - sighted users (esp. on a phone on set) need to see which
   box holds which value after placeholders vanish. */
.f-wrap { display:flex; flex-direction:column; gap:2px; flex:1 1 130px; min-width:110px; }
.f-cap { font-size:11px; line-height:1.2; color:var(--muted); }
.f-wrap input, .f-wrap select { width:100%; flex:none; }
.select-bar {
  background: var(--action); color: #fff; border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  /* QC fix (60-min cycle, HIGH T2-H8): keep the "Request day rates" bar
     visible while scrolling 50 result cards on a phone. */
  position: sticky; top: 8px; z-index: 60;
}
.select-bar .btn { background: #fff; color: var(--action); border-color: #fff; }

/* ---------- approval chains ---------- */
.sign-section { border: 1.5px solid var(--action); border-radius: var(--radius); }
.sign-head { display: flex; align-items: center; gap: 8px; }
.count-badge {
  font-size: 11px; font-weight: 700; background: var(--action); color: #fff;
  border-radius: 12px; padding: 2px 10px;
}
.chain-section { border: 1.5px solid var(--action); border-radius: var(--radius); padding: 16px; margin: 22px 0; background: var(--surface); box-shadow: var(--shadow); }
.chain-section h2 { font-size: 18px; }
.chain-item { border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; margin-bottom: 10px; background: var(--surface); }
.chain-item:last-child { margin-bottom: 0; }
.chain-steps { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.chain-arrow { color: var(--silver); font-size: 12px; }
.chain-action {
  background: var(--action); color: #fff; border: none; border-radius: 14px;
  padding: 6px 14px; font-size: 11px; font-weight: 700; cursor: pointer;
  font-family: var(--sans); min-height: 44px; display: inline-flex; align-items: center;
}
.chain-action:hover { opacity: 0.88; }

/* ---------- calendar ---------- */
.cal, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
/* QC41 (60-min cycle, LOW T2-LOW4): --faint (#7D7564) was 4.3:1 on white,
   below WCAG AA 4.5:1 for these functional 10px day-of-week headers.
   Darkened here only; other --faint uses are decorative. */
.cal .dow { text-align: center; font-size: 10px; color: #6b6353; font-weight: 600; padding: 4px 0; }
.cal .day, .cal-day {
  aspect-ratio: 1; border-radius: 9px; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; cursor: pointer; background: var(--surface); padding: 0;
  font-family: var(--sans); color: var(--ink);
}
.cal .day.dim { color: var(--silver); cursor: default; }
.cal .day.free, .cal-day.avail { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.cal .day.off { background: var(--line-soft); color: var(--faint); }
.cal .day.part, .cal-day.partial { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.cal .day.booked, .cal-day.booked { background: var(--ink); color: #fff; font-weight: 700; cursor: default; }
.cal-day.busy { background: var(--line-soft); color: var(--faint); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

/* ---------- misc ---------- */
.progress { height: 8px; background: var(--line-soft); border-radius: 5px; overflow: hidden; }
.progress > div { height: 100%; background: var(--action); }
.progress.hot > div { background: var(--danger); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 0; }
.divider { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt { margin-top: 14px; }
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.space-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.otp-box { font-size: 30px; letter-spacing: 8px; text-align: center; font-weight: 700; font-family: var(--serif); }

/* QC fix (60-min cycle, T2 L3): role grids fixed at 2 columns
   (join page, add-role page) collapse to 1 column on small phones.
   Use class="role-grid cols-2" instead of inline grid-template-columns. */
.role-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 480px) {
  .role-grid, .role-grid.cols-2 { grid-template-columns: 1fr; }
}
/* ---------- responsive ---------- */
/* QC fix: mobile-only nav items (e.g. Sign out) are hidden on desktop. */
.mobile-only { display: none; }
@media (max-width: 1080px) {
  .role-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
  .person-grid { grid-template-columns: repeat(2, 1fr); }
  .doodle-strip { grid-template-columns: 1fr; }
  .layer-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding: 52px 0 40px; }
  .hero h1 { font-size: 38px; }
  .stats-in { grid-template-columns: 1fr; }
}
/* QC fix (60-min cycle, HIGH U-H5): responsive two-column grids that
   collapse on phones. Inline grid-template-columns used to beat the
   760px media query and crush the QC review screen and pay forms on
   phones. Use these classes instead of inline grid styles. */
.grid-cols-video { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.grid-cols-2r { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static; flex-direction: row;
    align-items: center; overflow-x: auto; padding: 10px 12px; gap: 8px;
  }
  .brand { font-size: 17px; }
  .company, .userbox { display: none; }
  .mobile-only { display: block; }
  .sidebar nav { flex-direction: row; }
  .sidebar nav a { white-space: nowrap; padding: 12px 14px; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
  .content { padding: 16px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .grid-cols-video, .grid-cols-2r { grid-template-columns: 1fr; }
  .person-grid { grid-template-columns: 1fr; }
  .form-row, .form-row.cols-3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 8px; }
  .journey-track { grid-template-columns: repeat(2, 1fr); }
  .j-stage { padding: 22px 6px 4px; }
}

/* ================= v6 motion layer =================
   Paper-like and classy: soft entrances, count-ups, star pops,
   hand-drawn underline draw-ins. Never flashy. */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ---- staggered fade-slide entrance (hidden state only when JS runs) ---- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---- hover lift for cards ---- */
.card.lift, .person-card { transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; }
.card.lift:hover, .person-card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(28,27,23,.05), 0 16px 34px rgba(28,27,23,.09); }
.card.lift { cursor: default; }

/* ---- animated star ratings ---- */
.stars { display: inline-flex; gap: 4px; align-items: center; }
.stars .star { display: inline-block; }
.js .stars .star { opacity: 0; transform: scale(0.3) rotate(-28deg); }
.stars .star svg { display: block; }
.stars .star:not(.lit) svg path { fill: none; stroke: var(--silver); stroke-width: 4; stroke-linejoin: round; }
.stars .star.lit svg path { fill: var(--ink); }
.stars.in .star.lit {
  animation: starPop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) forwards;
  animation-delay: var(--d, 0s);
}
.stars.in .star:not(.lit) {
  animation: starFade 0.45s ease forwards;
  animation-delay: calc(var(--d, 0s) + 0.08s);
}
@keyframes starPop {
  0% { opacity: 0; transform: scale(0.3) rotate(-28deg); }
  60% { opacity: 1; transform: scale(1.18) rotate(6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes starFade { to { opacity: 1; transform: none; } }
.stars.big { gap: 7px; }

/* ---- hand-drawn underline draw-in ---- */
.draw-head { position: relative; display: inline-block; margin-bottom: 14px; }
.draw-head .draw { display: block; margin-top: 2px; }
.draw-head .draw path {
  fill: none; stroke: var(--action); stroke-width: 3; stroke-linecap: round;
  transition: stroke-dashoffset 0.9s ease 0.15s;
}
.draw.in path { stroke-dashoffset: 0 !important; }

/* ---- count-up numerals ---- */
.stat .num, .count-num { font-variant-numeric: tabular-nums; }

/* ---- filter fields: filled state ---- */
.filters input.has-val, .filters select.has-val {
  border-color: var(--action);
  background: var(--chip-sel);
  color: var(--action);
  font-weight: 600;
}

/* ================= profile cover ================= */
.profile-cover {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 18px;
}
.cover-pattern { display: block; width: 100%; height: 148px; }
.cover-scene { display: block; width: 100%; height: 168px; }
.cover-inner {
  display: flex; gap: 22px; align-items: center;
  padding: 0 28px 24px; margin-top: -52px; position: relative;
  flex-wrap: wrap;
}
.avatar-ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.avatar-ring svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.avatar-ring .avatar {
  position: absolute; inset: 14px; width: auto; height: auto;
  font-size: 34px; border-radius: 50%;
}
.avatar-ring .avatar img { width: 100%; height: 100%; object-fit: cover; }
.cover-id h1 { margin: 0 0 2px; font-size: 30px; display: flex; align-items: center; gap: 10px; }
.cover-id .eyebrow { margin-bottom: 6px; display: flex; align-items: center; gap: 8px; color: var(--action); }
.cover-id .sub { margin: 4px 0 8px; }
.cover-rating { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.cover-rating .big-num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cover-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ratings detail card */
.rating-summary { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.rating-summary .big { font-size: 52px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.rating-note { font-size: 13px; color: var(--muted); max-width: 42ch; }

/* section spacing for profile */
.profile-sec { margin-top: 30px; }

@media (max-width: 760px) {
  .cover-inner { padding: 0 18px 20px; margin-top: -44px; gap: 16px; }
  .avatar-ring { width: 108px; height: 108px; }
  .cover-actions { margin-left: 0; }
  .rating-summary .big { font-size: 40px; }
}

/* ---------- v12 project tree stage strip ---------- */
.stage-strip { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.stage-dot { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; border: 2px solid var(--line, #e5ddc9); color: var(--faint, #8a8471); background: transparent; }
.stage-dot.done { border-color: var(--ok, #2e7d4f); color: var(--ok, #2e7d4f); }
.stage-dot.current { border-color: var(--action, #2E3D6B); background: var(--action, #2E3D6B); color: #fff; }

/* ---------- v29 money veil: masked financials + consent reveal ---------- */
[data-veil] { font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.veil-toggle { cursor: pointer; border: 1px solid var(--line, #e5ddc9); background: var(--card, #fff);
  border-radius: 8px; padding: 4px 10px; font-size: 15px; line-height: 1;
  min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.veil-toggle:hover { border-color: var(--action, #2E3D6B); }
.veil-modal-backdrop { position: fixed; inset: 0; background: rgba(20,18,12,.55); z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.veil-modal { background: var(--card, #fff); border-radius: 14px; max-width: 400px; width: 100%;
  padding: 26px 24px; text-align: center; box-shadow: 0 18px 60px rgba(0,0,0,.3); }
.veil-modal h3 { margin: 0 0 10px 0; font-size: 18px; }
.veil-modal p { color: var(--muted, #6b6455); font-size: 14px; line-height: 1.6; margin: 0 0 6px 0; }
.veil-count { font-weight: 700; color: var(--danger, #b3261e); font-size: 15px; margin: 8px 0 16px 0; }
.veil-actions { display: flex; gap: 10px; justify-content: center; }

/* QC fix (60-min cycle, HIGH T2-H1/T2-H2): required-field markers and
   field-adjacent validation errors on the signup wizard. */
.req { color: var(--danger, #b3261e); font-weight: 700; margin-left: 2px; }
.field-error { color: var(--danger, #b3261e); font-size: 13px; font-weight: 600; margin: 6px 0 0; }
.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; }
/* QC fix (60-min cycle, MEDIUM T1-M4): sign-out is a POST form now - make
   the submit button look like the link it replaced. */
.mobile-only button.linklike { display: block; width: 100%; text-align: left;
  padding: 12px 0; min-height: 44px; }
/* QC36 (60-min cycle, MEDIUM T2-M3): the mobile-only Sign out was an ~18px
   tap target. Scoped rule above; the global .linklike stays inline. */
button.linklike { background: none; border: none; padding: 0; color: inherit;
  font: inherit; cursor: pointer; text-decoration: underline; }
/* QC fix (60-min cycle, LOW T2): the PII reveal eye buttons had no sizing -
   tiny tap targets on phones. 44px minimum touch target. */
.pii-eye { min-width: 44px; min-height: 44px; font-size: 18px; line-height: 1;
  background: none; border: none; cursor: pointer; padding: 8px; vertical-align: middle; }
/* QC fix (60-min cycle, MEDIUM T2): skip link for keyboard users, visually
   hidden until focused. Rendered for logged-in users in base.html. */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--action); color: #fff; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600; text-decoration: none; }
.skip-link:focus { left: 0; }

/* Join page 5-tile grid: compact to fit card */
#role-grid { gap: 10px; }
#role-grid a.role-card { padding: 20px 8px; }
#role-grid a.role-card strong { font-size: 11px; letter-spacing: 2px; }
