:root {
  color-scheme: light;
  --canvas: #f7f7f4;
  --surface: #ffffff;
  --surface-muted: #f2f3f1;
  --rail: #17233a;
  --rail-strong: #101a2d;
  --navy: #17233a;
  --navy-soft: #202c44;
  --text: #17233a;
  --muted: #5c6678;
  --soft: #5c6678;
  --line: #d9dee6;
  --line-strong: #c4cbd6;
  --link: #315171;
  --accent: #f4a900;
  --accent-soft: #fff5dc;
  --green: #14603b;
  --green-soft: #edf7f0;
  --red: #a23328;
  --red-soft: #fff0ed;
  --amber: #79500b;
  --amber-soft: #fff1d9;
  --shadow: 0 18px 50px rgba(17, 28, 46, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 14px/1.55 "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC",
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button,
summary,
[data-copy-text] {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #315171;
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 13px;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.admin-app {
  min-height: 100vh;
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 224px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--rail);
  color: #f7f8fa;
  border-right: 1px solid #27364b;
}

.brand {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 22px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 3px 0 var(--accent);
}

.brand img {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: contain;
}

.brand > span,
.login-brand > span {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.brand strong,
.login-brand strong {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.brand small,
.login-brand small {
  margin-top: 5px;
  color: #aeb9c8;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.nav-list {
  display: grid;
  gap: 6px;
  padding: 14px 12px 22px;
}

.nav-group {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
}

.nav-caption {
  margin: 14px 12px 5px;
  color: #8390a3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.nav-group:first-child .nav-caption {
  margin-top: 2px;
}

.nav-list a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-left: 3px solid transparent;
  border-radius: 3px;
  color: #c7d0dc;
  text-decoration: none;
  white-space: nowrap;
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.nav-list a.active {
  border-left-color: var(--accent);
  background: var(--navy-soft);
  color: #ffffff;
  font-weight: 650;
}

.rail a:focus-visible,
.rail button:focus-visible,
.topbar a:focus-visible,
.nav-toggle:focus-visible {
  outline-color: var(--accent);
}

.rail a:focus-visible,
.rail button:focus-visible {
  outline-offset: -3px;
}

.nav-icon-frame {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: none;
}

.nav-icon {
  display: block;
  width: 18px;
  height: 18px;
  opacity: 0.72;
  filter: invert(1);
}

.nav-list a:hover .nav-icon,
.nav-list a.active .nav-icon {
  opacity: 1;
}

.rail-account {
  min-height: 68px;
  margin-top: auto;
  padding: 12px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  background: var(--rail-strong);
}

.account-name {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.account-name strong {
  overflow: hidden;
  color: #f7f8fa;
  text-overflow: ellipsis;
}

.account-name span {
  color: #8f9bad;
  font-size: 10px;
}

.logout-form {
  flex: none;
}

.logout-button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid #3a485c;
  background: transparent;
  color: #c7d0dc;
  cursor: pointer;
}

.logout-button:hover {
  border-color: #d7a9a5;
  color: #ffffff;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  margin-left: 224px;
  background: var(--canvas);
}

.topbar {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 30px;
  background: var(--navy);
  color: #ffffff;
  border-bottom: 3px solid var(--accent);
}

.topbar-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title > div {
  min-width: 0;
}

.topbar-kicker,
.login-kicker {
  display: block;
  margin-bottom: 4px;
  color: #aeb9c8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(25px, 2.1vw, 32px);
  line-height: 1.18;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.topbar p {
  max-width: 760px;
  margin: 5px 0 0;
  color: #b6c0ce;
  font-size: 12px;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 7px;
}

.topbar-links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid #405069;
  color: #dce2ea;
  text-decoration: none;
}

.topbar-links a:hover {
  border-color: #7e8da2;
  color: #ffffff;
}

.nav-toggle {
  display: none;
  min-height: 36px;
  border-color: #64748b;
  background: transparent;
  box-shadow: none;
}

.nav-backdrop {
  display: none;
}

.workspace-body {
  width: 100%;
  max-width: 1700px;
  margin: 0 auto;
  padding: 28px 30px 46px;
}

.toolbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.toolbar > div:first-child {
  min-width: 0;
}

.tabs {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
}

.tabs a {
  min-width: 82px;
  padding: 8px 13px;
  color: #445166;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid var(--line);
}

.tabs a:last-child {
  border-right: 0;
}

.tabs a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.tabs a.active {
  background: var(--navy);
  color: #ffffff;
  font-weight: 650;
}

.section {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(17, 28, 46, 0.04);
}

.section + .section {
  margin-top: 18px;
}

.section-body {
  padding: 18px 28px;
}

.section-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 12px 18px;
  background: var(--surface);
}

.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.section-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

th:first-child,
td:first-child {
  padding-left: 18px;
}

th:last-child,
td:last-child {
  padding-right: 18px;
}

th {
  height: 43px;
  color: #485468;
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

td {
  min-height: 56px;
  color: #334054;
}

tbody tr:hover:not(.detail-row):not(.empty) {
  background: #fbf9f3;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.detail-row td {
  padding-top: 14px;
  padding-bottom: 16px;
  background: var(--surface-muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.75fr);
  gap: 14px 38px;
}

.detail-grid dl {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 9px 12px;
  margin: 0;
}

.detail-grid dt {
  color: var(--muted);
}

.detail-grid dd {
  margin: 0;
  color: var(--text);
}

.empty td {
  padding-top: 38px;
  padding-bottom: 38px;
  color: var(--soft);
  text-align: center;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.overview-card {
  min-width: 0;
  padding: 16px 17px 15px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: 4px;
  background: var(--surface);
}

.overview-card.attention {
  border-top-color: var(--accent);
}

.overview-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.overview-card-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.overview-card-head a {
  color: var(--link);
  font-size: 11px;
  text-decoration: none;
}

.overview-card-head a:hover {
  text-decoration: underline;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
}

.overview-stats.single {
  grid-template-columns: 1fr;
}

.overview-stats > div + div {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.overview-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.overview-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.status {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.status.good {
  color: var(--green);
}

.status.warn {
  color: var(--amber);
}

.status.danger {
  color: var(--red);
}

.status.neutral {
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.tiny {
  color: var(--soft);
  font-size: 11px;
}

.mono,
code,
.copy-once {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.truncate {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.inline-form,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
}

.inline-form input {
  width: min(260px, 100%);
}

.stack {
  display: grid;
  gap: 5px;
}

label > span,
.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.field-label {
  display: block;
  margin: 0 0 5px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #315171;
  box-shadow: 0 0 0 2px rgba(49, 81, 113, 0.13);
}

input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--navy);
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

button,
.button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--navy);
  border-radius: 3px;
  background: var(--navy);
  color: #ffffff;
  box-shadow: inset -3px 0 0 var(--accent);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--navy-soft);
}

button.secondary,
.button.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: #3f4c60;
  box-shadow: none;
}

button.secondary:hover,
.button.secondary:hover {
  background: var(--surface-muted);
}

button.danger,
.button.danger {
  border-color: #d6a6a0;
  background: var(--surface);
  color: var(--red);
  box-shadow: none;
}

.text-button,
.text-link {
  min-height: auto;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--link);
  box-shadow: none;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.text-button:hover,
.text-link:hover {
  background: transparent;
  text-decoration: underline;
}

.text-button.danger,
.text-link.danger {
  color: var(--red);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
}

.form-grid .wide {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.redaction-form {
  display: grid;
  gap: 17px;
  padding: 22px 24px 27px;
  border-top: 1px solid var(--line);
}

.redaction-context {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  padding: 11px 13px;
  border-left: 3px solid var(--navy);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
}

.redaction-context strong {
  margin-left: 4px;
  color: var(--text);
}

.redaction-form label {
  display: grid;
  gap: 5px;
}

.redaction-form textarea.tall {
  min-height: 180px;
}

.redaction-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.redaction-confirm {
  display: flex !important;
  padding: 11px 13px;
  border-left: 3px solid var(--accent);
  background: var(--amber-soft);
  color: #70490b;
}

details.editor {
  position: relative;
}

details.editor > summary {
  color: var(--link);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

details.editor > summary::-webkit-details-marker {
  display: none;
}

details.editor[open] > summary {
  margin-bottom: 10px;
}

.inline-editor {
  min-width: 580px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-muted);
}

.provider-editor {
  min-width: 680px;
}

.provider-editor .form-grid {
  grid-template-columns: minmax(220px, 1.2fr) minmax(170px, 0.8fr);
}

.provider-api-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.provider-api-card {
  min-width: 0;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: 4px;
  background: var(--surface);
}

.provider-api-card.configured {
  border-top-color: var(--green);
}

.provider-api-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.provider-api-head h3 {
  margin: 0;
  font-size: 15px;
}

.provider-api-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.provider-api-state {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: none;
}

.provider-api-state > span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.provider-api-meta {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.provider-api-meta > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 9px;
}

.provider-api-meta dt {
  color: var(--muted);
  font-size: 11px;
}

.provider-api-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.provider-api-actions {
  min-height: 28px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
}

.provider-api-editor {
  margin-top: 4px;
}

.provider-api-editor > summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface-muted);
  color: var(--text) !important;
  font-weight: 650;
}

.provider-api-editor .provider-editor {
  min-width: 0;
}

.notice,
.operation-status {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  border-radius: 3px;
  background: var(--surface-muted);
  color: var(--text);
}

.notice.success {
  border-color: #bad7c4;
  border-left-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.notice.danger {
  border-color: #e4bbb6;
  border-left-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.notice.warn {
  border-color: #dfc99e;
  border-left-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
}

.operation-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  color: var(--muted);
  border-color: var(--line);
  border-left-color: var(--navy);
  background: var(--surface);
  font-size: 11px;
}

.operation-status.good {
  border-left-color: var(--green);
}

.operation-status.warn {
  border-left-color: var(--amber);
}

.operation-status.danger {
  border-left-color: var(--red);
}

.operation-message {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.operation-message strong {
  color: var(--text);
}

.operation-status.good .operation-message strong {
  color: var(--green);
}

.operation-status.warn .operation-message strong {
  color: var(--amber);
}

.operation-status.danger .operation-message strong {
  color: var(--red);
}

.operation-detail {
  color: var(--muted);
}

.operation-meta {
  flex: none;
  color: var(--muted);
  white-space: nowrap;
}

.copy-panel {
  max-width: 720px;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--surface);
}

.copy-panel h2 {
  margin: 0 0 7px;
}

.copy-once {
  display: block;
  width: 100%;
  margin: 18px 0;
  padding: 13px 15px;
  border: 1px dashed var(--line-strong);
  background: #ffffff;
  color: var(--text);
  font-size: 21px;
  letter-spacing: 0.08em;
  word-break: break-all;
}

.copy-fallback-field {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--canvas);
}

.login-shell {
  width: min(980px, 100%);
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(430px, 1.18fr);
  overflow: hidden;
  border: 1px solid #c8c3b8;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  background: var(--navy);
  color: #ffffff;
  box-shadow: inset 0 4px 0 var(--accent);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand img {
  width: 48px;
  height: 48px;
  flex: none;
  object-fit: contain;
}

.login-intro-copy > span {
  color: #9eabba;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.login-intro-copy h1 {
  margin: 9px 0 28px;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.18;
  font-weight: 710;
}

.login-intro-copy dl {
  display: grid;
  margin: 0;
  border-top: 1px solid #3b4b62;
}

.login-intro-copy dl > div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #3b4b62;
}

.login-intro-copy dt {
  color: #9eabba;
  font-size: 11px;
}

.login-intro-copy dd {
  margin: 0;
  color: #e3e8ef;
  font-size: 12px;
}

.login-panel {
  display: grid;
  align-items: center;
  padding: 54px 64px;
  background: var(--surface);
}

.login-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.login-kicker {
  padding-left: 8px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

.login-card h2 {
  margin: 0 0 28px;
  font-size: 28px;
  line-height: 1.25;
}

.login-form {
  display: grid;
  gap: 15px;
}

.login-form button {
  width: 100%;
  min-height: 43px;
  margin-top: 3px;
}

.login-help {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.login-help summary {
  color: #3e4b5f;
  cursor: pointer;
}

.login-help p {
  margin: 8px 0 0;
}

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
}

.login-links a {
  text-decoration: none;
}

.login-links a:hover {
  color: var(--link);
  text-decoration: underline;
}

.alert {
  margin: 0 0 15px;
  padding: 10px 12px;
  border: 1px solid #e4bbb6;
  border-left: 3px solid var(--red);
  background: var(--red-soft);
  color: var(--red);
}

@media (max-width: 1380px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .workspace-body {
    padding-right: 22px;
    padding-left: 22px;
  }

  .provider-api-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .rail {
    z-index: 60;
    width: 264px;
    transform: translateX(-102%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .rail {
    transform: translateX(0);
  }

  .nav-backdrop {
    position: fixed;
    z-index: 50;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(5, 11, 20, 0.58);
    box-shadow: none;
  }

  body.nav-open .nav-backdrop {
    display: block;
  }

  .workspace {
    margin-left: 0;
  }

  .nav-toggle {
    display: inline-flex;
    flex: none;
  }

  .topbar {
    min-height: 104px;
    padding: 19px 22px;
  }

  .workspace-body {
    padding: 22px 20px 38px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .inline-editor,
  .provider-editor {
    min-width: 520px;
  }

  .provider-api-editor .provider-editor {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar-links {
    display: none;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar > div {
    width: 100%;
  }

  .toolbar .actions {
    width: 100%;
  }

  .tabs {
    width: 100%;
  }

  .tabs a {
    flex: 1 0 auto;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .provider-api-grid {
    padding-right: 12px;
    padding-left: 12px;
  }

  .provider-api-card {
    padding: 14px;
  }

  .provider-api-head {
    align-items: stretch;
    flex-direction: column;
  }

  .provider-api-state {
    justify-items: start;
  }

  .provider-api-editor .form-grid {
    grid-template-columns: 1fr;
  }

  .redaction-form {
    padding: 18px 16px 22px;
  }

  .redaction-columns {
    grid-template-columns: 1fr;
  }

  .operation-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-page {
    align-items: start;
    padding: 14px;
  }

  .login-shell {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .login-intro {
    min-height: 190px;
    padding: 25px 24px;
  }

  .login-intro-copy h1 {
    margin: 8px 0 0;
    font-size: 27px;
  }

  .login-intro-copy dl {
    display: none;
  }

  .login-panel {
    padding: 34px 24px 38px;
  }
}

@media (max-width: 430px) {
  .topbar {
    min-height: 96px;
    padding: 17px 16px;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .topbar-kicker {
    display: none;
  }

  .workspace-body {
    padding: 17px 12px 30px;
  }

  .section-head {
    padding-right: 14px;
    padding-left: 14px;
  }

  .section-body {
    padding-right: 14px;
    padding-left: 14px;
  }

  th:first-child,
  td:first-child {
    padding-left: 14px;
  }

  th:last-child,
  td:last-child {
    padding-right: 14px;
  }

  .login-page {
    padding: 0;
  }

  .login-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .login-intro {
    min-height: 164px;
    padding: 22px 20px;
  }

  .login-brand img {
    width: 42px;
    height: 42px;
  }

  .login-intro-copy h1 {
    font-size: 24px;
  }

  .login-panel {
    align-items: start;
    padding: 30px 20px 34px;
  }

  .login-card h2 {
    margin-bottom: 22px;
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rail {
    transition: none;
  }
}
