.epe-frontend {
  --epe-primary: #1f4e78;
  --epe-primary-soft: #eaf2f8;
  --epe-border: #d7dee5;
  --epe-muted: #6b7280;
  --epe-text: #263238;
  --epe-bg: #ffffff;
  color: var(--epe-text);
  font-family: inherit;
  margin: 24px 0;
}

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


.epe-data-source {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--epe-border);
  color: var(--epe-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.epe-data-source-text {
  display: inline-block;
}

.epe-data-source-logo {
  display: inline-block;
  flex: 0 0 auto;
  line-height: 0;
}

.epe-logo-image {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
}

.epe-title { margin: 0 0 8px; color: var(--epe-primary); font-size: 28px; line-height: 1.25; }
.epe-intro { margin: 0 0 18px; color: var(--epe-muted); font-size: 15px; line-height: 1.6; }

.epe-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 0;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--epe-border);
}

.epe-tab-button {
  appearance: none;
  padding: 10px 14px;
  border: 1px solid var(--epe-border);
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
  color: var(--epe-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}

.epe-tab-button:hover { background: var(--epe-primary-soft); }
.epe-tab-button[aria-selected='true'] { border-color: var(--epe-primary); background: var(--epe-primary); color: #fff; }
.epe-tab-button:focus-visible { outline: 3px solid rgba(31, 78, 120, 0.28); outline-offset: 2px; }
.epe-tab-panel { padding-top: 4px; }
.epe-tab-panel[hidden] { display: none; }
.epe-tab-panel > h3 { margin: 24px 0 10px; color: var(--epe-primary); font-size: 20px; line-height: 1.3; }

.epe-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.epe-summary-card {
  padding: 15px;
  border: 1px solid var(--epe-border);
  border-radius: 10px;
  background: var(--epe-bg);
  box-shadow: 0 2px 10px rgba(31, 78, 120, 0.06);
}

.epe-summary-card span { display: block; color: var(--epe-muted); font-size: 13px; margin-bottom: 7px; }
.epe-summary-card strong { display: block; color: var(--epe-primary); font-size: 19px; line-height: 1.3; }
.epe-summary-card.is-balanced strong { color: #027a48; }
.epe-summary-card.is-over strong { color: #b42318; }
.epe-summary-card.is-under strong { color: #175cd3; }

.epe-section { margin: 24px 0; }
.epe-section h3 { margin: 0 0 10px; color: var(--epe-primary); font-size: 20px; line-height: 1.3; }

.epe-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--epe-border);
  border-radius: 8px;
  background: var(--epe-bg);
  box-shadow: 0 3px 14px rgba(31, 78, 120, 0.08);
}

.epe-table-wrap table {
  width: 100%;
  min-width: 900px;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: collapse;
  background: var(--epe-bg);
}

.epe-table-wrap th,
.epe-table-wrap td {
  padding: 12px 11px;
  border-right: 1px solid var(--epe-border);
  border-bottom: 1px solid var(--epe-border);
  text-align: center;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.45;
}

.epe-table-wrap th:last-child,
.epe-table-wrap td:last-child { border-right: 0; }
.epe-table-wrap tbody tr:last-child td { border-bottom: 0; }
.epe-table-wrap thead th { background: var(--epe-primary); color: #fff; font-weight: 700; }
.epe-table-wrap tbody tr:nth-child(even) { background: #f8fafc; }
.epe-table-wrap tbody tr:hover { background: var(--epe-primary-soft); }
.epe-table-wrap .epe-total-row { background: #fff7e6 !important; }

.epe-pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.epe-pill.is-balanced { background: #ecfdf3; color: #027a48; }
.epe-pill.is-over { background: #fef3f2; color: #b42318; }
.epe-pill.is-under { background: #eff8ff; color: #175cd3; }

.epe-note { margin: 12px 2px 0; color: var(--epe-muted); font-size: 13px; line-height: 1.55; }
.epe-note-warning { padding: 10px 12px; border-left: 4px solid #f59e0b; background: #fff7e6; color: #7c2d12; }

.epe-calc-detail {
  display: block;
  margin-top: 6px;
  color: var(--epe-muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}

.epe-calc-detail span { display: block; }

@media only screen and (max-width: 767px) {
  .epe-title { font-size: 22px; }
	.epe-tab-list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; }
	.epe-tab-button { flex: 0 0 auto; white-space: nowrap; }
  .epe-table-wrap th,
  .epe-table-wrap td { padding: 10px 9px; font-size: 13px; }
  .epe-data-source { gap: 8px; margin-top: 24px; }
}

.epe-frontend .epe-pill.is-final {
  background: #fff7ed;
  color: #9a3412;
}
