:root {
  --ink: #17211c;
  --muted: #66716b;
  --paper: #f7f8f4;
  --card: #ffffff;
  --line: #dfe4dc;
  --green: #1f6d4f;
  --green-dark: #15533c;
  --green-soft: #e9f4ee;
  --amber: #9b5f13;
  --amber-soft: #fff5dc;
  --red: #a43d37;
  --red-soft: #fff0ef;
  --shadow: 0 18px 50px rgba(28, 45, 36, .09);
  --violet: #6753c5;
  --violet-soft: #eeeafd;
  --blue: #3977a8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 85% -10%, #dfeee5 0, transparent 30rem), var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; }
.topbar { height: 76px; padding: 0 clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(31, 54, 42, .1); background: rgba(247, 248, 244, .86); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; background: var(--green); color: white; border-radius: 12px; font-family: Georgia, serif; font-weight: 700; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.status-badge, .tag { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 700; }
.status-badge { background: #edf0ed; color: var(--muted); }
.status-badge span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-badge.online { color: var(--green); background: var(--green-soft); }
.status-badge.offline { color: var(--red); background: var(--red-soft); }
main { padding: 54px clamp(20px, 5vw, 72px) 72px; max-width: 1560px; margin: 0 auto; }
.hidden { display: none !important; }
.hero, .document-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.hero { min-height: 220px; padding: 22px 0 38px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 6vw, 76px); line-height: .98; letter-spacing: -.04em; max-width: 850px; margin-bottom: 22px; font-weight: 500; }
h2 { font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; letter-spacing: -.025em; margin-bottom: 0; }
h3 { font-size: 17px; margin-bottom: 0; }
.eyebrow { color: var(--green); text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; margin-bottom: 10px; }
.lede { color: var(--muted); font-size: 18px; line-height: 1.65; max-width: 700px; margin-bottom: 0; }
.lede.compact { font-size: 14px; margin-top: 10px; }
.button { border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 750; white-space: nowrap; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--green); box-shadow: 0 8px 22px rgba(31, 109, 79, .18); }
.button.primary:hover { background: var(--green-dark); }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; box-shadow: none; }
.button.secondary { color: var(--ink); background: white; border: 1px solid var(--line); }
.button.danger { color: var(--red); background: white; border: 1px solid #e7c6c3; }
.button.danger:hover { color: white; background: var(--red); border-color: var(--red); }
.principle { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: #edf3ee; border: 1px solid #d6e4da; padding: 20px 22px; border-radius: 18px; margin-bottom: 60px; }
.principle-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #b6cdbd; border-radius: 50%; font-size: 22px; color: var(--green); }
.principle p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: 19px; }
.document-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 18px; }
.document-card { text-align: left; border: 1px solid var(--line); background: var(--card); padding: 0; border-radius: 18px; overflow: hidden; color: inherit; box-shadow: 0 1px 0 rgba(0,0,0,.02); transition: transform .18s, box-shadow .18s, border-color .18s; }
.document-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #bfd0c5; }
.document-cover { height: 130px; padding: 22px; display: flex; justify-content: space-between; background: linear-gradient(135deg, #153e30, #267356); color: white; }
.document-cover .pdf { align-self: flex-end; font-family: Georgia, serif; font-size: 34px; opacity: .92; }
.document-cover .stage { align-self: flex-start; background: rgba(255,255,255,.16); padding: 5px 9px; border-radius: 999px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.document-body { padding: 19px 20px 20px; }
.document-body h3 { font-family: Georgia, serif; font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 16px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.metric strong, .metric span { display: block; }
.metric strong { font-size: 17px; }
.metric span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; margin-top: 2px; }
.empty-card { grid-column: 1 / -1; padding: 54px; text-align: center; border: 1px dashed #bdc8c0; border-radius: 18px; color: var(--muted); }
.pipeline-monitor { margin-bottom: 58px; }
.pipeline-count { padding: 7px 11px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 800; }
.pipeline-job-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.pipeline-job-card { min-width: 0; padding: 20px; border-radius: 16px; color: white; background: #17211c; box-shadow: var(--shadow); }
.pipeline-job-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.pipeline-job-head a { color: white; text-decoration: none; }
.pipeline-job-head a:hover { color: #9cd5b9; }
.pipeline-job-head strong, .pipeline-job-head small { display: block; }
.pipeline-job-head small { margin-top: 5px; color: #9fb0a7; font-size: 11px; }
.pipeline-live { display: inline-flex; align-items: center; gap: 6px; color: #9cd5b9; text-transform: uppercase; letter-spacing: .08em; font-size: 9px; font-weight: 850; white-space: nowrap; }
.pipeline-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(156,213,185,.12); }
.pipeline-job-card .progress { margin: 16px 0 12px; }
.pipeline-log-block summary { cursor: pointer; color: #9fb0a7; font-size: 10px; font-weight: 750; }
.pipeline-log-block .logs { margin-top: 12px; max-height: 210px; }
.document-cover .stage.running { color: #153e30; background: #bde8cf; }
.back-button { display: inline-block; background: none; border: 0; padding: 0; color: var(--green); text-decoration: none; font-weight: 750; margin-bottom: 40px; }
.document-head h1 { font-size: clamp(36px, 5vw, 58px); margin-bottom: 0; text-transform: capitalize; }
.head-actions { display: flex; gap: 10px; }
.job-panel { margin-top: 30px; padding: 22px; background: #17211c; color: white; border-radius: 16px; box-shadow: var(--shadow); }
.job-summary { display: flex; align-items: center; justify-content: space-between; }
.job-panel .eyebrow { color: #82c8a7; }
.spinner { width: 24px; height: 24px; border: 3px solid rgba(255,255,255,.2); border-top-color: #82c8a7; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 4px; margin: 18px 0; background: rgba(255,255,255,.13); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 12%; background: #82c8a7; border-radius: inherit; transition: width .4s; }
.logs { max-height: 180px; overflow: auto; white-space: pre-wrap; font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; color: #c7d7ce; margin: 0; }
.pill-workspace { display: grid; grid-template-columns: 350px minmax(0, 1fr); min-height: 650px; margin-top: 38px; background: white; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 12px 35px rgba(29, 45, 37, .055); }
.pill-sidebar { border-right: 1px solid var(--line); padding: 24px 0; min-width: 0; }
.sidebar-title, .search, .filter-row { margin-left: 20px; margin-right: 20px; }
.sidebar-title h2 { font-size: 24px; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 20px; }
.search input { border: 0; outline: 0; width: 100%; min-width: 0; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
select, .field input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: white; color: var(--ink); }
.pill-list { margin-top: 18px; max-height: 620px; overflow-y: auto; border-top: 1px solid var(--line); }
.pill-row { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: white; padding: 17px 20px; display: grid; grid-template-columns: 1fr auto; gap: 8px; color: inherit; }
.pill-row:hover, .pill-row.active { background: #f1f6f2; }
.pill-row.active { box-shadow: inset 3px 0 var(--green); }
.pill-row strong { display: block; font-size: 14px; line-height: 1.35; margin-bottom: 6px; }
.pill-row small { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 9px; }
.review-dot { width: 8px; height: 8px; border-radius: 50%; background: #c8cec9; margin-top: 5px; }
.review-dot.approved { background: var(--green); }.review-dot.rejected { background: var(--red); }
.pill-open-mark { align-self: center; color: var(--green); font-size: 18px; }
.pill-detail { padding: clamp(28px, 5vw, 64px); min-width: 0; }
.pill-detail.empty-state { display: grid; place-items: center; text-align: center; color: var(--muted); }
.pill-detail.comparison-mode { padding: 28px; overflow: hidden; }
.comparison-intro { margin-bottom: 22px; }
.comparison-intro h2 { font-size: clamp(24px, 3vw, 36px); margin: 4px 0 8px; }
.comparison-intro > p:last-child { color: var(--muted); margin: 0; }
.comparison-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(420px, 1fr); gap: 16px; overflow-x: auto; padding: 2px 2px 16px; align-items: start; }
.comparison-card { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.comparison-card.primary { border-color: #9fc4ad; box-shadow: inset 0 3px var(--green); }
.comparison-card > h1 { font-size: clamp(26px, 3vw, 38px); }
.model-heading { display: flex; flex-direction: column; gap: 3px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.model-heading span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.model-heading strong { color: var(--green); overflow-wrap: anywhere; }
.empty-icon { font-size: 48px; color: #9ab5a4; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.detail-meta .tag { background: #edf3ee; color: var(--green); padding: 6px 9px; }
.pill-detail h1 { font-size: clamp(34px, 4vw, 54px); margin-bottom: 20px; }
.objective { font-size: 18px; line-height: 1.65; color: #425149; border-left: 3px solid #8ab59d; padding-left: 18px; }
.detail-section { margin-top: 34px; }
.detail-section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--green); margin-bottom: 12px; }
.explanation { font-family: Georgia, serif; font-size: 20px; line-height: 1.72; }
.task-box, .evidence-box { background: #f3f6f2; border: 1px solid #e0e7df; border-radius: 14px; padding: 18px; line-height: 1.6; }
.criteria { padding-left: 20px; line-height: 1.75; }
.review-actions { display: flex; gap: 10px; padding-top: 28px; margin-top: 36px; border-top: 1px solid var(--line); }
.review-actions button { flex: 1; }
.button.approve { color: var(--green); background: var(--green-soft); }.button.reject { color: var(--red); background: var(--red-soft); }
dialog { width: min(560px, calc(100% - 28px)); border: 0; border-radius: 20px; padding: 0; box-shadow: 0 30px 90px rgba(19, 36, 27, .25); }
dialog::backdrop { background: rgba(19, 29, 24, .55); backdrop-filter: blur(4px); }
dialog form { padding: 28px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; }
.dialog-head h2 { font-size: 34px; }
.dialog-copy { color: var(--muted); line-height: 1.55; }
.drop-zone { margin-top: 24px; min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; text-align: center; border: 1.5px dashed #aebdb3; background: #f5f8f5; border-radius: 16px; color: var(--muted); }
.drop-zone.dragging { border-color: var(--green); background: var(--green-soft); }
.drop-zone input { display: none; }
.drop-zone strong { color: var(--ink); }.drop-zone span:last-child { font-size: 12px; }
.upload-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 22px; }
.selected-file { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--green-soft); color: var(--green); font-weight: 700; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.field { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }.field input, .field select { display: block; margin-top: 7px; font-size: 15px; }
.model-field { border: 0; padding: 0; margin: 22px 0 0; }
.model-field legend { width: 100%; color: var(--ink); font-size: 13px; }
.model-field legend span { float: right; color: var(--muted); font-weight: 500; }
.model-field > small { display: block; margin-top: 10px; color: var(--muted); font-weight: 400; line-height: 1.45; }
.model-options { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; margin-top: 10px; }
.model-options > p { margin: 0; padding: 14px; border-radius: 10px; background: #f5f7f5; color: var(--muted); }
.model-option { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.model-option:has(input:checked) { border-color: #8fb59e; background: var(--green-soft); }
.model-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.model-option span { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.model-option strong { color: var(--ink); overflow-wrap: anywhere; }
.model-option small { color: var(--muted); font-weight: 400; }
.warning-box { margin-top: 14px; padding: 12px; border-radius: 10px; color: var(--amber); background: var(--amber-soft); font-size: 13px; }
.error-text { color: var(--red); font-size: 13px; min-height: 18px; margin: 12px 0 0; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; padding: 13px 16px; border-radius: 12px; color: white; background: #17211c; box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s; z-index: 50; }
.toast.show { transform: translateY(0); opacity: 1; }

/* Pill recommendations */
.recommendation-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.recommendation-head h1 { max-width: 920px; }
.recommendation-mark { width: 126px; height: 126px; flex: 0 0 auto; display: grid; place-content: center; justify-items: center; border: 1px solid #cfc5f1; border-radius: 32px; color: var(--violet); background: linear-gradient(145deg, #f7f4ff, #e8e1ff); transform: rotate(3deg); box-shadow: 0 18px 40px rgba(73,55,145,.12); }
.recommendation-mark span { font-size: 42px; line-height: 1; }.recommendation-mark small { margin-top: 9px; text-transform: uppercase; letter-spacing: .1em; font-size: 8px; font-weight: 850; }
.recommendation-workspace { display: grid; grid-template-columns: minmax(300px, 370px) minmax(0, 1fr); min-height: 650px; margin-top: 42px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: white; box-shadow: var(--shadow); }
.recommendation-builder { padding: 30px 27px; border-right: 1px solid var(--line); background: #fbfcfa; }
.recommendation-builder h2 { font-size: 27px; }.builder-help { margin: 14px 0 25px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.topic-search-label, .recommendation-limit { display: block; color: #55645c; font-size: 11px; font-weight: 800; }
.topic-composer { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 8px; }
.topic-composer input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; outline: none; color: var(--ink); background: white; }
.topic-composer input:focus { border-color: #9bb9a6; box-shadow: 0 0 0 3px rgba(31,109,79,.08); }
.topic-composer .button { padding: 10px 12px; }
.topic-suggestions { display: grid; max-height: 205px; margin-top: 7px; overflow-y: auto; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 12px 28px rgba(25,40,32,.09); }
.topic-suggestions button { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-bottom: 1px solid #edf0ec; padding: 10px 11px; text-align: left; color: var(--ink); background: white; }
.topic-suggestions button:last-child { border-bottom: 0; }.topic-suggestions button:hover { background: var(--green-soft); }.topic-suggestions span { font-size: 11px; font-weight: 750; }.topic-suggestions small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.selected-topics { display: flex; flex-wrap: wrap; gap: 7px; min-height: 50px; margin-top: 15px; padding: 12px; border: 1px dashed #c9d2cb; border-radius: 12px; background: #f6f8f5; }
.topics-placeholder { align-self: center; margin: 0; color: #89938d; font-size: 10px; }
.selected-topic { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid #c9ddd0; border-radius: 999px; padding: 6px 6px 6px 10px; color: var(--green-dark); background: var(--green-soft); font-size: 10px; font-weight: 750; }
.selected-topic span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.selected-topic button { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--green); background: rgba(31,109,79,.1); line-height: 1; }
.selected-topic .topic-path-trigger { width: auto; padding: 0 7px; border-radius: 999px; font-size: 7px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.related-topic-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.related-topic-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 9px; }.related-topic-heading span, .related-topic-heading strong { display: block; }.related-topic-heading span { color: var(--violet); text-transform: uppercase; letter-spacing: .1em; font-size: 7px; font-weight: 850; }.related-topic-heading strong { margin-top: 3px; font-family: Georgia, serif; font-size: 17px; font-weight: 500; }.related-topic-heading small { color: var(--muted); font-size: 8px; }
.related-topic-suggestions { display: grid; gap: 6px; }.related-topic-suggestions > p { margin: 0; padding: 11px; border-radius: 9px; color: var(--muted); background: #f1f3f0; font-size: 9px; line-height: 1.5; }
.related-topic-suggestions button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 7px; border: 1px solid #ded9ef; border-radius: 10px; padding: 9px 8px 9px 10px; text-align: left; color: var(--ink); background: #faf9ff; }.related-topic-suggestions button:hover { border-color: #aa9bd9; background: #f2effd; }.related-topic-copy { min-width: 0; }.related-topic-copy strong, .related-topic-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.related-topic-copy strong { font-size: 10px; }.related-topic-copy small { margin-top: 3px; color: var(--muted); font-size: 7px; }.related-topic-score { color: #6554a8; font-size: 8px; font-weight: 850; }.related-topic-suggestions i { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--violet); font-style: normal; font-size: 14px; }
.mini-loader { width: 10px; height: 10px; display: inline-block; vertical-align: -1px; border: 2px solid #d9d4e9; border-top-color: var(--violet); border-radius: 50%; animation: spin .7s linear infinite; }.related-topic-error { color: var(--red) !important; background: var(--red-soft) !important; }
.recommendation-limit { margin-top: 24px; }.recommendation-limit select { margin-top: 8px; }
.recommendation-submit { width: 100%; margin-top: 4px; }
.recommendation-results-panel { min-width: 0; padding: 28px; background: #f7f8f5; }
.recommendation-summary { display: flex; gap: 1px; overflow: hidden; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--line); }
.recommendation-summary > div { flex: 1; padding: 13px 16px; background: white; }.recommendation-summary strong, .recommendation-summary span { display: block; }.recommendation-summary strong { font-family: Georgia, serif; font-size: 23px; font-weight: 500; }.recommendation-summary span { margin-top: 3px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 7px; font-weight: 800; }.recommendation-summary .unmatched { background: #fff8ea; }.recommendation-summary .unmatched strong { color: var(--amber); }
.recommendation-results { display: grid; gap: 13px; }.recommendation-results.empty-state { min-height: 520px; place-items: center; text-align: center; color: var(--muted); }.recommendation-results.empty-state h2 { margin-top: 12px; }.recommendation-results.empty-state p { max-width: 390px; margin: 9px auto 0; line-height: 1.6; }
.recommendation-loader { width: 38px; height: 38px; display: inline-block; border: 3px solid #dbe5de; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.unmatched-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 11px 13px; border: 1px solid #ecd6ad; border-radius: 11px; color: var(--amber); background: #fff9ed; font-size: 9px; }.unmatched-topics strong { margin-right: 4px; text-transform: uppercase; letter-spacing: .08em; }.unmatched-topics span { padding: 4px 7px; border-radius: 999px; background: #fff0cd; }
.recommendation-card { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: start; gap: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 16px; background: white; transition: transform .16s, border-color .16s, box-shadow .16s; }
.recommendation-card:hover { transform: translateY(-2px); border-color: #c9bfeb; box-shadow: 0 14px 34px rgba(39,31,77,.07); }
.recommendation-rank { display: grid; justify-items: center; gap: 9px; }.recommendation-rank > span { color: #9aa39e; font-family: ui-monospace, monospace; font-size: 9px; font-weight: 800; }
.score-ring { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--violet) var(--score), #eceaf4 0); position: relative; }.score-ring::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: white; }.score-ring strong { position: relative; z-index: 1; color: #51418e; font-size: 11px; }
.recommendation-card-body { min-width: 0; }.recommendation-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }.recommendation-card-meta span { padding: 4px 7px; border-radius: 999px; color: #5c4aa1; background: var(--violet-soft); text-transform: uppercase; letter-spacing: .06em; font-size: 7px; font-weight: 850; }.recommendation-card h2 { font-size: 25px; }.recommendation-reason { margin: 7px 0 9px; color: var(--green); font-size: 10px; font-weight: 750; }.recommendation-topic-tags { display: flex; flex-wrap: wrap; gap: 5px; }.recommendation-topic-tags .tag { padding: 4px 7px; color: var(--green); background: var(--green-soft); font-size: 8px; }.recommendation-objective { margin: 14px 0 0; color: #4e5d55; font-family: Georgia, serif; font-size: 16px; line-height: 1.55; }.recommendation-task { margin-top: 13px; padding: 11px 13px; border-left: 2px solid #ac9edf; color: var(--muted); background: #f7f5fd; }.recommendation-task strong { color: #6554a8; text-transform: uppercase; letter-spacing: .08em; font-size: 8px; }.recommendation-task p { margin: 4px 0 0; font-size: 10px; line-height: 1.55; }.open-recommended-pill { align-self: center; font-size: 10px; }
.recommendation-actions { display: grid; gap: 7px; align-self: center; }.recommendation-actions .button { white-space: nowrap; font-size: 9px; }
.flow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 30px 0 16px; padding: 0; list-style: none; }
.flow-steps li { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); background: rgba(255,255,255,.7); }
.flow-steps li > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #6554a8; background: var(--violet-soft); font-size: 11px; font-weight: 850; }
.flow-steps strong, .flow-steps small { display: block; }.flow-steps strong { color: var(--ink); font-size: 11px; }.flow-steps small { margin-top: 3px; font-size: 9px; }
.flow-steps li.active { border-color: #c9bfeb; background: #faf9ff; }.flow-steps li.active > span { color: white; background: var(--violet); }
.learning-path-panel { margin-bottom: 16px; padding: 20px; border: 1px solid #c9bfeb; border-radius: 16px; background: linear-gradient(145deg, #fff 0%, #f7f5fd 100%); box-shadow: 0 12px 30px rgba(62,45,122,.06); }
.learning-path-panel.loading { min-height: 150px; display: grid; place-items: center; text-align: center; }.learning-path-loading strong, .learning-path-loading p { display: block; }.learning-path-loading p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.learning-path-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }.learning-path-head span { color: #6554a8; text-transform: uppercase; letter-spacing: .1em; font-size: 8px; font-weight: 850; }.learning-path-head h2 { margin-top: 4px; font-size: 23px; }.learning-path-head button { width: 28px; height: 28px; border: 0; border-radius: 50%; color: var(--muted); background: #ece8f8; font-size: 17px; }.learning-path-intro { margin: 9px 0 16px; color: var(--muted); font-size: 10px; }
.learning-path-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }.learning-path-steps li { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }.learning-path-steps li.target { border-color: #b9d7c7; background: #f2faf5; }.path-order { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #6554a8; background: #eeeafd; font-family: Georgia, serif; font-size: 12px; }.learning-path-steps li.target .path-order { color: white; background: var(--green); }.learning-path-steps small, .learning-path-steps strong, .learning-path-steps p { display: block; }.learning-path-steps small { color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-size: 7px; }.learning-path-steps strong { margin-top: 3px; font-size: 11px; }.learning-path-steps p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }.learning-path-steps .empty-path { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; }.path-warning { display: flex; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; color: #76551e; background: #fff6df; font-size: 9px; line-height: 1.45; }
.path-relations { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }.path-relations > div > span { color: #6554a8; text-transform: uppercase; letter-spacing: .09em; font-size: 7px; font-weight: 850; }.path-relations h3 { margin: 3px 0 9px; font-size: 14px; }.path-relations ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }.path-relations li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 12px; padding: 10px 11px; border: 1px solid #d7d1ee; border-left: 3px solid var(--violet); border-radius: 10px; background: rgba(255,255,255,.82); }.path-relations li.recommended { border-left-color: #c29b4b; }.path-relation-main strong, .path-relation-main span { display: block; }.path-relation-main strong { font-size: 10px; }.path-relation-main span, .path-relations small { margin-top: 2px; color: var(--muted); font-size: 8px; }.path-relation-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }.path-relation-meta span { padding: 3px 6px; border-radius: 999px; color: #6554a8; background: #eeeafd; font-size: 7px; font-weight: 750; }.path-relation-meta .relation-status { color: #276347; background: #e7f5ed; }.path-relations small { grid-column: 1 / -1; }
.path-relations li.prerequisite-set { border-style: dashed; border-left-style: solid; background: #fffbf2; }
.preparation-steps { grid-column: 1 / -1; display: grid; gap: 5px; margin-top: 4px; }.preparation-step { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px; border-radius: 8px; background: rgba(255,255,255,.72); }.preparation-step strong, .preparation-step span { display: block; }.preparation-step strong { font-size: 9px; }.preparation-step span { margin-top: 2px; color: var(--muted); font-size: 7px; }

/* Knowledge map */
.workspace-toolbar { margin-top: 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.workspace-toolbar p { color: var(--muted); font-size: 13px; margin: 0; }
.view-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line); background: #edf0ec; border-radius: 13px; }
.view-tab { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--muted); padding: 9px 15px; border-radius: 9px; text-decoration: none; font-weight: 750; font-size: 13px; }
.view-tab.active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(28,45,36,.08); }
.tab-icon { font-size: 15px; color: var(--green); }
.graph-workspace { position: relative; display: grid; grid-template-columns: 268px minmax(460px, 1fr) 292px; height: min(740px, calc(100vh - 210px)); min-height: 590px; margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 16px 46px rgba(29,45,37,.07); }
.graph-sidebar { display: flex; flex-direction: column; min-width: 0; padding: 24px 0 0; border-right: 1px solid var(--line); overflow-y: scroll; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #9eaea5 transparent; background: #fbfcfa; }
.graph-sidebar::-webkit-scrollbar { width: 10px; }
.graph-sidebar::-webkit-scrollbar-track { background: transparent; }
.graph-sidebar::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: #9eaea5; background-clip: padding-box; }
.graph-sidebar::-webkit-scrollbar-thumb:hover { background: #70847a; background-clip: padding-box; }
.graph-sidebar .sidebar-title { margin: 0 20px; }
.graph-sidebar .sidebar-title h2 { font-size: 23px; }
.graph-search { margin: 18px 18px 0; background: white; }
.graph-filter-block { margin: 19px 18px 0; }
.control-label { display: block; color: #718078; text-transform: uppercase; letter-spacing: .1em; font-size: 9px; font-weight: 850; margin-bottom: 8px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border-radius: 10px; background: #e9ede9; }
.segmented button { border: 0; padding: 7px 4px; border-radius: 7px; color: #6c7972; background: transparent; font-size: 10px; font-weight: 750; }
.segmented button.active { color: var(--green-dark); background: white; box-shadow: 0 1px 5px rgba(29,45,37,.1); }
.graph-legend { margin: 20px 18px 0; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 9px; }
.graph-legend span { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.legend-node { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px #dcece4; }
.legend-node.supporting { background: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.legend-node.weak { background: white; border: 1.5px solid #9ba6a0; box-shadow: none; }
.legend-line { width: 18px; border-top: 1.5px solid #789087; }
.legend-line.semantic { border-top-style: dashed; border-color: #aa9fd3; }
.family-heading { display: flex; justify-content: space-between; align-items: center; margin: 19px 18px 6px; }
.family-heading .control-label { margin: 0; }
.tiny-count { min-width: 22px; text-align: center; padding: 3px 6px; border-radius: 99px; background: #e8eee9; color: var(--green); font-size: 9px; font-weight: 800; }
.family-list { flex: 0 0 auto; min-height: 0; overflow: visible; padding: 3px 10px 18px; }
.family-row { width: 100%; display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; padding: 10px 9px; border: 0; border-radius: 9px; text-align: left; background: transparent; color: var(--ink); }
.family-row:hover, .family-row.active { background: #edf3ee; }
.family-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--family-color); }
.family-row span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; font-weight: 700; }
.family-row small { color: var(--muted); font-size: 9px; }
.graph-stage { position: relative; min-width: 0; overflow: hidden; background-color: #f8faf7; background-image: radial-gradient(#d9dfda 0.75px, transparent 0.75px); background-size: 18px 18px; }
.graph-topline { position: absolute; z-index: 5; top: 16px; left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.graph-topline > div:first-child { padding: 8px 11px; border: 1px solid rgba(218,225,219,.85); border-radius: 10px; background: rgba(255,255,255,.85); box-shadow: 0 5px 18px rgba(25,40,32,.05); backdrop-filter: blur(10px); }
.graph-topline strong, .graph-topline span { display: block; }
.graph-topline strong { font-size: 11px; }
.graph-topline span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.zoom-controls { display: flex; pointer-events: auto; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 5px 18px rgba(25,40,32,.06); }
.zoom-controls button { width: 34px; height: 32px; border: 0; border-right: 1px solid var(--line); background: white; color: var(--ink); font-weight: 700; }
.zoom-controls button:last-child { border-right: 0; }
.zoom-controls button:hover { background: #f0f5f1; }
.graph-canvas { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; }
.graph-canvas.panning { cursor: grabbing; }
#graphSvg { width: 100%; height: 100%; overflow: visible; }
.graph-world { transform-origin: 0 0; transition: transform .18s ease-out; }
.graph-edge { stroke: #a9b6af; stroke-width: 1.15; opacity: .42; vector-effect: non-scaling-stroke; }
.graph-edge.semantic { stroke: #a79dcc; stroke-dasharray: 3 5; opacity: .34; }
.graph-edge.pill-link { stroke: #8a79d3; stroke-width: 1; stroke-dasharray: 1 4; opacity: .5; }
.graph-edge.pill-peer.shared { stroke: #624ab9; stroke-width: 1.7; opacity: .62; }
.graph-edge.pill-peer.derived { stroke: #3f8c9d; stroke-width: 1.3; stroke-dasharray: 5 4; opacity: .48; }
.graph-edge.pill-peer.highlight { stroke: #27185f; stroke-width: 2.5; opacity: 1; }
.graph-edge.highlight { stroke: var(--green); stroke-width: 2.2; opacity: .9; }
.node-halo { fill: none; stroke: var(--node-color); stroke-width: 7; opacity: .10; }
.node-core { fill: white; stroke: var(--node-color); stroke-width: 2; filter: drop-shadow(0 3px 4px rgba(27,44,34,.12)); transition: .15s; }
.graph-node { cursor: pointer; }
.graph-node:hover .node-core, .graph-node.selected .node-core { fill: var(--node-color); stroke-width: 3; }
.graph-node:hover .node-label, .graph-node.selected .node-label { font-weight: 850; fill: #112019; }
.node-center { fill: var(--node-color); pointer-events: none; }
.graph-node:hover .node-center, .graph-node.selected .node-center { fill: white; }
.node-label { fill: #34433b; font-size: 10px; font-weight: 650; paint-order: stroke; stroke: #f8faf7; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.node-rank { fill: #78857e; font-size: 7px; font-weight: 750; pointer-events: none; }
.graph-node.dimmed, .graph-edge.dimmed { opacity: .09; }
.graph-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.graph-empty span { font-size: 44px; color: #9bb4a5; }.graph-empty strong { color: var(--ink); margin-top: 8px; }.graph-empty p { font-size: 12px; margin-top: 5px; }
.node-inspector { min-width: 0; border-left: 1px solid var(--line); background: white; overflow-y: auto; }
.node-inspector.empty { display: grid; place-items: center; }
.inspector-placeholder { padding: 30px; text-align: center; color: var(--muted); }
.inspector-placeholder span { display: block; color: #9bb4a5; font-size: 30px; margin-bottom: 12px; }
.inspector-placeholder strong { display: block; color: var(--ink); font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.inspector-placeholder p { font-size: 12px; line-height: 1.6; margin: 8px 0 0; }
.inspector-content { position: relative; padding: 26px 22px; }
.inspector-close { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: white; font-size: 17px; line-height: 1; }
.inspector-close:hover { color: var(--ink); background: #f2f5f2; }
.inspector-kicker { display: flex; align-items: center; gap: 7px; color: var(--green); text-transform: uppercase; letter-spacing: .09em; font-size: 9px; font-weight: 850; }
.inspector-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--node-color); }
.inspector-content h2 { margin-top: 13px; font-size: 28px; line-height: 1.05; }
.inspector-description { color: var(--muted); font-size: 12px; line-height: 1.65; margin-top: 14px; }
.inspector-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 20px; }
.inspector-metric { padding: 10px 7px; border-radius: 9px; text-align: center; background: #f1f5f1; }
.inspector-metric strong, .inspector-metric span { display: block; }.inspector-metric strong { font-size: 15px; }.inspector-metric span { margin-top: 2px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-size: 7px; }
.inspector-section { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.inspector-section h3 { color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-size: 9px; margin-bottom: 10px; }
.connection-list { display: grid; gap: 6px; }
.connection-chip { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 8px; background: #f5f7f4; padding: 8px 9px; text-align: left; color: var(--ink); font-size: 10px; }
.connection-chip::before { content: ''; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--chip-color, #89a296); }
.open-pill { width: 100%; margin-top: 20px; }
.no-pill { margin-top: 18px; padding: 11px; border-radius: 9px; background: var(--amber-soft); color: var(--amber); font-size: 10px; line-height: 1.5; }

/* Global graph */
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.primary-nav { display: flex; align-items: center; gap: 6px; margin: 0 24px; }
.global-nav { display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; padding: 9px 12px; color: var(--muted); background: transparent; text-decoration: none; font-size: 11px; font-weight: 800; }
.global-nav:hover, .global-nav.active { color: var(--green); background: white; border-color: #bcd0c2; }
.global-nav span { color: var(--green); font-size: 14px; }
.global-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.global-head h1 { margin-bottom: 15px; }
.global-health { display: flex; align-items: center; gap: 11px; min-width: 205px; padding: 14px 16px; border: 1px solid #d9e6dc; border-radius: 13px; background: #f2f7f3; }
.global-health .pulse-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.global-health .pulse-dot::after { content: ''; position: absolute; inset: -5px; border: 1px solid var(--green); border-radius: 50%; opacity: .25; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.65); opacity: .4; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.global-health strong, .global-health small { display: block; }.global-health strong { font-size: 11px; }.global-health small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.global-kpis { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); margin-top: 32px; border: 1px solid var(--line); border-radius: 16px; background: white; overflow: hidden; }
.global-kpis > div { padding: 17px 20px; border-right: 1px solid var(--line); }.global-kpis > div:last-child { border-right: 0; }
.global-kpis span, .global-kpis strong { display: block; }.global-kpis span { color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-size: 8px; font-weight: 800; }.global-kpis strong { margin-top: 5px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.global-kpis .review-kpi { background: #fff8ea; }.global-kpis .review-kpi strong { color: var(--amber); }
.global-toolbar { display: grid; grid-template-columns: minmax(280px, 1fr) auto auto auto; align-items: center; gap: 10px; margin-top: 18px; }
.global-search { margin: 0; background: white; }
.global-density { width: 275px; }
.candidate-toggle { height: 42px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 13px; background: white; color: var(--muted); font-size: 10px; font-weight: 800; }
.candidate-toggle i { width: 18px; border-top: 2px dashed #c57a27; opacity: .35; }.candidate-toggle.active { color: #9b5f13; border-color: #ead1aa; background: #fff9ee; }.candidate-toggle.active i { opacity: 1; }
.global-workspace { position: relative; display: grid; grid-template-columns: 238px minmax(500px, 1fr) 286px; height: min(720px, calc(100vh - 245px)); min-height: 570px; margin-top: 12px; border: 1px solid var(--line); border-radius: 19px; overflow: hidden; background: white; box-shadow: 0 16px 46px rgba(29,45,37,.07); }
.global-documents-panel { padding: 23px 15px; border-right: 1px solid var(--line); background: #fbfcfa; overflow-y: auto; }
.panel-title { display: flex; align-items: end; justify-content: space-between; }.panel-title h2 { font-size: 23px; }.panel-help { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 10px 0 18px; }
.global-document-list { display: grid; gap: 8px; }
.global-document-row { --doc-color: #317a62; width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; padding: 11px 9px; border: 1px solid transparent; border-radius: 11px; text-align: left; color: var(--ink); background: transparent; }
.global-document-row:hover { background: #f1f5f1; }.global-document-row.active { border-color: color-mix(in srgb, var(--doc-color) 30%, white); background: color-mix(in srgb, var(--doc-color) 8%, white); }
.document-orb { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--doc-color); background: color-mix(in srgb, var(--doc-color) 12%, white); font-size: 10px; font-weight: 900; }
.global-document-row strong, .global-document-row small { display: block; }.global-document-row strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }.global-document-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }.global-document-row .doc-check { width: 14px; height: 14px; display: grid; place-items: center; border: 1px solid #b9c4bd; border-radius: 50%; color: transparent; font-size: 8px; }.global-document-row.active .doc-check { color: white; border-color: var(--doc-color); background: var(--doc-color); }
.global-legend { display: grid; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }.global-legend span { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 9px; }.global-legend .candidate { border-top: 2px dashed #c57a27; }.legend-node.multi { background: linear-gradient(135deg, #3977a8 50%, #ad4f72 50%); box-shadow: 0 0 0 3px #eef1f3; }
.rich-legend { gap: 16px; }.legend-group { display: grid; gap: 9px; }.legend-group > strong { color: #718078; text-transform: uppercase; letter-spacing: .1em; font-size: 8px; }.mark-topic { width: 11px; height: 11px; flex: 0 0 auto; border: 2px solid #237052; border-radius: 50%; background: #237052; box-shadow: 0 0 0 3px #dcece4; }.mark-topic.supporting { background: white; border-width: 2px; box-shadow: none; }.mark-pill { width: 10px; height: 10px; flex: 0 0 auto; transform: rotate(45deg); border: 1.5px solid #6b56c8; border-radius: 2px; background: #eeeafd; }.legend-line.arrow::after { content: ''; display: block; margin: -3px 0 0 auto; border: 3px solid transparent; border-left-color: #789087; }.legend-line.pill-link { border-color: #8a79d3; border-top-style: dotted; }.legend-line.pill-shared { border-color: #624ab9; border-top-width: 2px; }.legend-line.pill-derived { border-color: #3f8c9d; border-top-style: dashed; }
.layer-controls { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }.layer-controls::before { content: 'Livelli visibili'; color: #718078; text-transform: uppercase; letter-spacing: .1em; font-size: 8px; font-weight: 850; margin-bottom: 2px; }.layer-controls button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; color: #819087; background: white; text-align: left; font-size: 9px; font-weight: 750; opacity: .58; }.layer-controls button.active { color: var(--ink); border-color: #c9d7cd; background: #f1f6f2; opacity: 1; }.layer-swatch { width: 18px; border-top: 2px solid #6f8379; }.layer-swatch.semantic { border-top-style: dotted; border-color: #7b6cc4; }.layer-swatch.pills { position: relative; border: 0; height: 12px; }.layer-swatch.pills::before { content: ''; position: absolute; left: 4px; top: 2px; width: 8px; height: 8px; transform: rotate(45deg); border: 1px solid #6b56c8; background: #eeeafd; }
.entity-mode-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }.entity-mode-block > span { display: block; margin-bottom: 8px; color: #718078; text-transform: uppercase; letter-spacing: .1em; font-size: 8px; font-weight: 850; }.entity-mode { grid-template-columns: 1fr; background: #e9ede9; }.entity-mode button { text-align: left; padding: 8px 9px; }.entity-mode button[data-global-entity="pills"].active, .entity-mode button[data-graph-entity="pills"].active { color: #5742ad; background: #f2efff; }
.local-entity-mode { margin: 18px 18px 0; }
.layer-controls button:disabled, .candidate-toggle:disabled { cursor: not-allowed; opacity: .3; }
.global-stage { position: relative; min-width: 0; overflow: hidden; background-color: #f8faf7; background-image: radial-gradient(#d9dfda .75px, transparent .75px); background-size: 18px 18px; }
.global-stage-topline { position: absolute; z-index: 6; top: 15px; left: 17px; right: 17px; display: flex; justify-content: space-between; pointer-events: none; }.global-stage-topline > div:first-child { padding: 8px 11px; border: 1px solid rgba(218,225,219,.85); border-radius: 10px; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); }.global-stage-topline strong, .global-stage-topline span { display: block; }.global-stage-topline strong { font-size: 11px; }.global-stage-topline span { margin-top: 3px; color: var(--muted); font-size: 9px; }.global-stage-topline .zoom-controls { pointer-events: auto; }
#globalSvg { width: 100%; height: 100%; overflow: visible; }
.global-world { transform-origin: 0 0; }
.global-edge { stroke: #6f8379; stroke-width: 1.15; opacity: .42; vector-effect: non-scaling-stroke; }.global-edge.structural { stroke: #587067; opacity: .48; }.global-edge.semantic { stroke: #7c6fc0; stroke-dasharray: 2 5; opacity: .28; }.global-edge.candidate { stroke: #c47a29; stroke-width: 1.8; stroke-dasharray: 8 6; opacity: .78; }.global-edge.pill-link { stroke: #8a79d3; stroke-width: 1; stroke-dasharray: 1 4; opacity: .46; }.global-edge.highlight { stroke: var(--green); stroke-width: 2.4; opacity: .95; }.global-edge.dimmed { opacity: .035; }
.global-edge.pill-peer.shared { stroke: #624ab9; stroke-width: 1.7; opacity: .6; }.global-edge.pill-peer.derived { stroke: #3f8c9d; stroke-width: 1.25; stroke-dasharray: 5 4; opacity: .45; }.global-edge.pill-peer.highlight { stroke: #27185f; stroke-width: 2.5; opacity: 1; }
.global-node { cursor: pointer; }.global-node .node-core { stroke: var(--doc-color); fill: white; }.global-node .node-center { fill: var(--doc-color); }.global-node .node-halo { stroke: var(--doc-color); }.global-node.backbone .node-core { fill: var(--doc-color); }.global-node.backbone .node-center { fill: white; }.global-node.weak .node-core { stroke-dasharray: 2 2; opacity: .72; }.global-node:hover .node-core, .global-node.selected .node-core { fill: #17211c; stroke: #17211c; }.global-node:hover .node-center, .global-node.selected .node-center { fill: white; }.global-node.shared .node-core { stroke-width: 4; stroke-dasharray: 3 2; }.global-node.dimmed { opacity: .08; }
.global-node .node-label { font-size: 8px; }.global-node .node-rank { font-size: 6px; }
.global-pill { cursor: pointer; }.global-pill .pill-diamond { fill: #f0edff; stroke: #6753c5; stroke-width: 1.5; filter: drop-shadow(0 2px 3px rgba(57,42,116,.14)); }.global-pill:hover .pill-diamond, .global-pill.selected .pill-diamond { fill: #6753c5; stroke: #40308f; }.global-pill .pill-glyph { fill: #6753c5; font-size: 6px; font-weight: 900; text-anchor: middle; dominant-baseline: central; pointer-events: none; }.global-pill:hover .pill-glyph, .global-pill.selected .pill-glyph { fill: white; }.global-pill .pill-label { fill: #55458e; font-size: 7px; font-weight: 700; paint-order: stroke; stroke: #f8faf7; stroke-width: 3px; pointer-events: none; }.global-pill.dimmed { opacity: .08; }
.island-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }.island-label { position: absolute; transform: translate(-50%, -50%); color: var(--doc-color); text-transform: uppercase; letter-spacing: .13em; font-size: 8px; font-weight: 900; opacity: .62; }
.island-label::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--doc-color); }
.global-inspector { min-width: 0; border-left: 1px solid var(--line); overflow-y: auto; background: white; }.global-inspector.empty { display: grid; place-items: center; }
.source-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }.source-tag { padding: 5px 7px; border-radius: 7px; color: var(--doc-color); background: color-mix(in srgb, var(--doc-color) 10%, white); font-size: 8px; font-weight: 800; }
.pill-mini-list { display: grid; gap: 6px; }.pill-mini { padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfa; }.pill-mini strong, .pill-mini span { display: block; }.pill-mini strong { font-size: 9px; line-height: 1.4; }.pill-mini span { margin-top: 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 7px; }
.pill-mini-button { width: 100%; color: var(--ink); text-align: left; }.pill-mini-button:hover { border-color: #b9addf; background: #f4f1ff; }
.merge-notice { margin-top: 17px; padding: 11px; border-radius: 10px; color: var(--amber); background: var(--amber-soft); font-size: 9px; line-height: 1.55; }.merge-notice strong { display: block; margin-bottom: 3px; }
.pill-detail.friendly-mode { padding: clamp(24px, 4vw, 54px); background: #fbfcf9; }
.friendly-pill { max-width: 880px; margin: 0 auto; }
.friendly-pill-head { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.friendly-pill-head h1 { max-width: 760px; margin-bottom: 14px; font-size: clamp(34px, 5vw, 58px); }
.friendly-pill-head > p:not(.eyebrow) { color: var(--muted); font-size: 15px; line-height: 1.6; }
.friendly-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.friendly-meta span { padding: 7px 10px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 10px; font-weight: 800; }
.friendly-activities { display: grid; gap: 18px; margin-top: 28px; }
.friendly-activity { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 16px; padding: 26px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.friendly-step { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-family: Georgia, serif; font-size: 17px; }
.friendly-label { margin-bottom: 6px; color: var(--green); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; font-weight: 850; }
.friendly-activity h3 { margin-bottom: 17px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; line-height: 1.25; }
.friendly-explanation { color: #34433b; font-size: 15px; line-height: 1.75; }
.friendly-task { margin-top: 22px; padding: 18px; border-radius: 13px; background: var(--green-soft); }
.friendly-task strong { color: var(--green-dark); font-size: 12px; }
.friendly-task p { margin: 7px 0 0; color: #34433b; font-size: 14px; line-height: 1.65; }
.friendly-criteria { margin-top: 16px; color: var(--muted); font-size: 12px; }
.friendly-criteria summary { cursor: pointer; color: var(--green-dark); font-weight: 750; }
.friendly-criteria li { margin-top: 7px; line-height: 1.5; }
.friendly-source { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 28px; padding: 24px; border: 1px solid #cbded1; border-radius: 17px; background: #edf5f0; }
.friendly-source h3 { margin-bottom: 7px; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.friendly-source p:not(.friendly-label) { margin: 0; color: var(--muted); font-size: 12px; }
.source-page-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.source-page-button { padding: 9px 11px; border: 1px solid #b9d0c0; border-radius: 10px; color: var(--green-dark); background: white; font-size: 10px; font-weight: 800; }
.source-page-button:hover { border-color: var(--green); background: var(--green-soft); }
.source-document-dialog { width: min(1180px, calc(100vw - 28px)); height: min(900px, calc(100vh - 28px)); padding: 20px; }
.source-document-dialog .dialog-head { margin-bottom: 12px; }
.source-document-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.source-document-dialog iframe { width: 100%; height: calc(100% - 112px); border: 1px solid var(--line); border-radius: 12px; background: #e8ebe8; }
.pill-kicker { color: #6753c5; }.pill-kicker i { background: #6753c5; transform: rotate(45deg); border-radius: 2px; }
@media (max-width: 850px) {
  .topbar { height: auto; min-height: 76px; flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }.primary-nav { order: 3; width: 100%; justify-content: center; margin: 0; }
  .hero, .document-head { align-items: flex-start; flex-direction: column; }
  .principle { grid-template-columns: auto 1fr; }.principle .tag { grid-column: 1 / -1; justify-self: start; }
  .pill-workspace { grid-template-columns: 1fr; }.pill-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }.pill-list { max-height: 310px; }.comparison-grid { grid-auto-columns: minmax(360px, 86vw); }
  .graph-workspace { grid-template-columns: 220px 1fr; height: 720px; }
  .node-inspector { position: absolute; z-index: 8; right: 12px; bottom: 12px; width: 276px; max-height: calc(100% - 86px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 48px rgba(23,33,28,.18); }
  .node-inspector.empty { display: none; }
  .global-head { align-items: flex-start; flex-direction: column; }.global-health { display: none; }.global-kpis { grid-template-columns: repeat(3, 1fr); }.global-kpis > div { border-bottom: 1px solid var(--line); }.global-toolbar { grid-template-columns: 1fr auto; }.global-density { width: 260px; }.candidate-toggle { grid-column: 1 / -1; justify-self: start; }.global-workspace { grid-template-columns: 205px 1fr; height: 700px; }.global-inspector { position: absolute; z-index: 8; right: 12px; bottom: 12px; width: 276px; max-height: calc(100% - 85px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 48px rgba(23,33,28,.18); }.global-inspector.empty { display: none; }
  .recommendation-workspace { grid-template-columns: 1fr; }.recommendation-builder { border-right: 0; border-bottom: 1px solid var(--line); }.recommendation-results.empty-state { min-height: 360px; }.recommendation-card { grid-template-columns: 64px minmax(0, 1fr); }.recommendation-actions { grid-column: 2; justify-self: start; display: flex; }.open-recommended-pill { grid-column: 2; justify-self: start; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 16px; }.brand small { display: none; }.status-badge { font-size: 0; padding: 11px; }.status-badge span { width: 9px; height: 9px; }
  main { padding: 30px 15px 50px; } h1 { font-size: 42px; }.hero { min-height: auto; }.hero .button { width: 100%; }
  .head-actions, .review-actions { width: 100%; flex-direction: column; }.head-actions .button { width: 100%; }
  .filter-row { grid-template-columns: 1fr; }
  .friendly-activity { grid-template-columns: 1fr; padding: 19px; }.friendly-source { align-items: flex-start; flex-direction: column; }.source-page-list { justify-content: flex-start; }.source-document-actions { align-items: stretch; flex-direction: column; }
  .pipeline-job-grid { grid-template-columns: 1fr; }.pipeline-job-card { padding: 16px; }
  .workspace-toolbar { align-items: flex-start; flex-direction: column; }.workspace-toolbar p { display: none; }
  .graph-workspace { grid-template-columns: 1fr; height: 900px; }.graph-sidebar { max-height: 345px; border-right: 0; border-bottom: 1px solid var(--line); }.graph-legend { display: none; }.local-entity-mode { margin-top: 14px; }.family-list { display: flex; overflow-x: auto; }.family-row { min-width: 160px; }.graph-stage { min-height: 500px; }.node-inspector { width: calc(100% - 24px); max-height: 430px; }
  .primary-nav { gap: 3px; }.primary-nav .global-nav { width: auto; height: 36px; padding: 0 8px; font-size: 9px; }.primary-nav .global-nav span { display: none; }.global-kpis { grid-template-columns: 1fr 1fr; }.global-kpis > div { padding: 13px; }.global-toolbar { grid-template-columns: 1fr; }.global-density { width: 100%; }.candidate-toggle { grid-column: auto; }.global-workspace { grid-template-columns: 1fr; height: 900px; }.global-documents-panel { max-height: 345px; border-right: 0; border-bottom: 1px solid var(--line); }.global-document-list { display: flex; overflow-x: auto; }.global-document-row { min-width: 190px; }.global-legend { grid-template-columns: 1fr 1fr; gap: 12px; }.entity-mode { grid-template-columns: repeat(3, 1fr); }.entity-mode button { text-align: center; padding: 7px 4px; }.layer-controls { grid-template-columns: repeat(2, 1fr); }.layer-controls::before { grid-column: 1 / -1; }.layer-controls button { justify-content: center; padding: 7px 4px; }.global-stage { min-height: 520px; }.global-inspector { width: calc(100% - 24px); max-height: 430px; }
  .recommendation-head { align-items: flex-start; }.recommendation-mark { display: none; }.recommendation-workspace { margin-top: 28px; }.recommendation-builder, .recommendation-results-panel { padding: 20px 16px; }.recommendation-summary { display: grid; grid-template-columns: 1fr 1fr; }.recommendation-card { grid-template-columns: 1fr; padding: 18px; }.recommendation-rank { display: flex; align-items: center; justify-content: space-between; }.recommendation-actions, .open-recommended-pill { grid-column: 1; }.learning-path-steps li { grid-template-columns: 34px minmax(0,1fr); }.learning-path-steps li .button { grid-column: 2; justify-self: start; }.topic-composer { grid-template-columns: 1fr; }.flow-steps { grid-template-columns: 1fr; }.flow-steps li { padding: 10px 12px; }
}
