/* Index Fund Comparison Calculator (UK): navy / teal / slate, matched to State Pension Deferral */

.ifc-app,
.ifc-app *,
.ifc-modal,
.ifc-modal * { box-sizing: border-box; }

.ifc-loading { margin: 12px 0; color: #4a6570; font-weight: 650; }

/* Two classes so the theme's constrained-layout width rule cannot shrink the calculator. */
#ifc-root.ifc-app,
.ifc-root.ifc-app {
  --ifc-ink: #083141;
  --ifc-muted: #4a6570;
  --ifc-line: #d5e0e4;
  --ifc-soft: #f4f7f8;
  --ifc-teal: #0f766e;
  --ifc-teal-deep: #0b5f59;
  --ifc-neg: #8a4b3a;
  --ifc-text-sm: 0.95rem;
  --ifc-text-xs: 0.88rem;
  width: 100%;
  max-width: 1100px;
  margin: 24px auto 0;
  padding: 0 12px 8px;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ifc-ink);
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.ifc-app h2,
.ifc-app h3,
.ifc-app h4,
.ifc-app p { font-family: inherit; }

.ifc-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ifc-shell {
  width: 100%;
  margin: 0 auto 28px;
  padding: 22px 20px 28px;
  border: 1px solid var(--ifc-line);
  border-radius: 28px;
  background:
    radial-gradient(1100px 480px at 8% -12%, rgba(15, 118, 110, 0.16), transparent 58%),
    radial-gradient(900px 420px at 100% 0%, rgba(140, 198, 223, 0.28), transparent 52%),
    #fff;
  box-shadow: 0 24px 60px rgba(8, 49, 65, 0.1);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Header */
.ifc-head {
  position: relative;
  overflow: hidden;
  padding: 30px 26px 26px;
  border-radius: 24px;
  background: linear-gradient(145deg, #052933 0%, #083141 38%, #0b5f59 72%, #14a39a 100%);
  color: #fff;
}
.ifc-head::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -60px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 198, 223, 0.45), transparent 68%);
  pointer-events: none;
}
.ifc-head > * { position: relative; z-index: 1; }
.ifc-kicker {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fe8df;
}
.ifc-app .ifc-title {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}
.ifc-lead { margin: 0 0 10px; max-width: 54rem; color: #e7f3f1; font-size: 1.05rem; line-height: 1.55; }
.ifc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ifc-chip {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Plain-English note */
.ifc-premise {
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background:
    radial-gradient(500px 180px at 0% 0%, rgba(15, 118, 110, 0.1), transparent 60%),
    linear-gradient(145deg, #f4fbf9 0%, #ffffff 70%);
  box-shadow: 0 10px 28px rgba(8, 49, 65, 0.05);
}
.ifc-premise__eyebrow {
  margin: 0 0 8px !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ifc-teal);
}
.ifc-premise p { margin: 0; color: #355564; line-height: 1.55; }

/* Inputs */
.ifc-panel {
  position: relative;
  overflow: hidden;
  padding: 24px 22px;
  border: 1px solid rgba(8, 49, 65, 0.1);
  border-radius: 24px;
  background: linear-gradient(165deg, #ffffff 0%, #f7fbfb 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 14px 36px rgba(8, 49, 65, 0.07);
}
.ifc-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #0f766e 0%, #083141 100%);
  opacity: 0.85;
}
.ifc-app .ifc-panel__title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2.4vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ifc-ink);
}
.ifc-panel__lead { margin: 0 0 18px; color: var(--ifc-muted); font-size: var(--ifc-text-sm); }
.ifc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.ifc-field { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.ifc-field--wide { grid-column: 1 / -1; }
.ifc-field label { font-size: var(--ifc-text-sm); font-weight: 700; color: var(--ifc-ink); }
.ifc-app .ifc-field input,
.ifc-app .ifc-field select {
  width: 100%;
  max-width: none;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--ifc-line);
  border-radius: 12px;
  background: var(--ifc-soft);
  font: inherit;
  font-weight: 600;
  color: var(--ifc-ink);
}
.ifc-app .ifc-field input:focus,
.ifc-app .ifc-field select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  border-color: var(--ifc-teal);
  background: #fff;
}
.ifc-field small { font-size: var(--ifc-text-xs); color: var(--ifc-muted); line-height: 1.4; }
.ifc-assume {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px dashed rgba(8, 49, 65, 0.18);
  border-radius: 16px;
  background: #fff;
}
.ifc-assume summary { cursor: pointer; font-size: var(--ifc-text-sm); font-weight: 800; color: var(--ifc-teal-deep); }
.ifc-assume[open] summary { margin-bottom: 14px; }
.ifc-assume .ifc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Results */
.ifc-results { display: flex; flex-direction: column; gap: 18px; }

.ifc-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 24px 22px;
  border-radius: 24px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(8, 49, 65, 0.18);
  background: linear-gradient(135deg, #083141 0%, #0b5f7a 50%, #3aa0c0 100%);
}
.ifc-hero--best { background: linear-gradient(135deg, #04352f 0%, #0f766e 48%, #1fb5a8 100%); }
.ifc-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -40px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  pointer-events: none;
}
.ifc-hero > * { position: relative; z-index: 1; }
.ifc-hero__badge {
  display: inline-block;
  margin: 0 0 12px !important;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ifc-hero__figure {
  max-width: 34ch;
  margin: 0 0 8px !important;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.ifc-hero__line { margin: 0 !important; max-width: 62ch; color: rgba(255, 255, 255, 0.92); font-size: 1.02rem; }
.ifc-hero__note {
  margin: 14px 0 0 !important;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--ifc-text-xs);
}
.ifc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.ifc-kpi { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.28); min-width: 0; }
.ifc-kpi__v {
  display: block;
  overflow: hidden;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ifc-kpi__l { display: block; margin-top: 4px; color: rgba(255, 255, 255, 0.82); font-size: var(--ifc-text-xs); }

.ifc-compare,
.ifc-insights,
.ifc-outside {
  padding: 22px 20px;
  border: 1px solid rgba(8, 49, 65, 0.1);
  border-radius: 22px;
  background: linear-gradient(165deg, #ffffff 0%, #f7fbfb 100%);
  box-shadow: 0 10px 26px rgba(8, 49, 65, 0.05);
}
.ifc-compare { background: linear-gradient(165deg, #eefaf7 0%, #fff 30%); border-color: rgba(15, 118, 110, 0.22); }
.ifc-section-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6f6f3, #e9f1ef);
  color: var(--ifc-teal-deep);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ifc-app .ifc-section-title { margin: 0 0 10px; font-size: 1.28rem; font-weight: 900; letter-spacing: -0.015em; color: var(--ifc-ink); }
.ifc-app .ifc-section-lead { margin: 0 0 14px; max-width: 62ch; color: var(--ifc-muted); font-size: var(--ifc-text-sm); }

/* Toolbar */
.ifc-toolbar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.ifc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ifc-app .ifc-pill {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(8, 49, 65, 0.14);
  background: #fff;
  color: var(--ifc-ink);
  font: inherit;
  font-size: var(--ifc-text-sm);
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
}
.ifc-app .ifc-pill:hover { border-color: var(--ifc-teal); }
.ifc-app .ifc-pill.is-on {
  background: linear-gradient(145deg, #0b5f59 0%, #0f766e 55%, #129287 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.28);
}
.ifc-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ifc-filters .ifc-field label { font-size: var(--ifc-text-xs); }
.ifc-app .ifc-filters .ifc-field input,
.ifc-app .ifc-filters .ifc-field select { background: #fff; }

/* Table */
.ifc-count { margin: 0 0 8px; color: var(--ifc-muted); font-size: var(--ifc-text-xs); }
.ifc-empty { margin: 0; padding: 18px; border-radius: 14px; background: var(--ifc-soft); color: var(--ifc-muted); font-weight: 650; }
.ifc-table-scroll { overflow-x: auto; border: 1px solid var(--ifc-line); border-radius: 16px; background: #fff; }
.ifc-app .ifc-table { width: 100%; min-width: 760px; margin: 0; border-collapse: collapse; font-size: var(--ifc-text-sm); }
.ifc-app .ifc-table th,
.ifc-app .ifc-table td {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #e8eef0;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
  color: var(--ifc-ink);
}
.ifc-app .ifc-table th { padding: 0; background: var(--ifc-soft); vertical-align: bottom; }
.ifc-app .ifc-table .ifc-c-name { text-align: left; white-space: normal; width: 34%; }
.ifc-th-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--ifc-ink);
  font: inherit;
  font-size: var(--ifc-text-xs);
  font-weight: 800;
  text-align: inherit;
  cursor: pointer;
  white-space: normal;
}
.ifc-th-btn:hover { color: var(--ifc-teal-deep); background: #eaf3f2; }
.ifc-app .ifc-table th[aria-sort="ascending"] .ifc-th-btn,
.ifc-app .ifc-table th[aria-sort="descending"] .ifc-th-btn { color: var(--ifc-teal-deep); }
.ifc-row { cursor: pointer; transition: background 0.12s ease; }
.ifc-row:hover td { background: #f3f9f8; }
.ifc-row:focus-visible { outline: 2px solid var(--ifc-teal); outline-offset: -2px; }
.ifc-row.is-mine td { background: #eef8f6; }
.ifc-row.is-mine td:first-child { box-shadow: inset 4px 0 0 var(--ifc-teal); }
.ifc-row.is-open td { border-bottom-color: transparent; }
.ifc-name { display: block; font-weight: 800; line-height: 1.3; }
.ifc-meta { display: block; margin-top: 2px; color: var(--ifc-muted); font-size: 0.8rem; line-height: 1.35; }
.ifc-c-ocf strong { font-size: 1.1rem; font-weight: 900; }
.ifc-ret { font-weight: 750; }
.ifc-ret__to { display: block; font-size: 11px; font-weight: 600; color: var(--ifc-muted, #5b6b73); white-space: nowrap; }
.ifc-ret.is-neg { color: var(--ifc-neg); }
.ifc-risk { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ifc-risk__v { font-weight: 800; }
.ifc-risk__dots { display: inline-flex; gap: 3px; }
.ifc-risk__dots i { width: 8px; height: 8px; border-radius: 2px; background: #dfe8eb; }
.ifc-risk__dots i.is-on { background: var(--ifc-ink); }
.ifc-app .ifc-table .ifc-c-more { width: 44px; padding-left: 0; text-align: center; }
.ifc-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ifc-soft);
  font-weight: 900;
  color: var(--ifc-teal-deep);
}

.ifc-detail td { background: #f7fbfb; text-align: left !important; white-space: normal !important; }
.ifc-detail__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; padding: 4px 0 6px; }
.ifc-app .ifc-detail h4 { margin: 0 0 10px; font-size: var(--ifc-text-sm); font-weight: 900; color: var(--ifc-ink); }
.ifc-bars { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 8px; }
.ifc-bars li { display: grid; grid-template-columns: 150px minmax(0, 1fr) 64px; gap: 10px; align-items: center; margin: 0; font-size: var(--ifc-text-xs); }
.ifc-bars__l { color: var(--ifc-muted); font-weight: 650; white-space: nowrap; }
.ifc-bars__short { display: none; }
.ifc-bars__track { height: 12px; border-radius: 6px; background: #e6eef0; overflow: hidden; }
.ifc-bars__bar { display: block; height: 100%; border-radius: 6px; background: var(--ifc-teal); }
.ifc-bars__bar.is-neg { background: #c79a8c; }
.ifc-bars__v { text-align: right; font-weight: 800; white-space: nowrap; }
.ifc-bars__v.is-neg { color: var(--ifc-neg); }
.ifc-muted { margin: 0; color: var(--ifc-muted); font-size: 0.82rem; }
.ifc-detail__vs {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--ifc-teal);
  border-radius: 10px;
  background: #eef6f5;
  font-size: var(--ifc-text-sm);
  font-weight: 650;
}
.ifc-facts { display: grid; gap: 6px; margin: 0 0 12px; }
.ifc-facts div { display: flex; justify-content: space-between; gap: 14px; font-size: var(--ifc-text-xs); }
.ifc-facts dt { color: var(--ifc-muted); }
.ifc-facts dd { margin: 0; font-weight: 750; text-align: right; overflow-wrap: anywhere; }
.ifc-detail__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ifc-detail__actions a { color: var(--ifc-teal-deep); font-size: var(--ifc-text-sm); font-weight: 750; }
.ifc-app .ifc-btn-ghost {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--ifc-teal);
  border-radius: 12px;
  background: #fff;
  color: var(--ifc-teal-deep);
  font: inherit;
  font-size: var(--ifc-text-sm);
  font-weight: 800;
  cursor: pointer;
}
.ifc-app .ifc-btn-ghost:hover { background: #eef8f6; }
.ifc-app .ifc-btn-ghost.ifc-more { display: block; width: 100%; margin-top: 10px; }
.ifc-tag { padding: 6px 10px; border-radius: 999px; background: var(--ifc-ink); color: #fff; font-size: 0.78rem; font-weight: 800; }

.ifc-warn {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(8, 49, 65, 0.16);
  border-left: 4px solid var(--ifc-ink);
  border-radius: 12px;
  background: #fff;
  color: var(--ifc-muted);
  font-size: var(--ifc-text-xs);
  line-height: 1.5;
}
.ifc-warn strong { color: var(--ifc-ink); }

/* Switch and save */
.ifc-switch,
.ifc-cmp {
  padding: 22px 20px;
  border: 1px solid rgba(8, 49, 65, 0.1);
  border-radius: 22px;
  background: linear-gradient(165deg, #ffffff 0%, #f7fbfb 100%);
  box-shadow: 0 10px 26px rgba(8, 49, 65, 0.05);
}
.ifc-switch { background: linear-gradient(165deg, #eefaf7 0%, #fff 40%); border-color: rgba(15, 118, 110, 0.22); }
.ifc-swaps { display: grid; gap: 10px; }
.ifc-swap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(8, 49, 65, 0.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(8, 49, 65, 0.05);
}
.ifc-swap.is-same { border-left: 4px solid var(--ifc-teal); }
.ifc-swap__level {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--ifc-teal-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ifc-app .ifc-swap__name { margin: 0; font-size: 1.02rem; font-weight: 800; line-height: 1.3; color: var(--ifc-ink); }
.ifc-swap__meta { margin: 2px 0 6px; color: var(--ifc-muted); font-size: 0.8rem; }
.ifc-swap__line,
.ifc-swap__ret { margin: 0; font-size: var(--ifc-text-xs); color: var(--ifc-ink); }
.ifc-swap__ret { margin-top: 2px; color: var(--ifc-muted); }
.ifc-swap__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.ifc-swap__v { font-size: 1.7rem; font-weight: 900; line-height: 1; letter-spacing: -0.02em; color: var(--ifc-teal-deep); white-space: nowrap; }
.ifc-swap__v.is-neg { font-size: 1.1rem; color: var(--ifc-neg); }
.ifc-swap__l { margin-bottom: 6px; color: var(--ifc-muted); font-size: 0.78rem; font-weight: 700; }
.ifc-app .ifc-btn-ghost.is-on { background: var(--ifc-ink); border-color: var(--ifc-ink); color: #fff; }
.ifc-switch__note { margin: 12px 0 0; color: var(--ifc-muted); font-size: var(--ifc-text-xs); line-height: 1.5; }

/* Compare */
.ifc-app .ifc-cmp__sub { margin: 4px 0 10px; font-size: var(--ifc-text-sm); font-weight: 900; color: var(--ifc-ink); }
.ifc-cmp__bars { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.ifc-cmp__bars li { display: grid; grid-template-columns: minmax(140px, 320px) minmax(0, 1fr) 80px; gap: 12px; align-items: center; margin: 0; font-size: var(--ifc-text-xs); }
.ifc-cmp__bl { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ifc-bars__bar.is-mine { background: var(--ifc-ink); }
.ifc-cmp__scroll { overflow-x: auto; margin-bottom: 10px; border: 1px solid var(--ifc-line); border-radius: 16px; background: #fff; }
.ifc-app .ifc-cmp__table { width: 100%; min-width: 560px; margin: 0; border-collapse: collapse; font-size: var(--ifc-text-sm); }
.ifc-app .ifc-cmp__table th,
.ifc-app .ifc-cmp__table td {
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #e8eef0;
  text-align: right;
  vertical-align: top;
  color: var(--ifc-ink);
}
.ifc-app .ifc-cmp__table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f7fbfb;
  text-align: left;
  font-size: var(--ifc-text-xs);
  font-weight: 700;
  color: var(--ifc-muted);
  white-space: nowrap;
}
.ifc-app .ifc-cmp__table thead th { background: var(--ifc-soft); vertical-align: bottom; }
.ifc-app .ifc-cmp__table thead th:first-child { position: sticky; left: 0; z-index: 2; }
.ifc-app .ifc-cmp__table td { white-space: nowrap; }
.ifc-app .ifc-cmp__table .is-mine { background: #eef8f6; }
.ifc-cmp__name { display: block; font-weight: 800; line-height: 1.3; white-space: normal; min-width: 110px; }
.ifc-app .ifc-cmp__x {
  margin-top: 4px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--ifc-teal-deep);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.ifc-pos { color: var(--ifc-teal-deep); font-weight: 800; }
.ifc-neg { color: var(--ifc-neg); font-weight: 800; }

/* Compare tick boxes in the table */
.ifc-app .ifc-table .ifc-c-pick { width: 64px; padding-left: 12px; padding-right: 0; text-align: center; }
.ifc-app .ifc-table th.ifc-c-pick { padding: 10px 0 10px 12px; font-size: 0.75rem; font-weight: 800; }
.ifc-pick { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.ifc-pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--ifc-teal); cursor: pointer; }
.ifc-pick__txt { display: none; }
.ifc-count { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; }
.ifc-count__cmp { color: var(--ifc-teal-deep); font-weight: 800; }

/* Insights, outside */
.ifc-insights__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ifc-insights__list li {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--ifc-teal);
  border-radius: 10px;
  background: #eef6f5;
  color: var(--ifc-ink);
  font-size: var(--ifc-text-sm);
  line-height: 1.5;
}
.ifc-outside { border-style: dashed; background: #fff; box-shadow: none; }
.ifc-app .ifc-outside h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 900; color: var(--ifc-ink); }
.ifc-outside ul { margin: 0; padding-left: 20px; color: var(--ifc-muted); font-size: var(--ifc-text-sm); }
.ifc-outside li + li { margin-top: 6px; }

/* Export */
.ifc-export {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 20px 18px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 22px;
  background: linear-gradient(135deg, #eefaf7 0%, #f4f7f8 45%, #fff 100%);
  box-shadow: 0 10px 24px rgba(8, 49, 65, 0.05);
}
.ifc-export > div { flex: 1 1 260px; }
.ifc-export__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: linear-gradient(145deg, #083141, #0f766e);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}
.ifc-app .ifc-export__title { margin: 0 0 4px; font-size: 1.15rem; font-weight: 900; color: var(--ifc-ink); }
.ifc-export p { margin: 0; color: var(--ifc-muted); font-size: var(--ifc-text-sm); }
.ifc-app .ifc-export__btn {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #14a39a 0%, #0f766e 55%, #0b5f59 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.25);
}
.ifc-app .ifc-export__btn:hover { background: linear-gradient(135deg, #1fb5a8 0%, #0f766e 60%, #083141 100%); }
.ifc-note { margin: 0; color: var(--ifc-muted); font-size: var(--ifc-text-xs); }

/* Fallback email modal */
.ifc-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 49, 65, 0.45);
}
.ifc-modal__card {
  width: min(440px, 100%);
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(8, 49, 65, 0.25);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #083141;
}
.ifc-modal__card h3 { margin: 0 0 10px; font-size: 1.25rem; }
.ifc-modal__card label { display: block; margin: 8px 0 6px; font-size: 0.95rem; font-weight: 700; }
.ifc-modal__card input { width: 100%; padding: 11px 12px; border: 1px solid #d5e0e4; border-radius: 12px; font: inherit; }
.rc-ml-overlay .rc-ml-modal .rc-ml-modal__snapshot-val { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
.ifc-modal__snap { margin: 0 0 12px; padding: 12px 14px; list-style: none; border-radius: 12px; background: #f4f7f8; }
.ifc-modal__snap li { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; }
.ifc-modal__snap li + li { margin-top: 6px; }
.ifc-modal__snap strong { text-align: right; }
.ifc-modal__err { min-height: 1.2em; margin: 6px 0; color: #b42318; font-weight: 700; }
.ifc-modal__actions { display: flex; justify-content: flex-end; gap: 10px; }
.ifc-modal__actions button { min-height: 44px; padding: 10px 14px; border-radius: 12px; font: inherit; font-weight: 750; cursor: pointer; }
.ifc-modal__cancel { border: 1px solid #d5e0e4; background: #fff; color: #083141; }
.ifc-modal .ifc-export__btn { border: none; background: #0f766e; color: #fff; }

@media (max-width: 860px) {
  .ifc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ifc-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ifc-detail__grid { grid-template-columns: 1fr; }
  .ifc-assume .ifc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones: each fund becomes a card */
@media (max-width: 700px) {
  #ifc-root.ifc-app, .ifc-root.ifc-app { padding: 0 0 8px; margin-top: 16px; }
  .ifc-shell { padding: 14px 12px 20px; border-radius: 22px; gap: 16px; }
  .ifc-head { padding: 22px 16px 18px; border-radius: 18px; }
  .ifc-panel { padding: 18px 14px; border-radius: 18px; }
  .ifc-compare, .ifc-insights, .ifc-outside { padding: 18px 12px; }
  .ifc-grid, .ifc-assume .ifc-grid { grid-template-columns: 1fr; }
  .ifc-kpis { grid-template-columns: 1fr; }
  .ifc-pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 12px 4px; scrollbar-width: none; }
  .ifc-pills::-webkit-scrollbar { display: none; }
  .ifc-app .ifc-pill { flex: 0 0 auto; }

  .ifc-table-scroll { overflow: visible; border: 0; background: transparent; }
  .ifc-app .ifc-table { min-width: 0; }
  .ifc-app .ifc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ifc-app .ifc-table tbody { display: grid; gap: 10px; }
  .ifc-app .ifc-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; padding: 12px 14px; border: 1px solid var(--ifc-line); border-radius: 16px; background: #fff; }
  .ifc-row.is-mine { border-color: rgba(15, 118, 110, 0.55) !important; box-shadow: inset 4px 0 0 var(--ifc-teal); }
  .ifc-row.is-open { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
  .ifc-app .ifc-table td { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 5px 0; font-size: 0.92rem; border: 0; text-align: left; background: transparent !important; box-shadow: none !important; }
  .ifc-app .ifc-table td::before { content: attr(data-label); color: var(--ifc-muted); font-size: 0.75rem; font-weight: 700; }
  .ifc-app .ifc-table .ifc-c-name { grid-column: 1 / -1; width: auto; padding: 0 36px 6px 0; }
  .ifc-app .ifc-table .ifc-c-name::before { display: none; }
  .ifc-app .ifc-table .ifc-c-more { position: absolute; right: 12px; top: 12px; width: auto; padding: 0; }
  .ifc-app .ifc-table .ifc-c-more::before { display: none; }
  .ifc-app .ifc-table tr.ifc-row { position: relative; }
  .ifc-risk { flex-direction: row; align-items: center; gap: 6px; }
  .ifc-risk__dots i { width: 6px; height: 6px; }
  .ifc-app .ifc-table td::before { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .ifc-app .ifc-table tr.ifc-detail { display: block; margin-top: -11px; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; background: #f7fbfb; }
  .ifc-app .ifc-table tr.ifc-detail td { display: block; padding: 0; }
  .ifc-app .ifc-table tr.ifc-detail td::before { display: none; }
  .ifc-bars li { grid-template-columns: 92px minmax(0, 1fr) 56px; gap: 8px; }
  .ifc-bars__long { display: none; }
  .ifc-bars__short { display: inline; }
  .ifc-export { flex-direction: column; align-items: stretch; }
  .ifc-app .ifc-export__btn { width: 100%; }

  .ifc-switch, .ifc-cmp { padding: 18px 12px; }
  .ifc-swap { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .ifc-swap__side { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 4px 10px; text-align: left; }
  .ifc-swap__side .ifc-btn-ghost { width: 100%; }
  .ifc-swap__l { margin-bottom: 0; }
  .ifc-cmp__bars li { grid-template-columns: minmax(0, 1fr) 72px; gap: 4px 10px; }
  .ifc-cmp__bl { grid-column: 1 / -1; }

  .ifc-app .ifc-table td.ifc-c-pick { grid-column: 1 / -1; order: 10; width: auto; margin-top: 6px; padding: 8px 0 0; border-top: 1px solid #e8eef0; }
  .ifc-app .ifc-table td.ifc-c-pick::before { display: none; }
  .ifc-pick { justify-content: flex-start; gap: 10px; min-height: 36px; }
  .ifc-pick__txt { display: inline; font-size: var(--ifc-text-xs); font-weight: 800; color: var(--ifc-teal-deep); }
}
