:root {
  color-scheme: dark;
  --bg: #0d1110;
  --surface: #151a18;
  --surface-raised: #1b211f;
  --border: #2a332f;
  --text: #eef5f1;
  --muted: #9baaa3;
  --subtle: #74827b;
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.13);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.13);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(56, 189, 248, 0.08), transparent 260px),
    var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: rgba(21, 26, 24, 0.72);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.home-link:focus-visible,
.home-link:hover {
  border-color: var(--cyan);
  background: var(--surface-raised);
  outline: none;
  transform: translateY(-1px);
}

.minecraft-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.minecraft-topbar .home-link {
  margin-bottom: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 26, 24, 0.72);
}

.lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.lang-button:focus-visible,
.lang-button:hover,
.lang-button.active {
  color: var(--text);
  background: rgba(56, 189, 248, 0.14);
  outline: none;
}

.page-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 32px 18px 20px;
}

.page-shell--status {
  max-width: 980px;
}

.hero {
  padding: 28px 0 22px;
}

.hero--compact {
  padding-bottom: 16px;
}

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

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

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

h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.section {
  padding: 22px 0;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.card-grid,
.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.service-card,
.status-card,
.details-panel,
.notice,
.status-summary {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 26, 24, 0.92);
  box-shadow: var(--shadow);
}

.service-card {
  display: grid;
  min-height: 140px;
  padding: 18px;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.service-card:focus-visible,
.service-card:hover {
  border-color: var(--cyan);
  background: var(--surface-raised);
  outline: none;
  transform: translateY(-2px);
}

.service-card--status {
  border-top-color: var(--green);
}

.service-card--antfarm {
  border-top-color: var(--amber);
}

.service-card--grafana {
  border-top-color: var(--cyan);
}

.service-card--minecraft {
  border-top-color: var(--red);
}

.service-card--autolog {
  border-top-color: var(--green);
}

.autolog-placeholder {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--border);
  border-top-color: var(--green);
  border-radius: 8px;
  background:
    radial-gradient(circle at 90% 10%, var(--green-soft), transparent 38%),
    rgba(21, 26, 24, 0.92);
  box-shadow: var(--shadow);
}

.autolog-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(74, 222, 128, 0.45);
  border-radius: 16px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.autolog-placeholder h2 {
  font-size: clamp(1.6rem, 5vw, 2.35rem);
}

.autolog-placeholder p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.autolog-status {
  justify-self: start;
  padding: 6px 10px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.card-kicker,
.card-url,
.summary-label,
dt {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.card-title {
  align-self: end;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.card-url {
  align-self: end;
  overflow-wrap: anywhere;
  text-transform: none;
}

.details-panel {
  padding: 18px;
}

.details-list,
.metric-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.details-list div,
.metric-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

dd {
  margin: 0;
  min-width: 0;
  color: var(--text);
  font-weight: 750;
  text-align: right;
  overflow-wrap: anywhere;
}

.notice {
  margin: 20px 0 16px;
  padding: 16px;
  color: var(--muted);
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.36);
}

.notice strong {
  display: block;
  margin-bottom: 4px;
  color: var(--amber);
}

.site-footer {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 20px 18px 34px;
  color: var(--subtle);
  font-size: 0.9rem;
}

.status-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
}

.status-summary div {
  display: grid;
  gap: 3px;
}

.status-summary strong {
  font-size: 1rem;
}

.status-card {
  min-height: 136px;
  padding: 16px;
}

.status-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill--neutral {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: rgba(56, 189, 248, 0.55);
}

.status-pill--warning {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(251, 191, 36, 0.58);
}

.status-pill--offline {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(251, 113, 133, 0.62);
}

.metric-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 850;
  line-height: 1;
}

.history-section {
  padding-top: 10px;
}

.history-heading {
  gap: 12px;
}

.history-range {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-range__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(21, 26, 24, 0.68);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.history-range__button:hover,
.history-range__button:focus-visible,
.history-range__button.is-active {
  border-color: rgba(56, 189, 248, 0.65);
  color: var(--text);
  background: rgba(56, 189, 248, 0.12);
  outline: none;
}

.history-range__button:hover,
.history-range__button:focus-visible {
  transform: translateY(-1px);
}

.history-feedback {
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(21, 26, 24, 0.72);
}

.history-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.history-card {
  min-height: auto;
}

.history-card--wide {
  grid-column: 1 / -1;
}

.history-card__body {
  display: grid;
  gap: 12px;
}

.disk-summary {
  display: grid;
  gap: 14px;
}

.disk-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
}

.disk-summary-label {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.disk-summary-value {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
}

.disk-progress {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: rgba(42, 51, 47, 0.9);
  overflow: hidden;
}

.disk-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--amber);
}

.disk-progress-fill--storage {
  background: var(--cyan);
}

.history-legend {
  display: grid;
  gap: 8px;
}

.history-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-legend-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.history-legend-value {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.history-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.history-chart {
  border: 1px solid rgba(42, 51, 47, 0.9);
  border-radius: 8px;
  background: rgba(13, 17, 16, 0.72);
  overflow: hidden;
}

.history-svg {
  display: block;
  width: 100%;
  height: 180px;
}

.history-grid-line {
  stroke: rgba(116, 130, 123, 0.22);
  stroke-width: 1;
}

.history-line-path {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-axis-label {
  fill: var(--subtle);
  font-size: 11px;
}

.history-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--subtle);
  font-size: 0.8rem;
}

.history-chart-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 18px;
  border: 1px dashed rgba(42, 51, 47, 0.9);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 620px) {
  .page-shell {
    padding-top: 46px;
  }


  .history-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

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

  .details-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .details-list div {
    display: grid;
    gap: 5px;
  }

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

@media (min-width: 920px) {
  .page-shell {
    padding-top: 64px;
  }

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

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

.page-shell--minecraft {
  max-width: 980px;
}

.minecraft-address {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 18px;
}

.minecraft-address strong {
  font-size: 1.8rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.minecraft-address p {
  margin: 0;
  color: var(--muted);
}

.copy-address-button {
  justify-self: start;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-radius: 8px;
  color: var(--text);
  background: rgba(56, 189, 248, 0.1);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.copy-address-button:focus-visible,
.copy-address-button:hover {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.16);
  outline: none;
  transform: translateY(-1px);
}

.minecraft-subheading {
  margin: 18px 0 8px;
  font-size: 1rem;
  line-height: 1.2;
}

.minecraft-card {
  min-height: 180px;
}

.minecraft-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.minecraft-links {
  display: grid;
  gap: 10px;
}

.minecraft-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: rgba(21, 26, 24, 0.68);
  font-weight: 750;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.minecraft-links a:focus-visible,
.minecraft-links a:hover {
  border-color: var(--cyan);
  background: var(--surface-raised);
  outline: none;
  transform: translateY(-1px);
}

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

.minecraft-wide-card {
  min-height: auto;
}

.minecraft-full-card {
  grid-column: 1 / -1;
  min-height: auto;
}

.voice-chat-wide {
  width: 100%;
}

.voice-chat-wide .status-card__header {
  align-items: flex-start;
}

.voice-chat-wide .voice-steps,
.voice-chat-wide .note {
  max-width: 74ch;
}

.command-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.command-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(42, 198, 255, 0.45);
  border-radius: 999px;
  background: rgba(42, 198, 255, 0.08);
  color: #f4f8f4;
  font-size: 0.95rem;
  white-space: nowrap;
}

.voice-steps {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #b7cbc4;
  line-height: 1.6;
}

.voice-steps li {
  margin-bottom: 6px;
}

.note {
  color: #9fb4ad;
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 800px) {
  .minecraft-extra-grid {
    grid-template-columns: 1fr;
  }

  .command-pill {
    white-space: normal;
  }
}
