:root {
  --ink: #13231f;
  --muted: #64736e;
  --paper: #f7f7f2;
  --card: #ffffff;
  --line: #dfe5df;
  --sage: #dce8dd;
  --green: #236047;
  --yellow: #d48a18;
  --red: #a34436;
  --blue: #17677a;
  --shadow: 0 12px 32px rgba(21, 44, 35, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
.shell { width: min(1280px, calc(100% - 40px)); margin: 0 auto 64px; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 0%, #dbe9d8 0, transparent 36%), var(--paper); }
.login-card { width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 20px; }
.login-card h1 { margin: 4px 0 10px; letter-spacing: -.03em; font-size: 28px; }
.login-card p:not(.eyebrow):not(.error) { margin: 0 0 22px; color: var(--muted); }
.login-card label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.login-card .button { width: 100%; margin-top: 5px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 20px; }
.tabs { display: flex; min-width: 0; gap: 4px; padding: 4px; background: #e9ede8; border-radius: 12px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; color: var(--muted); text-decoration: none; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.tabs a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.tab-count { display: inline-grid; min-width: 18px; height: 18px; place-items: center; padding: 0 5px; border-radius: 99px; background: #dbe3dc; color: var(--ink); font-size: 10px; font-weight: 750; }
.sync-status { color: var(--muted); font-size: 13px; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.topbar-link { padding: 7px 10px; color: var(--green); text-decoration: none; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.topbar-link:hover, .topbar-link:focus-visible { background: #e9ede8; }
.text-button { padding: 4px; border: 0; background: none; color: var(--green); font-size: 13px; }
.north-star { display: flex; justify-content: space-between; gap: 32px; padding: 32px; background: linear-gradient(135deg, #173c31, #245843); color: #f7fcf5; border-radius: 20px; box-shadow: var(--shadow); }
.north-star h1 { max-width: 760px; margin: 2px 0 8px; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -.035em; }
.north-star .muted { margin: 0; color: #d6e4d6; }
.north-star-side { min-width: 160px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 3px; text-align: right; color: #cfe0d1; }
.north-star-side strong { color: #fff; font-size: 19px; }
.north-star-side small { font-size: 12px; }
.eyebrow { margin: 0; color: var(--green); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 750; }
.north-star .eyebrow { color: #b4d5b8; }
.view { display: none; padding: 42px 0 0; }
.view.active { display: block; }
.seo-skills-summary { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.seo-skills-stat { display: flex; align-items: baseline; gap: 8px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.seo-skills-stat strong { color: var(--green); font-size: 24px; }
.seo-skills-stat span { color: var(--muted); font-size: 13px; }
.seo-skills-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 10px; }
.seo-skills-filters label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.seo-skills-filters input { min-width: min(420px, 85vw); }
.seo-skills-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; margin-top: 16px; }
.seo-skill-card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.seo-skill-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.seo-skill-head h3 { margin: 4px 0 0; font-size: 18px; }
.seo-skill-status { flex: none; padding: 5px 9px; border-radius: 99px; background: #ecefed; color: #5a6862; font-size: 11px; font-weight: 700; }
.seo-skill-status.pilot { background: #e5f1e7; color: #2e744a; }
.seo-skill-stage { color: var(--muted); font-size: 12px; }
.seo-skills-definition { display: grid; gap: 10px; margin: 14px 0 0; }
.seo-skills-field dt { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.seo-skills-field dd { overflow-wrap: anywhere; margin: 3px 0 0; font-size: 13px; line-height: 1.45; }
.seo-skills-call dd, .seo-skills-location dd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.foundation-stack { display: grid; gap: 20px; }
.foundation-card { padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: 0 2px 8px rgba(21,44,35,.04); }
.foundation-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.foundation-card h3, .foundation-stack > section > h3 { margin: 4px 0 14px; font-size: 21px; }
.foundation-card h4 { margin: 12px 0 7px; font-size: 14px; }
.foundation-code { color: var(--green); font: 700 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .05em; }
.foundation-lead { margin: 4px 0 18px; color: var(--muted); }
.foundation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.foundation-grid section, .foundation-export { padding: 14px; border-radius: 11px; background: #f4f7f3; }
.foundation-list { margin: 5px 0 0; padding-left: 19px; color: #40514a; }
.foundation-list li + li { margin-top: 5px; }
.foundation-claims { display: grid; gap: 8px; margin-top: 14px; }
.foundation-claim { padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.foundation-claim p { margin: 7px 0; }
.foundation-claim small, .foundation-claim time { color: var(--muted); font-size: 11px; }
.foundation-claim-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.foundation-pill, .foundation-material-status { display: inline-flex; width: fit-content; padding: 3px 8px; border-radius: 99px; background: #ecefed; color: #5a6862; font-size: 10px; font-weight: 750; }
.foundation-pill.confirmed, .foundation-pill.owner_confirmed { background: #e5f1e7; color: #2e744a; }
.foundation-pill.hypothesis { background: #e7f1f4; color: #17677a; }
.foundation-pill.conflict { background: #fff2d9; color: #966112; }
.foundation-pill.unknown { background: #f4e9e6; color: #94493c; }
.foundation-material-grid, .foundation-account-grid, .foundation-export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.foundation-material { display: flex; min-height: 180px; flex-direction: column; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.foundation-material h4 { margin: 8px 0 5px; font-size: 16px; }
.foundation-material p { flex: 1; margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.foundation-material small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.foundation-material > .button { align-self: flex-start; margin-top: 13px; }
.material-controls, .knowledge-controls { display: flex; flex-wrap: wrap; gap: 10px; padding: 13px; margin: 12px 0 16px; border-radius: 12px; background: #e9efea; }
.material-controls select { min-width: 180px; }
.knowledge-controls label { display: flex; flex: 1 1 190px; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.knowledge-controls label:first-child { flex: 2 1 300px; }
.knowledge-cards { display: grid; gap: 10px; }
.knowledge-result-line { margin: 0; color: var(--muted); font-size: 12px; }
.knowledge-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.knowledge-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.knowledge-card-section { color: var(--green); font-size: 12px; font-weight: 750; }
.knowledge-card p { margin: 11px 0; }
.knowledge-card small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.knowledge-source-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.knowledge-source-actions .button { padding: 6px 9px; font-size: 11px; }
.knowledge-original { margin-top: 24px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.knowledge-original > summary { cursor: pointer; font-weight: 700; }
.knowledge-original .knowledge-layout { margin-top: 17px; }
.material-preview { margin-top: 13px; width: 100%; }
.material-preview pre { max-height: 480px; padding: 14px; overflow: auto; white-space: pre-wrap; word-break: break-word; border-radius: 8px; background: #f4f7f3; font-size: 12px; }
.foundation-export h4 { margin-top: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
@media (max-width: 820px) { .foundation-grid, .foundation-material-grid, .foundation-account-grid, .foundation-export-grid { grid-template-columns: 1fr; } .foundation-claim-head { align-items: flex-start; flex-direction: column; gap: 4px; } }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 22px; }
.section-heading h2 { margin: 3px 0; letter-spacing: -.025em; font-size: 28px; }
.section-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.section-actions, .strategy-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.button { border: 1px solid transparent; border-radius: 9px; padding: 9px 14px; font-weight: 650; }
.button.primary { background: var(--ink); color: #fff; }
.button.primary:hover { background: #28533f; }
.button.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
a.button { display: inline-flex; align-items: center; text-decoration: none; }
.axes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.axis { min-height: 225px; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); text-align: left; box-shadow: 0 2px 6px rgba(21, 44, 35, .03); transition: transform .15s, box-shadow .15s; }
.axis:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.axis .axis-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.axis h3 { margin: 16px 0 8px; font-size: 19px; line-height: 1.2; }
.axis p { margin: 0; color: var(--muted); font-size: 14px; }
.axis .axis-count { display: block; margin-top: 18px; color: var(--ink); font-size: 13px; font-weight: 650; }
.health { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 100px; font-size: 12px; font-weight: 650; }
.health::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.health.attention { background: #fff2d9; color: #966112; }
.health.stable { background: #e5f1e7; color: #2e744a; }
.health.unknown { background: #ecefed; color: #65736d; }
.map-footnote { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--yellow); color: #5b6963; background: #fffaf0; font-size: 13px; }
.map-portfolio { margin-top: 42px; scroll-margin-top: 20px; }
.portfolio-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.stat-filter { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; }
.stat-filter.active { outline: 2px solid var(--green); border-color: var(--green); }
.stat-filter b { display: block; margin-bottom: 2px; font-size: 24px; line-height: 1; }
.stat-filter span { color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 14px; background: #ebefea; border-radius: 13px; }
.filters label, .form-grid label { display: flex; flex: 1 1 145px; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.filters .search-control { flex: 2 1 260px; }
input, textarea, select { min-width: 0; padding: 8px 9px; border: 1px solid #cdd6cf; border-radius: 7px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
.checkbox { flex-direction: row !important; align-items: center; padding: 8px 0; color: var(--ink) !important; }
.checkbox input { width: 16px; height: 16px; }
.result-line { margin: 16px 0 10px; color: var(--muted); font-size: 13px; }
.portfolio-list { display: grid; gap: 9px; }
.portfolio-view-switch { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; }
.portfolio-view-switch .button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.portfolio-goal-group { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: #f1f5ef; }
.portfolio-goal-group > .eyebrow { margin-bottom: 9px; }
.portfolio-goal-group > .item { width: 100%; border-left: 4px solid var(--green); }
.portfolio-group-label { margin: 17px 0 9px; font-size: 15px; }
.portfolio-children { display: grid; gap: 8px; min-width: 0; margin-left: 13px; padding-left: 14px; border-left: 2px solid #c9d9cb; }
.portfolio-child-card { width: 100%; }
.portfolio-empty { margin: 2px 0 5px; color: var(--muted); font-size: 13px; }
.portfolio-initiatives { margin-top: 16px; }
.portfolio-initiatives > summary { width: fit-content; margin-bottom: 10px; color: var(--green); font-size: 13px; font-weight: 700; cursor: pointer; }
.portfolio-unlinked { padding: 16px 19px; border: 1px dashed #baccc0; border-radius: 14px; background: #f9fbf8; }
.portfolio-unlinked > summary { font-weight: 750; cursor: pointer; }
.portfolio-unlinked-list { display: grid; gap: 8px; margin-top: 14px; }
.portfolio-unlinked-heading { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.portfolio-split { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); align-items: start; gap: 15px; }
.portfolio-goal-nav { display: grid; gap: 7px; min-width: 0; }
.portfolio-goal-option { display: grid; gap: 4px; min-width: 0; width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); text-align: left; }
.portfolio-goal-option[aria-pressed="true"] { border-color: var(--green); background: #eaf2e9; }
.portfolio-goal-option small, .portfolio-goal-option > span:not(.tag) { color: var(--muted); font-size: 11px; }
.portfolio-goal-option strong { overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
.portfolio-goal-option .tag { width: fit-content; }
.portfolio-goal-detail { min-width: 0; }
.portfolio-goal-detail > .portfolio-group-label { margin-top: 0; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; }
.item:hover { border-color: #a5bcb0; box-shadow: 0 4px 16px rgba(21,44,35,.06); }
.item h3 { margin: 6px 0 4px; font-size: 16px; line-height: 1.25; }
.item p { margin: 0; color: var(--muted); font-size: 13px; }
.item .match-snippet { margin-top: 7px; padding-left: 9px; border-left: 2px solid #d3a13e; color: #685128; }
.item-progress { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 12px; font-weight: 700; }
mark { padding: 0 2px; border-radius: 2px; background: #ffe29a; color: inherit; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; padding: 3px 7px; border: 1px solid var(--line); border-radius: 99px; color: #596a62; background: #fafcf9; font-size: 11px; font-weight: 650; }
.tag.focus { color: #8a4d00; background: #fff2d9; border-color: #f2d49d; }
.item-arrow { color: var(--green); font-size: 22px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric, .source { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.metric h3, .source h3 { margin: 8px 0 4px; font-size: 16px; }
.metric-value { font-size: 24px; font-weight: 750; }
.metric p, .source p { margin: 4px 0; color: var(--muted); font-size: 13px; }
.subheading { margin: 35px 0 11px; font-size: 20px; }
.sources { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.revenue-health { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.revenue-funnel { display: grid; gap: 16px; margin: 0 0 24px; padding: 20px; border: 1px solid #cfddd1; border-radius: 14px; background: #f8fbf8; }
.revenue-funnel h4 { margin: 0 0 9px; font-size: 16px; }
.funnel-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 13px; border-radius: 11px; background: #edf2ed; }
.funnel-toolbar label { display: flex; min-width: 145px; flex: 1 1 145px; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.funnel-toolbar button { flex: 0 0 auto; }
.funnel-maturity { display: flex; flex-wrap: wrap; gap: 8px; }
.funnel-maturity .active { background: var(--ink); color: #fff; border-color: var(--ink); }
.funnel-stats { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; }
.funnel-stat { min-width: 116px; }
.funnel-stat small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.35; }
.funnel-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
.funnel-table { min-width: 660px; }
.funnel-losses { display: grid; gap: 8px; }
.funnel-loss { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px; align-items: baseline; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; }
.funnel-loss b { font-size: 18px; }
.funnel-loss span { color: var(--muted); font-size: 12px; }
.revenue-negotiations { display: grid; gap: 12px; margin: 0 0 18px; padding: 18px; border: 1px solid #cfddd1; border-radius: 14px; background: #f6faf6; }
.revenue-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.revenue-section-heading h3 { margin: 4px 0; font-size: 19px; }
.revenue-section-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.negotiation-list { grid-template-columns: 1fr; }
.source-badge { padding: 6px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: #fff; font-size: 12px; }
.source-badge.fresh { color: #2e744a; background: #e5f1e7; border-color: #cce1d1; }
.source-badge.aging { color: #966112; background: #fff2d9; border-color: #f2d49d; }
.source-badge.stale { color: var(--red); background: #fff0ed; border-color: #e9c0b8; }
.revenue-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.revenue-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.revenue-toolbar label { display: flex; min-width: 150px; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.revenue-list { display: grid; min-width: 0; gap: 11px; }
.revenue-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 13px; background: #fff; box-shadow: 0 2px 6px rgba(21,44,35,.03); overflow-wrap: anywhere; }
.revenue-card.priority-p0 { border-left-color: var(--red); }
.revenue-card.priority-p1 { border-left-color: var(--yellow); }
.revenue-card.priority-p2 { border-left-color: var(--blue); }
.revenue-card.priority-p3 { border-left-color: #829088; }
.revenue-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.revenue-card-head > * { min-width: 0; }
.revenue-card h3 { margin: 7px 0 0; font-size: 18px; }
.negotiation-context-card { border-left-color: var(--green); }
.negotiation-context { margin-top: 16px; }
.context-event-list { display: grid; gap: 10px; margin-top: 9px; }
.context-event { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-muted); }
.context-event p { margin: 0; }
.context-event-meta, .context-review-note { color: var(--muted); font-size: 13px; }
.context-event-meta { margin-bottom: 5px !important; font-weight: 700; }
.incoming-card { display: grid; gap: 14px; }
.incoming-quote { margin: 0; padding: 14px 16px; border-left: 3px solid var(--green); background: #f4f8f5; border-radius: 8px; font-size: 16px; line-height: 1.5; }
.coach-need p, .coach-draft p, .coach-questions ul { margin: 6px 0 0; }
.coach-draft { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf7; white-space: pre-line; }
.coach-owner-context { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 9px; }
.coach-owner-context label { grid-column: 1 / -1; color: var(--muted); font-size: 12px; font-weight: 700; }
.coach-owner-context textarea { width: 100%; min-height: 76px; resize: vertical; }
.coach-actions, .coach-close { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-line, .cta-line { margin: 0; color: var(--muted); }
.tag.priority.p0 { color: #8f3025; background: #fff0ed; border-color: #e9c0b8; }
.tag.priority.p1 { color: #8a4d00; background: #fff2d9; border-color: #f2d49d; }
.revenue-facts { margin: 13px 0; color: var(--muted); }
.revenue-facts p { margin: 4px 0; }
.due-line { font-size: 13px; font-weight: 650; color: var(--ink); }
.signal-line { color: #8a4d00; font-size: 13px; }
.next-action { padding: 12px 14px; border-radius: 10px; background: #f0f5f0; }
.next-action p { margin: 4px 0 0; color: var(--ink); font-weight: 650; }
.gaps { margin-top: 10px; color: var(--muted); font-size: 13px; }
.gaps summary { cursor: pointer; }
.gaps ul { margin-bottom: 0; }
.messenger-protocol { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--blue); background: #edf7f8; color: #435d60; font-size: 13px; }
.empty-state { padding: 28px; border: 1px dashed #b9c6be; border-radius: 12px; color: var(--muted); text-align: center; }
.knowledge-meta { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 18px; color:var(--muted); font-size:12px; }
.knowledge-meta > * { padding:5px 8px; border:1px solid var(--line); border-radius:999px; background:#fff; }
.knowledge-badge { font-weight:700; }
.knowledge-badge.ok { color:#1f6c43; background:#e5f1e7; border-color:#cce1d1; }
.knowledge-badge.stale { color:#8a4d00; background:#fff2d9; border-color:#f2d49d; }
.knowledge-badge.unavailable { color:var(--red); background:#fff0ed; border-color:#e9c0b8; }
.knowledge-layout { display:grid; grid-template-columns:minmax(190px,240px) minmax(0,820px); gap:28px; align-items:start; }
.knowledge-sidebar { position:sticky; top:18px; padding:16px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.knowledge-toc { display:grid; gap:6px; margin-top:10px; }
.knowledge-toc a { color:var(--muted); text-decoration:none; font-size:13px; }
.knowledge-toc a:hover { color:var(--green); }
.knowledge-document { padding:clamp(22px,4vw,44px); border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:0 2px 8px rgba(21,44,35,.04); overflow-wrap:anywhere; }
.knowledge-document h1 { margin:0 0 24px; font-size:clamp(28px,4vw,40px); line-height:1.12; }
.knowledge-document h2 { margin:40px 0 14px; padding-top:8px; border-top:1px solid var(--line); font-size:24px; scroll-margin-top:20px; }
.knowledge-document h3 { margin:25px 0 10px; font-size:18px; }
.knowledge-document p, .knowledge-document li { color:#33443d; line-height:1.68; }
.knowledge-document ul, .knowledge-document ol { padding-left:22px; }
.knowledge-document blockquote { margin:18px 0; padding:13px 16px; border-left:3px solid var(--green); border-radius:0 8px 8px 0; background:#f1f6f2; color:#3f554b; }
.knowledge-document code { padding:2px 5px; border-radius:5px; background:#eef2ee; color:#395146; }
.knowledge-document a { color:var(--green); }
.knowledge-table-wrap { max-width:100%; overflow:auto; margin:18px 0; }
.knowledge-table { width:100%; border-collapse:collapse; font-size:13px; }
.knowledge-table th, .knowledge-table td { min-width:120px; padding:10px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.knowledge-table th { color:var(--ink); background:#f1f5f1; }
.source details { margin-top: 9px; color: var(--muted); font-size: 13px; }
.source summary { color: var(--green); cursor: pointer; }
.metrics-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #ebefea; }
.metrics-toolbar label, .metrics-section-head label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.metrics-toolbar .result-line { margin: 0 0 8px auto; }
.metrics-summary { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; margin-bottom: 30px; }
.metric-kpi { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.metric-kpi strong { display: block; margin: 5px 0 2px; font-size: 23px; line-height: 1.1; overflow-wrap: anywhere; }
.metric-kpi small { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.metrics-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 28px 0 10px; }
.metrics-section-head h3 { margin: 2px 0 0; font-size: 20px; }
.table-scroll { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow-x: auto; }
.metrics-table { width: 100%; min-width: 920px; border-collapse: collapse; font-size: 13px; }
.metrics-table th, .metrics-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.metrics-table th:first-child, .metrics-table td:first-child { text-align: left; }
.metrics-table th { position: sticky; top: 0; background: #f1f4f0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.metrics-table tr:last-child td { border-bottom: 0; }
.metrics-table tr.partial-day { background: #fffaf0; }
.metrics-table td strong, .metrics-table td small { display: block; }
.metrics-table td small { margin-top: 3px; color: var(--muted); white-space: nowrap; }
.number-link { padding: 0; border: 0; background: none; color: var(--green); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.cohort-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cohort-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.cohort-card strong { display: block; margin: 6px 0; font-size: 20px; }
.cohort-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.cohort-card.audit-funnel { background: #eef5ef; border-color: #cadccc; }
.reply-review-list, .audit-cost-list { display: grid; gap: 9px; }
.reply-review-card, .audit-cost-card { padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow-wrap: anywhere; }
.review-tabs, .reply-review-actions, .reply-review-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.review-tabs { margin: 0 0 10px; }
.review-tabs .active { background: var(--green); border-color: var(--green); color: #fff; }
.reply-review-toolbar { margin-bottom: 10px; }
.reply-review-actions { margin-top: 10px; }
.reply-review-actions select, .reply-review-comment { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); padding: 7px 9px; font: inherit; }
.reply-review-comment { width: 100%; min-height: 58px; margin-top: 9px; resize: vertical; }
.reply-review-pagination { justify-content: flex-end; margin: 12px 0 24px; }
.reply-review-head, .audit-cost-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.reply-review-card h4, .audit-cost-card h4 { margin: 3px 0 7px; font-size: 17px; }
.reply-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.reply-review-card details { margin: 8px 0; padding: 10px 12px; border-radius: 8px; background: #f5f7f4; }
.reply-review-card summary { cursor: pointer; font-weight: 650; }
.reply-full-text { margin-bottom: 0; white-space: pre-wrap; color: var(--muted); }
.reply-review-card > small, .audit-cost-card > small { color: var(--muted); }
.audit-cost-card p { margin: 6px 0; color: var(--muted); }
.audit-cost-card ul { margin: 7px 0; padding-left: 20px; color: var(--muted); }
.audit-cost-head strong.actual { color: var(--green); }
.audit-cost-head strong.partial { color: var(--yellow); }
.audit-cost-head strong.unknown { color: var(--muted); }
.metrics-sources { margin-top: 28px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.metrics-sources summary { color: var(--green); cursor: pointer; font-weight: 750; }
.metrics-sources ul { columns: 2; color: var(--muted); }
dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100vh - 36px); padding: 0; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.28); }
dialog::backdrop { background: rgba(15, 34, 27, .45); backdrop-filter: blur(2px); }
dialog form { padding: 22px; overflow: auto; max-height: calc(100vh - 36px); }
.dialog-top { display: flex; justify-content: space-between; gap: 20px; }
.dialog-top h2 { margin: 3px 0 14px; line-height: 1.2; }
.icon-button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #edf1ed; color: var(--ink); font-size: 22px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.contract { margin-top: 17px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.contract summary { cursor: pointer; color: var(--green); font-weight: 700; }
.contract .form-grid { margin-top: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 19px; }
.error { min-height: 1.2em; margin: 0 0 8px; color: var(--red); font-size: 13px; }

.button.small { padding: 6px 10px; font-size: 12px; }
.editor-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.editor-section-head h3 { margin: 2px 0 0; font-size: 18px; }
.checklist-editor, .relations-editor { margin-top: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; }
.checklist-list { display: grid; gap: 7px; }
.checklist-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.checklist-row[draggable="true"] { cursor: grab; }
.checklist-row.dragging { opacity: .4; cursor: grabbing; }
.checklist-row.done { opacity: .68; }
.checklist-row.done input[type="text"] { text-decoration: line-through; }
.checklist-row input[type="checkbox"] { width: 18px; height: 18px; }
.step-actions { display: flex; gap: 3px; }
.step-action { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #f7f9f6; color: var(--muted); }
.step-action.danger { color: var(--red); }
.checklist-empty { padding: 14px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); text-align: center; font-size: 13px; }
.relation-list { display: grid; gap: 7px; }
.relation-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.relation-row.proposed { border-style: dashed; border-color: #d8ad52; }
.relation-row.rejected { opacity: .55; }
.relation-row p { margin: 0; font-size: 13px; }
.relation-row small { color: var(--muted); }
.relation-buttons { display: flex; align-items: center; gap: 4px; }
.relation-add { display: grid; grid-template-columns: minmax(0,2fr) minmax(130px,1fr) auto; align-items: end; gap: 9px; margin-top: 10px; }
.relation-add label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }

.strategy-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 11px; margin-bottom: 13px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.strategy-toolbar label:not(.checkbox) { display: flex; min-width: 180px; flex: 1 1 180px; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.strategy-toolbar .search-control { flex: 2 1 280px !important; }
.strategy-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; }
.strategy-summary .tag { background: #fff; }
.strategy-viewport { position: relative; min-height: 650px; max-height: 74vh; border: 1px solid var(--line); border-radius: 16px; background: #f1f3ef; overflow: auto; overscroll-behavior: contain; outline: none; }
.strategy-viewport:focus-visible { box-shadow: 0 0 0 3px rgba(35,96,71,.18); }
.strategy-board { position: relative; min-width: 1460px; min-height: 760px; padding: 28px; transform-origin: 0 0; }
.strategy-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.strategy-link { fill: none; stroke: #75847d; stroke-width: 2; marker-end: url(#strategy-arrow); }
.strategy-link.proposed { stroke-dasharray: 8 6; stroke: #b6872b; }
.strategy-link.high { stroke: #bb4a40; stroke-width: 4; }
.strategy-link.medium { stroke: #d39a24; stroke-width: 3; }
.strategy-link.low { stroke: #5f9b5d; stroke-width: 1.5; }
.strategy-link.context { stroke: #9da69f; stroke-dasharray: 3 5; }
.strategy-columns { position: relative; z-index: 1; display: grid; grid-template-columns: 270px 270px 330px 330px; align-items: start; gap: 68px; }
.strategy-column { display: grid; align-content: start; gap: 10px; }
.strategy-column-head { position: sticky; top: 0; z-index: 3; padding: 9px 12px; border-radius: 9px; background: rgba(241,243,239,.94); backdrop-filter: blur(4px); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 800; }
.strategy-node { position: relative; width: 100%; padding: 13px; border: 1px solid rgba(31,48,41,.18); border-radius: 11px; color: var(--ink); text-align: left; box-shadow: 0 3px 9px rgba(21,44,35,.06); }
.strategy-node:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(21,44,35,.12); }
.strategy-node.role-goal { background: #d9e9a0; }
.strategy-node.role-subject { background: #f4d88a; }
.strategy-node.role-hypothesis { background: #f7eaa2; }
.strategy-node.role-task { background: #c9def4; }
.strategy-node.role-blocker { background: #f1b7a9; }
.strategy-node.role-note { background: #ecefeb; }
.strategy-node.focused { outline: 3px solid #b66b18; }
.strategy-node.search-dim { opacity: .24; }
.strategy-node.search-hit { outline: 3px solid #d09a27; }
.strategy-node.selected { outline: 3px solid var(--green); }
.strategy-node .node-id { display: block; margin-bottom: 5px; color: rgba(19,35,31,.64); font-size: 10px; font-weight: 800; }
.strategy-node .node-title { display: block; font-size: 13px; font-weight: 750; line-height: 1.3; }
.strategy-node .node-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.strategy-node .node-meta span { padding: 2px 5px; border-radius: 99px; background: rgba(255,255,255,.55); font-size: 9px; }
.strategy-node-step { margin-left: 20px; padding: 9px 11px; background: #dceafb; font-size: 12px; }
.strategy-node-step.done { opacity: .55; text-decoration: line-through; }
.strategy-quality { margin-top: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.strategy-quality summary { color: var(--green); cursor: pointer; font-weight: 750; }
.strategy-quality ul { margin: 10px 0 0; padding-left: 19px; color: var(--muted); font-size: 13px; }
.method-note { margin: 12px 2px 0; color: var(--muted); font-size: 12px; }
.strategy-year-tabs { display: none; gap: 8px; margin: 0 0 12px; }
.strategy-board-viewport { position: relative; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: #f1f4f0; }
.strategy-board-grid { position: relative; min-width: 1040px; padding: 16px; }
.strategy-board-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.strategy-board-link { fill: none; stroke: #236047; stroke-width: 2.5; marker-end: url(#strategy-board-arrow); opacity: .8; }
.strategy-board-link.supports { stroke: #b6872b; stroke-dasharray: 7 6; }
.strategy-board-link.dim { opacity: .12; }
.strategy-board-content { position: relative; z-index: 1; display: grid; grid-template-columns: 150px repeat(2, minmax(400px, 1fr)); gap: 10px; align-items: stretch; }
.strategy-projects { position:relative; z-index:1; display:grid; gap:18px; }
.strategy-portfolio-intro { padding:20px; border:1px solid #cfe0d2; border-radius:14px; background:linear-gradient(135deg,#eff8f1,#fbfcfa); }
.strategy-portfolio-intro h3 { margin:3px 0 7px; font-size:25px; }
.strategy-portfolio-intro p { margin:0; max-width:850px; }
.strategy-personal-reminders { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin-top:14px; }
.strategy-personal-reminders .eyebrow { width:100%; }
.strategy-project { padding:16px; border:1px solid var(--line); border-radius:15px; background:#f7f9f6; }
.strategy-project-head { display:flex; justify-content:space-between; align-items:baseline; gap:18px; margin:0 0 12px; }
.strategy-project-head h3 { margin:0; font-size:24px; }
.strategy-project-head p { margin:0; text-align:right; }
.strategy-project-goals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.strategy-with-2028 .strategy-project-goals { grid-template-columns:repeat(3,minmax(0,1fr)); }
.strategy-project-goal { padding:10px 12px; border-radius:10px; background:#fff; border:1px solid var(--line); }
.strategy-project-goal strong { display:block; margin-top:3px; font-size:13px; line-height:1.35; }
.strategy-project-grid { display:grid; grid-template-columns:150px repeat(2,minmax(0,1fr)); gap:10px; align-items:stretch; overflow:auto; }
.strategy-with-2028 .strategy-project-grid { grid-template-columns:150px repeat(3,minmax(260px,1fr)); }
.seo-skills-list { overflow-x:auto; }
.seo-skills-table { width:100%; border-collapse:collapse; background:#fff; }
.seo-skills-table th, .seo-skills-table td { padding:11px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; font-size:13px; }
.seo-skills-table thead th { color:var(--muted); white-space:nowrap; }
.seo-skills-table tbody th { min-width:190px; }
.seo-skills-table tbody th small { display:block; color:var(--muted); font-weight:400; margin-top:4px; }
.seo-skills-table .seo-skills-group th { background:#e9efea; color:var(--green); font-size:14px; }
.seo-skills-table .seo-skills-call { white-space:nowrap; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.knowledge-departments { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0 22px; }
.knowledge-department { padding:16px; border:1px solid var(--line); border-radius:14px; background:#f7f9f6; }
.knowledge-department h3 { margin:0 0 7px; }
.knowledge-department p { color:var(--muted); font-size:13px; margin:0 0 12px; }
.knowledge-directory { display:grid; gap:8px; }
.knowledge-directory a, .knowledge-directory span { padding:10px 11px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); font-weight:700; text-decoration:none; }
.knowledge-directory small { display:block; margin-top:3px; color:var(--muted); font-weight:400; line-height:1.35; }
.knowledge-materials { display:grid; gap:7px; margin:12px 0 24px; }
.knowledge-skill-index { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0 24px; }
.knowledge-skill-group { padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.knowledge-skill-group summary { color:var(--green); font-weight:750; cursor:pointer; }
.knowledge-skill-group ul { margin:9px 0 0; padding-left:18px; font-size:13px; }
.knowledge-skill-group li + li { margin-top:6px; }
.knowledge-material-row { display:grid; grid-template-columns:minmax(180px,1fr) 190px 210px; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:#fff; align-items:center; }
.knowledge-material-row small { color:var(--muted); }
@media (max-width:850px) { .knowledge-departments, .knowledge-skill-index { grid-template-columns:1fr; } .knowledge-material-row { grid-template-columns:1fr; gap:4px; } }
.strategy-board-year, .strategy-board-lane-label, .strategy-board-cell { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.strategy-board-year { min-height: 112px; padding: 15px; }
.strategy-board-year h3 { margin: 0 0 6px; font-size: 24px; }
.strategy-board-year p { margin: 0; color: var(--muted); font-size: 13px; }
.strategy-board-year strong { display: block; margin: 5px 0; font-size: 18px; }
.strategy-board-lane-label { display: flex; align-items: center; padding: 16px; background: #e6ede7; color: var(--green); font-weight: 800; }
.strategy-board-cell { min-height: 170px; padding: 10px; background: #fbfcfa; }
.strategy-board-cell.drag-over { outline: 3px solid #d39a24; background: #fff8e8; }
.strategy-cell-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.strategy-cell-head span { color: var(--muted); font-size: 12px; font-weight: 700; }
.strategy-add { padding: 4px 7px; border: 0; border-radius: 7px; background: #e6efe9; color: var(--green); font-size: 12px; font-weight: 750; }
.strategy-board-cards { display: grid; gap: 7px; }
.strategy-card { width: 100%; padding: 18px 14px; border: 1px solid #d9e1db; border-radius: 9px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 2px 7px rgba(21,44,35,.05); cursor: grab; }
.strategy-card:active { cursor: grabbing; }
.strategy-card h4 { margin: 0; font-size: 18px; line-height: 1.3; }
.strategy-board-inspector { min-height: 0; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); font-size: 13px; }
.strategy-board-inspector h3 { margin: 0 0 5px; color: var(--ink); font-size: 16px; }
.strategy-board-inspector p { margin: 5px 0; }
.strategy-board-inspector .strategy-inspector-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.strategy-placement-controls { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; margin: 9px 0; }
.strategy-placement-controls label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.strategy-place-items { display: grid; gap: 7px; max-height: 44vh; margin-top: 12px; overflow: auto; }
.strategy-place-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.strategy-place-item strong, .strategy-place-item small { display: block; }
.strategy-place-item small { margin-top: 3px; color: var(--muted); }
.strategy-goals-fields { display: grid; gap: 14px; }
.strategy-goal-form { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.strategy-goal-form h3 { margin: 0 0 9px; }
.strategy-goal-form label { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.undo-toast { position: fixed; right: 22px; bottom: 22px; z-index: 1000; display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: 0 14px 36px rgba(0,0,0,.22); opacity: 0; transform: translateY(16px); pointer-events: none; transition: .18s ease; }
.undo-toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.undo-toast button { padding: 0; border: 0; background: none; color: #cde7d2; font-weight: 750; }

@media (max-width: 1100px) { .topbar { flex-wrap: wrap; } .tabs { order: 3; width: 100%; } }
@media (max-width: 1100px) { .metrics-summary { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .axes { grid-template-columns: repeat(2, 1fr); } .portfolio-stats, .revenue-stats { grid-template-columns: repeat(3, 1fr); } .metrics, .metrics-summary { grid-template-columns: repeat(2, 1fr); } .cohort-grid { grid-template-columns: repeat(2, 1fr); } .relation-add { grid-template-columns: 1fr 1fr; } .relation-add .button { grid-column: 1 / -1; } .knowledge-layout { grid-template-columns:1fr; } .knowledge-sidebar { position:static; } }
@media (max-width: 600px) { .shell { width: min(100% - 24px, 1280px); } .topbar { gap: 12px; } .tabs { order: 3; width: 100%; overflow-x: auto; } .north-star, .section-heading, .revenue-card-head, .reply-review-head, .audit-cost-head, .metrics-section-head, .strategy-project-head { flex-direction: column; align-items: flex-start; } .section-actions, .strategy-actions { width: 100%; justify-content: flex-start; } .north-star-side { align-items: flex-start; text-align: left; } .axes, .portfolio-stats, .revenue-stats, .metrics, .metrics-summary, .cohort-grid, .sources, .form-grid, .strategy-project-goals { grid-template-columns: 1fr; } .form-grid .full { grid-column: auto; } .item { grid-template-columns: minmax(0, 1fr) auto; } .reply-badges { justify-content: flex-start; } .metrics-toolbar .result-line { width: 100%; margin: 0; } .metrics-sources ul { columns: 1; } .relation-add { grid-template-columns: 1fr; } .relation-add .button { grid-column: auto; } .checklist-row { grid-template-columns: auto minmax(0,1fr); } .step-actions { grid-column: 2; } .strategy-viewport { min-height: 570px; } .strategy-year-tabs { display:flex; } .strategy-board-grid { min-width:0; padding:0; } .strategy-project-grid { grid-template-columns:130px repeat(2,minmax(220px,1fr)); } .strategy-with-2028 .strategy-project-grid { grid-template-columns:130px repeat(3,minmax(220px,1fr)); } .strategy-board-cell { min-height:120px; } .strategy-placement-controls { grid-template-columns:1fr; } }

/* System health uses the existing metrics surface. */
#system-health-panel[hidden], #metrics-commercial-panel[hidden] { display:none !important; }
.sh-overview { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:16px 0; }
.sh-badge { display:inline-block; padding:4px 9px; border-radius:12px; font-size:12px; font-weight:650; white-space:nowrap; }
.sh-green { color:#11633b; background:#ddf6e9; } .sh-yellow {color:#805000;background:#fff1cf;}
.sh-red { color:#9b2424;background:#ffe2e2; } .sh-gray,.sh-na { color:#535e6b;background:#edf0f4; }
.sh-summary { display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:12px;margin:16px 0; }
.sh-summary-card,.sh-stage { padding:16px;border:1px solid #dbe2e9;border-radius:12px;background:var(--surface,#fff);min-width:0; }
.sh-summary-card strong {font-size:22px;} .sh-summary-card p {font-size:13px;}
.sh-stage {margin:12px 0;} .sh-stage > summary {cursor:pointer;display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.sh-table-wrap {overflow:auto;max-width:100%;} .sh-table {width:100%;border-collapse:collapse;font-size:13px;}
.sh-table td,.sh-table th {text-align:left;vertical-align:top;padding:10px;border-bottom:1px solid #e5e9ee;overflow-wrap:anywhere;}
.sh-table td p {margin:0 0 5px;} .sh-table td:first-child {min-width:150px;} .sh-table td:last-child {min-width:220px;}
.sh-notice {padding:10px;background:#fff4d8;border-radius:8px;} .sh-action {font-weight:600;}
.sh-trend {font-size:12px;overflow-wrap:anywhere;} .sh-costs {margin-top:24px;} #system-health-content {min-width:0;max-width:100%;}
.metrics-funnel,.health-funnel {margin:20px 0 28px;min-width:0;}
.funnel-head {display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin:0 0 18px;}
.funnel-head h3 {margin:3px 0 6px;}.funnel-head p {margin:0;max-width:760px;}
.funnel-meta {display:flex;flex-direction:column;align-items:flex-end;gap:4px;text-align:right;font-size:12px;color:var(--muted);white-space:nowrap;}
.funnel-meta strong {font-size:14px;color:var(--text);}
.funnel-chain {display:flex;flex-direction:column;align-items:center;gap:7px;margin:0 auto;max-width:1080px;}
.funnel-group-label {width:100%;margin:11px 0 1px;text-align:center;font-size:11px;font-weight:750;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);}
.funnel-step {position:relative;width:calc(100% - (var(--step-index) * 1.6%));min-width:66%;padding:14px 6%;border:1px solid #d7e0dc;background:#f5f7f6;clip-path:polygon(1.5% 0,98.5% 0,96.7% 100%,3.3% 100%);}
.funnel-step.sh-neutral {background:linear-gradient(135deg,#eef5f0,#f7faf8);border-color:#cbd9d1;}
.funnel-step.sh-green {background:#e4f6ea;border-color:#b5dec4;}.funnel-step.sh-yellow {background:#fff3d5;border-color:#ecd59c;}.funnel-step.sh-red {background:#ffe5e5;border-color:#ecc1c1;}.funnel-step.sh-gray,.funnel-step.sh-na {background:#eef1f3;border-color:#d8dee3;}
.funnel-step-top {display:flex;justify-content:space-between;align-items:center;gap:12px;}.funnel-step h4 {margin:2px 0 7px;font-size:16px;}
.funnel-value {display:flex;align-items:baseline;gap:7px;margin:0;}.funnel-value strong {font-size:28px;line-height:1;}.funnel-value span {font-size:12px;color:var(--muted);}
.funnel-step-facts {display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:8px;font-size:12px;color:#52615a;}.funnel-breakdown {margin:7px 0 0;font-size:12px;color:#52615a;}
.funnel-evidence {margin-top:8px;font-size:12px;}.funnel-evidence summary {cursor:pointer;font-weight:650;}.funnel-evidence p {margin:4px 0;}
.funnel-daily {margin-top:16px;padding:13px 16px;border:1px solid #dbe2e9;border-radius:12px;background:var(--surface,#fff);}.funnel-daily > summary {cursor:pointer;font-weight:700;}
.funnel-daily-table {margin-top:12px;min-width:980px;}.funnel-daily-table td small {display:block;color:var(--muted);margin-top:3px;}
.cost-task {margin:9px 0;padding:9px 11px;border:1px solid #e0e6e2;border-radius:8px;background:#f8faf9;}.cost-task summary {cursor:pointer;font-weight:650;}.cost-task p {font-size:12px;margin:7px 0;}
@media(max-width:600px){.sh-summary {grid-template-columns:1fr;} .sh-stage {padding:12px;} .sh-table {font-size:12px;} }
@media(max-width:600px){
  .sh-table,.sh-table tbody,.sh-table tr,.sh-table td {display:block;width:100%;min-width:0 !important;}
  .sh-table thead {display:none;}
  .sh-table td {padding:7px 0;border:0;}
  .sh-table tr {padding:12px 0;border-bottom:1px solid #dbe2e9;}
  .sh-table td::before {content:attr(data-label);display:block;font-size:11px;color:#64736c;margin-bottom:4px;}
  .funnel-head {flex-direction:column;}.funnel-meta {align-items:flex-start;text-align:left;white-space:normal;}.funnel-step {width:100%;min-width:0;clip-path:none;border-radius:10px;padding:13px 14px;}.funnel-chain {gap:9px;}.funnel-group-label {text-align:left;margin-top:14px;}.funnel-value strong {font-size:25px;}
}
@media (max-width: 700px) {
  .portfolio-split { grid-template-columns: 1fr; }
  .portfolio-goal-nav { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
}

/* Methodology workspace: every entity remains visible, including orphan nodes. */
.seo-map-board { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; align-items:start; }
.seo-map-column { min-width:0; background:#edf2ee; padding:14px; border-radius:14px; }
.seo-map-column > h3, .seo-map-column > summary { font-size:16px; margin:0 0 14px; font-weight:750; cursor:pointer; }
.seo-node { width:100%; display:flex; flex-direction:column; gap:8px; text-align:left; margin:0 0 10px; padding:14px; background:white; border:1px solid var(--line); border-radius:10px; color:var(--ink); cursor:pointer; overflow-wrap:anywhere; }
.seo-node p { margin:0; font-size:12px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.seo-node small { color:var(--muted); font-size:10px; }
.seo-node[aria-pressed=true] { outline:3px solid var(--green); }
.seo-badge { font-size:11px; padding:3px 6px; background:#f4f1df; border-radius:5px; align-self:flex-start; }
.seo-detail,.seo-finding { background:white; border:1px solid var(--line); padding:22px; margin:18px 0; border-radius:14px; overflow-wrap:anywhere; }
.seo-detail .button,.seo-finding .button { margin:10px 8px 0 0; }
.seo-edge { padding:7px 0; border-bottom:1px solid var(--line); }
.seo-edge small,.seo-finding a { display:block; margin:5px 0; }
.seo-readable { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.7; max-width:100%; }
.seo-runbook-toc { display:flex; flex-wrap:wrap; gap:10px; padding:18px 0; }
.seo-runbook-toc a { font-size:12px; }
.seo-runbook-text { background:white; padding:24px; border-radius:14px; }
.seo-runbook-text section { scroll-margin-top:20px; }
.seo-table-scroll { overflow:auto; }
.seo-task { padding:14px; border:1px solid var(--line); border-radius:10px; margin:10px 0; background:white; }
.seo-task summary { cursor:pointer; line-height:1.5; }
.seo-task a { display:block; margin:8px 0; }
.seo-idea-form { display:grid; gap:14px; max-width:660px; }
.seo-idea-form label { display:grid; gap:6px; }
.seo-idea-form input,.seo-idea-form textarea,.seo-idea-form select { max-width:100%; width:100%; }
.seo-idea-form input[type=checkbox] { width:24px; height:24px; }
#seo-idea-dialog { width:min(700px,calc(100vw - 32px)); max-height:90vh; overflow:auto; }
#seo-workspace-content { min-width:0; }
#seo-workspace-content input,#seo-workspace-content select { max-width:100%; }
#seo-workspace-tabs { flex-wrap:wrap; }
@media(max-width:1100px){ .seo-map-board { grid-template-columns:1fr; } .seo-map-column { padding:16px; } .seo-detail { padding:16px; } }
