:root {
  color-scheme: dark;
  --body-background-color: #111111;
  --body-text-color: #e5e7eb;
  --card-background-color: #171717;
  --card-border-color: #404040;
  --nav-background-color: #111111;
  --nav-border-bottom-color: #404040;
  --nav-current-border-bottom-color: #f5f5f5;
  --code-color: #f5f5f5;
  --code-background-color: #0a0a0a;
  --up-border-left-color: #22c55e;
  --down-border-left-color: #ef4444;
  --down-background-color: #2a1111;
  --degraded-border-left-color: #facc15;
  --up-color-color: #e5e7eb;
  --down-color-color: #e5e7eb;
  --degraded-color-color: #e5e7eb;
  --tag-color: #f5f5f5;
  --tag-up-background-color: #166534;
  --tag-down-background-color: #991b1b;
  --tag-degraded-background-color: #854d0e;
  --change-background-color: #332d12;
  --error-button-border-color: #525252;
  --error-button-background-color: #171717;
  --error-button-color: #f5f5f5;
  --submit-button-border-color: #737373;
  --submit-button-background-color: #262626;
  --submit-button-color: #f5f5f5;
  --graph-opacity: .86;
  --graph-filter: grayscale(1) contrast(.9) brightness(1.25);
}

html {
  background: #000;
}

body {
  margin: 0;
  padding-bottom: 0;
  background: #111111;
  color: #e5e7eb;
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: .005em;
  min-height: 100vh;
}

/* Tipografía local: sin Google Fonts ni recursos externos.
   Se fuerza sobre los componentes de Upptime para evitar que Skeleton/Svelte
   reintroduzcan su fuente por defecto. */
html,
body,
button,
input,
select,
textarea,
nav,
main,
article,
a,
p,
span,
div,
h1,
h2,
h3,
h4,
h5,
h6,
code,
pre,
table,
th,
td {
  font-family: 'Courier New', Courier, monospace !important;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.009) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.45), transparent 70%);
}

a {
  color: inherit;
  text-decoration-color: #737373;
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
  text-decoration-color: #d4d4d4;
}

.container {
  width: min(100%, 980px);
  max-width: 980px;
  margin-inline: auto;
  padding-inline: 28px;
}

.koto-status-brandbar {
  background: #0a0a0a;
  border-bottom: 1px solid #262626;
}

.koto-status-brandinner {
  width: min(100%, 980px);
  min-height: 68px;
  margin-inline: auto;
  padding: 0 28px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
}

.koto-status-brand {
  color: #f5f5f5;
  font-size: 1.35rem;
  font-weight: 700 !important;
  font-style: normal !important;
  text-decoration: none;
  letter-spacing: -.025em;
}

.koto-status-brandsep,
.koto-status-brandsection {
  color: #737373;
  font-size: .9rem;
}

nav {
  background: #111111 !important;
  border-bottom: 1px solid #404040 !important;
  box-shadow: none !important;
}

nav a {
  color: #a3a3a3;
  text-decoration: none;
  text-transform: lowercase;
  transition: color .15s ease;
}

nav a:hover,
nav a[aria-current] {
  color: #f5f5f5;
}

[aria-current] {
  border-bottom: 2px solid #f5f5f5 !important;
}

main,
main.container {
  padding-top: 48px;
  padding-bottom: 64px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: inherit;
  color: #f5f5f5;
  letter-spacing: -.02em;
}

/* Upptime puede envolver títulos en enlaces/elementos con estilo heredado.
   Forzamos títulos y marca a romano, nunca cursiva. */
h1,
h1 *,
.koto-status-brand,
.koto-status-brand * {
  font-weight: 700 !important;
  font-style: normal !important;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.55rem);
  font-weight: 700 !important;
  font-style: normal !important;
  line-height: 1.12;
  margin-bottom: 14px;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 42px;
  margin-bottom: 16px;
}

h3 {
  color: #a3a3a3;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
  opacity: 1;
}

h4 {
  font-size: 1rem;
}

p {
  color: #a3a3a3;
}

main > p,
main.container > p {
  max-width: 760px;
  margin-top: 0;
  margin-bottom: 32px;
  color: #a3a3a3;
}

article {
  background: #171717 !important;
  border: 1px solid #404040 !important;
  border-radius: 0 !important;
  padding: 18px 20px;
  box-shadow: none !important;
  transition: border-color .15s ease, background-color .15s ease;
}

article:hover {
  background: #1c1c1c !important;
  border-color: #525252 !important;
}

article + article {
  margin-top: 10px;
}

article.up {
  border-left: 3px solid #22c55e !important;
}

article.down,
article.down-active {
  border-left: 3px solid #ef4444 !important;
}

article.degraded {
  border-left: 3px solid #facc15 !important;
}

article .f {
  gap: 16px;
}

article .graph {
  margin-top: 14px;
  opacity: var(--graph-opacity);
  filter: var(--graph-filter);
}

.tag {
  min-width: 72px;
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 0 !important;
  font-size: .7rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.tag.up,
.tag.closed {
  color: #dcfce7 !important;
  background: #14532d !important;
}

.tag.down,
.tag.open {
  color: #fee2e2 !important;
  background: #7f1d1d !important;
}

.tag.degraded {
  color: #fef9c3 !important;
  background: #713f12 !important;
}

.data,
dd,
time,
small {
  color: #a3a3a3;
}

.changed + section .data {
  background: #262313 !important;
}

code,
pre {
  border-radius: 0 !important;
}

button,
input,
select,
.error-button,
.submit-button {
  font-family: inherit;
}

button,
a.error-button,
.submit-button {
  border-radius: 0 !important;
  box-shadow: none !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 1px solid #f5f5f5;
  outline-offset: 3px;
}

.koto-status-external-note {
  width: min(100% - 56px, 924px);
  margin: 10px auto 0;
  padding: 18px 0 34px;
  border-top: 1px solid #262626;
  color: #737373;
  font-size: .78rem;
}

.koto-status-prompt {
  color: #d4d4d4;
  margin-right: 6px;
}

footer {
  color: #737373 !important;
  font-size: .78rem;
}

footer a {
  color: #a3a3a3;
}

/* Filtros temporales de Upptime */
input[type='radio'] + label,
input[type='checkbox'] + label,
button {
  color: #a3a3a3;
}

input[type='radio']:checked + label,
input[type='checkbox']:checked + label {
  color: #f5f5f5;
  font-weight: 700;
}

/* Scrollbar discreta, equivalente al resto de Kotodama */
* {
  scrollbar-width: thin;
  scrollbar-color: #525252 #111111;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: #111111;
}

*::-webkit-scrollbar-thumb {
  background: #404040;
  border: 2px solid #111111;
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .container {
    padding-inline: 16px;
  }

  .koto-status-brandinner {
    min-height: 60px;
    padding-inline: 16px;
  }

  .koto-status-brand {
    font-size: 1.18rem;
  }

  .koto-status-brandsection {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  main,
  main.container {
    padding-top: 34px;
    padding-bottom: 48px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    margin-top: 34px;
  }

  article {
    padding: 15px 16px;
  }

  .koto-status-external-note {
    width: calc(100% - 32px);
  }
}
