/*
 * Colour tokens. Light by default; dark follows the system unless the theme switch
 * picked light (data-theme="light"), or is forced with data-theme="dark".
 * --fill-*: backgrounds with white text (hero, current incident headers).
 * --text-*: status-coloured text on the page background.
 */
:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --card: #fff;
  --card-muted: #f8f9fa;
  --fg: #1c1e21;
  --muted: #5f6368;
  --border: #dfe1e5;
  --link: #1d4ed8;
  --chip: #eceef1;
  --fill-operational: #1f9d55;
  --fill-maintenance: #2563eb;
  --fill-minor_outage: #c2570c;
  --fill-major_outage: #d42a2a;
  --text-operational: #15803d;
  --text-maintenance: #1d4ed8;
  --text-minor_outage: #b45309;
  --text-major_outage: #b91c1c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121417;
    --card: #1b1e23;
    --card-muted: #202329;
    --fg: #e6e8eb;
    --muted: #9aa0a6;
    --border: #30343b;
    --link: #8ab4f8;
    --chip: #2a2e35;
    --fill-operational: #17723f;
    --fill-maintenance: #1e48b8;
    --fill-minor_outage: #9a4a0b;
    --fill-major_outage: #a11f1f;
    --text-operational: #4ade80;
    --text-maintenance: #7aa7ff;
    --text-minor_outage: #fbbf24;
    --text-major_outage: #f87171;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121417;
  --card: #1b1e23;
  --card-muted: #202329;
  --fg: #e6e8eb;
  --muted: #9aa0a6;
  --border: #30343b;
  --link: #8ab4f8;
  --chip: #2a2e35;
  --fill-operational: #17723f;
  --fill-maintenance: #1e48b8;
  --fill-minor_outage: #9a4a0b;
  --fill-major_outage: #a11f1f;
  --text-operational: #4ade80;
  --text-maintenance: #7aa7ff;
  --text-minor_outage: #fbbf24;
  --text-major_outage: #f87171;
}

.status-operational {
  --fill: var(--fill-operational);
  --text: var(--text-operational);
}
.status-maintenance {
  --fill: var(--fill-maintenance);
  --text: var(--text-maintenance);
}
.status-minor_outage {
  --fill: var(--fill-minor_outage);
  --text: var(--text-minor_outage);
}
.status-major_outage {
  --fill: var(--fill-major_outage);
  --text: var(--text-major_outage);
}

/* Base */

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

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

a {
  color: var(--link);
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
}

.wrap {
  max-width: 48rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

/* Top bar and theme switch */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.site-name {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* The Atom feed, next to the theme switch: the page scrolls on forever. */
.feed-link {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: inherit;
  opacity: 0.85;
}

.feed-link svg {
  width: 1.05rem;
  height: 1.05rem;
}

.feed-link:hover,
.feed-link:focus-visible {
  opacity: 1;
  background: color-mix(in srgb, currentColor 15%, transparent);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.85;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  opacity: 1;
  background: color-mix(in srgb, currentColor 15%, transparent);
}

.theme-toggle svg {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
}

:root:not([data-theme]) .theme-toggle .icon-auto,
:root[data-theme="light"] .theme-toggle .icon-light,
:root[data-theme="dark"] .theme-toggle .icon-dark {
  display: block;
}

/* Hero: the overall status as the headline, on its own colour */

.hero {
  background: var(--fill);
  color: #fff;
  padding-bottom: 5.5rem;
  transition: background-color 0.3s;
}

.hero h1 {
  margin: 1.5rem auto 0;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Services: a card overlapping the bottom edge of the hero */

.services {
  list-style: none;
  margin: -3.5rem 0 0;
  padding: 0;
  position: relative;
  box-shadow: 0 4px 16px rgb(0 0 0 / 8%);
}

.services li {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.25rem;
}

.services li + li {
  border-top: 1px solid var(--border);
}

.services small {
  display: block;
  color: var(--muted);
}

/* Incident cards: title and labels, then the incident's own timeline */

.incident {
  margin-bottom: 1rem;
  position: relative;
}

.incident > header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.incident h1,
.incident h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.incident h1 {
  font-size: 1.4rem;
}

.incident header a {
  color: inherit;
  text-decoration: none;
}

.incident header a:hover {
  text-decoration: underline;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.chip {
  padding: 0.05rem 0.6rem;
  border-radius: 1rem;
  background: var(--chip);
  color: var(--fg);
  font-size: 0.8rem;
}

/* "4 services": a chip that opens a small list (on hover, tap or Enter). */
.services-more {
  position: relative;
}

.services-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.services-more > summary::-webkit-details-marker {
  display: none;
}

.services-more > summary::after {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
  transition: transform 0.15s;
}

.services-more[open] > summary::after {
  transform: translateY(0.1rem) rotate(-135deg);
}

.services-more > summary:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.services-popover {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 11rem;
  max-width: min(18rem, 80vw);
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.15);
  font-size: 0.875rem;
}

.services-popover li {
  padding: 0.25rem 0.85rem;
}

/* Status and impact labels carry the severity colour. */
.chip.impact {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: color-mix(in srgb, var(--fill) 16%, var(--card));
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

/* Going on now: a softly pulsing dot. */
/* In the label's text colour, which is the bright one in dark mode. */
.chip.live::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--text) 70%, transparent);
  }
  50% {
    opacity: 0.6;
  }
  70%,
  100% {
    box-shadow: 0 0 0 6px transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chip.live::before {
    animation: none;
  }
}

.services .chip {
  font-size: 0.85rem;
  padding: 0.15rem 0.7rem;
}

.activity-text {
  flex: 1;
}

.entries {
  list-style: none;
  margin: 0;
  padding: 0.9rem 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.entry {
  padding-left: 0.9rem;
  border-left: 2px solid var(--border);
}

/* Where the incident is now: the newest entry that has happened. */
.entry.current {
  border-left-color: var(--fill);
}

.entry.future {
  border-left-style: dashed;
}

.entry-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.entry-meta strong {
  color: var(--fg);
}

.entry .body {
  overflow-wrap: anywhere;
}

.entry .body > :first-child {
  margin-top: 0.15rem;
}

.entry .body > :last-child {
  margin-bottom: 0;
}

.more-entries {
  padding-left: 0.9rem;
  font-size: 0.85rem;
}

/* Timeline of past incidents */

.timeline-items {
  list-style: none;
  margin: 0;
  padding: 0 0 0 32px;
  position: relative;
}

.timeline-items::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-items > li {
  position: relative;
}

/* The dot on the line, in the incident's colour. */
/* Whole pixels, so it renders as a true circle, centred on the 2px line (at 8–10px;
   the list is padded by 32px). */
.timeline-items > li::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 16px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--fill);
  box-shadow: 0 0 0 4px var(--bg);
}

/* The arrow from the card towards the dot. */
.timeline-items .incident::before {
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 1.05rem;
  width: 0.8rem;
  height: 0.8rem;
  background: var(--card);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}

/* Room at the end of the page, now that there's no footer. */
.timeline {
  padding-bottom: 3rem;
}

/* A month heading in the timeline, without a dot. */
.timeline-items > li.timeline-month::before {
  display: none;
}

/* Sits on the line and hides it there, so the line stops above it and goes on below. */
.timeline-month h3 {
  position: relative;
  display: inline-block;
  margin: 0.75rem 0 0.75rem -32px;
  padding: 0.35rem 0.5rem 0.35rem 0;
  background: var(--bg);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.timeline-items > li.timeline-month:first-child h3 {
  margin-top: 0;
}

.load-more {
  display: table;
  margin: 1rem auto 0;
}

.single {
  padding-top: 1rem;
}

/* Buttons and forms (admin, and "Load more") */

input,
select,
textarea,
button,
.button {
  font: inherit;
  color: inherit;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--card);
}

button,
.button {
  cursor: pointer;
  text-decoration: none;
}

button.danger {
  color: var(--text-major_outage);
  border-color: var(--text-major_outage);
}

input[type="checkbox"] {
  padding: 0;
}

/* Admin */

.admin-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

/* One row: name, sections, then the actions on the right. On narrow screens the
   sections scroll sideways instead of wrapping. */
.admin-bar .wrap {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-block: 0.5rem;
}

.admin-bar .site-name {
  flex: none;
  white-space: nowrap;
}

.admin-bar .site-name span {
  color: var(--muted);
  font-weight: 400;
}

.admin-bar nav {
  display: flex;
  gap: 0.25rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-bar nav a {
  white-space: nowrap;
}

.admin-bar nav a {
  padding: 0.3rem 0.7rem;
  border-radius: 0.375rem;
  color: var(--fg);
  text-decoration: none;
}

.admin-bar nav a:hover {
  background: var(--chip);
}

.admin-bar nav a[aria-current="page"] {
  background: var(--chip);
  font-weight: 600;
}

.admin-actions {
  display: flex;
  flex: none;
  gap: 0.5rem;
  align-items: center;
  margin-left: auto;
  font-size: 0.9rem;
}

.view-site {
  padding: 0.3rem 0.6rem;
  border-radius: 0.375rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.view-site:hover {
  background: var(--chip);
  color: var(--fg);
}

/* The signed-in admin: an initial that opens a small menu. */
.user-menu {
  position: relative;
}

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

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

.avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--fill-maintenance);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.avatar:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.user-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 14rem;
  padding: 0.75rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
}

.user-menu-panel p {
  margin: 0 0 0.6rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.user-menu-panel strong {
  color: var(--fg);
}

@media (max-width: 40rem) {
  .admin-bar .site-name span,
  .view-site span {
    display: none;
  }

  .view-site {
    padding-inline: 0.4rem;
  }
}

.admin {
  padding-bottom: 4rem;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-block: 1.5rem 1rem;
}

.page-head h1 {
  margin: 0;
  font-size: 1.6rem;
}

.button.primary,
button[type="submit"] {
  background: var(--link);
  border-color: var(--link);
  color: var(--card);
  font-weight: 500;
}

.admin-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 0.8rem 1.1rem;
  border-radius: 0.75rem;
  background: var(--fill);
  color: #fff;
  font-weight: 600;
}

.admin-banner a {
  color: inherit;
  font-weight: 400;
}

.empty-state {
  padding: 1.25rem;
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-card {
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card-actions {
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--card-muted);
  border-radius: 0 0 0.75rem 0.75rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.25rem;
  font-weight: 500;
}

label small {
  font-weight: normal;
  color: var(--muted);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

/* Radio buttons and checkboxes shown as toggle buttons. */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choices legend {
  width: 100%;
}

.choice {
  position: relative;
  display: inline-flex;
  font-weight: 400;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background: var(--card);
  cursor: pointer;
  user-select: none;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.choice input:checked + span {
  border-color: var(--fill, var(--link));
  background: color-mix(in srgb, var(--fill, var(--link)) 16%, var(--card));
  color: var(--text, var(--fg));
  font-weight: 600;
}

/* Markdown editor: toolbar, Write / Preview, preview pane. */
.md-editor {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  overflow: hidden;
}

.md-editor:focus-within {
  border-color: var(--link);
}

.md-editor textarea {
  border: 0;
  border-radius: 0;
  outline: none;
  min-height: 4.5rem;
  resize: vertical;
}

.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--card-muted);
}

.md-toolbar button {
  min-width: 2rem;
  padding: 0.2rem 0.5rem;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.md-toolbar button:hover:not(:disabled),
.md-toolbar button[aria-pressed="true"] {
  background: var(--chip);
  color: var(--fg);
}

.md-toolbar button:disabled {
  opacity: 0.4;
}

.md-tabs {
  display: flex;
  gap: 0.15rem;
  margin-left: auto;
}

.md-preview {
  min-height: 4.5rem;
  padding: 0.6rem 0.75rem;
}

/* The update composer: one line until used, then the editor and its footer. */
.composer {
  display: grid;
  gap: 0.6rem;
}

.composer.collapsed .md-toolbar,
.composer.collapsed .composer-footer {
  display: none;
}

.composer.collapsed textarea {
  height: 2.6rem !important;
  min-height: 0;
  resize: none;
  overflow: hidden;
  cursor: text;
}

.composer-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.composer-footer button[type="submit"] {
  margin-left: auto;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pill {
  position: relative;
  display: inline-flex;
  font-weight: 400;
}

.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill span {
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.pill input:focus-visible + span {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.pill input:checked + span {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--card);
  font-weight: 600;
}

.pill-ended input:checked + span {
  border-color: var(--fill-operational);
  background: var(--fill-operational);
  color: #fff;
}

.ended-hint {
  display: none;
  color: var(--muted);
}

.composer:has(.pill-ended input:checked) .ended-hint {
  display: inline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.publish-status {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem 0.9rem;
}

.publish-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.publish-head .hint {
  font-size: 0.85rem;
}

.progress {
  height: 0.5rem;
  border-radius: 1rem;
  background: var(--chip);
  overflow: hidden;
}

/* The fill glides to each new value, and its stripes move while publishing. */
.progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background-color: var(--fill-maintenance);
  background-image: linear-gradient(
    135deg,
    rgb(255 255 255 / 0.25) 25%,
    transparent 25%,
    transparent 50%,
    rgb(255 255 255 / 0.25) 50%,
    rgb(255 255 255 / 0.25) 75%,
    transparent 75%
  );
  background-size: 1rem 1rem;
  transition:
    width 1.2s ease-out,
    background-color 0.4s;
  animation: progress-stripes 0.8s linear infinite;
}

@keyframes progress-stripes {
  to {
    background-position: 1rem 0;
  }
}

.publish-status.done .progress > span {
  background-color: var(--fill-operational);
  background-image: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .progress > span {
    transition: none;
    animation: none;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Simple lists: past incidents, updates */
.rows {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.rows li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.7rem 1.1rem;
}

.rows li + li {
  border-top: 1px solid var(--border);
}

.rows li > a {
  flex: 1;
  color: var(--fg);
  font-weight: 500;
}

.rows time {
  color: var(--muted);
  font-size: 0.875rem;
}

.update-summary {
  flex: 1;
  display: grid;
  gap: 0.15rem;
}

.update-summary time {
  font-size: 0.8rem;
}

.update-text {
  white-space: pre-wrap;
}

.danger-zone {
  margin-top: 3rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.danger-zone h2 {
  margin-top: 1rem;
}

/* Services: sortable list with inline editing */
.sortable {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sortable li {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 1rem 0.6rem 0.4rem;
  background: var(--card);
}

.sortable li:first-child {
  border-radius: 0.75rem 0.75rem 0 0;
}

.sortable li:last-child {
  border-radius: 0 0 0.75rem 0.75rem;
}

.sortable li + li {
  border-top: 1px solid var(--border);
}

.sortable li.dragging {
  position: relative;
  z-index: 1;
  box-shadow: 0 6px 20px rgb(0 0 0 / 18%);
  border-radius: 0.5rem;
  outline: 2px solid var(--link);
}

.drag-handle {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
}

.dragging .drag-handle {
  cursor: grabbing;
}

.drag-handle svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.drag-handle:focus-visible {
  outline: 2px solid var(--link);
  border-radius: 0.375rem;
}

.service-fields {
  flex: 1;
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

/* Inline fields look like text until hovered or focused. */
.service-fields input {
  width: 100%;
  border-color: transparent;
  background: transparent;
  padding: 0.15rem 0.4rem;
}

.service-fields input:hover,
.service-fields input:focus {
  border-color: var(--border);
  background: var(--bg);
}

.service-fields input[name="name"] {
  font-weight: 600;
}

.service-fields input[name="description"] {
  font-size: 0.875rem;
  color: var(--muted);
}

.save-status {
  min-height: 1.5rem;
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.add-service {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.add-service input {
  flex: 1 1 12rem;
}

.error {
  white-space: pre-line;
  color: var(--text-major_outage);
}

.error[hidden] {
  display: none;
}

.add-service .error {
  flex-basis: 100%;
  margin: 0;
}

@media (max-width: 36rem) {
  .update-row {
    grid-template-columns: 1fr;
  }

  .sortable li {
    flex-wrap: wrap;
  }

  .sortable .chip {
    margin-left: 2.75rem;
  }
}

@media (max-width: 30rem) {
  .services li,
  .incident > header,
  .entries {
    padding-inline: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero {
    transition: none;
  }
}

/* Admin: make it obvious that incidents open their edit page. */

.incident > header > :first-child {
  flex: 1;
}

.admin .incident header h3 a {
  color: var(--link);
}

.button.small {
  padding: 0.2rem 0.65rem;
  font-size: 0.875rem;
}

.edit-button {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font-weight: 500;
}

.edit-button svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.edit-button:hover {
  border-color: var(--link);
  color: var(--link);
}

/* Past incident rows: the whole row is the link. */
.admin .rows li:has(> a) {
  position: relative;
}

.admin .rows li > a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.admin .rows li:has(> a):hover {
  background: var(--card-muted);
}

.admin .rows li:has(> a):hover > a {
  color: var(--link);
  text-decoration: underline;
}

.rows .chevron {
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

/* A logo before the site name (SITE_LOGO). With a dark version (SITE_LOGO_DARK),
   the one that fits the theme is shown. */
.topbar .site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.logo {
  display: block;
  height: 2rem;
  width: auto;
  max-width: 14rem;
  object-fit: contain;
}

.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light {
    display: none;
  }

  :root:not([data-theme="light"]) .logo-dark {
    display: block;
  }
}

:root[data-theme="dark"] .logo-light {
  display: none;
}

:root[data-theme="dark"] .logo-dark {
  display: block;
}

/* Who posted an update (admin only). */
.entry-by {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Narrow screens: an incident's labels go on a row of their own, under the title. */
@media (max-width: 40rem) {
  .incident > header {
    flex-direction: column;
    align-items: flex-start;
  }
}
