/* DEFYLMTS — Briefing Room
   Layout idea: one dark sheet, the whole team as one ledger. Identity on the left, work to its right.
   Green means "act / selected / done". Orange means "late or urgent" and nothing else. */
:root {
  --black: #0A0A0A;        /* page */
  --charcoal: #1A1A1A;     /* raised surfaces */
  --white: #FFFFFF;
  --green: #8BFE64;        /* Kyalami Green — primary actions, selected controls */
  --orange: #CC5A32;       /* Racing Orange — urgency only */
  --panel: #111111;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .2);
  --t1: #FFFFFF;
  --t2: rgba(255, 255, 255, .7);
  --t3: rgba(255, 255, 255, .5);
  --green-soft: rgba(139, 254, 100, .12);
  --orange-soft: rgba(204, 90, 50, .18);
  --orange-text: #E67A53;  /* orange lifted for small text on dark */
  /* Urgency = time to submission. Quiet by default: neutral greys while there is time, then Racing Orange
     arrives in steps (a line, then an outline, then a filled label). No other colour is used for it. */
  --mark0: #666666; --mark1: #A6A6A6; --mark2: #D69A82; --mark3: #E67A53; --mark4: #FF5B2E;
  --tone-new: #FFFFFF; --tone-go: #8BFE64; --tone-due: #CC5A32; --tone-late: #E0262C; --red-text: #FF6B6B;
  --r: 6px;
  --font: 'Montserrat', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --pad: 28px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--black); color: var(--t1); font: 500 14px/1.4 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--green); color: var(--black); }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--t2); }
.dim { color: var(--t3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-2); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .04); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--black); font-weight: 700; }
.btn.primary:hover { background: #a2ff82; border-color: #a2ff82; }
.btn.danger { border-color: var(--orange); color: var(--orange-text); }
.btn.danger:hover { background: var(--orange-soft); }
.btn.ghost { border-color: transparent; color: var(--t2); }
.btn.ghost:hover { color: var(--t1); background: rgba(255, 255, 255, .06); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); color: var(--t2); }
.icon-btn:hover { background: rgba(255, 255, 255, .07); color: var(--t1); }
.link-btn { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- inputs ---------- */
.input, .select, .textarea { width: 100%; background: var(--black); border: 1px solid var(--line-2); border-radius: var(--r); padding: 9px 12px; font-size: 14px; font-weight: 500; min-height: 40px; }
.textarea { resize: vertical; line-height: 1.45; min-height: 64px; }
.input::placeholder, .textarea::placeholder { color: var(--t3); font-weight: 400; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.input.bad, .textarea.bad, .select.bad { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23ffffff' stroke-opacity='.7' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select.sm { min-height: 32px; padding: 4px 30px 4px 10px; font-size: 13px; }
input[type="checkbox"] { accent-color: var(--green); width: 17px; height: 17px; }
input[type="range"] { accent-color: var(--green); width: 100%; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; border: 1px solid var(--line-2); color: var(--t2); }
.chip.late { background: var(--tone-late); border-color: var(--tone-late); color: var(--white); }
.chip.urgent { border-color: var(--orange); color: var(--orange-text); }
.chip.sample { border-color: var(--green); color: var(--green); }
.chip.today { border-color: var(--line-2); color: var(--t1); }
.chip.done { background: var(--green-soft); border-color: transparent; color: var(--green); }

/* Stage meter: seven steps of the studio process, filled up to where the brief is. */
.stage { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.meter { display: inline-flex; gap: 2px; flex: none; }
.meter i { width: 9px; height: 5px; background: rgba(255, 255, 255, .16); border-radius: 1px; }
.meter i.on { background: var(--white); }
.meter.done i { background: var(--green); }
.meter.hold i { background: none; outline: 1px solid rgba(255, 255, 255, .28); outline-offset: -1px; }
.stage-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- avatars ---------- */
.avatar { --s: 42px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: grid; place-items: center; background-color: var(--charcoal); background-repeat: no-repeat; border: 1px solid var(--line-2); font-weight: 700; font-size: calc(var(--s) * .34); color: var(--t1); letter-spacing: .02em; overflow: hidden; }
.avatar.mid { --s: 34px; }
.avatar.vacant { border-style: dashed; color: var(--t3); background: none; }
.avatar.vacant svg { width: 46%; height: 46%; }

/* ---------- PIN gate ---------- */
#gate { min-height: 100%; display: grid; place-items: center; padding: 32px 20px; }
#gate:empty { display: none; }
.gate-loading { color: var(--t2); font-weight: 600; }
.gate-card { width: min(420px, 100%); display: grid; gap: 28px; }
.gate-logo { height: 26px; width: auto; justify-self: start; }
.gate-title { font-size: 34px; font-weight: 800; letter-spacing: .04em; line-height: 1.05; margin: 0; text-transform: uppercase; }
.gate-sub { color: var(--t2); margin: 8px 0 0; font-size: 15px; }
.gate-form { display: grid; gap: 12px; }
.gate-form label { font-weight: 600; font-size: 13px; }
.pin-input { font-size: 28px; letter-spacing: .5em; font-weight: 700; text-align: center; height: 64px; padding-left: .5em; }
.gate-error { color: var(--orange-text); font-weight: 600; min-height: 20px; font-size: 13.5px; }
.gate-note { color: var(--t3); font-size: 12.5px; line-height: 1.5; }
.who-card { width: min(760px, 100%); display: grid; gap: 22px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.who-btn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.who-btn:hover { border-color: var(--green); background: var(--green-soft); }
.who-btn b { font-weight: 600; display: block; }
.who-btn small { color: var(--t3); font-size: 11.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-btn > span { min-width: 0; }

/* ---------- app shell: one screen ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
#app > * { flex: none; }
#app > .roster, #app > .board, #app > .home { flex: 1 1 auto; }
.preview-bar { background: var(--green); color: var(--black); font-size: 12.5px; font-weight: 600; padding: 6px var(--pad); display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; }
.preview-bar b { font-weight: 800; }

.topbar { display: flex; align-items: center; gap: 22px; padding: 16px var(--pad) 14px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 22px; min-width: 0; }
.brand img { height: 26px; width: auto; flex: none; display: block; }
.brand-div { width: 1px; height: 38px; background: var(--line-2); flex: none; }
.brand h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .06em; line-height: 1.1; text-transform: uppercase; white-space: nowrap; }
.brand p { margin: 2px 0 0; color: var(--t2); font-size: 13px; white-space: nowrap; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; min-width: 0; }
.team-ind { display: flex; align-items: center; gap: 8px; color: var(--t2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); padding: 3px; gap: 3px; align-items: center; }
.seg button, .seg label { height: 30px; padding: 0 12px; border-radius: 4px; font-size: 12.5px; font-weight: 600; color: var(--t2); white-space: nowrap; display: inline-flex; align-items: center; }
.seg button:hover { color: var(--t1); }
.seg button[aria-pressed="true"] { background: var(--green); color: var(--black); font-weight: 700; }
.seg select { background: none; border: 0; height: 30px; font-size: 12.5px; font-weight: 600; color: var(--t2); padding: 0 4px; width: 112px; border-radius: 4px; }
.seg select.on { width: 170px; }
.seg select.on { background: var(--green); color: var(--black); font-weight: 700; }
.seg select option { background: var(--charcoal); color: var(--white); }
.me { position: relative; }
.me-btn { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 4px; border-radius: 22px; }
.me-btn:hover { background: rgba(255, 255, 255, .06); }
.me-btn .avatar { --s: 36px; }
.me-btn .me-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 250px; background: var(--charcoal); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 5px; font-size: 13.5px; font-weight: 500; }
.menu button:hover { background: rgba(255, 255, 255, .07); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .menu-note { padding: 8px 12px 6px; font-size: 11.5px; color: var(--t3); line-height: 1.45; }
.menu .count { margin-left: auto; color: var(--t3); font-size: 12px; }

.strip { display: flex; align-items: stretch; gap: 10px; padding: 0 var(--pad) 14px; min-width: 0; }
.tile { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 54px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); min-width: 0; }
.tile:hover { border-color: var(--line-2); }
.tile[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.tile b { font-size: 24px; font-weight: 800; line-height: 1; }
.tile span { font-size: 12.5px; color: var(--t2); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.tile.hot b { color: var(--orange-text); }
.tile[data-k="overdue"].hot b { color: var(--red-text); }
.search { flex: 1 1 260px; min-width: 180px; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; color: var(--t3); pointer-events: none; }
.search input { height: 54px; padding-left: 42px; background: var(--panel); border-color: var(--line); }
.clock { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; padding-left: 8px; white-space: nowrap; }
.clock b { font-size: 14px; font-weight: 700; }
.clock span { font-size: 12px; color: var(--t3); }

.filterbar { margin: 0 var(--pad) 10px; padding: 8px 12px; border: 1px solid var(--green); border-radius: var(--r); background: var(--green-soft); display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.filterbar .btn { margin-left: auto; }

/* ---------- the roster ---------- */
.roster { margin: 0 var(--pad); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; overflow: hidden;
  --g: 46px minmax(230px, 21%) minmax(0, 1fr) 132px;          /* # | creative | briefs | open */
  --b: minmax(0, 1fr) 262px 262px;                             /* brief | status | deadline */ }
.rhead { display: grid; grid-template-columns: var(--g); align-items: center; height: 34px; border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--t3); }
.rhead .rb { display: grid; grid-template-columns: var(--b); column-gap: 20px; }
.rhead span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhead > :nth-child(2) { padding-left: 2px; }
.rows { display: grid; grid-auto-rows: minmax(50px, 72px); align-content: start; overflow-y: auto; min-height: 0; }
/* When space is short the board tightens instead of scrolling. */
.rows.tight .t-who small { font-size: 10.5px; line-height: 1.15; }
.rows.tight .t-who b { font-size: 13px; line-height: 1.15; }
.rows.mini .t-who small { display: none; }
.rows.mini .trow .icon-btn { height: 24px; }
.col-team .t-who .avatar { --s: var(--av, 40px); }
.tiles.compact .tl-ms, .tiles.compact .tl-stage { display: none; }
.tiles.compact .tl-title { -webkit-line-clamp: 2; }
.tiles.compact .tile2 { padding: .7em .7em .6em; gap: .25em; }
.tiles.mini .tl-prio { display: none; }
.tiles.mini .tl-people .avatar:nth-child(n+2) { display: none; }
.blist.mini .l-sub, .blist.mini .l-due small { display: none; }
.blist.tight .l-sub { font-size: 11px; } .blist.tight .l-main { gap: 0; }
.blist.tight .lrow { padding-top: 0; padding-bottom: 0; }
.blist.tight .l-main .t { font-size: 12.5px; }
.blist.tight .chip { height: 18px; font-size: 10.5px; padding: 0 5px; }
.row { display: grid; grid-template-columns: var(--g); align-items: center; border-bottom: 1px solid var(--line); min-height: 0; }
.row:last-child { border-bottom: 0; }
.row:hover { background: rgba(255, 255, 255, .025); }
.c-idx { text-align: center; color: var(--t3); font-size: 12.5px; font-weight: 600; }
.c-who { display: flex; align-items: center; gap: 14px; min-width: 0; height: 100%; padding: 4px 12px 4px 2px; border-radius: 4px; }
.c-who .who-text { min-width: 0; }
.c-who b { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-who small { display: block; font-size: 12px; color: var(--t2); font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.vacant .c-who b { color: var(--t2); font-weight: 600; }
.c-briefs { display: grid; gap: 2px; min-width: 0; align-content: center; }
.bline { display: grid; grid-template-columns: var(--b); column-gap: 20px; align-items: center; min-width: 0; height: 24px; border-radius: 4px; margin-left: -8px; padding-left: 8px; }
button.bline:hover { background: rgba(255, 255, 255, .07); }
.b-title { min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.b-title .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.b-title .ms { color: var(--t2); font-weight: 500; }
.b-title .role { color: var(--t3); font-weight: 500; font-size: 12px; white-space: nowrap; flex: none; }
.b-status { display: flex; align-items: center; gap: 10px; min-width: 0; }
.b-due { font-size: 13px; font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.b-due.late { color: var(--orange-text); font-weight: 600; }
.none { color: var(--t3); font-size: 13px; font-weight: 500; }
.c-open { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding-right: 10px; }
.more { font-size: 12px; font-weight: 700; color: var(--green); padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.more:hover { background: var(--green-soft); }
.empty-rows { padding: 40px 24px; text-align: center; color: var(--t2); }

/* ---------- the board: team | live now | all briefs ---------- */
.board { margin: 0 var(--pad); display: grid; grid-template-columns: minmax(340px, 23%) minmax(0, 1fr) minmax(400px, 29%); grid-template-rows: minmax(0, 1fr); gap: 12px; min-height: 0; }
.col { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; min-width: 0; overflow: hidden; }
.col-head { height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--t3); white-space: nowrap; min-width: 0; }
.col-head b { color: var(--t1); letter-spacing: 0; font-size: 12.5px; }
.col-head .sp { flex: 1; }
.col-head .hint { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.col-head .link-btn { font-size: 11.5px; letter-spacing: 0; text-transform: none; }
.legend { display: flex; gap: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 11.5px; color: var(--t2); overflow: hidden; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.pip { width: 10px; height: 10px; border-radius: 2px; flex: none; display: inline-block; background: var(--mark0); }
.pip.t-new { background: var(--tone-new); } .pip.t-go { background: var(--tone-go); } .pip.t-due { background: var(--tone-due); } .pip.t-late { background: var(--tone-late); }
.pip.t-hold { background: none; outline: 1px dashed var(--t3); outline-offset: -1px; }

.trow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 38px; align-items: center; border-bottom: 1px solid var(--line); min-height: 0; transition: opacity .12s; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: rgba(255, 255, 255, .03); }
.trow.sel { background: var(--green-soft); box-shadow: inset 3px 0 0 var(--green); }
.trow.off { opacity: .38; }
.t-who { display: flex; align-items: center; gap: 12px; min-width: 0; height: 100%; padding: 3px 8px 3px 0; border-radius: 4px; }
.t-who .avatar { --s: 40px; }
.t-who b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-who small { display: block; font-size: 11.5px; color: var(--t2); font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-who .who-text { min-width: 0; }
.trow.vacant .t-who b { color: var(--t2); }
.t-load { display: flex; align-items: center; gap: 2px; padding: 0 6px; font-size: 12px; }
.t-load .none, .t-load.none { color: var(--t3); font-size: 12px; font-weight: 500; }
.star { display: inline-grid; color: var(--mark0); }
.star svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.star.t-new { color: var(--tone-new); } .star.t-go { color: var(--tone-go); } .star.t-due { color: var(--tone-due); } .star.t-late { color: var(--tone-late); }
.star.t-hold svg { fill: none; stroke: var(--t3); stroke-width: 1.6; }
.more-n { color: var(--t2); font-weight: 700; margin-left: 4px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); grid-auto-rows: max-content; gap: 10px; padding: 12px; overflow-y: auto; align-content: start; justify-content: start; min-height: 0; font-size: 16px; }
.tile2 { aspect-ratio: 1; min-width: 0; border-radius: 8px; padding: 1em .875em .875em; display: flex; flex-direction: column; gap: .375em; background: var(--charcoal); color: var(--white); border: 1px solid var(--line); overflow: hidden; position: relative; transition: opacity .12s, border-color .12s; }
.tiles[style*="grid-auto-rows"] .tile2 { aspect-ratio: auto; }
/* Colour = state. White: new, nobody assigned. Green: ongoing. Orange: due within 24 hours. Red: overdue. */
.tile2:hover { outline: 2px solid var(--white); outline-offset: 2px; }
.tile2 .tl-top b { color: inherit; }
.tile2.t-new { --tb: var(--tone-new); background: var(--tb); border-color: var(--tb); color: var(--black); }
.tile2.t-go { --tb: var(--tone-go); background: var(--tb); border-color: var(--tb); color: var(--black); }
.tile2.t-due { --tb: var(--tone-due); background: var(--tb); border-color: var(--tb); color: var(--white); }
.tile2.t-late { --tb: var(--tone-late); background: var(--tb); border-color: var(--tb); color: var(--white); }
.tile2.t-late .tl-top b { background: var(--black); color: var(--white); padding: 2px 8px; border-radius: 3px; margin-left: -2px; }
.tile2.t-hold { --tb: var(--charcoal); background: none; border-style: dashed; color: var(--t2); }
.tile2 .tl-ms, .tile2 .tl-stage { color: inherit; opacity: .78; }
.tile2 .tl-prio { border-color: currentColor; color: inherit; }
.tile2 .tl-people .avatar { border-color: var(--tb, var(--charcoal)); }
/* priority bars: four steps, filled up to the brief's priority; they take the colour of whatever they sit on */
.prio { display: inline-flex; gap: 2px; align-items: flex-end; flex: none; height: 12px; }
.prio i { width: 3px; border-radius: 1px; background: currentColor; opacity: .22; }
.prio i:nth-child(1) { height: 40%; } .prio i:nth-child(2) { height: 60%; } .prio i:nth-child(3) { height: 80%; } .prio i:nth-child(4) { height: 100%; }
.prio i.on { opacity: 1; }
.prio.big { height: 16px; gap: 3px; margin-left: 4px; } .prio.big i { width: 4px; }
.prio.wide { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; height: 5px; width: 100%; margin-top: .5em; align-items: stretch; }
.prio.wide i { width: auto; height: auto !important; border-radius: 2px; }
.tiles.compact .prio.wide { height: 4px; margin-top: .3em; }
.p-prio { display: inline-flex; gap: 8px; align-items: center; }
.lrow .prio { margin-right: 2px; align-self: center; }
/* F = a freelancer is on this brief */
.f-badge { display: inline-grid; place-items: center; flex: none; width: var(--tav, 26px); height: var(--tav, 26px); border-radius: 50%; background: var(--black); color: var(--white); border: 2px solid var(--white); font-size: calc(var(--tav, 26px) * .46); font-weight: 800; line-height: 1; margin-left: 4px; }
.tl-people .f-badge:first-child { margin-left: 0; }
.f-badge.sm { width: 18px; height: 18px; font-size: 10px; border-width: 1.5px; margin-left: 2px; }
.avatar.fl { outline: 1.5px dashed var(--t2); outline-offset: 1px; }
.head-btn { display: inline-flex; gap: 5px; align-items: center; height: 26px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 5px; font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--t1); flex: none; }
.head-btn svg { width: 13px; height: 13px; }
.head-btn:hover { border-color: var(--white); }
.head-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--black); }
.col-tabs .short { display: none; }
.trow.editing { grid-template-columns: 34px minmax(0, 1fr) 34px 38px; }
.trow .icon-btn.del:hover { color: var(--red-text); }
.col-tabs { display: flex; gap: 4px; align-items: center; margin-left: -6px; }
.col-tabs button { display: inline-flex; gap: 6px; align-items: center; height: 26px; padding: 0 8px; border-radius: 5px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--t3); }
.col-tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .09); color: var(--t1); }
.col-tabs button:hover { color: var(--t1); }
.l-sub.facts b { font-weight: 600; color: var(--t1); }
.blist.roomy .l-sub.facts { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.blist.roomy .lrow { align-items: start; padding-top: 11px; }
.blist.roomy .lrow .pip { margin-top: 5px; }
.tl-tags { display: inline-flex; gap: 4px; align-items: center; min-width: 0; }
.chip.rev { height: 20px; padding: 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; border-color: var(--t2); color: var(--t1); flex: none; }
.chip.rev.on { background: var(--white); border-color: var(--white); color: var(--black); }
.chip.rev.big { height: 22px; padding: 0 8px; font-size: 11.5px; }
.tile2 .chip.rev { height: 1.5em; padding: 0 .45em; font-size: .88em; background: none; border-color: currentColor; color: inherit; }
.tile2 .chip.rev.on { background: var(--black); border-color: var(--black); color: var(--white); }
.rv-box { display: grid; gap: 12px; }
/* ---------- portal front page ---------- */
#app.at-home { background: radial-gradient(1100px 520px at 12% -8%, rgba(139, 254, 100, .13), transparent 62%), linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 100% 56px, linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 56px 100%; }
.hero { padding: 14px var(--pad) clamp(12px, 3.2vh, 34px); display: grid; gap: clamp(10px, 3.4vh, 40px); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.hero-tag { font-size: 11.5px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--t2); }
.hero-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; min-width: 0; }
.hero-mark { display: grid; gap: clamp(10px, 2.2vh, 22px); min-width: 0; }
.hero-logo { display: block; width: clamp(280px, min(46vw, 78vh), 780px); height: auto; max-width: 100%; }
.hero-word { display: flex; align-items: center; gap: 18px; }
.hero-word i { display: block; height: 3px; width: clamp(48px, 7vw, 120px); background: var(--green); border-radius: 2px; transform-origin: left; animation: rule .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rule { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .hero-word i { animation: none; } }
.hero-word h1 { margin: 0; font-size: clamp(20px, 3.6vh, 34px); font-weight: 300; letter-spacing: .62em; text-transform: uppercase; line-height: 1; color: var(--white); }
.hero-now { display: grid; gap: 2px; text-align: right; flex: none; }
.hero-now span { font-size: 14px; color: var(--t2); font-weight: 600; }
.hero-now b { font-size: clamp(30px, 6vh, 56px); font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }
.hero-now small { font-size: 12.5px; color: var(--t3); }
.mini-team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8%; width: min(72%, 300px); align-content: center; }
.mini-team .avatar { --s: 100%; width: 100%; height: auto; aspect-ratio: 1; font-size: 9px; border-width: 1px; filter: grayscale(1); opacity: .75; }
.mini-team .mt-dot { aspect-ratio: 1; border-radius: 50%; background: var(--line-2); display: block; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4%; width: min(80%, 330px); align-content: center; }
.mini-cal i { aspect-ratio: 1; border-radius: 3px; background: var(--line-2); display: block; }
.mini-cal i.we { background: var(--line); }
.mini-cal i.off { background: var(--green); opacity: .8; }
@media (max-width: 900px) { .hero-now { display: none; } }
.to-home { display: inline-flex; align-items: center; gap: 12px; border-radius: 6px; padding: 6px 8px 6px 4px; margin-left: -8px; color: var(--t2); }
.to-home:hover { background: rgba(255, 255, 255, .06); color: var(--white); }
.to-home .ic { width: 18px; height: 18px; }
.home { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); gap: 16px; padding: 4px var(--pad) 10px; min-height: 0; }
.apps { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: 14px; padding: 14px; min-height: 0; overflow: auto; }
.app-card { display: grid; grid-template-rows: minmax(110px, 1fr) auto auto; gap: 0; max-height: 520px; text-align: left; border: 1px solid var(--line-2); border-radius: 10px; background: var(--charcoal); overflow: hidden; min-width: 0; transition: border-color .12s, transform .12s; }
button.app-card:hover { border-color: var(--green); transform: translateY(-2px); }
.app-thumb { display: grid; place-items: center; min-height: 0; background: var(--black); border-bottom: 1px solid var(--line); color: var(--t3); padding: 16px; }
.app-thumb > .ic { width: 28%; height: auto; max-width: 96px; stroke-width: 1.1; }
.mini-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7%; width: min(76%, 320px); align-content: center; }
.mini-board .mt { aspect-ratio: 1; border-radius: 4px; background: var(--mark0); display: block; }
.mini-board .mt.t-new { background: var(--tone-new); } .mini-board .mt.t-go { background: var(--tone-go); } .mini-board .mt.t-due { background: var(--tone-due); } .mini-board .mt.t-late { background: var(--tone-late); }
.mini-board .mt.t-hold { background: none; outline: 1px dashed var(--t3); outline-offset: -1px; }
.mini-board .mt.ghost { opacity: .5; }
.mini-board .mt.slot { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.mini-empty { grid-column: 1 / -1; text-align: center; font-size: 12.5px; color: var(--t3); }
.app-body { display: grid; gap: 4px; padding: 14px 16px 6px; }
.app-body b { font-size: 18px; font-weight: 800; letter-spacing: .01em; }
.app-body span { font-size: 13px; color: var(--t2); line-height: 1.45; }
.app-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px 14px; font-size: 12.5px; color: var(--t2); font-weight: 600; align-self: end; }
.app-foot .ic { width: 18px; height: 18px; color: var(--green); }
.app-card.soon { border-style: dashed; border-color: var(--line); }
.app-card.soon .app-body b { color: var(--t2); }
.news-col { min-height: 0; }
.news-col .col-head .ic { width: 15px; height: 15px; }
.news-list { overflow-y: auto; min-height: 0; padding: 4px 0; }
.news { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.news header { display: flex; align-items: center; gap: 8px; min-width: 0; }
.news h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.news p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--t1); white-space: pre-wrap; overflow-wrap: anywhere; }
.news small { font-size: 11.5px; color: var(--t3); }
.news .icon-btn { width: 26px; height: 26px; margin: -4px -6px -4px 0; }
@media (max-width: 1100px) {
  .home { grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: 10px; }
  /* narrower screens: the three apps stack as rows, picture on the left */
  .app-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: minmax(0, 1fr); gap: 10px; padding: 10px; }
  .app-card { grid-template-columns: minmax(96px, 32%) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; max-height: 220px; }
  .app-thumb { grid-row: 1 / -1; border-bottom: 0; border-right: 1px solid var(--line); padding: 10px; }
  .mini-board, .mini-team { width: min(62%, 104px); } .mini-cal { width: min(78%, 124px); }
  .app-body { padding: 10px 14px 2px; align-content: center; } .app-body b { font-size: 16px; } .app-body span { font-size: 12.5px; line-height: 1.35; }
  .app-foot { padding: 4px 14px 10px; }
}
@media (max-width: 700px) { .home { display: block; } .apps, .news-col { margin-bottom: 12px; } .app-grid { grid-auto-rows: auto; overflow: visible; } .app-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: 150px auto auto; max-height: none; } .app-thumb { grid-row: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; } .mini-board, .mini-team { width: 150px; } .mini-cal { width: 164px; } .news-list { overflow: visible; } }
/* the signed-in person's name across the screen: light enough to work through, clear enough to show in a screenshot */
#wm { position: fixed; inset: 0; z-index: 200; pointer-events: none; overflow: hidden; }
#wm span { position: absolute; transform: rotate(-24deg); transform-origin: left center; white-space: nowrap; font-size: 12px; font-weight: 600; letter-spacing: .05em; color: #fff; mix-blend-mode: difference; opacity: .045; user-select: none; }
.gate-admin { justify-self: start; font-size: 12.5px; color: var(--t2); }
.gate-form .input { height: 46px; }
.modal.wide.accbox { width: min(1180px, 100%); height: min(900px, calc(100vh - 32px)); }
.acc-codes { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--green); border-radius: var(--r); background: var(--green-soft); margin-bottom: 12px; }
.acc-codes small { color: var(--t2); }
.acc-code { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.acc-code span { flex: 1; min-width: 0; }
.acc-code code { font: 800 22px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; color: var(--white); user-select: all; }
.acc-setting .select { flex: none; min-height: 34px; height: 34px; font-size: 12.5px; align-self: center; }
.acc-setting > span { flex: 1; }
.acc-top { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.acc-top p { margin: 0; font-size: 13px; color: var(--t2); max-width: 70ch; }
.acc-setting { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--t2); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; line-height: 1.45; }
.acc-setting b { color: var(--t1); }
.acc-setting input, .acc-all input { margin-top: 2px; flex: none; }
.acc-row { display: grid; grid-template-columns: 190px minmax(200px, 1fr) 84px 230px 196px; gap: 6px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.acc-row.off { opacity: .6; }
.acc-who { display: grid; gap: 1px; min-width: 0; }
.acc-who b { font-weight: 700; font-size: 14px; }
.acc-who small { font-size: 11.5px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-row .input { min-height: 36px; height: 36px; padding: 0 10px; font-size: 13px; }
.acc-all { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.acc-status { font-size: 12px; color: var(--t2); }
.acc-status.warn { color: var(--orange-text); font-weight: 700; }
.acc-tools { display: flex; gap: 4px; justify-content: flex-end; }
.acc-devices { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.acc-dev { display: inline-flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--t2); border: 1px solid var(--line); border-radius: 14px; padding: 1px 4px 1px 10px; }
.acc-dev b { color: var(--t1); font-weight: 600; }
.acc-dev.wait { border-color: var(--orange); color: var(--orange-text); padding: 3px 4px 3px 10px; }
.acc-dev .icon-btn { width: 22px; height: 22px; }
.acc-issued { display: grid; gap: 8px; margin-bottom: 12px; }
.acc-issued pre { margin: 0; padding: 10px 12px; background: var(--black); border-radius: var(--r); font: 600 13px/1.7 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; user-select: all; color: var(--white); }
.acc-issued small { color: var(--t2); }
.acc-log { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 5px; font-size: 12.5px; }
.acc-log li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; }
.acc-log time { color: var(--t3); }
.acc-log b { font-weight: 600; }
@media (max-width: 900px) { .acc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } .acc-devices { grid-column: 1 / -1; } .acc-top { display: grid; } }
.modal.trashbox { width: min(720px, 100%); }
.trash-list { display: grid; gap: 8px; max-height: min(56vh, 520px); overflow-y: auto; }
.trash-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--black); }
.trash-main { display: grid; gap: 3px; min-width: 0; }
.trash-main b { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trash-main small { font-size: 12px; color: var(--t2); line-height: 1.4; }
.card-sub { margin-bottom: 10px; }
.card-sub .card-btn { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.sub-links { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 8px 14px 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r) var(--r); font-size: 12.5px; }
.sub-links a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.sb-err { color: var(--red-text) !important; font-weight: 600; font-size: 13px; }
.rv-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; }
.tl-top { display: flex; align-items: center; justify-content: space-between; gap: .5em; font-size: .78em; }
.tl-top b { font-weight: 800; white-space: nowrap; }
.tl-prio { font-size: .84em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--line-2); color: var(--t2); border-radius: 3px; }
.tl-client { font-size: .7em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .15em; flex: none; }
.tiles.mini .tl-client { font-size: .78em; letter-spacing: .04em; }
.tl-title { font-size: .97em; font-weight: 700; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tl-ms { font-size: .75em; font-weight: 500; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.tl-people { display: flex; align-items: center; flex: none; }
.tl-people .avatar { --s: var(--tav, 30px); border: 2px solid var(--charcoal); margin-left: -8px; }
.tl-people .avatar:first-child { margin-left: 0; }
.tl-un { font-size: .72em; font-weight: 700; padding: 3px 7px; border: 1.5px dashed currentColor; border-radius: 12px; margin-left: 4px; white-space: nowrap; }
.tl-people .tl-un:first-child { margin-left: 0; }
.tl-stage { font-size: .72em; font-weight: 600; color: var(--t2); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.blist { overflow-y: auto; min-height: 0; display: grid; grid-auto-rows: minmax(52px, auto); align-content: start; }
.lrow { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); min-width: 0; transition: opacity .12s; }
.lrow:hover { background: rgba(255, 255, 255, .05); }
.l-main { min-width: 0; display: grid; gap: 2px; }
.l-main .t { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; font-weight: 600; }
.l-main .tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.l-main .ms { color: var(--t2); font-weight: 500; }
.l-sub { font-size: 12px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-due { text-align: right; display: grid; gap: 2px; white-space: nowrap; }
.l-due b { font-size: 12.5px; font-weight: 600; }
.l-due small { font-size: 11.5px; color: var(--t2); }
.l-due small.t-due { color: var(--orange-text); font-weight: 700; } .l-due small.t-late { color: var(--red-text); font-weight: 700; }

/* hovering a person or a brief dims everything not connected to it */
#app.linking [data-people]:not(.lit), #app.linking [data-member]:not(.lit) { opacity: .28; }

.foot { padding: 8px var(--pad) 10px; display: flex; gap: 8px 20px; flex-wrap: wrap; color: var(--t3); font-size: 11.5px; align-items: center; }
.foot .live { display: inline-flex; align-items: center; gap: 6px; }
.foot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.foot .dot.off { background: var(--orange); }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .62); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(700px, 100%); background: var(--charcoal); border-left: 1px solid var(--line-2); z-index: 41; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.drawer.enter { animation: slide .16s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
/* A brief opens as one full sheet: it grows out of the tile that was clicked and lays its sections out in
   columns across the screen, so the whole brief is readable without scrolling down. */
.drawer.bv { left: var(--pad); right: var(--pad); top: 12px; bottom: 12px; width: auto; border: 1px solid var(--line-2); border-radius: 10px; transform-origin: var(--ox, 50%) var(--oy, 50%); }
.drawer.bv.enter { animation: grow .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes grow { from { transform: scale(.18); opacity: 0; } }
.drawer.bv .d-head { padding: 16px 24px 12px; }
.drawer.bv .d-body { column-width: 380px; column-gap: 36px; column-fill: auto; column-rule: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; padding: 4px 24px 8px; height: 100%; }
.drawer.bv .sec { padding: 12px 0; break-inside: avoid; }
.drawer.bv .sec h3 { break-after: avoid; margin-bottom: 8px; }
.drawer.bv .kv { grid-template-columns: 118px minmax(0, 1fr); gap: 6px 14px; }
.drawer.bv .list { gap: 6px; }
.drawer.bv .check { padding: 4px 0; }
.drawer.bv .note p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.link-btn.more { font-size: 12.5px; display: inline-block; margin-bottom: 8px; }
.drawer.bv .d-body[data-fit="scroll"] { overflow-x: hidden; overflow-y: auto; max-width: 760px; margin: 0 auto; width: 100%; }
@media (max-height: 820px) {
  .drawer.bv { top: 8px; bottom: 8px; }
  .drawer.bv .d-head { padding: 10px 20px 8px; align-items: center; }
  .drawer.bv .d-head h2 { font-size: 18px; display: inline; }
  .drawer.bv .d-head p { display: inline; margin: 0 0 0 12px; }
  .drawer.bv .d-head .icon-btn { margin-top: 0; }
  .drawer.bv .d-foot { padding: 8px 20px; }
  .drawer.bv .d-foot .btn { height: 34px; }
}
.modal.listbox { width: min(640px, 100%); }
.listbox-body { display: grid; gap: 10px; overflow-y: auto; max-height: min(60vh, 560px); padding-right: 4px; }
.drawer.bv .sec li, .drawer.bv .note, .drawer.bv .check, .drawer.bv .file, .drawer.bv .dl-box, .drawer.bv .statusrow, .drawer.bv .sub-add, .drawer.bv .kv > * { break-inside: avoid; }
.sub-add { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.sub-add .input { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.sub-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; min-width: 0; margin-bottom: 6px; }
.sub-item a { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-item small { color: var(--t3); white-space: nowrap; margin-left: auto; }
/* hovering a tile: a larger card with the essentials, without leaving the page */
.peek { position: fixed; z-index: 35; width: 380px; background: var(--charcoal); border: 1px solid var(--line-2); border-radius: 10px; padding: 18px; display: grid; gap: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, .65); pointer-events: none; animation: grow .14s ease-out; transform-origin: var(--ox, 0) var(--oy, 0); }
.peek h4 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.2; text-wrap: balance; }
.peek .p-sub { color: var(--t2); font-size: 12.5px; margin-top: -6px; }
.peek .p-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.peek .p-row span:first-child { color: var(--t3); font-size: 12px; }
.peek .p-goal { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.peek .p-foot { color: var(--t3); font-size: 11.5px; border-top: 1px solid var(--line); padding-top: 8px; }
.d-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.d-head h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.25; text-wrap: balance; }
.d-head p { margin: 4px 0 0; color: var(--t2); font-size: 13px; }
.d-head .icon-btn { margin: -6px -8px 0 auto; }
.d-body { overflow-y: auto; padding: 4px 24px 28px; }
.d-foot { padding: 12px 24px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--charcoal); }
.d-foot .sp { flex: 1; }
.d-foot .btn { padding: 0 13px; }
.sec { padding: 18px 0; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t3); display: flex; align-items: center; gap: 10px; }
.sec h3 .count { font-weight: 600; letter-spacing: 0; text-transform: none; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--t2); font-size: 13px; }
.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.statusrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.statusrow .select { width: auto; }
.dl-box { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--black); }
.dl-box.late { border-color: var(--tone-late); }
.dl-box .big { font-size: 17px; font-weight: 700; }
.dl-box .big span, .dl-box .alt span { color: var(--t2); font-weight: 500; font-size: 13px; }
.dl-box .alt { font-size: 13.5px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.person { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; font-weight: 600; }
.person .avatar { --s: 26px; }
.person small { color: var(--t3); font-weight: 500; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; overflow-wrap: anywhere; }
.list .tag { flex: none; font-size: 11px; color: var(--t3); font-weight: 600; width: 64px; padding-top: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }
.check input { margin-top: 2px; flex: none; }
.check.done b { text-decoration: line-through; color: var(--t3); }
.check b { font-weight: 600; }
.check small { display: block; color: var(--t2); font-size: 12.5px; }
.kw { display: flex; flex-wrap: wrap; gap: 6px; }
.kw span { padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 12.5px; font-weight: 600; }
.file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; min-width: 0; }
.file a, .file .fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--t1); }
.file small { color: var(--t3); white-space: nowrap; margin-left: auto; }
.note { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--black); }
.note header { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; margin-bottom: 4px; }
.note header b { font-weight: 700; font-size: 13px; }
.note header span { color: var(--t3); }
.note p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.hist li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.hist time { color: var(--t3); font-size: 12px; }
.hist b { font-weight: 600; }
.attrib { font-size: 11.5px; color: var(--t3); margin: 0 0 10px; line-height: 1.45; }
.card-btn { display: grid; gap: 4px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--black); margin-bottom: 8px; }
.card-btn:hover { border-color: var(--line-2); }
.card-btn .l1 { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }
.card-btn .l1 .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-btn .l2 { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--t2); }
.card-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.tabs { display: flex; gap: 4px; margin: 14px 0 12px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--t2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--t1); border-color: var(--green); }

/* ---------- modal ---------- */
.modal-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .72); z-index: 60; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.modal { width: min(520px, 100%); background: var(--charcoal); border: 1px solid var(--line-2); border-radius: 10px; padding: 24px; display: grid; gap: 16px; max-height: calc(100vh - 40px); overflow-y: auto; }
.modal h2 { margin: 0; font-size: 19px; font-weight: 700; text-wrap: balance; }
.modal p { margin: 0; color: var(--t2); line-height: 1.5; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal.wide { width: min(1040px, 100%); padding: 0; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; height: min(900px, calc(100vh - 40px)); gap: 0; }
.modal.wide > header { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.modal.wide > header h2 { flex: 1; min-width: 0; }
.h-sub { display: block; font-size: 12.5px; font-weight: 500; color: var(--t2); margin-top: 3px; }
.modal.wide > footer { padding: 12px 24px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.modal.wide > footer .sp { flex: 1; }
.dirty { font-size: 12.5px; color: var(--t2); display: inline-flex; gap: 8px; align-items: center; }
.dirty::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }

/* ---------- brief form ---------- */
.form-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 0; }
.form-nav { border-right: 1px solid var(--line); padding: 16px 12px; display: grid; gap: 2px; align-content: start; overflow-y: auto; }
.form-nav button { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 5px; font-size: 13px; font-weight: 600; color: var(--t2); }
.form-nav button:hover { background: rgba(255, 255, 255, .06); color: var(--t1); }
.form-nav button i { font-style: normal; width: 22px; height: 22px; border: 1px solid var(--line-2); border-radius: 4px; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; }
.form-nav .req-note { font-size: 11.5px; color: var(--t3); padding: 14px 10px 0; line-height: 1.5; }
.form-scroll { overflow-y: auto; padding: 4px 28px 40px; scroll-behavior: smooth; }
.fsec { padding: 22px 0 24px; border-bottom: 1px solid var(--line); display: grid; gap: 16px; }
.fsec:last-child { border-bottom: 0; }
.fsec > h3 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: baseline; gap: 12px; }
.fsec > h3 i { font-style: normal; color: var(--green); font-weight: 800; }
.fsec > .hint { margin: -10px 0 0; color: var(--t3); font-size: 12.5px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.span2 { grid-column: span 2; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .field > .lab { font-size: 12.5px; font-weight: 600; color: var(--t1); display: flex; gap: 8px; align-items: baseline; }
.field .req { color: var(--green); font-weight: 700; }
.field .cnt { margin-left: auto; font-size: 11.5px; color: var(--t3); font-weight: 500; font-variant-numeric: tabular-nums; }
.field .cnt.over { color: var(--orange-text); font-weight: 700; }
.field .err { color: var(--orange-text); font-size: 12.5px; font-weight: 600; }
.field .help { color: var(--t3); font-size: 12px; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick button { height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 13px; font-weight: 600; color: var(--t2); display: inline-flex; align-items: center; gap: 8px; }
.pick button:hover { color: var(--t1); border-color: rgba(255, 255, 255, .45); }
.pick button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--black); font-weight: 700; }
.pick button .avatar { --s: 22px; margin-left: -6px; }
.rowset { display: grid; gap: 8px; }
.rowline { display: grid; gap: 8px; align-items: center; }
.rowline.must { grid-template-columns: 22px 220px minmax(0, 1fr) 36px; }
.rowline.del { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.4fr) 36px; }
.rowline.q { grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) 150px 36px; }
.rowline.link { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 36px; }
.rowline .n { color: var(--t3); font-size: 12.5px; font-weight: 600; text-align: center; }
.rowhead { font-size: 11.5px; color: var(--t3); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r); padding: 5px 6px; background: var(--black); min-height: 40px; }
.tags:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.tags span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; background: var(--charcoal); border: 1px solid var(--line-2); border-radius: 4px; font-size: 13px; font-weight: 600; }
.tags span button { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 3px; color: var(--t2); }
.tags span button:hover { background: rgba(255, 255, 255, .12); color: var(--t1); }
.tags input { flex: 1; min-width: 140px; background: none; border: 0; outline: 0; padding: 4px 6px; font-size: 14px; }
.tz-echo { font-size: 12.5px; color: var(--t2); padding: 9px 12px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.tz-echo b { color: var(--t1); font-weight: 600; }
.errbox { border: 1px solid var(--orange); background: var(--orange-soft); border-radius: var(--r); padding: 10px 14px; font-size: 13.5px; font-weight: 600; }
.errbox ul { margin: 6px 0 0; padding-left: 18px; font-weight: 500; }
.okbox { border: 1px solid var(--green); background: var(--green-soft); border-radius: var(--r); padding: 10px 14px; font-size: 13.5px; }

/* ---------- the one-page brief form (the 5-minute creative brief, online) ---------- */
.modal.wide.brief1 { width: min(1560px, 100%); height: min(940px, calc(100vh - 24px));
  --ih: 36px; --rg: 5px; --sg: 8px; --sm: 14px; --fs: 13.5px; --tl: 2; --bg: 10px; --hp: 14px; }
.modal.wide.brief1[data-d="1"] { --ih: 33px; --sm: 10px; --bg: 8px; --hp: 10px; }
.modal.wide.brief1[data-d="2"] { --ih: 30px; --rg: 4px; --sg: 6px; --sm: 8px; --bg: 7px; --hp: 9px; --fs: 13px; }
.modal.wide.brief1[data-d="3"] { --ih: 28px; --rg: 3px; --sg: 5px; --sm: 6px; --bg: 6px; --hp: 7px; --fs: 12.5px; }
.modal.wide.brief1[data-d="4"] { --ih: 26px; --rg: 3px; --sg: 4px; --sm: 5px; --bg: 5px; --hp: 6px; --fs: 12px; }
.modal.wide.brief1[data-d="5"] { --ih: 24px; --rg: 2px; --sg: 3px; --sm: 4px; --bg: 4px; --hp: 5px; --fs: 11.5px; }
.modal.wide.brief1 > header { padding-top: var(--hp); padding-bottom: var(--hp); }
.modal.wide.brief1 > footer { padding-top: calc(var(--hp) - 3px); padding-bottom: calc(var(--hp) - 3px); flex-wrap: nowrap; }
.brief1 > header .h-sub { display: inline; margin: 0 0 0 14px; }
.brief1 > footer .btn { height: clamp(32px, calc(var(--ih) + 6px), 42px); flex: none; }
.brief1 > footer .tz-echo { border: 0; padding: 0; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b1 { display: flex; flex-direction: column; gap: var(--bg); padding: var(--bg) 24px 4px; overflow: auto; min-height: 0; }
.b1 > * { flex: none; }
.b1 > .b1-cols { flex: 1 0 auto; }
.b1-cols > div { display: flex; flex-direction: column; min-width: 0; }
/* spare height goes to the writing boxes, up to a sensible size */
#sec-01, #sec-03, #sec-04 { flex: 1 0 auto; display: flex; flex-direction: column; }
.b1-sec > .field.row { flex: 1 0 auto; max-height: 124px; align-content: stretch; }
#sec-01 > .field.row:last-child { flex-grow: 1.5; max-height: 150px; }
.b1-top { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, .9fr) 150px 116px minmax(0, 1.05fr); gap: 10px; align-items: start; }
.b1-extra { display: grid; grid-template-columns: auto auto minmax(180px, 1fr); gap: var(--bg) 24px; align-items: start; }
.b1-extra .collab { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; }
.b1-extra .collab .lab { flex: none; }
.b1-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin-top: 2px; }
.b1-sec { padding-top: var(--sg); border-top: 2px solid var(--white); display: grid; gap: var(--sg); align-content: start; margin-bottom: var(--sm); }
.b1-sec h3 { margin: 0; font-size: 14.5px; font-weight: 700; display: flex; gap: 10px; align-items: baseline; min-width: 0; white-space: nowrap; }
.b1-sec h3 i { font-style: normal; color: var(--green); font-weight: 800; }
.b1-sec h3 .hint { font-size: 11.5px; font-weight: 500; color: var(--t3); overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-left: 4px; }
.b1-pair { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; }
.brief1 .field { gap: 4px; }
.brief1 .field > label, .brief1 .field > .lab { font-size: 11.5px; }
.brief1 .field.row { grid-template-columns: 76px minmax(0, 1fr); gap: 0 10px; align-items: start; }
.brief1 .field.row > label { padding-top: 7px; display: grid; gap: 1px; line-height: 1.25; }
.brief1 .field.row > .err, .brief1 .field.row > .help { grid-column: 2; }
.brief1 .field .err { display: none; } /* the line at the top names what is missing; the field itself is outlined */
.brief1 .input, .brief1 .select { min-height: 0; height: var(--ih); padding: 0 10px; font-size: var(--fs); }
.brief1 .select { padding-right: 30px; }
.brief1 .textarea { height: auto; min-height: calc(var(--tl) * 1.4em + 12px); padding: 5px 10px; font-size: var(--fs); line-height: 1.4; resize: none; align-self: stretch; }

.modal.wide.brief1[data-d="3"] .textarea, .modal.wide.brief1[data-d="4"] .textarea, .modal.wide.brief1[data-d="5"] .textarea { padding-top: 3px; padding-bottom: 3px; min-height: calc(2 * 1.35em + 8px); line-height: 1.35; }
.brief1 .pick { gap: 5px; }
.brief1 .pick button { height: calc(var(--ih) - 6px); padding: 0 10px; font-size: calc(var(--fs) - 1px); }
.brief1 .pick button .avatar { --s: calc(var(--ih) - 16px); }
.brief1 .rowset { gap: var(--rg); }
.brief1 .rowline.one { grid-template-columns: 20px minmax(0, 1fr) 26px; gap: 6px; }
.brief1 .rowline.bare { grid-template-columns: minmax(0, 1fr) 26px; gap: 6px; }
.brief1 .rowline .icon-btn { width: 26px; height: min(30px, var(--ih)); }
.brief1 .rowline .n { font-size: 11.5px; }
.brief1 .btn.sm { height: calc(var(--ih) - 8px); font-size: 12px; }
.brief1 .attach { display: flex; gap: 10px; align-items: center; margin-top: 2px; min-width: 0; }
.brief1 .attach .help { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.brief1 .file { padding-top: 3px; padding-bottom: 3px; }
.brief1 .errbox { padding: 6px 12px; font-size: 12.5px; font-weight: 500; }
.modal.wide.brief1[data-d="3"] .b1-sec h3, .modal.wide.brief1[data-d="4"] .b1-sec h3, .modal.wide.brief1[data-d="5"] .b1-sec h3 { font-size: 13px; }
.modal.wide.brief1[data-d="4"] > header h2, .modal.wide.brief1[data-d="5"] > header h2 { font-size: 17px; }
.modal.wide.brief1[data-d="4"] .field > label, .modal.wide.brief1[data-d="4"] .field > .lab, .modal.wide.brief1[data-d="5"] .field > label, .modal.wide.brief1[data-d="5"] .field > .lab { font-size: 11px; }
.modal.wide.brief1[data-d="5"] .field { gap: 2px; }

/* ---------- team management ---------- */
.team-list { display: grid; gap: 0; }
.team-group { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t3); padding: 16px 0 6px; }
.team-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.team-row .tools { display: flex; gap: 2px; align-items: center; }
.team-row .avatar-btn { border-radius: 50%; position: relative; }
.team-row .avatar-btn:hover .avatar { border-color: var(--green); }
.team-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 10px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--black); }
.crop-stage { display: flex; gap: 28px; align-items: center; justify-content: center; padding: 8px 0; }
.crop-stage .avatar.big { --s: 180px; }
.crop-stage figure { margin: 0; display: grid; gap: 8px; justify-items: center; font-size: 11.5px; color: var(--t3); }
.sliders { display: grid; gap: 12px; }
.sliders label { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 12px; font-size: 12.5px; font-weight: 600; }

/* ---------- toasts ---------- */
#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.toast { background: var(--white); color: var(--black); font-weight: 600; font-size: 13.5px; padding: 11px 16px; border-radius: var(--r); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); display: flex; gap: 10px; align-items: center; }
.toast.bad { background: var(--orange); }
.toast svg { stroke-width: 2.4; }

/* ---------- print preview + the A4 sheet ---------- */
.print-view { position: fixed; inset: 0; z-index: 70; background: #050505; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.print-bar { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.print-bar .fit { font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; margin-right: auto; min-width: 0; }
.print-bar .fit.ok { color: var(--green); }
.print-bar .fit.over { color: var(--orange-text); }
.print-stage { overflow: auto; padding: 24px; display: grid; justify-items: center; align-content: start; gap: 16px; }
.print-over { width: min(794px, 100%); border: 1px solid var(--orange); background: var(--orange-soft); border-radius: var(--r); padding: 12px 16px; font-size: 13.5px; }
.print-over ul { margin: 6px 0 0; padding-left: 18px; }
.sheet-scale { transform-origin: top left; }
#print-root { position: absolute; left: -99999px; top: 0; }

.sheet { width: 210mm; height: 297mm; background: #fff; color: #0A0A0A; padding: 11mm 12mm 9mm; font: 400 8.9pt/1.36 var(--font); position: relative; overflow: hidden; }
.sheet.flow { height: auto; min-height: 297mm; overflow: visible; }
.sheet.s1 { font-size: 8.4pt; } .sheet.s2 { font-size: 7.9pt; line-height: 1.32; } .sheet.s3 { font-size: 7.5pt; line-height: 1.3; }
.sheet * { box-sizing: border-box; }
.sh-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 3.2mm; border-bottom: .5mm solid #0A0A0A; }
.sh-top img { height: 5mm; width: auto; display: block; }
.sh-top div { font-size: .82em; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-align: right; }
.sh-title { padding: 4mm 0 3mm; display: grid; gap: 1mm; }
.sh-title h1 { margin: 0; font-size: 1.95em; font-weight: 800; line-height: 1.12; overflow-wrap: anywhere; }
.sh-title p { margin: 0; font-size: 1.05em; font-weight: 500; color: #333; }
.sh-facts { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; border: .3mm solid #0A0A0A; }
.sh-facts > div { padding: 2mm 2.6mm; border-right: .3mm solid #0A0A0A; min-width: 0; }
.sh-facts > div:last-child { border-right: 0; }
.sh-facts > div.key { background: #0A0A0A; color: #fff; }
.sh-lead { display: flex; gap: 2.2mm; align-items: center; }
.sh-lead > div { min-width: 0; }
.sheet .avatar { --s: 9.5mm; border: .25mm solid #0A0A0A; background-color: #eee; }
.sh-lab { font-size: .76em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #555; display: block; margin-bottom: .6mm; }
.sh-facts .key .sh-lab { color: #8BFE64; }
.sh-facts b { font-weight: 700; font-size: 1.04em; display: block; overflow-wrap: anywhere; }
.sh-facts small { font-size: .86em; color: #444; display: block; }
.sh-facts .key small { color: #ddd; }
.sh-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 7mm; margin-top: 3.4mm; }
.sh-sec { padding-top: 2.6mm; break-inside: avoid; }
.sh-sec h2 { margin: 0 0 1.6mm; font-size: .86em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding-bottom: 1mm; border-bottom: .25mm solid #0A0A0A; display: flex; gap: 2mm; }
.sh-sec h2 i { font-style: normal; }
.sh-q { margin-bottom: 1.7mm; }
.sh-q p, .sh-sec p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sh-list { margin: 0; padding: 0; list-style: none; }
.sh-list li { display: grid; grid-template-columns: 4mm 1fr; padding: .5mm 0; overflow-wrap: anywhere; }
.sh-list li::before { content: ''; width: 2.2mm; height: 2.2mm; border: .3mm solid #0A0A0A; margin-top: .9mm; }
.sh-list small { color: #555; font-size: .86em; }
.sh-kv { display: grid; grid-template-columns: 27mm 1fr; gap: .9mm 2mm; margin: 0; }
.sh-kv dt { font-weight: 600; color: #444; font-size: .92em; }
.sh-kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sh-kw { display: flex; flex-wrap: wrap; gap: 1.2mm; margin-bottom: 1.8mm; }
.sh-kw span { border: .3mm solid #0A0A0A; padding: .3mm 2mm; font-weight: 700; font-size: .92em; }
.sh-table { width: 100%; border-collapse: collapse; }
.sh-table th { text-align: left; font-size: .76em; letter-spacing: .08em; text-transform: uppercase; color: #555; font-weight: 700; padding: 0 2mm 1mm 0; }
.sh-table td { padding: 1mm 2mm 1mm 0; border-top: .2mm solid #bbb; vertical-align: top; overflow-wrap: anywhere; }
.sh-table td:first-child { font-weight: 700; }
.sh-foot { position: absolute; left: 12mm; right: 12mm; bottom: 5mm; display: flex; justify-content: space-between; font-size: 6.6pt; color: #666; border-top: .2mm solid #bbb; padding-top: 1.4mm; }
.sheet.flow .sh-foot { position: static; margin-top: 6mm; }
.sh-blank { color: #999; }

@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { height: auto; background: #fff; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { position: static; left: auto; }
  .sheet { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- smaller screens ---------- */
@media (max-height: 880px) and (min-width: 1101px) {
  .rows { grid-auto-rows: minmax(46px, 72px); }
  .topbar { padding-top: 12px; padding-bottom: 10px; }
  .strip { padding-bottom: 10px; }
  .tile, .search input { height: 48px; }
  .c-who .avatar, .t-who .avatar { --s: 36px; }
  .bline { height: 21px; }
}
@media (max-height: 800px) and (min-width: 1101px) {
  .rows { grid-auto-rows: minmax(43px, 72px); }
  .topbar { padding-top: 10px; padding-bottom: 8px; }
  .tile, .search input { height: 44px; }
  .c-who .avatar, .t-who .avatar { --s: 32px; }
  .t-who small { font-size: 11px; }
  .bline { height: 20px; }
  .rhead { height: 30px; }
  .foot { padding-top: 5px; padding-bottom: 6px; }
}
@media (max-width: 1640px) {
  .head-btn span { display: none; }
  .head-btn { padding: 0; width: 26px; justify-content: center; }
  .col-team .col-head { gap: 6px; padding: 0 10px; letter-spacing: .05em; }
  .col-tabs { gap: 2px; margin-left: -4px; } .col-tabs button { padding: 0 6px; gap: 5px; }
  .col-tabs .full { display: none; } .col-tabs .short { display: inline; }
}
@media (max-width: 1500px) {
  :root { --pad: 20px; }
  .board { grid-template-columns: 290px minmax(0, 1fr) 350px; }
  .col-team .hint, .col-list .hint { display: none; }
  .legend { gap: 8px; }
  .roster { --g: 40px minmax(200px, 22%) minmax(0, 1fr) 112px; --b: minmax(0, 1fr) 232px 236px; }
  .team-ind span { display: none; }
  .brand p { display: none; }
}
@media (max-width: 1280px) {
  .board { grid-template-columns: 262px minmax(0, 1fr) 312px; gap: 10px; }
  .roster { --b: minmax(0, 1fr) 150px 228px; }
  .meter { display: none; }
  .clock { display: none; }
  .me-btn .me-name { display: none; }
}
@media (max-width: 1100px) {
  :root { --pad: 14px; }
  .topbar { flex-wrap: wrap; gap: 8px 14px; padding-top: 10px; padding-bottom: 8px; }
  .brand h1 { font-size: 17px; }
  .brand img { height: 18px; }
  .brand-div { height: 26px; }
  .brand { gap: 12px; }
  .top-right { gap: 10px; }
  .team-ind { display: none; }
  .strip { gap: 8px; padding-bottom: 8px; }
  .tile { height: 42px; padding: 0 10px; gap: 8px; }
  .tile b { font-size: 19px; }
  .tile span { font-size: 11.5px; }
  .search input { height: 42px; }
  .board { grid-template-columns: minmax(200px, 25%) minmax(0, 1fr) minmax(210px, 29%); gap: 8px; }
  .legend { display: none; }
  .col-head { padding: 0 10px; height: 32px; }
  .col-head .link-btn { display: none; }
  .trow { grid-template-columns: 22px minmax(0, 1fr) auto 28px; }
  .trow .icon-btn { width: 28px; height: 28px; }
  .t-who { gap: 8px; }
  .star svg { width: 13px; height: 13px; }
  .lrow { padding: 6px 10px; gap: 8px; }
  .l-due b { font-size: 11.5px; }
  .foot span:nth-child(n+2) { display: none; }
  .drawer { width: 100%; border-left: 0; }
  .d-head, .d-body, .d-foot { padding-left: 16px; padding-right: 16px; }
  .kv, .hist li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .modal-scrim { padding: 0; place-items: stretch; }
  .modal.wide { width: 100%; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  .modal.wide > header, .modal.wide > footer { padding-left: 16px; padding-right: 16px; }
  .modal:not(.wide) { margin: 16px; align-self: center; width: auto; }
  .b1-top { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  .b1-cols { gap: 0 18px; }
  .b1 { padding-left: 16px; padding-right: 16px; }
  .b1-sec h3 .hint { display: none; }
  .brief1 .field.row { grid-template-columns: 64px minmax(0, 1fr); gap: 0 8px; }
  .form-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .form-nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; gap: 4px; }
  .form-nav button { flex: none; padding: 6px 10px 6px 6px; }
  .form-nav .req-note { display: none; }
  .form-scroll { padding: 0 16px 32px; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .team-row { grid-template-columns: 48px minmax(0, 1fr); }
  .team-row .tools { grid-column: 1 / -1; justify-content: flex-end; }
  .team-add { grid-template-columns: minmax(0, 1fr); }
  .crop-stage { gap: 16px; }
  .crop-stage .avatar.big { --s: 140px; }
  .print-stage { padding: 12px; }
}
/* phones: one column, normal scrolling — a phone screen cannot hold three columns */
@media (max-width: 700px) {
  .b1-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b1-extra { grid-template-columns: minmax(0, 1fr); }
  .b1-cols { grid-template-columns: minmax(0, 1fr); }
  .b1-pair { grid-template-columns: minmax(0, 1fr); }
  .b1-extra .collab { display: grid; }
  .brief1 > header .h-sub { display: none; }
  .modal.wide.brief1 > footer { flex-wrap: wrap; }
  .brief1 > footer .tz-echo { white-space: normal; flex-basis: 100%; }
  .brief1 .textarea { resize: vertical; }
  .drawer.bv { left: 0; right: 0; top: 0; bottom: 0; border-radius: 0; border: 0; }
  .drawer.bv .d-body { column-width: auto; columns: 1; overflow-y: auto; overflow-x: hidden; height: auto; }
  .sub-add { grid-template-columns: minmax(0, 1fr); }
  html, body { height: auto; }
  #app { height: auto; display: block; }
  .top-right { flex-wrap: wrap; margin-left: 0; width: 100%; }
  .top-right .me { margin-left: auto; }
  .strip { flex-wrap: wrap; }
  .tile { flex: 1 1 calc(50% - 10px); height: 48px; }
  .tile:has(.chip.sample) { flex: 0 0 auto; }
  .search { flex-basis: 100%; }
  .board { display: block; }
  .col { display: block; overflow: visible; margin-bottom: 12px; }
  .col-head { height: auto; min-height: 38px; flex-wrap: wrap; padding: 8px 12px; white-space: normal; }
  .legend { display: flex; flex-wrap: wrap; gap: 6px 10px; }
  .legend span:nth-child(2), .legend span:nth-child(3) { display: inline-flex; }
  .col-head .link-btn { display: inline; }
  .col .rows { display: block; overflow: visible; }
  .trow { min-height: 54px; grid-template-columns: minmax(0, 1fr) auto 38px; padding-left: 12px; }
  .trow .c-idx { display: none; }
  .star svg { width: 17px; height: 17px; }
  .tiles { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .blist { overflow: visible; }
  .lrow { grid-template-columns: 10px minmax(0, 1fr); padding: 9px 14px; }
  .l-due { grid-column: 2; text-align: left; display: flex; gap: 10px; align-items: baseline; }
  .foot { padding-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
