* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(circle at top right, #1b243b 0%, rgba(27, 36, 59, 0) 45%),
    radial-gradient(circle at 20% 20%, #111a30 0%, rgba(17, 26, 48, 0) 35%),
    #090d17;
  color: #e2e8f0;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

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

.top h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0.2px;
}

.top p {
  margin: 6px 0 0;
  color: #94a3b8;
}

button {
  background: #2563eb;
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.card {
  background: linear-gradient(180deg, rgba(24, 34, 56, 0.75), rgba(13, 18, 31, 0.85));
  border: 1px solid #28364f;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.label {
  color: #94a3b8;
  font-size: 12px;
}

.value {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.panel {
  background: linear-gradient(180deg, rgba(24, 34, 56, 0.75), rgba(13, 18, 31, 0.9));
  border: 1px solid #28364f;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  border-bottom: 1px solid #1f2937;
  padding: 9px 8px;
  text-align: left;
}

th {
  color: #94a3b8;
  font-size: 12px;
}

.badge {
  display: inline-block;
  background: #1e3a8a;
  color: #bfdbfe;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  margin-right: 4px;
}

.badge-score {
  background: #14532d;
  color: #bbf7d0;
  border: 1px solid #22c55e;
}

.error {
  color: #fda4af;
}

.investor-legends {
  margin-bottom: 14px;
}

.section-head {
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-head p {
  margin: 4px 0 0;
  color: #a5b4cc;
}

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

.legend-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2b3a54;
  background: linear-gradient(180deg, rgba(19, 28, 46, 0.9), rgba(11, 16, 29, 0.95));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.legend-portrait {
  height: 200px;
  position: relative;
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(1.15);
}

.legend-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 25%, rgba(6, 10, 18, 0.7) 95%);
}

.portrait-buffett {
  background-image:
    radial-gradient(circle at 50% 35%, rgba(200, 200, 200, 0.55), rgba(55, 55, 55, 0.85) 52%, rgba(15, 15, 15, 0.95) 80%);
}

.portrait-lynch {
  background-image:
    radial-gradient(circle at 52% 30%, rgba(210, 210, 210, 0.6), rgba(65, 65, 65, 0.88) 50%, rgba(20, 20, 20, 0.98) 78%);
}

.portrait-munger {
  background-image:
    radial-gradient(circle at 48% 34%, rgba(195, 195, 195, 0.58), rgba(60, 60, 60, 0.88) 49%, rgba(14, 14, 14, 0.98) 79%);
}

.legend-body {
  padding: 12px;
}

.legend-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.legend-body blockquote {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
  font-style: italic;
}

.legend-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.legend-tag {
  display: inline-block;
  font-size: 11px;
  color: #bfdbfe;
  background: #142645;
  border: 1px solid #274a80;
  border-radius: 999px;
  padding: 3px 8px;
}

.coffee-can-section {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin: 0 0 14px;
}

.coffee-can-art,
.coffee-can-story {
  border-radius: 12px;
  border: 1px solid #2b3a54;
  background: linear-gradient(180deg, rgba(19, 28, 46, 0.9), rgba(11, 16, 29, 0.95));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.coffee-can-art {
  overflow: hidden;
}

.coffee-can-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coffee-can-story {
  padding: 14px;
}

.coffee-can-story h2 {
  margin: 0;
  font-size: 22px;
}

.coffee-subtitle {
  margin: 4px 0 10px;
  color: #a8b6d1;
}

.coffee-can-story p {
  margin: 0 0 10px;
  color: #d2d9e6;
  line-height: 1.6;
  font-size: 14px;
}

.insider-panel {
  margin-top: 14px;
}

.insider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.insider-meta {
  display: flex;
  gap: 10px;
  color: #9fb3d3;
  font-size: 12px;
}

.tab-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.tab-btn {
  background: #182741;
  color: #c7d6f2;
  border: 1px solid #314c7a;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
}

.tab-btn:hover {
  background: #1b3358;
}

.tab-btn.active {
  background: #2458bb;
  border-color: #4f83e3;
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

@media (max-width: 900px) {
  .status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .legend-grid {
    grid-template-columns: 1fr;
  }

  .coffee-can-section {
    grid-template-columns: 1fr;
  }

  .insider-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
