:root {
  --primary: #1E3B32;
  --primary-light: #2A4F42;
  --accent: #B87333;
  --bg: #F3F1E8;
  --line: #D9D4C5;
  --text: #333333;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: #fafaf7;
  color: var(--text);
}

.topbar {
  background: var(--primary);
  border-bottom: 6px solid var(--accent);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 3px;
  background: #fff;
  padding: 2px;
}

.brand {
  color: #fff;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 13px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.intro h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--primary);
  font-size: 32px;
  margin: 0 0 8px;
}

.intro p {
  color: #666;
  margin: 0 0 32px;
  font-size: 15px;
}

.view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.toggle-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.toggle-btn:hover {
  border-color: var(--primary);
}

.toggle-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.hidden {
  display: none !important;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  overflow-x: auto;
}

.deal-table {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13.5px;
}

.deal-table th:nth-child(1),
.deal-table td:nth-child(1) { width: 26%; }
.deal-table th:nth-child(2),
.deal-table td:nth-child(2) { width: 14%; }
.deal-table th:nth-child(3),
.deal-table td:nth-child(3) { width: 16%; }
.deal-table th:nth-child(4),
.deal-table td:nth-child(4) { width: 11%; }
.deal-table th:nth-child(5),
.deal-table td:nth-child(5) { width: 12%; }
.deal-table th:nth-child(6),
.deal-table td:nth-child(6) { width: 21%; }

.deal-table thead th {
  background: var(--primary);
  color: #fff;
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.deal-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.deal-table th.sortable::after {
  content: "↕";
  margin-left: 6px;
  opacity: 0.5;
  font-size: 10px;
}

.deal-table th.sorted-asc::after {
  content: "↑";
  opacity: 1;
  color: var(--accent);
}

.deal-table th.sorted-desc::after {
  content: "↓";
  opacity: 1;
  color: var(--accent);
}

.deal-table tbody tr {
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.1s ease;
}

.deal-table tbody tr:hover {
  background: var(--bg);
}

.deal-table td {
  padding: 12px 16px;
  vertical-align: top;
}

.deal-table td.title-cell {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--primary);
}

.deal-table td.sponsor-cell {
  color: var(--accent);
  font-weight: 600;
  font-size: 12.5px;
}

.deal-table td.date-cell {
  white-space: nowrap;
  color: #666;
}

.deal-table td.materials-cell {
  color: #999;
  font-size: 12px;
}

.material-link-sm {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  display: block;
  font-size: 12px;
}

.material-link-sm:hover {
  text-decoration: underline;
  color: var(--accent);
}

.material-link-sm + .material-link-sm {
  margin-top: 4px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(20, 33, 61, 0.15);
  transform: translateY(-2px);
}

.card-open {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.card-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 18px 16px;
  border-top: 1px dashed var(--line);
}

.material-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 9px;
  text-decoration: none;
}

.material-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 8.5 / 5.2;
  object-fit: cover;
  object-position: top;
  border-bottom: 3px solid var(--accent);
  background: var(--bg);
}

.card-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-sponsor {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.card-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--primary);
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 10px;
}

.card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.pill {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 11px;
  padding: 4px 10px;
  color: var(--primary);
  font-weight: 600;
}

.card-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
  width: fit-content;
}

.status-active { background: #E6F4EA; color: #1E7A34; }
.status-pending { background: #FDF0DC; color: #8A5A00; }
.status-closed { background: #EDEDED; color: #666; }

.footer {
  text-align: center;
  padding: 24px 24px 32px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.footer-confidential {
  color: #999;
  font-size: 12px;
  margin: 0 0 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.footer-disclosure {
  max-width: 760px;
  margin: 0 auto;
  color: #aaa;
  font-size: 10.5px;
  line-height: 1.6;
}

.empty {
  color: #999;
  font-size: 14px;
}

/* ---------- investor gate (login + NDA) ---------- */

.gate-box {
  max-width: 480px;
  margin: 48px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 6px;
  padding: 36px 34px;
}

.gate-box-wide { max-width: 720px; }

.gate-box h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--primary);
  font-size: 26px;
  margin: 0 0 10px;
}

.gate-box p {
  color: #666;
  font-size: 14px;
  line-height: 1.7;
}

.gate-box a { color: var(--accent); font-weight: 600; }

#login-form {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

#login-form input {
  flex: 1;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  letter-spacing: 1px;
}

#login-form input:focus { outline: 2px solid var(--primary-light); }

.gate-error {
  color: #A33;
  font-weight: 600;
  font-size: 13px;
  margin-top: 14px;
}

.nda-intro { margin-bottom: 22px; }

.nda-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.nda-view-btn { text-decoration: none; }

.nda-fineprint {
  font-size: 12px !important;
  color: #999 !important;
  line-height: 1.6;
}

.req { color: #A33; }

@media (max-width: 560px) {
  #login-form { flex-direction: column; }
  .nda-actions { flex-direction: column; align-items: stretch; }
}
