/* Exploit Intelligence — shared stylesheet.
   Tokens follow dynconnect.com; dark values are tuned for ≥4.5:1 text contrast. */

:root {
  --paper: #FCFBF9;
  --paper-2: #F4F2EC;
  --paper-3: #EDEAE2;
  --card: #FFFFFF;
  --ink: #15181D;
  --ink-2: #525A6A;
  --ink-3: #8B94A4;
  --ink-3-text: #69717F;           /* --ink-3 darkened for small text contrast */
  --line: #E5E1D8;
  --line-2: #D2CDC2;
  --accent: #1A4FD6;
  --accent-ink: #12379B;
  --accent-soft: #EDF2FF;
  --ok: #0E7A4C;
  --warn: #9A6200;
  --danger: #B42318;
  --sh-sm: 0 1px 2px rgba(20,24,32,.05), 0 2px 6px rgba(20,24,32,.04);
  --sh-md: 0 2px 4px rgba(20,24,32,.04), 0 10px 26px rgba(20,24,32,.07);
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 10px;

  /* chip tones: background / text */
  --c-danger-bg: #FDE7E5;  --c-danger-fg: #8F1C13;
  --c-warn-bg:   #FBEFD9;  --c-warn-fg:   #7A4D00;
  --c-ok-bg:     #E2F3EA;  --c-ok-fg:     #0A5C39;
  --c-info-bg:   #EDF2FF;  --c-info-fg:   #12379B;
  --c-quiet-bg:  #EFEDE7;  --c-quiet-fg:  #4A505C;

  /* priorities */
  --p0-bg: #7A0E0E; --p0-fg: #FFFFFF;
  --p1-bg: #C4320A; --p1-fg: #FFFFFF;
  --p2-bg: #FBEFD9; --p2-fg: #7A4D00;
  --p3-bg: #EDF2FF; --p3-fg: #12379B;
  --p4-bg: #EFEDE7; --p4-fg: #4A505C;

  /* severities */
  --s-critical-bg: #FDE7E5; --s-critical-fg: #8F1C13;
  --s-high-bg: #FDEBDD;     --s-high-fg: #8A3A06;
  --s-medium-bg: #FBEFD9;   --s-medium-fg: #6E4600;
  --s-low-bg: #E8F0FB;      --s-low-fg: #23467F;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111317;
    --paper-2: #171A1F;
    --paper-3: #1E2228;
    --card: #181B21;
    --ink: #ECEDEF;
    --ink-2: #B4BAC5;
    --ink-3: #8D95A3;
    --ink-3-text: #9AA2AF;
    --line: #2A2F37;
    --line-2: #383E48;
    --accent: #7A9CFF;
    --accent-ink: #A9BFFF;
    --accent-soft: #1C2540;
    --ok: #4CC38A;
    --warn: #E0A73A;
    --danger: #FF7B6E;
    --sh-sm: 0 1px 2px rgba(0,0,0,.4);
    --sh-md: 0 4px 18px rgba(0,0,0,.45);
    --c-danger-bg: #3A1614;  --c-danger-fg: #FFB4AB;
    --c-warn-bg:   #352812;  --c-warn-fg:   #F2C46B;
    --c-ok-bg:     #12301F;  --c-ok-fg:     #8FE0B4;
    --c-info-bg:   #1C2540;  --c-info-fg:   #B3C6FF;
    --c-quiet-bg:  #252A31;  --c-quiet-fg:  #C3C8D0;
    --p0-bg: #FF6B5E; --p0-fg: #1A0503;
    --p1-bg: #FF9C66; --p1-fg: #1F0B00;
    --p2-bg: #352812; --p2-fg: #F2C46B;
    --p3-bg: #1C2540; --p3-fg: #B3C6FF;
    --p4-bg: #252A31; --p4-fg: #C3C8D0;
    --s-critical-bg: #3A1614; --s-critical-fg: #FFB4AB;
    --s-high-bg: #3A2111;     --s-high-fg: #FFBE8F;
    --s-medium-bg: #352812;   --s-medium-fg: #F2C46B;
    --s-low-bg: #18263D;      --s-low-fg: #A9C4F2;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #111317;
  --paper-2: #171A1F;
  --paper-3: #1E2228;
  --card: #181B21;
  --ink: #ECEDEF;
  --ink-2: #B4BAC5;
  --ink-3: #8D95A3;
  --ink-3-text: #9AA2AF;
  --line: #2A2F37;
  --line-2: #383E48;
  --accent: #7A9CFF;
  --accent-ink: #A9BFFF;
  --accent-soft: #1C2540;
  --ok: #4CC38A;
  --warn: #E0A73A;
  --danger: #FF7B6E;
  --sh-sm: 0 1px 2px rgba(0,0,0,.4);
  --sh-md: 0 4px 18px rgba(0,0,0,.45);
  --c-danger-bg: #3A1614;  --c-danger-fg: #FFB4AB;
  --c-warn-bg:   #352812;  --c-warn-fg:   #F2C46B;
  --c-ok-bg:     #12301F;  --c-ok-fg:     #8FE0B4;
  --c-info-bg:   #1C2540;  --c-info-fg:   #B3C6FF;
  --c-quiet-bg:  #252A31;  --c-quiet-fg:  #C3C8D0;
  --p0-bg: #FF6B5E; --p0-fg: #1A0503;
  --p1-bg: #FF9C66; --p1-fg: #1F0B00;
  --p2-bg: #352812; --p2-fg: #F2C46B;
  --p3-bg: #1C2540; --p3-fg: #B3C6FF;
  --p4-bg: #252A31; --p4-fg: #C3C8D0;
  --s-critical-bg: #3A1614; --s-critical-fg: #FFB4AB;
  --s-high-bg: #3A2111;     --s-high-fg: #FFBE8F;
  --s-medium-bg: #352812;   --s-medium-fg: #F2C46B;
  --s-low-bg: #18263D;      --s-low-fg: #A9C4F2;
  color-scheme: dark;
}

/* -- base ------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: .95rem; font-weight: 650; }
p { margin: 0 0 .75em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a.ext::after { content: " ↗"; font-size: .85em; color: var(--ink-3-text); }
code, .mono, kbd { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--ink-3-text); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.pad { padding: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip {
  position: absolute; left: 8px; top: -40px; background: var(--card); padding: 6px 10px;
  border-radius: 6px; z-index: 100; box-shadow: var(--sh-md);
}
.skip:focus { top: 8px; }

/* -- header ----------------------------------------------------------------- */

#site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  max-width: 1600px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  padding: 6px 10px; border-radius: 6px; color: var(--ink-2); font-weight: 500;
}
.nav a:hover { background: var(--paper-2); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.user-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signout { color: var(--ink-2); }

.bell-wrap { position: relative; }
.bell { position: relative; }
.bell-count {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px;
  font-weight: 700; text-align: center;
}
:root[data-theme="dark"] .bell-count { color: #1A0503; }
.bell-panel {
  position: absolute; right: 0; top: calc(100% + 6px); width: min(420px, calc(100vw - 32px));
  max-height: 70vh; overflow: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--sh-md); z-index: 30;
}
.bell-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-list li { padding: 10px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.bell-list li.unread { background: var(--accent-soft); }
.bell-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .8rem; }

/* -- layout ----------------------------------------------------------------- */

main { max-width: 1600px; margin: 0 auto; padding: 20px 16px 48px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.page-head h1 { margin: 0; overflow-wrap: anywhere; }
.page-head > div { min-width: 0; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--sh-sm);
}
.section { padding: 16px; margin-bottom: 16px; min-width: 0; }
.section > h2 { margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* -- cards (summary) ---------------------------------------------------------- */

.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  margin-bottom: 16px;
}
.stat {
  padding: 12px 14px; display: grid; gap: 4px; min-width: 0; color: var(--ink);
  border-left: 4px solid var(--line-2);
}
a.stat:hover { text-decoration: none; box-shadow: var(--sh-md); }
.stat .stat-label { font-size: .78rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat .stat-value { font-family: var(--mono); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.stat .stat-value.text { font-family: var(--sans); font-size: 1.15rem; padding: 4px 0; }
.stat .stat-sub { font-size: .8rem; color: var(--ink-3-text); overflow-wrap: anywhere; }
.stat.tone-danger { border-left-color: var(--danger); }
.stat.tone-warn { border-left-color: var(--warn); }
.stat.tone-ok { border-left-color: var(--ok); }
.stat.tone-info { border-left-color: var(--accent); }

/* -- refresh bar ----------------------------------------------------------- */

.syncbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px;
  margin-bottom: 16px;
}
.syncbar .sync-times { display: flex; gap: 20px; flex-wrap: wrap; font-size: .9rem; }
.syncbar .sync-times div { display: grid; }
.syncbar .sync-times span:first-child { font-size: .75rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.syncbar .sync-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spinner {
  width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* -- buttons & forms --------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  font: inherit; font-weight: 600; font-size: .9rem; padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--paper-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
:root[data-theme="dark"] .btn-primary { color: #0B1430; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0B1430; } }
.btn-danger { color: var(--danger); border-color: var(--line-2); }
.btn-ghost { background: transparent; border-color: transparent; padding: 6px 8px; }
.btn-ghost:hover { background: var(--paper-2); }
.btn-small { padding: 3px 9px; font-size: .8rem; }
.btn-refresh { padding: 9px 18px; font-size: .95rem; }
.icon-btn {
  background: transparent; border: 1px solid transparent; border-radius: 6px; cursor: pointer;
  padding: 2px 6px; font: inherit; color: var(--ink-2); line-height: 1.2;
}
.icon-btn:hover { background: var(--paper-2); border-color: var(--line); }
.icon-btn[aria-pressed="true"] { color: var(--warn); }

input[type="text"], input[type="search"], input[type="email"], input[type="date"], input[type="number"],
select, textarea {
  font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line-2);
  border-radius: 7px; padding: 6px 9px; min-width: 0; max-width: 100%;
}
textarea { width: 100%; min-height: 64px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
select[multiple] { min-height: 92px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > label { font-size: .78rem; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: end; }

/* -- toolbar / filters ------------------------------------------------------- */

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.toolbar > * { min-width: 0; max-width: 100%; }
.toolbar select { max-width: 100%; }
.toolbar .search { flex: 1 1 280px; min-width: 0; }
.toolbar .search input { width: 100%; }
.filters { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.filters[hidden] { display: none; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.checkgroup { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 8px; margin: 0; min-width: 0; background: var(--card); }
.checkgroup legend { font-size: .75rem; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; padding: 0 4px; }
.checkgroup .check { display: flex; font-size: .85rem; padding: 1px 0; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.active-filters:empty { display: none; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 999px; padding: 2px 4px 2px 10px; font-size: .8rem; border: 0; font: inherit; font-size: .8rem; cursor: pointer;
}
.pill span[aria-hidden] { padding: 0 6px; }

/* -- tables ----------------------------------------------------------------- */

.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th, table.data td {
  padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top;
}
table.data thead th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2);
  font-weight: 650; background: var(--paper-2); position: sticky; top: 0; white-space: nowrap;
}
table.data tbody tr:hover { background: var(--paper-2); }
table.data td.num { font-family: var(--mono); text-align: right; white-space: nowrap; }
table.data td.empty { text-align: center; padding: 24px; }
th button.sort {
  all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center;
  color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit;
}
th button.sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
th .sort-ind { font-family: var(--mono); color: var(--accent-ink); font-size: .9em; }
.vuln-id { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.vuln-title { display: block; color: var(--ink-2); font-size: .8rem; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { background: var(--paper-3); color: var(--ink-2); border-radius: 4px; padding: 0 6px; font-size: .78rem; white-space: nowrap; }
.pkg { font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; }
.new-badge {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; font-size: .68rem;
  font-weight: 700; letter-spacing: .05em; background: var(--accent); color: #fff; vertical-align: 1px;
}
:root[data-theme="dark"] .new-badge { color: #0B1430; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .new-badge { color: #0B1430; } }
.kev-badge { font-size: .7rem; font-weight: 700; padding: 0 5px; border-radius: 4px; background: var(--c-danger-bg); color: var(--c-danger-fg); margin-left: 4px; }

.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; justify-content: space-between; }
.pager .row { gap: 6px; }

/* -- chips ------------------------------------------------------------------- */

.chip {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .76rem; font-weight: 600;
  white-space: nowrap; line-height: 1.6;
}
.chip-danger { background: var(--c-danger-bg); color: var(--c-danger-fg); }
.chip-warn { background: var(--c-warn-bg); color: var(--c-warn-fg); }
.chip-ok { background: var(--c-ok-bg); color: var(--c-ok-fg); }
.chip-info { background: var(--c-info-bg); color: var(--c-info-fg); }
.chip-quiet { background: var(--c-quiet-bg); color: var(--c-quiet-fg); }
.chip-sev-critical { background: var(--s-critical-bg); color: var(--s-critical-fg); }
.chip-sev-high { background: var(--s-high-bg); color: var(--s-high-fg); }
.chip-sev-medium { background: var(--s-medium-bg); color: var(--s-medium-fg); }
.chip-sev-low { background: var(--s-low-bg); color: var(--s-low-fg); }

.prio {
  display: inline-block; min-width: 30px; text-align: center; padding: 1px 6px; border-radius: 6px;
  font-family: var(--mono); font-weight: 700; font-size: .8rem;
}
.prio-p0 { background: var(--p0-bg); color: var(--p0-fg); }
.prio-p1 { background: var(--p1-bg); color: var(--p1-fg); }
.prio-p2 { background: var(--p2-bg); color: var(--p2-fg); }
.prio-p3 { background: var(--p3-bg); color: var(--p3-fg); }
.prio-p4 { background: var(--p4-bg); color: var(--p4-fg); }
.prio-lg { font-size: 1.1rem; padding: 4px 10px; }

/* -- notices / toasts --------------------------------------------------------- */

.notice { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-2); margin: 0 0 12px; }
.notice-danger { background: var(--c-danger-bg); color: var(--c-danger-fg); border-color: transparent; }
.notice-warn { background: var(--c-warn-bg); color: var(--c-warn-fg); border-color: transparent; }
.notice-info { background: var(--c-info-bg); color: var(--c-info-fg); border-color: transparent; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: calc(100vw - 32px); }
.toast { padding: 10px 14px; border-radius: 8px; box-shadow: var(--sh-md); background: var(--card); border: 1px solid var(--line); }
.toast-danger { background: var(--c-danger-bg); color: var(--c-danger-fg); }
.toast-ok { background: var(--c-ok-bg); color: var(--c-ok-fg); }

/* -- detail page ------------------------------------------------------------ */

.detail-head { padding: 16px; margin-bottom: 16px; display: grid; gap: 10px; }
.detail-head .ids { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-head h1 { font-family: var(--mono); font-size: 1.35rem; margin: 0; overflow-wrap: anywhere; }
.detail-head .title { font-size: 1.05rem; color: var(--ink-2); margin: 0; overflow-wrap: anywhere; }
.attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.attr { display: grid; gap: 2px; min-width: 0; }
.attr dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 600; }
.attr dd { margin: 0; overflow-wrap: anywhere; }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--ink-2); font-weight: 600; font-size: .85rem; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.derived-note { font-size: .8rem; color: var(--ink-3-text); font-style: italic; margin-top: 8px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line-2); display: grid; gap: 10px; }
.timeline li { position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent);
}
.timeline .when { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); }
.layout-detail { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.layout-detail > div { min-width: 0; }
.tracking-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; align-items: end; margin-top: 8px; }
.tracking-form .wide { grid-column: 1 / -1; }

/* -- assets ---------------------------------------------------------------- */

.dropzone {
  border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 24px; text-align: center;
  color: var(--ink-2); background: var(--paper-2); cursor: pointer;
}
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.counts { display: flex; gap: 10px; flex-wrap: wrap; }
.count-box { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; min-width: 120px; display: grid; }
.count-box strong { font-family: var(--mono); font-size: 1.3rem; }

/* -- login ------------------------------------------------------------------ */

.login {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
}
.login .card { padding: 32px; max-width: 420px; width: 100%; text-align: center; display: grid; gap: 16px; }
.login .brand { justify-content: center; font-size: 1.1rem; }

/* -- responsive ------------------------------------------------------------- */

@media (max-width: 1100px) {
  .layout-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .header-tools { margin-left: 0; width: 100%; justify-content: space-between; }
  .user-name { max-width: 120px; }
}

/* Phone: tables become stacked cards. */
@media (max-width: 680px) {
  main { padding: 16px 16px 40px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-wrap { overflow-x: visible; }
  table.data.stackable, table.data.stackable tbody, table.data.stackable tr, table.data.stackable td {
    display: block; width: 100%;
  }
  /* Each cell carries its header as data-label, rendered by ::before below. */
  table.data.stackable thead { display: none; }
  table.data.stackable tr {
    border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; padding: 6px 4px; background: var(--card);
  }
  table.data.stackable td {
    border: 0; padding: 4px 10px; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px;
  }
  table.data.stackable td::before {
    content: attr(data-label); font-size: .72rem; text-transform: uppercase; color: var(--ink-2);
    font-weight: 600; letter-spacing: .03em; padding-top: 2px;
  }
  table.data.stackable td.num { text-align: left; }
  table.data.stackable td > * { min-width: 0; max-width: 100%; }
  table.data.stackable td, table.data.stackable code { overflow-wrap: anywhere; }
  table.data.stackable select { width: 100%; }
  .vuln-title { white-space: normal; max-width: none; }
  dl.kv { grid-template-columns: minmax(0, 1fr); }
  dl.kv dd { margin-bottom: 6px; }
}
