:root {
  --paper: oklch(96% 0.018 87);
  --paper-deep: oklch(91% 0.025 85);
  --ink: oklch(24% 0.036 205);
  --ink-soft: oklch(44% 0.028 202);
  --rule: oklch(77% 0.025 87);
  --sage: oklch(54% 0.09 158);
  --sage-soft: oklch(90% 0.035 155);
  --brick: oklch(51% 0.13 34);
  --brick-soft: oklch(91% 0.04 40);
  --warning: oklch(58% 0.13 62);
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --body: "Avenir Next", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper-deep);
  color: var(--ink);
  font-family: var(--body);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, transparent 0 49.9%, color-mix(in oklch, var(--rule), transparent 72%) 50%, transparent 50.1%) 0 0 / 18px 18px,
    var(--paper);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 4rem) 0 2rem;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(230px, 0.45fr);
  gap: clamp(2rem, 7vw, 8rem);
  align-items: end;
  padding-bottom: clamp(2rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--ink);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.8rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.17em;
}

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

h1 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(3.8rem, 10vw, 8.6rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.74;
}

h2 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.masthead__note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding-left: 1.1rem;
  border-left: 3px solid var(--brick);
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.65;
}

.masthead__note p {
  margin-bottom: 0;
}

.edition {
  color: var(--brick);
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
}

.status-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(450px, 1.4fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--rule);
}

.overall-status {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
}

.status-mark,
.service-status span {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: inset 0 0 0 2px var(--paper);
}

.status-mark--loading {
  background: transparent;
}

.overall-status--attention .status-mark {
  background: var(--warning);
}

.refresh-copy {
  margin: 0.45rem 0 0 1.4rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.host-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--rule);
}

.host-facts div {
  min-height: 90px;
  padding: 1rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

dt {
  margin-bottom: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

dd {
  margin: 0;
}

.host-facts dd {
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(250px, 0.8fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.service-count {
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.service-list {
  border-top: 2px solid var(--ink);
}

.service-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: stretch;
  min-height: 220px;
  border-bottom: 1px solid var(--ink);
}

.service-row__index {
  padding-top: 1.35rem;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 1.3rem;
}

.service-row__body {
  padding: 1.35rem 0 1.5rem;
}

.service-row__topline {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
}

.service-kind {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--brick);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-row[data-accent="sage"] .service-kind {
  color: var(--sage);
}

.service-row h3 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.service-description {
  max-width: 42rem;
  margin: 0.9rem 0 1.5rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.service-status {
  display: flex;
  flex: 0 0 auto;
  gap: 0.45rem;
  align-items: center;
  padding-top: 0.2rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.service-status--degraded span {
  background: var(--warning);
}

.service-status--unavailable span {
  border-radius: 0;
  background: var(--brick);
}

.deployment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.8rem;
  margin: 0;
}

.deployment-meta dd {
  font-size: 0.8rem;
  font-weight: 600;
}

.service-link {
  display: flex;
  width: 8.8rem;
  padding: 1.35rem 1rem;
  align-items: end;
  justify-content: space-between;
  border-left: 1px solid var(--rule);
  background: color-mix(in oklch, var(--paper-deep), transparent 35%);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.service-link:hover,
.service-link:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
}

.desk-notes {
  padding-top: 0.2rem;
}

.note-list {
  margin: 2rem 0 2.5rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.note-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.7rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.note-list span {
  color: var(--brick);
  font-family: var(--display);
}

.note-list p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.6;
}

.utility-links a {
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.utility-links a:hover,
.utility-links a:focus-visible {
  color: var(--brick);
}

.loading-row,
.error-row {
  padding: 2rem 0;
  color: var(--ink-soft);
}

.loading-row span {
  display: block;
  width: 3rem;
  height: 2px;
  margin-bottom: 1rem;
  background: var(--sage);
  animation: scan 1.1s ease-in-out infinite alternate;
  transform-origin: left;
}

.error-row strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--brick);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--ink);
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

@keyframes scan {
  from { transform: scaleX(0.25); }
  to { transform: scaleX(1); }
}

@media (max-width: 820px) {
  .masthead,
  .status-board,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .masthead {
    gap: 2rem;
  }

  .masthead__note {
    max-width: 24rem;
  }

  .status-board {
    gap: 2.5rem;
  }

  .content-grid {
    gap: 4rem;
  }
}

@media (max-width: 580px) {
  .shell {
    width: min(100% - 1.25rem, 1180px);
  }

  h1 {
    font-size: clamp(3.55rem, 21vw, 5.5rem);
  }

  .host-facts {
    grid-template-columns: 1fr 1fr;
  }

  .host-facts div {
    min-height: 78px;
    padding: 0.8rem;
  }

  .service-row {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    min-height: 0;
  }

  .service-row__topline {
    display: block;
  }

  .service-status {
    margin-top: 0.7rem;
  }

  .service-link {
    grid-column: 1 / -1;
    width: auto;
    min-height: 3.2rem;
    padding: 0.9rem 1rem;
    align-items: center;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .deployment-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
