:root {
  color-scheme: light;

  --page-background: #ffffff;
  --section-background: #fafafc;
  --surface-background: #f5f5f7;
  --surface-elevated: #ffffff;
  --surface-hover: #f0f0f2;

  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;

  --accent: #0066cc;
  --accent-hover: #0071e3;
  --focus-color: #0071e3;

  --status-up: #03a10e;
  --status-down: #e30000;
  --status-warning: #f56300;
  --status-info: #0071e3;
  --status-unknown: #86868b;

  --chart-up: #00a86b;
  --chart-down: #e23b3b;
  --chart-warning: #f57c00;
  --chart-unknown: #8e8e93;

  --separator: rgba(0, 0, 0, 0.1);
  --separator-strong: rgba(0, 0, 0, 0.16);
  --nav-background: rgba(250, 250, 252, 0.82);
  --focus-gap: #ffffff;

  --focus-ring:
    0 0 0 2px var(--focus-gap),
    0 0 0 4px var(--focus-color);

  --radius-small: 8px;
  --radius-medium: 14px;
  --radius-large: 20px;
  --radius-pill: 9999px;

  --page-width: 1360px;
  --page-margin: clamp(20px, 5vw, 72px);
  --header-height: 48px;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --page-background: #000000;
  --section-background: #0a0a0a;
  --surface-background: #161617;
  --surface-elevated: #1d1d1f;
  --surface-hover: #242426;

  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #86868b;

  --accent: #2997ff;
  --accent-hover: #64b5ff;
  --focus-color: #2997ff;

  --status-up: #30d158;
  --status-down: #ff453a;
  --status-warning: #ff9f0a;
  --status-info: #2997ff;
  --status-unknown: #86868b;

  --chart-up: #16c784;
  --chart-down: #ff5c57;
  --chart-warning: #ff9f0a;
  --chart-unknown: #8e8e93;

  --separator: rgba(255, 255, 255, 0.1);
  --separator-strong: rgba(255, 255, 255, 0.16);
  --nav-background: rgba(22, 22, 23, 0.82);
  --focus-gap: #000000;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--page-background);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page-background);
  color: var(--text-primary);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    "Malgun Gothic",
    sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.022em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 1000;
  padding: 8px 12px;
  border-radius: var(--radius-small);
  background: var(--surface-elevated);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--separator);
  opacity: 0;
  pointer-events: none;
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--nav-background);
  box-shadow: 0 1px 0 var(--separator);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(
    calc(100% - (var(--page-margin) * 2)),
    var(--page-width)
  );
  height: 100%;
  margin: 0 auto;
  gap: 24px;
}

.header-left {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 18px;
}

.site-logo {
  display: block;
  flex: 0 0 auto;
  width: 172px;
  height: 36px;
  object-fit: contain;
  object-position: left center;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  width: 42px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-background);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--separator);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--surface-hover);
}

.theme-toggle-icon {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  color: var(--text-tertiary);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
  pointer-events: none;
}

.theme-toggle-icon--sun {
  left: 6px;
}

.theme-toggle-icon--moon {
  right: 6px;
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-elevated);
  box-shadow:
    0 0 0 1px var(--separator),
    0 1px 3px rgba(0, 0, 0, 0.14);
  transition: left 160ms ease;
  pointer-events: none;
}

html[data-theme="dark"] .theme-toggle-thumb {
  left: 21px;
}

.header-status {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: 28px;
  padding: 0 12px;
  gap: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-background);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.header-status-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot,
.metric-indicator {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--status-unknown);
}

.is-up {
  background-color: var(--status-up);
}

.is-down {
  background-color: var(--status-down);
}

.is-warning {
  background-color: var(--status-warning);
}

.is-info {
  background-color: var(--status-info);
}

.page {
  width: min(
    calc(100% - (var(--page-margin) * 2)),
    var(--page-width)
  );
  margin: 0 auto;
  padding: 88px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 64px;
  margin-bottom: 56px;
}

.page-title {
  max-width: 900px;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.updated-block {
  min-width: 200px;
  padding-bottom: 8px;
  text-align: right;
}

.updated-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 16px;
}

.updated-value,
.section-count,
.footer-time {
  color: var(--text-secondary);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 32px;
  font-weight: 600;
  line-height: 40px;
  letter-spacing: -0.035em;
}

.section-description {
  margin: 6px 0 0;
  color: var(--text-tertiary);
  font-size: 14px;
  line-height: 20px;
}

.notices-section {
  margin-bottom: 48px;
}

.notices-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.notices-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.notices-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-background);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.notices-list {
  display: grid;
  gap: 12px;
}

.notice-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 24px 28px;
  border-radius: var(--radius-medium);
  background: var(--section-background);
  box-shadow: inset 0 0 0 1px var(--separator);
}

.notice-indicator {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--status-info);
}

.notice-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.notice-description {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.notice-description > :first-child {
  margin-top: 0;
}

.notice-description > :last-child {
  margin-bottom: 0;
}

.notice-description p {
  margin: 0 0 14px;
}

.notice-description hr {
  height: 1px;
  margin: 20px 0;
  border: 0;
  background: var(--separator);
}

.notice-description strong {
  color: var(--text-primary);
  font-weight: 600;
}

.notice-description ul,
.notice-description ol {
  margin: 14px 0;
  padding-left: 24px;
}

.notice-description li {
  margin: 6px 0;
}

.notice-description code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-background);
  color: var(--text-primary);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: 13px;
}

.notice-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 120px;
}

.notice-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-background);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.notice-time {
  color: var(--text-tertiary);
  font-size: 11px;
  white-space: nowrap;
}

.overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 96px;
  border-radius: var(--radius-large);
  background: var(--surface-background);
  box-shadow: inset 0 0 0 1px var(--separator);
}

.metric-card {
  min-width: 0;
  min-height: 176px;
  padding: 28px 30px;
  box-shadow: inset -1px 0 var(--separator);
}

.metric-card:last-child {
  box-shadow: none;
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.metric-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.metric-value {
  display: block;
  color: var(--text-primary);
  font-size: 40px;
  font-weight: 600;
  line-height: 44px;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.metric-value--status {
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.03em;
}

.metric-caption {
  display: block;
  margin-top: 10px;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 17px;
}

.services-section {
  margin-bottom: 96px;
}

.services-panel {
  min-height: 300px;
}

.services-grid,
.services-loading-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.service-skeleton {
  min-width: 0;
  min-height: 430px;
  padding: 24px;
  overflow: hidden;
  border-radius: var(--radius-large);
  background: var(--section-background);
  box-shadow: inset 0 0 0 1px var(--separator);
}

.service-card {
  position: relative;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.service-card:hover {
  z-index: 2;
  background: var(--surface-elevated);
  box-shadow:
    inset 0 0 0 1px var(--separator-strong),
    0 14px 36px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.service-card--up {
  --service-chart-color: var(--chart-up);
}

.service-card--down {
  --service-chart-color: var(--chart-down);
}

.service-card--unknown {
  --service-chart-color: var(--chart-unknown);
}

.service-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.service-title-group {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.service-status-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--chart-unknown);
  box-shadow: 0 0 0 4px rgba(142, 142, 147, 0.1);
}

.service-card--up .service-status-dot {
  background: var(--chart-up);
  box-shadow: 0 0 0 4px color-mix(
    in srgb,
    var(--chart-up) 14%,
    transparent
  );
}

.service-card--down .service-status-dot {
  background: var(--chart-down);
  box-shadow: 0 0 0 4px color-mix(
    in srgb,
    var(--chart-down) 14%,
    transparent
  );
}

.service-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-status-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-background);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.service-card--up .service-status-badge {
  color: var(--chart-up);
}

.service-card--down .service-status-badge {
  color: var(--chart-down);
}

.service-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
}

.service-response {
  color: var(--text-primary);
  font-size: 38px;
  font-weight: 650;
  line-height: 42px;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.service-response-unit {
  margin-left: 4px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.service-uptime-summary {
  text-align: right;
}

.service-uptime-label {
  display: block;
  color: var(--text-tertiary);
  font-size: 11px;
  line-height: 16px;
}

.service-uptime-value {
  display: block;
  margin-top: 2px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.service-uptime-value.is-low {
  color: var(--chart-warning);
}

.service-history-block {
  margin-top: 26px;
}

.service-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.service-block-title {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.service-block-caption {
  color: var(--text-tertiary);
  font-size: 10px;
  white-space: nowrap;
}

.service-history-bars {
  display: grid;
  grid-template-columns:
    repeat(var(--history-columns, 90), minmax(1px, 1fr));
  gap: 0;
  width: 100%;
  min-height: 18px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--separator-strong);
}

.service-history-segment {
  min-width: 1px;
  height: 18px;
  border-radius: 0;
  background: var(--status-unknown);
}

.service-history-segment--up {
  background: var(--status-up);
}

.service-history-segment--partial {
  background: var(--status-warning);
}

.service-history-segment--down {
  background: var(--status-down);
}

.service-history-segment--nodata {
  background: var(--separator-strong);
}

.service-history-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--text-tertiary);
  font-size: 10px;
}

.service-response-block {
  margin-top: 26px;
  padding-top: 22px;
  box-shadow: inset 0 1px var(--separator);
}

.service-chart {
  position: relative;
  width: 100%;
  height: 110px;
  margin-top: 8px;
  touch-action: none;
}

.service-chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.service-chart-area {
  fill: var(--service-chart-color);
  opacity: 0.12;
}

.service-chart-line {
  fill: none;
  stroke: var(--service-chart-color);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.service-chart-hit {
  fill: transparent;
  cursor: crosshair;
}

.service-chart-crosshair {
  stroke: var(--separator-strong);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.service-tooltip {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 5;
  min-width: 102px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--text-primary);
  color: var(--page-background);
  font-size: 10px;
  line-height: 15px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  transform: translateX(-50%);
  pointer-events: none;
}

.service-tooltip strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  color: var(--text-tertiary);
  font-size: 11px;
}

.service-last-check {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-samples {
  flex: 0 0 auto;
  white-space: nowrap;
}

.services-message {
  padding: 64px 24px;
  border-radius: var(--radius-large);
  background: var(--section-background);
  color: var(--text-tertiary);
  font-size: 14px;
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--separator);
}

.services-message p {
  margin: 0 0 18px;
}

.retry-button {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--text-primary);
  color: var(--page-background);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.service-skeleton {
  display: flex;
  flex-direction: column;
}

.skeleton-line,
.skeleton-bar,
.skeleton-chart {
  position: relative;
  overflow: hidden;
  background: var(--surface-background);
}

.skeleton-line::after,
.skeleton-bar::after,
.skeleton-chart::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--surface-hover) 48%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: loading-sweep 1.35s ease-in-out infinite;
}

.skeleton-title {
  width: 52%;
  height: 15px;
  border-radius: 5px;
}

.skeleton-value {
  width: 30%;
  height: 34px;
  margin-top: 34px;
  border-radius: 7px;
}

.skeleton-bar {
  width: 100%;
  height: 18px;
  margin-top: 38px;
  border-radius: var(--radius-pill);
}

.skeleton-chart {
  width: 100%;
  height: 110px;
  margin-top: 42px;
  border-radius: 10px;
}

@keyframes loading-sweep {
  to {
    transform: translateX(100%);
  }
}

.footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 80px;
  padding-top: 32px;
  color: var(--text-tertiary);
}

.noscript-message {
  margin: 24px;
  padding: 16px;
  border-radius: var(--radius-medium);
  background: var(--section-background);
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  .page {
    padding-top: 72px;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
  }

  .updated-block {
    text-align: left;
  }

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

  .metric-card:nth-child(1) {
    box-shadow:
      inset -1px 0 var(--separator),
      inset 0 -1px var(--separator);
  }

  .metric-card:nth-child(2) {
    box-shadow:
      inset 0 -1px var(--separator);
  }

  .metric-card:nth-child(3) {
    box-shadow:
      inset -1px 0 var(--separator);
  }

  .metric-card:nth-child(4) {
    box-shadow: none;
  }
}

@media (max-width: 860px) {
  .services-grid,
  .services-loading-grid {
    grid-template-columns: 1fr;
  }

  .site-logo {
    width: 144px;
    height: 32px;
  }

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

  .notice-meta {
    grid-column: 2;
    align-items: flex-start;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --page-margin: 16px;
    --header-height: 46px;
  }

  .site-logo {
    width: 124px;
    height: 30px;
  }

  .header-left {
    gap: 12px;
  }

  .header-status {
    max-width: 140px;
    padding: 0 9px;
  }

  .page {
    padding-top: 52px;
    padding-bottom: 48px;
  }

  .hero {
    margin-bottom: 40px;
  }

  .page-title {
    font-size: 42px;
  }

  .notices-section {
    margin-bottom: 40px;
  }

  .notice-card {
    padding: 20px;
  }

  .overview {
    grid-template-columns: 1fr;
    margin-bottom: 64px;
  }

  .metric-card {
    min-height: 148px;
    padding: 24px;
    box-shadow:
      inset 0 -1px var(--separator) !important;
  }

  .metric-card:last-child {
    box-shadow: none !important;
  }

  .services-section {
    margin-bottom: 64px;
  }

  .section-header {
    align-items: flex-start;
  }

  .section-title {
    font-size: 28px;
    line-height: 36px;
  }

  .section-count {
    display: none;
  }

  .service-card,
  .service-skeleton {
    min-height: 410px;
    padding: 20px;
  }

  .service-response {
    font-size: 32px;
    line-height: 36px;
  }

  .service-chart {
    height: 100px;
  }

  .footer {
    justify-content: flex-start;
    margin-top: 64px;
  }
}

@media (max-width: 400px) {
  .site-logo {
    width: 108px;
    height: 28px;
  }

  .header-status {
    max-width: 116px;
  }

  .page-title {
    font-size: 36px;
  }

  .service-head {
    gap: 12px;
  }

  .service-status-badge {
    padding: 0 8px;
  }

  .service-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .service-uptime-summary {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .theme-toggle-thumb,
  .service-card {
    transition: none;
  }

  .skeleton-line::after,
  .skeleton-bar::after,
  .skeleton-chart::after {
    animation: none;
  }
}