/* Shared shell and team overview. Existing document/editor layouts retain
   their own measurements; these tokens give every screen a common identity. */
:root {
  --accent: #236454;
  --accent-tint: #e8f0eb;
  --accent-wash: #f0f5f1;
  --bg: #fafbf8;
  --bg-soft: #f2f4ef;
  --border: #e0e5dd;
  --border-soft: #edf0e9;
  --text: #24332c;
  --text-soft: #647168;
  --home-green: #244f42;
  --home-green-soft: #c3d4bb;
}
:root[data-theme="dark"] {
  --accent: #94c7af;
  --on-accent: #152c22;
  --accent-tint: #263e32;
  --accent-wash: #1d3027;
  --bg: #191f1b;
  --bg-soft: #1e2621;
  --card: #242d27;
  --border: #354039;
  --border-soft: #2d3630;
  --border-strong: #435047;
  --surface-hover: #2c3930;
  --surface-hover-card: #2c3930;
  --text: #e6ece4;
  --text-soft: #a6b4a9;
  --text-mid: #cbd6cc;
  --home-green: #244536;
}
#files-pane { background: var(--bg-soft); }
.rail-head { padding: 24px 17px 20px; gap: 10px; }
.mark { width: 32px; height: 32px; background: var(--home-green); color: #e9edcf; border-radius: 9px; }
.ws-name { font-size: 14px; }
#search-trigger { background: transparent; box-shadow: none; border-color: var(--border); padding: 10px; }
#for-you { padding: 16px 12px 0; }
.rail-label { font-size: 10px; letter-spacing: .12em; padding: 6px 10px 9px; }
#for-you-label { margin-top: 19px; }
.fy-row { min-height: 39px; padding: 9px 11px; margin: 2px 0; border-radius: 7px; font-size: 13px; }
.fy-row[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent); font-weight: 650; }
.fy-row .fy-icon, .fy-row .fy-chip { flex: none; }
.fy-row.attn:not([aria-pressed="true"]):not(.has-unread) { background: transparent; color: var(--text-mid); }
.rail-div { margin: 18px 22px 6px; }
#files-pane { overflow: hidden; }
.rail-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.rail-scroll #file-list { flex: none; overflow: visible; }
#user-footer { padding: 16px; margin-top: auto; background: var(--bg-soft); flex-shrink: 0; }
#uf-avatar { flex: none; }
.uf-id { flex: 1; gap: 3px; }
.uf-role { color: var(--text-soft); }
.home-view #doc-pane, .home-view #comments-pane { display: none; }
#app.home-view { --pane-now: 0px; grid-template-columns: var(--rail-w) minmax(0, 1fr); }
#app.signin-view #home-pane, #app.welcome-view #home-pane, #app.editing #home-pane { display: none; }
#home-pane { min-width: 0; height: 100dvh; overflow-y: auto; background: var(--bg); }
.home-topbar { min-height: 65px; padding: 12px 36px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); background: var(--card); }
.home-breadcrumb { display: flex; gap: 14px; font-size: 12px; color: var(--text-soft); }
.home-breadcrumb strong { font-weight: 550; color: var(--text); }
#home-refresh { margin-left: auto; color: var(--text-soft); font-size: 12px; }
#home-menu { display: none; flex: none; }
.home-content { max-width: 1520px; margin: 0 auto; padding: 42px clamp(24px, 3.2vw, 56px) 24px; }
.home-heading { display: flex; align-items: center; gap: 24px; justify-content: space-between; margin-bottom: 30px; }
.home-eyebrow { font-size: 9px; font-weight: 650; letter-spacing: .15em; color: var(--text-soft); margin: 0 0 13px; line-height: 1.6; }
.home-heading h1 { font-size: clamp(26px, 2.45vw, 38px); line-height: 1.15; font-weight: 550; letter-spacing: -.045em; max-width: 610px; margin: 0; text-wrap: balance; }
.home-heading > div > p:last-child { color: var(--text-soft); font-size: 14px; line-height: 1.7; margin: 14px 0 0; }
.home-create { display: flex; align-items: center; gap: 8px; flex: none; padding: 12px 16px; border-radius: 8px; font-size: 12px; }
.home-create .ic { width: 15px; height: 15px; }
.home-scopebar { display: flex; gap: 10px; align-items: center; padding-bottom: 18px; font-size: 12px; flex-wrap: wrap; }
.home-scope-label { display: flex; align-items: center; gap: 7px; color: var(--text-soft); }
.home-scope-label .ic { width: 15px; height: 15px; }
#home-project { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 7px 28px 7px 10px; max-width: min(300px, 65vw); }
.home-scope-note { margin-left: auto; color: var(--text-soft); font-size: 11px; }
.home-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.home-metric { min-width: 0; display: flex; flex-direction: column; padding: 19px 20px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.home-metric-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-soft); font-size: 12px; }
.home-metric-label .ic { width: 16px; height: 16px; color: var(--text-soft); flex: none; }
.home-metric > strong { font-size: 33px; line-height: 1.1; font-weight: 550; letter-spacing: -.05em; margin: 16px 0 9px; font-variant-numeric: tabular-nums; }
.home-metric > span:last-child { font-size: 10px; line-height: 1.5; color: var(--text-soft); }
.home-metric.attention { border-color: var(--attn-border); background: var(--attn-bg); }
.home-metric.attention > strong { color: var(--attn-text); }
.home-columns { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 24px; align-items: start; }
.home-main-column, .home-side-column { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.home-panel { background: var(--card); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.home-section-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 22px; }
.home-section-head h2, .home-review h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.025em; }
.home-section-head p { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-soft); }
.home-text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 0; font: inherit; font-size: 11px; font-weight: 550; background: none; border: 0; color: var(--accent); cursor: pointer; }
.home-text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.home-text-button .ic { width: 14px; height: 14px; }
.home-attention-row { display: flex; align-items: center; gap: 12px; padding: 17px 22px; border-top: 1px solid var(--border-soft); color: var(--text); text-decoration: none; }
.home-attention-row:hover, .home-document:hover { background: var(--accent-wash); }
.home-row-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; background: var(--bg-soft); color: var(--text-soft); flex: none; }
.home-row-icon .ic { width: 16px; height: 16px; }
.home-row-icon.blocked { color: var(--danger); background: var(--danger-bg); }
.home-row-icon.review { color: var(--attn-text); background: var(--attn-bg); }
.home-row-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.home-row-copy strong { font-size: 13px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.home-row-copy > span { font-size: 11px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-tag { display: inline-flex; align-self: flex-start; padding: 4px 7px; border-radius: 5px; background: var(--bg-soft); color: var(--text-soft); font-size: 9px; font-weight: 550; line-height: 1.3; max-width: 150px; overflow-wrap: anywhere; }
.home-attention-row > .home-tag { align-self: center; max-width: 115px; flex-shrink: 0; }
.home-tag.blocked { color: var(--danger); background: var(--danger-bg); }
.home-tag.review { color: var(--attn-text); background: var(--attn-bg); }
.home-row-arrow { color: var(--text-soft); font-size: 15px; }
.home-footnote { font-size: 11px; color: var(--text-soft); line-height: 1.6; margin: 0; padding: 14px 22px; border-top: 1px solid var(--border-soft); }
.home-work > .home-section-head { padding: 0 0 18px; }
.home-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.home-lane { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 11px 9px; min-width: 0; }
.home-lane h3 { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; padding: 3px 3px 12px; margin: 0; }
.home-lane-count { font-size: 10px; color: var(--text-soft); margin-left: auto; }
.home-dot { width: 7px; height: 7px; border-radius: 50%; background: #9ca79e; }
.home-dot.progress { background: #b78335; }
.home-dot.done { background: #4d8668; }
.home-task { display: flex; flex-direction: column; gap: 12px; color: var(--text); text-decoration: none; background: var(--card); border: 1px solid var(--border); border-radius: 7px; margin-bottom: 8px; padding: 13px 11px; box-shadow: 0 2px 2px #162b1903; }
.home-task:last-child { margin-bottom: 0; }
.home-task:hover { border-color: var(--accent); }
.home-task-title { font-size: 13px; font-weight: 550; line-height: 1.55; overflow-wrap: anywhere; }
.home-task-meta { display: flex; flex-direction: column; gap: 8px; font-size: 10px; }
.home-owner { display: flex; align-items: center; gap: 5px; color: var(--text-soft); min-width: 0; }
.home-owner > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-owner .avatar { width: 20px; height: 20px; font-size: 8px; flex: none; }
.home-owner .ic { width: 14px; height: 14px; }
.home-due { color: var(--text-soft); }
.home-due.overdue { color: var(--danger); }
.home-lane-empty { font-size: 11px; color: var(--text-soft); line-height: 1.7; padding: 12px 5px 30px; }
.home-empty { padding: 24px; margin: 0; color: var(--text-soft); font-size: 12px; line-height: 1.7; }
.home-empty strong { color: var(--text); font-weight: 550; }
.home-empty p { margin: 5px 0 0; }
.home-clear { display: flex; align-items: flex-start; gap: 14px; border-top: 1px solid var(--border-soft); }
.home-clear-mark { display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); width: 32px; height: 32px; flex: none; border-radius: 50%; }
.home-notice { font-size: 12px; line-height: 1.6; color: var(--text-soft); padding: 12px 22px; margin: 0; background: var(--bg-soft); }
.home-path { border-radius: 11px; padding: 25px; background: var(--home-green); color: #f1f3e8; }
.home-path .home-eyebrow { display: block; color: #c4d6c1; font-size: 8px; line-height: 1.8; }
.home-path h2 { font-family: var(--font-doc); font-size: 28px; font-weight: 400; letter-spacing: -.03em; line-height: 1.15; margin: 13px 0 24px; }
.home-path ol { list-style: none; padding: 0; margin: 0 0 22px; }
.home-path li { display: flex; gap: 12px; padding-bottom: 20px; position: relative; }
.home-path li:last-child { padding-bottom: 0; }
.home-path li > span { display: grid; place-items: center; width: 25px; height: 25px; font-size: 9px; border: 1px solid #729582; border-radius: 50%; flex: none; }
.home-path li:not(:last-child)::after { content: ''; position: absolute; left: 12px; top: 30px; bottom: 5px; width: 1px; background: #729582; }
.home-path li strong { font-size: 11px; font-weight: 550; }
.home-path li p { font-size: 10px; line-height: 1.7; margin: 5px 0 0; color: #c4d6c1; }
.home-path-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 0 0; font: inherit; font-size: 11px; color: #edf1d1; background: none; border: 0; border-top: 1px solid #567b68; cursor: pointer; text-align: left; }
.home-path-link:hover { color: white; text-decoration: underline; }
.home-documents .home-section-head { padding: 18px; }
.home-documents h2 { font-size: 14px; }
.home-count { font-size: 11px; color: var(--text-soft); }
.home-document { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-top: 1px solid var(--border-soft); text-decoration: none; color: var(--text); }
.home-document > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.home-document strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 550; }
.home-document small { font-size: 9px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-document-icon { color: var(--text-soft); flex: none; }
.home-document-icon .ic { width: 17px; height: 17px; }
.home-document > span:last-child { color: var(--text-soft); }
.home-docs-all { margin: 10px 18px 16px; }
.home-review { padding: 0 5px; }
.home-review .home-row-icon { margin-bottom: 13px; }
.home-review h2 { font-size: 14px; }
.home-review p { color: var(--text-soft); font-size: 11px; line-height: 1.8; margin: 8px 0 12px; }
.home-review a { font-size: 11px; color: var(--accent); text-decoration: none; }
.home-review a:hover { text-decoration: underline; }
.home-footer { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--text-soft); border-top: 1px solid var(--border); padding-top: 20px; margin-top: 36px; }
.home-footer-brand { font-weight: 600; color: var(--text); }
#home-pane a:focus-visible, #home-pane button:focus-visible, #home-pane select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.home-path button:focus-visible { outline-color: #edf1d1 !important; }
@media (max-width: 1279px) {
  #app.home-view { grid-template-columns: 240px minmax(0, 1fr); }
  .home-columns { grid-template-columns: minmax(0, 1fr); }
  .home-side-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .home-review { grid-column: 1 / -1; }
  .home-metric { padding: 16px 12px; }
}
@media (max-width: 1023px) {
  #app.home-view { grid-template-columns: minmax(0, 1fr); }
  #home-menu { display: inline-flex; }
  .home-heading h1 { font-size: 32px; }
}
@media (max-width: 600px) {
  .home-topbar { padding: 12px 16px; gap: 8px; min-height: 58px; }
  .home-breadcrumb { gap: 8px; font-size: 11px; }
  #home-refresh { font-size: 10px; padding: 8px 4px; }
  .home-content { padding: 28px 18px 24px; }
  .home-heading { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
  .home-heading h1 { font-size: 30px; }
  .home-heading > div > p:last-child { font-size: 13px; }
  .home-eyebrow { font-size: 8px; }
  .home-scope-note { width: 100%; margin: 2px 0 0; }
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-metric { padding: 16px; }
  .home-metric-label { font-size: 11px; }
  .home-metric > strong { font-size: 30px; margin: 12px 0 6px; }
  .home-section-head { padding: 18px 16px; }
  .home-attention-row { padding: 15px 16px; flex-wrap: wrap; gap: 9px; }
  .home-row-copy { flex-basis: calc(100% - 50px); }
  .home-row-copy strong { white-space: normal; overflow-wrap: anywhere; }
  .home-attention-row > .home-tag { margin-left: 42px; max-width: calc(100% - 70px); }
  .home-row-arrow { margin-left: auto; }
  .home-board { grid-template-columns: minmax(0, 1fr); }
  .home-task-meta { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  .home-task { padding: 15px; }
  .home-task-title { font-size: 13px; }
  .home-lane-empty { padding-bottom: 12px; }
  .home-side-column { display: flex; }
  .home-path, .home-documents, .home-review { width: 100%; }
  .home-path { padding: 28px; }
  .home-footer { font-size: 9px; flex-wrap: wrap; }
  #home-pane button, #home-pane select { min-height: 44px; }
  .home-document { min-height: 60px; }
  #home-pane select { font-size: 16px; }
}
