/* RupeeCase Factsheet — Shared Stylesheet
   Used by all per-strategy factsheet-preview.html files.
   Locked design tokens. Do not edit per-strategy files for color/typography. */
:root {
  --navy: #0D1F3C;
  --blue: #2463EB;
  --ink: #0D1F3C;
  --muted: #6B7280;
  --line: #E5E7EB;
  --bg: #F8FAFC;
  --green: #047857;
  --red: #B91C1C;
  --amber: #B45309;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}
.page {
  width: 794px;
  min-height: 1123px;
  background: white;
  margin: 0 auto 32px;
  box-shadow: 0 4px 24px rgba(13,31,60,0.08);
  padding: 36px 44px;
  position: relative;
  page-break-after: always;
}
.header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--navy); padding-bottom: 14px; margin-bottom: 20px; }
.brand-stack { display: flex; flex-direction: column; gap: 3px; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: 1.5px; color: var(--navy); }
.brand-tagline { font-size: 9px; letter-spacing: 2px; color: var(--muted); font-weight: 500; }
.header-meta { text-align: right; font-size: 9px; color: var(--muted); line-height: 1.5; }
.header-meta strong { color: var(--navy); display: block; font-size: 10px; }
.title-block { margin: 18px 0 14px; }
.strategy-name { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.5px; color: var(--navy); }
.strategy-tagline { font-size: 12px; color: var(--muted); margin-top: 5px; font-weight: 500; }
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 18px; }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.badge.risk-very-high { background: #FEE2E2; color: #991B1B; }
.badge.risk-high { background: #FEF3C7; color: #92400E; }
.badge.risk-mod-high { background: #FEF3C7; color: #92400E; }
.badge.risk-moderate { background: #DBEAFE; color: #1E40AF; }
.badge.universe { background: #EFF6FF; color: var(--blue); }
.badge.benchmark { background: #FEF3C7; color: #92400E; }
.badge.sleeves { background: var(--navy); color: white; }
.overview { font-size: 11px; line-height: 1.65; color: #1F2937; margin-bottom: 18px; padding-left: 12px; border-left: 3px solid var(--blue); }
.metric-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.metric-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px 12px; background: white; }
.metric-label { font-size: 9px; letter-spacing: 1.4px; color: var(--muted); font-weight: 600; text-transform: uppercase; margin-bottom: 5px; }
.metric-value { font-size: 24px; font-weight: 800; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.metric-value.up { color: var(--green); }
.metric-value.cost { color: var(--amber); }
.metric-sublabel { font-size: 9px; color: var(--muted); margin-top: 4px; }
.section-title { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--navy); margin: 14px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
table.perf { width: 100%; border-collapse: collapse; font-size: 10.5px; margin-bottom: 14px; }
table.perf th { text-align: left; padding: 6px 9px; background: #F1F5F9; color: var(--navy); font-size: 9px; letter-spacing: 0.5px; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid var(--line); }
table.perf th:nth-child(2), table.perf th:nth-child(3) { text-align: right; }
table.perf td { padding: 6px 9px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.perf td:nth-child(2), table.perf td:nth-child(3) { text-align: right; font-weight: 600; }
table.perf tr.subgroup td { background: #F8FAFC; font-size: 8.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); font-weight: 700; padding: 5px 9px; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.config-item { border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; }
.config-label { font-size: 8.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.config-value { font-size: 12px; font-weight: 700; color: var(--navy); margin-top: 3px; }
.footer { position: absolute; bottom: 18px; left: 44px; right: 44px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; font-size: 8.5px; color: var(--muted); }
.footer .pagenum { font-weight: 700; color: var(--navy); }
.heatmap-table { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 9.5px; }
.heatmap-table th { font-size: 8px; letter-spacing: 0.5px; color: var(--muted); font-weight: 600; padding: 4px 0; text-align: center; }
.heatmap-table th:first-child { text-align: left; padding-left: 4px; }
.heatmap-table th.ytd-col { color: var(--navy); font-weight: 700; }
.heatmap-table td { height: 24px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; border-radius: 3px; color: white; font-size: 9.5px; }
.heatmap-table td.year { background: white !important; color: var(--navy); font-weight: 700; font-size: 10px; text-align: left; padding-left: 4px; }
.heatmap-table td.empty { background: #F1F5F9 !important; color: var(--muted); }
.heatmap-table td.ytd { background: var(--navy) !important; color: white; font-weight: 800; }
.holdings-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.holdings-grid-7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.holdings-grid-8 { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-bottom: 12px; }
.holding-card { border: 1px solid var(--line); border-radius: 4px; padding: 6px 4px; text-align: center; }
.holding-symbol { font-weight: 800; color: var(--navy); font-size: 9px; letter-spacing: 0.2px; line-height: 1.2; }
.holding-alloc { color: var(--blue); font-weight: 700; font-size: 9px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.holding-card.sleeve-debt { background: #DBEAFE; }
.holding-card.sleeve-gold { background: #FEF3C7; }
table.dd { width: 100%; border-collapse: collapse; font-size: 10px; }
table.dd th, table.dd td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
table.dd th:first-child, table.dd td:first-child { text-align: left; }
table.dd th { background: #F1F5F9; color: var(--navy); font-weight: 700; font-size: 9px; letter-spacing: 0.5px; text-transform: uppercase; }
table.dd td.dd-depth { color: var(--red); font-weight: 700; }
.insight { border-left: 4px solid var(--blue); background: #EFF6FF; padding: 10px 12px; border-radius: 0 6px 6px 0; font-size: 10.5px; line-height: 1.6; color: #1F2937; margin: 10px 0; }
.disclaimer { font-size: 8px; line-height: 1.5; color: var(--muted); margin-top: 12px; padding: 9px 11px; background: #F8FAFC; border-radius: 4px; }
.disclaimer strong { color: var(--navy); }
.year-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 12px; }
.year-cell { text-align: center; padding: 8px 6px; border-radius: 6px; color: white; }
.year-cell .year-label { font-size: 9px; opacity: 0.85; letter-spacing: 0.5px; font-weight: 600; }
.year-cell .year-value { font-size: 14px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
/* Factsheet back-bar | injected by patch-factsheets-meta.js so visitors landing
   directly on a factsheet URL have a way back to the rich detail page. */
.factsheet-nav { max-width: 920px; margin: 16px auto 0; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; }
.factsheet-back { color: var(--navy); text-decoration: none; font-weight: 600; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; transition: background 0.2s, transform 0.2s; }
.factsheet-back:hover { background: var(--navy); color: white; transform: translateX(-2px); }
.factsheet-print-hint { color: var(--muted); font-size: 11px; }
.factsheet-print-hint kbd { background: #F1F5F9; border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--navy); }
@media (max-width: 600px) {
  .factsheet-nav { flex-direction: column; align-items: stretch; padding: 0 14px; gap: 8px; }
  .factsheet-print-hint { display: none; }
}
@media print {
  body { padding: 0; background: white; }
  .page { box-shadow: none; margin: 0; }
  .factsheet-nav { display: none !important; }
  a[href]:after { content: ""; }
  .badge, .metric-card, .config-grid > div { break-inside: avoid; page-break-inside: avoid; }
  h1, h2, h3 { break-after: avoid-page; page-break-after: avoid; }
  @page { size: A4 portrait; margin: 12mm; }
}
