/* Duit website: the search pages (/learn, /learn/<guide>, /for/<trade> and any page from content/pages/), written by
   Grow's duit-sh plugin (build.py). Loaded after site.css and doc.css: the same reading column as About, Terms and
   Privacy, plus a breadcrumb, the cards that list guides, the closing card, numbered sources and tables. Tokens only,
   so both themes work; no inline styles or scripts, so the pages run under the site's strict CSP. Every link that
   stands alone is a 44 x 44 tap target (duit-site's redesign_check.mjs, check G): the cards and the closing card's
   pills by their size, the breadcrumb and the sources below. */

.learn .crumbs { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.learn .crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.learn .crumbs li { position: static; margin: 0; padding: 0; } /* static: a later step must not cover a link's ::after */
.learn .crumbs li::before { content: none; }
.learn .crumbs li + li::before {
  content: "/"; position: static; display: inline; width: auto; height: auto; margin: 0 8px; border-radius: 0;
  background: none; color: var(--dim);
}
.learn .crumbs a { position: relative; color: var(--muted); }
/* a 44px tap target that moves nothing: the link's ::after reaches 14px above and below its 18px line (18 + 28 = 46),
   into the space around the breadcrumb, and 5px to each side, inside the 8px around each "/" */
.learn .crumbs a::after { content: ""; position: absolute; inset: -14px -5px; }
.learn .lede { max-width: 52ch; margin: 14px 0 2em; font-size: clamp(19px, .6vw + 15px, 23px); line-height: 1.35; letter-spacing: -0.01em; }

/* Body: links in the site's link colour, numbered lists with their own numbers (no dots), and tables that scroll
   sideways on a phone instead of widening the page. */
.learn a { color: var(--link); }
.learn ol { max-width: 68ch; margin: 0 0 1em; padding-left: 1.6em; }
.learn ol > li { padding-left: .2em; }
.learn ol > li::before { content: none; }
.learn h3 { margin: 1.8em 0 .4em; font-size: 18px; line-height: 1.35; }
.learn blockquote { margin: 1.4em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.learn table { display: block; max-width: 100%; overflow-x: auto; margin: 1.4em 0; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.learn th, .learn td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.learn th { font-weight: 500; color: var(--muted); }

/* Cards: one guide or page each, a title and its one-line description. */
.learn .cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: none; margin: 0 0 1.6em; padding: 0; list-style: none; }
@media (min-width: 720px) { .learn .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.learn .cards li { margin: 0; padding: 0; }
.learn .cards li::before { content: none; }
.learn .cards a {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface);
  color: var(--text); text-decoration: none; transition: border-color .2s var(--ease);
}
.learn .cards a:hover { border-color: var(--line-strong); }
.learn .cards a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.learn .card-t { font-weight: 500; line-height: 1.35; }
.learn .card-d { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* The closing card at the end of each page: early access to Duit Solo. */
.learn-cta {
  margin: 2.6em 0 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface);
}
.learn-cta p { margin: 0 0 .6em; }
.learn-cta .learn-cta-h { font-size: 19px; font-weight: 500; line-height: 1.3; }
.learn-cta .learn-cta-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.learn-cta .learn-cta-links a { color: inherit; }
.learn-cta .learn-cta-links .btn-primary { color: var(--on-accent); }

/* Sources: each link a 44px tap target, with the same space between every two sources. The link is a box as wide as
   its words (a title that wraps stays one box, and the list's number keeps to its first line), and its ::after reaches
   into the 11.5px its item has above and below: a one-line source is 21.7 + 23 = 44.7 tall, and no two reach into
   each other. */
.learn .sources ol { font-size: 14px; line-height: 1.55; color: var(--muted); }
.learn .sources li { margin: 0; padding-block: 11.5px; }
.learn .sources a { position: relative; display: block; width: fit-content; overflow-wrap: anywhere; }
.learn .sources a::after { content: ""; position: absolute; inset: -11.5px 0; }
