/* isAIlive — one stylesheet, light theme, mobile first. */
:root {
  --bg: #f6f4ee;
  --card: #fffdf8;
  --ink: #1d1c1a;
  --muted: #6a665c;
  --line: #e3ded2;
  --link: #0b5fbf;
  --ok: #188a4b;
  --ok-bg: #e2f3e8;
  --maint: #2c64c7;
  --maint-bg: #e5edfb;
  --deg: #a36f00;
  --deg-bg: #fbf0d2;
  --part: #c3570b;
  --part-bg: #fce5d3;
  --major: #c62b23;
  --major-bg: #fadfdc;
  --unk: #8c887d;
  --unk-bg: #ece9e1;
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --display: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid #f0a500;
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.2rem;
  margin: 0 0 0.8rem;
}

h3 {
  font-size: 1rem;
  margin: 1.2rem 0 0.5rem;
}

.wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

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

.small {
  font-size: 0.875rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  left: 8px;
}

/* Header */
.top {
  border-bottom: 1px solid var(--line);
  background: rgba(246, 244, 238, 0.92);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(6px);
}

.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.mark {
  color: var(--ink);
  flex: none;
}

.word {
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.word b {
  font-weight: 800;
}

.word span {
  font-weight: 400;
  color: var(--ok);
  font-style: italic;
  margin-left: 1px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
}

.nav > a {
  color: var(--ink);
  text-decoration: none;
}

.nav > a:hover {
  text-decoration: underline;
}

.langs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
}

.langs a {
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.langs a[aria-current] {
  background: var(--ink);
  color: #fff;
}

main {
  padding-top: 20px;
  padding-bottom: 40px;
}

/* Big answer cards */
.hero,
.verdict {
  border-radius: var(--radius);
  padding: 22px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left-width: 8px;
}

.hero h1 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
  font-family: var(--font);
  letter-spacing: 0;
}

.answer {
  font-family: var(--display);
  font-size: clamp(1.55rem, 5.4vw, 2.35rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.sig {
  flex: none;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0.16em var(--card), 0 0 0 0.3em currentColor;
  transform: translateY(-0.04em);
  margin: 0 0.18em 0 0.2em;
}

.hero .sub,
.verdict p {
  margin: 0 0 8px;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 10px 0 0 !important;
}

.v-operational { border-left-color: var(--ok); }
.v-operational .answer { color: var(--ok); }
.v-maintenance { border-left-color: var(--maint); }
.v-maintenance .answer { color: var(--maint); }
.v-degraded { border-left-color: var(--deg); background: #fffaf0; }
.v-degraded .answer { color: var(--deg); }
.v-partial { border-left-color: var(--part); background: #fff6ef; }
.v-partial .answer { color: var(--part); }
.v-major { border-left-color: var(--major); background: #fff4f2; }
.v-major .answer { color: var(--major); }
.v-unknown { border-left-color: var(--unk); }
.v-unknown .answer { color: var(--ink); }

.why {
  font-size: 0.95rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 18px 0 8px;
  max-width: 62ch;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
  line-height: 1.6;
  vertical-align: middle;
}

.pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.s-operational { color: var(--ok); background: var(--ok-bg); }
.s-maintenance { color: var(--maint); background: var(--maint-bg); }
.s-degraded { color: var(--deg); background: var(--deg-bg); }
.s-partial { color: var(--part); background: var(--part-bg); }
.s-major { color: var(--major); background: var(--major-bg); }
.s-unknown { color: var(--unk); background: var(--unk-bg); }

/* Strips (SVG rects) */
.strip {
  display: block;
  width: 100%;
  height: 22px;
}

.strip-l {
  height: 40px;
}

.f-operational { fill: #7fcf9f; background: #7fcf9f; }
.f-maintenance { fill: #8fb0ec; background: #8fb0ec; }
.f-degraded { fill: #f0c44c; background: #f0c44c; }
.f-partial { fill: #f08c3e; background: #f08c3e; }
.f-major { fill: #e0483f; background: #e0483f; }
.f-unknown { fill: #dcd8cd; background: #dcd8cd; }

.strip rect:hover {
  opacity: 0.7;
}

.strip-empty {
  background: repeating-linear-gradient(90deg, #e7e3d9 0 6px, transparent 6px 9px);
  border-radius: 4px;
}

.axis {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 8px;
}

.legend {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--muted);
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  vertical-align: -1px;
}

/* Blocks */
.block {
  margin-top: 30px;
}

/* Service board */
.board {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name pill" "strip strip";
  gap: 8px 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.row:first-child {
  border-top: 0;
}

.row-name {
  grid-area: name;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  min-width: 0;
}

.row-name strong {
  font-size: 1.02rem;
}

.row-name span {
  color: var(--muted);
  font-size: 0.85rem;
}

.row-name:hover strong {
  text-decoration: underline;
}

.row .pill {
  grid-area: pill;
  justify-self: end;
}

.row .strip {
  grid-area: strip;
  height: 14px;
}

.r-degraded,
.r-partial,
.r-major {
  background: #fff8ee;
}

/* Incident feed */
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.feed li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}

.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
}

.feed-title {
  margin: 4px 0 2px;
}

.feed-title a {
  color: var(--ink);
}

.feed p.small {
  margin: 0;
}

.ongoing {
  color: var(--major);
}

/* Service page */
.crumbs {
  color: var(--muted);
  margin-bottom: 6px;
}

.page-h1 {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  margin: 0;
  letter-spacing: -0.025em;
}

.vendor {
  margin: 2px 0 16px;
}

.split {
  display: grid;
  gap: 14px;
}

.report {
  border-radius: var(--radius);
  padding: 18px 20px;
  background: #fbf3e4;
  border: 1px dashed #d9c49b;
}

.report h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.report p {
  margin: 8px 0 0;
}

.btn {
  font: inherit;
  font-weight: 650;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  width: 100%;
  min-height: 44px;
}

.btn:hover {
  background: #3a3833;
}

.btn:disabled {
  background: #b9b4a8;
  cursor: default;
}

.r-msg:empty {
  display: none;
}

.r-msg {
  font-weight: 600;
}

.r-count {
  font-weight: 600;
  font-size: 0.95rem;
}

.r-count:empty {
  display: none;
}

.signals {
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.signals > div {
  background: var(--card);
  padding: 10px 14px;
  display: grid;
  gap: 2px;
}

.signals dt {
  font-size: 0.85rem;
  color: var(--muted);
}

.signals dd {
  margin: 0;
  font-weight: 550;
}

.parts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.parts li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dotted var(--line);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
}

.out {
  font-weight: 600;
}

.alts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.alts a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}

.alts a:hover {
  border-color: #c9c2b0;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "–";
}

.faq p {
  margin: 8px 0 0;
  max-width: 68ch;
}

.chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips a {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}

.chips a:hover {
  border-color: #c9c2b0;
}

.chips a[aria-current] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Prose pages */
.prose {
  max-width: 70ch;
}

.prose p {
  margin: 0 0 12px;
}

.toc {
  margin: 0;
  padding-left: 1.3em;
  color: var(--muted);
}

.rules {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 8px;
}

.rules li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 10px;
  align-items: start;
}

.rules .pill {
  justify-self: start;
}

/* 404 */
.nf-code {
  font-family: var(--display);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  color: var(--unk);
}

.nf h1 {
  font-size: 1.6rem;
  color: var(--ink);
  font-family: var(--display);
}

.nf .chips {
  margin-top: 12px;
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  font-size: 0.9rem;
}

.foot p {
  margin: 0 0 8px;
}

.foot-about {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (min-width: 680px) {
  .wrap {
    padding: 0 24px;
  }

  main {
    padding-top: 28px;
  }

  .hero,
  .verdict {
    padding: 28px 30px;
  }

  .row {
    grid-template-columns: minmax(11rem, 1.1fr) 2fr 9.5rem;
    grid-template-areas: "name strip pill";
  }

  .row-name {
    flex-direction: column;
    gap: 0;
  }

  .split {
    grid-template-columns: 1fr 17rem;
    align-items: stretch;
  }

  .signals {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .v-operational .sig {
    animation: breathe 2.8s ease-in-out infinite;
  }
}

@keyframes breathe {
  50% {
    box-shadow: 0 0 0 0.16em var(--card), 0 0 0 0.42em color-mix(in srgb, currentColor 35%, transparent);
  }
}
