/* Copied from design/ab/home.html (page CSS of the AB mockup). Tokens and the site chrome are in site.css. */
/* ---------- home: intro and search ---------- */
.intro { padding-block: 28px 8px; }
@media (min-width: 960px) { .intro { padding-block: 44px 12px; } }
.intro h1 { font: 700 clamp(30px, 7.2vw, 46px)/1.12 var(--serif); letter-spacing: -.01em; text-wrap: balance; max-width: 22ch; }
.intro .lede { margin-top: 10px; font-size: 18px; color: var(--ink2); max-width: 60ch; }
/* the home illustration beside the headline (command 15): the headline and the line in the first column, the picture in
   the second; the search and what follows take the full width */
.intro.has-art { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start; }
.intro.has-art > * { grid-column: 1 / -1; }
.intro.has-art > h1, .intro.has-art > .lede { grid-column: 1; }
.intro.has-art > picture.art { grid-column: 2; grid-row: 1 / span 2; }
.intro picture.art img { width: 96px; }
@media (min-width: 720px) { .intro.has-art { column-gap: 32px; } .intro picture.art img { width: 160px; } }
/* wide screens: everything in the first column, the picture beside all of it; spare height goes below the search.
   Below 960 px the search keeps the full width, so its suggestion rows stay on one line */
@media (min-width: 960px) { .intro.has-art { grid-template-rows: auto auto 1fr; } .intro.has-art > * { grid-column: 1; } .intro.has-art > picture.art { grid-column: 2; grid-row: 1 / -1; } .intro picture.art img { width: 280px; } }
.hsearch { position: relative; margin-top: 20px; max-width: 720px; }
.hsearch input { width: 100%; height: 56px; border: 1px solid var(--border); border-radius: 0; background: var(--bg); padding: 0 16px; font: 18px var(--nums); }
.hsearch input:focus-visible { outline-offset: 0; }
.hsearch .pop { position: absolute; left: 0; right: 0; top: 56px; z-index: 30; margin-top: -1px; }
.hsearch .results { max-height: 60vh; overflow: auto; }
.hsearch .nores { margin-top: 0; padding: 4px 16px; background: var(--bg); border: 1px solid var(--border); }
.hsearch .results:not([hidden]) + .nores { border-top: 0; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; max-width: 720px; }
.chips-l { font-size: 16px; color: var(--ink2); margin-right: 2px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--border); text-decoration: none; font-size: 16px; }
.chip:hover { border-color: var(--accent); }

/* ---------- home: blocks ---------- */
.blk { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--ink); }
.blk h2 { font: 700 24px/1.25 var(--serif); }
.bhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.bhead .all { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 16px; }
.q { color: var(--ink2); font-size: 16px; line-height: 1.45; }

/* guided paths: a numbered line on a neutral --ink rail (series colours stay for data only) */
.paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px 40px; margin-top: 8px; }
.path { --pc: var(--ink); padding-top: 10px; min-width: 0; }
.path h3 { font: 700 19px/1.3 var(--serif); }
.pline { color: var(--ink2); font-size: 16px; margin-top: 2px; }
.steps { list-style: none; margin: 10px 0 0; padding: 0; }
.steps li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; }
.steps li::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: var(--pc); }
.steps li:first-child::before { top: 12px; }
.steps li:last-child::before { bottom: auto; height: 12px; }
.steps .num { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-top: 7px; border: 2px solid var(--pc); background: var(--bg); font: 600 16px/1 var(--nums); }
.steps .st { padding: 0 0 10px; border-top: 1px solid var(--hair); min-width: 0; }
.steps li:first-child .st { border-top: 0; }
.steps .st > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.steps .q { margin-top: -6px; }

/* cards */
.cards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); column-gap: 32px; }
.card { padding: 12px 0 16px; border-top: 1px solid var(--hair); min-width: 0; }
.card h3 { font: 700 18px/1.3 var(--serif); }
.card h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.card .where { font: var(--small) var(--nums); color: var(--ink2); margin-top: 6px; }
@media (min-width: 720px) { .card.wide { grid-column: span 2; } }
/* Never more columns than items: one card or one topic spans the whole container, and so do its rules. */
.cards[data-n="1"] { grid-template-columns: minmax(0, 1fr); }
.cards[data-n="1"] .card.wide { grid-column: auto; }
.pv { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--hair); max-width: 560px; }
.pvset { font-size: 16px; color: var(--ink2); margin-top: 2px; }
.pvh { margin-top: 6px; font-size: 17px; text-wrap: pretty; }
.pvh .n { font-size: 26px; font-weight: 700; margin-right: 4px; }
.pvbar { display: flex; gap: 2px; height: 16px; margin-top: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pvleg { list-style: none; margin: 8px 0 0; padding: 0; font-size: 16px; }
.pvleg li { min-height: 28px; }
.pvleg .n { font-weight: 600; }
.sw { display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bg-principal { background: var(--s-principal); } .bg-interest { background: var(--s-interest); }

/* topics: details on phones, open columns on desktop */
.topics { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
@media (min-width: 720px) { .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }
@media (min-width: 960px) {
  .topics { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 0; }
  .topic { padding: 0 20px 16px; border-left: 1px solid var(--hair); }
  .topic:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
  .topic > summary { cursor: default; }
  .topic > summary::after { content: none !important; }
}
.topics[data-n="1"] { grid-template-columns: minmax(0, 1fr) !important; }
@media (min-width: 960px) {
  .topics[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topics[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.topic { border-top: 1px solid var(--hair); min-width: 0; }
.topic > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; list-style: none; cursor: pointer; }
.topic > summary::-webkit-details-marker { display: none; }
.topic picture.art img { width: 48px; }
.topic:has(picture.art) ul { margin-left: 58px; }
.topic > summary::after { content: "+"; margin-left: 8px; font: 22px var(--nums); color: var(--accent); }
.topic[open] > summary::after { content: "\2212"; }
.topic > summary h3, .topic > .thead h3 { font: 700 18px/1.3 var(--serif); }
.topic > .thead { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.topic > .thead a { display: inline-flex; align-items: center; min-height: 44px; }
.topic > summary .count { margin-left: auto; }
.ico { flex: none; width: 24px; height: 24px; color: var(--ink); }
.topic ul { list-style: none; margin: 0 0 12px 34px; padding: 0; }
.topic li a { display: inline-flex; align-items: center; min-height: 44px; }

/* recently updated */
.recent { list-style: none; margin: 8px 0 0; padding: 0; }
.recent li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; padding: 8px 0; border-top: 1px solid var(--hair); }
@media (min-width: 720px) { .recent li { grid-template-columns: 13em minmax(0, 1fr); align-items: baseline; } }
.recent .when { font-size: 16px; color: var(--ink2); padding-top: 2px; }
.recent .what a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; margin-right: 10px; }
.recent .note { display: block; font-size: 16px; color: var(--ink2); }
@media (min-width: 720px) { .recent .note { display: inline; margin-left: 12px; } }

/* how we work */
.facts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 40px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.facts li { padding: 10px 0; border-top: 1px solid var(--hair); max-width: 60ch; }
.more { margin-top: 10px; } .more a { display: inline-flex; align-items: center; min-height: 44px; }
@media (prefers-reduced-motion: no-preference) { .chip { transition: border-color .15s ease; } }
@media print {
  .hsearch, .chips { display: none !important; }
  .topic > summary::after { content: none !important; }
  .blk { break-inside: avoid-page; }
}
