:root {
  --black: #101010;
  --ink: #1f2937;
  --muted: #5f6777;
  --line: #d9dee7;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.88);
  --cream: #fff8dd;
  --sand: #f5ecd0;
  --gold: #efc64d;
  --gold-deep: #ba8f17;
  --mint: #d8f3e2;
  --mint-deep: #0f7a49;
  --blue-soft: #dbeafe;
  --blue-deep: #1d4ed8;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 20px 60px rgba(16, 24, 40, 0.14);
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Hiragino Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(239, 198, 77, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.08), transparent 28%),
    linear-gradient(180deg, #fffdf5 0%, #fff8ea 42%, #f7f8fb 100%);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

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

.brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 4px;
  text-decoration: none;
  color: var(--black);
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  text-decoration: none;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.main {
  display: grid;
  gap: 20px;
}

.hero,
.summary-strip,
.control-panel,
.attacklist-section,
.results-section,
.detail-drawer {
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 231, 0.96));
  border: 1px solid rgba(239, 198, 77, 0.28);
  border-radius: 28px;
}

.hero-copy {
  display: grid;
  gap: 16px;
  max-width: 960px;
}

.hero-kicker,
.drawer-kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
  color: var(--black);
  font-weight: 800;
}

.hero-description {
  margin: 0;
  max-width: 920px;
  font-size: 16px;
  line-height: 1.95;
  color: var(--muted);
}

.hero-note {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 28px 28px 28px 34px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 252, 241, 0.98), rgba(255, 255, 255, 0.98)),
    var(--panel);
  border: 3px solid var(--black);
  box-shadow: 8px 8px 0 rgba(16, 16, 16, 0.96);
}

.hero-note::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 14px;
  background: linear-gradient(180deg, #fff24a, #ffe400);
}

.hero-note-kicker {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  margin: 0;
  padding: 8px 12px;
  background: var(--black);
  color: #fff24a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
}

.hero-note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
}

.hero-note-title {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.25;
  font-weight: 800;
  color: var(--black);
}

.hero-note-caption {
  margin: 0;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.hero-note-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-note-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 100%;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid var(--black);
  box-shadow: 4px 4px 0 rgba(16, 16, 16, 0.9);
}

.hero-note-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 0;
  background: #fff24a;
  border: 2px solid var(--black);
  color: var(--black);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-note-item-body {
  min-width: 0;
}

.hero-note-item-title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 800;
  color: var(--black);
}

.hero-note-item-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.78;
  color: var(--muted);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  padding: 20px 22px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.summary-value {
  display: block;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--black);
}

.summary-period-value {
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.45;
}

.summary-subvalue {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.summary-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-type-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 700;
}

.control-panel,
.attacklist-section,
.results-section {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
}

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

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

.filter-actions-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
}

.field-search {
  min-width: 0;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.field-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-input:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 4px rgba(239, 198, 77, 0.16);
}

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px 20px;
  background: linear-gradient(90deg, rgba(16, 122, 73, 0.06), rgba(255, 255, 255, 0.86));
  border: 1px solid rgba(15, 122, 73, 0.12);
  border-radius: 18px;
}

.selection-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.selection-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.selection-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.attacklist-list {
  display: grid;
  gap: 16px;
}

.attacklist-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(15, 122, 73, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 252, 247, 0.92));
}

.attacklist-card.is-expanded {
  border-color: rgba(15, 122, 73, 0.35);
  box-shadow: 0 14px 30px rgba(15, 122, 73, 0.1);
}

.attacklist-toggle {
  width: 100%;
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.attacklist-toggle:hover .attacklist-card-title {
  color: var(--mint-deep);
}

.attacklist-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.attacklist-toggle-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 122, 73, 0.1);
  color: var(--mint-deep);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.attacklist-card-title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.35;
  color: var(--black);
}

.attacklist-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.attacklist-card-meta {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.attacklist-card-note {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.attacklist-card-body {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 122, 73, 0.12);
}

.attacklist-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.attacklist-span-2 {
  grid-column: span 2;
}

.attacklist-textarea {
  min-height: 112px;
  resize: vertical;
}

.attacklist-remove-btn {
  color: #9a3412;
}

.ghost-btn,
.primary-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s;
}

.ghost-btn {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.primary-btn {
  background: linear-gradient(135deg, var(--mint-deep), #14945b);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 122, 73, 0.18);
}

.ghost-btn:hover,
.primary-btn:hover,
.topbar-link:hover {
  transform: translateY(-1px);
}

.results-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.results-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  color: var(--black);
}

.results-meta,
.results-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.loading-state,
.empty-state,
.error-state {
  padding: 30px 18px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.loading-state p,
.empty-title,
.empty-description,
.error-title,
.error-description {
  margin: 0;
}

.loading-dot {
  width: 14px;
  height: 14px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--gold-deep);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.45;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

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

.investor-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 252, 0.92));
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.15s;
}

.investor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(239, 198, 77, 0.65);
}

.investor-card.selected {
  border-color: rgba(15, 122, 73, 0.45);
  box-shadow: 0 14px 30px rgba(15, 122, 73, 0.12);
}

.card-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.card-select input,
.drawer-select-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--mint-deep);
}

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

.card-title {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--black);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-type {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.badge-round {
  background: rgba(239, 198, 77, 0.18);
  color: #8a6608;
}

.badge-metric {
  background: rgba(15, 122, 73, 0.1);
  color: var(--mint-deep);
}

.investment-metric {
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--cream);
  text-align: center;
}

.investment-metric strong {
  display: block;
  font-size: 26px;
  line-height: 1;
  color: var(--black);
}

.investment-metric span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.section-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.mini-tag-list,
.tag-list,
.company-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-block {
  display: grid;
  gap: 12px;
}

.mini-tag,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(95, 103, 119, 0.08);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
}

.company-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 248, 221, 0.9);
  color: #6b5204;
  font-size: 12px;
}

.company-link-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(29, 78, 216, 0.15);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.52);
  color: var(--blue-deep);
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}

.company-link-tag:hover,
.company-link-title:hover {
  background: rgba(219, 234, 254, 0.82);
}

.company-link-title {
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 800;
  color: var(--blue-deep);
  cursor: pointer;
  text-align: left;
}

.drawer-toggle-btn {
  justify-self: start;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-deep);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.drawer-empty-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

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

.card-footer-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.card-detail-link {
  border: none;
  background: transparent;
  color: var(--blue-deep);
  font-weight: 700;
  cursor: pointer;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.load-more-btn {
  min-width: 220px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 30;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 100vw);
  height: 100vh;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 253, 0.98));
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-lg);
  z-index: 31;
  overflow-y: auto;
}

.company-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
  z-index: 40;
}

.company-modal {
  position: fixed;
  inset: 24px;
  width: min(880px, calc(100vw - 24px));
  height: fit-content;
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 255, 0.98));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  z-index: 41;
  overflow-y: auto;
}

.company-modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

.company-modal-inner {
  display: grid;
  gap: 22px;
  padding-top: 6px;
}

.company-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.company-modal-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  color: var(--black);
}

.company-modal-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.company-modal-description {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}

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

.company-round-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.company-round-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.company-round-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--black);
}

.company-round-investors {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink);
}

.company-round-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.drawer-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

.drawer-inner {
  display: grid;
  gap: 22px;
  padding-top: 8px;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.drawer-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
  color: var(--black);
}

.drawer-select-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 122, 73, 0.08);
  color: var(--mint-deep);
  font-weight: 700;
}

.drawer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drawer-section {
  display: grid;
  gap: 12px;
}

.drawer-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

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

.metric-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.metric-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.metric-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--black);
  line-height: 1.4;
}

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

.featured-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
}

.featured-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.featured-name {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.featured-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-note-list {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 14px;
  }

  .topbar,
  .results-header,
  .filter-actions,
  .selection-bar,
  .attacklist-card-head,
  .drawer-head,
  .company-modal-head {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-strip,
  .drawer-metrics,
  .investor-grid,
  .attacklist-card-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .attacklist-span-2 {
    grid-column: auto;
  }

  .hero,
  .control-panel,
  .attacklist-section,
  .results-section {
    padding: 18px;
    border-radius: 22px;
  }

  .detail-drawer {
    padding: 18px;
  }

  .company-modal {
    inset: 12px;
    width: auto;
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .hero-note {
    padding: 22px 20px 22px 26px;
  }

  .hero-note-head {
    align-items: flex-start;
  }

  .hero-note-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .hero-note-number {
    width: 40px;
    height: 40px;
    font-size: 12px;
  }

  .investment-metric {
    min-width: 64px;
  }
}

/* ── CSV Email Modal ── */
.csv-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
  z-index: 50;
  animation: csvFadeIn 0.2s ease-out;
}

.csv-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 32px));
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 51;
  padding: 36px 32px;
  animation: csvSlideIn 0.25s ease-out;
}

.csv-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}

.csv-modal-close:hover {
  background: var(--line);
  color: var(--black);
}

.csv-modal-inner {
  text-align: center;
}

.csv-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border-radius: 50%;
  color: var(--gold-deep);
}

.csv-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  margin: 0 0 8px;
}

.csv-modal-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.7;
}

.csv-modal-desc strong {
  color: var(--black);
  font-weight: 700;
}

.csv-modal-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  text-align: left;
}

.csv-modal .input {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.csv-modal .input:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(239, 198, 77, 0.2);
}

.csv-modal .error-message {
  font-size: 13px;
  color: #dc2626;
  margin-top: 4px;
  text-align: left;
  min-height: 0;
}

.csv-modal .error-message:empty {
  display: none;
}

.csv-modal .submit-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: var(--black);
  background: var(--gold);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 16px;
}

.csv-modal .submit-btn:hover:not(:disabled) {
  background: var(--gold-deep);
}

.csv-modal .submit-btn:active:not(:disabled) {
  transform: scale(0.99);
}

.csv-modal .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Complete state */
.csv-complete-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mint-deep);
}

.csv-complete-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 8px;
}

.csv-complete-text strong {
  color: var(--gold-deep);
}

.csv-complete-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.7;
}

.csv-modal .back-btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.csv-modal .back-btn:hover {
  background: var(--line);
}

@keyframes csvFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes csvSlideIn {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@media (max-width: 480px) {
  .csv-modal {
    padding: 28px 20px;
    border-radius: 12px;
  }

  .csv-modal-title {
    font-size: 18px;
  }
}
