/* Workspace frame and views in the manner of Asana (attorney request, October 20, 2026).
   Dark top bar and sidebar around a white canvas. The client portal does not load this file. */
:root { --nav-bg: #202124; --top-bg: #111111; --nav-ink: #f5f4f3; --nav-dim: #a2a0a2; --nav-hover: rgba(255,255,255,.08);
        --nav-on: rgba(255,255,255,.16); --canvas: #ffffff; --row-line: #edeae9; --coral: #a9512f; --late: #c92f54; }
body.app { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: 52px 1fr; height: 100vh; overflow: hidden; background: var(--canvas); }
body.app.nav-collapsed { grid-template-columns: 0 1fr; }
body.app.nav-collapsed .sidebar { visibility: hidden; }
.topbar { grid-column: 1 / -1; background: var(--top-bg); color: var(--nav-ink); display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.topbar-btn { background: none; border: 0; color: var(--nav-ink); padding: 6px; border-radius: 6px; display: inline-flex; }
.topbar-btn:hover { background: var(--nav-hover); }
.topbar details { position: relative; }
.topbar summary { list-style: none; cursor: pointer; }
.topbar summary::-webkit-details-marker { display: none; }
.topbar summary { color: var(--nav-ink); margin: 0; }
.create summary { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #6d6e6f; border-radius: 999px; padding: 5px 14px 5px 6px; font-weight: 600; font-size: 14px; }
.create summary:hover { background: var(--nav-hover); }
.create-plus { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--coral); color: #fff; align-items: center; justify-content: center; }
.create-plus .ic { width: 14px; height: 14px; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; min-width: 260px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; }
.menu.right { left: auto; right: 0; }
.menu a, .menu .menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--ink); width: 100%; background: none; border: 0; font: inherit; font-weight: 400; text-align: left; cursor: pointer; }
.menu a:hover, .menu .menu-item:hover { background: #f1efee; text-decoration: none; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--row-line); margin-bottom: 4px; }
.topsearch { flex: 1; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 8px; background: #3d3e40; border: 1px solid #565557; border-radius: 999px; padding: 4px 14px; color: var(--nav-dim); }
.topsearch input { background: none; border: 0; color: var(--nav-ink); width: 100%; padding: 3px 0; font: inherit; outline: none; }
.topsearch input::placeholder { color: var(--nav-dim); }
.topsearch:focus-within { background: #fff; color: var(--muted); }
.topsearch:focus-within input { color: var(--ink); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #1e1f21; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.av-0 { background: #f1bd6c; } .av-1 { background: #e8a5b6; } .av-2 { background: #9ee7e3; } .av-3 { background: #b9b2e8; }
.av-4 { background: #a8d8a0; } .av-5 { background: #f8df72; } .av-6 { background: #f59e8b; } .av-7 { background: #9fc5f8; }
.sidebar { background: var(--nav-bg); color: var(--nav-ink); overflow-y: auto; padding: 10px 8px 16px; display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.sidebar a { color: var(--nav-ink); display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; }
.sidebar a:hover { background: var(--nav-hover); text-decoration: none; }
.sidebar a.on { background: var(--nav-on); }
.sidebar .ic { color: var(--nav-dim); flex: none; }
.sidebar a.on .ic { color: var(--nav-ink); }
.sidebar .dot { width: 8px; height: 8px; border-radius: 50%; background: #4573d2; margin-left: auto; }
.nav-rule { border-top: 1px solid #424244; margin: 8px 6px; }
.nav-head { color: var(--nav-dim); font-size: 12px; font-weight: 600; padding: 14px 10px 4px; }
.nav-foot { margin-top: auto; padding: 16px 10px 0; color: var(--nav-dim); font-size: 11px; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.c-0 { background: #f06a6a; } .c-1 { background: #4573d2; } .c-2 { background: #9e6bd6; } .c-3 { background: #4ecbc4; }
.c-4 { background: #f1bd6c; } .c-5 { background: #5da283; } .c-6 { background: #e362e3; } .c-7 { background: #fd9a00; }
.c-8 { background: #8da3a6; } .c-9 { background: #62d26f; }
main.content { overflow-y: auto; padding: 22px 32px 48px; }
.plain-top { background: var(--brand); color: #fff; }
.plain-top .wrap { min-height: 56px; display: flex; align-items: center; }
.plain-top .firm { font-weight: 600; }
@media (max-width: 800px) {
  body.app { grid-template-columns: 0 1fr; }
  body.app .sidebar { visibility: hidden; position: fixed; top: 52px; bottom: 0; left: 0; width: 240px; z-index: 40; }
  body.app.nav-open .sidebar { visibility: visible; }
  .create summary { padding-right: 8px; }
  main.content { padding: 16px; }
}

/* Home */
.home-head { text-align: center; margin: 4px 0 22px; }
.home-head .date { color: var(--muted); font-size: 15px; }
.home-head h1 { font-size: 30px; font-weight: 400; margin: 2px 0 10px; }
.week-pill { display: inline-flex; gap: 16px; background: #f6f5f4; border-radius: 999px; padding: 6px 18px; color: var(--muted); font-size: 14px; }
.home-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; max-width: 1180px; margin: 0 auto 18px; }
@media (max-width: 1000px) { .home-grid { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--row-line); border-radius: 12px; padding: 18px 22px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-head h2 { font-size: 20px; margin: 0; font-weight: 600; }
.card-head .more { margin-left: auto; font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--row-line); margin: 4px 0 6px; }
.tabs a, .tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; border-radius: 0; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .on { color: var(--ink); border-bottom-color: var(--ink); }
.tab-pane[hidden] { display: none; }
.proj-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.proj-tile { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--ink); }
.proj-tile:hover { background: #f6f5f4; text-decoration: none; }
.pi { width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.pi.lg { width: 36px; height: 36px; border-radius: 8px; }
.proj-tile .t { font-weight: 600; line-height: 1.25; }
.proj-tile .s { font-size: 13px; color: var(--muted); }
.home-more { max-width: 1180px; margin: 0 auto; }

/* Task rows (List view, My tasks, Home) */
.tlist { width: 100%; border-collapse: collapse; }
.tlist th { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--row-line); padding: 8px 10px; }
.tlist td { border-bottom: 1px solid var(--row-line); padding: 6px 10px; vertical-align: middle; font-size: 14px; }
.tlist tr.sec td { border-bottom: 0; padding-top: 22px; font-size: 17px; font-weight: 600; }
.tlist tr.task:hover td { background: #f9f8f8; }
.tlist .name { display: flex; align-items: center; gap: 8px; }
.tlist .name a { color: var(--ink); }
.tlist .done a { color: var(--muted); }
.tlist .counts { color: var(--muted); font-size: 12px; display: inline-flex; gap: 8px; align-items: center; margin-left: 6px; }
.tlist .counts .ic { width: 14px; height: 14px; }
.tlist .who { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tlist .when { white-space: nowrap; font-size: 13px; }
.late { color: var(--late); }
.check-btn { background: none; border: 0; padding: 0; color: #9ca0a3; display: inline-flex; cursor: pointer; border-radius: 50%; }
.check-btn:hover { color: #58a182; background: none; }
.check-btn.on { color: #58a182; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #f1efee; border-radius: 6px; padding: 1px 8px; font-size: 12px; color: var(--ink); max-width: 200px; }
.chip .swatch { width: 9px; height: 9px; }
.inline-add { display: flex; gap: 8px; align-items: center; padding: 8px 10px; }
.inline-add input[type=text] { max-width: 420px; }

/* A matter shown as a project */
.proj-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.proj-head h1 { font-size: 24px; margin: 0; }
.proj-head .meta { color: var(--muted); font-size: 14px; }
.proj-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.star-btn { background: none; border: 0; padding: 4px; color: #9ca0a3; display: inline-flex; cursor: pointer; border-radius: 6px; }
.star-btn:hover { background: #f1efee; color: #6d6e6f; }
.star-btn.on { color: #f1bd6c; }
.star-btn.on .ic { fill: #f1bd6c; }
.proj-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--row-line); margin: 12px -32px 18px; padding: 0 32px; overflow-x: auto; }
.proj-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.proj-tabs a:hover { color: var(--ink); text-decoration: none; }
.proj-tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.proj-tabs .count { background: #f1efee; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.board { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding-bottom: 12px; }
.board-col { background: #f6f5f4; border-radius: 10px; padding: 10px; min-width: 280px; width: 280px; flex: none; }
.board-col h3 { margin: 2px 4px 10px; font-size: 15px; }
.board-card { background: #fff; border: 1px solid var(--row-line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.board-card .t { display: flex; gap: 8px; align-items: flex-start; }
.board-card .t a { color: var(--ink); }
.board-card .foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { text-align: left; font-size: 12px; color: var(--muted); padding: 6px; border-bottom: 1px solid var(--row-line); text-transform: none; }
.cal td { height: 110px; vertical-align: top; border: 1px solid var(--row-line); padding: 4px; font-size: 12px; }
.cal td.other { background: #fafafa; color: #b5b3b3; }
.cal td.today .d { background: var(--coral); color: #fff; border-radius: 999px; padding: 0 6px; }
.cal .d { font-weight: 600; display: inline-block; margin-bottom: 3px; }
.cal .ev { display: block; border-radius: 4px; padding: 1px 6px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); background: #e8f0fa; }
.cal .ev:hover { text-decoration: none; filter: brightness(.96); }
.cal .ev.task { background: #eef7f1; }
.cal .ev.late { background: #fbe9e7; }
.cal-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cal-nav h2 { margin: 0; }
.gate { background: #f6f5f4; border-radius: 10px; padding: 26px; text-align: center; color: var(--muted); }

/* Inbox and search */
.inbox-day { font-size: 14px; color: var(--muted); font-weight: 600; padding: 18px 0 6px; border-bottom: 1px solid var(--row-line); }
.inbox-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 6px; border-bottom: 1px solid var(--row-line); color: var(--ink); }
.inbox-row:hover { background: #f9f8f8; text-decoration: none; }
.inbox-row .t { font-weight: 600; }
.inbox-row .s { color: var(--muted); font-size: 14px; }
.inbox-row .w { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; display: flex; gap: 10px; align-items: center; }
.inbox-row .new { width: 8px; height: 8px; border-radius: 50%; background: #4573d2; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.page-head h1 { margin: 0; }
.page-head .right { margin-left: auto; }

/* Timeline (Gantt) */
.timeline-wrap { overflow-x: auto; border: 1px solid var(--row-line); border-radius: 10px; background: #fff; }
.tl { display: block; font-family: inherit; }
.tl-month { font-size: 13px; font-weight: 600; fill: #1d2433; }
.tl-month-line { stroke: #d9dee7; }
.tl-tick { font-size: 11px; fill: #6d6e6f; }
.tl-grid { stroke: #f1efee; }
.tl-sec-bg { fill: #f6f5f4; }
.tl-sec { font-size: 13px; font-weight: 600; fill: #1d2433; }
.tl-row-line { stroke: #f1efee; }
.tl-label { font-size: 13px; fill: #1d2433; }
.tl-label.done { fill: #9ca0a3; text-decoration: line-through; }
.tl-bar { opacity: .85; }
.tl-bar.late { fill: #c92f54; }
.tl-bar.done { fill: #c3c5c7; }
.tl-who { font-size: 11px; fill: #6d6e6f; font-weight: 600; }
.tl-divider { fill: #e0dedd; }
.tl-today { stroke: #f06a6a; stroke-width: 2; }
.tl-today-label { font-size: 11px; fill: #f06a6a; font-weight: 700; }
a:hover .tl-bar { opacity: 1; }
.cal .ev.consult { background: #fdf3e1; }
.cal .ev.consult.held { background: #eef7f1; }
.cal .ev.consult.cancelled { text-decoration: line-through; color: #9ca0a3; background: #f6f5f4; }
.tl-bar.c-0 { fill: #f06a6a; } .tl-bar.c-1 { fill: #4573d2; } .tl-bar.c-2 { fill: #9e6bd6; } .tl-bar.c-3 { fill: #4ecbc4; } .tl-bar.c-4 { fill: #f1bd6c; }
.tl-bar.c-5 { fill: #5da283; } .tl-bar.c-6 { fill: #e362e3; } .tl-bar.c-7 { fill: #fd9a00; } .tl-bar.c-8 { fill: #8da3a6; } .tl-bar.c-9 { fill: #62d26f; }
.tl-bar.late { fill: #c92f54; } .tl-bar.done { fill: #c3c5c7; }

/* Keep the sidebar and the page in their own columns, so a hidden sidebar never takes the page's place. */
.sidebar { grid-column: 1; grid-row: 2; }
main.content { grid-column: 2; grid-row: 2; min-width: 0; }

/* Matter overview: a wider details column, short facts across, long text as readable paragraphs. */
.overview-grid { grid-template-columns: minmax(0, 1.5fr) minmax(380px, 1fr); }
@media (max-width: 1100px) { .overview-grid { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 18px; margin-bottom: 14px; }
.facts > div, .longfact { font-size: 15px; }
.label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.longfact { border-top: 1px solid var(--row-line); padding-top: 12px; margin-top: 12px; }
.longfact p { margin: 0; line-height: 1.6; max-width: 70ch; }
.longfact .path { word-break: break-word; color: var(--muted); }

/* Skipped engagement steps */
.steps li.skipped { background: #fff; color: var(--muted); border: 1px dashed #b9b6b5; text-decoration: none; }
.skip-steps { margin: -4px 0 14px; }
.skip-row { display: grid; grid-template-columns: 220px 1fr; gap: 10px; align-items: center; margin: 6px 0; }
@media (max-width: 700px) { .skip-row { grid-template-columns: 1fr; } }
.skip-request { border-left: 4px solid #f1bd6c; margin: 0 0 14px; }
.skip-request .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.skip-request .inline-form { display: flex; gap: 8px; align-items: center; }

/* The Portal on a phone (app.web.pwa). The screens used most on the go (Home, Leads, a lead, and
   Activities) fit a narrow screen without sideways scrolling; a table marked "stack" becomes one card
   per row, and a cell marked "hide-sm" is left out. */
body.app { height: 100vh; height: 100dvh; }
.grid { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 18px; }
.push-status { font-weight: 600; margin: 0 0 8px; }
[data-push] [hidden] { display: none; }
.push-status.ok { color: var(--ok); } .push-status.warn { color: var(--warn); } .push-status.bad { color: var(--bad); }
.steps-list { margin: 0; padding-left: 20px; }
.steps-list li { margin: 6px 0; }
.offline { text-align: center; padding-top: 64px; }
.offline h1 { margin-top: 14px; }
@media (max-width: 700px) {
  input, select, textarea { font-size: 16px; }      /* a smaller field makes iOS enlarge the page */
  .actions button, .actions .btn, .quick .btn, .filters .btn, .filters button { min-height: 40px; }
  .create summary { font-size: 0; gap: 0; padding: 5px; }
  .topbar { gap: 8px; padding: 0 8px; }
  .topsearch { padding: 4px 10px; }
  h1 { font-size: 21px; }
  .sub { font-size: 14px; }
  .panel { padding: 14px; }
  .card { padding: 14px 16px; }
  .home-head h1 { font-size: 24px; }
  .week-pill { flex-wrap: wrap; justify-content: center; gap: 2px 12px; border-radius: 14px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: 1fr; }
  .proj-tabs { margin: 12px -16px 18px; padding: 0 16px; }
  .filters select { flex: 1; }
  .tlist .chip { max-width: 120px; }
  .tlist td { padding: 6px 4px; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack th, table.stack tr:has(> th) { display: none; }
  table.stack tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 2px 0; }
  table.stack td.num { text-align: left; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
  table.stack .hide-sm { display: none; }
  table.stack .first { font-size: 16px; font-weight: 600; }
}

/* Plan tab */
.plan-head h2 { margin: 0 0 4px; }
.plan-build { margin-top: 18px; }
.plan-preview td .small.muted { margin-top: 2px; }

/* Notes and comments */
.comments li { display: flex; gap: 10px; align-items: flex-start; }
.comments .cbody { margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
.mention { color: #3b5bdb; }
.comment-box { border: 1px solid #d9d6d5; border-radius: 12px; padding: 10px 12px; margin-top: 12px; }
.comment-box textarea { border: 0; width: 100%; resize: vertical; padding: 4px 0; }
.comment-box textarea:focus { outline: none; }
.comment-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.comment-tools .right { margin-left: auto; }
.mention-chip { cursor: pointer; border: 1px solid #d9d6d5; background: #fff; }
.task-notes textarea { width: 100%; }
.notes-grid textarea { width: 100%; }

/* Steps bar: each step opens its panel */
.steps li a { color: inherit; text-decoration: none; display: block; }
.steps li a:hover { text-decoration: underline; }
.step-detail:not([open]) { display: none; }
.step-detail { margin: 0 0 14px; }
