/* Server-built pages for search (seo_pages.py): fund vs fund, stocks held by funds, overlap checker.
   Layout and type come from method.css (.method.legal); this file adds tables, link lists and the overlap tool. */

.method.pg { max-width: calc(960px + 2 * var(--gutter)); }
.method.pg h1 { font-size: 40px; }
.method.pg .lede { max-width: 820px; }
.method.pg .small { max-width: 820px; }
.method.pg section { margin-top: 48px; }
.method.pg section > h2 + p, .method.pg section > h2 + .pg-table-wrap, .method.pg section > h2 + ul { margin-top: 16px; }
.muted { color: var(--muted); }

.pg-table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line-soft); }
.pg-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.4; }
.pg-table th, .pg-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.pg-table tbody tr:last-child th, .pg-table tbody tr:last-child td { border-bottom: 0; }
.pg-table thead th { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface); }
.pg-table thead th a { font-size: 13px; font-weight: 600; }
.pg-table tbody th { font-weight: 400; color: var(--ink-2); white-space: nowrap; }
.pg-table td { font-variant-numeric: tabular-nums; color: var(--ink); }
.pg-table.vs td { min-width: 150px; }
.pg-table td.better { color: var(--good); font-weight: 600; }
.pg-table td.better .muted { font-weight: 400; }
.method .pg-table .tone { font-weight: 600; }

.method ul.pg-links { list-style: none; padding: 0; margin: 16px 0 0; max-width: none; display: grid; gap: 8px; }
.method ul.pg-links li + li { margin-top: 0; }
.method ul.pg-links li { font-size: 15px; line-height: 1.45; }
.method ul.pg-links.cols { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 24px; }
.method .pg-foot { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line-soft); }

/* overlap checker */
.ov-tool { margin-top: 28px; padding: 20px; border: 1px solid var(--line); background: #fff; }
.ov-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ov-slot { position: relative; }
.ov-slot input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 15px; color: var(--ink); border-radius: 0; }
.ov-slot input:focus { outline: none; border-color: var(--ink); }
.ov-picked { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px 0 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; line-height: 1.3; }
.ov-picked span { flex: 1; min-width: 0; }
.ov-picked button { width: 32px; height: 32px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
.ov-picked button:hover { color: var(--ink); }
.ov-list { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; max-height: 300px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none;
  background: #fff; border: 1px solid var(--ink); border-top: 0; }
.ov-opt { padding: 8px 12px; cursor: pointer; font-size: 14px; line-height: 1.35; }
.ov-opt small { display: block; color: var(--muted); font-size: 12px; }
.ov-opt[aria-selected="true"], .ov-opt:hover { background: var(--surface); }
.ov-hint { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.ov-pair { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.ov-pair h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.ov-num { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.ov-num b { font-size: 32px; font-weight: 600; letter-spacing: -0.5px; }
.ov-num.high b { color: var(--bad); }
.ov-bar { height: 6px; margin-top: 8px; background: var(--hair); max-width: 480px; }
.ov-bar i { display: block; height: 100%; background: var(--ink); }
.ov-num.high + .ov-bar i { background: var(--bad); }

@media (max-width: 720px) {
  .method.pg h1 { font-size: 32px; }
  .ov-slots { grid-template-columns: minmax(0, 1fr); }
  .pg-table th, .pg-table td { padding: 9px 10px; }
}

/* SIP calculator (sip.js); the fund picker reuses the overlap checker's .ov-* styles */
.sip-tool { margin-top: 28px; border: 1px solid var(--line); background: #fff; }
.sip-tabs { display: flex; border-bottom: 1px solid var(--line); }
.sip-tabs button { flex: 0 0 auto; padding: 14px 20px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font: inherit;
  font-size: 15px; color: var(--muted); cursor: pointer; }
.sip-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.sip-form { padding: 20px 20px 0; }
.sip-out { padding: 0 20px 20px; }
.sip-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.sip-row .sip-fund { grid-column: span 2; }
.sip-field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.sip-field input, .sip-field select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 15px;
  color: var(--ink); border-radius: 0; }
.sip-field input:focus, .sip-field select:focus, .sip-fund input:focus { outline: none; border-color: var(--ink); }
.sip-fund input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); font: inherit; font-size: 15px; border-radius: 0; }
.sip-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.sip-card { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line-soft); display: grid; gap: 4px; }
.sip-card span { font-size: 13px; color: var(--muted); }
.sip-card b { font-size: 24px; font-weight: 600; letter-spacing: -0.3px; }
.sip-card small { font-size: 12px; color: var(--muted); }
.method .sip-compare p { margin-top: 12px; font-size: 15px; }
@media (max-width: 720px) {
  .sip-row .sip-fund { grid-column: auto; }
  .sip-cards { grid-template-columns: minmax(0, 1fr); }
  .sip-tabs button { padding: 12px 14px; font-size: 14px; }
}

.pg-table.words td { font-variant-numeric: normal; }

/* SIF explainer article (Figma Drafts 1344:21417): full 1296px column, 27px section headings, tables, example cards (sif_seo._article) */
.method.pg:has(> .sg) { max-width: calc(1296px + 2 * var(--gutter)); padding: 48px var(--gutter) 72px; }
.sg { display: flex; flex-direction: column; gap: 48px; }
.method.pg .sg .sg-sec { margin-top: 0; display: flex; flex-direction: column; gap: 16px; }
.method.pg .sg p { margin: 0; max-width: none; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.method.pg .sg .sg-h { margin: 0; font-size: 27px; font-weight: 600; line-height: 1.2; letter-spacing: -0.54px; color: var(--ink); }
.sg-crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.sg-crumb a { color: var(--link); }
.sg-crumb a:hover { text-decoration: underline; }
.sg-slash { color: var(--faint); }

.sg-table-wrap { overflow-x: auto; }
.sg-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.sg-table thead th { padding: 0 16px 10px 0; text-align: left; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 500; line-height: 14px; letter-spacing: 0.66px; text-transform: uppercase; color: var(--muted); }
.sg-table th[scope="row"], .sg-table td { padding: 12px 16px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); font-size: 14px; line-height: 22px; font-weight: 400; color: var(--ink-2); white-space: normal; }
.sg-table th[scope="row"] { font-weight: 600; line-height: 20px; color: var(--ink); }
.sg-table th:last-child, .sg-table td:last-child { padding-right: 0; }
.sg-cmp th:nth-child(-n+3), .sg-cmp td:nth-child(-n+3) { width: 328px; }
.sg-table th[scope="row"] a:hover { text-decoration: underline; }
.sg-strat thead th, .sg-strat th[scope="row"], .sg-strat td { padding-right: 24px; }
.sg-strat th[scope="row"], .sg-strat td { padding-top: 14px; padding-bottom: 14px; }
.sg-strat th:nth-child(odd):not(:last-child), .sg-strat td:nth-child(odd):not(:last-child) { width: 384px; }
.sg-strat th:nth-child(2), .sg-strat td:nth-child(2) { width: 168px; }
.sg-cmp, .sg-strat { min-width: 640px; }

.sg-point { display: flex; align-items: flex-start; gap: 10px; }
.sg-point img { flex: none; margin-top: 4px; }
.sg-label { font-size: 11px !important; font-weight: 500; line-height: 1.4 !important; letter-spacing: 0.66px; text-transform: uppercase; color: var(--muted) !important; }
.sg-cards { display: flex; gap: 16px; align-items: stretch; }
.sg-card { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line-soft); }
.sg-card h3 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.sg-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: 14px; line-height: 22px; color: var(--ink-2); }
.sg-tax > div:not(.sg-big) { display: flex; flex-direction: column; gap: 12px; }
.sg-sum b { flex: none; font-weight: 600; line-height: 1.4; color: var(--ink); white-space: nowrap; }
.sg-sum b.good { color: var(--good); }
.sg-sum b.bad { color: var(--bad); }
.method.pg .sg .sg-verdict { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 22px; color: var(--ink); }
.sg-verdict img { flex: none; }
.sg-timeline { display: flex; flex-direction: column; }
.sg-event { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 14px; line-height: 1.55; color: var(--ink); }
.sg-when { flex: none; width: 96px; font-family: var(--mono); font-size: 11px; line-height: 1.4; color: var(--muted); }
.sg-tag { flex: none; padding: 2px 8px; border: 1px solid var(--line-soft); background: var(--surface); font-size: 12px; line-height: 1.55; color: var(--ink-2); }
.method.pg .sg .sg-big { font-size: 26px; font-weight: 600; line-height: 1; letter-spacing: -0.9px; color: var(--ink); }
.method.pg .sg .sg-sub { font-size: 14px; color: var(--muted); }
.method.pg .sg .sg-note { font-size: 12px; line-height: 1.55; color: var(--muted); }

.sg-next { display: flex; align-items: center; gap: 24px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.sg-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; background: var(--link); color: #fff; font-size: 14px; font-weight: 600; line-height: 20px; }
.sg-btn:hover { background: #0827b0; }
.sg-link { font-size: 14px; line-height: 1.55; color: var(--link); }
.sg-link:hover { text-decoration: underline; }

/* Not in the design: the question rows and reading list kept under the article for search */
.method.pg .sg .sg-faq { margin-top: 24px; }
.method.pg .sg .sg-keep { margin: 24px 0 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.method.pg .sg .sg-disc { margin-top: 24px; font-size: 13px; color: var(--muted); }

@media (max-width: 860px) {
  .method.pg:has(> .sg) { padding-top: 32px; }
  .sg-cards { flex-direction: column; }
  .sg-event { flex-wrap: wrap; row-gap: 4px; }
  .sg-event > span:last-child { flex-basis: 100%; }
  .method.pg .sg .sg-h { font-size: 24px; }
}
