:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #fff;
  --sidebar: #f0f0f3;
  --text: #1d1d1f;
  --muted: #64646b;
  --line: #dedee4;
  --accent: #06c;
  --accent-text: #fff;
  --selected: #e1ecfa;
  --danger: #b42318;
  --success: #21653b;
  --warn: #855200;
  --input: #fff;
  --radius: 14px;
  --row-pad: 17px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111113;
  --surface: #1c1c1e;
  --sidebar: #171719;
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --line: #36363c;
  --accent: #409cff;
  --accent-text: #071a30;
  --selected: #192f49;
  --danger: #ff9b93;
  --success: #83d8a2;
  --warn: #edc078;
  --input: #252528;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
[hidden] {
  display: none !important;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
button,
input,
select {
  font: inherit;
}
button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 15px;
  min-height: 40px;
  cursor: pointer;
  font-weight: 550;
  transition:
    background 0.16s,
    color 0.16s;
}
button:hover {
  background: var(--sidebar);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}
.primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}
.primary:hover {
  filter: brightness(0.94);
  background: var(--accent);
}
.quiet {
  border-color: transparent;
  background: transparent;
}
.danger {
  color: var(--danger);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: var(--selected);
  color: var(--text);
}
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--input);
  color: var(--text);
  caret-color: var(--accent);
  min-height: 43px;
}
input::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:invalid:not(:placeholder-shown) {
  box-shadow: none;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 550;
}
label small {
  font-weight: 400;
  color: var(--muted);
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}
.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
h2 {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
.muted,
small {
  color: var(--muted);
}
p {
  max-width: 72ch;
}
p + p {
  margin-top: 8px;
}
code,
pre {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.87em;
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  line-height: 1.9;
  background: var(--bg);
  padding: 16px;
  border-radius: 9px;
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  background: var(--surface);
  padding: 12px;
  z-index: 20;
}
.skip:focus {
  top: 10px;
}
.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100dvh;
}
aside {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 32px 18px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-size: 17px;
  padding: 0 6px 34px;
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 450;
  margin-top: 3px;
  letter-spacing: 0.03em;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 14px;
}
.brand-mark.small {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}
.brand-mark svg {
  width: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-mark.small svg {
  width: 23px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
nav a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
}
nav a:hover {
  background: var(--bg);
  color: var(--text);
}
nav a[aria-current="page"] {
  background: var(--selected);
  color: var(--accent);
}
.aside-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 10px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
header {
  height: 76px;
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
header > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
main {
  padding: 38px 42px 50px;
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}
.page-heading p {
  margin-top: 8px;
  font-size: 14px;
}
.badge {
  display: inline-block;
  font-size: 12px;
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.good {
  color: var(--success);
}
.badge.warning {
  color: var(--warn);
}
.badge.bad {
  color: var(--danger);
}
footer {
  padding: 18px 42px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-heading {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}
.panel-body {
  padding: 24px;
}
.panel-body p {
  margin: 8px 0 20px;
}
.table-wrap {
  height: clamp(260px, 48dvh, 480px);
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: inset 0 -1px var(--line);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
th {
  text-align: left;
  font-weight: 550;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  padding: 12px 22px;
  white-space: nowrap;
}
td {
  text-align: left;
  padding: var(--row-pad) 22px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
td strong {
  display: block;
  font-weight: 550;
  color: var(--text);
}
td small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}
td button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
  white-space: nowrap;
}
td .row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
}
tr:hover td {
  background: var(--bg);
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar input {
  max-width: 320px;
}
.toolbar select {
  width: auto;
}
.toolbar .count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
}
.empty h2 {
  color: var(--text);
  margin-bottom: 9px;
}
.empty p {
  margin: 0 auto 20px;
}
.empty button {
  margin-top: 5px;
}
.notice,
#message {
  padding: 15px 18px;
  background: var(--selected);
  border-radius: 9px;
  font-size: 13px;
  margin-bottom: 20px;
  color: var(--text);
  overflow-wrap: anywhere;
}
#message.error,
.notice.error {
  color: var(--danger);
  background: var(--surface);
  border: 1px solid var(--line);
}
.error {
  color: var(--danger);
  font-size: 13px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 27px;
  flex-wrap: wrap;
}

dl {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 13px;
  font-size: 13px;
  margin: 0;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 17px 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  padding: 28px;
  max-width: 480px;
  width: calc(100% - 32px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 16px 60px #0003;
}
dialog::backdrop {
  background: #0005;
  backdrop-filter: blur(5px);
}
dialog p {
  margin-top: 15px;
  font-size: 14px;
  color: var(--muted);
}
.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 36px 20px;
}
.auth-panel {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 38px;
}
.auth-panel h1 {
  margin-top: 23px;
  font-size: 25px;
}
.auth-panel > .muted {
  font-size: 14px;
  margin-top: 9px;
}
.auth-panel form {
  display: flex;
  flex-direction: column;
  gap: 19px;
  margin-top: 28px;
}
.auth-panel label {
  font-size: 13px;
}
.auth-panel form button {
  margin-top: 5px;
}
.auth-note {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 28px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
#auth-error {
  margin-top: 15px;
}
#enroll h2,
#recovery h2 {
  margin-top: 25px;
}
#enroll p,
#recovery p {
  font-size: 13px;
  margin-top: 12px;
  color: var(--muted);
}
#enroll img {
  display: block;
  max-width: 100%;
  margin: 20px auto;
  border-radius: 9px;
}
details {
  font-size: 12px;
}
summary {
  cursor: pointer;
  color: var(--accent);
}
details code {
  display: block;
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.loading {
  padding: 40px;
  color: var(--muted);
  min-height: 180px;
}
.loading::before {
  content: "";
  display: block;
  height: 12px;
  width: 40%;
  border-radius: 4px;
  background: var(--line);
  margin-bottom: 15px;
}
.loading::after {
  content: "";
  display: block;
  height: 12px;
  width: 65%;
  border-radius: 4px;
  background: var(--line);
}
html[data-density="compact"] {
  --row-pad: 10px;
}
@media (max-width: 1000px) {
  .app-shell {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  main {
    padding: 28px 24px;
  }
  header,
  footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .brand {
    font-size: 15px;
    gap: 8px;
  }
  .brand small {
    font-size: 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .app-shell {
    display: block;
  }
  aside {
    position: static;
    height: auto;
    padding: 16px 16px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    padding: 0 0 15px;
  }
  .brand small,
  .aside-bottom {
    display: none;
  }
  nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
  }
  nav a {
    padding: 8px 12px;
    white-space: nowrap;
    font-size: 12px;
  }
  header {
    height: 56px;
    padding: 0 18px;
  }
  main {
    padding: 26px 18px;
  }
  h1 {
    font-size: 24px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
  }
  .page-heading > .primary {
    font-size: 12px;
    padding: 8px 11px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .panel-heading,
  .panel-body {
    padding: 18px;
  }
  th,
  td {
    padding-left: 15px;
    padding-right: 15px;
  }
  footer {
    padding: 16px 18px;
    flex-wrap: wrap;
  }
  .auth-panel {
    padding: 28px 24px;
  }
  .toolbar input {
    max-width: 100%;
  }
  .toolbar .count {
    margin-left: 0;
  }
  dl {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 12px;
  }
  header > div {
    gap: 4px;
  }
  #page-crumb {
    max-width: 115px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.mobile-only {
  display: none;
}
#page-title:focus-visible {
  outline: none;
}
.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;
}
.table-wrap table {
  min-width: 680px;
}
.table-wrap td:first-child {
  min-width: 160px;
}
.table-wrap td code {
  white-space: nowrap;
  overflow-wrap: normal;
}
.table-wrap td .row-actions {
  gap: 8px;
}
.table-wrap tr.task-current td {
  background: var(--selected);
}
.table-wrap:focus-visible {
  outline-offset: -3px;
}
.operations-table {
  min-width: 900px !important;
}
.operations-table td:nth-child(3) {
  min-width: 220px;
}
.row-actions {
  display: flex;
  gap: 8px;
}
@media (max-width: 700px) {
  button {
    min-height: 44px;
  }
  nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .mobile-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  header #page-crumb {
    max-width: 100px;
  }
  td button {
    min-height: 44px;
  }
  header {
    gap: 8px;
  }
  header .quiet {
    padding-left: 8px;
    padding-right: 8px;
  }
  header > div {
    flex-shrink: 0;
  }
}

/* Navigation stays visually distinct from actions that change a site. */
.navigation-link,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}
.navigation-link:hover,
.back-link:hover {
  background: var(--selected);
}
.navigation-link svg,
.back-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.back-link {
  margin: -12px 0 16px -10px;
}
.actions .back-link {
  margin: 0;
}
.attention-list {
  list-style: none;
  margin: 0;
  padding: 0 24px;
}
.attention-list li {
  padding: 18px 0;
}
.attention-list li + li {
  border-top: 1px solid var(--line);
}
.attention-list small {
  display: block;
  margin-top: 6px;
}
.current-submission {
  color: var(--accent);
}
@media (max-width: 700px) {
  .navigation-link,
  .back-link {
    min-height: 44px;
  }
}
.site-indicators {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.site-state-detail {
  max-width: 64ch;
  overflow-wrap: anywhere;
}
.badge.good {
  background: color-mix(in srgb, var(--success) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 25%, var(--surface));
}
.badge.warning {
  background: color-mix(in srgb, var(--warn) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--warn) 28%, var(--surface));
}
.badge.bad {
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 25%, var(--surface));
}

#theme {
  width: auto;
  min-height: 36px;
  padding: 6px 9px;
  font-size: 12px;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.panel-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.record-note {
  padding: 13px 24px;
  color: var(--muted);
  font-size: 12px;
}
.operations-table .operation-status {
  width: 120px;
  min-width: 120px;
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 700px) {
  header #page-crumb {
    display: none;
  }
  header > div {
    width: 100%;
    justify-content: flex-end;
  }
  #theme {
    margin-right: auto;
    min-height: 44px;
  }
  .panel-heading {
    flex-wrap: wrap;
  }
  .panel-tools {
    gap: 4px;
  }
  .record-note {
    padding: 12px 18px;
  }
}

.detail-note {
  display: block;
  margin-top: 5px;
}

.site-detail,
.page-heading.site-page {
  width: 100%;
}
.site-address {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.site-address:hover {
  color: var(--accent);
  text-decoration: underline;
}
.site-address svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  min-height: 36px;
  padding: 7px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.icon-button svg,
.toast-icon svg,
.dialog-symbol svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: min(580px, calc(100% - 32px));
  padding: 12px 12px 12px 18px;
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  box-shadow: 0 8px 32px #0003;
  font-size: 13px;
  line-height: 1.6;
  animation: toast-enter 180ms ease-out;
}
.toast-icon {
  display: flex;
  color: var(--accent);
  flex-shrink: 0;
}
.toast.error .toast-icon {
  color: var(--danger);
}
#toast-text {
  overflow-wrap: anywhere;
}
dialog[open] {
  animation: dialog-enter 180ms ease-out;
}
.dialog-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--selected);
  color: var(--accent);
}
.dialog-danger .dialog-symbol {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}
.dialog-danger #confirm-submit {
  background: var(--danger);
  color: var(--surface);
}
.dialog-preview,
.site-info-dialog {
  max-width: 720px;
}
.preview-list {
  display: block;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.preview-list > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.preview-list dd small {
  display: block;
  margin-bottom: 3px;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.dialog-heading p {
  margin-top: 6px;
  font-size: 13px;
}
.site-info-hero {
  padding-bottom: 24px;
}
.site-info-hero h3 {
  margin-bottom: 8px;
  font-size: 23px;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.site-info-hero .site-indicators {
  margin-top: 18px;
}
.site-info-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.site-info-sections section {
  min-width: 0;
}
.site-info-sections h3 {
  margin-bottom: 16px;
  font-size: 14px;
}
.site-info-sections dl {
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  font-size: 12px;
}
.site-info-observation {
  border-top: 1px solid var(--line);
  padding: 20px 0 4px;
}
.site-info-observation p {
  font-size: 13px;
  margin: 10px 0;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
@keyframes toast-enter {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes dialog-enter {
  from { opacity: 0; translate: 0 8px; scale: 0.985; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
@media (max-width: 700px) {
  dialog { padding: 22px; max-height: calc(100dvh - 24px); }
  .site-info-sections { grid-template-columns: 1fr; }
  .preview-list > div { grid-template-columns: 90px minmax(0, 1fr); gap: 12px; }
  .toast { bottom: max(16px, env(safe-area-inset-bottom)); }
  .icon-button { min-height: 44px; width: 44px; }
}
.site-status-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.5fr;
  gap: 24px;
}
.site-status-grid > div {
  min-width: 0;
}
.site-status-grid dt {
  font-size: 12px;
}
.site-status-grid dd {
  margin-top: 9px;
  line-height: 1.65;
}
.site-status-grid .detail-note {
  font-size: 12px;
}
.site-lifecycle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.status-retry {
  margin-top: 12px;
}
.site-detail .form-intro {
  margin: 0 0 24px;
  font-size: 13px;
}
.page-heading.site-page h1 {
  overflow-wrap: anywhere;
}
@media (max-width: 1000px) and (min-width: 701px) {
  .site-status-grid {
    grid-template-columns: 1fr 1fr;
  }
  .site-status-grid > div:last-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 700px) {
  .site-status-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .site-lifecycle .row-actions {
    flex-wrap: wrap;
  }
  .site-address {
    display: inline;
  }
  .site-address svg {
    margin-left: 6px;
    vertical-align: middle;
  }
}

/* Dashboard uses certificate evidence; motion is reserved for active tasks. */
.tone-good { --status-color: var(--success); }
.tone-warning { --status-color: var(--warn); }
.tone-bad { --status-color: var(--danger); }
.tone-paused { --status-color: var(--muted); }
.tone-working { --status-color: var(--accent); }
.section-caption {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.console-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 22px 24px;
}
.console-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--selected);
  color: var(--accent);
  flex-shrink: 0;
}
.console-emblem svg,
.console-entry svg,
.tile-symbol svg,
.activity-symbol svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.console-address {
  flex: 1 1 170px;
  min-width: 0;
}
.console-address strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.console-facts {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 20px;
}
.console-fact {
  display: grid;
  grid-template-rows: auto minmax(28px, auto);
  align-items: center;
  justify-items: start;
  gap: 7px;
}
.console-fact > span:first-child { font-size: 11px; color: var(--muted); }
.console-fact > strong { font-size: 12px; font-weight: 500; }
.console-strip .row-actions { flex-wrap: wrap; }
.console-error { padding: 0 24px 20px; font-size: 12px; color: var(--danger); overflow-wrap: anywhere; }
.console-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  width: 100%;
  border-color: transparent;
  padding: 8px;
  margin-left: -8px;
  background: transparent;
  font-size: 12px;
}
.console-entry svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--accent); }
.console-entry span { min-width: 0; }
.console-entry small { display: block; font-size: 10px; margin-top: 3px; overflow-wrap: anywhere; }
.board-summary {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.board-total { display: flex; align-items: baseline; gap: 10px; flex-shrink: 0; }
.board-total > strong { font-size: 32px; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.board-total > span { color: var(--muted); font-size: 12px; }
.board-distribution { flex: 1; min-width: 0; }
.board-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 12px; }
.legend-item { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; }
.legend-item i { width: 7px; height: 7px; border-radius: 50%; background: var(--status-color); }
.legend-item strong { color: var(--text); font-variant-numeric: tabular-nums; }
.distribution-track { display: block; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg); }
.distribution-good { fill: var(--success); }
.distribution-warning { fill: var(--warn); }
.distribution-bad { fill: var(--danger); }
.distribution-working { fill: var(--accent); }
.distribution-paused { fill: var(--muted); }
.site-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  height: 390px;
  padding: 24px;
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.site-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  min-width: 0;
  min-height: 180px;
  padding: 18px;
  border-radius: 12px;
  font-weight: 400;
  background: var(--surface);
  transition: border-color 160ms, background 160ms;
}
.site-tile:hover { border-color: var(--status-color); background: var(--bg); }
.tile-heading { display: flex; align-items: center; gap: 8px; color: var(--status-color); font-size: 11px; min-height: 26px; }
.tile-symbol { display: flex; flex-shrink: 0; }
.tile-symbol svg { width: 21px; height: 21px; }
.tile-state { flex: 1; min-width: 0; }
.tile-heading > svg { width: 13px; height: 13px; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.tile-domain { display: block; font-size: 15px; font-weight: 600; margin-top: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-upstream { font-size: 11px; color: var(--muted); margin-top: 4px; }
.tile-validity { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 22px 0 10px; color: var(--muted); font-size: 11px; }
.tile-validity strong { color: var(--status-color); font-size: 12px; font-weight: 550; }
.certificate-track { display: block; width: 100%; height: 4px; border-radius: 2px; }
.track-background { fill: var(--line); }
.track-value { fill: var(--status-color); }
.certificate-placeholder { display: block; height: 4px; border-radius: 2px; background: var(--line); }
.tone-working .tile-symbol svg { animation: task-spin 1.2s linear infinite; }
.overview-columns { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.overview-columns > .panel { min-width: 0; }
.scroll-list {
  height: 300px;
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.activity-list { margin: 0; padding: 0 24px; list-style: none; }
.activity-list li { display: flex; align-items: flex-start; gap: 12px; padding: 18px 0; }
.activity-list li + li { border-top: 1px solid var(--line); }
.activity-symbol { display: flex; flex-shrink: 0; color: var(--status-color); margin-top: 2px; }
.activity-symbol svg { width: 19px; height: 19px; }
.activity-list li > div { flex: 1; min-width: 0; }
.activity-list strong { display: block; font-size: 13px; font-weight: 550; }
.activity-list small { display: block; font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
.activity-list .badge { flex-shrink: 0; }
@keyframes task-spin { to { rotate: 360deg; } }
@media (max-width: 1200px) and (min-width: 701px) {
  .site-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-columns { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .console-strip { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 18px 12px; padding: 18px; }
  .console-address { min-width: 0; }
  .console-facts { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .console-fact { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .console-strip .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .console-error { padding: 0 18px 18px; }
}
@media (max-width: 700px) {
  .board-summary { display: block; padding: 18px; }
  .board-total { margin-bottom: 14px; }
  .board-legend { gap: 8px 14px; }
  .site-board { grid-template-columns: 1fr; height: 390px; padding: 18px; }
  .overview-columns { grid-template-columns: 1fr; }
  .activity-list { padding: 0 18px; }
  .table-wrap { height: 360px; }
}

.audit-process { margin-top: 8px; font-size: 12px; }
.audit-process summary { cursor: pointer; color: var(--accent); width: fit-content; }
.audit-process ol { margin: 10px 0 0; padding-left: 18px; }
.audit-process li { padding: 5px 0; }
.audit-process li small { margin-top: 2px; }
