:root {
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #edf2f7;
  --sidebar: #132238;
  --sidebar-soft: #1c304b;
  --sidebar-text: #dce6f2;
  --ink: #172235;
  --ink-soft: #34445c;
  --muted: #69778b;
  --muted-strong: #526176;
  --border: #dbe3ec;
  --border-strong: #c8d3df;
  --primary: #087f78;
  --primary-hover: #066d68;
  --primary-soft: #e4f5f2;
  --accent: #3c7cff;
  --accent-soft: #eaf1ff;
  --success: #178754;
  --success-soft: #e7f6ed;
  --warning: #a35c00;
  --warning-soft: #fff4dc;
  --danger: #c33b45;
  --danger-soft: #ffebed;
  --shadow-sm: 0 1px 2px rgba(15, 28, 45, 0.05);
  --shadow-md: 0 12px 32px rgba(26, 42, 66, 0.08);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --sidebar-width: 256px;
  --content-width: 1420px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
summary,
select {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.24;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.24rem;
  letter-spacing: -0.015em;
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

code {
  padding: 2px 6px;
  border-radius: 5px;
  color: #32455f;
  background: #edf2f6;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 3px solid rgba(60, 124, 255, 0.45);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--accent);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  min-height: 100vh;
  padding: 26px 18px 18px;
  color: var(--sidebar-text);
  background:
    radial-gradient(circle at 15% 0, rgba(45, 181, 167, 0.13), transparent 32%),
    var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow-y: auto;
}

.app-main {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-on-dark {
  color: #fff;
}

.brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #32b8aa, #087f78);
  box-shadow: 0 7px 20px rgba(3, 98, 92, 0.25);
  overflow: hidden;
}

.brand-mark::after {
  position: absolute;
  width: 22px;
  height: 22px;
  right: -9px;
  bottom: -10px;
  border: 5px solid rgba(255, 255, 255, 0.23);
  border-radius: 50%;
  content: "";
}

.brand-mark span {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 3px;
  color: #8394aa;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.desktop-navigation {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 36px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #aebdd0;
  font-weight: 600;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.nav-link.is-active {
  color: #fff;
  background: rgba(38, 173, 160, 0.14);
  border-color: rgba(63, 203, 189, 0.2);
}

.nav-icon {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  color: #8fa3ba;
  font-size: 18px;
  font-weight: 400;
}

.nav-link.is-active .nav-icon {
  color: #64d5c9;
  background: rgba(79, 205, 192, 0.1);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-service {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
  color: #93a5bb;
  font-size: 12px;
}

.status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8290a2;
  box-shadow: 0 0 0 4px rgba(130, 144, 162, 0.12);
}

.status-dot.is-online {
  background: #3bc58e;
  box-shadow: 0 0 0 4px rgba(59, 197, 142, 0.12);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 13px;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #ccece8;
  background: var(--sidebar-soft);
  font-size: 13px;
  font-weight: 700;
}

.sidebar-user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.sidebar-user-copy strong {
  overflow: hidden;
  color: #e4ecf5;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy small {
  margin-top: 2px;
  color: #778aa1;
  font-size: 11px;
}

.mobile-header {
  display: none;
}

.content {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 42px 42px 56px;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: var(--content-width);
  margin: auto auto 0;
  padding: 20px 42px 25px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.page-header > div:first-child {
  max-width: 760px;
}

.eyebrow,
.panel-kicker {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-on-dark {
  color: #66d5c8;
}

.page-description,
.section-intro {
  margin-bottom: 0;
  color: var(--muted);
}

.page-actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.page-actions form,
.item-actions form,
.node-card-actions form,
.revision-actions form {
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  text-decoration: none;
}

.button-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 5px 13px rgba(8, 127, 120, 0.13);
}

.button-primary:hover {
  color: #fff;
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.button-secondary {
  color: var(--ink-soft);
  background: #fff;
  border-color: var(--border-strong);
}

.button-secondary:hover {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #9dcfc9;
}

.button-ghost {
  color: var(--muted-strong);
  background: transparent;
  border-color: transparent;
}

.button-ghost:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

.button-muted {
  color: var(--muted);
  background: var(--surface-strong);
  border-color: var(--border);
}

.button-danger-ghost {
  color: var(--danger);
  background: #fff;
  border-color: #edbec3;
}

.button-danger-ghost:hover {
  background: var(--danger-soft);
}

.button-sidebar {
  width: 100%;
  min-height: 36px;
  color: #9eb0c5;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.button-sidebar:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.button-large {
  min-height: 48px;
  padding-inline: 20px;
}

.button-small {
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
}

.button-block {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 18px;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

.text-link,
.metric-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.text-danger {
  color: var(--danger) !important;
}

.muted-text {
  color: var(--muted);
}

.text-warning {
  color: var(--warning) !important;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface-strong);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.badge-success,
.badge-successful {
  color: var(--success);
  background: var(--success-soft);
}

.badge-danger,
.badge-error,
.badge-failed {
  color: var(--danger);
  background: var(--danger-soft);
}

.badge-warning,
.badge-rollback {
  color: var(--warning);
  background: var(--warning-soft);
}

.badge-accent {
  color: #2864d8;
  background: var(--accent-soft);
}

.badge-muted,
.badge-info {
  color: var(--muted-strong);
  background: var(--surface-strong);
}

.panel {
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-header h2,
.panel-header p:last-child {
  margin-bottom: 0;
}

.panel-kicker {
  margin-bottom: 4px;
  color: #7a8aa0;
  font-size: 10px;
}

.panel-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.panel-note span {
  display: grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.anchor-panel {
  scroll-margin-top: 24px;
}

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

.content-grid > .panel {
  min-width: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.metric-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card-primary {
  border-color: #b9ddd8;
  background: linear-gradient(145deg, #fff 30%, #f1fbf9);
}

.metric-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 17px;
}

.metric-icon,
.quick-action-icon,
.source-mark,
.session-icon {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 18px;
}

.metric-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-value {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.metric-value small {
  margin-left: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.metric-value-text {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.metric-detail {
  min-height: 21px;
  margin-bottom: 9px;
  color: var(--muted-strong);
  font-size: 12px;
}

.metric-time {
  display: block;
  color: #8793a4;
  font-size: 11px;
}

.metric-link {
  display: inline-flex;
  gap: 5px;
  margin-top: 1px;
}

.detail-list {
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 650;
  text-align: right;
  overflow-wrap: anywhere;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 18px;
}

.timeline li:not(:last-child)::after {
  position: absolute;
  top: 14px;
  bottom: 2px;
  left: 6px;
  width: 1px;
  background: var(--border);
  content: "";
}

.timeline-dot {
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #8290a2;
  box-shadow: 0 0 0 1px var(--border-strong);
}

.timeline-success {
  background: var(--success);
}

.timeline-error {
  background: var(--danger);
}

.timeline-warning,
.timeline-rollback {
  background: var(--warning);
}

.timeline strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.timeline p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.timeline time {
  color: #8c98a8;
  font-size: 11px;
}

.quick-actions {
  margin-top: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.quick-action-grid > a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-soft);
}

.quick-action-grid > a:hover {
  border-color: #a9d2cd;
  background: var(--primary-soft);
  text-decoration: none;
}

.quick-action-grid strong,
.quick-action-grid small {
  display: block;
}

.quick-action-grid small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.quick-action-icon {
  width: 34px;
  height: 34px;
}

.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: var(--surface);
}

.callout h2 {
  margin-bottom: 3px;
  font-size: 14px;
}

.callout p {
  margin-bottom: 0;
  font-size: 13px;
}

.callout-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.callout-info {
  border-color: #b9d7f5;
  background: #f2f8ff;
}

.callout-info .callout-icon {
  color: #2864a8;
  background: #dcecff;
}

.callout-warning {
  border-color: #edd5a6;
  background: var(--warning-soft);
}

.callout-warning .callout-icon {
  color: var(--warning);
  background: #ffe3a8;
}

.callout-success {
  border-color: #b9dfc9;
  background: var(--success-soft);
}

.callout-success .callout-icon {
  color: var(--success);
  background: #c8ecd7;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.flash {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 13px;
}

.flash-symbol {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.flash-success {
  border-color: #b9dfc9;
  background: var(--success-soft);
}

.flash-success .flash-symbol {
  background: var(--success);
}

.flash-warning {
  border-color: #edd5a6;
  background: var(--warning-soft);
}

.flash-warning .flash-symbol {
  background: var(--warning);
}

.flash-error {
  border-color: #edbec3;
  background: var(--danger-soft);
}

.flash-error .flash-symbol {
  background: var(--danger);
}

.form-stack,
.form-grid {
  display: grid;
  gap: 17px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  min-width: 0;
}

.field-span-2 {
  grid-column: span 2;
}

.field-span-full {
  grid-column: 1 / -1;
}

.field label,
.label-row label {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.optional {
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select,
.filter-field input,
.list-tools select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--ink);
  background-color: #fff;
  box-shadow: inset 0 1px 1px rgba(20, 34, 52, 0.025);
}

.field select,
.list-tools select {
  padding-right: 34px;
}

.field input::placeholder,
.filter-field input::placeholder {
  color: #9aa5b4;
}

.field input:hover,
.field select:hover,
.filter-field input:hover,
.list-tools select:hover {
  border-color: #a9b9c9;
}

.field input:focus,
.field select:focus,
.filter-field input:focus,
.list-tools select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(60, 124, 255, 0.13);
  box-shadow: none;
}

.field-help {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 61px;
}

.password-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 49px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.filter-field {
  width: min(260px, 100%);
}

.filter-field input {
  min-height: 38px;
  padding-left: 34px;
  background-image: radial-gradient(circle, transparent 52%, #8190a2 54%, #8190a2 62%, transparent 64%), linear-gradient(45deg, transparent 46%, #8190a2 48%, #8190a2 55%, transparent 57%);
  background-position: 11px 11px, 22px 23px;
  background-repeat: no-repeat;
  background-size: 13px 13px, 7px 7px;
  font-size: 12px;
}

.filter-empty {
  margin: 16px 0 0;
  padding: 30px;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
}

.empty-state {
  padding: 48px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state > span:first-child {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 24px;
}

.empty-state h3,
.empty-state p strong {
  color: var(--ink);
}

.empty-state p {
  max-width: 500px;
  margin: 0 auto 18px;
}

.empty-state-compact {
  padding: 28px 15px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.summary-strip > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
}

.summary-strip > div:last-child {
  border-right: 0;
}

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

.summary-strip strong {
  font-size: 20px;
}

.summary-strip .summary-text {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-list {
  border-top: 1px solid var(--border);
}

.subscription-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 20px 2px;
  border-bottom: 1px solid var(--border);
}

.subscription-main,
.item-actions,
.node-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.subscription-copy {
  min-width: 0;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.item-title-row h3,
.item-title-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.masked-value {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--muted);
  font-size: 11px;
}

.item-message {
  margin: 7px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
}

.action-menu {
  position: relative;
}

.action-menu > summary {
  list-style: none;
}

.action-menu > summary::-webkit-details-marker {
  display: none;
}

.action-menu[open] > summary {
  color: var(--primary);
  background: var(--primary-soft);
}

.action-menu-panel {
  position: absolute;
  z-index: 15;
  top: calc(100% + 7px);
  right: 0;
  min-width: 178px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.action-menu-panel a,
.action-menu-panel button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  text-align: left;
}

.action-menu-panel a:hover,
.action-menu-panel button:hover {
  background: var(--surface-strong);
  text-decoration: none;
}

.current-node-card {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(420px, 1.5fr);
  align-items: center;
  gap: 28px;
  margin-bottom: 22px;
  padding: 22px 25px;
  border: 1px solid #b8ddd8;
  border-radius: var(--radius-lg);
  background: linear-gradient(125deg, #fff, #f0faf8);
}

.current-node-status {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.current-node-status p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.current-node-status h2 {
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-indicator {
  width: 14px;
  height: 14px;
  border: 4px solid #e0e6ed;
  border-radius: 50%;
  background: #8a97a8;
  box-shadow: 0 0 0 6px #f0f3f6;
}

.pulse-indicator.is-online {
  border-color: #d0f0e3;
  background: var(--success);
  box-shadow: 0 0 0 6px #e7f7ef;
}

.current-node-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.current-node-card dl > div {
  min-width: 0;
  padding: 2px 18px;
  border-left: 1px solid var(--border);
}

.current-node-card dt {
  color: var(--muted);
  font-size: 11px;
}

.current-node-card dd {
  margin: 3px 0 0;
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.field-inline select {
  min-width: 150px;
  min-height: 38px;
  font-size: 12px;
}

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

.node-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.node-card.is-selected {
  border-color: #83c8c0;
  background: #f2fbf9;
  box-shadow: inset 0 0 0 1px rgba(8, 127, 120, 0.08);
}

.node-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.region-mark {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.node-card-title {
  min-width: 0;
}

.node-card-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.node-latency {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 19px 0 13px;
}

.node-latency strong {
  font-size: 27px;
  letter-spacing: -0.05em;
  line-height: 1;
}

.node-latency span {
  color: var(--muted);
  font-size: 11px;
}

.latency-good {
  color: var(--success);
}

.latency-medium {
  color: var(--warning);
}

.latency-bad {
  color: var(--danger);
}

.latency-unknown {
  color: var(--muted);
}

.node-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 13px;
  color: var(--muted);
  font-size: 11px;
}

.availability::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #a3adba;
  content: "";
}

.availability.is-available::before {
  background: var(--success);
}

.node-card-actions {
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.split-editors {
  display: grid;
  gap: 12px;
}

.editor-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  overflow: hidden;
}

.editor-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 12px 15px;
  color: var(--ink-soft);
  font-weight: 750;
  list-style: none;
}

.editor-panel > summary::-webkit-details-marker {
  display: none;
}

.editor-panel > summary::after {
  color: var(--muted);
  content: "+";
  font-size: 20px;
  font-weight: 400;
}

.editor-panel[open] > summary::after {
  content: "−";
}

.editor-panel > summary span {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 10px;
}

.editor-panel-body {
  padding: 18px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.workflow-strip {
  display: grid;
  grid-template-columns: auto minmax(30px, 1fr) auto minmax(30px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 17px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workflow-step > span {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 11px;
  font-weight: 800;
}

.workflow-step.is-complete > span {
  color: #fff;
  background: var(--success);
}

.workflow-step p {
  display: flex;
  flex-direction: column;
  margin: 0;
  white-space: nowrap;
}

.workflow-step strong {
  font-size: 12px;
}

.workflow-step small {
  color: var(--muted);
  font-size: 10px;
}

.workflow-line {
  height: 1px;
  background: var(--border-strong);
}

.rules-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 22px;
}

.sticky-panel {
  position: sticky;
  top: 20px;
}

.heading-count {
  display: inline-grid;
  min-width: 25px;
  height: 25px;
  margin-left: 5px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface-strong);
  font-size: 11px;
  vertical-align: 2px;
}

.rule-list,
.revision-list,
.session-list,
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-list {
  border-top: 1px solid var(--border);
}

.rule-item {
  display: grid;
  grid-template-columns: 30px minmax(150px, 1fr) 22px minmax(105px, auto) 34px;
  align-items: center;
  gap: 11px;
  padding: 14px 1px;
  border-bottom: 1px solid var(--border);
}

.rule-item.is-disabled {
  opacity: 0.58;
}

.rule-order {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 11px;
  font-weight: 750;
}

.rule-copy {
  min-width: 0;
}

.rule-copy code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.rule-type {
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.rule-arrow {
  color: #a2acb9;
  text-align: center;
}

.policy-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 8px;
  color: #285ea9;
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.policy-direct {
  color: var(--success);
  background: var(--success-soft);
}

.policy-reject {
  color: var(--danger);
  background: var(--danger-soft);
}

.rule-menu .action-menu-panel {
  min-width: 150px;
}

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

.tip-grid article {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.tip-grid h3 {
  margin: 12px 0 5px;
}

.tip-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.active-revision {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(450px, 1.7fr);
  align-items: center;
  gap: 26px;
  margin-bottom: 22px;
  padding: 20px 23px;
  border: 1px solid #b9dfc9;
  border-radius: var(--radius-lg);
  background: var(--success-soft);
}

.active-revision > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.active-revision p {
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 11px;
}

.active-revision h2 {
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-revision dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.active-revision dl > div {
  min-width: 0;
  padding-inline: 15px;
  border-left: 1px solid #bfdcca;
}

.active-revision dt {
  color: var(--muted);
  font-size: 10px;
}

.active-revision dd {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.revision-list {
  border-top: 1px solid var(--border);
}

.revision-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: start;
  gap: 13px;
  padding: 19px 1px;
  border-bottom: 1px solid var(--border);
}

.revision-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--muted-strong);
  background: var(--surface-strong);
  font-weight: 800;
}

.revision-success {
  color: var(--success);
  background: var(--success-soft);
}

.revision-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.revision-rollback,
.revision-warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.revision-copy > p {
  margin: 3px 0 7px;
  color: var(--muted-strong);
  font-size: 13px;
}

.change-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.change-summary li {
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--muted-strong);
  background: var(--surface-strong);
  font-size: 10px;
}

.revision-actions {
  padding-top: 1px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 900px);
  align-items: start;
  gap: 26px;
}

.settings-nav {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.settings-nav a {
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.settings-nav a:hover {
  color: var(--primary);
  background: var(--primary-soft);
  text-decoration: none;
}

.settings-content {
  min-width: 0;
}

.settings-form {
  max-width: 700px;
}

.setting-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.setting-action-row p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.session-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.session-list li:last-child {
  border-bottom: 0;
}

.session-list p,
.session-list small {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.detail-list-wide > div {
  grid-template-columns: 160px minmax(0, 1fr);
}

.check-list {
  display: grid;
  gap: 10px;
}

.check-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.check-list li > span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 12px;
  font-weight: 800;
}

.check-list .is-good > span {
  color: var(--success);
  background: var(--success-soft);
}

.check-list .is-warning > span {
  color: var(--warning);
  background: var(--warning-soft);
}

.check-list .is-bad > span {
  color: var(--danger);
  background: var(--danger-soft);
}

.check-list p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(400px, 0.95fr) minmax(430px, 1.05fr);
  min-height: 100vh;
}

.auth-intro {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 42px clamp(35px, 6vw, 86px);
  color: #cfdaea;
  background:
    radial-gradient(circle at 20% 30%, rgba(25, 181, 167, 0.2), transparent 32%),
    radial-gradient(circle at 90% 80%, rgba(60, 124, 255, 0.15), transparent 35%),
    var(--sidebar);
  overflow: hidden;
}

.auth-brand {
  align-self: flex-start;
}

.auth-intro-copy {
  max-width: 560px;
  margin: auto 0 40px;
}

.auth-intro-copy h1 {
  margin-bottom: 20px;
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.auth-intro-copy > p:last-child {
  max-width: 500px;
  margin-bottom: 0;
  color: #9fb0c4;
  font-size: 16px;
}

.auth-benefits {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #aebed0;
  font-size: 12px;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.auth-benefits span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #67d7ca;
  background: rgba(60, 193, 179, 0.12);
  font-size: 10px;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  padding: 35px;
  place-items: center;
  background: var(--surface-soft);
}

.auth-card {
  width: min(430px, 100%);
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.auth-card-brand {
  display: none;
  margin-bottom: 30px;
}

.auth-card-heading {
  margin-bottom: 24px;
}

.auth-card-heading h2 {
  margin-bottom: 7px;
  font-size: 1.7rem;
}

.auth-card-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.auth-security-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.error-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 30px clamp(22px, 5vw, 70px);
  background:
    radial-gradient(circle at 50% 40%, rgba(8, 127, 120, 0.08), transparent 30%),
    var(--bg);
}

.error-card {
  width: min(580px, 100%);
  margin: auto;
  padding: 42px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.error-code {
  margin-bottom: 2px;
  color: var(--primary);
  font-size: clamp(4rem, 14vw, 7.5rem);
  font-weight: 850;
  letter-spacing: -0.08em;
  line-height: 0.92;
}

.error-card > p:not(.error-code):not(.eyebrow):not(.request-id) {
  color: var(--muted);
}

.request-id {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.error-actions {
  justify-content: center;
  margin-top: 25px;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .node-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .current-node-card,
  .active-revision {
    grid-template-columns: 1fr;
  }

  .current-node-card dl > div:first-child,
  .active-revision dl > div:first-child {
    border-left: 0;
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar-width: 224px;
  }

  .sidebar {
    padding-inline: 14px;
  }

  .content {
    padding: 34px 28px 48px;
  }

  .app-footer {
    padding-inline: 28px;
  }

  .rules-layout {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }

  .quick-action-grid {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    grid-template-columns: minmax(320px, 0.8fr) minmax(400px, 1.2fr);
  }

  .auth-intro-copy h1 {
    font-size: clamp(2.4rem, 6vw, 3.7rem);
  }
}

@media (max-width: 780px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .app-main {
    display: flex;
    min-height: 100vh;
  }

  .mobile-header {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .mobile-header .brand-mark {
    width: 36px;
    height: 36px;
  }

  .mobile-menu {
    position: relative;
  }

  .mobile-menu > summary {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    list-style: none;
  }

  .mobile-menu > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu > summary span,
  .mobile-menu > summary span::before,
  .mobile-menu > summary span::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink-soft);
    content: "";
  }

  .mobile-menu > summary span::before {
    transform: translateY(-6px);
  }

  .mobile-menu > summary span::after {
    transform: translateY(4px);
  }

  .mobile-menu[open] > summary span {
    background: transparent;
  }

  .mobile-menu[open] > summary span::before {
    transform: translateY(1px) rotate(45deg);
  }

  .mobile-menu[open] > summary span::after {
    transform: translateY(-1px) rotate(-45deg);
  }

  .mobile-menu nav {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    display: grid;
    gap: 3px;
    width: min(280px, calc(100vw - 32px));
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--shadow-md);
  }

  .mobile-menu .nav-link {
    color: var(--ink-soft);
  }

  .mobile-menu .nav-link:hover,
  .mobile-menu .nav-link.is-active {
    color: var(--primary);
    background: var(--primary-soft);
  }

  .mobile-menu .nav-icon {
    color: var(--muted);
  }

  .nav-button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
  }

  .content {
    padding: 28px 18px 42px;
  }

  .app-footer {
    padding: 18px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .page-actions {
    justify-content: flex-start;
  }

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

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-strip > div:nth-child(2) {
    border-right: 0;
  }

  .summary-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .subscription-item {
    grid-template-columns: 1fr;
  }

  .item-actions {
    justify-content: flex-end;
  }

  .panel-header-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-field,
  .list-tools {
    width: 100%;
  }

  .list-tools .filter-field {
    flex: 1;
  }

  .node-grid {
    grid-template-columns: 1fr;
  }

  .workflow-strip {
    grid-template-columns: 1fr;
  }

  .workflow-line {
    width: 1px;
    height: 16px;
    margin-left: 14px;
  }

  .workflow-step p {
    white-space: normal;
  }

  .settings-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .settings-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }

  .settings-nav a {
    flex: 0 0 auto;
  }

  .auth-layout {
    display: block;
  }

  .auth-intro {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 25px;
    background:
      radial-gradient(circle at 10% 0, rgba(8, 127, 120, 0.1), transparent 35%),
      var(--surface-soft);
  }

  .auth-card {
    padding: 32px;
  }

  .auth-card-brand {
    display: inline-flex;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 1.75rem;
  }

  .content {
    padding-inline: 14px;
  }

  .app-footer {
    flex-direction: column;
    gap: 4px;
    padding-inline: 14px;
  }

  .panel,
  .quick-actions {
    padding: 18px;
    border-radius: 14px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    padding: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2,
  .field-span-full {
    grid-column: auto;
  }

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

  .subscription-main {
    align-items: flex-start;
  }

  .subscription-main .source-mark {
    width: 32px;
    height: 32px;
  }

  .item-actions {
    justify-content: stretch;
  }

  .item-actions > form,
  .item-actions > form .button,
  .item-actions > details {
    flex: 1;
  }

  .item-actions > details > summary {
    width: 100%;
  }

  .current-node-card,
  .active-revision {
    padding: 18px;
  }

  .current-node-card dl,
  .active-revision dl {
    grid-template-columns: 1fr;
  }

  .current-node-card dl > div,
  .active-revision dl > div,
  .current-node-card dl > div:first-child,
  .active-revision dl > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .current-node-card dd,
  .active-revision dd {
    margin: 0;
    text-align: right;
  }

  .list-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .field-inline select {
    width: 100%;
  }

  .rule-item {
    grid-template-columns: 27px minmax(0, 1fr) 30px;
    align-items: start;
  }

  .rule-copy {
    grid-column: 2;
  }

  .rule-arrow {
    display: none;
  }

  .policy-badge {
    grid-column: 2;
    justify-self: start;
  }

  .rule-menu {
    grid-column: 3;
    grid-row: 1;
  }

  .revision-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .revision-actions {
    grid-column: 2;
  }

  .setting-action-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .session-list li form {
    grid-column: 2;
  }

  .detail-list > div,
  .detail-list-wide > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .detail-list dd {
    text-align: left;
  }

  .auth-panel {
    padding: 14px;
  }

  .auth-card {
    padding: 25px 20px;
    border-radius: 17px;
  }

  .error-layout {
    padding: 20px 14px;
  }

  .error-card {
    padding: 34px 20px;
  }

  .error-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .badge,
  .button,
  .metric-card,
  .panel,
  .callout,
  .flash,
  .node-card {
    border: 1px solid CanvasText;
  }

  .status-dot,
  .pulse-indicator,
  .flash-symbol {
    background: CanvasText;
  }
}
