:root {
  /* shadcn/ui tokens (zinc), expressed as raw colors for direct use */
  --background: #ffffff; --foreground: #09090b;
  --card: #ffffff; --card-foreground: #09090b;
  --popover: #ffffff; --popover-foreground: #09090b;
  --primary: #18181b; --primary-foreground: #fafafa; --primary-2: #27272a;
  --secondary: #f4f4f5; --secondary-foreground: #18181b;
  --muted: #f4f4f5; --muted-foreground: #71717a;
  --accent: #f4f4f5; --accent-foreground: #18181b;
  --destructive: #ef4444; --destructive-foreground: #fafafa;
  --border: #e4e4e7; --input: #e4e4e7; --ring: #a1a1aa;
  --brand: #2563eb;

  /* semantic status (kept for existing badges/banners) */
  --ok: #16a34a; --ok-soft: #f0fdf4; --ok-line: #bbf7d0;
  --warn: #d97706; --warn-soft: #fffbeb; --warn-line: #fde68a;
  --err: #dc2626; --err-soft: #fef2f2; --err-line: #fecaca;
  --primary-soft: #eff6ff; --brand-line: #bfdbfe;

  /* legacy aliases used by the panel and the chart */
  --bg: var(--background); --panel: var(--card); --panel2: var(--muted); --line: var(--border);
  --side: var(--card); --side-text: var(--muted-foreground); --side-active: var(--accent);
  --text: var(--foreground);

  --radius: 8px;
  --radius-sm: 6px; --radius-lg: 10px; --radius-full: 999px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow: var(--shadow-sm);
  --ring-shadow: 0 0 0 2px var(--background), 0 0 0 4px rgb(161 161 170 / .55);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --background: #09090b; --foreground: #fafafa;
  --card: #121214; --card-foreground: #fafafa;
  --popover: #121214; --popover-foreground: #fafafa;
  --primary: #fafafa; --primary-foreground: #18181b; --primary-2: #d4d4d8;
  --secondary: #27272a; --secondary-foreground: #fafafa;
  --muted: #27272a; --muted-foreground: #a1a1aa;
  --accent: #27272a; --accent-foreground: #fafafa;
  --destructive: #7f1d1d; --destructive-foreground: #fafafa;
  --border: #27272a; --input: #27272a; --ring: #52525b;
  --brand: #60a5fa;

  --ok: #4ade80; --ok-soft: #0f2417; --ok-line: #14532d;
  --warn: #fbbf24; --warn-soft: #2a1f08; --warn-line: #78350f;
  --err: #f87171; --err-soft: #2a1214; --err-line: #7f1d1d;
  --primary-soft: #172554; --brand-line: #1e3a8a;

  --side: var(--card); --side-active: var(--accent);
  --shadow-sm: none; --shadow: none;
  --ring-shadow: 0 0 0 2px var(--background), 0 0 0 4px rgb(82 82 91 / .8);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--background); color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--muted); border: 1px solid var(--border); padding: 1px 5px; border-radius: var(--radius-sm); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
h1 { font-size: 20px; margin: 0; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 0 0 12px; font-weight: 600; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted-foreground); }
.small { font-size: 12px; }
.center { text-align: center; }
.r { text-align: right; }
.err { color: var(--err); min-height: 1em; }
.grow { flex: 1; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.wrap { flex-wrap: wrap; }
.pad { padding: 12px 16px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

input, select, textarea {
  font: inherit; color: var(--foreground); background: var(--background);
  border: 1px solid var(--input); border-radius: var(--radius-sm);
  padding: 6px 10px; outline: none; min-width: 0;
  height: 36px; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; }
input::placeholder, textarea::placeholder { color: var(--muted-foreground); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ring); box-shadow: var(--ring-shadow); }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; border-radius: 4px; }
label { display: flex; flex-direction: column; gap: 6px; color: var(--muted-foreground); font-size: 13px; font-weight: 500; }
label input, label select { color: var(--foreground); font-size: 14px; font-weight: 400; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--foreground); cursor: pointer; }
.label-text { color: var(--muted-foreground); font-size: 13px; font-weight: 500; margin-bottom: 6px; }

.btn {
  font: inherit; font-size: 14px; font-weight: 500; height: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--background); color: var(--foreground);
  border-radius: var(--radius-sm); padding: 0 14px; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent); color: var(--accent-foreground); }
.btn:focus-visible { outline: none; box-shadow: var(--ring-shadow); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: var(--primary-foreground); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--accent); color: var(--accent-foreground); border-color: transparent; }
.btn.danger { background: var(--destructive); border-color: var(--destructive); color: var(--destructive-foreground); }
.btn.danger:hover { filter: brightness(.93); color: var(--destructive-foreground); }
.btn.danger-ghost { color: var(--err); border-color: var(--border); }
.btn.danger-ghost:hover { background: var(--err-soft); border-color: var(--err); color: var(--err); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--radius-sm); }
.btn.block { width: 100%; }
.sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }

/* login */
.login { min-height: 100%; display: grid; place-items: center; background: var(--background); }
.login-card { width: min(380px, 92vw); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm); }
.login-card p { margin: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--foreground); }
.brand.big { font-size: 22px; }
.logo { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--foreground); position: relative; flex: none; }
.logo::after { content: ""; position: absolute; inset: 7px 6px 6px 5px; background: var(--background); clip-path: polygon(0 45%, 100% 0, 78% 100%, 50% 72%, 38% 92%, 36% 64%); }

/* layout */
.shell { display: flex; min-height: 100%; }
.side { width: 232px; background: var(--card); color: var(--muted-foreground); display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; flex: none; border-right: 1px solid var(--border); }
.side .brand { color: var(--foreground); padding: 4px 8px 16px; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { color: var(--muted-foreground); padding: 7px 10px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 14px; font-weight: 500; transition: background-color .15s, color .15s; }
.side nav a i { font-style: normal; width: 18px; text-align: center; opacity: .7; }
.side nav a:hover { background: var(--accent); color: var(--accent-foreground); }
.side nav a.active { background: var(--secondary); color: var(--foreground); }
.badge { margin-left: auto; background: var(--primary); color: var(--primary-foreground); border-radius: var(--radius-full); padding: 0 6px; font-size: 11px; font-weight: 600; min-width: 18px; text-align: center; line-height: 18px; }
.badge:empty { display: none; }
.side-foot { display: flex; flex-direction: column; gap: 10px; padding: 10px 8px 0; border-top: 1px solid var(--border); }
.side-foot .btn { color: var(--muted-foreground); border-color: var(--border); }
.speed-mini { display: flex; gap: 8px; align-items: center; color: var(--foreground); font-size: 15px; font-variant-numeric: tabular-nums; }
main { flex: 1; min-width: 0; padding: 0 28px 40px; }
.top { display: flex; align-items: center; gap: 12px; height: 64px; position: sticky; top: 0; background: var(--background); z-index: 5; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.top-status { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; }
.page { display: none; flex-direction: column; gap: 16px; }
.page.active { display: flex; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); color: var(--card-foreground); }
.card.flush { padding: 0; overflow: clip; } /* clip keeps sticky table headers working */
.card.narrow { max-width: 560px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.stat .label { color: var(--muted-foreground); font-size: 13px; font-weight: 500; }
.stat .value { font-size: 24px; font-weight: 600; margin: 6px 0 2px; letter-spacing: -.02em; }
.stat .sub { color: var(--muted-foreground); font-size: 12px; min-height: 18px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
#speedChart { width: 100%; display: block; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; background: var(--secondary); color: var(--secondary-foreground); border: 1px solid transparent; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.err { color: var(--err); background: var(--err-soft); }
.pill.info { color: var(--brand); background: var(--primary-soft); }
.tag { display: inline-block; padding: 1px 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; background: var(--secondary); color: var(--secondary-foreground); border: 1px solid transparent; white-space: nowrap; }

.banner { margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-line); display: flex; gap: 10px; align-items: center; font-size: 13px; }
.banner.err { background: var(--err-soft); color: var(--err); border-color: var(--err-line); }
.banner.info { background: var(--primary-soft); color: var(--brand); border-color: var(--brand-line); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar input:not([type]) , .toolbar input[type=text] { min-width: 200px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted-foreground); font-size: 12px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 64px; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: var(--accent); }
.table .w1 { width: 1%; }
.table td.name { max-width: 460px; word-break: break-all; }
.table td.name .cap { color: var(--muted-foreground); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; margin-bottom: 14px; }
.form-grid.inner { margin: 12px 0 0; }
.span2 { grid-column: 1 / -1; }
details summary { cursor: pointer; color: var(--brand); user-select: none; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { flex-direction: row; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: var(--radius-full); padding: 5px 12px; cursor: pointer; color: var(--foreground); font-size: 13px; font-weight: 500; transition: background-color .15s, border-color .15s; }
.chips label:hover { background: var(--accent); }
.chips label:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.chips input { display: none; }
.seg { display: inline-flex; background: var(--muted); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { flex-direction: row; cursor: pointer; color: var(--muted-foreground); font-weight: 500; }
.seg input { display: none; }
.seg span { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-sm); transition: .15s; }
.seg label:has(input:checked) span { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-sm); }
.hint { color: var(--muted-foreground); font-size: 12px; margin: 8px 0 0; }
.hint.warn { color: var(--warn); }
.presets { display: flex; gap: 8px; align-items: center; }
.sticky-save { position: sticky; bottom: 12px; }
.settings { display: flex; flex-direction: column; gap: 16px; }
#pwForm, #page-settings .card { display: flex; flex-direction: column; gap: 12px; }
#pwForm h3, #page-settings .card h3 { margin: 0; }
#page-settings .form-grid { margin: 0; }

.tabs { display: inline-flex; background: var(--muted); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; color: var(--muted-foreground); font: inherit; font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: .15s; }
.tabs button:hover { color: var(--foreground); }
.tabs button.active { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-sm); }
.tabs button b { font-weight: 500; opacity: .65; margin-left: 4px; }

.task-list .task { display: grid; grid-template-columns: 24px 1fr 130px 170px; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.task:hover { background: var(--accent); }
.task .t-name { font-weight: 500; word-break: break-all; }
.task .t-meta { color: var(--muted-foreground); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
.task .t-err { color: var(--err); font-size: 12px; margin-top: 3px; word-break: break-all; }
.bar { height: 6px; background: var(--muted); border-radius: var(--radius-full); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: var(--radius-full); transition: width .6s; }
.bar.done i { background: var(--ok); } .bar.failed i { background: var(--err); } .bar.paused i { background: var(--muted-foreground); }
.t-speed { text-align: right; font-variant-numeric: tabular-nums; }
.t-speed b { display: block; }
.t-ops { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.mini-list .item { padding: 9px 0; border-bottom: 1px solid var(--border); }
.mini-list .item:last-child { border: 0; }

.logs { font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; height: calc(100vh - 170px); overflow: auto; margin: 0; white-space: pre-wrap; word-break: break-all; }
.logs .t { color: var(--muted-foreground); }

.qr-box { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.qr-box img { width: 220px; height: 220px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: #fff; padding: 8px; }
.qr-ph { width: 220px; height: 220px; border-radius: var(--radius-lg); border: 1px dashed var(--border); display: grid; place-items: center; color: var(--muted-foreground); }
.acc-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.user-card { display: flex; gap: 16px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: var(--radius-full); background: var(--primary); color: var(--primary-foreground); display: grid; place-items: center; font-size: 20px; font-weight: 600; flex: none; }

.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--foreground); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--popover); color: var(--popover-foreground); border: 1px solid var(--border); padding: 11px 16px; border-radius: var(--radius); box-shadow: 0 10px 30px rgb(0 0 0 / .12); max-width: 420px; font-size: 13px; animation: pop .2s; }
.toast.err { border-color: var(--err-line); color: var(--err); }
.toast.ok { border-color: var(--ok-line); color: var(--ok); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal { position: fixed; inset: 0; background: rgb(9 9 11 / .55); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 60; }
.modal-card { background: var(--popover); color: var(--popover-foreground); border-radius: var(--radius-lg); padding: 24px; width: min(420px, 92vw); border: 1px solid var(--border); box-shadow: 0 20px 50px rgb(0 0 0 / .2); }

@media (max-width: 860px) {
  .side { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: .2s; box-shadow: 0 0 40px rgb(0 0 0 / .18); }
  .side.open { transform: none; }
  .menu-btn { display: inline-block; }
  main { padding: 0 14px 30px; }
  .task-list .task { grid-template-columns: 24px 1fr; }
  .task .t-speed, .task .t-ops { grid-column: 2; text-align: left; justify-content: flex-start; }
  .table th:nth-child(5), .table td:nth-child(5), .table th:nth-child(6), .table td:nth-child(6) { display: none; }
  .top-status .pill:not(:first-child) { display: none; }
}

/* file manager */
.crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: 14px; min-width: 200px; }
.crumbs a { padding: 3px 6px; border-radius: var(--radius-sm); color: var(--brand); }
.crumbs a:hover { background: var(--accent); text-decoration: none; }
.crumbs .sl { color: var(--muted-foreground); }
.fname { display: flex; align-items: center; gap: 10px; word-break: break-all; }
.fname .ico { width: 30px; height: 30px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 13px; flex: none; background: var(--secondary); color: var(--muted-foreground); border: 1px solid var(--border); }
.fname .ico.dir { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.fname .ico.arc { background: #f5f3ff; border-color: #ddd6fe; color: #7c3aed; }
.fname .ico.vid { background: #eff6ff; border-color: #bfdbfe; color: var(--brand); }
:root[data-theme="dark"] .fname .ico.dir { background: #2a1f08; border-color: #4a3814; color: #fbbf24; }
:root[data-theme="dark"] .fname .ico.arc { background: #241b3a; border-color: #3b2d5c; color: #a78bfa; }
:root[data-theme="dark"] .fname .ico.vid { background: #172554; border-color: #1e3a8a; color: #93c5fd; }
.fname a { color: var(--foreground); font-weight: 500; }
.fname .sub { color: var(--muted-foreground); font-size: 12px; }
.row-ops { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.row-ops .btn { height: 28px; padding: 0 9px; font-size: 12px; }
.job { padding: 11px 0; border-bottom: 1px solid var(--border); }
.job:last-child { border: 0; }
.job .errs { color: var(--err); font-size: 12px; white-space: pre-wrap; }
.modal-card.wide { width: min(520px, 94vw); display: flex; flex-direction: column; gap: 14px; }
.modal-card h3 { margin: 0; }
.dialog-body { display: flex; flex-direction: column; gap: 12px; }
.dialog-body textarea { min-height: 80px; resize: vertical; }

/* links */
.link-input { width: 100%; min-height: 150px; resize: vertical; font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin-bottom: 12px; }
.link-input:focus-visible { border-color: var(--ring); box-shadow: var(--ring-shadow); }
.link-bar { gap: 10px; }
.link-file { flex: 1 1 240px; padding: 5px 8px; font-size: 13px; height: 36px; }
.table.links { table-layout: fixed; }
.table.links th:nth-child(1) { width: 56px; }
.table.links th:nth-child(3) { width: 76px; }
.table.links th:nth-child(5) { width: 82px; }
.table.links th:nth-child(6) { width: 70px; }
.table.links th:nth-child(7) { width: 84px; }
.table.links th:nth-child(8) { width: 30%; }
.table.links td { vertical-align: top; }
.table.links td:nth-child(2) { word-break: break-all; }
.table.links .note { word-break: break-all; color: var(--muted-foreground); font-size: 12px; }
.table.links tr.bad td { background: var(--err-soft); }
.table.links tr.bad .note { color: var(--err); }

/* sites */
.site-head { display: flex; flex-direction: column; gap: 12px; }
.table.sites td { vertical-align: top; }
.site-cell { display: flex; gap: 10px; align-items: flex-start; min-width: 200px; max-width: 300px; }
.favicon { width: 32px; height: 32px; border-radius: var(--radius-sm); flex: none; object-fit: contain; background: var(--background); border: 1px solid var(--border); padding: 3px; }
.favicon.letter { display: grid; place-items: center; background: var(--primary); color: var(--primary-foreground); font-weight: 600; padding: 0; border: 0; }
.site-cell .nm { font-weight: 600; word-break: break-all; }
.site-cell a.dom { color: var(--muted-foreground); font-size: 12px; word-break: break-all; }
.desc { color: var(--muted-foreground); font-size: 13px; max-width: 360px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag.cat { cursor: pointer; background: var(--primary-soft); color: var(--brand); border-color: transparent; }
.tag.err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.srcs { font-size: 12px; color: var(--muted-foreground); max-width: 200px; }
.kv { display: grid; grid-template-columns: 80px 1fr; gap: 6px 12px; font-size: 13px; }
.kv > div:nth-child(odd) { color: var(--muted-foreground); }
.kv a, .kv div { word-break: break-all; }
.link-list { display: flex; flex-direction: column; gap: 4px; font-size: 12px; max-height: 160px; overflow: auto; }
.table.sites th { white-space: nowrap; }
.table.sites td:nth-child(5), .table.sites td:nth-child(7) { white-space: nowrap; }
.srcs { min-width: 90px; }
@media (max-width: 1280px) {
  .table.sites th:nth-child(6), .table.sites td:nth-child(6), .table.sites th:nth-child(7), .table.sites td:nth-child(7) { display: none; }
}
@media (max-width: 900px) {
  .table.sites th:nth-child(3), .table.sites td:nth-child(3) { display: none; }
}
/* Fixed layout: long descriptions must wrap instead of widening the table. */
.table.sites { table-layout: fixed; }
.table.sites th:nth-child(1) { width: 44px; }
.table.sites th:nth-child(2) { width: 26%; }
.table.sites th:nth-child(4) { width: 96px; }
.table.sites th:nth-child(5) { width: 56px; }
.table.sites th:nth-child(6) { width: 130px; }
.table.sites th:nth-child(7) { width: 100px; }
.table.sites th:nth-child(8) { width: 72px; }
.table.sites .site-cell { min-width: 0; max-width: none; }
.table.sites .desc { max-width: none; }
.table.sites .row-ops { flex-direction: column; align-items: flex-end; }
