:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4fa;
  --text: #172333;
  --muted: #637083;
  --line: #dce4ee;
  --navy: #102a43;
  --navy-light: #1f4e79;
  --blue: #1769aa;
  --blue-soft: #e8f3fb;
  --green: #147d64;
  --green-soft: #e8f7f2;
  --yellow: #a46800;
  --yellow-soft: #fff5db;
  --red: #b42318;
  --red-soft: #fff0ee;
  --shadow: 0 14px 36px rgba(16, 42, 67, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(23, 105, 170, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans JP",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    Meiryo,
    sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}

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

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  background: linear-gradient(135deg, #0c2238, var(--navy));
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(16, 42, 67, 0.16);
}

.site-header__inner {
  width: min(1080px, calc(100% - 40px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  text-decoration: none;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand__name {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand__sub {
  display: block;
  margin-top: 1px;
  color: #c8d7e6;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.site-header__note {
  color: #d9e5ef;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.global-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.global-nav__list {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0;
  display: flex;
  gap: 4px;
  list-style: none;
}

.global-nav a {
  display: block;
  padding: 13px 16px;
  border-bottom: 3px solid transparent;
  color: #dce8f2;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] {
  border-bottom-color: #6ec1ff;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.page-shell {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.hero {
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.hero__lead {
  max-width: 720px;
  margin: 15px 0 0;
  color: var(--muted);
}

.panel {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel h2,
.panel h3 {
  margin-top: 0;
  line-height: 1.45;
}

.panel h2 {
  margin-bottom: 18px;
  font-size: clamp(21px, 3vw, 27px);
}

.panel h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.panel p:last-child {
  margin-bottom: 0;
}

.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel__header h2,
.panel__header p {
  margin: 0;
}

.panel__meta,
.muted {
  color: var(--muted);
  font-size: 14px;
}

.notice {
  padding: 16px 18px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--blue-soft);
}

.notice p {
  margin: 0;
}

.status-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: flex-start;
  margin-top: 22px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-panel__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.status-panel__label {
  margin: 0 0 5px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.status-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.4;
}

.status-panel p:last-child {
  margin-bottom: 0;
}

.status-panel--ok {
  border-color: #b9dfd3;
  background: linear-gradient(135deg, #ffffff, var(--green-soft));
}

.status-panel--ok .status-panel__icon {
  background: var(--green);
}

.status-panel--ok .status-panel__label {
  color: var(--green);
}

.status-panel--warning {
  border-color: #efd18e;
  background: linear-gradient(135deg, #ffffff, var(--yellow-soft));
}

.status-panel--warning .status-panel__icon {
  background: var(--yellow);
}

.status-panel--warning .status-panel__label {
  color: var(--yellow);
}

.status-panel--error {
  border-color: #efb5b0;
  background: linear-gradient(135deg, #ffffff, var(--red-soft));
}

.status-panel--error .status-panel__icon {
  background: var(--red);
}

.status-panel--error .status-panel__label {
  color: var(--red);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.detail-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.detail-card > :first-child {
  margin-top: 0;
}

.detail-card > :last-child {
  margin-bottom: 0;
}

.metric {
  margin: 4px 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.4;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.badge--ok {
  background: var(--green-soft);
  color: var(--green);
}

.badge--warning {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.badge--error {
  background: var(--red-soft);
  color: var(--red);
}

.news-loading,
.news-error {
  padding: 28px;
  border: 1px dashed #b9c7d6;
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.news-error {
  border-color: #efb5b0;
  background: var(--red-soft);
  color: var(--red);
}

.news-current {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid #b9dfd3;
  border-radius: 14px;
  background: var(--green-soft);
}

.news-current h3 {
  margin: 0 0 10px;
  color: var(--green);
}

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

.news-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.news-card h3 {
  margin: 0 0 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.news-card--maintenance h3 {
  color: var(--blue);
}

.news-card--incident h3 {
  color: var(--red);
}

.news-card p {
  margin: 0 0 15px;
}

.news-card p:last-child {
  margin-bottom: 0;
}

.news-fallback {
  overflow-x: auto;
}

.news-fallback table {
  width: 100% !important;
  max-width: 100%;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.status-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: #ffffff;
}

.status-table th,
.status-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.status-table th {
  background: var(--surface-soft);
  color: var(--navy);
  font-size: 14px;
}

.status-table tr:last-child td {
  border-bottom: 0;
}

.mail-state {
  font-weight: 700;
}

.mail-state--ok {
  color: var(--green);
}

.mail-state--minor,
.mail-state--delay {
  color: var(--yellow);
}

.mail-state--error {
  color: var(--red);
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.example-card {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.example-card figcaption {
  margin-bottom: 12px;
  font-weight: 800;
}

.chart-shell {
  width: 100%;
  min-height: 280px;
}

.chart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.chart-summary strong {
  color: var(--text);
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

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

.legend__mark {
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 7px;
  vertical-align: middle;
}

.definition-list {
  margin: 0;
}

.definition-list dt {
  margin-top: 16px;
  font-weight: 800;
}

.definition-list dt:first-child {
  margin-top: 0;
}

.definition-list dd {
  margin: 5px 0 0;
  color: var(--muted);
}

.site-footer {
  padding: 28px 20px 34px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.site-footer p {
  margin: 4px 0;
}

.site-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 10px;
}

@media (max-width: 720px) {
  .site-header__inner {
    width: min(100% - 28px, 1080px);
    min-height: 82px;
  }

  .site-header__note {
    display: none;
  }

  .global-nav {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .global-nav::-webkit-scrollbar {
    display: none;
  }

  .global-nav__list {
    width: max-content;
    min-width: 100%;
    padding: 0 10px;
  }

  .global-nav a {
    padding: 12px 13px;
    font-size: 13px;
  }

  .page-shell {
    width: min(100% - 28px, 1040px);
    padding: 38px 0 54px;
  }

  .panel__header {
    display: block;
  }

  .panel__meta {
    margin-top: 5px !important;
  }

  .status-panel {
    grid-template-columns: 1fr;
  }

  .status-panel__icon {
    width: 42px;
    height: 42px;
  }

  .detail-grid,
  .news-columns,
  .example-grid {
    grid-template-columns: 1fr;
  }
}

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

  .brand {
    gap: 10px;
  }

  .brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 17px;
  }

  .brand__name {
    font-size: 16px;
  }

  .panel,
  .status-panel {
    padding: 20px;
    border-radius: 14px;
  }
}

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