/*
 * /about (pages/about.php). One typeface (Inter, its display cut at large
 * sizes), the kit's colours (light and dark), plain text in a reading
 * width. The one bold thing is the opening sentence with the apps in it;
 * everything after it is a quiet list.
 */
.ab { --ab-measure: 40rem; max-width: 72rem; margin-inline: auto; padding: 0 clamp(0rem, 2vw, 1.5rem) 2rem; }
.ab-body .fl-main, .ab-body main { overflow-x: clip; }

/* The opening sentence: the apps are links in it, with their icons. */
.ab-hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.ab-hero-text {
    font-size: clamp(2rem, 1.15rem + 3.4vw, 4rem); line-height: 1.16; font-weight: 640; letter-spacing: -0.032em;
    color: var(--fl-text); max-width: 19em; margin: 0; text-wrap: pretty; font-optical-sizing: auto;
}
.ab-app {
    display: inline-flex; align-items: center; gap: 0.28em; white-space: nowrap; vertical-align: baseline;
    padding: 0 0.22em 0.02em 0.1em; border-radius: 0.28em;
    background: var(--fl-surface); box-shadow: inset 0 0 0 1px var(--fl-border); color: inherit; text-decoration: none !important;
    animation: ab-app-in .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(120ms + var(--d, 0) * 90ms);
}
.ab-nw { white-space: nowrap; }
.ab-app:hover { box-shadow: inset 0 0 0 1px var(--fl-border-strong); background: var(--fl-surface-2); }
.ab-app:focus-visible { outline: 3px solid var(--fl-accent); outline-offset: 2px; }
.ab-app .ab-icon { width: 0.74em; height: 0.74em; border-radius: 0.2em; }
@keyframes ab-app-in { from { opacity: 0; transform: translateY(0.18em); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ab-app { animation: none; } }

.ab-icon { display: inline-grid; place-items: center; flex: none; overflow: hidden; }
.ab-icon img, .ab-icon svg { width: 100%; height: 100%; display: block; }
.ab-icon-account { background: var(--fl-accent); color: #fff; font-size: 0.55em; }
.ab-lead { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem); line-height: 1.6; color: var(--fl-text-muted); max-width: var(--ab-measure); margin: 1.75rem 0 0; }
.ab-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.75rem; }

/* Headings */
.ab-h2 { font-size: clamp(1.55rem, 1.2rem + 1.2vw, 2.2rem); font-weight: 650; letter-spacing: -0.024em; line-height: 1.15; margin: 0 0 1.75rem; }
.ab-h3 { font-size: 1.15rem; font-weight: 650; margin: 0 0 1rem; }
.ab-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; }

/* For everyone: who you are, and the apps for you (the catalogue's `for`). */
.ab-for { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.ab-for .ab-h2 { margin-bottom: 0.6rem; }
.ab-for-lead { font-size: 1.08rem; line-height: 1.6; color: var(--fl-text-muted); max-width: var(--ab-measure); margin: 0 0 1.75rem; }
.ab-for-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.ab-for-list > li { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.15rem 1.2rem 1.2rem; border: 1px solid var(--fl-border); border-radius: 14px; background: var(--fl-surface); min-width: 0; }
.ab-for-name { display: flex; align-items: center; gap: 0.55rem; font-size: 1.08rem; font-weight: 650; letter-spacing: -0.01em; margin: 0; }
.ab-for-name .bi { color: var(--fl-accent-text, var(--fl-accent)); font-size: 1.15rem; }
.ab-for-list p { margin: 0; color: var(--fl-text-muted); line-height: 1.5; font-size: 0.97rem; }
.ab-for-apps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.35rem; }
.ab-for-app { display: inline-flex; align-items: center; gap: 0.4rem; max-width: 100%; padding: 0.25rem 0.6rem 0.25rem 0.3rem; border-radius: 999px; background: var(--fl-surface-2); box-shadow: inset 0 0 0 1px var(--fl-border); color: var(--fl-text); font-size: 0.9rem; font-weight: 550; text-decoration: none !important; }
.ab-for-app:hover { box-shadow: inset 0 0 0 1px var(--fl-border-strong); }
.ab-for-app:focus-visible { outline: 3px solid var(--fl-accent); outline-offset: 2px; }
.ab-for-app span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-for-app .ab-icon { width: 1.4rem; height: 1.4rem; border-radius: 0.4rem; font-size: 0.8rem; }
.ab-state { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--fl-accent-soft); color: var(--fl-accent-soft-text, var(--fl-accent)); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.ab-app-list .ab-state { margin-top: 0.45rem; }
.ab-icon-tile { background: var(--fl-ink); color: #fff; }
[data-bs-theme="dark"] .ab-icon-tile { background: #fff; color: var(--fl-ink); }
.ab-app .ab-icon-tile, .ab-app-name .ab-icon-tile { font-size: 0.5em; }
.ab-app-name .ab-icon-tile { font-size: 1.1rem; }

/* What is in it: a list on a white band, one row per app. */
.ab-apps { margin: 0 calc(50% - 50vw); padding: clamp(2.5rem, 6vw, 4.5rem) calc(50vw - 50%); background: var(--fl-surface); border-block: 1px solid var(--fl-border); }
.ab-app-list { list-style: none; margin: 0; padding: 0; }
.ab-app-list > li { display: grid; grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr) auto; gap: 0.5rem 2.5rem; align-items: start; padding: 1.5rem 0; border-top: 1px solid var(--fl-border); scroll-margin-top: 5rem; }
.ab-app-list > li:target { background: linear-gradient(90deg, var(--fl-accent-soft), transparent 70%); }
.ab-app-name { display: flex; align-items: center; gap: 0.7rem; font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; margin: 0; }
.ab-app-name .ab-icon { width: 2.25rem; height: 2.25rem; border-radius: 0.6rem; }
.ab-app-name .ab-icon-account { font-size: 1.15rem; }
.ab-app-text { max-width: var(--ab-measure); }
.ab-app-text p { font-size: 1.08rem; line-height: 1.5; margin: 0.35rem 0 0.5rem; color: var(--fl-text); }
.ab-app-text ul { margin: 0; padding: 0; list-style: none; color: var(--fl-text-muted); font-size: 0.95rem; line-height: 1.55; }
.ab-app-text li { padding-left: 1rem; position: relative; }
.ab-app-text li::before { content: ""; position: absolute; left: 0.1rem; top: 0.68em; width: 0.32rem; height: 0.32rem; border-radius: 50%; background: var(--fl-border-strong); }
.ab-app-open { margin-top: 0.3rem; }

/* The rules: the rule, then why. */
.ab-rules { margin: 0; display: grid; gap: 1.6rem; max-width: 62rem; }
.ab-rules > div { display: grid; grid-template-columns: minmax(12rem, 22rem) minmax(0, 1fr); gap: 0.4rem 2.5rem; }
.ab-rules dt { font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem); font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.ab-rules dd { margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--fl-text-muted); max-width: var(--ab-measure); padding-top: 0.15rem; }

/* Who makes it */
.ab-maker-text { max-width: 44rem; }
.ab-maker-big { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); line-height: 1.5; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 1rem; }
.ab-maker-text p:last-child { color: var(--fl-text-muted); margin: 0; }

/* What changed lately, and the news next to it */
.ab-recent { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: start; }
.ab-changes { margin: 0; display: grid; gap: 0.9rem; }
.ab-changes > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; }
.ab-changes dt { font-weight: 600; color: var(--fl-text-muted); font-variant-numeric: tabular-nums; font-size: 0.95rem; padding-top: 0.08rem; }
.ab-changes dd { margin: 0; line-height: 1.55; }
.ab-news-wrap { padding-top: 0.4rem; }
.ab-news { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 1rem; }
.ab-news a { display: block; color: var(--fl-text); text-decoration: none; }
.ab-news a:hover strong { text-decoration: underline; }
.ab-news strong { display: block; font-weight: 600; line-height: 1.35; }
.ab-news small { display: block; color: var(--fl-text-muted); margin-top: 0.15rem; }
.ab-news-wait { height: 2.6rem; border-radius: 8px; background: var(--fl-surface-3); }
.ab-more { font-weight: 600; }

/* The end */
.ab-end { padding-bottom: 1rem; }
.ab-end .ab-h2 { margin-bottom: 0.6rem; }
.ab-end p { color: var(--fl-text-muted); font-size: 1.08rem; margin: 0; max-width: var(--ab-measure); }

@media (max-width: 860px) {
    .ab-app-list > li { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
    .ab-app-open { justify-self: start; }
    .ab-rules > div { grid-template-columns: minmax(0, 1fr); }
    .ab-recent { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
    .ab-changes > div { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
}

/*
 * A look inside (includes/about_look.php): a carousel of a diagram and
 * screenshots in a browser frame. Native horizontal scrolling with snap
 * points (touch and touchpad work as they always do); the buttons, dots and
 * keys only scroll it.
 */
.ab-look { padding: clamp(1rem, 3vw, 2rem) 0 clamp(2.5rem, 6vw, 4rem); }
.ab-look-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ab-look-head .ab-h2 { margin-bottom: 0.4rem; }
.ab-look-lead { margin: 0; color: var(--fl-text-muted); font-size: 1.05rem; line-height: 1.5; max-width: var(--ab-measure); }
.ab-look-nav { display: flex; gap: 0.5rem; flex: none; }
.ab-look-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--fl-border); background: var(--fl-surface); color: var(--fl-text); display: grid; place-items: center; font-size: 1.05rem; transition: background .15s, border-color .15s, transform .15s; }
.ab-look-btn:hover { background: var(--fl-surface-2); border-color: var(--fl-border-strong); }
.ab-look-btn:active { transform: scale(0.94); }
.ab-look-btn:focus-visible { outline: 3px solid var(--fl-accent); outline-offset: 2px; }
.ab-look-btn[disabled] { opacity: 0.4; pointer-events: none; }
.ab-look-track {
    display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 1.25rem;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: none; border-radius: 18px; outline: none;
}
.ab-look-track::-webkit-scrollbar { display: none; }
.ab-look-track:focus-visible { box-shadow: 0 0 0 3px var(--fl-accent); }
@media (prefers-reduced-motion: reduce) { .ab-look-track { scroll-behavior: auto; } }
.ab-slide { margin: 0; scroll-snap-align: start; scroll-snap-stop: always; min-width: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.ab-shot { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--fl-border); background: var(--fl-surface); box-shadow: 0 24px 60px -28px rgba(14, 21, 37, 0.35), 0 2px 8px rgba(14, 21, 37, 0.06); aspect-ratio: 1280 / 834; }
.ab-shot-bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--fl-surface-2); border-bottom: 1px solid var(--fl-border); }
.ab-shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--fl-border-strong); }
.ab-shot-bar span { margin: 0 auto; padding: 2px 14px; border-radius: 999px; background: var(--fl-surface); color: var(--fl-text-muted); font-size: 0.78rem; font-weight: 550; transform: translateX(-21px); }
.ab-shot-img { display: block; width: 100%; height: auto; }
.ab-shot-dark { display: none; }
[data-bs-theme="dark"] .ab-shot-light { display: none; }
[data-bs-theme="dark"] .ab-shot-dark { display: block; }
.ab-slide figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 1rem; align-items: baseline; padding: 0 0.25rem; }
.ab-slide figcaption strong { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em; }
.ab-slide figcaption strong .ab-icon { width: 1.5rem; height: 1.5rem; border-radius: 0.42rem; font-size: 0.85rem; }
.ab-slide figcaption span { grid-column: 1; color: var(--fl-text-muted); line-height: 1.5; }
.ab-slide-open { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ab-slide-open:hover { text-decoration: underline; }
.ab-look-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.1rem; }
.ab-look-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: var(--fl-border-strong); transition: width .25s, background .25s; }
.ab-look-dots button[aria-selected="true"] { width: 26px; background: var(--fl-accent); }
.ab-look-dots button:focus-visible { outline: 3px solid var(--fl-accent); outline-offset: 2px; }

/* the diagram (inline SVG in the theme's colours) */
.ab-shot-diagram { background: radial-gradient(120% 90% at 50% 45%, var(--fl-accent-soft) 0%, var(--fl-surface) 60%); }
.abd { display: block; width: 100%; height: 100%; }
.abd-tall { display: none; }
.abd-ring { fill: none; stroke: var(--fl-border); stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; }
.abd-line { stroke: var(--fl-accent); stroke-opacity: 0.35; stroke-width: 2.5; stroke-dasharray: 6 10; animation: abd-flow 1.6s linear infinite; animation-delay: calc(var(--i) * -0.2s); }
@keyframes abd-flow { to { stroke-dashoffset: -32; } }
.abd-card { fill: var(--fl-surface); stroke: var(--fl-border); stroke-width: 1.5; filter: drop-shadow(0 6px 14px rgba(14, 21, 37, 0.08)); }
.abd-node { animation: abd-in .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(80ms * var(--i)); transform-box: fill-box; transform-origin: center; }
@keyframes abd-in { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
.abd-label { fill: var(--fl-text); font: 600 19px Inter, system-ui, sans-serif; }
.abd-tile { fill: var(--fl-ink, #0E1525); }
.abd-glyph { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; }
.abd-glow { fill: var(--fl-accent); opacity: 0.1; }
.abd-center { fill: var(--fl-accent); }
.abd-me { fill: #fff; }
.abd-center-t { fill: #fff; font: 700 22px Inter, system-ui, sans-serif; }
.abd-center-s { fill: #fff; fill-opacity: 0.8; font: 500 15px Inter, system-ui, sans-serif; }
.abd-dark { display: none; }
[data-bs-theme="dark"] .abd-light { display: none; }
[data-bs-theme="dark"] .abd-dark { display: inline; }
[data-bs-theme="dark"] .abd-tile { fill: #fff; }
[data-bs-theme="dark"] .abd-glyph { stroke: var(--fl-ink, #0E1525); }
@media (prefers-reduced-motion: reduce) { .abd-line, .abd-node { animation: none; } }

@media (max-width: 640px) {
    .ab-look-nav { display: none; }
    .ab-shot-diagram { aspect-ratio: 720 / 980; }
    .abd-wide { display: none; }
    .abd-tall { display: block; }
    .abd-tall .abd-label { font-size: 27px; }
    .abd-tall .abd-center-t { font-size: 26px; }
    .abd-tall .abd-center-s { font-size: 19px; }
    .ab-look-track { gap: 0.75rem; }
    .ab-shot { border-radius: 12px; }
    .ab-shot-bar { height: 26px; }
    .ab-shot-bar i { width: 7px; height: 7px; }
    .ab-shot-bar span { font-size: 0.68rem; transform: translateX(-14px); }
    .ab-slide figcaption { grid-template-columns: minmax(0, 1fr); }
    .ab-slide-open { grid-column: 1; grid-row: auto; }
}
