/* Team page, everyday work: overview, projects board, reviews, calendar, library, departments, guests */
.tabs .tab-sep { align-self: center; margin: 0 4px 0 10px; padding-left: 12px; border-left: 1px solid var(--line); font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.row.sb { justify-content: space-between; }
.tw-bar { margin-bottom: 14px; gap: 10px; }
.tw-quick { margin-bottom: 14px; }
.tw-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.tw-cols.wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.tile.warn b { color: #c4320e; }
.av { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 600 10px var(--sans); flex: none; }
.people .av { margin-right: -4px; border: 2px solid var(--card); }
.due { font: 500 12px var(--mono); font-style: normal; color: var(--ink2); white-space: nowrap; }
.due.late { color: #c4320e; font-weight: 600; }
.meter { display: block; height: 5px; border-radius: 4px; background: var(--paper2); overflow: hidden; margin-top: 5px; }
.meter u { display: block; height: 100%; background: var(--green); text-decoration: none; }
em.tag { font-style: normal; }
.files > p { grid-column: 1 / -1; }
.cmt .linkish { font-size: 12px; margin-left: 8px; }
.tabs button { padding: 8px 11px; font-size: 13.5px; }
.linkish { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 600; text-decoration: underline; font-size: inherit; }

/* Lines in lists */
.tw-line { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 2px; }
.tw-line:last-child { border-bottom: 0; }
.tw-line:hover { background: var(--paper); }
.tw-line > i { width: 10px; height: 34px; border-radius: 4px; flex: none; }
.tw-line > span:not(.av):not(.thumb) { flex: 1; min-width: 0; }
.tw-line b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-line small { color: var(--mute); font-size: 12px; }
.tw-line em.tag { flex: none; }
.thumb { display: inline-block; width: 52px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper2) center / contain no-repeat; flex: none; }
.thumb.big { width: 100%; height: 110px; }
.tw-task { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tw-task:last-child { border-bottom: 0; }
.tw-task .tick { flex: 1; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; min-width: 0; }
.tw-task input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--green); }
.tw-task b { display: block; font-weight: 500; }
.tw-task small a { color: var(--mute); }
.tw-task.done b { text-decoration: line-through; color: var(--mute); }

/* Board */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--paper2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 240px; transition: background .15s; }
.col.over { background: #e3ddcf; outline: 2px dashed var(--ink); outline-offset: -4px; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-size: 14px; }
.col-head span { font: 500 12px var(--mono); color: var(--mute); }
.col-body { display: flex; flex-direction: column; gap: 8px; }
.pcard { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.pcard:hover { border-color: var(--ink); border-left-color: var(--c); box-shadow: 2px 2px 0 rgba(21, 21, 21, .1); }
.pcard.dragging { opacity: .4; }
.pcard b { display: block; font-weight: 600; line-height: 1.3; }
.pcard p { margin: 4px 0 0; font-size: 13px; color: var(--ink2); }
.pmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; }
.pmeta small { font-size: 12px; color: var(--mute); }
em.dept { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--d) 16%, #fff); color: var(--ink); border: 1px solid color-mix(in srgb, var(--d) 40%, #fff); }
.tw-hero { text-align: center; padding: 36px 24px; }
.tw-hero .note { max-width: 520px; margin: 6px auto 16px; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--paper); }
.tag.st-todo { background: var(--paper2); }
.tag.st-doing { background: #dfe7ff; color: #1f3da8; }
.tag.st-review { background: #fff3c8; color: #7a5a00; }
.tag.st-done { background: #e1f2e7; color: #0b6b3a; }
.tag.replaced { background: var(--paper2); color: var(--mute); }

/* One project */
.proj-head { border-top: 6px solid var(--c); }
.title-in { flex: 1; min-width: 0; border: 0; background: none; font: 700 30px/1.15 var(--serif); letter-spacing: -.02em; padding: 2px 0; border-bottom: 1px dashed transparent; }
.title-in:not([readonly]):hover, .title-in:focus { border-bottom-color: var(--line); outline: none; }
.proj-facts { gap: 14px 18px; margin-top: 12px; align-items: flex-end; }
.proj-facts > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--mute); }
.proj-facts .sel, .proj-facts .text { height: 34px; }
.fact { font-size: 15px; color: var(--ink); font-weight: 500; height: 34px; display: flex; align-items: center; }
.prog { margin-left: auto; min-width: 170px; }
.prog b { font: 500 22px var(--mono); margin-right: 6px; }
.prog small { color: var(--mute); font-size: 12px; }
.late-note { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: #fbe4e0; color: #a3261b; font-size: 14px; font-weight: 600; }
textarea.brief { width: 100%; min-height: 130px; }
.brief-read { font-size: 15px; white-space: normal; }
.task { display: grid; grid-template-columns: 20px minmax(0, 1fr) 150px 140px 28px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.task input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--green); }
.task .text, .task .sel { height: 34px; }
.task .t-text.text { border-color: transparent; background: none; }
.task .t-text.text:hover, .task .t-text.text:focus { border-color: var(--line); background: #fff; }
.task.done .t-text { text-decoration: line-through; color: var(--mute); }
.task .x { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--mute); }
.task.add { grid-template-columns: minmax(0, 1fr) 150px 140px auto; border-bottom: 0; margin-top: 8px; }
.task span.t-text { font-size: 15px; }
.t-who-r { font-size: 13px; color: var(--ink2); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.fcard { border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; min-width: 0; }
.fcard .fpic { display: grid; place-items: center; height: 96px; border-radius: 8px; background: var(--paper2) center / contain no-repeat; margin-bottom: 6px; color: var(--mute); font-size: 12px; text-decoration: none; }
.fcard b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcard small { display: block; color: var(--mute); font-size: 11px; margin-bottom: 6px; }
.fcard .row { gap: 4px; }
.fcard .btn.small { height: 26px; padding: 0 9px; }
.note-add textarea { width: 100%; min-height: 64px; }
.pnote { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pnote:last-child { border-bottom: 0; }
.pnote p { margin: 0; }
.pnote .meta { font-size: 12px; color: var(--mute); margin-bottom: 2px; }
.att, .guest { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.att > span, .guest > span:not(.av) { flex: 1; min-width: 0; }
.att b, .guest b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att small, .guest small { color: var(--mute); font-size: 12px; }
.att img, .att .ext { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); display: grid; place-items: center; font: 600 10px var(--mono); background: var(--paper2); color: var(--ink2); }
.tw-pop { position: absolute; z-index: 60; background: var(--card); border: 1px solid var(--ink); border-radius: 12px; padding: 6px; box-shadow: 4px 4px 0 rgba(21, 21, 21, .15); }
.tw-pop button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.tw-pop button:hover { background: var(--paper2); }
.tw-pop .danger { color: #c4320e; }

/* Pickers and forms */
.pick { display: flex; flex-direction: column; max-height: 55vh; overflow: auto; }
.pick.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick-item { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 8px 4px; }
.pick-item:hover { background: var(--paper); }
.pick-item b { display: block; font-weight: 600; }
.pick-item small { color: var(--mute); font-size: 12px; }
.pick-item.tpl { flex-direction: column; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.tw-form { display: flex; flex-direction: column; gap: 12px; }
.tw-form .row { flex-wrap: nowrap; gap: 10px; }
.tw-form textarea.text { min-height: 80px; }
.pick-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; max-height: 180px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.own-brand { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.own-brand .cols { flex-wrap: wrap; }
.own-brand input[type=color] { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0; background: none; }

/* Modal */
.tw-modal { position: fixed; inset: 0; z-index: 80; background: rgba(21, 21, 21, .42); display: grid; place-items: center; padding: 16px; }
.tw-mcard { background: var(--card); border: 1px solid var(--ink); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 6px 6px 0 rgba(21, 21, 21, .18); }
.tw-mcard.wide { width: min(1100px, 100%); }
.tw-mhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 8px; }
.tw-mhead h3 { margin: 0; font: 700 22px/1.2 var(--serif); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-mhead .x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 20px; line-height: 1; flex: none; }
.tw-mbody { padding: 8px 20px 16px; overflow: auto; }
.tw-mfoot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }

/* Calendar */
.cal-title { margin: 0 6px; font: 600 22px var(--serif); min-width: 190px; text-align: center; }
.cal { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.cal-days, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-days span { padding: 8px 10px; font: 600 12px var(--sans); color: var(--mute); border-bottom: 1px solid var(--line); }
.cday { min-height: 112px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cday:nth-child(7n) { border-right: 0; }
.cday.out { background: var(--paper); }
.cday.out .dn { color: var(--mute); }
.cday.can { cursor: pointer; }
.cday.can:hover { background: #fffdf6; }
.cday .dn { font: 500 12px var(--mono); margin-bottom: 2px; }
.cday.today .dn { background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; align-self: flex-start; }
.cev { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c); border-radius: 5px; background: color-mix(in srgb, var(--c) 12%, #fff); padding: 2px 6px; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cev small { font: 500 10px var(--mono); color: var(--ink2); }
.cev.idea { opacity: .75; border-left-style: dotted; }
.cev.posted { text-decoration: line-through; opacity: .6; }
.cev.pdue { background: none; border: 1px dashed var(--c); border-left: 3px solid var(--c); }
.cal-key { margin-top: 10px; gap: 14px; font-size: 12px; color: var(--mute); }
.ck::before { content: ''; display: inline-block; width: 12px; height: 10px; border-radius: 3px; margin-right: 5px; background: #dfe7ff; border-left: 3px solid var(--blue); vertical-align: -1px; }
.ck.idea::before { border-left-style: dotted; opacity: .75; }
.ck.posted::before { opacity: .5; }
.ck.due::before { background: none; border: 1px dashed var(--blue); border-left: 3px solid var(--blue); }

/* Library */
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.litem { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.lpic { height: 140px; background: #fff center / contain no-repeat; border-bottom: 1px solid var(--line); }
.litem.image .lpic { background-size: cover; }
.litem.logo .lpic { background-size: 60%; }
.lmeta { padding: 10px 12px 4px; flex: 1; min-width: 0; }
.lmeta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmeta small { color: var(--mute); font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tags em { font-style: normal; font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--paper2); color: var(--ink2); }
.litem .acts { padding: 6px 12px 12px; gap: 6px; }

/* Departments */
.depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card.dept { border-top: 6px solid var(--d); margin: 0; }
.dot { display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .15); }

/* Reviews */
.revgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.rcard { display: flex; flex-direction: column; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; padding: 0; }
.rcard:hover { border-color: var(--ink); }
.rpic { height: 160px; background: var(--paper2) center / contain no-repeat; display: grid; place-items: center; color: var(--mute); font-size: 12px; border-bottom: 1px solid var(--line); }
.rbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.rbody b { font-weight: 600; }
.rbody small { color: var(--mute); font-size: 12px; }
.rbody .row { gap: 4px; margin-top: 6px; }
.review { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; }
.rv-pic { min-width: 0; }
.rv-stage { position: relative; display: inline-block; max-width: 100%; border-radius: 10px; overflow: visible; background: var(--paper2); }
.rv-stage img { display: block; max-width: 100%; min-width: min(100%, 420px); max-height: 68vh; border-radius: 10px; cursor: crosshair; user-select: none; }
.rv-hint { margin: 6px 0 0; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50% 50% 50% 0; background: var(--red); color: #fff; border: 2px solid #fff; font: 700 11px var(--sans); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); padding: 0; cursor: pointer; }
.pin.done { background: var(--mute); }
.pin.new { background: var(--blue); pointer-events: none; }
.pin.sm { position: static; transform: none; width: 22px; height: 22px; font-size: 10px; flex: none; box-shadow: none; }
.pin.sm.none { background: var(--paper2); border-color: var(--line); }
.rv-side { min-width: 0; }
.rv-side h3 { font: 600 16px var(--serif); margin: 14px 0 6px; }
.rv-side blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--line); background: var(--paper); border-radius: 0 8px 8px 0; font-size: 14px; }
.rv-side blockquote.dec { border-left-color: var(--red); }
.rv-side .meta { font-size: 13px; color: var(--mute); margin: 8px 0 0; }
.vers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.vers button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.vers button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cmts { max-height: 36vh; overflow: auto; }
.cmt { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); transition: background .4s; }
.cmt.flash { background: #fff3c8; }
.cmt p { margin: 0; font-size: 14px; }
.cmt .meta { margin: 0; font-size: 12px; }
.cmt.done > div > p:not(.meta) { color: var(--mute); text-decoration: line-through; }
.cadd textarea, .decide textarea { width: 100%; min-height: 64px; margin: 8px 0 6px; }

@media (max-width: 900px) {
  .tw-cols, .tw-cols.wide, .review { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(4, 240px); }
  .task { grid-template-columns: 20px minmax(0, 1fr) 28px; }
  .task .t-who, .task .t-due, .task .t-who-r { grid-column: 2; }
  .task.add { grid-template-columns: 1fr 1fr; }
  .task.add input[name=text] { grid-column: 1 / -1; }
  .cday { min-height: 74px; padding: 3px; }
  .cev { font-size: 10px; padding: 1px 3px; }
  .cal-title { min-width: 0; font-size: 18px; }
  .prog { margin-left: 0; }
  .title-in { font-size: 24px; }
}
@media (max-width: 560px) {
  .cev small { display: none; }
  .tw-form .row { flex-wrap: wrap; }
}
