.skillscan-page {
  --bg: #030806;
  --surface: #071009;
  --raised: #0c1a12;
  --accent: #58f5a0;
  --text: #e9f5ec;
  --muted: #9db8a6;
  --dim: #7d9987;
  --line: rgba(88, 245, 160, 0.16);
  --strong-line: rgba(88, 245, 160, 0.28);
  --red: #ff6b6b;
  --amber: #e9c46a;
  --cyan: #79cddd;
  --mono: "JetBrains Mono", Consolas, monospace;
  --sans: "Inter", sans-serif;
  --display: "Sentient", Georgia, serif;
}

#workspace { color: var(--text); font: 13px/1.5 var(--sans); letter-spacing: 0; }
:where(#workspace) button, :where(#workspace) input, :where(#workspace) textarea, :where(#workspace) select { font: inherit; }
:where(#workspace) button { cursor: pointer; }
:where(#workspace) button:disabled { cursor: not-allowed; opacity: .4; }
:where(#workspace) a { color: inherit; text-decoration: none; }
:where(#workspace) a:hover { color: var(--accent); }
:where(#workspace) button, :where(#workspace) input, :where(#workspace) textarea, :where(#workspace) select { border-radius: 4px; }
#workspace :focus-visible, .site-footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
#workspace img { display: block; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: fixed; top: 10px; left: 10px; padding: 10px; background: var(--accent); color: var(--bg); z-index: 1100; }
.workspace-title img, .icon-button img, .drop-zone img, .search-field img, .inspection-visual img, .integrations img, .category-filters img { filter: invert(82%) sepia(46%) saturate(656%) hue-rotate(88deg) brightness(104%) contrast(93%); }

.service-status { display: flex; gap: 8px; align-items: center; font: 9px var(--mono); color: var(--accent); white-space: nowrap; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.status-dot.offline { background: var(--amber); }
main#workspace { position: relative; max-width: 1600px; margin: var(--nav-height) auto 0; padding: 28px 32px 0; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.workspace-title { display: flex; align-items: center; gap: 16px; }
#workspace .eyebrow { display: block; color: var(--accent); font: 9px/1.6 var(--mono); letter-spacing: 0; text-shadow: none; margin: 0 0 9px; }
#workspace .eyebrow::before { content: none; }
#workspace h1 { font: 500 32px/1.1 var(--display); margin: 0; }
.subtitle { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.workspace-facts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; font: 10px var(--mono); color: var(--muted); }
.workspace-facts strong { color: var(--accent); font-weight: 500; }
.workspace-facts .version { color: var(--dim); border-left: 1px solid var(--line); padding-left: 16px; }
.dashboard-layout { display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: 22px; align-items: start; }
.dashboard-content { min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; min-height: 18px; }
.section-heading h2 { color: var(--muted); font: 10px var(--mono); margin: 0; }
.section-number { font: 8px var(--mono); color: var(--dim); white-space: nowrap; }
.scope-section { padding: 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.scope-section .section-heading { padding: 0 16px; }
.category-filters { display: flex; flex-direction: column; }
.category-filters button { display: grid; grid-template-columns: 16px minmax(0, 1fr) 20px; align-items: center; gap: 9px; padding: 11px 12px; text-align: left; background: none; border: 0; border-left: 2px solid transparent; border-radius: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.category-filters button:hover { background: rgba(88, 245, 160, .035); }
.category-filters button[aria-pressed=true] { border-left-color: var(--accent); color: var(--text); background: rgba(88, 245, 160, .09); }
.category-filters img { width: 15px; height: 15px; opacity: .65; }
.category-filters button[aria-pressed=true] img { opacity: 1; }
.category-filters button span:last-child { font: 9px var(--mono); color: var(--dim); text-align: right; }
.sidebar-note { border-top: 1px solid var(--line); padding: 15px 16px 0; margin-top: 12px; font: 8px var(--mono); color: var(--dim); display: flex; align-items: center; gap: 8px; }

.scan-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); gap: 16px; }
.scan-console, .scan-summary, .results-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.scan-console { padding: 18px; }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: 10px var(--mono); padding: 8px 0; border-radius: 0; }
.tabs [aria-pressed=true] { color: var(--accent); border-bottom-color: var(--accent); }
.target-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 14px; }
#files-panel { order: 0; min-width: 0; }
#paste-panel { order: 1; min-width: 0; }
.field-label { display: block; color: var(--dim); font: 8px var(--mono); margin-bottom: 7px; }
.field-label + input { width: 100%; height: 32px; padding: 7px 9px; color: var(--text); background: var(--bg); border: 1px solid var(--strong-line); font: 11px var(--mono); }
.editor-label { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.text-command { color: var(--accent); background: none; border: 0; padding: 0; font: 9px var(--mono); }
.editor-wrap { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.editor-gutter { padding: 10px 6px; color: #526b5b; font: 10px/20px var(--mono); border-right: 1px solid var(--line); user-select: none; }
#workspace textarea { width: 100%; min-height: 180px; padding: 10px; background: none; border: 0; color: #b7d7c2; font: 10px/20px var(--mono); resize: vertical; tab-size: 2; }
#workspace textarea::placeholder { color: var(--dim); }
.editor-status { display: flex; justify-content: space-between; color: var(--dim); font: 8px var(--mono); margin-top: 6px; }
.drop-zone { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; padding: 20px 12px; text-align: center; cursor: pointer; background: rgba(88, 245, 160, .02); border: 1px dashed var(--strong-line); border-radius: 4px; }
.drop-zone.dragging { background: rgba(88, 245, 160, .09); border-color: var(--accent); }
.drop-zone strong { font-size: 12px; font-weight: 500; }
.drop-zone span { font-size: 10px; color: var(--muted); overflow-wrap: anywhere; }
.drop-zone .upload-limit { font: 8px/1.7 var(--mono); color: var(--dim); }
.file-list { list-style: none; padding: 0; margin: 10px 0 0; max-height: 90px; overflow: auto; }
.file-list:empty { margin: 0; }
.file-list li { display: flex; gap: 8px; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font: 9px var(--mono); }
.file-list li span:first-child { min-width: 0; overflow-wrap: anywhere; }
.file-list li span:last-child { white-space: nowrap; color: var(--dim); }
.consent { display: flex; gap: 9px; align-items: flex-start; font-size: 10px; line-height: 1.6; color: var(--muted); margin: 15px 0 12px; }
.consent input { margin: 3px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.primary-button { display: flex; gap: 12px; align-items: center; justify-content: center; min-height: 40px; padding: 10px 16px; border: 1px solid var(--strong-line); background: rgba(88, 245, 160, .06); color: var(--accent); font: 11px var(--mono); border-radius: 4px; }
.primary-button:hover:not(:disabled) { background: rgba(88, 245, 160, .13); border-color: var(--accent); }
.primary-button img { filter: invert(82%) sepia(46%) saturate(656%) hue-rotate(88deg) brightness(104%) contrast(93%); }
#scan-button { width: 100%; }
.button-arrow { margin-left: auto; }
#scan-button span:first-of-type { margin-right: auto; }
.secondary-button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); background: none; color: var(--muted); font: 10px var(--mono); }
#cancel-button, #clear-files { width: 100%; margin-top: 8px; }
.input-error { color: var(--red); font: 10px/1.6 var(--mono); overflow-wrap: anywhere; }
.engine-footer { display: flex; align-items: center; gap: 8px; margin-top: 13px; color: var(--dim); font: 7px var(--mono); }

.scan-summary { padding: 18px; display: flex; flex-direction: column; }
.risk-summary { display: flex; align-items: center; gap: 18px; flex: 1; min-height: 180px; }
.risk-dial { --score: 0%; --risk-color: var(--accent); width: 112px; height: 112px; border-radius: 50%; padding: 6px; flex-shrink: 0; background: conic-gradient(var(--risk-color) var(--score), #1b2a20 0); }
.risk-dial-core { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.risk-dial strong { font: 500 31px var(--mono); color: var(--risk-color); }
.risk-dial-core > span { font: 7px var(--mono); }
.risk-meta { flex: 1; min-width: 0; }
.metric-label { display: block; font: 7px var(--mono); color: var(--muted); }
.severity-value { display: block; margin-top: 5px; font: 500 19px var(--mono); }
#severity-caption { color: var(--muted); font-size: 8px; }
#workspace dl { margin: 10px 0 0; }
#workspace dl div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 9px; }
#workspace dl div:last-child { border: 0; }
#workspace dt { display: flex; gap: 7px; align-items: center; }
#workspace dd { margin: 0; font: 10px var(--mono); }
.severity-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.critical { color: var(--red); }
.high { color: #ffa36b; }
.medium { color: var(--amber); }
.low { color: var(--cyan); }
.info { color: var(--muted); }
.summary-status { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; font: 8px var(--mono); color: var(--dim); margin-top: 18px; }
.risk-track { height: 3px; background: var(--line); margin-top: 10px; }
.risk-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .4s; }
#risk-caption { color: var(--muted); font: 8px/1.5 var(--mono); margin: 9px 0 15px; }
.summary-limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.summary-limits strong { color: var(--text); display: block; font: 15px var(--mono); }
.summary-limits span { color: var(--dim); font: 7px var(--mono); }

.results-panel { margin-top: 16px; overflow: hidden; }
.results-heading { padding: 16px 18px; margin: 0; border-bottom: 1px solid var(--line); }
.results-heading p { font: 11px/1.6 var(--mono); color: var(--text); margin: 7px 0 0; }
.result-actions { display: flex; gap: 8px; }
.icon-button { display: flex; justify-content: center; align-items: center; width: 32px; height: 32px; border: 1px solid var(--line); background: none; flex-shrink: 0; }
.icon-button:hover:not(:disabled) { background: var(--raised); }
.results-toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.search-field { display: flex; gap: 9px; align-items: center; border: 1px solid var(--line); padding: 8px 10px; border-radius: 4px; flex: 1; min-width: 0; max-width: 400px; background: var(--bg); }
.search-field input { width: 100%; min-width: 0; background: none; border: 0; color: var(--text); font: 10px var(--mono); }
.search-field input::placeholder { color: var(--dim); }
#workspace select { background: var(--bg); color: var(--muted); border: 1px solid var(--line); padding: 8px; height: 32px; max-width: 140px; font: 9px var(--mono); }
.result-count { white-space: nowrap; margin-left: auto; color: var(--dim); font: 9px var(--mono); }
.empty-state { display: flex; align-items: center; justify-content: center; flex-direction: column; min-height: 205px; padding: 24px 16px; text-align: center; }
.inspection-visual { display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.inspection-visual img { width: 38px; height: 38px; opacity: .55; }
.inspection-cross { display: none; }
.empty-state h3 { font-size: 16px; font-weight: 500; margin: 0; }
.empty-state p { font: 10px/1.6 var(--mono); color: var(--muted); max-width: 360px; margin: 9px 0; }
.empty-code { font: 7px var(--mono); color: var(--accent); display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.empty-code span { color: var(--dim); }
.table-scroll { overflow: auto; max-height: 440px; }
#workspace table { border-collapse: collapse; width: 100%; text-align: left; }
#workspace th { font: 8px var(--mono); color: var(--dim); padding: 12px 14px; background: var(--surface); position: sticky; top: 0; z-index: 1; }
#workspace td { padding: 13px 14px; border-top: 1px solid var(--line); vertical-align: top; font-size: 11px; }
#workspace td:first-child { width: 100px; }
#workspace td:last-child { width: 44px; }
#workspace td:nth-child(2) { min-width: 190px; }
.finding-title { margin: 6px 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.rule-id { font: 9px var(--mono); color: var(--accent); }
.finding-location { color: var(--muted); font: 9px/1.8 var(--mono); overflow-wrap: anywhere; max-width: 230px; }
.finding-category { font: 8px var(--mono); color: var(--dim); }
.badge { font: 8px var(--mono); padding: 4px 6px; display: inline-block; border: 1px solid currentColor; border-radius: 2px; }
.inspect-button { background: none; border: 0; color: var(--accent); width: 28px; height: 28px; font-size: 18px; }
.inspect-button:hover, tr.selected { background: var(--raised); }
.detail-panel { border-top: 1px solid var(--line); padding: 18px; background: var(--raised); }
.detail-heading { display: flex; align-items: center; justify-content: space-between; }
#workspace .detail-heading .eyebrow { margin: 0; }
.detail-panel h3 { font-size: 14px; font-weight: 500; line-height: 1.5; margin-top: 10px; }
.detail-location, .decoded-note { color: var(--muted); font: 9px/1.7 var(--mono); overflow-wrap: anywhere; }
.detail-panel pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 10px/1.8 var(--mono); background: var(--bg); color: var(--text); border-left: 2px solid var(--accent); padding: 14px; }
.warnings { color: var(--amber); background: rgba(233, 196, 106, .05); border-bottom: 1px solid #665337; padding: 12px 18px; font: 10px/1.7 var(--mono); overflow-wrap: anywhere; }
.warnings p { margin: 4px 0; }
.results-footer { display: flex; gap: 14px; justify-content: space-between; padding: 11px 18px; border-top: 1px solid var(--line); color: var(--dim); font: 7px var(--mono); }
.results-footer > span:first-child { display: flex; align-items: center; gap: 8px; }

.pipeline-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px 0; margin-top: 24px; }
.pipeline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 20px 0 0; text-align: center; }
.pipeline li { position: relative; }
.pipeline li:not(:last-child):after { content: "→"; position: absolute; right: -13px; top: 7px; color: var(--dim); font-size: 15px; }
.pipeline li > span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 0 auto 9px; border: 1px solid var(--strong-line); border-radius: 50%; color: var(--accent); font: 9px var(--mono); }
.pipeline strong { display: block; font-size: 11px; font-weight: 500; color: var(--text); }
.pipeline small { display: block; font-size: 9px; color: var(--muted); margin-top: 6px; }
.integrations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 22px 0; }
.integrations article { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; min-width: 0; }
.integrations article > img { float: left; margin-right: 10px; width: 23px; height: 23px; }
.integrations h3 { font: 500 22px var(--display); margin: 0 0 9px; }
.integrations p { color: var(--muted); font-size: 11px; line-height: 1.5; clear: both; margin: 14px 0; }
.integrations code { display: block; font: 9px/1.7 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.integrations article > a { display: block; color: var(--accent); font: 10px var(--mono); margin-top: 14px; }
.boundary-note { display: flex; gap: 18px; align-items: flex-start; border-top: 1px solid var(--line); padding: 16px 0; color: var(--muted); }
.note-index { color: var(--accent); font: 8px var(--mono); white-space: nowrap; padding-top: 3px; }
.boundary-note p { font-size: 10px; line-height: 1.6; margin: 0; }
.site-footer { position: relative; display: flex; gap: 20px; justify-content: space-between; padding: 20px 32px; border-top: 1px solid var(--line); color: var(--muted); font: 10px/1.7 var(--mono); }
.footer-muted { color: var(--dim); }
.footer-divider { color: var(--accent); margin: 0 8px; }

@media (max-width: 1200px) {
  .dashboard-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 16px; }
  .scan-layout { grid-template-columns: minmax(0, 1fr) minmax(240px, .8fr); }
  .target-layout { grid-template-columns: minmax(0, 1fr); }
  .drop-zone { min-height: 100px; gap: 7px; padding: 13px; }
  .drop-zone img { width: 22px; height: 22px; }
  .risk-summary { flex-direction: column; justify-content: center; }
  .risk-meta { width: 100%; }
  .category-filters button { padding: 10px 9px; font-size: 10px; gap: 7px; }
}
@media (max-width: 900px) {
  main#workspace { padding: 24px 22px 0; }
  .dashboard-layout { grid-template-columns: minmax(0, 1fr); }
  .scope-section { padding: 16px; }
  .scope-section .section-heading { padding: 0; }
  .category-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .category-filters button { grid-template-columns: minmax(0, 1fr) 16px; padding: 9px 8px; }
  .category-filters img { display: none; }
  .sidebar-note { display: none; }
  .scan-layout { grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); }
  .target-layout { grid-template-columns: minmax(0, 1fr); }
  .workspace-facts { gap: 10px; font-size: 9px; }
  .site-footer { padding: 18px 22px; }
}
@media (max-width: 640px) {
  .service-status { font-size: 8px; }
  main#workspace { padding: 24px 16px 0; }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 22px; }
  .workspace-title { gap: 12px; }
  .workspace-title > img { width: 34px; height: 34px; }
  #workspace h1 { font-size: 29px; }
  #workspace .eyebrow { font-size: 7px; }
  .workspace-facts { justify-content: flex-start; font-size: 9px; }
  .category-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-filters button { padding: 9px; font-size: 10px; }
  .scan-layout { grid-template-columns: minmax(0, 1fr); }
  .scan-console, .scan-summary { padding: 16px; }
  .risk-summary { flex-direction: row; gap: 16px; max-width: 380px; width: 100%; margin: auto; }
  .risk-meta { width: auto; min-width: 0; }
  .summary-limits div { text-align: center; }
  .results-heading { padding: 16px; }
  .results-heading p { font-size: 9px; max-width: 180px; }
  .results-toolbar { flex-wrap: wrap; padding: 12px; }
  .search-field { flex-basis: 100%; max-width: none; }
  .result-count { font-size: 8px; }
  #workspace td, #workspace th { padding: 11px 9px; }
  #workspace td:nth-child(2) { min-width: 150px; }
  .finding-location { min-width: 95px; max-width: 120px; }
  .results-footer { flex-wrap: wrap; font-size: 6px; padding: 10px; }
  .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 8px; }
  .pipeline li:nth-child(4):after { display: none; }
  .pipeline li:not(:last-child):after { right: -8px; }
  .pipeline small { font-size: 8px; }
  .pipeline-section .section-number { display: none; }
  .integrations { grid-template-columns: minmax(0, 1fr); }
  .boundary-note { gap: 10px; }
  .boundary-note p { font-size: 9px; }
  .site-footer { flex-direction: column; gap: 8px; padding: 18px 16px; font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition: none !important; }
}