:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #637083;
  --line: #dbe1ea;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --warn: #9a6700;
  --local: #6b4eff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: #075985;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 36px;
  line-height: 1.05;
}

.domain {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
  overflow-wrap: anywhere;
}

.controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 18px;
}

input,
button,
.primary {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

input {
  width: 100%;
  padding: 0 14px;
  background: var(--panel);
  color: var(--ink);
}

.filters {
  display: flex;
  gap: 8px;
}

button,
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

button.active,
.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.summary div {
  min-height: 82px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary strong {
  display: block;
  font-size: 26px;
}

.summary span {
  color: var(--muted);
  font-size: 13px;
}

.group {
  margin-top: 26px;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.group-title h2 {
  font-size: 18px;
}

.group-title span {
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.card-head p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.card h3 {
  margin-top: 4px;
  font-size: 20px;
}

.badge {
  align-self: flex-start;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  background: #e7f6f3;
  color: #0f766e;
}

.badge.tailnet {
  background: #fff3d8;
  color: var(--warn);
}

.badge.local {
  background: #eeebff;
  color: var(--local);
}

.desc {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.45;
}

dl {
  margin: 16px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.actions a,
.actions button {
  flex: 1 1 0;
}

.empty {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

@media (max-width: 760px) {
  .topbar,
  .controls {
    grid-template-columns: 1fr;
    display: grid;
  }

  .domain {
    text-align: left;
  }

  .filters {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .summary,
  .grid {
    grid-template-columns: 1fr;
  }
}
