:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-strong: #eef2f7;
  --ink: #142033;
  --muted: #637083;
  --line: #dce2eb;
  --topbar-bg: rgba(247, 248, 251, 0.92);
  --green: #18a058;
  --orange: #e58b17;
  --red: #d92d20;
  --blue: #1f6feb;
  --shadow: 0 18px 50px rgba(20, 32, 51, 0.08);
}

body[data-theme="dark"] {
  --bg: #0f141b;
  --surface: #171e28;
  --surface-strong: #202936;
  --ink: #edf3fb;
  --muted: #a7b3c4;
  --line: #2f3a49;
  --topbar-bg: rgba(15, 20, 27, 0.92);
  --green: #3ccf7b;
  --orange: #f0a33a;
  --red: #ff6b5f;
  --blue: #76a8ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 160ms ease, color 160ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  font-weight: normal;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-weight: 800;
}

.brand-mark,
.logo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 800;
}

.logo {
  color: #fff;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}

.top-actions a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.top-actions a:hover,
.top-actions a:focus-visible {
  background: var(--surface-strong);
  color: var(--ink);
}

.theme-toggle {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 650;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--surface-strong);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: flex-end;
}

.site-footer a {
  border-radius: 6px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: end;
  gap: 28px;
  min-height: 260px;
  padding: clamp(26px, 5vw, 54px) 0 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

.search-shell {
  position: relative;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-shell label,
.admin-login-form label,
.admin-form label,
.admin-search label,
.settings-group label,
.category-form label,
.contact-form label,
.comment-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.search-field {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 52px;
  margin-top: 8px;
  padding: 0 14px;
  background: var(--surface-strong);
  border: 1px solid transparent;
  border-radius: 8px;
}

.search-field:focus-within {
  border-color: var(--blue);
  background: var(--surface);
}

.search-field span {
  color: var(--muted);
  font-size: 1.25rem;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.search-field input {
  height: 48px;
  padding: 0;
  background: transparent;
  border: 0;
}

textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

.suggestions {
  position: absolute;
  right: 18px;
  left: 18px;
  top: calc(100% - 14px);
  z-index: 20;
  display: none;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.suggestions.visible {
  display: block;
}

.suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.suggestion:last-child {
  border-bottom: 0;
}

.suggestion:hover,
.suggestion:focus-visible {
  background: var(--surface-strong);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 22px;
}

.global-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.global-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

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

.service-card {
  min-width: 0;
}

.service-link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  min-height: 138px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(20, 32, 51, 0.05);
}

.service-link:hover,
.service-link:focus-visible {
  border-color: #aab7c8;
  transform: translateY(-1px);
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  font-size: 1rem;
}

.service-meta {
  min-width: 0;
}

.service-meta strong {
  display: block;
  overflow: hidden;
  font-size: 1.04rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-meta small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.service-card .status-pill {
  grid-column: 1 / -1;
  justify-self: start;
}

.normal {
  color: #0c6d3c;
  background: rgba(24, 160, 88, 0.12);
}

.warning {
  color: #8a4d00;
  background: rgba(229, 139, 23, 0.16);
}

.critical {
  color: #9f1d14;
  background: rgba(217, 45, 32, 0.14);
}

.detail-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.report-total {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  color: var(--muted);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.detail-title h2 {
  font-size: clamp(1.55rem, 3vw, 2.5rem);
}

.report-button,
.admin-form button,
.category-form button,
.contact-form button,
.comment-form button,
.ghost-button,
.type-button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  font-weight: 650;
}

.report-button,
.contact-form button,
.comment-form button {
  color: #fff;
  background: var(--red);
}

.admin-form button,
.category-form button {
  color: #fff;
  background: var(--green);
}

.report-button:disabled {
  cursor: not-allowed;
  background: #a9b1bd;
}

.ghost-button,
.type-button {
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.type-button.active {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  gap: 18px;
  margin-top: 18px;
}

.comments-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  align-items: start;
}

.comment-compose-panel {
  position: sticky;
  top: 86px;
}

.panel {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.info-page {
  max-width: 860px;
}

.about-grid,
.legal-grid,
.privacy-grid {
  display: grid;
  gap: 14px;
}

.info-panel {
  line-height: 1.6;
}

.lead-text {
  margin-top: 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 650;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.info-list li::marker {
  color: var(--blue);
}

.legal-details {
  margin-bottom: 14px;
}

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

.info-steps h4 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.info-steps p {
  margin: 0;
  color: var(--muted);
}

.info-panel p:last-child {
  margin-bottom: 0;
}

.not-found-panel {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  text-align: center;
}

.not-found-panel h2,
.not-found-panel p {
  margin-bottom: 0;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.primary-link-button,
.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 650;
}

.primary-link-button {
  color: #fff;
  background: var(--red);
}

.secondary-link-button {
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.report-panel {
  grid-column: 1 / -1;
}

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

.chart-panel-head h3 {
  margin-bottom: 0;
}

.range-toggle {
  display: inline-flex;
  padding: 4px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.range-toggle button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 650;
}

.range-toggle button.active {
  color: #fff;
  background: var(--red);
}

.type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.chart-wrap {
  position: relative;
  height: 280px;
}

.type-chart-wrap {
  height: 220px;
}

.type-chart-legend {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.type-legend-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.88rem;
}

.type-legend-item span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.type-legend-item strong,
.type-legend-item small {
  min-width: 0;
}

.type-legend-item small {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

canvas {
  width: 100%;
  height: 100%;
}

.comment-form {
  display: grid;
  gap: 12px;
}

.contact-panel {
  max-width: 760px;
  margin-top: 18px;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form input,
.contact-form select {
  min-height: 44px;
  padding: 0 12px;
}

.form-note {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.comment-form input {
  min-height: 44px;
  padding: 0 12px;
}

.form-feedback {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 800;
}

.comment-feed {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.comment {
  padding: 12px;
  background: var(--surface-strong);
  border-radius: 8px;
}

.comment p {
  margin-bottom: 8px;
  line-height: 1.45;
}

.comment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.comment small {
  color: var(--muted);
  font-weight: 700;
}

.comment-votes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.comment-votes button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  min-width: 52px;
  padding: 0 9px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 650;
}

.vote-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.comment-votes button strong {
  font-size: 0.82rem;
  line-height: 1;
}

.comment-votes button:hover,
.comment-votes button:focus-visible {
  border-color: var(--blue);
}

.comment-votes button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.comment-votes .comment-delete {
  min-width: 34px;
  color: var(--red);
  background: rgba(217, 45, 32, 0.1);
  border-color: transparent;
  font-size: 1.1rem;
  font-weight: 650;
}

.comment-votes .comment-delete:hover,
.comment-votes .comment-delete:focus-visible {
  border-color: var(--red);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.pagination button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pagination span {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-login-form,
.admin-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-login-form {
  grid-template-columns: minmax(260px, 360px) auto;
  align-items: end;
  max-width: 460px;
  margin-inline: auto;
}

.admin-login-form .form-note {
  grid-column: 1 / -1;
}

.admin-login-form button {
  width: 150px;
}

.hidden {
  display: none !important;
}

.honeypot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.admin-controls {
  display: grid;
  gap: 14px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-tab {
  min-height: 40px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 650;
}

.admin-tab:hover,
.admin-tab:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
}

.admin-tab.active {
  color: #fff;
  background: var(--blue);
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-form input,
.admin-form select {
  min-height: 44px;
  padding: 0 12px;
}

.admin-form-actions button,
.category-form-actions button,
.category-form button {
  align-self: end;
  justify-self: start;
  width: 150px;
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.92rem;
}

.admin-form-actions {
  display: flex;
  align-self: end;
  flex-wrap: wrap;
  gap: 8px;
}

.category-form-actions {
  display: flex;
  align-self: end;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-form-actions .secondary-button,
.category-form-actions .secondary-button {
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.admin-search {
  margin-top: 14px;
}

.admin-search-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.admin-login-form input {
  min-height: 44px;
  padding: 0 12px;
}

.admin-login-form button {
  min-height: 44px;
  padding: 0 16px;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 8px;
  font-weight: 650;
}

.section-head.compact {
  margin-bottom: 12px;
}

.section-head.compact h3 {
  margin: 0;
  font-size: 1rem;
}

.category-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.3fr) auto;
  gap: 12px;
}

.category-form input {
  min-height: 44px;
  padding: 0 12px;
}

.category-form textarea {
  min-height: 90px;
}

.category-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.category-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-item h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.category-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.category-actions button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 650;
}

.category-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

.settings-group {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settings-group h3 {
  margin: 0;
  font-size: 1rem;
}

.settings-group label {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.settings-group input[type="number"] {
  justify-self: end;
  width: 88px;
  min-height: 38px;
  padding: 0 10px;
  text-align: right;
}

.settings-group input[type="range"] {
  justify-self: end;
  width: min(220px, 44vw);
}

.settings-group label span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  text-align: right;
}

.admin-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.admin-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-service-logo,
.admin-service-name {
  border-radius: 8px;
}

.admin-service-logo:focus-visible,
.admin-service-name:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.admin-service-name:hover,
.admin-service-name:focus-visible {
  color: var(--blue);
}

.admin-status {
  justify-self: end;
  white-space: nowrap;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-row-actions button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 650;
}

.admin-row-actions .admin-edit-button {
   background: var(--surface);
}

.admin-row-actions .admin-delete-button {
   background: var(--red);
}

.admin-row-actions .admin-clear-button {
   background: var(--blue);
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.empty-state.compact {
  padding: 12px;
  font-size: 0.88rem;
}

.toast-region {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 50;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 36px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  line-height: 1.35;
}

.toast.error {
  border-left-color: var(--red);
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--muted);
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 1.25rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #b42318;
}

@media (max-width: 920px) {
  .hero,
  .detail-layout,
  .comments-layout {
    grid-template-columns: 1fr;
  }

  .comment-compose-panel {
    position: static;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-stats {
    justify-content: flex-start;
  }

  .chart-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-top: 12px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 24px, 1180px);
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding-top: 20px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .global-status {
    justify-content: flex-start;
  }

  .info-steps {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .admin-login-form,
  .admin-form,
  .category-form,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .admin-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .admin-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .admin-form-actions button,
  .category-form-actions button,
  .category-form button {
    width: min(150px, 100%);
  }

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

  .settings-group label {
    grid-template-columns: 1fr;
  }

  .settings-group input[type="number"] {
    justify-self: start;
  }

  .settings-group input[type="range"] {
    justify-self: stretch;
    width: 100%;
  }

  .settings-group label span {
    text-align: left;
  }

  .admin-login-form button {
    width: 100%;
  }

  .service-link {
    min-height: 118px;
  }

  .comment-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .comment-votes {
    justify-content: flex-start;
  }

  .chart-wrap {
    height: 340px;
  }

  .type-chart-wrap {
    height: 260px;
  }

  .type-legend-item {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .type-legend-item small {
    grid-column: 2;
    white-space: normal;
  }

  .toast-region {
    top: 112px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}
