* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #eef3f7;
  color: #17212b;
}

.topbar {
  background: #0d1b26;
  color: white;
  padding: 18px 0;
}

.topbar-inner,
.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
}

.subtitle {
  margin-top: 4px;
  color: #b8c7d3;
  font-size: 14px;
}

.container {
  margin-top: 28px;
  margin-bottom: 60px;
}

h1 { margin: 0 0 10px; }
h2 { margin-top: 0; font-size: 19px; }
h3 { margin: 0 0 8px; font-size: 15px; }

a {
  color: #0f5d8f;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

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

.case-card,
.card {
  display: block;
  background: white;
  border: 1px solid #dce4ea;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.035);
}

.case-card { color: inherit; }

.case-card:hover {
  text-decoration: none;
  border-color: #b7c7d4;
}

.case-header,
.case-title,
.section-title-row,
.entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.case-title {
  align-items: flex-start;
  margin-bottom: 16px;
}

.case-equipment {
  margin-top: 10px;
  font-size: 17px;
}

.case-info,
.case-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 8px;
  color: #6b7785;
  font-size: 14px;
}

.badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status,
.stage,
.source-badge,
.research-status {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}

.status { background: #e7eef4; }
.status-open { background: #e8f4ec; color: #2f7d4a; }
.status-closed { background: #eceff2; color: #59636d; }
.stage { background: #fff3dd; color: #8a5a00; }
.source-badge { background: #e8f2ff; color: #185f9f; }
.research-status { background: #eceff2; color: #59636d; }

.warning,
.conflict {
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid #f0d8a7;
  background: #fff7e6;
  color: #805500;
  font-size: 14px;
}

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

.full { grid-column: 1 / -1; }

.summary-card,
.research-card { margin-bottom: 14px; }

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

.summary-grid > div,
.research-grid > div {
  padding: 12px;
  border: 1px solid #e4eaf0;
  border-radius: 9px;
  background: #fafcfd;
}

.research-card { border-left: 4px solid #7e8d99; }

.research-note {
  color: #65727e;
  margin-top: -4px;
}

.entry {
  padding: 12px 0;
  border-bottom: 1px solid #e7edf1;
}

.entry:last-child { border-bottom: 0; }

.secure-entry {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #d7e9fa;
  border-radius: 9px;
  background: #f5faff;
}

.entry-content {
  margin-top: 5px;
  line-height: 1.45;
}

.meta {
  margin-top: 5px;
  color: #74808c;
  font-size: 12px;
}

.hint {
  color: #74808c;
  font-size: 12px;
  font-weight: normal;
}

@media (max-width: 760px) {
  .grid,
  .summary-grid,
  .research-grid {
    grid-template-columns: 1fr;
  }

  .full { grid-column: auto; }

  .case-title,
  .section-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

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