/* ==========================================================================
   About (/about/, pages/about.md). Loaded only by `page_css: about`.
   Rules this file holds itself to, the same ones home.css holds:
     * Tokens only, from core.css, so both themes follow their own ramp.
       Per-area tints are color-mix()es of the semantic tokens.
     * Flat surfaces: one fill, one border, one shallow shadow. No gradient on
       a content surface, no glow, no blur.
     * Nothing animates on load. Hover and focus transitions only.
     * Chapter rhythm matches the homepage: each band opens on a hairline in
       --border and its kicker carries a short accent tick, so the two pages
       read as the same site.

   EVERY SELECTOR IS SCOPED UNDER .ab, AND THAT IS LOAD-BEARING.
   This page renders inside `.content`, whose generic `.content h2`, `.content
   p`, `.content ul/ol/li` rules in content.css are shared by 427 built pages
   (content.css:322-430). Those rules cap prose at --prose, indent lists and
   hang a 1px rule under every h2 -- correct for a design doc, wrong for a card
   grid. They cannot be edited here without changing every HLD design, concept
   page and legal page on the site, so this file overrides them for its own
   namespace instead.
   TWO CLASSES, NOT ONE, on anything that overrides a `.content <tag>` rule:
   `.content h2` is (0,1,1), so a single `.ab-h2` at (0,1,0) LOSES to it and
   the h2 keeps its underline. `.ab .ab-h2` is (0,2,0) and wins. Load order
   alone is not relied on.
   ========================================================================== */

.ab {
    /* The copy column is prose and stays at --prose. Cards, grids and bands
       are not prose and take the full content column, which is about 990px
       inside the --measure-doc shell once the 232px outline is removed. */
    --ab-card-pad: var(--sp-5);
}

/* --------------------------------------------------------------------------
   Shared bits
   -------------------------------------------------------------------------- */
.ab .ab-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    min-height: 48px; padding: 0 var(--sp-5);
    font-size: var(--fs-base); font-weight: 650; text-decoration: none;
    color: var(--text); background: var(--surface);
    border: 1px solid var(--border-strong); border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.ab .ab-btn:hover { border-color: var(--accent); background: var(--surface-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.ab .ab-btn:active { transform: translateY(1px); box-shadow: var(--shadow-sm); }
.ab .ab-btn-primary { color: var(--accent-contrast); background: var(--accent); border-color: var(--accent); }
.ab .ab-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.ab .ab-btn [aria-hidden] { display: inline-block; transition: transform var(--dur-fast) var(--ease); }
.ab .ab-btn:hover [aria-hidden] { transform: translateX(3px); }
.ab .ab-btn:focus-visible, .ab .ab-card:focus-visible {
    outline: var(--focus-ring); outline-offset: var(--focus-ring-offset);
}
.ab .ab-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: var(--sp-5) 0 0; max-width: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.ab .ab-hero { padding: 0 0 var(--sp-6); }
.ab .ab-eyebrow {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    margin: 0 0 var(--sp-4); padding: var(--sp-1h) var(--sp-3); max-width: none;
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em;
    color: var(--text-muted); background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-full);
}
.ab .ab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
/* The one display size on the page. --fs-4xl is reserved for the homepage
   hero, so this takes --fs-3xl with the tighter tracking the h1 already had. */
.ab .ab-title { margin: 0 0 var(--sp-4); font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 700; line-height: 1.14; letter-spacing: -0.018em; color: var(--text); text-wrap: balance; }
.ab .ab-lede p { margin: 0 0 var(--sp-4); max-width: 62ch; font-size: var(--fs-md); line-height: 1.7; color: var(--text-muted); }
.ab .ab-lede p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Chapter breaks -- the homepage's device, same tokens
   -------------------------------------------------------------------------- */
.ab .ab-section { position: relative; margin-top: var(--sp-6); padding: var(--sp-7) 0 0; }
.ab .ab-section::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: var(--border);
}
.ab .ab-kicker {
    display: inline-flex; align-items: center; gap: var(--sp-3);
    margin: 0 0 var(--sp-3); max-width: none;
    font-size: var(--fs-xs); font-weight: 750; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-dim);
}
/* NO ::before DASH. The 20x2px bar that used to sit in front of this label
   read as a stray long hyphen, and it was drawn 42 times across six pages.
   The uppercase, letter-spaced, accent colour already marks the label as an
   eyebrow; the rule was decoration on top of a treatment that works without
   it. `display: inline-flex` and `gap` stay above: the gap has no second item
   to act on, and inline-flex keeps the shrink-to-fit box the label wants. */
/* Kills content.css's h2 underline and its --sp-8 top margin: the hairline
   above the section already does that job, and two rules per head is one too
   many. */
.ab .ab-h2 {
    margin: 0 0 var(--sp-4); padding-bottom: 0; border-bottom: 0;
    font-size: var(--fs-2xl); font-weight: 700; line-height: 1.15;
    letter-spacing: -0.025em; color: var(--text); text-wrap: balance;
}
.ab .ab-sub { margin: 0 0 var(--sp-5); max-width: 68ch; font-size: var(--fs-md); line-height: 1.7; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Numbers -- stat cards
   -------------------------------------------------------------------------- */
.ab .ab-stats {
    list-style: none; margin: 0; padding: 0; max-width: none;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4);
}
.ab .ab-stats li {
    margin: 0; padding: var(--sp-4) var(--sp-5);
    display: flex; flex-direction: column; gap: var(--sp-0);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.ab .ab-stats b {
    font-size: var(--fs-2xl); font-weight: 800; line-height: 1.1;
    letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums;
}
.ab .ab-stats span { font-size: var(--fs-sm); line-height: 1.5; color: var(--text-dim); }

/* --------------------------------------------------------------------------
   What makes this different -- three failure modes, then the position
   -------------------------------------------------------------------------- */
.ab .ab-contrast {
    list-style: none; margin: 0 0 var(--sp-4); padding: 0; max-width: none;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4);
}
.ab .ab-contrast li {
    margin: 0; padding: var(--ab-card-pad);
    background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-lg);
    border-top: 2px solid color-mix(in srgb, var(--danger) 45%, var(--border));
}
.ab .ab-contrast b { display: block; margin-bottom: var(--sp-2); font-size: var(--fs-base); font-weight: 700; color: var(--text); }
.ab .ab-contrast span { font-size: var(--fs-sm); line-height: 1.6; color: var(--text-muted); }
/* The page's one claim about itself, so it gets the accent wash the homepage
   gives its closing band rather than sitting in the prose run. */
.ab .ab-callout {
    margin: 0; padding: var(--sp-5); max-width: none;
    font-size: var(--fs-md); line-height: 1.7; color: var(--text-muted);
    background: var(--accent-subtle); border: 1px solid var(--border-accent);
    border-radius: var(--r-lg);
}
.ab .ab-callout strong { color: var(--text); font-weight: 700; }

/* --------------------------------------------------------------------------
   What you'll find here -- one card per surface
   -------------------------------------------------------------------------- */
/* align-items: start so each card is its own content's height. Stretched to
   the row, the three-bullet LLD card matched the seven-bullet HLD card beside
   it and carried a half-card of empty space inside its own border, which reads
   as a rendering fault rather than as a short card. */
.ab .ab-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); align-items: start; }
/* Seven cards in two columns leave the last one alone on its row, so it takes
   the full width. Written as last-and-odd rather than :nth-child(7) so adding
   or removing a card keeps the row full without a CSS edit. */
.ab .ab-cards > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.ab .ab-card {
    display: flex; flex-direction: column; gap: var(--sp-3);
    padding: var(--ab-card-pad);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
}
.ab .ab-card:hover { border-color: color-mix(in srgb, var(--tone) 45%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ab .ab-card:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
/* Tones carry the homepage's track vocabulary so the same subject is the same
   colour on both pages; the three surfaces the homepage has no track for take
   mixes that stay clear of the four that do. */
.ab [data-tone="hld"] { --tone: var(--accent); }
.ab [data-tone="lld"] { --tone: var(--info); }
.ab [data-tone="dsa"] { --tone: var(--success); }
.ab [data-tone="hld-fundamentals"] { --tone: var(--warning); }
.ab [data-tone="draw"] { --tone: color-mix(in srgb, var(--accent) 50%, var(--danger)); }
.ab [data-tone="ide"] { --tone: color-mix(in srgb, var(--success) 50%, var(--info)); }
.ab [data-tone="ai"] { --tone: var(--pro-chip); }
.ab .ab-card-head { display: flex; align-items: center; gap: var(--sp-3); }
/* The count is a sibling of the heading, never inside it: the contents panel
   builds its entries from each heading's textContent (_layouts/default.html
   around line 1135), so a count span inside the h3 rendered as "DSA483
   problems" in the outline. */
.ab .ab-card-title { min-width: 0; }
.ab .ab-card-icon {
    flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center;
    border-radius: var(--r-md); color: var(--tone);
    background: color-mix(in srgb, var(--tone) 14%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent);
    transition: background var(--dur-fast) var(--ease);
}
.ab .ab-card:hover .ab-card-icon { background: color-mix(in srgb, var(--tone) 24%, transparent); }
.ab .ab-card-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ab .ab-h3 { margin: 0; font-size: var(--fs-md); font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.ab .ab-count { display: block; margin-top: 1px; font-size: var(--fs-xs); font-weight: 650; color: var(--text-dim); font-variant-numeric: tabular-nums; }
/* Card lists are not prose: no --prose cap, tighter leading, and a tonal
   marker instead of content.css's --text-dim bullet. */
.ab .ab-card ul { margin: 0; padding-left: var(--sp-4); max-width: none; }
.ab .ab-card li { margin-bottom: var(--sp-2); font-size: var(--fs-sm); line-height: 1.6; color: var(--text-muted); }
.ab .ab-card li:last-child { margin-bottom: 0; }
.ab .ab-card li::marker { color: var(--tone); }
.ab .ab-card p { margin: 0; max-width: none; font-size: var(--fs-sm); line-height: 1.6; color: var(--text-muted); }
.ab .ab-card strong { color: var(--text); font-weight: 650; }

/* --------------------------------------------------------------------------
   The philosophy -- numbered, like the homepage's loop
   -------------------------------------------------------------------------- */
.ab .ab-steps {
    list-style: none; margin: 0; padding: 0; max-width: none;
    counter-reset: ab-step; display: grid; gap: var(--sp-4);
}
.ab .ab-steps li {
    counter-increment: ab-step; margin: 0;
    display: grid; grid-template-columns: 32px minmax(0, 1fr);
    column-gap: var(--sp-4); row-gap: var(--sp-0); align-items: start;
    padding-top: var(--sp-4); border-top: 2px solid color-mix(in srgb, var(--accent) 40%, var(--border));
}
/* Explicit placement, because auto-flow put the <span> in column 1 under the
   marker and wrapped the sentence to one word per line in a 32px column. */
.ab .ab-steps li::before {
    content: "0" counter(ab-step);
    grid-column: 1; grid-row: 1 / span 2;
    display: grid; place-items: center; width: 32px; height: 32px;
    font-size: var(--fs-xs); font-weight: 800; font-variant-numeric: tabular-nums;
    color: var(--accent); background: var(--accent-subtle);
    border: 1px solid var(--border-accent); border-radius: var(--r-full);
}
.ab .ab-steps b { grid-column: 2; grid-row: 1; font-size: var(--fs-base); font-weight: 700; color: var(--text); }
.ab .ab-steps span { grid-column: 2; grid-row: 2; font-size: var(--fs-sm); line-height: 1.65; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Who built this / Connect
   -------------------------------------------------------------------------- */
.ab .ab-prose p { margin: 0 0 var(--sp-4); max-width: 68ch; line-height: 1.75; color: var(--text-muted); }
.ab .ab-prose p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .ab .ab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .ab .ab-cards, .ab .ab-contrast { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .ab .ab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
    .ab .ab-section { margin-top: var(--sp-5); padding-top: var(--sp-6); }
    .ab .ab-actions .ab-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .ab .ab-card, .ab .ab-btn, .ab .ab-card-icon, .ab .ab-btn [aria-hidden] { transition: none; }
    .ab .ab-card:hover, .ab .ab-btn:hover, .ab .ab-btn:hover [aria-hidden] { transform: none; }
}
