/* Bowie Media Client Portal — design tokens (v2 minimal)
   White #FFFFFF · Mist #F6F6F5 · Fog #ECECEA · Line #E4E4E2 · Ink #1A1A1A · Slate #6E6E6E
   Record Red #FF2222 — accent ONLY: the tally dot, hover outlines, favorites, NEW.
   Display: Archivo (heavy, tight) · Body: Inter
   Media thumbnails keep a dark "film frame" matte; everything else is white/gray. */

:root {
  --ink: #1A1A1A;
  --ink-deep: #141414;
  --red: #FF2222;
  --bg: #FFFFFF;
  --mist: #F6F6F5;
  --fog: #ECECEA;
  --slate: #6E6E6E;
  --line: #E4E4E2;
  --white: #FFFFFF;
  --ok: #1D7A46;
  --warn: #9A6B00;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20,20,20,.04);
  --shadow-pop: 0 10px 40px rgba(20,20,20,.10);
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 15px; line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; }
h1 { font-weight: 800; letter-spacing: -.01em; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
[hidden] { display: none !important; }
.inline { display: inline; }
.muted { color: var(--slate); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.ta-r { text-align: right; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- the tally light ---------- */
.rec-dot { color: var(--red); font-size: .72em; vertical-align: .12em; }
.pulse { animation: rec 2.2s ease-in-out infinite; display: inline-block; }
@keyframes rec { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

/* ---------- chrome ---------- */
.topbar {
  background: var(--bg); color: var(--ink);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 40px); gap: 12px; position: sticky; top: 0; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); flex-shrink: 0; }
.topnav { display: flex; align-items: center; gap: 18px; min-width: 0; }
.topnav a { color: var(--slate); text-decoration: none; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.topnav a:hover { color: var(--ink); }
.topnav .btn { white-space: nowrap; }
.who { color: var(--slate); font-size: 12.5px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .topnav { gap: 12px; }
  .who { display: none; }
}

.page { min-height: 62vh; }
.footer {
  margin-top: 64px; border-top: 1px solid var(--line);
  padding: 22px clamp(16px, 4vw, 40px); display: flex; justify-content: space-between; gap: 12px;
  color: var(--slate); font-size: 13px; flex-wrap: wrap;
}
.footer a { color: var(--slate); }

.flashes { padding: 12px clamp(16px, 4vw, 40px) 0; display: grid; gap: 8px; max-width: 1240px; margin: 0 auto; }
.flash { border-radius: var(--radius); padding: 11px 14px; font-size: 14px; border: 1px solid var(--line); background: var(--bg); overflow-wrap: anywhere; }
.flash-ok { border-left: 3px solid var(--ok); }
.flash-err { border-left: 3px solid var(--red); }
.flash-warn { border-left: 3px solid var(--warn); }

/* ---------- buttons — quiet gray, red outline on hover ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 18px;
  background: var(--mist); color: var(--ink);
  font-weight: 600; font-size: 14px; text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .06s ease;
}
.btn:hover { border-color: var(--red); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fog); border-color: #DDDDDA; font-weight: 700; }
.btn-primary:hover { border-color: var(--red); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { border-color: var(--red); background: var(--mist); }
.btn-ghost-light { background: transparent; }
.btn-ghost-light:hover { border-color: var(--red); background: var(--mist); }
.btn-danger { background: transparent; color: #B00000; border-color: var(--line); }
.btn-danger:hover { border-color: var(--red); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-xs { padding: 3px 8px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---------- auth ---------- */
.auth-body { background: var(--bg); }
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 120px); }
.auth-hero {
  background: var(--mist); color: var(--ink); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 40px;
}
.auth-logo { width: min(190px, 44%); border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-tag { font-family: var(--display); font-weight: 700; letter-spacing: .22em; font-size: 12px; color: var(--slate); text-align: center; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.authwrap { display: flex; justify-content: center; padding: 9vh 20px 40px; }
.authcard { width: 100%; max-width: 420px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 30px; }
.authcard h1 { font-size: 24px; }
.authcard label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 5px; }
.authcard input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: var(--mist); }
.authcard input:focus { border-color: var(--ink); outline: none; background: var(--bg); }
.authcard .btn { margin-top: 20px; }
.authlinks { margin-top: 16px; font-size: 13.5px; }
@media (max-width: 800px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero { padding: 34px 20px; min-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-logo { width: 100px; }
}

/* ---------- marquee (client hero) ---------- */
.marquee { background: var(--mist); color: var(--ink); border-bottom: 1px solid var(--line); }
.marquee-inner {
  display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 560px);
  gap: clamp(20px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 40px);
  max-width: 1240px; margin: 0 auto;
}
.marquee-min .marquee-inner { grid-template-columns: 1fr; padding-block: 34px; }
.eyebrow { font-family: var(--display); font-weight: 700; letter-spacing: .24em; font-size: 11.5px; color: var(--slate); margin: 0 0 12px; }
.marquee-title { font-size: clamp(28px, 4.4vw, 52px); font-weight: 900; color: var(--ink); margin: 0 0 10px; letter-spacing: -.015em; }
.marquee-notes { color: var(--slate); max-width: 46ch; margin: 0 0 4px; }
.marquee-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.marquee-art .card-matte { box-shadow: var(--shadow-pop); }
@media (max-width: 860px) { .marquee-inner { grid-template-columns: 1fr; } .marquee-art { order: -1; } }

/* ---------- film-frame matte (stays dark on purpose) ---------- */
.card-matte {
  position: relative; aspect-ratio: 16 / 9; background: var(--ink-deep);
  border-radius: var(--radius); overflow: hidden;
}
.card-art { width: 100%; height: 100%; object-fit: cover; }
.card-art-icon { object-fit: contain; padding: 16%; opacity: .9; }
.card-matte .play {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px;
  border-radius: 50%; border: 0; background: rgba(20,20,20,.62); color: var(--white);
  font-size: 19px; padding-left: 4px; backdrop-filter: blur(2px);
  transition: box-shadow .15s, transform .12s;
}
.card-matte .play:hover { box-shadow: 0 0 0 2px var(--red); transform: scale(1.06); }
.play-lg { width: 74px; height: 74px; font-size: 24px; }
.new-badge {
  position: absolute; top: 10px; left: 10px; background: var(--white); color: var(--ink);
  font-family: var(--display); font-weight: 800; letter-spacing: .14em; font-size: 10.5px;
  padding: 5px 9px; border-radius: 999px;
}
.soon-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #bdbdbd; font-family: var(--display); font-weight: 800; letter-spacing: .3em; font-size: 13px;
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.03) 0 12px, transparent 12px 24px);
}
.is-soon .card-matte { opacity: .78; }
.is-soon .card-art { filter: grayscale(1) brightness(.7); }

/* ---------- corner marks (pin + star) ---------- */
.card-marks { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; z-index: 2; }
.mark {
  width: 30px; height: 30px; border-radius: 999px; padding: 0;
  display: grid; place-items: center; font-size: 13px; line-height: 1;
  background: rgba(20,20,20,.28); color: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  cursor: pointer; opacity: .75;
  transition: opacity .15s, color .15s, background .15s, transform .1s;
}
.card:hover .mark, .mark:focus-visible { opacity: 1; }
.mark:hover { transform: scale(1.08); color: #fff; background: rgba(20,20,20,.42); }
/* active states stay quiet — a soft fill, not a solid badge */
.mark.is-fav { color: #FF6B6B; opacity: 1; }
.mark.pin .pin-glyph { filter: grayscale(1) brightness(2.6); opacity: .8; transition: filter .15s, opacity .15s; }
.mark.pin.is-on { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); opacity: 1; }
.mark.pin.is-on .pin-glyph { filter: none; opacity: 1; }
.card.is-pinned { border-color: #C9C9C6; }
.card-sm .card-marks { top: 6px; right: 6px; gap: 4px; }
.card-sm .mark { width: 25px; height: 25px; font-size: 12px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 0; }
.card-sm .tag-row .type-chip:nth-child(n+3) { display: none; }

/* ---------- admin tag suggestions ---------- */
.tag-suggest { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tag-suggest:empty { display: none; }
.chip-add { font-size: 11.5px; padding: 4px 10px; }
.chip-add.is-on, .chip-append.is-on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.tag-custom-wrap { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.tag-newrow { display: flex; gap: 6px; align-items: center; margin-top: 7px; }
.tag-newrow input { flex: 0 1 240px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; background: var(--mist); }
.tag-newrow input:focus { border-color: var(--ink); outline: none; background: var(--bg); }

/* ---------- admin danger zone (org settings) ---------- */
.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.danger-title { margin: 0 0 2px; font-weight: 600; font-size: 14px; }
.delete-confirm { border: 1px solid #EAC7C7; background: #FDF6F6; border-radius: 12px; padding: 14px; }
.delete-confirm .danger-title { color: #B00000; }
#archived-toggle.is-on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.list-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 2px; }
.list-tools #client-search { margin: 0; }

/* ---------- admin clients list ---------- */
.list-tools #client-search {
  flex: 1 1 240px; max-width: 360px; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; background: var(--mist); font-size: 14px;
}
.list-tools #client-search:focus { background: var(--bg); border-color: var(--ink); outline: none; }
.client-item { position: relative; border-bottom: 1px solid var(--line); }
.client-item:first-child { border-top: 1px solid var(--line); }
.client-item.is-off { opacity: .6; }
.client-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 46px 12px 4px;
  text-decoration: none; color: inherit;
}
.client-link:hover { background: var(--mist); }
.client-pin {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: #9a9a9a; opacity: .55;
  display: grid; place-items: center; font-size: 12px; backdrop-filter: none;
}
.client-item:hover .client-pin, .client-pin:focus-visible { opacity: 1; }
.client-pin.is-on { opacity: 1; background: var(--ink); border-color: var(--ink); }
.client-pin.is-on .pin-glyph { filter: none; }
.client-pin .pin-glyph { filter: grayscale(1) opacity(.7); }
.client-item.is-pinned { background: var(--mist); }
.empty-row { padding: 14px 4px; }

/* ---------- admin condensed collapsible rows ---------- */
.rows { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid var(--line); }
.row-item { border-bottom: 1px solid var(--line); }
.row-item.is-off { opacity: .6; }
.disc > summary { list-style: none; cursor: pointer; }
.disc > summary::-webkit-details-marker { display: none; }
.disc-sum {
  display: flex; align-items: center; gap: 12px; padding: 11px 4px;
}
.disc-sum:hover { background: var(--mist); }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.disc-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }
.disc-name { font-weight: 600; font-size: 14.5px; }
.disc-sub { font-size: 12.5px; color: var(--slate); overflow-wrap: anywhere; }
.disc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chev { color: var(--slate); font-size: 18px; transition: transform .15s ease; flex-shrink: 0; }
.disc[open] > summary .chev { transform: rotate(90deg); }
.disc-body { padding: 4px 4px 16px; }
.disc-body .stack-label { margin-top: 10px; }
.disc-body .invite-actions { margin-top: 12px; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.preview-link { text-decoration: none; }
@media (max-width: 560px) { .disc-sub { display: none; } }

.proj-settings { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.proj-settings > summary { list-style: none; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--slate); padding: 4px 0; }
.proj-settings > summary::-webkit-details-marker { display: none; }
.proj-settings > summary::before { content: '⚙ '; }
.proj-settings > summary:hover { color: var(--ink); }
.proj-settings[open] > summary { margin-bottom: 10px; }

/* ---------- admin client preview ---------- */
.preview-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: 1240px; margin: 0 auto; padding: 10px clamp(16px, 4vw, 40px);
  background: var(--ink); color: var(--white); border-radius: 0;
}
.preview-tag { font-family: var(--display); font-weight: 800; letter-spacing: .16em; font-size: 11px; }
.preview-bar .muted { color: rgba(255,255,255,.66); }
.preview-bar .btn { margin-left: auto; color: var(--white); border-color: rgba(255,255,255,.35); background: transparent; }
.preview-bar .btn:hover { border-color: var(--red); }
.addlink.admin-add { border-color: var(--ink); background: var(--bg); }
.proj-link { text-decoration: none; color: inherit; }
.proj-link:hover { color: var(--red); }
.proj-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- preview access bar ---------- */
.access-bar {
  max-width: 1240px; margin: 0 auto; padding: 7px clamp(16px, 4vw, 40px);
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line);
}
.access-label { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: var(--slate); text-transform: uppercase; white-space: nowrap; }
.access-names { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ---------- project banner + admin card tools ---------- */
.project-banner { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.project-banner img {
  width: 100%; max-height: 300px; object-fit: cover; border-radius: 0 0 16px 16px;
  aspect-ratio: 16 / 5; background: var(--ink-deep);
}
.admin-card-tools { display: inline-flex; gap: 6px; margin-left: auto; }
.archived-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--ink); color: #fff; font-family: var(--display); font-weight: 800;
  letter-spacing: .1em; font-size: 9.5px; padding: 5px 9px; border-radius: 999px;
}
.is-archived-card { opacity: .62; }
.is-archived-card:hover { opacity: 1; }

/* ---------- project status pill ---------- */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--display); font-weight: 700; font-size: 10.5px;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px 3px 8px; border-radius: 999px; border: 1px solid var(--line);
  white-space: nowrap; vertical-align: middle; line-height: 1.4;
}
.status-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.status-in_progress { color: var(--warn); background: #FBF4E2; border-color: #E7D4A8; }
.status-completed   { color: var(--ok);   background: #E7F3EC; border-color: #BFE0CC; }
.folder-head h2 .status-badge { font-size: 11px; transform: translateY(-2px); }
.marquee-status { margin: 6px 0 0; }

/* ---------- toolbar ---------- */
.toolbar {
  max-width: 1240px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 40px) 4px;
  display: grid; gap: 12px;
}
.toolbar input[type="search"] {
  width: 100%; max-width: 420px; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; background: var(--mist);
}
.toolbar input[type="search"]:focus { background: var(--bg); border-color: var(--ink); outline: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--mist); border-radius: 999px;
  padding: 6px 13px; font-size: 12.5px; font-weight: 600; color: var(--slate);
  transition: border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--red); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip-fav.is-on { background: var(--ink); border-color: var(--ink); }

/* ---------- strips & folders ---------- */
.strip, .folder, .contact-card { max-width: 1240px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 40px) 0; }
.strip-title, .folder-head h2 { font-size: 15px; font-weight: 800; letter-spacing: .2em; }
.folder-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; }
.folder-head h2 { letter-spacing: .04em; font-size: 20px; }
.folder-year { color: var(--red); margin-right: 10px; font-weight: 900; }
.strip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.strip-nav { display: flex; gap: 6px; align-items: center; }
.strip-nav .btn:disabled { opacity: .4; cursor: default; border-color: var(--line); }
.strip-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 190px); gap: 12px;
  overflow-x: auto; padding: 12px 2px 8px; scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
/* compact strip cards */
.strip-row .card-body { padding: 9px 10px 10px; gap: 3px; }
.strip-row .card-title { font-size: 13px; line-height: 1.3; }
.strip-row .card-meta { font-size: 11px; gap: 6px; }
.strip-row .type-chip { font-size: 10px; padding: 1px 6px; }
.strip-row .card-actions { padding-top: 6px; gap: 6px; }
.strip-row .btn-sm { padding: 5px 9px; font-size: 12px; }
.strip-row .fav { font-size: 15px; padding: 2px 4px; }
.strip-row .new-badge { font-size: 9.5px; padding: 4px 7px; top: 8px; left: 8px; }
.card-project {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--slate);
  text-decoration: none; border-bottom: 1px solid var(--line); align-self: flex-start;
}
.card-project:hover { color: var(--ink); border-bottom-color: var(--red); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; padding-top: 14px; }
.empty { color: var(--slate); padding: 18px 0; }

/* ---------- cards ---------- */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: border-color .15s ease; }
.card:hover { border-color: #D4D4D1; }
.card .card-matte { border-radius: 0; }
.card-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 15.5px; font-weight: 700; margin: 0; font-family: var(--body); }
.card-meta { display: flex; gap: 10px; align-items: center; margin: 0; color: var(--slate); font-size: 12.5px; flex-wrap: wrap; }
.type-chip { border: 1px solid var(--line); background: var(--mist); border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.card-notes { margin: 0; font-size: 13px; color: var(--slate); }
.client-added { margin: 0; font-size: 11.5px; color: var(--warn); font-weight: 600; }
.card-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.mark.fav .fav-glyph { display: none; }
.mark.fav::before { content: '\2606'; } /* outline star when not starred */
.mark.fav.is-fav::before { content: '\2605'; } /* filled star when starred */
.card-sm .card-notes, .card-sm .client-added { display: none; }

/* ---------- project cards ---------- */
.project-card { text-decoration: none; color: inherit; }
.card-title .folder-year { color: #B00000; margin-right: 6px; }
.project-card:hover { border-color: var(--red); }
.matte-link { display: block; }
.project-head-wrap .crumbs { margin: 0 0 8px; }
.project-head-wrap .folder-head { border-top: 0; padding-top: 0; }

/* ---------- team page ---------- */
.team { max-width: 860px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 40px) 0; }
.team-head h1 { font-size: 28px; margin: 0 0 4px; }
.team-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.team-head .muted { margin: 0; }

.invite-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--mist); padding: 18px; margin: 18px 0 8px; }
.invite-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.invite-fields label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.invite-fields input,
.invite-fields select {
  width: 100%; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--bg);
  height: 42px; box-sizing: border-box;
}
.invite-fields select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236E6E6E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.invite-fields input:focus,
.invite-fields select:focus { border-color: var(--ink); outline: none; }
.invite-legend { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin: 16px 0 8px; }
.invite-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.pick { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line);
        border-radius: 10px; background: var(--bg); font-size: 13.5px; cursor: pointer; }
.pick:hover { border-color: var(--red); }
.pick input { accent-color: var(--ink); }
@media (max-width: 620px) { .invite-fields { grid-template-columns: 1fr; } }

.people { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--line); }
.person { border-bottom: 1px solid var(--line); }
.person.is-off { opacity: .68; }
.person-row { display: flex; align-items: center; gap: 14px; padding: 16px 2px; flex-wrap: wrap; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--fog); color: var(--ink);
          display: grid; place-items: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.person-id { min-width: 180px; flex: 1 1 200px; }
.person-name { margin: 0; font-weight: 600; font-size: 15px; }
.person-mail { margin: 0; font-size: 13px; color: var(--slate); overflow-wrap: anywhere; }
.person-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; }
.role-pill { border: 1px solid var(--line); background: var(--mist); border-radius: 999px;
             padding: 3px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.role-manager { background: var(--ink); border-color: var(--ink); color: var(--white); }
.person-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.access-panel { border-top: 1px dashed var(--line); padding: 14px 2px 18px; }
@media (max-width: 640px) { .person-actions { margin-left: 0; width: 100%; } }

/* ---------- admin: sections, projects, file list, feed ---------- */
.admin-wide { max-width: 1040px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 38px; }
.section-head .admin-sub { margin: 0; }
.stack-label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; margin-top: 12px; }
.stack-label select, .w-full { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--bg); }
.w-auto { border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: var(--bg); font-size: 13.5px; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.seen-line { flex-basis: 100%; }

.proj { border: 1px solid var(--line); border-radius: 14px; margin: 12px 0; overflow: hidden; }
.proj-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--mist); }
.proj-id { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.proj-id h3 { margin: 0; font-size: 16px; }
.proj .access-panel { padding: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }

.filelist { list-style: none; margin: 0; padding: 0; }
.fileitem { display: flex; align-items: center; gap: 11px; padding: 8px 4px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.fileitem:first-child { border-top: 0; }
.fileitem .mini-art { width: 46px; flex-shrink: 0; }
.fileitem-id { flex: 1 1 220px; min-width: 0; }
.fileitem-title { margin: 0; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.fileitem-sub { margin: 3px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fileitem-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }

.more-options { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 12px; }
.more-options summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--slate); padding: 4px 0; }
.more-options summary:hover { color: var(--ink); }
.more-options[open] summary { margin-bottom: 12px; }
.cardform-grid.tight { margin-top: 14px; }
.check-stack { display: grid; gap: 8px; }

.feed { list-style: none; margin: 20px 0 0; padding: 0; }
.feed-day { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
            color: var(--slate); margin: 22px 0 6px; }
.feed-day:first-child { margin-top: 0; }
.feed-row { display: flex; gap: 12px; align-items: baseline; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.feed-time { color: var(--slate); font-size: 12.5px; flex: 0 0 68px; }
.feed-what { flex: 1 1 260px; }
.feed-obj { color: var(--slate); }
.feed-org { margin-left: auto; }

/* ---------- add-a-link ---------- */
.addlink { border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px; margin-top: 12px; background: var(--mist); }
.addlink-grid { display: grid; grid-template-columns: 1.2fr 1.6fr .8fr 1.2fr auto; gap: 8px; }
.addlink input, .addlink select { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: var(--bg); min-width: 0; }
.addlink input:focus, .addlink select:focus { border-color: var(--ink); outline: none; }
.hint { font-size: 12px; color: var(--slate); margin: 8px 0 0; }
@media (max-width: 860px) { .addlink-grid { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact-card {
  margin-top: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--mist); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px clamp(16px, 3vw, 32px); flex-wrap: wrap;
}
.contact-card h2 { margin: 0 0 4px; font-size: 19px; }

/* ---------- player modal ---------- */
.player { position: fixed; inset: 0; background: rgba(12,12,12,.9); z-index: 90; display: grid; place-items: center; padding: 18px; }
.player-box { width: min(1100px, 100%); }
.player-head { display: flex; justify-content: space-between; align-items: center; color: var(--white); padding: 0 2px 10px; font-family: var(--display); font-weight: 700; letter-spacing: .06em; }
.player-close { background: none; border: 0; color: var(--white); font-size: 20px; padding: 6px 10px; }
.player-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.player-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- admin ---------- */
.admin { max-width: 1100px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 40px) 0; }
.admin-head h1 { font-size: 28px; }
.crumbs { font-size: 13px; color: var(--slate); margin: 0 0 6px; }
.admin-sub { font-size: 14px; letter-spacing: .18em; font-weight: 800; margin: 40px 0 12px; text-transform: uppercase; }
.rowform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 16px; }
.rowform input, .rowform select { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--bg); }
.rowform input:focus, .rowform select:focus { border-color: var(--ink); outline: none; }
.rowform-sub { margin: 8px 0; }
.w-year { width: 92px; }
.table { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--mist); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.row-dim td { background: var(--mist); }
.row-sub td { background: var(--mist); border-top: 0; padding-top: 4px; }
.row-sub .rowform-sub { margin: 2px 0 10px; flex-wrap: wrap; }
.td-thumb { width: 74px; }
.mini-art { width: 64px; aspect-ratio: 16/9; object-fit: cover; border-radius: 5px; background: var(--ink-deep); }
.tag { display: inline-block; border: 1px solid var(--line); background: var(--mist); border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; margin: 1px 2px; color: var(--slate); }
.tag-hero { color: #B00000; border-color: #F6C6C6; background: var(--bg); }
.tag-client { color: var(--warn); border-color: #E7D4A8; background: var(--bg); }
.tag-dim { }
.folder-admin { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 6px 14px 14px; margin: 12px 0; }
.folder-admin summary { cursor: pointer; padding: 10px 0; display: flex; gap: 10px; align-items: baseline; }
.cardform { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); padding: 20px; }
.cardform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cardform-grid label { font-size: 13px; font-weight: 600; display: grid; gap: 5px; }
.cardform-grid input:not([type=checkbox]), .cardform-grid select { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--mist); width: 100%; }
.cardform-grid input:focus, .cardform-grid select:focus { border-color: var(--ink); outline: none; background: var(--bg); }
.cardform-wide { grid-column: 1 / -1; }
.check { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.check-inline { display: inline-flex !important; margin-top: 6px; }
.cardform-actions { display: flex; gap: 10px; margin-top: 18px; }
@media (max-width: 720px) { .cardform-grid { grid-template-columns: 1fr; } }

/* editing highlight */
.cardform.is-editing { border-color: var(--red); }
