:root {
  /* Brand colors (brand-guide-v1.0) */
  --brand-red: #F24444;
  --brand-charcoal: #363636;
  --brand-white: #FFFFFF;

  /* Status indicators */
  --status-green: #22C55E;
  --status-yellow: #F59E0B;
  --status-red: #EF4444;

  /* Neutral scale */
  --neutral-50: #FAFAFA;
  --neutral-200: #E5E5E5;
  --neutral-500: #737373;
  --neutral-700: #404040;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: var(--brand-charcoal);
  background: var(--neutral-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand-red);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--neutral-200);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Header */

header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--brand-white);
  border-bottom: 1px solid var(--neutral-200);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo {
  height: 32px;
  display: block;
}

header h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Main */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

/* Overall status banner */

.overall-status {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: var(--brand-white);
  border-radius: 12px;
  border: 1px solid var(--neutral-200);
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.overall-status.status-operational {
  border-left: 4px solid var(--status-green);
}

.overall-status.status-degraded {
  border-left: 4px solid var(--status-yellow);
}

.overall-status.status-outage {
  border-left: 4px solid var(--status-red);
}

.overall-status .status-dot {
  width: 14px;
  height: 14px;
}

.overall-status-text {
  flex: 1;
  min-width: 0;
}

.overall-status h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--brand-charcoal);
}

.status-time {
  color: var(--neutral-500);
  font-size: 13px;
}

/* Status dots (shared) */

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.status-operational .status-dot {
  background: var(--status-green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.status-degraded .status-dot {
  background: var(--status-yellow);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.status-outage .status-dot {
  background: var(--status-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Sections */

section.components,
section.incidents,
section.subscribe {
  background: var(--brand-white);
  border-radius: 12px;
  border: 1px solid var(--neutral-200);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--neutral-700);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Component list */

.component-list {
  list-style: none;
}

.component-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--neutral-200);
  font-size: 15px;
}

.component-list li:first-child {
  border-top: none;
  padding-top: 4px;
}

.component-list li:last-child {
  padding-bottom: 4px;
}

.component-name {
  flex: 1;
  font-weight: 500;
  min-width: 0;
}

.component-status {
  font-size: 13px;
  color: var(--neutral-500);
  flex-shrink: 0;
}

.component-list .status-operational .component-status {
  color: var(--status-green);
}

/* Incidents */

.no-incidents {
  color: var(--neutral-500);
  font-size: 14px;
  padding: 8px 0;
}

/* Subscribe */

.subscribe p {
  font-size: 14px;
  color: var(--neutral-700);
  margin-bottom: 12px;
}

.subscribe-list {
  list-style: none;
  margin: 12px 0;
}

.subscribe-list li {
  padding: 8px 0;
  font-size: 14px;
}

.subscribe-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--neutral-500);
}

/* Footer */

footer {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 32px 24px 48px;
  text-align: center;
  color: var(--neutral-500);
  font-size: 13px;
  border-top: 1px solid var(--neutral-200);
}

footer p {
  margin: 8px 0;
}

.footer-nav {
  margin: 12px 0;
  font-size: 13px;
}

.footer-nav .separator {
  margin: 0 4px;
  color: var(--neutral-200);
}

.copyright {
  color: var(--neutral-500);
  font-size: 12px;
  margin-top: 16px;
}

/* Mobile */

@media (max-width: 600px) {
  header {
    padding: 16px 20px;
  }

  .logo {
    height: 28px;
  }

  main {
    padding: 32px 16px 16px;
  }

  .overall-status {
    padding: 20px 24px;
    gap: 16px;
  }

  .overall-status h2 {
    font-size: 18px;
  }

  section.components,
  section.incidents,
  section.subscribe {
    padding: 20px;
  }

  .component-list li {
    flex-wrap: wrap;
    gap: 8px;
  }

  .component-name {
    flex: 1 1 100%;
    min-width: 0;
  }

  .component-status {
    margin-left: 22px;
  }

  .footer-nav {
    line-height: 1.8;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Dark mode (placeholder for Phase 1+) */

@media (prefers-color-scheme: dark) {
  /* Dark mode は Phase 1 で別途実装、現状ライト固定 */
}
