/* uig.me/honeypot. Terminal theme shared by uig.me, lab, honeypot and detections: keep the tokens and the
   "shared chrome" block identical across the four sites. The map and chart colors (--land, --seq-*,
   --bar, --event) are validated dataviz ramps for the dark surface. */


:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #16201f;
  --muted: #3d4a48;
  --dim: #55625f;
  --border: #c5d2d0;
  --border-strong: #8a9a97;
  --accent: #0b5d56;
  --accent-2: #0b5f8a;
  --warn: #985600;
  --danger: #b42318;
  --ok: #157a3d;
  --chip: #f2f6f5;
  --code-bg: #f2f6f5;
  --shadow: 0 6px 18px rgba(31, 35, 40, 0.08);
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --prose: var(--font);
  /* code, commands, numbers and data stay monospace */
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

/* ---------------------------------------------------------------- shared chrome */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
}

::selection { background: #cbe8e3; color: var(--text); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* the sticky header must not cover in-page anchor targets */
[id] { scroll-margin-top: 72px; }

.site-header {
  border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.94);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { font-weight: 700; color: var(--text); white-space: nowrap; }
.crumb { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.section { color: var(--muted); font-weight: 600; }
.section::before { content: "/ "; content: "/ " / ""; color: var(--dim); font-weight: 400; }
.section:hover { color: var(--accent); text-decoration: none; }
.brand:hover { text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-header nav a { color: var(--text); font-size: 15px; font-weight: 500; }
.site-header nav a:hover { color: var(--accent); text-decoration: none; }
.site-header nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.site-footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 24px 0; color: var(--dim); font-size: 14px; }
.site-footer .credit { margin: 8px 0 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

h1 { font-size: 1.85rem; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: 1.2rem; line-height: 1.35; margin: 40px 0 12px; font-weight: 650; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --shadow: none; }
  body { background: #fff; }
  .site-header { position: static; background: #fff; backdrop-filter: none; }
}

/* site tokens. Dataviz: one-hue map ramp, light -> dark; the event colour is an orange that stays distinct from teal */
:root {
  --land: #e7ebe8;          /* no sessions */
  --seq-1: #c6e3dd;         /* 1-9 */
  --seq-2: #7fc0b3;         /* 10-99 */
  --seq-3: #2b9483;         /* 100-999 */
  --seq-4: #0b5a51;         /* 1000+ */
  --bar: #2b9483;
  --event: #c2410c;
  --target: #1f2328;
  --ocean: #f3f6f5;
  --grid: #e3e8e6;
}


/* ---------------------------------------------------------------- uig.me/honeypot */

.wrap { max-width: 960px; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--code-bg); color: var(--accent-2); padding: 1px 5px; border-radius: var(--radius); }

main.wrap { padding-top: 32px; }
.lead { color: var(--muted); max-width: 680px; margin: 0; }
.meta { color: var(--dim); font-size: 13px; margin: 0; }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius);
  padding: 12px 18px; min-width: 150px; flex: 1 1 150px; display: flex; flex-direction: column;
}
.stat .num { font-family: var(--mono); white-space: nowrap; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.map-card { margin-top: 24px; }
.map-card h2 { margin: 0; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }

.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.controls[hidden] { display: none; }
.controls button {
  font: inherit; font-size: 14px; color: var(--text); background: var(--chip); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 12px; cursor: pointer; min-height: 32px;
}
.controls button:hover { border-color: var(--accent); }
.controls button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; }
.seg button { border-radius: 0; margin-left: -1px; }
.seg button:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.seg button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.seg button[aria-checked="true"] { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }

.progress { height: 3px; background: var(--chip); border-radius: 2px; margin: 12px 0; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.progress.live span { background: var(--event); opacity: 0.6; }

.map-wrap { position: relative; }
#map { display: block; width: 100%; height: auto; }
#map .sphere { fill: var(--ocean); stroke: var(--border); stroke-width: 1; }
#map .graticule { fill: none; stroke: var(--grid); stroke-width: 0.5; }
#map .country { fill: var(--land); stroke: var(--surface); stroke-width: 0.5; }
#map .country:hover { stroke: var(--text); stroke-width: 1; }
#map .tiny { stroke: var(--text); stroke-width: 1; }
#map .arc { fill: none; stroke: var(--event); stroke-width: 1.5; stroke-linecap: round; }
#map .src { fill: var(--event); stroke: var(--surface); stroke-width: 2; }
#map .pulse { fill: none; stroke: var(--event); stroke-width: 1.5; }
#map .target { fill: var(--surface); stroke: var(--target); stroke-width: 2; }
#map .target-ring { fill: none; stroke: var(--event); stroke-width: 1.5; opacity: 0; }
#map .target-label { fill: var(--muted); font: 12px var(--mono); }

.tooltip {
  position: absolute; pointer-events: none; background: var(--surface); color: var(--text);
  border: 1px solid var(--accent); border-radius: var(--radius); padding: 6px 10px; font-size: 13px;
  box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px));
}
.tooltip b { font-variant-numeric: tabular-nums; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend-title { color: var(--text); }
.bins { display: inline-flex; gap: 2px; align-items: center; }
.bins span { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.bins i { display: block; width: 44px; height: 10px; border-radius: 2px; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.dot-src, .dot-target { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-src { background: var(--event); }
.dot-target { border: 2px solid var(--target); }

.feed-h { margin: 20px 0 6px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.feed { list-style: none; margin: 0; padding: 0; font-size: 13px; min-height: 8em; }
.feed li {
  display: grid; grid-template-columns: 70px 150px 70px minmax(0, 1fr); gap: 10px;
  padding: 4px 0; border-top: 1px solid var(--border);
}
.feed li:first-child { border-top: 0; }
.feed .t { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.feed .where { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .kind { color: var(--muted); }
.feed .what { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .empty { display: block; color: var(--muted); }

#daily { display: block; width: 100%; height: 200px; }
#daily .bar { fill: var(--bar); }
#daily .bar:hover { opacity: 0.8; }
#daily .axis text { fill: var(--muted); font: 12px var(--mono); }
#daily .axis line, #daily .axis path { stroke: var(--border); }
#daily .grid line { stroke: var(--border); stroke-dasharray: 2 3; }

.tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tables .wide { grid-column: 1 / -1; }
table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
td { padding: 3px 0; vertical-align: top; }
td.v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
td.n { width: 4.5em; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
td.b { width: 30%; padding-left: 8px; }
td.b i { display: block; height: 8px; margin-top: 7px; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; }
table.mono td.v { font-family: var(--mono); font-size: 13px; }
.tables .meta { margin-bottom: 8px; }
td.none { color: var(--muted); }
.scroll-x { overflow-x: auto; margin-top: 10px; }
table.cols { table-layout: auto; min-width: 520px; font-variant-numeric: tabular-nums; }
table.cols th { text-align: right; font-weight: 600; font-size: 13px; color: var(--muted); padding: 0 0 6px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap; }
table.cols td { text-align: right; padding: 5px 0 5px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.cols th:nth-child(-n+2), table.cols td:nth-child(-n+2) { text-align: left; }
table.cols th:first-child, table.cols td:first-child { padding-left: 0; font-family: var(--mono); }
table.cols tr:last-child td { border-bottom: 0; }

.about p { color: var(--muted); max-width: 720px; }

.subnav { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.subnav [aria-current="page"] { color: var(--accent); font-weight: 600; }

/* long-form prose */
.notes p, .notes li { font-family: var(--prose); font-size: 16px; line-height: 1.7; }

/* weekly reports */
.week-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 24px 0 0; }
.week-pick label { font-weight: 600; }
.week-pick select {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 8px; min-height: 36px;
}
.week-pick select:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
#status:not(:empty) { margin-top: 12px; }
.stat .delta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; min-height: 1.2em; }
.notes { margin-top: 24px; }
.notes h2 { margin: 0 0 8px; }
.notes p, .notes li { max-width: 720px; }
.notes pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; font-size: 13px; }
.notes pre code { background: none; padding: 0; }
table.ttps td.b { width: 22%; }
.tactic { color: var(--accent-2); font-size: 12px; background: var(--chip); border-radius: var(--radius); padding: 1px 6px; margin-left: 4px; }
.hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 160px; align-items: end; }
.hours .h { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.hours i { display: block; background: var(--bar); border-radius: 3px 3px 0 0; min-height: 1px; }
.hours span { color: var(--muted); font-size: 11px; text-align: center; height: 16px; font-variant-numeric: tabular-nums; }

.tables.inner { gap: 24px; margin-top: 8px; }
h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 6px; font-weight: 600; }

/* network view */
.overlap { margin-top: 24px; }
.overlap h2 { margin: 0 0 8px; }
.overlap p { max-width: 720px; }
.split { display: flex; gap: 2px; height: 14px; margin: 12px 0 8px; }
.split span { display: block; min-width: 2px; border-radius: 3px; }
.split .only, .sw.only { background: var(--event); }
.split .both, .sw.both { background: var(--bar); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.overlap .legend { margin: 0 0 8px; }
.hours.days { height: 180px; }
.hours i.hi { background: var(--event); }
#view > .tables { margin-top: 24px; }

@media (max-width: 640px) {
  .tables { grid-template-columns: minmax(0, 1fr); }
  .hours { gap: 1px; }
  table.ttps td.b { display: none; }
  .feed li { grid-template-columns: 62px minmax(0, 1fr); }
  .feed .kind { display: none; }
  .feed .what { grid-column: 2; }
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 2px; }
  .site-header { position: static; }
  .site-header nav { gap: 4px 14px; }
}

@media (forced-colors: active) {
  #map .arc, #map .pulse { stroke: CanvasText; }
  #map .src { fill: CanvasText; }
}
