body[data-workspace="security"] { --workspace: #246d55; --workspace-soft: #e9f4ef; }
body[data-workspace="site"] { --workspace: #116c82; --workspace-soft: #e8f5f8; }
.nav button[data-action="website:home"], .nav button[data-role="site"] { --nav-role: #116c82; --nav-soft: #e8f5f8; }
.website-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.website-metric { display: grid; gap: 12px; border-top: 4px solid var(--tone,#116c82); }
.website-metric strong { font-size: 30px; }
.website-metric[data-tone="new"] { border-top-color: #116c82; background: #eef8fb; }
.website-metric[data-tone="won"] { border-top-color: #2c8b63; background: #edf7f1; }
.website-metric[data-tone="partial"] { border-top-color: #b4800a; background: #fff9e8; }
.website-metric[data-tone="quote"] { border-top-color: #7950ad; background: #f5effb; }
.website-request { border-left: 5px solid #2c8b63; }
.website-request[data-tone="partial"] { border-left-color: #b4800a; background: #fffcf3; }
.website-routing-list { display: grid; margin: 0; padding: 0; list-style: none; }
.website-routing-list > li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.website-routing-list > li > div { display: grid; gap: 4px; overflow-wrap: anywhere; }
.website-facts { display: grid; gap: 12px; margin: 0; }
.website-facts div { display: grid; grid-template-columns: minmax(110px,1fr) minmax(0,2fr); gap: 12px; }
.website-facts dt { color: var(--muted); font-size: 13px; }
.website-facts dd { margin: 0; overflow-wrap: anywhere; }
.website-source { border-top: 4px solid #116c82; }
.customer-access-object, .customer-access-state { display:grid; gap:3px; border-inline-start:4px solid #8c9da5; background:#f4f6f6; padding:10px 14px; overflow-wrap:anywhere; }
.customer-access-object span { color:var(--muted); font-size:13px; }
.customer-access-state[data-tone="partial"] { border-color:#ae790e; background:#fff7e6; }
.customer-access-state[data-tone="won"] { border-color:#23734f; background:#eff8f2; }
.customer-access-state p { margin:0; }
.website-rehearsal { margin-bottom:18px; border-inline-start:5px solid #ad740d; background:#fffaed; overflow-wrap:anywhere; }
.website-rehearsal[data-tone="won"] { border-inline-start-color:#23734f; background:#eff8f2; }
.website-rehearsal .badge { color:#714906; background:#ffebbc; }
.website-rehearsal[data-tone="won"] .badge { color:#19573e; background:#d5efdf; }
.website-rehearsal .receipt-number { color:var(--muted); font-size:13px; }
.website-rehearsal .receipt-number summary { width:fit-content; cursor:pointer; }
.website-rehearsal .receipt-number span { display:block; margin-top:6px; }
form[data-form="website:test"] [hidden] { display:none; }
.website-connection { margin-bottom: 22px; }
@media(max-width: 680px) { .website-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .website-facts div { grid-template-columns: 1fr; gap: 3px; } }
/* Colour identifies a workspace or stage; every colour also has a text label. */
body[data-workspace="sales"] { --workspace: #17468f; --workspace-soft: #e6efff; }
body[data-workspace="field"] { --workspace: #904008; --workspace-soft: #ffe7d7; }
body[data-workspace="finance"] { --workspace: #075a60; --workspace-soft: #dcf5f4; }
body[data-workspace="lead"] { --workspace: #37348e; --workspace-soft: #e9eaff; }
body[data-workspace="investor"] { --workspace: #592f98; --workspace-soft: #f1e8fb; }
body[data-workspace="customer"] { --workspace: #246d55; --workspace-soft: #e9f4ef; }
body[data-workspace="customer"] .nav button { --nav-role: var(--workspace); --nav-soft: var(--workspace-soft); }
body[data-workspace="customer"] .owner { flex-wrap: wrap; overflow-wrap: anywhere; }
.topbar { border-top: 4px solid var(--workspace, var(--ink)); }
.workspace-location > .ico, .workspace-location > span:first-of-type { color: var(--workspace); }
.avatar { color: var(--workspace); background: var(--workspace-soft); }
.nav button[data-role="sales"] { --nav-role: #17468f; --nav-soft: #e6efff; }
.nav button[data-role="field"] { --nav-role: #904008; --nav-soft: #ffe7d7; }
.nav button[data-role="finance"] { --nav-role: #075a60; --nav-soft: #dcf5f4; }
.nav button[data-role="lead"] { --nav-role: #37348e; --nav-soft: #e9eaff; }
.nav button[data-role="investor"] { --nav-role: #592f98; --nav-soft: #f1e8fb; }
.nav button > .ico { color: var(--nav-role); background: var(--nav-soft); padding: 5px; box-sizing: content-box; border-radius: 8px; }
.nav button[data-action="system:security"] { --nav-role: #246d55; --nav-soft: #e9f4ef; }
.nav button[aria-current="page"] { color: var(--nav-role); background: var(--nav-soft); border-color: var(--nav-role); box-shadow: inset 4px 0 var(--nav-role); }
.nav button[aria-current="page"] > .ico { color: white; background: var(--nav-role); }
.metric-card { background: var(--stage-fill, white); border-color: color-mix(in srgb, var(--stage-accent) 35%, white); }
.metric-card .metric-value { color: var(--stage-ink); }
.deal-row { background: linear-gradient(90deg, var(--stage-fill) 0, white 64%); }
.deal-row:hover { background: var(--stage-fill); }
.deal-row[data-tone="won"] { background: #eaf6ee; }
.deal-row[data-tone="lost"] { background: #f0f2f5; }
.stage-badge { border: 1px solid color-mix(in srgb, var(--stage-accent) 45%, white); font-weight: 700; }
.linked-project, .contract-box { border-inline-start: 5px solid var(--stage-accent); background: color-mix(in srgb, var(--stage-fill) 45%, white); }
.workspace-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.workspace-flow span { background: var(--stage-fill); color: var(--stage-ink); border-bottom: 3px solid var(--stage-accent); padding: 12px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card { display: grid; align-content: start; gap: 14px; min-width: 0; padding: 24px; border: 1px solid var(--line); border-top: 5px solid var(--stage-accent); border-radius: 12px; background: linear-gradient(155deg, var(--stage-fill), white 60%); }
.project-card h2 { font-size: 22px; overflow-wrap: anywhere; }
.customer-project header { display: grid; gap: 4px; }
.customer-stage, .customer-next p { margin: 0; }
.customer-stage .badge { max-width: 100%; white-space: normal; }
.customer-next { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 12px; overflow-wrap: anywhere; }
.project-card > .button { justify-self: start; }
.project-brief { border-top: 4px solid var(--workspace); }
.project-brief-next { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 16px; border-inline-start: 4px solid var(--stage-accent); border-radius: 8px; color: var(--stage-ink); background: var(--stage-fill); }
.project-brief-next > div { flex: 1 1 245px; overflow-wrap: anywhere; }
.project-brief-next h3 { margin: 4px 0; font-size: 19px; }
.project-brief-next p { margin: 0; font-size: 14px; }
.project-brief-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 0; }
.project-brief-facts > div { padding: 10px 14px; border-inline-start: 3px solid var(--stage-accent); border-radius: 5px; background: color-mix(in srgb,var(--stage-fill) 55%,white); overflow-wrap: anywhere; }
.project-brief-facts dt { font-size: 13px; color: var(--muted); }
.project-brief-facts dd { margin: 3px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.project-brief-facts dd.hint { font-weight: 400; }
.project-brief-request summary { padding: 4px 0; cursor: pointer; font-weight: 600; }
.project-brief-request p { white-space: pre-line; overflow-wrap: anywhere; }
@media(max-width: 480px) {
  .project-brief-facts > div { padding: 9px; }
  .project-brief-facts > div:nth-child(-n+2) { grid-column: 1 / -1; }
}
.progress-label { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.project-progress { display: block; width: 100%; height: 10px; border: 0; border-radius: 20px; overflow: hidden; accent-color: #146042; }
.project-progress::-webkit-progress-bar { background: #e4e9ee; border-radius: 20px; }
.project-progress::-webkit-progress-value { background: #29885e; border-radius: 20px; }
.project-stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.project-stage { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 18px; border-radius: 10px; background: var(--stage-fill); border: 1px solid color-mix(in srgb, var(--stage-accent) 30%, white); }
.project-stage .row { align-items: flex-start; }
.project-stage h3 { font-size: 16px; }
.project-stage .stage-badge { font-size: 11px; }
.project-stage .stack { gap: 8px; }
.project-stage .text-button { justify-self: start; }
.stage-number { display: grid; place-items: center; width: 30px; height: 30px; font-weight: 700; background: var(--stage-ink); color: white; border-radius: 50%; }
.project-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.project-facts > div { display: grid; gap: 8px; }
.project-facts span { font-size: 12px; color: var(--muted); }
.project-facts strong { font-size: 16px; overflow-wrap: anywhere; }
.money-overview .metric-value { font-size: clamp(20px, 2.2vw, 30px); overflow-wrap: anywhere; }
.money-overview .metric-label { line-height: 1.5; }
.finance-note { background: #ecf8f6; border-color: #80bdb3; }
.finance-projects { display: grid; }
.finance-project { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(90px, 1fr)) auto; align-items: center; gap: 12px; padding: 16px 8px; border-bottom: 1px solid var(--line); border-inline-start: 4px solid var(--stage-accent); }
.finance-project h3 { font-size: 15px; overflow-wrap: anywhere; }
.finance-project > div { display: grid; gap: 4px; }
.finance-project > div > span { color: var(--muted); font-size: 12px; }
.finance-project > div > strong { font-size: 14px; white-space: nowrap; }
.transaction-list { display: grid; list-style: none; padding: 0; margin: 16px 0 0; gap: 12px; }
.transaction-list > li { padding: 16px; background: var(--stage-fill); border-inline-start: 4px solid var(--stage-accent); border-radius: 8px; }
.transaction-list li > p { margin-top: 6px; }
.transaction-amount { color: var(--stage-ink); font-size: 20px; }
.transaction-date { display: inline-block; margin-left: 12px; color: var(--muted); font-size: 12px; }
.reversed-label { font-size: 12px; font-weight: 700; color: #4a525d; }
.publication-list { display: grid; gap: 16px; }
.publication { border-top: 4px solid #8951cb; }
.publication .badge { color: #592f98; background: #f1e8fb; }
.publication.withdrawn { border-top-color: #778391; }
.published-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.published-photos figure { margin: 0; min-width: 0; }
.published-photos img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #f5f3ef; }
.published-photos figcaption { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.project-audit { list-style: none; padding: 0; display: grid; gap: 12px; margin-top: 16px; }
.project-audit li { display: grid; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.project-audit strong { font-size: 13px; }
.investor-progress { border-top: 5px solid #8951cb; }
dialog:has([data-form^="project:"]) { width: min(700px, calc(100% - 24px)); }
dialog:has([data-form^="project:"]) .dialog-head { border-top: 4px solid var(--workspace); }
dialog:has([data-form^="project:"]) .actions { position: sticky; bottom: -24px; background: white; padding: 12px 0; border-top: 1px solid var(--line); z-index: 1; }
dialog:has([data-form^="project:"]) .checks { display: grid; gap: 12px; }
dialog[open]:has([data-handover-draft]) { display: flex; flex-direction: column; overflow: hidden; }
dialog:has([data-handover-draft]) .dialog-head { flex: none; }
dialog:has([data-handover-draft]) .dialog-body { display: flex; min-height: 0; }
form[data-form="project:handover"] { display: flex; flex-direction: column; min-width: 0; width: 100%; min-height: 0; }
[data-handover-draft] { overflow: auto; overscroll-behavior: contain; overflow-wrap: anywhere; padding: 2px; }
dialog:has([data-handover-draft]) form > .actions { position: static; flex: none; padding: 10px 0 0; }
[data-handover-draft] ul { margin: 0; padding-inline-start: 1.35em; }
[data-handover-draft] .handover-files { display: flex; flex-wrap: wrap; gap: 8px; }
.handover-counts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; margin: 0; }
.handover-counts > div { padding: 8px; border-radius: var(--radius); background: var(--bg); }
.handover-counts dt { color: var(--muted); font-size: .82em; }
.handover-counts dd { margin: 2px 0 0; font-weight: 700; }
@media (max-width: 520px) {
  .handover-counts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .handover-counts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
  .handover-counts dd { margin: 0; }
}
@media (max-width: 1150px) {
  .finance-project { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-project > div:first-child { grid-column: 1/-1; }
  .finance-project > button { grid-column: 1/-1; justify-self: start; }
  .project-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-stages { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .nav button { display: flex; justify-content: center; min-width: 0; padding: 8px 4px; gap: 5px; font-size: 12px; }
  .nav button > .ico { width: 16px; height: 16px; padding: 3px; }
  .rail .stack { width: 100%; }
  .rail .label { display: none; }
  .nav button[aria-current="page"] { box-shadow: inset 0 -3px var(--nav-role); }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .project-card { padding: 16px; }
  .project-card h2 { font-size: 20px; }
  .workspace-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workspace-flow span { font-size: 11px; padding: 8px; }
  .money-overview .metric-value { font-size: 22px; }
  .money-overview .metric-hint { display: block; }
  .project-stage { padding: 12px; gap: 8px; }
  .project-stage > .stack > .row { gap: 6px; }
  .published-photos { grid-template-columns: minmax(0, 1fr); }
  .project-facts strong { font-size: 14px; }
}
@media (max-width: 380px) {
  .nav button { font-size: 11px; gap: 3px; }
  .nav button > .ico { width: 14px; height: 14px; padding: 2px; }
  .money-overview { grid-template-columns: minmax(0, 1fr); }
  .money-overview .metric-card { gap: 4px; }
  .finance-project { grid-template-columns: minmax(0, 1fr); }
  .finance-project > div { display: flex; justify-content: space-between; }
  .finance-project > div:first-child { display: grid; }
}

.inbox-count{display:inline-flex;min-width:22px;height:22px;align-items:center;justify-content:center;border-radius:12px;background:#173d50;color:#fff;font:700 12px/1 Manrope,Arial,sans-serif;padding:0 5px}
.mobile-dock{display:none}
.notice-row{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;color:#102631;text-align:left;background:#fff;border:1px solid #d7dfe0;border-radius:9px;cursor:pointer;font:inherit}
.notice-row:focus-visible,.mobile-dock button:focus-visible{outline:3px solid #316b86;outline-offset:2px}
.notice-row[data-read=false]{border-inline-start:4px solid #a47733;background:#fffcf5}
.notice-row>.ico:last-child{margin-left:auto;flex-shrink:0}
.notice-copy{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}
.notice-copy small{font-size:.85rem;color:#455b66}
.inbox-list .notice-object{font-size:1rem;margin:12px 0 0;overflow-wrap:anywhere}
.notice-glyph{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;flex-shrink:0;background:#e4eef7;color:#214c67}
.notice-glyph[data-group=visits]{background:#fae6d6;color:#833c14}.notice-glyph[data-group=money]{background:#d9efeb;color:#195b51}.notice-glyph[data-group=publications]{background:#ece6f6;color:#563979}
#notification-settings:empty{display:none}
@media(max-width:740px){
  html:has(.mobile-dock){scroll-padding-bottom:calc(80px + env(safe-area-inset-bottom))}
  .main:has(.mobile-dock){padding-bottom:calc(80px + env(safe-area-inset-bottom))}
  .mobile-dock{display:flex;position:fixed;z-index:5;inset:auto max(9px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left));background:#20384a;border:1px solid #597281;box-shadow:0 4px 14px #122b3d29;border-radius:20px;padding:4px;gap:3px}
  .mobile-dock button{position:relative;flex:1;min-width:0;min-height:48px;display:grid;justify-items:center;align-content:center;gap:2px;font:700 12px/1.2 Manrope,Arial,sans-serif;color:#f3f6f8;border:0;background:none;border-radius:15px;cursor:pointer}
  .mobile-dock button[aria-current=page]{color:#152d40;background:#fcfbf6}
  .mobile-dock .ico{height:20px;width:20px}
  .mobile-dock .inbox-count{position:absolute;left:calc(50% + 7px);top:1px;height:17px;min-width:17px;font-size:10px}
  body:has(dialog[open],textarea:focus,input:not([type=checkbox]):not([type=radio]):not([type=file]):focus) .mobile-dock{visibility:hidden}
  .rail .nav [data-action="mobile:inbox"]{display:none}
}
.project-search { align-items: end; margin: 6px 0 14px; }
.project-search .field { flex: 1 1 180px; min-width: 0; }
.program-line { min-width: 0; }
.program-line + .program-line { border-top: 1px solid var(--line); padding-top: 20px; }
.program-totals { color: var(--muted); }
.program-totals strong { color: var(--ink); }
.program-row { display: grid; min-width: 0; gap: 6px; padding: 12px 16px; border: 1px solid var(--line); border-inline-start: 4px solid var(--stage-accent); border-radius: 8px; overflow-wrap: anywhere; }
.program-row h4, .program-row p { margin: 0; }
.program-row h4 { font-size: 1rem; }
.program-row .badge { background: var(--stage-fill); color: var(--stage-ink); }
.program-row .actions { margin-top: 4px; }
[data-program-portfolio] .chip[aria-pressed="true"] { background: var(--ink); color: white; }
.project-pages { flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.lead-task { justify-content: space-between; flex-wrap: wrap; }
.lead-task .notice-copy { flex: 1 1 15rem; }
.attention-filters { display:flex; flex-wrap:wrap; width:fit-content; max-width:100%; padding:3px; gap:2px; background:#eef1f2; border-radius:12px; }
.attention-filters button { min-height:44px; padding:4px 12px; border:1px solid transparent; border-radius:9px; background:transparent; color:#405664; font:inherit; font-size:.9rem; cursor:pointer; }
.attention-filters button[aria-pressed=true] { color:#163548; border-color:#ccd7da; background:#fff; font-weight:650; }
.attention-filters button:focus-visible { outline:2px solid #316b86; outline-offset:1px; }
.regional-deadline { display:flex; flex-direction:column; align-items:flex-end; gap:5px; }
.regional-deadline time { color:#455b66; font-size:.85rem; font-variant-numeric:tabular-nums; }
@media (max-width:640px) {
  .regional-deadline { flex-direction:row; align-items:center; flex-wrap:wrap; gap:6px 10px; }
}
.preview-person { gap: .75rem; flex-wrap: wrap; }
.question-panel[hidden] { display: none; }
.question-panel { min-width: 0; }
.question-panel button { min-height: 48px; }
.question-panel .question-link { display: grid; gap: .35rem; padding: .8rem 1rem; border: 1px solid var(--line, #d7dddf); border-radius: .5rem; background: var(--card, #fff); color: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.question-messages { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.question-messages li { padding: .75rem 1rem; border-inline-start: 3px solid #b28750; background: #faf6ef; }
.question-messages li[data-side="staff"] { background: #edf5f6; border-color: #47737b; }
.question-messages p { margin: .4rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.investor-news { min-width: 0; }
.single-publication { max-width: 52rem; }
.single-publication .publication { overflow-wrap: anywhere; }
.single-publication .single-report-object { color: #574366; font-weight: 700; margin: 0; }
.visit-status, .published-next { display: grid; gap: .25rem; margin: 0; padding: .75rem 1rem; border-inline-start: 3px solid #b38a4a; background: #f4eee5; overflow-wrap: anywhere; }
.visit-status span { color: #485762; font-size: .875rem; }
.visit-status.has-news { background: #f2ecfa; border-color: #8156a6; }
.report-news, .publication .report-news { background: #eee4fb; color: #522b86; justify-self: start; }
.publication .report-seen { background:#e5f2ef; color:#245b54; }
.report-news[hidden], [data-visit-error][hidden] { display: none; }
.published-next span { white-space: pre-wrap; }
.report-archive > summary { min-height: 48px; align-content: center; cursor: pointer; }
.report-archive[open] > summary { margin-bottom: .5rem; }
.archive-links { list-style: none; padding: 0; margin: 0; }
.archive-links li + li { border-top: 1px solid var(--line); }
.archive-links a { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .75rem; padding: .65rem 0; min-height: 44px; color: var(--ink); overflow-wrap: anywhere; }
.archive-links a > span:not(.badge) { color: #485762; font-size: .875rem; }
.report-next { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; }
.report-next .button { white-space: normal; text-align: center; }
[data-remaining-reports]:empty { display: none; }
.portfolio-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-width:32rem; gap:3px; padding:4px; border-radius:15px; background:#e1e8e9; margin-bottom:.75rem; }
.portfolio-filters .chip { min-height:44px; border:0; border-radius:11px; white-space:normal; background:transparent; color:var(--ink); }
.portfolio-filters .chip[aria-pressed=true] { background:#183548; color:white; }
.shell .main .project-card.investor-project { border:1px solid var(--line); border-radius:18px; padding:18px; gap:12px; background:linear-gradient(150deg,#fff 40%,#f6f8f6); }
.investor-project > div:first-child p { margin:.2rem 0 0; overflow-wrap:anywhere; }
.portfolio-publication { border-inline-start:3px solid var(--gold); padding-inline-start:12px; display:grid; gap:3px; overflow-wrap:anywhere; }
.portfolio-meta { margin:0; color:#53636b; font-size:.84rem; }
.portfolio-new { font-weight:750; color:#126265; }
.portfolio-actions { display:flex; flex-wrap:wrap; gap:8px; }
.portfolio-actions .button { min-height:44px; border-radius:10px; font-size:.9rem; }
.portfolio-actions .portfolio-open-report { color:white; background:#163d4a; border-color:#163d4a; }

/* The workspace switcher shares one set of actions at every screen width. */
.rail-head { flex:0 0 auto; }
.rail { overflow-y:auto; gap:20px; }
.rail-toggle { display:none; }
.nav-group { display:grid; gap:4px; }
.nav-tools { border-top:1px solid var(--line); margin-top:8px; padding-top:12px; }
.nav [data-nav-tone="accounts"] { --nav-role:#795017; --nav-soft:#faf0d9; }
.nav [data-nav-tone="chats"] { --nav-role:#165956; --nav-soft:#dfefea; }
.nav [data-nav-tone="inbox"] { --nav-role:#3c5869; --nav-soft:#eaf1f5; }
.nav [data-action="auth:home"] { --nav-role:var(--workspace); --nav-soft:var(--workspace-soft); }
.nav .nav-group button > .ico { flex-shrink:0; color:var(--nav-role); background:var(--nav-soft); }
.nav .nav-group button[aria-current="page"] { color:var(--nav-role); background:var(--nav-soft); }
.nav .nav-group button[aria-current="page"] > .ico { background:var(--nav-role); color:white; }
.top-tools { display:flex; align-items:center; gap:12px; }
.workspace-location { min-width:0; }
.workspace-location > .ico { box-sizing:content-box; padding:6px; border-radius:8px; background:var(--workspace-soft); }
.workspace-location > span { font-weight:750; }
.intro .button.primary { background:var(--workspace,var(--ink)); border-color:var(--workspace,var(--ink)); color:white; }
.intro .button.primary:hover { filter:brightness(.9); }
.top-help { gap:6px; min-height:42px; }
.account-menu { position:relative; }
.account-menu summary { display:flex; align-items:center; gap:7px; min-height:44px; cursor:pointer; list-style:none; }
.account-menu summary::-webkit-details-marker { display:none; }
.account-menu summary::after { content:""; width:6px; height:6px; border-right:1.5px solid; border-bottom:1.5px solid; transform:translateY(-2px) rotate(45deg); }
.account-caption { display:none; }
.account-name { max-width:19ch; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px; }
.account-popover { position:absolute; z-index:8; top:calc(100% + 4px); right:0; width:min(220px,80vw); padding:14px; background:var(--paper); border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 24px #0c24341a; overflow-wrap:anywhere; display:grid; gap:5px; }
.account-popover .button { justify-content:flex-start; min-height:40px; padding-inline:4px; }
.content .test-context { padding:5px 10px; margin:0; font-size:12px; line-height:1.45; border:0; border-left:3px solid #bd8f35; border-radius:0 5px 5px 0; }
.content .intro .eyebrow { color:var(--workspace,var(--gold-ink)); }
.content .intro .eyebrow::before { background:var(--workspace,var(--gold)); }
.learning-invite { border:1px solid color-mix(in srgb,var(--workspace) 34%,white); border-inline-start:4px solid var(--workspace);
  background:linear-gradient(105deg,var(--workspace-soft),#fff 85%); border-radius:10px; display:flex; gap:12px; align-items:center; padding:12px 16px; }
.learning-icon { color:var(--workspace); display:grid; place-items:center; flex:none; }
.learning-icon .ico { width:23px; height:23px; }
.learning-invite strong { color:var(--workspace); font-size:15px; }
.learning-invite p { margin:2px 0 0; font-size:14px; color:var(--ink); }
.learning-invite-actions { margin-inline-start:auto; display:flex; align-items:center; gap:5px; flex-shrink:0; }
.button.guide-start { background:var(--paper); color:var(--workspace); border-color:var(--workspace); }
.learning-invite .text-button { min-height:44px; color:var(--muted); }
dialog:has(.learning-step) { width:min(460px,calc(100% - 24px)); }
dialog:has(.learning-step) .dialog-head { border-top:4px solid var(--workspace); }
.learning-step { display:grid; gap:16px; }
.learning-meta, .learning-controls, .learning-return { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.learning-meta { font-size:13px; color:var(--muted); }
.learning-meta > :first-child, .learning-return span { display:inline-flex; gap:7px; align-items:center; color:var(--workspace); font-weight:750; }
.learning-meter { display:flex; gap:5px; }
.learning-meter i { flex:1; height:4px; background:var(--line); border-radius:4px; }
.learning-meter .filled { background:var(--workspace); }
.learning-step h3 { margin:0; font-size:clamp(21px,3vw,27px); line-height:1.2; }
.learning-step h3:focus { outline:0; }
.learning-step p { margin:0; }
.learning-example { border:1px solid var(--line); border-radius:10px; background:var(--paper); }
.learning-example summary { padding:12px; cursor:pointer; color:var(--workspace); font-weight:700; }
.learning-example > div { padding:0 12px 12px; display:grid; gap:8px; font-size:14px; }
.learning-example dl { margin:0; }
.learning-example dl > div { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:2px 8px; border-top:1px solid var(--line); padding:6px 0; }
.learning-example dd { margin:0; font-weight:700; font-variant-numeric:tabular-nums; }
.learning-example .learning-gap { color:#805213; }
.guide-locate { justify-self:start; font-size:14px; color:var(--workspace); border-color:var(--workspace); }
.learning-controls { padding-top:12px; border-top:1px solid var(--line); }
.learning-controls .primary { background:var(--workspace); border-color:var(--workspace); }
.learning-target { outline:3px solid var(--workspace) !important; outline-offset:3px; }
.learning-return { background:var(--workspace-soft); color:var(--workspace); border:1px solid var(--workspace); padding:4px 10px; border-radius:8px; scroll-margin-block:12px; }
.learning-return .button { min-height:42px; }
@media(max-width:900px) {
  .shell { display:block; }
  .rail { position:relative; z-index:6; height:auto; overflow:visible; border:0; padding:5px 16px; display:block; }
  .rail-head { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; }
  .rail-head .brand { border:0; padding:0; }
  .rail-head .brand-mark { width:37px; height:37px; flex-basis:37px; }
  .rail-head .brand strong { font-size:16px; }
  .rail-head .brand span { display:none; }
  .rail-toggle { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:42px; padding:6px 12px; border:1px solid var(--line-strong); border-radius:8px; background:var(--paper); color:var(--ink); font:inherit; font-size:14px; font-weight:700; }
  .rail .nav { display:none; }
  .rail[data-expanded] .nav { display:grid; grid-template-columns:1fr; position:absolute; right:12px; top:calc(100% + 2px); max-height:min(65dvh,570px); overflow:auto; width:min(360px,calc(100% - 24px)); padding:10px; background:var(--paper); border:1px solid var(--line-strong); border-radius:10px; box-shadow:0 8px 28px #10233129; }
  .nav .nav-group button { flex-direction:row; justify-content:flex-start; text-align:left; padding:6px 9px; font-size:14px; min-height:44px; gap:10px; }
  .nav .nav-group button > .ico { display:block; width:18px; height:18px; padding:5px; }
  .nav .nav-group button[aria-current="page"] { box-shadow:inset 3px 0 var(--nav-role); }
  .nav-tools { margin-top:2px; padding-top:7px; }
  .topbar { padding:2px 16px; min-height:48px; gap:4px; flex-wrap:nowrap; }
  .top-tools { gap:6px; }
  .account-name { display:none; }
  .account-caption { display:inline; font-size:13px; }
  .workspace-location { gap:5px; font-size:14px; }
  .top-help { padding:4px 7px; font-size:13px; }
  .content { gap:14px; }
}
@media(max-width:590px) {
  .learning-invite { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; padding:10px 12px; }
  .learning-invite .learning-icon { display:none; }
  .learning-invite-actions { display:flex; grid-column:1/-1; justify-self:start; margin:0; }
  .learning-invite .button { min-height:44px; }
  .learning-invite p { font-size:13px; }
  .account-menu .avatar { display:none; }
  .top-help .ico { display:none; }
  .workspace-location > .ico { width:15px; height:15px; padding:4px; }
}

/* A dark navigation surface keeps the light workspace and its status colours legible. */
.rail-compact,.section-search { display:none; }
.shell:has(>.rail) { background:radial-gradient(ellipse 80vw 56vh at 0 0,#dae7ef,transparent 80%),linear-gradient(135deg,#f4f6f7 10%,#eff4f4 68%,#f6f3ed); }
.shell .rail {
  background:radial-gradient(ellipse at 0 0,#315463 0,transparent 62%),linear-gradient(160deg,#142f40,#0b1b29 76%);
  border-color:#334c59; color:#fafafa;
}
.rail .brand { color:#fff; }
.rail .brand span { color:#c7d4d9; }
.rail .brand-mark { padding:0; background:#fbfaf7; border-radius:9px; }
.rail .nav-group button { color:#f5f7f7; background:#ffffff0a; border:1px solid #ffffff18; border-radius:11px; }
.rail .nav-group button:hover { background:#ffffff1d; }
.rail .nav-group button[aria-current="page"] { color:#112c38; background:#f9f6ee; border-color:#f9f6ee; box-shadow:inset 3px 0 #c5a36e; }
.rail .nav-tools { border-color:#ffffff30; }
.rail button:focus-visible { outline:3px solid #edc988; outline-offset:2px; }
.shell .main .metric-card,.shell .main .project-card {
  border-radius:16px; background:linear-gradient(145deg,#fff 30%,color-mix(in srgb,var(--stage-fill,#eff3f4) 63%,white));
  box-shadow:0 3px 14px #172e3c09;
}
.shell .main button.metric-card[aria-pressed=true] { outline:2px solid var(--stage-accent); outline-offset:-2px; }
.shell .main button.metric-card:hover { border-color:var(--stage-accent); }
.section-picker,.picker-results { display:grid; gap:8px; }.picker-results { max-height:50dvh; overflow:auto; }
.picker-results .button { justify-content:flex-start; }
@media(min-width:901px) {
  .shell:has(>.rail) { grid-template-columns:248px minmax(0,1fr); transition:grid-template-columns 180ms ease-out; }
  .shell[data-compact]:has(>.rail) { grid-template-columns:84px minmax(0,1fr); }
  .shell .rail { margin:10px 0 10px 10px; top:10px; height:calc(100dvh - 20px); padding:12px 8px 9px; gap:12px; border:1px solid #597585; border-radius:23px; overflow:hidden; }
  .rail-head { display:flex; align-items:center; justify-content:space-between; gap:3px; }
  .rail .brand { border:0; padding:4px 7px; min-width:0; white-space:nowrap; }
  .rail .brand strong { font-size:16px; }
  .rail .brand-mark { width:38px; height:38px; flex:0 0 38px; }
  .rail .brand span { font-size:11px; }
  .rail-compact,.section-search { display:flex; align-items:center; gap:8px; color:#f7f9fa; border:1px solid #ffffff30; background:#ffffff10; border-radius:10px; cursor:pointer; }
  .rail-compact { flex-shrink:0; margin-top:auto; min-height:44px; padding:7px 13px; font:inherit; font-size:13px; }
  .section-search { flex-shrink:0; min-height:44px; padding:6px 13px; font:inherit; font-size:13px; }
  .section-search kbd { margin-inline-start:auto; color:#dae2e5; font-family:inherit; font-size:11px; }
  .rail .nav { display:block; min-height:0; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#7695a4 transparent; }
  .rail .nav-group { gap:4px; padding:3px; }
  .rail .nav-tools { margin-top:10px; padding-top:12px; }
  .shell[data-compact] .rail .brand>div,.shell[data-compact] .nav-group button>span:not([data-inbox-badge]),.shell[data-compact] .section-search>span,.shell[data-compact] .section-search kbd,.shell[data-compact] .rail-compact>span { display:none; }
  .shell[data-compact] .rail-compact>.ico { transform:rotate(180deg); }
  .shell[data-compact] .rail .nav-group button,.shell[data-compact] .section-search,.shell[data-compact] .rail-compact { justify-content:center; padding-inline:0; }
  .shell[data-compact] [data-inbox-badge]:not(:empty) { position:absolute; inset:4px 4px auto auto; }
  .shell[data-compact] .rail .inbox-count { min-width:15px; padding:0 3px; font-size:9px; line-height:15px; }
}
@media(max-width:900px) {
  .shell .rail .rail-toggle { color:#fff; background:#ffffff10; border-color:#ffffff48; min-height:44px; }
  .shell .rail[data-expanded] .nav { background:#132d3b; border-color:#49616c; border-radius:14px; box-shadow:0 10px 32px #0b1b293b; }
  .shell .rail .nav button>.ico {color:inherit;background:transparent;}
}
@media(prefers-reduced-motion:reduce) { .shell:has(>.rail) { transition:none; } }
.shell[data-owner-sheet] { display:block; }
.shell[data-owner-sheet] > .rail,.shell[data-owner-sheet] .topbar,.shell[data-owner-sheet] a[href="/install"] { display:none; }

@media (min-width:901px) {
  .shell .rail {
    background:radial-gradient(ellipse 120% 47% at 2% 0%,#47688b 0,transparent 95%),linear-gradient(165deg,#23445c,#142c40 52%,#0e1c2c);
    box-shadow:inset 0 1px 1px #ffffff47,0 5px 18px #152d421b;
  }
  .rail .nav-group button {position:relative; isolation:isolate; min-height:44px; padding:7px 10px; gap:10px; white-space:nowrap; border:1px solid transparent; border-radius:13px; background:transparent; transition:background-color .15s,border-color .15s;}
  .rail .nav-group button:hover { background:#ffffff12; border-color:#ffffff25; }
  .rail .nav-group button>.ico,.rail .nav-group button[aria-current=page]>.ico { box-sizing:content-box; width:18px; height:18px; padding:5px; border-radius:8px; color:inherit; background:transparent; }
  .rail .nav-group button[aria-current=page] {background:transparent; border-color:transparent; box-shadow:none;}
  .rail .nav-group button[aria-current=page]::before {
    content:""; position:absolute; inset:-1px; z-index:-1; border-radius:inherit;
    background:linear-gradient(110deg,#fffdf7,#eef5f6); box-shadow:inset 0 1px #fff,0 3px 7px #0523373a;
  }
  @media (prefers-reduced-motion:no-preference) {
    .rail .nav-group button.arriving::before {animation:rail-selection .20s cubic-bezier(.20,.76,.27,1) both;}
    .rail .rail-compact>.ico {transition:transform .18s ease-out;}
    .shell .main button.metric-card {transition:transform .14s ease-out,box-shadow .14s ease-out;}
    .shell .main button.metric-card:active {transform:translateY(1px);}
  }
}
@keyframes rail-selection {from {transform:translateY(var(--from-selection));opacity:.62;} to {transform:none;opacity:1;}}
@supports ((backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px))) {
  @media (max-width:740px) and (prefers-reduced-transparency:no-preference) {
    .mobile-dock {background:linear-gradient(120deg,#24465cec,#152c40f5);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);}
  }
  @media (min-width:901px) and (prefers-reduced-transparency:no-preference) {
    .shell .rail {background:radial-gradient(ellipse 120% 47% at 2% 0%,#587ca49e,transparent 95%),linear-gradient(165deg,#203e55f0,#12283bed 52%,#0e1c2cf7);}
  }
}
.station-heading>.intro {padding:clamp(16px,2vw,25px);border-radius:20px;border:1px solid #cbd9df;background:linear-gradient(115deg,#fffefa,#edf4f6);box-shadow:inset 0 1px #fff,0 3px 14px #1535470b;}
.station-heading .intro-copy>.eyebrow {color:#35676d;}
.station-heading .intro-copy>p:empty {display:none;}
.investor-header-facts {display:grid;align-content:end;justify-items:start;gap:5px;min-width:0;}
.investor-header-facts p {margin:0;}
.investor-statement-link {display:inline-flex;align-items:center;min-height:44px;color:var(--action);font-weight:650;text-underline-offset:.2em;}

.form-grid .payout-recipient, form .payout-recipient { display:none; }
form:has(select[name=category] option[value="Выплата инвестору"]:checked) .payout-recipient { display:grid; }
.investor-settlement {border-inline-start:3px solid #a9814c;}
.investor-settlement [data-statement-body] {display:grid;gap:14px;min-width:0;}
.investor-month {max-width:16rem;}
.investor-month input {min-width:0;}
.investor-totals {grid-template-columns:repeat(auto-fit,minmax(min(12rem,100%),1fr));gap:10px;}
.investor-totals > div {align-content:start;padding:14px;border:1px solid #dce5e7;border-radius:12px;background:#f1f6f6;}
.investor-totals strong {font-size:clamp(18px,2.4vw,27px);font-variant-numeric:tabular-nums;letter-spacing:-.03em;}
.investor-documents {padding:0;list-style:none;display:grid;gap:10px;}
.investor-documents li {display:grid;gap:3px;overflow-wrap:anywhere;border-block-start:1px solid #dae2e5;padding-block-start:8px;}
.investor-documents small {color:var(--muted);}
.investor-documents button {justify-self:start;}

.portfolio-overview {display:grid;grid-template-columns:minmax(260px,.85fr) minmax(0,1.3fr);gap:14px;align-items:stretch;}
.portfolio-progress {container-type:inline-size;color:#fff;padding:clamp(15px,1.35vw,20px);border-radius:18px;border:1px solid #2c4a59;
  background:radial-gradient(ellipse at top right,#49606a 0%,transparent 47%),linear-gradient(122deg,#112b3e,#254554);}
.portfolio-open {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(8px,2.8cqi,13px);width:100%;min-height:44px;padding:0;border:0;border-radius:10px;text-align:left;font:inherit;color:inherit;background:none;cursor:pointer;}
.portfolio-open:focus-visible {outline:3px solid #edc988;outline-offset:4px;}
.portfolio-ring {position:relative;display:grid;place-items:center;width:clamp(62px,19cqi,82px);aspect-ratio:1;}
.portfolio-ring svg {position:absolute;inset:0;width:100%;height:100%;}
.portfolio-total {font-size:clamp(1.3rem,7.5cqi,2rem);font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:-.05em;line-height:1.1;}
.portfolio-caption {display:grid;gap:5px;min-width:0;overflow-wrap:anywhere;}
.portfolio-caption>strong {font-size:clamp(1rem,4.8cqi,1.33rem);letter-spacing:-.035em;line-height:1.18;}
.portfolio-caption>span {display:flex;align-items:center;gap:6px;color:#ffdaa8;font-size:.83rem;font-weight:650;}
.portfolio-caption .ico {width:15px;height:15px;}
.portfolio-array {width:clamp(76px,26cqi,118px);aspect-ratio:8/5;background:url('/portfolio-array.svg') center/contain no-repeat;pointer-events:none;}
@container (max-width:18rem){.portfolio-array{display:none;}.portfolio-open{grid-template-columns:auto minmax(0,1fr);}}
@media (forced-colors:active){.portfolio-array{visibility:hidden;}}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .portfolio-caption .ico{transition:transform .16s ease-out;}
  .portfolio-open:hover .portfolio-caption .ico{transform:translateX(3px);}
}
.portfolio-progress ul {display:grid;gap:5px;list-style:none;margin:10px 0 0;padding:10px 0 0;border-top:1px solid #ffffff35;}
.portfolio-progress li {display:grid;align-items:baseline;grid-template-columns:8px 1fr auto;gap:8px;color:#f0f5f6;font-size:13px;}
.portfolio-dot {width:7px;height:7px;border-radius:50%;background:#7dd8c9;}
.portfolio-dot.group-1 {background:#e5bd83;}.portfolio-dot.group-2 {background:#91b9d5;}.portfolio-dot.group-3 {background:#c1c2cc;}
.portfolio-overview .money-overview {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;}
.shell .portfolio-overview .metric-card {min-width:0;padding:12px clamp(12px,1.3vw,18px);display:flex;flex-direction:column;justify-content:center;align-items:flex-start;border:1px solid #cfdddf;
  background:linear-gradient(120deg,#fff 24%,color-mix(in srgb,var(--stage-fill) 40%,#fffdf9));box-shadow:none;}
.portfolio-overview .metric-label {display:flex;align-items:center;gap:7px;color:#304955;}
.portfolio-overview .metric-label::before {content:"";width:6px;height:6px;flex:none;border-radius:50%;background:var(--stage-accent);}
.portfolio-overview .metric-value {font-family:inherit;font-size:clamp(18px,1.9vw,32px);letter-spacing:-.04em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
@media(max-width:1000px){.portfolio-overview {grid-template-columns:minmax(185px,.75fr) minmax(0,1.25fr);}.portfolio-overview .metric-card{padding:12px;}}
@media(max-width:640px){.portfolio-overview {grid-template-columns:1fr;gap:10px;}.portfolio-progress{padding:14px 16px;}.portfolio-overview .metric-value{font-size:clamp(17px,5vw,25px);}}

.home-manage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: center;
  padding: clamp(14px, 1.45vw, 22px);
  border: 1px solid #cfdbdf;
  border-radius: 18px;
  color: #152d40;
  background: linear-gradient(112deg,#fffdf7,#f4f6f5);
}
.home-titles h1 { margin: 0; color: #172e40; font-size: clamp(1.45rem, 2.25vw, 2.1rem); letter-spacing:-.045em; line-height: 1.15; }
.home-manage > .button { border-color: #233f50; color: white; background: #233f50; }
.home-finder { grid-column: 1/-1; display: grid; gap: 6px; position: relative; min-width:0; }
.home-finder label { font-size: .9rem; font-weight: 600; color: #304a56; }
.home-finder .input { min-height: 44px; color: #112f38; background: #fff; }
.home-finder .input::placeholder { color: #566a72; }
.finder-filters { border: 1px solid #bfced3; border-radius: 13px; color:#2a4654; background: #ffffffd9; }
.finder-filters summary { padding: 10px 13px; min-height: 44px; font-weight: 600; cursor: pointer; }
.finder-controls { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(192px,100%),1fr)); gap: 10px; padding: 2px 12px 12px; align-items: end; }
.finder-controls label { display: grid; gap: 4px; min-width: 0; font-size: .8rem; }
.finder-controls .input { width: 100%; min-width: 0; }
.finder-bounds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.finder-controls [hidden] { display: none; }
.finder-reset { width: fit-content; min-height: 44px; padding: 6px 8px; border: 0; background: transparent; color: #1b5866; text-decoration: underline; cursor: pointer; }
@media (min-width:760px) {
  .home-finder:not(:has(details[open])) {grid-template-columns:minmax(0,1fr) auto;column-gap:10px;}
  .home-finder:not(:has(details[open]))>label,#home-project-matches {grid-column:1/-1;}
}
@media (prefers-reduced-transparency:reduce) {
  .finder-filters,.home-manage {background:#f8fbfb;}
}
.generation-plan [data-plan-content]{display:grid;gap:10px;justify-items:start;width:100%;min-width:0}
.plan-period{width:min(100%,340px)}
.plan-facts{display:grid;width:100%;grid-template-columns:repeat(auto-fit,minmax(min(155px,100%),1fr));gap:8px}
.plan-facts>div{display:grid;align-content:start;gap:6px;background:#eff5f4;padding:12px;border-radius:13px}
.plan-facts span,.generation-plan small{color:#445f63;font-size:.84rem}
.plan-facts strong{color:#143f46;font-size:clamp(1.1rem,2vw,1.45rem);line-height:1.2}
.generation-plan p{margin:0}
#home-project-matches {
  display: grid; gap: 3px; padding: 9px; border-radius: 13px; background: #fff; color: #112f38;
  max-height: min(42vh,320px); overflow: auto;
}
#home-project-matches[hidden] { display: none; }
#home-project-matches .hint { padding: 3px 7px; color: #536671; }
#home-project-matches button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; width: 100%;
  border: 0; border-radius: 9px; padding: 6px 10px; text-align: left; color: #15323b; background: #eff6f5;
}
#home-project-matches button span:first-child { display: grid; }
#home-project-matches button small { color: #475f67; }
#home-project-matches button:hover, #home-project-matches button:focus-visible { background: #d9efeb; }
@media (max-width:560px) {
  .home-manage { gap: 11px; padding: 15px; }
  .home-manage > .button { font-size: .8rem; padding: 7px 10px; }
}

.notice-head {display:flex;align-items:center;gap:12px;padding:clamp(16px,2.2vw,26px);color:white;background:linear-gradient(115deg,#132b37,#28565f);border-radius:20px}
.notice-head h1{color:white;margin:2px 0 0;font-size:clamp(1.6rem,3vw,2.25rem);line-height:1.15}
.notice-kicker{font-size:.83rem;color:#ead2a8}.notice-quantity{border-radius:16px;padding:5px 10px;background:#dceeea;color:#193f43;font-size:.85rem;font-weight:700}
.notice-head>.text-button{margin-left:auto;color:white;min-height:44px}
.notice-tabs{display:inline-flex;flex-wrap:wrap;gap:3px;width:fit-content;border:1px solid #c6d6d6;background:#e6efee;border-radius:15px;padding:3px}
.notice-tabs button{color:#324d54;min-height:40px;padding:5px 13px;border:0;border-radius:12px;background:transparent;font:inherit;cursor:pointer}
.notice-tabs button[aria-pressed=true]{background:#163842;color:white;font-weight:700}
.notice-glyph[data-group=directChats]{background:#d9ede8;color:#1b605b}.notice-glyph[data-group=groupChats]{background:#ece5f3;color:#614276}

.station-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-block:12px}
.overview-tile{display:flex;flex-direction:column;gap:8px;align-items:stretch;text-align:left;min-width:0;padding:17px 20px;border:1px solid #d5e4e4;border-radius:20px;background:linear-gradient(130deg,#fff,#f0f7f5);color:#112e35;font:inherit;box-shadow:0 3px 11px #143e4710;cursor:pointer}
.overview-heading,.overview-ratio,.overview-figures{display:flex;justify-content:space-between;align-items:center;gap:12px}
.overview-heading{font-size:1.02rem}.overview-heading>span{color:#52787a}
.overview-figures{align-items:flex-start;flex-wrap:wrap;justify-content:flex-start;column-gap:clamp(15px,3vw,52px)}
.station-reading{display:grid;gap:3px;min-width:0}.station-reading strong{font-size:clamp(1.22rem,2vw,1.72rem);letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.overview-tile small{font-size:.83rem;line-height:1.35;color:#465e61}
.overview-energy{background:linear-gradient(115deg,#122c3a,#135963);color:white;border-color:#254f57}
.overview-energy small,.overview-energy .overview-heading>span{color:#d3e7e7}
.overview-ratio{justify-content:flex-start}.overview-ratio progress{height:6px;width:min(60%,190px);border:0;border-radius:6px;overflow:hidden;background:#ffffff2e;accent-color:#edc68d}
.overview-ratio progress::-webkit-progress-bar{background:#ffffff2e}.overview-ratio progress::-webkit-progress-value{background:#edc68d}
.overview-equipment{grid-column:1/-1;gap:4px}.overview-tile:focus-visible{outline:3px solid #08767b;outline-offset:3px}
.overview-plan + .overview-equipment{grid-column:auto}
.overview-plan .overview-ratio progress{background:#dbe6e2;accent-color:#276863}
.overview-plan .overview-ratio progress::-webkit-progress-bar{background:#dbe6e2}
.overview-plan .overview-ratio progress::-webkit-progress-value{background:#276863}
.overview-day .station-reading{flex:1 1 9rem}
.station-reading .reading-status{font-size:1rem;letter-spacing:0;font-weight:650}
@media(hover:hover) and (prefers-reduced-motion:no-preference){.overview-tile{transition:transform .15s ease,box-shadow .15s ease}.overview-tile:hover{transform:translateY(-2px);box-shadow:0 7px 18px #143e471c}}
@media(max-width:650px){.station-overview{grid-template-columns:minmax(0,1fr);gap:8px}.overview-tile{padding:14px 15px}.overview-figures{justify-content:space-between}}

.field-agenda { width:100%; max-width:52rem; display:grid; align-content:start; gap:14px; color:#162c39; }
.agenda-header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.agenda-header p,.agenda-summary small { margin:0; color:#49636a; font-size:.82rem; font-weight:650; }
.agenda-header p::first-letter { text-transform:uppercase; }
.agenda-header h1 { margin:.1em 0 0; font-size:clamp(1.65rem,3vw,2.2rem); line-height:1.16; letter-spacing:-.04em; }
.agenda-history { display:inline-flex; flex-shrink:0; align-items:center; gap:6px; min-height:44px; padding:0 12px; color:#2c505a; background:transparent; border:1px solid #bcced1; border-radius:14px; font:inherit; font-size:.82rem; cursor:pointer; }
.agenda-history .ico { width:16px;height:16px; }
.agenda-summary { display:flex; align-items:center; gap:clamp(12px,2.4vw,22px); padding:clamp(14px,2.5vw,24px); border:1px solid #ccdddc; border-radius:21px; background:linear-gradient(112deg,#fcfffe 20%,#e9f3f1); box-shadow:0 3px 12px #123d4510; }
.agenda-summary h2 { margin:.14em 0; font-size:clamp(1.18rem,2.2vw,1.7rem); line-height:1.22; letter-spacing:-.034em; }
.agenda-summary p,.agenda-row-copy small { margin:0; color:#4c626a; line-height:1.4; }
.agenda-summary p { font-size:.86rem; }
.agenda-ring { width:clamp(54px,7vw,76px); aspect-ratio:1; flex:none; display:grid; place-items:center; }
.agenda-ring svg,.agenda-ring b { grid-area:1/1; }
.agenda-ring>svg { width:100%; height:100%; fill:none; stroke-width:5; }
.agenda-ring .ring-track { stroke:#d5e6e2; }
.agenda-ring .ring-value { stroke:#13706a; stroke-linecap:round; }
.agenda-ring b { font-size:clamp(.88rem,1.6vw,1.14rem); font-variant-numeric:tabular-nums; color:#184f50; }
.agenda-ring b .ico { width:21px; height:21px; }
.agenda-periods { display:grid; grid-template-columns:1fr 1fr 1.25fr; gap:3px; padding:3px; border-radius:15px; background:#dfe8e9; }
.agenda-periods button { min-width:0; min-height:44px; padding:5px 3px; border:0; border-radius:12px; font:inherit; color:#36515b; font-size:.9rem; cursor:pointer; background:none; }
.agenda-periods button[aria-pressed=true] { color:#102e3a; background:#fff; font-weight:750; box-shadow:0 1px 4px #13293623; }
.agenda-items { background:#fff; border:1px solid #d4dfe1; border-radius:18px; }
.agenda-row { width:100%; display:grid; align-items:center; grid-template-columns:23px minmax(0,1fr) auto; column-gap:13px; min-height:68px; padding:10px 17px; color:inherit; text-align:left; background:none; border:0; font:inherit; cursor:pointer; }
.agenda-group-title { margin:0; padding:13px 17px 5px; color:#455862; font-size:.85rem; font-weight:700; }
[data-visit-priority=overdue]>.agenda-group-title { color:#9c3d2d; }
[data-visit-priority]+[data-visit-priority] { border-top:1px solid #d4dfe1; }
.agenda-row:first-of-type { border-radius:17px 17px 0 0; }
.agenda-row:last-child { border-radius:0 0 17px 17px; }
.agenda-row+.agenda-row { border-top:1px solid #e8edef; }
.agenda-mark { width:21px; height:21px; display:grid; place-items:center; border:1.5px solid #b0c2c6; border-radius:50%; }
.agenda-mark .ico { width:13px; height:13px; }
.agenda-row[data-tone=won] .agenda-mark { border-color:#1c6a60; color:white; background:#1c6a60; }
.agenda-row[data-closed=true] .agenda-row-copy strong { color:#52656d; }
.agenda-row-copy { min-width:0; display:grid; gap:2px; }
.agenda-row-copy strong { font-size:1rem; line-height:1.3; font-weight:700; overflow-wrap:anywhere; }
.agenda-row-copy small,.agenda-status { font-size:.78rem; }
.agenda-status { display:flex; align-items:center; gap:5px; color:#455862; }
.agenda-status i { display:block; flex:none; width:7px; height:7px; border-radius:50%; background:#627e8a; }
.agenda-row[data-tone=install] .agenda-status i,.agenda-row[data-tone=won] .agenda-status i {background:#29766d;}
.agenda-row[data-tone=problem] .agenda-status i,.agenda-row[data-tone=correction] .agenda-status i {background:#ac5428;}
.agenda-row[data-tone=review] .agenda-status i {background:#796aa0;}
.agenda-empty { padding:20px; margin:0; color:#49616c; font-size:.94rem; }
.agenda-action.featured-visit { position:sticky; bottom:12px; z-index:3; border:0; margin:0; }
.agenda-action .primary { width:100%; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center; min-height:58px; padding:9px 16px; border:1px solid #304957; border-radius:16px; background:#173443; box-shadow:0 4px 12px #193d4930; color:white; text-align:left; font:inherit; cursor:pointer; }
.agenda-action-icon { display:grid; width:34px; height:34px; place-items:center; border-radius:11px; background:#ffffff16; color:#f1cf9f; }
.agenda-action-icon .ico,.agenda-action .primary>.ico { width:19px; height:19px; }
.agenda-action b,.agenda-action small { display:block; }
.agenda-action b { font-size:.96rem; }
.agenda-action small { color:#e1eceb; font-size:.77rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.field-agenda button:focus-visible { outline:3px solid #257188; outline-offset:1px; }
@media(hover:hover) { .agenda-row:hover,.agenda-history:hover { background:#f2f7f6; } }
@media(prefers-reduced-motion:no-preference) { .agenda-row,.agenda-periods button { transition:background-color .14s ease; } }
@media(max-width:740px) { body:has(.mobile-dock) .agenda-action { bottom:calc(66px + env(safe-area-inset-bottom)); } }
@media(max-width:540px) {
  .field-agenda { gap:10px; }
  .agenda-row { grid-template-columns:20px minmax(0,1fr); column-gap:10px; row-gap:2px; padding:10px 12px; }
  .agenda-mark { grid-row:1 / 3; }
  .agenda-status { grid-column:2; }
  .agenda-row-copy strong { font-size:.93rem; }
  .agenda-history { padding:0 8px; }
}
.agenda-brief,.agenda-schedule { display:contents; }
.project-investors .investor-options { display:grid; gap:4px; max-height:14rem; overflow:auto; overscroll-behavior:contain; }
.project-investors .check { min-height:48px; }
.project-investors .check[hidden],.project-investors [data-no-investors][hidden] { display:none; }
.project-investors .check > span { min-width:0; overflow-wrap:anywhere; }
.project-investors small,.project-access-preview small { display:block; color:var(--muted); font-weight:400; font-size:.82rem; }
.project-access-preview { display:grid; gap:6px; border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; background:#f6f9f9; overflow-wrap:anywhere; }
.project-access-preview :is(h3,p,dl,dt,dd,ul) { margin:0; }
.project-access-preview h3 { font-size:.92rem; }
.project-access-preview dl { display:grid; gap:8px; padding-top:5px; }
.project-access-preview dl > div { padding-inline-start:10px; border-inline-start:3px solid #38706b; }
.project-access-preview dl > :is([data-access-remove],[data-access-unassign]) { border-color:#ab6343; }
.project-access-preview dt { font-size:.83rem; color:var(--muted); }
.project-access-preview ul { padding:0; list-style:none; }
.agenda-row[data-closed=false] .agenda-mark { border:0; color:#3b7273; }
.agenda-row[data-closed=false] .agenda-mark .ico { width:17px; height:17px; }
@media(max-width:1099px) {
  .agenda-header { order:0; }
  .agenda-summary { order:1; }
  .agenda-periods { order:2; }
  .agenda-items { order:3; }
  .agenda-action { order:4; }
}
@media(min-width:1100px) {
  .field-agenda { max-width:76rem; grid-template-columns:minmax(17rem,0.85fr) minmax(24rem,1.6fr); column-gap:clamp(16px,2vw,32px); }
  .agenda-header { grid-column:1/-1; }
  .agenda-brief,.agenda-schedule { display:grid; align-content:start; gap:12px; }
  .agenda-brief { align-self:start; position:sticky; top:16px; }
  .agenda-action.featured-visit { position:static; }
}
[data-statement-save][hidden] { display:none; }
.statement-rows { list-style:none; margin:0; padding:0; }
.statement-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 12px; }
.statement-heading strong { font-size:1.15rem; font-variant-numeric:tabular-nums; }
[data-statement-status="review"] .statement-heading .badge { color:var(--amber); background:var(--amber-soft); }
.statement-source > summary { cursor:pointer; min-height:44px; align-content:center; font-size:.875rem; color:var(--muted); }
.statement-source[open] > summary { color:var(--ink); }
