* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: var(--fw-regular) var(--fs-body)/var(--lh-body) var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--heading); font-weight: var(--fw-bold); line-height: var(--lh-tight); margin: 0; }
button, input, select, textarea { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cs-blue-soft); outline-offset: 2px; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu svg circle { fill: currentColor; stroke: none; }

.btn--sm { padding: 9px 18px; font-size: var(--fs-small); }
.link { background: none; border: 0; color: var(--primary); font: var(--fw-medium) var(--fs-small) var(--font); cursor: pointer; padding: 4px; text-decoration: underline; text-underline-offset: 3px; }
.iconbtn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: var(--bw) solid var(--border); border-radius: 50%; background: var(--surface); cursor: pointer; box-shadow: 2px 2px 0 var(--cs-ink); transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast); }
.iconbtn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--cs-ink); }
.iconbtn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--cs-ink); }

/* ---------- Header ---------- */
.top { background: var(--surface); border-bottom: var(--bw) solid var(--border); position: sticky; top: 0; z-index: 20; }
.top__in { max-width: 1440px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand__logo { height: 52px; width: auto; display: block; }
.brand__title { font: var(--fw-bold) 18px/1 var(--font); background: var(--highlight); color: var(--cs-ink); border: 2px solid var(--border); border-radius: var(--r-pill); padding: 6px 14px; box-shadow: 2px 2px 0 var(--cs-ink); }
.brand__sub { font-size: var(--fs-small); color: var(--text-muted); padding-left: 12px; border-left: 1.5px solid var(--cs-gray-100); white-space: nowrap; }
.top__actions { display: flex; gap: 12px; align-items: center; flex: 0 0 auto; }
.menu { position: relative; }
.menu__list { position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: var(--bw) solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sticker); min-width: 250px; padding: 6px; z-index: 30; }
.menu__list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: var(--r-sm); font-size: var(--fs-small); cursor: pointer; }
.menu__list button:hover { background: var(--cs-sky); }
.menu__who { border-top: 1.5px dashed var(--cs-gray-100); margin-top: 6px; padding: 8px 12px 4px; font-size: var(--fs-caption); color: var(--text-muted); word-break: break-all; }

/* ---------- Layout ---------- */
.layout { max-width: 1440px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }

/* ---------- Filters ---------- */
.filters { background: var(--surface); border: var(--bw) solid var(--border); border-radius: var(--r-lg); position: sticky; top: 88px; max-height: calc(100vh - 108px); display: flex; flex-direction: column; overflow: hidden; }
.filters__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 10px; gap: 8px; }
.filters__head h2 { font-size: var(--fs-h3); margin-right: auto; }
.filters__close, .filters__foot { display: none; }
.filters__body { overflow: auto; padding: 0 18px 12px; overscroll-behavior: contain; }
.facet { border-top: 1.5px dashed var(--cs-gray-100); padding: 12px 0; }
.facet h3 { font-size: var(--fs-small); color: var(--text); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.facet h3 small { color: var(--primary); font-weight: var(--fw-medium); font-size: var(--fs-caption); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 2px solid var(--border); background: var(--surface); border-radius: var(--r-pill); padding: 3px 10px; font: var(--fw-medium) var(--fs-caption)/1.5 var(--font); cursor: pointer; transition: transform var(--dur-fast) var(--ease-pop), background var(--dur-fast); }
.chip:hover { transform: translateY(-1px); background: #FFFBE0; }
.chip b { font-weight: var(--fw-regular); color: var(--text-muted); margin-left: 4px; }
.chip.on { background: var(--primary); color: var(--on-primary); }
.chip.on b { color: var(--cs-sky); }
.range { display: flex; align-items: center; gap: 8px; }
.range input { width: 84px; padding: 7px 10px; font-size: var(--fs-small); border: 2px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.check { display: flex; gap: 8px; align-items: center; font-size: var(--fs-small); margin-top: 8px; cursor: pointer; }
.check input { accent-color: var(--cs-blue); width: 16px; height: 16px; margin: 0; }
.more { margin-top: 6px; }
.fgroup { border-top: var(--bw) solid var(--border); margin-top: 6px; }
.fgroup > summary { list-style: none; cursor: pointer; padding: 12px 0 4px; font-weight: var(--fw-bold); color: var(--heading); display: flex; justify-content: space-between; align-items: center; }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after { content: '▾'; transition: transform var(--dur); }
.fgroup[open] > summary::after { transform: rotate(180deg); }
.fgroup > summary small { font-weight: var(--fw-regular); color: var(--text-muted); font-size: var(--fs-caption); margin-left: 6px; }

.results { min-width: 0; }
/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 4px 14px 2px; margin-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; border: var(--bw) solid var(--border); background: var(--surface); border-radius: var(--r-pill); padding: 8px 16px; font: var(--fw-bold) var(--fs-small)/1.2 var(--font); cursor: pointer; transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast); }
.tab:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--cs-ink); }
.tab .n { font-weight: var(--fw-medium); font-size: var(--fs-caption); background: var(--cs-cream); border: 1.5px solid var(--border); border-radius: var(--r-pill); padding: 0 7px; }
.tab.on { background: var(--cs-ink); color: var(--cs-white); box-shadow: 3px 3px 0 var(--cs-yellow); }
.tab.on .n { background: var(--highlight); color: var(--cs-ink); }

/* ---------- Search ---------- */
.searchbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.search { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: var(--bw) solid var(--border); border-radius: var(--r-pill); padding: 0 16px; min-height: 48px; transition: box-shadow var(--dur-fast); }
.search:focus-within { box-shadow: var(--shadow-sticker-yellow); }
.search svg { color: var(--text-muted); flex: 0 0 auto; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: var(--fs-body); min-width: 0; padding: 10px 0; }
.search__kbd { font: var(--fw-medium) var(--fs-caption) var(--font); border: 1.5px solid var(--cs-gray); color: var(--text-muted); border-radius: 6px; padding: 0 7px; }
.searchbar__sort { border-radius: var(--r-pill); padding: 0 16px; font-size: var(--fs-small); cursor: pointer; }
.filterbtn { display: none; }
.filterbtn .count { background: var(--highlight); color: var(--cs-ink); border: 1.5px solid var(--border); border-radius: var(--r-pill); padding: 0 7px; margin-left: 4px; font-size: var(--fs-caption); }
.seg { display: flex; border: var(--bw) solid var(--border); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 0 18px; font: var(--fw-medium) var(--fs-small) var(--font); cursor: pointer; }
.seg button.on { background: var(--cs-ink); color: var(--cs-white); }
.summary { margin: 18px 0 8px; font-size: var(--fs-small); color: var(--text-muted); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.summary strong { color: var(--heading); font-size: var(--fs-h2); line-height: 1; }
.activechips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.activechips:empty { display: none; }
.activechips .chip { background: var(--cs-sky); }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.pcard { background: var(--surface); border: var(--bw) solid var(--border); border-radius: var(--r-lg); padding: 16px 16px 12px; box-shadow: 4px 4px 0 var(--cs-gray-100); cursor: pointer; display: flex; flex-direction: column; gap: 12px; position: relative; transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast); }
.pcard:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-sticker-yellow); }
.pcard.picked { box-shadow: var(--shadow-sticker); background: #FFFDF0; }
.pcard.dim { opacity: .7; }
.pcard__top { display: flex; gap: 12px; align-items: center; padding-right: 32px; }
.avatar { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-weight: var(--fw-bold); font-size: var(--fs-h3); color: var(--cs-white); background: var(--cs-blue-soft); }
.avatar.doc { background: var(--cs-navy); }
.avatar--lg { width: 64px; height: 64px; font-size: 28px; }
.pname { font-weight: var(--fw-bold); color: var(--heading); line-height: 1.3; }
.pname .nick { font-weight: var(--fw-regular); color: var(--text-muted); font-size: var(--fs-small); }
.pmeta { font-size: var(--fs-caption); color: var(--text-muted); }
.role { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-small); }
.role__main { font-weight: var(--fw-bold); }
.role__sub { color: var(--text-muted); display: flex; gap: 6px; align-items: center; }
.role__sub svg { flex: 0 0 auto; }
.pick { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border: 2px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; display: grid; place-items: center; font-size: 15px; line-height: 1; padding: 0; transition: transform var(--dur-fast) var(--ease-pop); }
.pick:hover { transform: scale(1.1); background: #FFFBE0; }
.pick.on { background: var(--highlight); }
.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge { font-size: var(--fs-caption); padding: 1px 9px; border-radius: var(--r-pill); border: 1.5px solid var(--border); background: var(--cs-cream); white-space: nowrap; }
.badge--sky { background: var(--cs-sky); }
.badge--hot { background: var(--highlight); }
.badge--warn { background: var(--danger); color: var(--cs-white); border-color: var(--danger); }
.pfoot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-caption); color: var(--text-muted); border-top: 1.5px dashed var(--cs-gray-100); padding-top: 10px; }
.stars { color: var(--cs-ink); letter-spacing: 1px; }

/* ---------- Table ---------- */
.tablewrap { background: var(--surface); border: var(--bw) solid var(--border); border-radius: var(--r-lg); overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--cs-gray-100); white-space: nowrap; }
th { background: var(--cs-sky); color: var(--heading); position: sticky; top: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #FFFBE0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 48px 16px; background: var(--surface); border: var(--bw) dashed var(--border); border-radius: var(--r-lg); }
.empty img { width: 96px; height: auto; }
.empty h3 { margin: 12px 0 6px; }
.skeleton { height: 210px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface) 25%, var(--cs-gray-100) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border: var(--bw) solid var(--cs-gray-100); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Shortlist bar ---------- */
.shortbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--cs-ink); color: var(--cs-white); border-radius: var(--r-pill); padding: 8px 10px 8px 22px; display: flex; gap: 10px; align-items: center; box-shadow: 4px 4px 0 var(--cs-yellow); z-index: 25; white-space: nowrap; animation: pop var(--dur) var(--ease-pop); }
@keyframes pop { from { transform: translate(-50%, 20px); opacity: 0; } }
.shortbar .link { color: var(--cs-sky); }
.shortbar .btn { box-shadow: none; }

/* ---------- Drawer ---------- */
.drawer, .modal { position: fixed; inset: 0; z-index: 40; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(22, 20, 15, .45); animation: fade var(--dur); }
@keyframes fade { from { opacity: 0; } }
.drawer__panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(580px, 100%); background: var(--bg); border-left: var(--bw) solid var(--border); overflow: auto; animation: slide var(--dur) ease-out; outline: 0; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.dbar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: var(--bg); border-bottom: 1.5px dashed var(--cs-gray-100); }
.dbody { padding: 18px 24px 28px; }
.dhead { display: flex; gap: 16px; align-items: center; }
.dhead h2 { font-size: var(--fs-h2); }
.dsec { background: var(--surface); border: var(--bw) solid var(--border); border-radius: var(--r-md); padding: 14px 16px; margin-top: 16px; }
.dsec h3 { font-size: var(--fs-body); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dsec .facts { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: var(--fs-small); margin: 0; }
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; min-width: 0; }
.phone { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.phone code { font: var(--fw-bold) var(--fs-small) var(--font); letter-spacing: .5px; white-space: nowrap; }
.phone a { font-size: var(--fs-small); }
.proj { border: 2px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; margin-top: 10px; font-size: var(--fs-small); }
.proj__t { font-weight: var(--fw-bold); color: var(--heading); display: flex; justify-content: space-between; gap: 8px; }
.ref { color: var(--primary); cursor: pointer; text-decoration: underline; }
.ractions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ratebtn { background: none; border: 0; font-size: 22px; cursor: pointer; padding: 0 1px; line-height: 1; transition: transform var(--dur-fast) var(--ease-pop); }
.ratebtn:hover { transform: scale(1.2); }
.pre { white-space: pre-line; }
.statussel { font-size: var(--fs-small); padding: 6px 10px; border-radius: var(--r-pill); border: 2px solid var(--border); background: var(--surface); cursor: pointer; }
.hist { margin: 6px 0 0; padding-left: 18px; font-size: var(--fs-caption); color: var(--text-muted); }

/* ---------- Modal form ---------- */
.modal__panel { position: absolute; left: 50%; top: 4vh; transform: translateX(-50%); width: min(760px, 94vw); max-height: 92vh; display: flex; flex-direction: column; background: var(--surface); border: var(--bw) solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sticker); overflow: hidden; animation: pop2 var(--dur) var(--ease-pop); }
@keyframes pop2 { from { transform: translate(-50%, 16px); opacity: 0; } }
.fhead { padding: 20px 24px 8px; }
.fhead h2 { font-size: var(--fs-h2); }
.fbody { overflow: auto; padding: 0 24px 16px; }
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.fgrid .span2 { grid-column: span 2; } .fgrid .span3 { grid-column: 1 / -1; }
.field label { display: block; font-size: var(--fs-caption); font-weight: var(--fw-bold); margin-bottom: 4px; }
.field .input { width: 100%; padding: 9px 12px; font-size: var(--fs-small); }
.field textarea.input { min-height: 72px; resize: vertical; }
.ftitle { grid-column: 1 / -1; font-weight: var(--fw-bold); color: var(--heading); margin-top: 12px; border-bottom: 1.5px dashed var(--cs-gray-100); padding-bottom: 4px; }
.factions { display: flex; justify-content: flex-end; gap: 12px; padding: 14px 24px; border-top: 1.5px dashed var(--cs-gray-100); background: var(--surface); }
.hint { font-size: var(--fs-caption); color: var(--text-muted); }

.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); background: var(--highlight); border: var(--bw) solid var(--border); border-radius: var(--r-pill); padding: 8px 20px; font-weight: var(--fw-bold); font-size: var(--fs-small); z-index: 60; box-shadow: var(--shadow-sticker); max-width: 92vw; text-align: center; }
.toast--err { background: var(--danger); color: var(--cs-white); }
body.busy { cursor: progress; }
body.busy .factions .btn:not(.btn--ghost) { opacity: .6; pointer-events: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .brand__sub { display: none; } }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 0; }
  .filters { width: 100%; }
  .filterbtn { display: inline-flex; align-items: center; }
  .filters { position: fixed; inset: 0; top: auto; height: 88vh; max-height: none; border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0; z-index: 45; transform: translateY(105%); transition: transform var(--dur) ease-out; box-shadow: 0 -8px 0 rgba(22, 20, 15, .25); }
  body.filters-open .filters { transform: none; }
  body.filters-open::after { content: ''; position: fixed; inset: 0; background: rgba(22, 20, 15, .45); z-index: 44; }
  .filters__close { display: inline-grid; width: 36px; height: 36px; box-shadow: none; }
  .filters__foot { display: block; padding: 12px 18px 16px; border-top: 1.5px dashed var(--cs-gray-100); }
  .filters__foot .btn { width: 100%; }
}
@media (max-width: 640px) {
  .top__in { padding: 8px 14px; }
  .brand__logo { height: 34px; }
  .brand__title { font-size: 15px; padding: 5px 11px; }
  #btnAdd { padding: 8px 14px; }
  .searchbar { gap: 8px; }
  .search { flex-basis: 100%; min-height: 44px; }
  .search__kbd { display: none; }
  .searchbar__sort { flex: 1; min-height: 40px; }
  .seg button { padding: 0 12px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .dbody { padding: 14px 16px 24px; }
  .dsec .facts { grid-template-columns: 112px 1fr; }
  .dhead h2 { font-size: 22px; }
  .fgrid { grid-template-columns: 1fr 1fr; }
  .fgrid .span2, .fgrid .span3 { grid-column: 1 / -1; }
  .modal__panel { top: auto; bottom: 0; width: 100%; max-height: 94vh; border-radius: var(--r-lg) var(--r-lg) 0 0; transform: translateX(-50%); }
  .shortbar { left: 12px; right: 12px; transform: none; bottom: 12px; padding: 8px 10px 8px 16px; overflow-x: auto; }
  @keyframes pop { from { transform: translateY(20px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Login ---------- */
.login { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: grid; place-items: center; padding: 20px; overflow: auto;
  background-image: radial-gradient(var(--cs-gray-100) 1.5px, transparent 1.5px); background-size: 22px 22px; }
.login__card { width: min(400px, 100%); background: var(--surface); border: var(--bw) solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sticker-yellow); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login__title { margin: 4px 0 2px; }
.login__logo { width: 100%; max-width: 300px; height: auto; display: block; }
.login__card .hint { margin: 0; }
.login__card .field .input { width: 100%; padding: 11px 14px; }
.login__card .field .hint { display: block; margin-top: 4px; }
.login__card .btn { margin-top: 4px; }
.login__err { margin: 0; color: var(--danger); font-weight: var(--fw-bold); font-size: var(--fs-small); }
body.locked .top, body.locked .layout { visibility: hidden; }

/* ---------- AI search ---------- */
.search { padding-right: 6px; }
.aibtn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--border); border-radius: var(--r-pill); background: var(--surface); padding: 6px 14px; font: var(--fw-bold) var(--fs-small)/1 var(--font); cursor: pointer; transition: transform var(--dur-fast) var(--ease-pop), background var(--dur-fast); }
.aibtn span { color: var(--cs-blue-soft); font-size: 15px; }
.aibtn:hover { transform: translateY(-1px); background: #F3F0FF; }
.aibtn.on { background: var(--cs-navy); color: var(--cs-white); }
.aibtn.on span { color: var(--cs-yellow); }
.search--ai { border-color: var(--cs-navy); box-shadow: 4px 4px 0 var(--cs-blue-soft); background: #FBFAFF; }
.search--ai .search__kbd { display: none; }
.aibox { margin-top: 14px; background: linear-gradient(135deg, #F3F0FF, #FFF6FB); border: var(--bw) solid var(--border); border-radius: var(--r-md); padding: 12px 16px; font-size: var(--fs-small); }
.aibox__row { display: flex; gap: 12px; align-items: flex-start; }
.aibox__row > div { flex: 1; min-width: 0; }
.aibox__row b { color: var(--heading); }
.aibox__note { margin-top: 6px; padding-top: 6px; border-top: 1.5px dashed var(--cs-gray-100); }
.spark { color: var(--cs-blue-soft); font-size: 20px; line-height: 1.2; }
.spark.spin { display: inline-block; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.chip--ai { background: #F3F0FF !important; }
.aireason { font-size: var(--fs-small); border-left: 4px solid var(--cs-blue-soft); background: #F7F5FF; border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 6px 10px; }
.aireason b { font-size: var(--fs-caption); margin-right: 4px; color: var(--cs-navy); }
.aireason.partial { border-left-color: var(--cs-gray); background: var(--cs-cream); }
.aireason.partial b { color: var(--text-muted); }
@media (max-width: 640px) { .aibtn { padding: 6px 10px; } }

/* ---------- Team ratings ---------- */
.star5 { position: relative; display: inline-block; font-size: 14px; line-height: 1; letter-spacing: 1px; color: var(--cs-gray-100); white-space: nowrap; vertical-align: -1px; }
.star5::before { content: '★★★★★'; }
.star5__fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: #F5B700; }
.star5__fill::before { content: '★★★★★'; }
.star5--lg { font-size: 18px; }
.rpill { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-caption); color: var(--text-muted); white-space: nowrap; }
.rpill b { color: var(--text); font-size: var(--fs-small); }
.rpill--none { font-style: normal; opacity: .75; }
.rsum { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--fw-regular); }
.rsum b { font-size: var(--fs-h3); color: var(--text); }
.myrate { background: #FFFBEA; border: 2px solid var(--border); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.myrate__head { font-size: var(--fs-small); }
.myrate__stars { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.myrate__stars .ratebtn { font-size: 28px; color: var(--cs-gray); padding: 0 2px; }
.myrate__stars .ratebtn.on { color: #F5B700; }
.myrate__stars .hint { margin-left: 8px; }
.myrate textarea.input { width: 100%; padding: 9px 12px; font-size: var(--fs-small); resize: vertical; min-height: 60px; }
.myrate__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.myrate__actions > span.hint { margin-right: auto; }
.myrate__actions .btn:disabled { opacity: .5; cursor: not-allowed; }
.rlist { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rlist li { border-top: 1.5px dashed var(--cs-gray-100); padding-top: 10px; font-size: var(--fs-small); }
.rlist__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rlist p { margin: 4px 0 0; }

/* ---------- Import ---------- */
.modal__panel.imp { width: min(1100px, 96vw); }
.imp__step { margin-top: 16px; }
.imp__step h3 { font-size: var(--fs-body); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.imp__n { width: 24px; height: 24px; border-radius: 50%; background: var(--cs-ink); color: var(--cs-white); display: inline-grid; place-items: center; font-size: var(--fs-caption); }
.imp__drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: var(--bw) dashed var(--border); border-radius: var(--r-md); background: var(--cs-cream); cursor: pointer; text-align: center; transition: background var(--dur-fast); }
.imp__drop:hover, .imp__drop.over { background: var(--cs-sky); }
.imp__map { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.imp__col { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 2px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; background: var(--surface); }
.imp__col > div { min-width: 0; display: flex; flex-direction: column; }
.imp__col b { font-size: var(--fs-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp__col .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp__col select { width: 170px; flex: 0 0 auto; padding: 6px 8px; font-size: var(--fs-caption); }
.imp__col.off { border-color: var(--cs-gray-100); background: var(--cs-cream); }
.imp__col.off b { color: var(--text-muted); }
.imp__sum { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; margin-bottom: 10px; font-size: var(--fs-small); }
.imp__sum b { font-size: var(--fs-h3); color: var(--heading); margin-right: 2px; }
.imp__table { max-height: 380px; }
.imp__table td { vertical-align: top; white-space: normal; }
.imp__table tr.skip td { opacity: .45; }
.imp__act { padding: 5px 8px; font-size: var(--fs-caption); }
.imp__warn { background: #FFF0F3; border: 2px solid var(--danger); border-radius: var(--r-sm); padding: 8px 12px; font-size: var(--fs-small); margin: 0 0 10px; }
@media (max-width: 640px) { .imp__map { grid-template-columns: 1fr; } .imp__col select { width: 140px; } }

/* ---------- Google sign-in ---------- */
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 12px 16px; border: var(--bw) solid var(--border); border-radius: var(--r-pill); background: #fff; color: #1f1f1f; text-decoration: none; font: var(--fw-bold) var(--fs-body)/1 var(--font); box-shadow: var(--shadow-sticker); transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast); }
.gbtn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--cs-ink); }
.gbtn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--cs-ink); }
#gBlock { display: flex; flex-direction: column; gap: 6px; }
#gBlock[hidden] { display: none !important; }
#gBlock .hint { text-align: center; }
.login__or { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: var(--fs-caption); }
.login__or::before, .login__or::after { content: ''; flex: 1; border-top: 1.5px dashed var(--cs-gray-100); }
.login__pw { display: flex; flex-direction: column; gap: 14px; }

/* ---------- switch between the two directories (interviewees / field agents) ---------- */
.appnav { display: flex; gap: 4px; padding: 4px; border: var(--bw) solid var(--border); border-radius: var(--r-pill); background: var(--cs-cream); margin-right: auto; margin-left: 8px; }
.appnav a { padding: 6px 14px; border-radius: var(--r-pill); text-decoration: none; color: var(--text); font: var(--fw-medium) var(--fs-small)/1.2 var(--font); white-space: nowrap; }
.appnav a:hover { background: var(--surface); }
.appnav a.on { background: var(--cs-ink); color: var(--cs-white); font-weight: var(--fw-bold); }
@media (max-width: 640px) { .appnav { margin-left: 0; } .appnav a { padding: 6px 10px; } }
.skillrow { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.bankbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.donebar { display: inline-block; width: 70px; height: 8px; border: 1.5px solid var(--border); border-radius: var(--r-pill); overflow: hidden; vertical-align: middle; margin-left: 6px; background: var(--surface); }
.donebar > span { display: block; height: 100%; background: var(--cs-sky); }
