/* Pastel, same family as the Website Updater: rose to lavender, plum ink, magenta accent. */
:root {
  color-scheme: light;
  --bg: #fdf0f6;
  --bg2: #f1e9fb;
  --surface: #fffafc;
  --surface-2: #f6edfa;
  --text: #3a2146;
  --muted: #7b5c87;
  --line: #f0d9e8;
  --pink: #ffc4dd;
  --pink-soft: #ffe4ef;
  --lavender: #d9c9f5;
  --lavender-soft: #eee6fb;
  --lavender-deep: #7451ad;
  --magenta: #d3146f;
  --accent: #d3146f;
  --accent-soft: #ffe4ef;
  --warn: #a8560a;
  --warn-soft: #fff0dc;
  --danger: #b00f5c;
  --ok: #1f7a4a;
  --ok-soft: #dff5e7;
  --radius: 20px;
  --shadow: 0 6px 22px rgba(170, 90, 160, .08);
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --voice: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 var(--body);
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%) fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
html { background: var(--bg); }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font: 400 2.2rem/1.05 var(--display); text-transform: uppercase; letter-spacing: .01em; color: var(--magenta); }
h2 { font: 400 1.2rem/1.15 var(--display); text-transform: uppercase; letter-spacing: .02em; color: var(--text); margin-top: 1.75rem; }
h2 .muted { font: 400 .85rem var(--body); text-transform: none; letter-spacing: 0; }
small, .muted { color: var(--muted); }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font: 400 1.5rem/1 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--text); text-decoration: none; }
nav { display: flex; align-items: center; gap: 1.1rem; }
nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
nav a.active { color: var(--magenta); }
nav a.btn.active { color: #fff; }
main { max-width: 1280px; margin: 0 auto; padding: 1.25rem 16px 5rem; }
body.narrow main { max-width: 860px; }
#banner:empty { display: none; }
#banner { max-width: 1280px; margin: .75rem auto 0; padding: 0 16px; }

/* buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--lavender-deep); border-color: var(--lavender-deep); color: #fff; }
.btn.primary:hover { background: #613f99; border-color: #613f99; }
nav .btn.primary { color: #fff; }
.btn.small { padding: .35rem .8rem; font-size: .9rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem;
}
textarea { min-height: 6rem; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
label { display: block; font-size: .85rem; color: var(--muted); margin: .75rem 0 .25rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.notice { border-radius: var(--radius); padding: .75rem 1rem; background: var(--warn-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); margin-bottom: 1rem; }
.update-bar { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: .8rem; padding: .6rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, .15); max-width: calc(100vw - 2rem); }
.notice.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

/* list */
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.chip { padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .9rem; cursor: pointer; }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.calls { display: grid; gap: .75rem; }
.call {
  display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center;
  text-decoration: none; color: inherit; padding: .75rem;
}
.call:hover { border-color: var(--accent); }
.thumb { width: 64px; height: 80px; border-radius: 10px; background: var(--surface-2) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 1.4rem; }
.call h3 { font-size: 1.05rem; margin: 0 0 .15rem; }
.call .meta { font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.days { text-align: center; min-width: 3.5rem; }
.days b { display: block; font-size: 1.35rem; line-height: 1; }
.days span { font-size: .75rem; color: var(--muted); }
.days.soon b { color: var(--warn); }
.days.past b { color: var(--muted); }
.progress { height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: .4rem; overflow: hidden; max-width: 220px; }
.progress i { display: block; height: 100%; background: var(--accent); }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--muted); text-transform: capitalize; }
.badge.review { background: var(--accent-soft); color: var(--accent); }
.badge.preparing { background: var(--warn-soft); color: var(--warn); }
.badge.submitted, .badge.accepted { background: var(--ok-soft); color: var(--ok); }
.badge.error { background: var(--warn-soft); color: var(--danger); }
.badge.processing { background: var(--accent-soft); color: var(--accent); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }

/* intake */
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 2rem 1rem;
  text-align: center; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { display: block; font-size: 1.1rem; margin-bottom: .25rem; }
.previews { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.previews .pv { position: relative; width: 84px; height: 110px; border-radius: 10px; background: var(--surface-2) center/cover; display: grid; place-items: center; font-size: .75rem; color: var(--muted); overflow: hidden; }
.previews .pv button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }

/* detail */
.detail-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.detail-head .sub { color: var(--muted); }
.deadline-box { text-align: right; }
.deadline-box b { font-size: 1.6rem; display: block; line-height: 1.1; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem 1.25rem; margin-top: 1rem; }
.fact { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.fact dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.fact dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
.fit { margin-top: 1rem; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 24px 1fr auto; gap: .75rem; padding: .55rem 0; align-items: start; }
.timeline li.today-marker { grid-template-columns: 24px 1fr; color: var(--accent); font-size: .8rem; font-weight: 600; padding: .1rem 0; }
.timeline li.today-marker span:last-child { display: flex; align-items: center; gap: .5rem; }
.timeline li.today-marker span:last-child::after { content: ""; flex: 1; border-top: 1px dashed var(--accent); }
.check {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  cursor: pointer; display: grid; place-items: center; color: #fff; font-size: .8rem; padding: 0; position: relative; z-index: 1;
}
.done .check { background: var(--ok); border-color: var(--ok); }
.done .t-title { text-decoration: line-through; color: var(--muted); }
.overdue .t-date { color: var(--warn); font-weight: 600; }
.t-title { font-weight: 500; }
.t-desc { font-size: .88rem; color: var(--muted); }
.t-date { font-size: .85rem; color: var(--muted); white-space: nowrap; text-align: right; }
.t-date input { width: 9.5rem; padding: .2rem .4rem; font-size: .85rem; }
.deadline-row .check { border-color: var(--accent); background: var(--accent); }
.deadline-row .t-title { font-weight: 700; color: var(--accent); }
.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.doc { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: center; padding: .7rem .85rem; }
.doc .name { font-weight: 500; }
.doc .details { font-size: .88rem; color: var(--muted); }
.doc .have { font-size: .82rem; color: var(--ok); margin-top: .15rem; }
.status-btn { min-width: 6.5rem; }
.status-btn.todo { }
.status-btn.drafting { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.status-btn.ready { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; }
.contact { font-size: .92rem; overflow-wrap: anywhere; }
.contact b { display: block; }
.questions li { margin: .25rem 0; }
.sources { display: flex; gap: .5rem; flex-wrap: wrap; }
.sources a img { width: 110px; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.sources .src-text { white-space: pre-wrap; font-size: .88rem; max-height: 10rem; overflow: auto; flex: 1 1 100%; }
.inline-add { display: flex; gap: .5rem; margin-top: .5rem; }
.inline-add input { flex: 1; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: .25rem; }
.icon-btn:hover { color: var(--danger); }
.processing { text-align: center; padding: 3rem 1rem; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.folder { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.material-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: .5rem; margin-bottom: .5rem; }

#toast { position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: 999px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; }

body.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
body.login form { width: 100%; max-width: 320px; display: grid; gap: .75rem; }
.err { color: var(--danger); margin: 0; }

@media (max-width: 600px) {
  .call { grid-template-columns: 52px 1fr auto; gap: .7rem; }
  .thumb { width: 52px; height: 66px; }
  .grid2, .material-row { grid-template-columns: 1fr; }
  .deadline-box { text-align: left; }
  nav { gap: .75rem; }
  .brand small { display: none; }
  .timeline li { grid-template-columns: 24px 1fr; row-gap: 0; }
  .timeline li .t-date { grid-column: 2; text-align: left; }
}

/* ---------- hub: shared pieces ---------- */
.voice { font: italic 400 1.3rem/1.35 var(--voice); margin: 0; color: var(--muted); }
.eyebrow { display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--lavender-deep); margin-bottom: .2rem; }
.sample { display: inline-block; padding: 0 .4rem; border: 1px dashed var(--lavender); border-radius: 99px; font: 500 .66rem/1.5 var(--body); color: var(--muted); letter-spacing: .03em; vertical-align: 1px; white-space: nowrap; }
.wtag { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.wtag i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.15rem; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.panel-head h2 { margin: 0; }
.panel-head h2::before { content: "✦"; color: var(--pink); font-family: var(--body); font-size: .8em; margin-right: .4em; }
.board { background: linear-gradient(150deg, var(--pink-soft), var(--lavender-soft)); border-color: transparent; }
.board .row, .board .none { border-top-color: rgba(123, 92, 135, .16); }
.count { font-size: .78rem; color: var(--muted); }
.panel-foot { margin: .6rem 0 0; font-size: .88rem; }
.samplebar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .86rem; color: var(--muted); padding: .55rem .85rem; border: 1px dashed var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.samplebar a { white-space: nowrap; }
.more { margin-top: .6rem; font-size: .88rem; }
.more summary { cursor: pointer; color: var(--muted); }

/* home */
.mast { margin-bottom: 1rem; }
.mast h1 { margin-bottom: .2rem; font-size: 2.4rem; }
.works { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.work { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: color-mix(in srgb, var(--c) 16%, #fffafc); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.work:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(170, 90, 160, .16); }
.work img { width: 100%; height: 112px; object-fit: cover; object-position: center 28%; display: block; }
.work-text { padding: .7rem .85rem .75rem; min-width: 0; }
.work h3 { font: 400 1.35rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 .25rem; }
.work-next { font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-next b { color: var(--magenta); }
.work-stats { font-size: .76rem; color: var(--muted); }

.work.general { background: linear-gradient(150deg, var(--lavender-soft), var(--pink-soft)); border: 2px dashed var(--lavender); box-shadow: none; justify-content: flex-end; }
.work.general .work-next { white-space: normal; }

.gantt-panel { margin-bottom: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .76rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { display: inline-block; }
.l-run { width: 16px; height: 5px; border-radius: 3px; background: var(--muted); }
.l-deadline { width: 9px; height: 9px; background: var(--muted); transform: rotate(45deg); }
.l-event { width: 16px; height: 9px; border: 1.5px solid var(--muted); border-radius: 2px; }
.gantt-scroll { overflow-x: auto; }
.gantt { min-width: 720px; }
.g-row { display: grid; grid-template-columns: 250px minmax(0, 1fr) 84px; gap: .75rem; align-items: stretch; color: inherit; text-decoration: none; }
a.g-row { border-top: 1px solid var(--line); }
a.g-row:hover { background: var(--surface-2); }
a.g-row:hover .row-title { color: var(--accent); }
.g-row.axis { height: 18px; }
.g-group, .g-noted > summary { display: block; font-size: .72rem; font-weight: 600; color: var(--text); padding: .6rem 0 .25rem; }
.g-group span { font-weight: 400; color: var(--muted); }
.g-noted > summary { cursor: pointer; }
.g-label { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: .32rem 0 .32rem .25rem; }
.g-label .row-title { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-track { position: relative; display: block; min-height: 18px; }
.g-today { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--accent); }
.g-bar { position: absolute; top: 50%; height: 9px; margin-top: -4.5px; border-radius: 99px; background: color-mix(in srgb, var(--c) 55%, #fff); }
.g-event { position: absolute; top: 50%; height: 16px; min-width: 8px; margin-top: -8px; background: color-mix(in srgb, var(--c) 18%, #fff); border: 1.5px solid var(--c); border-radius: 6px; }
.g-deadline { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 3px; background: var(--c); transform: rotate(45deg); box-shadow: 0 0 0 2px var(--surface); }
.g-date { align-self: center; text-align: right; font-size: .82rem; padding-right: .25rem; white-space: nowrap; }
.g-date small { display: block; font-size: .72rem; color: var(--muted); }
.tick { position: absolute; top: 0; padding-left: 4px; font-size: .7rem; color: var(--muted); border-left: 1px solid var(--line); line-height: 18px; white-space: nowrap; }
.tick.today { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

.columns { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.board-group + .board-group { margin-top: 1.1rem; }
.rows { display: grid; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .65rem; padding: .55rem 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; align-items: start; }
a.row:hover .row-title { color: var(--accent); }
.row.reply { grid-template-columns: 44px minmax(0, 1fr) auto; }
.when { text-align: center; line-height: 1; padding-top: 2px; }
.when b { display: block; font: 400 1.35rem/1 var(--display); }
.when small { display: block; font-size: .66rem; color: var(--muted); margin-top: 2px; }
.when.hot b { color: var(--accent); }
.when.mail { padding-top: 3px; }
.when.mail small { font-size: .62rem; line-height: 1.15; }
.when.mail.decision small { color: var(--accent); font-weight: 600; }
.row-body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.row-title { font-weight: 500; font-size: .92rem; overflow-wrap: anywhere; }
.row-detail { font-size: .84rem; color: var(--muted); }
.row-detail em { font-style: normal; color: var(--text); }
.check-mini { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; }
.check-mini:hover { border-color: var(--ok); color: var(--ok); }
.none { font-size: .86rem; margin: 0; padding: .4rem 0; border-top: 1px solid var(--line); }

.tasks { list-style: none; padding: 0; margin: 0; }
.tasks li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: .55rem; padding: .5rem 0; border-top: 1px solid var(--line); align-items: start; }
.tasks li.muted { display: block; font-size: .86rem; }
.tasks a { color: inherit; text-decoration: none; min-width: 0; }
.tasks a:hover .row-title { color: var(--accent); }
.tasks .check:hover { border-color: var(--ok); }
.task-meta { display: flex; flex-wrap: wrap; gap: 0 .6rem; font-size: .78rem; color: var(--muted); }
.task-due { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.task-due.soon { color: var(--warn); }
.task-due.late { color: var(--accent); font-weight: 600; }
.quick { display: grid; gap: .4rem; margin-top: .7rem; }
.quick-row { display: flex; gap: .4rem; }
.quick input, .quick select { padding: .4rem .55rem; font-size: .86rem; min-width: 0; }
.quick-row .btn { flex: none; }

.cal-head .icon-btn { font-size: 1.3rem; padding: 0 .55rem; line-height: 1; }
.cal-head .icon-btn:hover { color: var(--text); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-grid.wk span { text-align: center; font-size: .7rem; color: var(--muted); padding-bottom: .2rem; }
.day { display: flex; flex-direction: column; align-items: center; height: 40px; padding: 4px 0 0; background: none; border: 0; border-radius: 6px; color: var(--text); font: inherit; font-size: .84rem; cursor: pointer; }
.day:hover { background: var(--surface-2); }
.day.out { color: var(--muted); opacity: .55; }
.day.today > span:first-child { background: var(--magenta); color: #fff; border-radius: 50%; width: 22px; line-height: 22px; font-weight: 600; }
.day.sel { background: var(--lavender-soft); outline: 1.5px solid var(--lavender-deep); }
.dots { display: flex; gap: 2px; margin-top: 2px; height: 5px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.dots i.deadline { border-radius: 0; transform: rotate(45deg); }
.agenda-title { font-size: .82rem; font-weight: 600; margin: .8rem 0 .2rem; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: .55rem; padding: .4rem 0; border-top: 1px solid var(--line); font-size: .86rem; align-items: start; }
.agenda li.muted { display: block; }
.agenda a, .agenda li > span:nth-child(2) { color: inherit; text-decoration: none; display: flex; flex-direction: column; min-width: 0; }
.agenda a:hover .row-title { color: var(--accent); }
.agenda .row-title { font-size: .86rem; }
.k { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--c); }
.k-deadline { border-radius: 0; transform: rotate(45deg); }
.k-event { background: none; border: 1.5px solid var(--c); }
.agenda-when { text-align: right; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.agenda-when .icon-btn { padding: 0 .1rem; }

/* project */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 250px; border-radius: 24px; overflow: hidden; background: color-mix(in srgb, var(--c) 18%, #fffafc); box-shadow: var(--shadow); }
.hero img { order: 2; width: 100%; height: 100%; max-height: 300px; object-fit: cover; object-position: center 30%; display: block; }
.hero.plain { grid-template-columns: minmax(0, 1fr); min-height: 150px; }
.hero-text { padding: 1.4rem 1.6rem; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: .4rem 0 .4rem; }
.back { color: var(--muted); text-decoration: none; font-size: .86rem; }
.tabs { display: flex; gap: 1.4rem; border-bottom: 1px solid var(--line); margin: .5rem 0 1.25rem; overflow: auto hidden; }
.tabs a { padding: .65rem 0; font-weight: 500; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a span { font-size: .76rem; opacity: .8; }
.tabs a.active { color: var(--text); border-color: var(--magenta); }
.overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1.5rem; align-items: start; }
.overview aside { display: grid; gap: 12px; }
.overview > div > h2:first-of-type { margin-top: 1.25rem; }
.lead { font-size: 1.02rem; margin: 0; max-width: 62ch; }
.tab-narrow { max-width: 860px; }
.tab-actions { margin: 0 0 1rem; }
.timeline.compact li { padding: .4rem 0; }
.timeline a { color: inherit; text-decoration: none; }
.timeline a:hover { color: var(--accent); }
.event-dot { width: 14px; height: 14px; margin: 5px; border-width: 2px; }
.earlier { margin: 0 0 1rem; }
.files { list-style: none; margin: 0; padding: 0; }
.files li { border-top: 1px solid var(--line); }
.files a { display: flex; align-items: center; gap: .6rem; padding: .42rem 0; color: inherit; text-decoration: none; font-size: .9rem; min-width: 0; }
.files a:hover .fname { color: var(--accent); }
.files li:has(.remove-file) { display: flex; align-items: center; gap: .4rem; }
.files li:has(.remove-file) a { flex: 1; }
.files .remove-file { font-size: 1.1rem; line-height: 1; padding: .2rem .4rem; color: var(--muted, #888); }
.add-files { margin-top: 1.4rem; }
.web-found { margin: 1.2rem 0; }
.web-found .panel-head { display: flex; align-items: baseline; gap: .6rem; }
.web-links { list-style: none; margin: .4rem 0; padding: 0; }
.web-links li { display: flex; gap: .7rem; align-items: flex-start; padding: .5rem 0; border-top: 1px solid var(--line); }
.web-links .tag { flex: none; min-width: 5.5rem; text-align: center; font-size: .72rem; padding: .15rem .45rem; border-radius: 999px; background: var(--accent-soft, #f3e6f7); }
.web-links a { font-weight: 600; overflow-wrap: anywhere; }
.web-host { font-size: .78rem; color: var(--muted, #888); }
.ext { flex: none; width: 2.9rem; text-align: center; padding: .05rem 0; font-size: .65rem; font-weight: 600; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-radius: 3px; }
.fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.tile { aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; background: var(--surface-2); display: block; color: var(--muted); text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-file { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .3rem; padding: .5rem; font-size: .72rem; text-align: center; overflow-wrap: anywhere; }
.media-file b { font-size: 1.3rem; color: var(--text); }
.media-file span { max-height: 2.8em; overflow: hidden; }
.section-break { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.folders-note { font-size: .76rem; color: var(--muted); margin-top: 1.25rem; overflow-wrap: anywhere; }
.nextup { margin: 1rem 0 0; padding: 1rem 1.15rem; background: linear-gradient(135deg, var(--pink-soft), var(--lavender-soft)); border-radius: var(--radius); }
.nextup strong { font-size: 1.1rem; }
.nextup p { margin: .25rem 0 0; font-size: .9rem; }

@media (max-width: 1080px) {
  .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columns .board { grid-column: 1 / -1; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-stack { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  .mast h1 { font-size: 1.9rem; }
  .voice { font-size: 1.15rem; }
  .work img { height: 84px; }
  .work h3 { font-size: 1.15rem; }
  .samplebar { flex-direction: column; align-items: flex-start; gap: .3rem; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero img { order: 0; height: 170px; }
  nav { gap: .7rem; font-size: .84rem; }
  .nav-home { display: none; }
  .inbox-item { grid-template-columns: minmax(0, 1fr) auto; }
  .inbox-pill { grid-column: 1; grid-row: 1; }
  .inbox-actions { grid-column: 2; grid-row: 1; }
  .inbox-main { grid-column: 1 / -1; grid-row: 2; }
  nav .long { display: none; }
  nav .short { display: inline; }
  .bar-end { margin-left: 0; flex-basis: 100%; }
  nav .btn.small { padding: .3rem .6rem; font-size: .8rem; }
  .top { gap: .5rem; }
}

/* inbox */
.nav-inbox { position: relative; display: inline-flex; align-items: center; gap: .3rem; }
.nav-badge { min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--magenta); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.nav-badge[hidden] { display: none; }
.inbox-list { display: grid; gap: 8px; }
.inbox-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: .8rem; align-items: start; padding: .85rem 1rem; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); }
.inbox-item:not(.unread) { background: transparent; box-shadow: none; border: 1px solid var(--line); }
.inbox-item.unread .inbox-head strong { font-weight: 700; }
.inbox-item:not(.unread) .inbox-head strong { font-weight: 500; }
.inbox-pill { justify-self: start; padding: .1rem .55rem; border-radius: 99px; font-size: .7rem; font-weight: 600; background: var(--lavender-soft); color: var(--lavender-deep); white-space: nowrap; }
.pill-reply, .pill-decision { background: var(--pink-soft); color: var(--magenta); }
.pill-open_call { background: #cfeee9; color: #17756e; }
.pill-suggestion { background: #f6edba; color: #6f5e08; }
.pill-digest { background: #d4e7fb; color: #245f96; }
.inbox-main p { margin: .15rem 0 .25rem; font-size: .9rem; color: var(--muted); }
.inbox-actions { display: flex; align-items: center; gap: .3rem; }
.inbox-do { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .5rem; }
.inbox-do select { width: auto; max-width: 11rem; padding: .28rem .5rem; font-size: .82rem; border-radius: 99px; }
.inbox-task { display: grid; gap: .4rem; margin-top: .5rem; padding: .6rem; background: var(--surface-2); border-radius: 12px; }
.inbox-task[hidden] { display: none; }
.inbox-task input, .inbox-task select { padding: .35rem .5rem; font-size: .85rem; min-width: 0; }
.version { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.version strong { display: block; }
.version p { margin: .1rem 0 0; color: var(--muted); white-space: pre-wrap; }
.task-meta a { color: var(--magenta); }
a.count { text-decoration: none; color: var(--magenta); }

/* notes and ideas */
@media (min-width: 681px) { nav .short { display: none; } }
.work-stack { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; min-width: 0; }
.work-stack .work { justify-content: flex-end; }
.work-stack h3 { font-size: 1.2rem; }
.work.ideas { background: linear-gradient(150deg, var(--pink), var(--lavender)); }
.note-add { margin-bottom: 12px; }
.note-add textarea { min-height: 3.4rem; border: 0; background: transparent; padding: 0; font-size: 1rem; resize: vertical; }
.note-add textarea:focus { outline: none; }
.note-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.note-add-row select { width: auto; padding: .3rem .5rem; font-size: .85rem; }
.note-add-row .btn { margin-left: auto; }
.picks { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.pick { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .65rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
.pick i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pick.on { background: color-mix(in srgb, var(--c) 28%, #fff); border-color: var(--c); color: var(--text); font-weight: 600; }
.pick-new { display: inline-flex; align-items: center; }
.pick-new input { width: 7.5rem; padding: .2rem .55rem; font-size: .8rem; border-radius: 99px; }
.ideas-bar { align-items: center; }
.bar-gap { width: 1px; height: 1.3rem; background: var(--line); margin: 0 .25rem; }
.bar-end { margin-left: auto; font-size: .85rem; }
.note-cards { columns: 260px; column-gap: 12px; }
.note-card { display: flex; flex-direction: column; gap: .3rem; break-inside: avoid; margin-bottom: 12px; padding: .95rem 1rem; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .18s ease; }
.note-card:hover { transform: translateY(-2px); }
.note-card.cat-future { background: #fdebf3; }
.note-card.cat-creative { background: #f1eafc; }
.note-card.cat-costume { background: #ffefe4; }
.note-kind { font-size: .72rem; color: var(--muted); }
.note-text { font-size: .9rem; white-space: pre-wrap; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; overflow: hidden; }
.note-title { font: 400 2.1rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .01em; color: var(--magenta); background: transparent; border: 0; padding: 0; margin-bottom: .6rem; }
.note-body { min-height: 16rem; font-size: 1.02rem; line-height: 1.6; padding: 1rem 1.1rem; border-radius: var(--radius); resize: none; overflow: hidden; box-shadow: var(--shadow); }
.note-theme { font-size: 1.1rem; }
.note-why { margin-left: auto; font-size: .8rem; padding-left: 1rem; text-align: right; }
.map-scroll { overflow: auto; border-radius: 24px; background: linear-gradient(150deg, #fffafc, #f8f1fd); box-shadow: var(--shadow); }
.map { position: relative; }
.map svg { position: absolute; inset: 0; }
.map path { fill: none; transition: opacity .15s; }
.e-root { stroke: var(--lavender); stroke-width: 2; }
.e-theme { stroke-width: 1.3; opacity: .4; }
.e-link { stroke: var(--magenta); stroke-width: 1.3; stroke-dasharray: 3 5; stroke-linecap: round; opacity: .55; }
.m-node { position: absolute; display: flex; align-items: center; justify-content: center; text-align: center; transition: opacity .15s, transform .15s; }
.m-root { font: 400 1.15rem/1 var(--display); text-transform: uppercase; color: #fff; background: var(--magenta); border-radius: 99px; }
.m-hub { font: 400 1rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; border-radius: 99px; padding: 0 .6rem; }
.m-note { flex-direction: column; gap: .15rem; padding: .3rem .55rem; background: #fff; border: 1.5px solid; border-radius: 14px; color: var(--text); text-decoration: none; font-size: .8rem; line-height: 1.2; box-shadow: var(--shadow); }
.m-note:hover, .m-note:focus { transform: scale(1.05); z-index: 2; }
.m-note b { font-weight: 600; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.m-meta { display: flex; align-items: center; gap: 3px; }
.m-meta i { width: 7px; height: 7px; border-radius: 50%; }
.map.focused .m-node:not(.on) { opacity: .28; }
.map.focused path:not(.on) { opacity: .1; }
.map.focused path.on { opacity: 1; }

.sync-row { padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.sync-ok { color: var(--ok); font-weight: 600; }
.sync-bad { color: var(--danger); font-weight: 600; }

/* phone upload link (settings) */
.drop-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.qr { width: 150px; height: 150px; flex: none; background: #fff; border-radius: 10px; color: #6d6577; font-size: 13px; }
.qr svg { display: block; width: 100%; height: 100%; }
.drop-info { flex: 1 1 220px; min-width: 0; }
.drop-info a { overflow-wrap: anywhere; font-weight: 600; }

/* deciding, reviewing and the Studio pages */
#toast.has-undo { pointer-events: auto; display: flex; align-items: center; gap: .75rem; }
#toast button { background: none; border: 0; color: var(--pink); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.nav-search { font-size: 1.25rem; line-height: 1; }
.score { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.score.go { background: var(--ok-soft); color: var(--ok); }
.score.maybe { background: var(--warn-soft); color: var(--warn); }
.score.no { background: var(--pink-soft); color: var(--danger); }
.decide { margin-top: 1rem; }
.decide summary { cursor: pointer; display: flex; align-items: center; gap: .6rem; }
.decide summary .eyebrow { margin: 0; }
.score-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.decide summary + .score-row { margin-top: .6rem; }
.score-label { display: flex; flex-direction: column; min-width: 0; font-size: .92rem; }
.score-label .muted { font-size: .84rem; }
.pips { display: flex; gap: .3rem; flex: none; }
.pip { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--lavender); background: transparent; cursor: pointer; padding: 0; }
.pip.on { background: var(--lavender-deep); border-color: var(--lavender-deep); }
.pip:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }
.after { margin-top: 1rem; background: linear-gradient(135deg, var(--ok-soft), var(--lavender-soft)); }
.after p { margin: .2rem 0 .4rem; }
.draft { margin-top: .6rem; }
.draft textarea { margin-top: .4rem; min-height: 12rem; }
.works-foot { margin: 0 0 12px; font-size: .86rem; text-align: right; }
.focus { padding: .8rem 1.1rem; margin-bottom: 12px; border-radius: var(--radius); background: linear-gradient(135deg, var(--pink-soft), var(--lavender-soft)); }
.focus ol { margin: .1rem 0 0; padding-left: 1.2rem; }
.review-nudge { display: block; margin-bottom: 12px; padding: .55rem .9rem; border: 1px dashed var(--lavender); border-radius: var(--radius); color: var(--lavender-deep); text-decoration: none; font-size: .9rem; }
.board-scroll { overflow-x: auto; padding-bottom: .5rem; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; }
.b-col { background: color-mix(in srgb, var(--lavender-soft) 55%, transparent); border-radius: var(--radius); padding: .75rem; min-height: 180px; }
.b-col.over { background: var(--pink-soft); }
.b-col.drag { outline: 2px dashed var(--lavender-deep); }
.b-col h2 { margin: 0 0 .5rem; font-size: .95rem; }
.b-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .6rem .7rem; margin-bottom: .5rem; cursor: grab; display: grid; gap: .25rem; }
.b-card a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.b-card select { padding: .2rem .4rem; font-size: .78rem; }
.b-soon { color: var(--magenta); font-weight: 600; }
.inline-label { margin: 0; }
.studio-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.studio-tile { display: block; padding: 1rem 1.1rem; border-radius: var(--radius); text-decoration: none; color: var(--text); background: linear-gradient(150deg, var(--surface), var(--lavender-soft)); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s ease; }
.studio-tile:hover { transform: translateY(-3px); }
.studio-tile h3 { font: 400 1.3rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 .25rem; }
.studio-tile span { font-size: .88rem; color: var(--muted); }
.review-step { margin-bottom: 12px; }
.review-step h3 { margin: .8rem 0 .2rem; font-size: .92rem; }
.review-list { list-style: none; margin: 0; padding: 0; }
.review-list li { padding: .3rem 0; border-top: 1px solid var(--line); font-size: .92rem; display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: baseline; }
.priorities { display: grid; gap: .4rem; }
table.plain { width: 100%; border-collapse: collapse; margin-top: .5rem; font-size: .9rem; }
table.plain th { text-align: left; font-size: .76rem; color: var(--muted); font-weight: 600; padding: .3rem .4rem; }
table.plain td { padding: .4rem; border-top: 1px solid var(--line); vertical-align: middle; }
.money-big { font: 400 1.5rem/1.2 var(--display); letter-spacing: .02em; }
.amount { font-weight: 600; white-space: nowrap; }
.amount.cost { color: var(--danger); }
.money-table select { padding: .25rem .4rem; font-size: .84rem; width: auto; }
tr.overdue { background: var(--pink-soft); }
.gigs { display: grid; gap: .5rem; }
.gig summary, .person summary, .text-card summary { cursor: pointer; display: flex; align-items: center; gap: .8rem; }
.gig-date { flex: none; width: 6.5rem; font-size: .84rem; color: var(--muted); }
.gig-title { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.gig-form, .person-body { margin-top: .75rem; }
.person[hidden] { display: none; }
#people-q { flex: 1; }
.text-card .note-title { margin-top: .75rem; }
.text-card .note-body { min-height: 14rem; }
.project-list { list-style: none; margin: 0; padding: 0; }
.project-list li { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.project-list li > i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.project-list li > a { flex: 1; }
.swatches { display: flex; gap: .4rem; flex-wrap: wrap; }
.swatch { margin: 0; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch i { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 3px solid transparent; }
.swatch input:checked + i { border-color: var(--text); }
.swatch input:focus-visible + i { outline: 2px solid var(--magenta); outline-offset: 2px; }
.cover-picks .tile { padding: 0; border: 3px solid transparent; background: none; cursor: pointer; }
.cover-picks .tile.picked { border-color: var(--magenta); }
.answer { white-space: pre-wrap; }
.search-snippet { display: block; }
@media (max-width: 680px) {
  .score-row { flex-direction: column; align-items: flex-start; gap: .3rem; }
  .gig-date { width: 4.8rem; }
  .works-foot { text-align: left; }
  .money-table thead { display: none; }
  .money-table tr { display: grid; grid-template-columns: 1fr auto; gap: .1rem .6rem; padding: .5rem 0; border-top: 1px solid var(--line); }
  .money-table td { border: 0; padding: .1rem 0; }
  .money-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  nav { gap: .7rem; }
}
#linked li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
#linked .fname { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.swatch { position: relative; display: block; }
.swatch input { left: 0; top: 0; width: 30px; height: 30px; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--magenta); font: inherit; text-decoration: underline; cursor: pointer; }
.wait-form { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 .2rem; align-items: center; }
.wait-form input { flex: 1 1 12rem; width: auto; }
.wait-form select { flex: 0 1 auto; width: auto; }
#waiting { margin-bottom: 12px; }

.media-btn { flex: none; font-size: .78rem; padding: .2rem .6rem; text-decoration: none; }
.found { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.found-text { flex: 1 1 14rem; min-width: 0; display: flex; flex-direction: column; font-size: .9rem; overflow-wrap: anywhere; }
.found select { width: auto; max-width: 12rem; padding: .3rem .5rem; font-size: .84rem; }
.credits { margin-top: 12px; padding: .8rem 1.1rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--pink-soft), var(--lavender-soft)); }
.credits p { margin: .1rem 0 .5rem; }
.media-links { display: grid; gap: .5rem; }
.media-link { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .6rem .8rem; display: grid; gap: .3rem; min-width: 0; }
.media-link > a { display: flex; align-items: baseline; gap: .5rem; min-width: 0; text-decoration: none; color: inherit; }
.media-link-title { overflow-wrap: anywhere; min-width: 0; font-weight: 500; }
.media-from { font-size: .8rem; }
.media-link-edit { display: flex; gap: .4rem; align-items: center; }
.media-link-edit input { padding: .3rem .55rem; font-size: .84rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.media-item { margin: 0; min-width: 0; }
.media-item figcaption { display: flex; gap: .2rem; align-items: center; margin-top: .25rem; }
.media-item figcaption input { padding: .2rem .4rem; font-size: .78rem; min-width: 0; }
@media (max-width: 680px) { .gig summary { flex-wrap: wrap; } .media-btn { order: 3; } }

/* invoices and accounting */
.invoice-row { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; }
.invoice-fields { border: 0; padding: 0; margin: 1rem 0 0; min-width: 0; }
.invoice-line-head { color: var(--muted); font-size: .8rem; margin-bottom: .15rem; }
.invoice-line-head span:last-child { width: 2rem; }
.fill-form { display: grid; gap: .5rem; }
.fill-file { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.fill-form #fill-go { justify-self: start; }
.invoice-fields .missing { outline: 2px solid var(--warn); outline-offset: 1px; background: var(--warn-soft); border-radius: 8px; }
.invoice-sum { margin: .6rem 0 0; text-align: right; }
.invoice-line { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem 6.5rem 6.5rem auto; gap: .4rem; margin-bottom: .4rem; align-items: center; }
.check-line { display: flex; gap: .5rem; align-items: center; margin-top: .8rem; }
.check-line input { width: auto; }
table.plain tr.sum td { font-weight: 700; border-top: 2px solid var(--lavender); }
.rc-add { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.rc-add label.btn { margin: 0; cursor: pointer; }
.rc-count { font: 400 .8rem var(--body); color: var(--muted); }
.rc-list { display: grid; gap: .4rem; }
.rc-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; width: 100%; padding: .7rem .9rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.rc-row span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.rc-row small { color: var(--muted); }
.rc-row span { flex: 1; }
.rc-tag { font-style: normal; font-size: .75rem; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; background: var(--line); color: var(--muted); }
.rc-tag.in { background: #d9f2df; color: #1d5c2e; }
.rc-row:disabled { opacity: .65; cursor: default; }
.rc-more { margin-top: 1rem; }
.rc-more summary { cursor: pointer; color: var(--muted); }
.rc-empty, .rc-hint { color: var(--muted); font-size: .9rem; margin: .3rem 0 .6rem; }
.rc-msg { padding: .55rem .8rem; border-radius: 12px; background: var(--warn-soft); margin: 0 0 .7rem; }
.rc-note { background: var(--lavender-soft); padding: .5rem .75rem; border-radius: 12px; font-size: .9rem; margin: .5rem 0; }
.rc-back { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; margin-bottom: .6rem; }
.rc-image { display: block; max-width: 100%; max-height: 22rem; margin: .4rem 0 .8rem; border-radius: 12px; }
.rc-fields { border: 0; padding: 0; margin: .4rem 0 0; min-width: 0; }
.rc-fields label { display: block; margin-top: .55rem; font-size: .85rem; color: var(--muted); }
.rc-two { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.rc-item { border: 1px solid var(--line); border-radius: 14px; padding: .6rem; margin-bottom: .5rem; background: var(--surface); display: grid; gap: .35rem; opacity: .68; }
.rc-item.on { opacity: 1; border-color: var(--lavender); }
.rc-fields .rc-check { display: flex; gap: .45rem; align-items: center; margin: 0; color: var(--text); font-weight: 600; }
.rc-check input { width: 20px; height: 20px; flex: none; }
.rc-item-nums { display: grid; grid-template-columns: minmax(0, 1fr) 5.2rem auto; gap: .35rem; align-items: center; }
.rc-item select { font-size: .86rem; }
.rc-sum { margin: .8rem 0 .2rem; }
.rc-warn { color: var(--danger); font-size: .88rem; }
.rc-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
@media (max-width: 680px) { .invoice-line { grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1fr) auto; } .invoice-line > :first-child { grid-column: 1 / -1; } .invoice-line-head { display: none; } .invoice-row { flex-wrap: wrap; } }

/* dashboard */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dash-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; align-items: start; }
.dash-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; align-items: start; }
.works-page { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-bottom: 12px; }
.vat-quarters { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.vat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; padding: .4rem 0; border-top: 1px solid var(--line); }
.vat-row span { display: flex; flex-direction: column; }
.vat-row small { color: var(--muted); }
.vat-row code { font-size: 1rem; }
.vat-row.total { grid-template-columns: minmax(0, 1fr) auto; font-weight: 600; }
@media (max-width: 1080px) { .dash-top { grid-template-columns: 1fr 1fr; } .dash-top > :last-child { grid-column: 1 / -1; } }
@media (max-width: 680px) { .dash-top, .dash-bottom { grid-template-columns: minmax(0, 1fr); } nav { gap: .55rem; font-size: .9rem; } }
a.row-body { color: inherit; text-decoration: none; }
@media (max-width: 420px) { .top { padding-left: 10px; padding-right: 10px; gap: .3rem; } .brand { font-size: 1.15rem; } nav { gap: .42rem; font-size: .84rem; } nav .btn.small { padding: .25rem .5rem; } }

.label-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.label-row select { flex: 0 1 12rem; width: auto; }
.label-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; overflow-wrap: anywhere; }
.label-chip button { background: none; border: 0; padding: 0 .1rem; color: var(--muted); cursor: pointer; font: inherit; }
.found-tag { color: var(--magenta); }
.mail-scan { margin: .4rem 0 .8rem; }
.mail-list { display: flex; flex-direction: column; gap: .3rem; max-height: 26rem; overflow-y: auto; }
.mail-line { display: flex; flex-direction: column; gap: .05rem; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .4rem .1rem; font: inherit; color: inherit; cursor: pointer; overflow-wrap: anywhere; }
.mail-when { font-size: .78rem; color: var(--muted); }
.mail-open { padding: .5rem .1rem .7rem; }
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; max-height: 20rem; overflow-y: auto; margin-bottom: .5rem; }
.people-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.people-filters input { flex: 1 1 100%; }
.people-filters select { flex: 1 1 10rem; width: auto; min-width: 0; }
.email-problem { background: var(--surface); border: 1px solid var(--magenta); border-radius: 12px; padding: .5rem .7rem; margin: .5rem 0; }

#feedback { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
#fb-open { order: 2; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--magenta); color: #fff; font-size: 1.2rem; cursor: pointer; box-shadow: 0 6px 18px rgba(120, 60, 140, .3); }
#fb-panel { order: 1; width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 100px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .8rem; box-shadow: 0 10px 30px rgba(120, 60, 140, .22); }
#fb-panel[hidden] { display: none; }
.fb-head { display: flex; justify-content: space-between; align-items: center; }
#fb-close { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.fb-where { font-size: .78rem; color: var(--muted); margin: .1rem 0 .4rem; overflow-wrap: anywhere; }
#fb-text { width: 100%; margin-bottom: .4rem; }
#fb-list { margin-top: .6rem; display: flex; flex-direction: column; gap: .35rem; }
.fb-item { font-size: .82rem; overflow-wrap: anywhere; }
.fb-item small { display: block; color: var(--muted); }
.fb-state { font-weight: 600; color: var(--magenta); }
.fb-state.done { color: var(--muted); }
.people-filters input { min-width: 100%; }
@media (max-width: 680px) { nav a:not(.btn) { padding: .7rem 0; } }
.phone-steps { margin: .3rem 0 .6rem; padding-left: 1.2rem; }
#feedback { bottom: calc(16px + env(safe-area-inset-bottom)); right: calc(16px + env(safe-area-inset-right)); }
#phone-card { margin-bottom: 1.5rem; }
#phone-card h2:first-child { margin-top: 0; }

#compose { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; background: var(--surface); color: var(--text); overflow-y: auto; }
#compose::backdrop { background: rgba(60, 30, 80, .35); }
#compose label { display: block; font-size: .8rem; color: var(--muted); margin-top: .55rem; }
#compose input, #compose select, #compose textarea { width: 100%; }
#compose .actions { margin-top: .8rem; }
.compose-head { display: flex; justify-content: space-between; align-items: center; }
.compose-head button { background: none; border: 0; font-size: 1.3rem; color: var(--muted); cursor: pointer; }

[hidden][data-in] { display: none !important; }
.brand { white-space: nowrap; }
body.at-start nav { display: none; }
.launcher { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8vh; }
.launch-tile { display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; padding: 1.5rem; border-radius: 24px; text-decoration: none; color: var(--text); border: 1px solid var(--line); transition: transform .15s; }
.launch-tile:hover { transform: translateY(-4px); }
.launch-tile h2 { font: 400 2.1rem/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 .4rem; }
.launch-tile p { margin: 0; color: var(--muted); }
.launch-note { margin-top: .7rem; font-size: .85rem; color: var(--magenta); }
.launch-tile.lux { background: linear-gradient(150deg, #f6e4ff, #ffe1ef); }
.launch-tile.lola { background: #fff; border: 2px solid #c4009a; }
.launch-tile.lola h2 { color: #c4009a; }
.launch-tile.admin { background: linear-gradient(150deg, #eef2fb, #f5eefb); }
.launch-tile.notes { background: linear-gradient(150deg, #fdf6dc, #e2f4ee); }
@media (max-width: 1000px) { .launcher { grid-template-columns: repeat(2, 1fr); } .launch-tile { min-height: 220px; } }
@media (max-width: 760px) { .launcher { grid-template-columns: 1fr; margin-top: 1rem; } .launch-tile { min-height: 130px; } }
.weekly { margin-bottom: 16px; }
.weekly-dates { font-size: .82rem; }
.weekly-list { list-style: none; margin: .2rem 0 .5rem; padding: 0; }
.weekly-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem 0; }
.weekly-list label { display: flex; align-items: flex-start; gap: .55rem; cursor: pointer; overflow-wrap: anywhere; min-width: 0; }
.weekly-list input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--magenta); }
.weekly-list li.done span { text-decoration: line-through; color: var(--muted); }
.weekly-add { display: flex; gap: .4rem; }
.weekly-add input { flex: 1; min-width: 0; width: auto; }
#weekly-carry { margin-top: .5rem; }
@media (max-width: 680px) { .top { flex-wrap: nowrap; } nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; } nav::-webkit-scrollbar { display: none; } nav a { flex: none; } .nav-home { display: inline; } .brand { flex: none; } }

/* ---------- mail ---------- */
.mail-app { display: grid; grid-template-columns: 220px minmax(260px, 360px) 1fr; gap: 0; min-height: calc(100vh - 120px); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.mail-side { padding: 1rem .8rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: .8rem; }
.mail-write { width: 100%; }
.mail-folders { display: flex; flex-direction: column; gap: 2px; }
.mail-folder { display: flex; justify-content: space-between; align-items: center; gap: .4rem; padding: .45rem .6rem; border-radius: 10px; color: inherit; text-decoration: none; }
.mail-folder small { display: block; font-size: .72rem; color: var(--muted, #888); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.mail-folder b { font-weight: 600; font-size: .9rem; }
.mail-folder.active { background: var(--accent-soft, #f3e6f7); }
.mail-folder .count { font-size: .72rem; background: var(--accent); color: #fff; border-radius: 999px; padding: .05rem .45rem; }
.mail-boxes { display: flex; gap: .3rem; }
.mail-boxes a { flex: 1; text-align: center; padding: .35rem; border-radius: 999px; border: 1px solid var(--line); color: inherit; text-decoration: none; font-size: .85rem; }
.mail-boxes a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mail-synced, .mail-note { font-size: .75rem; margin: 0; }
.mail-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 120px); }
.mail-search { padding: .6rem; position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 1; }
.mail-search input { margin: 0; }
.mail-row { display: block; padding: .65rem .8rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.mail-row:hover { background: rgba(0, 0, 0, .025); }
.mail-row.active { background: var(--accent-soft, #f3e6f7); }
.mail-row-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; }
.mail-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row .when { flex: none; font-size: .75rem; color: var(--muted, #888); }
.mail-row .subject { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row .preview { font-size: .78rem; color: var(--muted, #888); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row.unread .who, .mail-row.unread .subject { font-weight: 700; }
.mail-row.unread { box-shadow: inset 3px 0 0 var(--accent); }
.mail-tags { margin-top: .2rem; display: flex; gap: .25rem; flex-wrap: wrap; }
.mail-tags .tag { font-size: .66rem; padding: .05rem .4rem; }
.mail-list #mail-more { margin: .8rem auto; display: block; }
.mail-read { overflow-y: auto; max-height: calc(100vh - 120px); padding: 1rem 1.2rem; }
.mail-empty { padding: 2rem 1rem; text-align: center; }
.mail-read-head h2 { margin: .2rem 0 1rem; font-size: 1.25rem; }
.mail-back { display: none; }
.mail-msg { border: 1px solid var(--line); border-radius: 12px; margin-bottom: .7rem; overflow: hidden; }
.mail-msg-head { padding: .6rem .8rem; cursor: pointer; display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; font-size: .85rem; }
.mail-msg-preview { padding: 0 .8rem .6rem; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-msg .mail-body { display: none; padding: 0 .8rem .8rem; }
.mail-msg.open .mail-body { display: block; }
.mail-msg.open .mail-msg-preview { display: none; }
.mail-frame { width: 100%; border: 0; min-height: 200px; background: #fff; border-radius: 8px; }
.mail-text { white-space: pre-wrap; word-wrap: break-word; font: inherit; font-size: .9rem; margin: 0; }
.mail-files { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0; }
.mail-files a { text-decoration: none; }
.mail-actions { margin-top: .6rem; }
@media (max-width: 900px) {
  .mail-app { grid-template-columns: 1fr; min-height: auto; }
  .mail-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .mail-folders { flex-direction: row; overflow-x: auto; }
  .mail-folder { flex: none; }
  .mail-folder small { display: none; }
  .mail-note { display: none; }
  .mail-list, .mail-read { max-height: none; border-right: 0; }
  .mail-app.reading .mail-side, .mail-app.reading .mail-list { display: none; }
  .mail-app:not(.reading) .mail-read { display: none; }
  .mail-back { display: inline-block; }
}

.mail-read-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; justify-content: space-between; margin-bottom: 1rem; }
.mail-read-head h2 { margin: 0; flex: 1 1 240px; }
.mail-tools { display: flex; gap: .35rem; flex-wrap: wrap; }
.mail-row { position: relative; }
.mail-row-tools { position: absolute; right: .6rem; bottom: .45rem; display: none; gap: .5rem; background: var(--surface); padding: 0 .2rem; font-size: .75rem; }
.mail-row:hover .mail-row-tools, .mail-row:focus-within .mail-row-tools { display: flex; }
@media (hover: none) { .mail-row-tools { display: none !important; } }

.mail-topics { display: flex; flex-direction: column; gap: 1px; margin: .15rem 0 .4rem; }
.mail-topic { display: flex; justify-content: space-between; align-items: center; gap: .4rem; padding: .3rem .6rem .3rem calc(1.1rem + var(--depth, 0) * .9rem); border-radius: 8px; color: inherit; text-decoration: none; font-size: .85rem; }
.mail-topic::before { content: ""; position: absolute; }
.mail-topic.active { background: var(--accent-soft); font-weight: 600; }
.mail-topic.empty { opacity: .55; }
.mail-topic .count { font-size: .7rem; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 .4rem; }
.mail-topics[hidden], .mail-topic[hidden] { display: none; }
.mail-topic-name { display: flex; align-items: center; gap: .25rem; min-width: 0; }
.mail-folder-end { display: flex; align-items: center; gap: .3rem; }
.mail-twist { width: 1.3rem; height: 1.3rem; flex: none; margin: 0 0 0 -.3rem; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; }
.mail-twist::before { content: ""; width: .38rem; height: .38rem; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.mail-twist.open::before { transform: rotate(45deg) translate(-1px, -1px); }
.mail-twist:hover { background: var(--accent-soft); color: inherit; }
.mail-folder-end .mail-twist { margin: 0 -.3rem 0 0; }
.mail-twist-space { width: 1.3rem; flex: none; margin-left: -.3rem; }
.mail-topic-tools { font-size: .75rem; padding: .2rem .6rem 0 1.1rem; color: var(--muted); }
.mail-topic-note { padding: 0 .6rem 0 1.1rem; margin: .2rem 0; }
.mail-move { width: auto; margin: 0; padding: .3rem .5rem; font-size: .82rem; border-radius: 999px; }
.mail-tags .tag.topic { background: var(--lavender-soft); }
#folders-dialog textarea { font-family: inherit; }
@media (max-width: 900px) { .mail-topics { flex-direction: row; flex-wrap: wrap; } .mail-topic { padding-left: .6rem; } }
