:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #647084;
  --line: #dfe5ef;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --green: #15803d;
  --shadow: 0 18px 50px rgba(23, 32, 51, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Yu Gothic UI", "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  background: radial-gradient(circle at top left, #e0ecff 0, transparent 34rem), var(--bg);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  padding: 3rem clamp(1rem, 4vw, 4rem) 2rem;
}

.eyebrow {
  margin: 0 0 .6rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  letter-spacing: -.06em;
}

.lead {
  max-width: 46rem;
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.05rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(8rem, 1fr));
  gap: .8rem;
}

.stats div {
  padding: 1.1rem;
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.stats span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
}

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

main {
  padding: 0 clamp(1rem, 4vw, 4rem) 3rem;
}

.diagram-panel,
.status-panel {
  margin-bottom: 1.2rem;
  padding: 1.2rem;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}

.diagram-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(14rem, .55fr);
  gap: 1rem;
  align-items: stretch;
  margin-top: 1rem;
}

.diagram-link {
  display: block;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.diagram-link img {
  display: block;
  width: 100%;
  height: auto;
}

.mission-image {
  margin-top: 1rem;
  max-width: 980px;
}

.geometry-facts {
  display: grid;
  gap: .65rem;
  margin: 0;
}

.geometry-facts div {
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
}

.geometry-facts dt {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.geometry-facts dd {
  margin: .25rem 0 0;
  font-size: 1.05rem;
  font-weight: 900;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: -.04em;
}

.section-title p:last-child {
  margin: .5rem 0 0;
  color: var(--muted);
}

.status-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}

.status-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
}

.status-card strong {
  display: block;
  line-height: 1.35;
}

.status-card p {
  margin: .45rem 0 .8rem;
  color: var(--muted);
  line-height: 1.6;
  font-size: .92rem;
}

.state {
  display: inline-flex;
  border-radius: 999px;
  padding: .28rem .62rem;
  background: #dcfce7;
  color: #166534;
  font-weight: 800;
  font-size: .78rem;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(11rem, auto) auto;
  gap: 1rem;
  padding: 1rem 0;
  background: linear-gradient(to bottom, var(--bg), rgba(245,247,251,.88));
  backdrop-filter: blur(10px);
}

input[type="search"],
select {
  width: 100%;
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 1rem;
  outline: none;
}

select {
  font-weight: 800;
  color: var(--ink);
}

input[type="search"]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.chips {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: .85rem 1rem;
  cursor: pointer;
  font-weight: 700;
}

.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.reports {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 1.2rem 1.2rem .4rem;
}

.card h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  word-break: break-word;
}

.updated-at {
  margin: .45rem 0 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .8rem;
}

.badge {
  padding: .25rem .55rem;
  border-radius: .55rem;
  background: #eef2ff;
  color: #3730a3;
  font-size: .78rem;
  font-weight: 800;
}

.file-list {
  list-style: none;
  padding: .4rem;
  margin: 0;
}

.file-list li { margin: .35rem; }

.file-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .65rem;
  padding: .75rem;
  border-radius: .9rem;
  color: var(--ink);
  text-decoration: none;
}

.file-list a:hover {
  background: #f3f6fb;
}

.type {
  min-width: 3.2rem;
  text-align: center;
  border-radius: .6rem;
  padding: .25rem .4rem;
  font-size: .76rem;
  font-weight: 900;
  color: #fff;
  background: var(--muted);
}

.type.pdf { background: #dc2626; }
.type.png { background: #0f766e; }
.type.csv { background: var(--green); }
.type.md { background: #7c3aed; }

.filename {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.size {
  color: var(--muted);
  font-size: .82rem;
}

.empty {
  grid-column: 1 / -1;
  padding: 2rem;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 1rem;
}

footer {
  padding: 0 clamp(1rem, 4vw, 4rem) 2rem;
  color: var(--muted);
}

code {
  background: #e9edf5;
  padding: .1rem .35rem;
  border-radius: .35rem;
}

@media (max-width: 760px) {
  .hero, .toolbar, .diagram-layout {
    grid-template-columns: 1fr;
  }

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

  .chips {
    justify-content: flex-start;
  }
}
