/*
 * The Levee product site, styled after the app it describes.
 *
 * Colours are the app icon's blue and purple over neutral greys, whose dark end
 * is the app's own window. The type is Inter, the face the app sets its
 * interface in, served from this domain (assets/fonts, OFL licensed, like the
 * serif the hero demo tries on) - so the analytics script is still the only
 * request that leaves this domain, as the privacy page says.
 *
 * Bootstrap is themed through its CSS variables rather than a Sass build, so the
 * light and dark schemes below are the whole customisation. The page follows the
 * system's scheme via data-bs-theme, set by the inline script in base.html.twig.
 *
 * The landing page's own sections live in landing.css; this file holds what every
 * page shares: the palette, the type scale, header, footer, docs and legal pages.
 */

/* ---------------------------------------------------------------- fonts */

/* Inter is a variable font with weight and optical-size axes, so the one file
   covers everything from body text to the display sizes on the landing page.
   No local(): a designer's machine often has a static Inter installed, and a
   single static weight would be stretched into faux bold. */
@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-latin-jOuO4j6.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* The serif Mara tries on the headline in the hero's cursor demo: one regular
   weight, Latin subset. No rule uses it at load and nothing preloads it, so the
   file is only fetched when the demo asks for it (hero_demo_controller.js), and
   only on a desktop where the demo runs. */
@font-face {
    font-family: "Instrument Serif";
    src: local("Instrument Serif"),
         url("../fonts/InstrumentSerif-latin-9W389ra.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Arial, stretched to Inter's metrics, so text set in the fallback takes the
   same room and nothing jumps when the real face arrives. */
@font-face {
    font-family: "Inter Fallback";
    src: local("Arial"), local("Liberation Sans"), local("Helvetica");
    size-adjust: 107.12%;
    ascent-override: 90.44%;
    descent-override: 22.52%;
    line-gap-override: 0%;
}

:root,
[data-bs-theme="light"] {
    /* Brand: the interface blue and purple, shared with the cloud app */
    --brand-blue-300: #99c1f1;
    --brand-blue-400: #78aeed;
    --brand-blue-500: #3584e4;
    --brand-blue-600: #1c71d8;
    --brand-blue-700: #1a5fb4;
    --brand-blue-800: #154c91;
    --brand-purple-300: #dc8add;
    --brand-purple-500: #9141ac;

    /* The logo's tile, its stops from top left to bottom right */
    --logo-cyan: #01adfe;
    --logo-indigo: #5254f2;
    --logo-violet: #a03bf6;
    --logo-purple: #bf31f7;
    --brand-gradient: linear-gradient(135deg, var(--logo-cyan) 0%, var(--logo-indigo) 44%, var(--logo-violet) 74%, var(--logo-purple) 100%);

    /* Accents, for tints and illustrations */
    --hue-green: #26a269;
    --hue-orange: #e66100;
    --hue-red: #c01c28;

    /* Neutrals: the dark end is the app's own window, so a screenshot sits on
       the page without a seam. */
    --neutral-50: #f5f5f7;
    --neutral-200: #dedee3;
    --neutral-300: #c3c3c8;
    --neutral-400: #9d9da3;
    --neutral-500: #6b6b72;
    --neutral-600: #48484f;
    --neutral-700: #34343a;
    --neutral-800: #2d2d31;
    --neutral-850: #26262a;
    --neutral-900: #1f1f22;
    --neutral-950: #1a1a1c;
    --neutral-1000: #111113;

    /* Solid buttons: a step darker than the brand blue, so white text on them
       reads at 4.5:1. */
    --site-primary: var(--brand-blue-600);
    --site-primary-hover: var(--brand-blue-700);
    --site-primary-active: var(--brand-blue-800);

    /* Bootstrap, retuned */
    --bs-font-sans-serif: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-font-monospace: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
    --bs-body-bg: #ffffff;
    --bs-body-color: var(--neutral-700);
    --bs-emphasis-color: var(--neutral-900);
    --bs-secondary-color: var(--neutral-500);
    --bs-border-color: var(--neutral-200);
    --bs-primary: var(--site-primary);
    --bs-primary-rgb: 28, 113, 216;
    --bs-link-color: var(--brand-blue-600);
    --bs-link-color-rgb: 28, 113, 216;
    --bs-link-hover-color: var(--brand-blue-700);
    --bs-link-hover-color-rgb: 26, 95, 180;
    --bs-code-color: var(--brand-purple-500);
    --bs-border-radius: 0.75rem;
    --bs-border-radius-lg: 1rem;
    --bs-border-radius-xl: 1.25rem;

    /* Type scale: fluid, so the display sizes fill a wide screen and still fit
       a phone. The landing page is set in these; docs and legal pages keep
       their measure. */
    --type-display: clamp(3.25rem, 8.4vw, 7.25rem);
    --type-h2: clamp(2.5rem, 6vw, 5rem);
    --type-h3: clamp(1.5rem, 2.6vw, 2.25rem);
    --type-lead: clamp(1.15rem, 1.6vw, 1.5rem);
    --type-body-lg: clamp(1.05rem, 1.3vw, 1.25rem);

    /* The sticky header's height, for anything that has to sit below it. */
    --header-h: 4rem;

    /* Site */
    --site-surface: #ffffff;
    --site-surface-alt: var(--neutral-50);
    --site-header-bg: rgba(255, 255, 255, 0.82);
    --site-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(17, 17, 19, 0.10);
    --site-shot-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 32px 80px rgba(17, 17, 19, 0.22);
    --site-code-bg: var(--neutral-950);
    --site-footer-bg: var(--neutral-900);
    --site-footer-color: var(--neutral-300);
    --site-footer-heading: #ffffff;
    --site-footer-rule: rgba(255, 255, 255, 0.12);

    --tint-blue-bg: #e1edfb;    --tint-blue-fg: var(--brand-blue-600);
    --tint-purple-bg: #f0e3f4;  --tint-purple-fg: var(--brand-purple-500);
    --tint-green-bg: #dff3e9;   --tint-green-fg: #1c712d;
    --tint-orange-bg: #fdeadb;  --tint-orange-fg: var(--hue-orange);
    --tint-red-bg: #fbe1e3;     --tint-red-fg: var(--hue-red);
    --tint-yellow-bg: #fbf2d3;  --tint-yellow-fg: #986a44;
}

[data-bs-theme="dark"] {
    --bs-body-bg: var(--neutral-900);
    --bs-body-color: var(--neutral-200);
    --bs-emphasis-color: #ffffff;
    --bs-secondary-color: var(--neutral-400);
    --bs-border-color: rgba(255, 255, 255, 0.10);
    --bs-link-color: var(--brand-blue-400);
    --bs-link-color-rgb: 120, 174, 237;
    --bs-link-hover-color: var(--brand-blue-300);
    --bs-link-hover-color-rgb: 153, 193, 241;
    --bs-code-color: var(--brand-purple-300);

    --site-surface: var(--neutral-800);
    --site-surface-alt: var(--neutral-950);
    --site-header-bg: rgba(31, 31, 34, 0.82);
    --site-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    --site-shot-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 32px 80px rgba(0, 0, 0, 0.6);
    --site-code-bg: var(--neutral-1000);
    --site-footer-bg: var(--neutral-950);
    --site-footer-color: var(--neutral-400);
    --site-footer-heading: #ffffff;
    --site-footer-rule: rgba(255, 255, 255, 0.10);

    --tint-blue-bg: rgba(53, 132, 228, 0.22);   --tint-blue-fg: var(--brand-blue-300);
    --tint-purple-bg: rgba(145, 65, 172, 0.28); --tint-purple-fg: var(--brand-purple-300);
    --tint-green-bg: rgba(38, 162, 105, 0.22);  --tint-green-fg: #8ff0a4;
    --tint-orange-bg: rgba(230, 97, 0, 0.22);   --tint-orange-fg: #ffbe6f;
    --tint-red-bg: rgba(192, 28, 40, 0.24);     --tint-red-fg: #f66151;
    --tint-yellow-bg: rgba(229, 165, 10, 0.20); --tint-yellow-fg: #f8e45c;
}

/* ---------------------------------------------------------------- base */

html,
body {
    /* clip, not hidden: hidden would make the body a scroll container and
       undo position: sticky further down. */
    overflow-x: clip;
}

body {
    background-color: var(--bs-body-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1240px;
    }
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--bs-emphasis-color);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.btn {
    --bs-btn-border-radius: 0.5rem;
    --bs-btn-font-weight: 700;
    --bs-btn-padding-x: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-lg {
    --bs-btn-padding-x: 1.5rem;
}

.btn-sm {
    --bs-btn-padding-x: 1rem;
}

.btn-primary {
    --bs-btn-bg: var(--site-primary);
    --bs-btn-border-color: var(--site-primary);
    --bs-btn-hover-bg: var(--site-primary-hover);
    --bs-btn-hover-border-color: var(--site-primary-hover);
    --bs-btn-active-bg: var(--site-primary-active);
    --bs-btn-active-border-color: var(--site-primary-active);
    --bs-btn-disabled-bg: var(--site-primary);
    --bs-btn-disabled-border-color: var(--site-primary);
    --bs-btn-focus-shadow-rgb: 28, 113, 216;
}

.btn-outline-secondary {
    --bs-btn-color: var(--bs-emphasis-color);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-color: var(--bs-emphasis-color);
    --bs-btn-hover-bg: var(--site-surface-alt);
    --bs-btn-hover-border-color: var(--neutral-300);
    --bs-btn-active-color: var(--bs-emphasis-color);
    --bs-btn-active-bg: var(--site-surface-alt);
    --bs-btn-active-border-color: var(--neutral-300);
}

[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-border-color: rgba(255, 255, 255, 0.18);
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.08);
    --bs-btn-hover-border-color: rgba(255, 255, 255, 0.28);
    --bs-btn-active-bg: rgba(255, 255, 255, 0.12);
    --bs-btn-active-border-color: rgba(255, 255, 255, 0.28);
}

.btn svg {
    flex: none;
    width: 1.1em;
    height: 1.1em;
}

code {
    font-size: 0.9em;
}

kbd {
    background: var(--site-surface-alt);
    color: var(--bs-emphasis-color);
    border: 1px solid var(--bs-border-color);
    border-bottom-width: 2px;
    border-radius: 0.375rem;
    padding: 0.1em 0.45em;
    font-size: 0.85em;
}

/* -------------------------------------------------------------- header */

.site-header {
    background: var(--site-header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bs-border-color);
}

.site-header .navbar {
    --bs-navbar-padding-y: 0.6rem;
    --bs-navbar-color: var(--bs-body-color);
    --bs-navbar-hover-color: var(--bs-emphasis-color);
    --bs-navbar-active-color: var(--bs-emphasis-color);
    --bs-navbar-brand-color: var(--bs-emphasis-color);
    --bs-navbar-brand-hover-color: var(--bs-emphasis-color);
    --bs-navbar-toggler-border-color: transparent;
    --bs-navbar-toggler-focus-width: 0.2rem;
}

.site-header .navbar-brand {
    --bs-navbar-brand-font-size: 1.5rem;
}

.site-header .nav-link {
    position: relative;
    font-weight: 600;
    padding-inline: 0.85rem;
}

.site-header .nav-link::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.3rem;
    height: 2px;
    border-radius: 1px;
    background: var(--brand-blue-500);
    scale: 0 1;
    transform-origin: left center;
    transition: scale 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.site-header .nav-link:hover::after,
.site-header .nav-link:focus-visible::after,
.site-header .nav-link.active::after {
    scale: 1 1;
}

.site-header .navbar-toggler {
    padding: 0.35rem;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--bs-emphasis-color);
}

.site-header .navbar-toggler svg {
    display: block;
}

/* The wordmark, the same wherever it stands: the logo's tile beside the
   name, in proportions that hold at any size, so a place sets only the font
   size. The cloud app's .lv-wordmark is the same. */
.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    color: var(--bs-emphasis-color);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    text-decoration: none;
}

.wordmark-mark {
    flex: none;
    width: 0.95em;
    height: 0.95em;
}

/* ------------------------------------------------------------ sections */

/* The pieces a section opens with: a kicker, a title and a lead. The panels
   themselves are in landing.css. */
.section-kicker {
    color: var(--tint-blue-fg);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.section-title {
    font-size: var(--type-h2);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 800;
    text-wrap: balance;
}

.section-lead {
    max-width: 38rem;
    font-size: var(--type-lead);
    line-height: 1.45;
    color: var(--bs-secondary-color);
    text-wrap: pretty;
}

.section-text {
    font-size: var(--type-body-lg);
    line-height: 1.6;
    text-wrap: pretty;
}

/* ---------------------------------------------------------------- cards */

.feature-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    font-size: 1.35rem;
}

.feature-icon svg {
    width: 1em;
    height: 1em;
}

.feature-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-text {
    color: var(--bs-secondary-color);
    line-height: 1.6;
}

.tint-blue   { background: var(--tint-blue-bg);   color: var(--tint-blue-fg); }
.tint-purple { background: var(--tint-purple-bg); color: var(--tint-purple-fg); }
.tint-green  { background: var(--tint-green-bg);  color: var(--tint-green-fg); }
.tint-orange { background: var(--tint-orange-bg); color: var(--tint-orange-fg); }
.tint-red    { background: var(--tint-red-bg);    color: var(--tint-red-fg); }
.tint-yellow { background: var(--tint-yellow-bg); color: var(--tint-yellow-fg); }

/* ----------------------------------------------------------------- blog */

.blog {
    padding-block: clamp(2.5rem, 6vh, 4rem) clamp(3rem, 8vh, 5rem);
}

.blog-head,
.post-head,
.post-body {
    max-width: 46rem;
    margin-inline: auto;
}

.blog-head h1,
.post-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.blog-head .lead,
.post-head .lead {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--bs-secondary-color);
}

.blog-feed-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.blog-feed-link svg {
    width: 1em;
    height: 1em;
}

.blog-empty {
    max-width: 46rem;
    margin: 2rem auto 0;
    color: var(--bs-secondary-color);
}

.post-list {
    display: grid;
    gap: 1.25rem;
    max-width: 46rem;
    margin: 2.5rem auto 0;
}

.post-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    background: var(--site-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover,
.post-card:focus-within {
    border-color: var(--bs-link-color);
    box-shadow: var(--site-shadow);
}

.post-card-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    object-position: top center;
    border-bottom: 1px solid var(--bs-border-color);
}

.post-card-body {
    padding: 1.5rem;
}

.post-card-title {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    letter-spacing: -0.015em;
}

/* The title's link covers the whole card. */
.post-card-title a {
    color: inherit;
    text-decoration: none;
}

.post-card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.post-card-teaser {
    margin: 0;
    color: var(--bs-secondary-color);
    line-height: 1.6;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.post-category {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* A post shown in the language it was written in: its language beside the
   date, and a line above the text that says so. */
.post-language {
    padding: 0.1rem 0.55rem;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-untranslated {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 46rem;
    margin: 0 0 2rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--bs-border-radius);
    background: var(--tint-blue-bg);
    color: var(--tint-blue-fg);
    font-weight: 600;
}

.post-untranslated svg {
    flex: none;
    width: 1.1em;
    height: 1.1em;
}

.post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-decoration: none;
}

.post-back svg {
    width: 1em;
    height: 1em;
}

.post-cover {
    display: block;
    width: 100%;
    max-width: 62rem;
    height: auto;
    margin: 2rem auto 0;
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--site-shot-shadow);
}

.post-body {
    margin-top: 2.5rem;
    font-size: 1.075rem;
    line-height: 1.7;
}

.post-body h2 {
    margin-top: 2.75rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.post-body h3 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body table,
.post-body blockquote {
    margin-bottom: 1.15rem;
}

.post-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.75rem auto;
    border-radius: var(--bs-border-radius);
}

.post-body pre {
    padding: 1rem 1.25rem;
    border-radius: var(--bs-border-radius);
    background: var(--site-code-bg);
    color: #ffffff;
    font-size: 0.9rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.post-body pre code {
    color: inherit;
}

.post-body blockquote {
    padding-left: 1rem;
    border-left: 3px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
}

.post-body table,
.legal table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.post-body th,
.post-body td,
.legal th,
.legal td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
    text-align: left;
}

/* ---------------------------------------------------------------- legal */

.legal {
    max-width: 46rem;
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.65;
}

.legal h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
}

.legal h2 {
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.legal h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.legal .table-responsive {
    margin-bottom: 1rem;
}

.legal td,
.legal th {
    vertical-align: top;
}

.legal address {
    font-style: normal;
}

/* On the English pages: the German text is the one that counts. */
.legal-binding {
    padding: 0.6rem 0.9rem;
    border-left: 3px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.legal-toc ol {
    padding-left: 1.5rem;
    columns: 2 16rem;
}

/* -------------------------------------------------------------- support */

.support {
    max-width: 46rem;
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.65;
}

.support h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
}

.support .lead {
    font-size: 1.15rem;
    font-weight: 400;
}

.support h2 {
    margin-top: 2.75rem;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

/* The FAQ's groups, set apart from the questions under them. */
.support h3 {
    margin-top: 2.25rem;
    margin-bottom: 0;
    color: var(--tint-blue-fg);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Wide enough for an e-mail address on one line. */
.docs-cards.support-channels {
    grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr));
}

.support-address {
    color: var(--bs-link-color);
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* ----------------------------------------------------------------- docs */

.docs {
    padding-block: clamp(2rem, 5vw, 3.5rem);
}

/* The table of contents sits beside the page and stays put while the page
   scrolls; below the lg breakpoint it folds behind the toggle button. */
@media (min-width: 992px) {
    .docs-sidebar {
        position: sticky;
        top: 5rem;
        align-self: flex-start;
    }
}

.docs-toggle {
    justify-content: flex-start;
}

.docs-toggle[aria-expanded="true"] svg:last-child {
    transform: rotate(180deg);
}

.docs-nav {
    padding-top: 1rem;
}

@media (min-width: 992px) {
    .docs-nav {
        padding-top: 0.4rem;
    }
}

.docs-nav-group {
    margin: 1.5rem 0 0.4rem;
    padding-inline: 0.85rem;
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.docs-nav-group:first-child {
    margin-top: 0;
}

/* Rows with rounded corners, tinted for the current page. */
.docs-nav-link {
    display: block;
    padding: 0.45rem 0.85rem;
    border-radius: 0.5rem;
    color: var(--bs-body-color);
    font-weight: 600;
    text-decoration: none;
}

.docs-nav-link:hover {
    background: var(--site-surface-alt);
    color: var(--bs-emphasis-color);
}

.docs-nav-link.active {
    background: var(--tint-blue-bg);
    color: var(--tint-blue-fg);
}

/* The page itself: prose, kept to a readable measure. */
.docs-page {
    max-width: 46rem;
    line-height: 1.65;
}

.docs-kicker {
    margin-bottom: 0.5rem;
    color: var(--tint-blue-fg);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.docs-page h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.docs-page h1 .badge {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0;
    vertical-align: middle;
}

.docs-page .lead {
    font-size: 1.15rem;
    font-weight: 400;
}

.docs-page h2 {
    margin-top: 2.75rem;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

.docs-page p,
.docs-page ol,
.docs-page ul,
.docs-page dl {
    margin-bottom: 1rem;
}

.docs-placeholder {
    padding: 0.85rem 1.25rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
}

/* The overview's cards, one per guide. */
/* Two to a row on a page of reading width: one per system Levee is built for. */
.docs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.docs-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--site-surface);
    color: var(--bs-body-color);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.docs-card:hover,
.docs-card:focus-visible {
    border-color: var(--bs-link-color);
    box-shadow: var(--site-shadow);
}

.docs-card .feature-icon {
    margin-bottom: 0.25rem;
}

.docs-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

.docs-card-text {
    color: var(--bs-secondary-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* "Your system", once the platform controller has named it. */
.docs-card-yours {
    display: none;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--tint-blue-bg);
    color: var(--tint-blue-fg);
    font-size: 0.7rem;
}

[data-platform-detected="macos"] [data-platform="macos"],
[data-platform-detected="linux"] [data-platform="linux"] {
    border-color: var(--bs-link-color);
}

[data-platform-detected="macos"] [data-platform="macos"] .docs-card-yours,
[data-platform-detected="linux"] [data-platform="linux"] .docs-card-yours {
    display: inline-block;
}

/* Numbered steps, each with its number in a tinted circle. */
.docs-steps {
    padding-left: 0;
    list-style: none;
    counter-reset: step;
}

.docs-steps li {
    position: relative;
    padding-left: 3rem;
    counter-increment: step;
}

.docs-steps li + li {
    margin-top: 1.25rem;
}

.docs-steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--tint-blue-bg);
    color: var(--tint-blue-fg);
    font-weight: 700;
}

.docs-steps p {
    margin-bottom: 0.75rem;
}

/* A line for the terminal, with a button to copy it. The prompt is drawn
   here so it is not part of what the button copies. */
.terminal {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
    padding: 0.75rem 0.75rem 0.75rem 1.25rem;
    border-radius: var(--bs-border-radius);
    background: var(--site-code-bg);
    color: #ffffff;
    box-shadow: var(--site-shadow);
}

.terminal pre {
    flex: 1;
    margin: 0;
    color: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    /* A long address wraps rather than scrolls: the button copies the whole
       line anyway, and nothing should be hidden on a phone. */
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.terminal pre::before {
    content: "$ ";
    color: var(--neutral-400);
    user-select: none;
}

/* A line for a settings file rather than a shell: no prompt. */
.terminal-plain pre::before {
    content: none;
}

.terminal .btn {
    flex: none;
    --bs-btn-color: var(--neutral-200);
    --bs-btn-border-color: rgba(255, 255, 255, 0.18);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.08);
    --bs-btn-hover-border-color: rgba(255, 255, 255, 0.28);
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: rgba(255, 255, 255, 0.12);
    --bs-btn-active-border-color: rgba(255, 255, 255, 0.28);
}

.terminal .btn.is-copied {
    --bs-btn-color: #8ff0a4;
    --bs-btn-border-color: rgba(143, 240, 164, 0.4);
}

/* Callouts: a tinted box with an icon, for the one thing on a page the
   reader should not miss. */
.docs-callout {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin: 1.25rem 0 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--bs-border-radius);
}

.docs-callout svg {
    flex: none;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.15rem;
}

.docs-callout p {
    margin-bottom: 0.5rem;
}

.docs-callout ul {
    padding-left: 1.1rem;
    margin-bottom: 0;
}

.docs-callout-note {
    background: var(--tint-blue-bg);
}

.docs-callout-note svg {
    color: var(--tint-blue-fg);
}

.docs-callout-warning {
    background: var(--tint-yellow-bg);
}

.docs-callout-warning svg {
    color: var(--tint-yellow-fg);
}

/* The Stable/Beta switch, and what it does: the page carries both channels'
   pieces, and the one not chosen is hidden. Same trick as .d-none, hence the
   !important - the pieces have display rules of their own. */
.docs-channel {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--site-surface);
}

.docs-channel-label {
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

.docs-channel .btn {
    --bs-btn-active-bg: var(--tint-blue-bg);
    --bs-btn-active-color: var(--tint-blue-fg);
    --bs-btn-active-border-color: var(--bs-border-color);
}

.docs-channel-hint {
    margin-top: 0.75rem;
    color: var(--bs-secondary-color);
}

[data-channel-current-value="stable"] [data-channel="beta"],
[data-channel-current-value="beta"] [data-channel="stable"] {
    display: none !important;
}

/* The system switch works the same way, but only once the os controller can
   run: without scripts there is no switching, so every system's pieces stay
   on the page, and the switch itself is left out. */
.js [data-os-current-value="macos"] [data-os]:not([data-os="macos"]),
.js [data-os-current-value="linux"] [data-os]:not([data-os="linux"]) {
    display: none !important;
}

html:not(.js) .docs-os {
    display: none;
}

/* Without the switch, each system's piece says which system it is for. */
.docs-os-name {
    margin: 1.25rem 0 0.25rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

.js .docs-os-name {
    display: none;
}

/* Question and answer pairs. */
.docs-faq dt {
    margin-top: 1.25rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

.docs-faq dd {
    margin: 0.35rem 0 0;
}

/* --------------------------------------------------------------- footer */

.site-footer {
    background: var(--site-footer-bg);
    color: var(--site-footer-color);
}

.site-footer a {
    color: var(--site-footer-color);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--site-footer-heading);
    text-decoration: underline;
}

.footer-brand {
    color: var(--site-footer-heading) !important;
    font-size: clamp(2rem, 4vw, 3rem);
}

.footer-tagline {
    max-width: 24rem;
    font-size: 1.1rem;
    line-height: 1.55;
}

.footer-heading {
    margin-bottom: 0.75rem;
    color: var(--site-footer-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-links li + li {
    margin-top: 0.4rem;
}

.footer-bottom {
    border-top: 1px solid var(--site-footer-rule);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--site-footer-heading);
    font-weight: 600;
}

/* The language switch: both languages in one outlined group, as tall as a
   small button, the current one filled. */
.lang-switch {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: 0.5rem;
}

.lang-switch a {
    padding: 0.2rem 0.55rem;
    border-radius: 0.375rem;
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
    text-decoration: none;
}

.lang-switch a:hover {
    color: var(--bs-emphasis-color);
}

.lang-switch a[aria-current] {
    background: rgba(var(--bs-emphasis-color-rgb), 0.08);
    color: var(--bs-emphasis-color);
}

.lang-switch a:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.lang-switch-footer {
    border-color: var(--site-footer-rule);
}

.site-footer .lang-switch a {
    color: var(--site-footer-color);
    font-weight: 700;
}

.site-footer .lang-switch a:hover,
.site-footer .lang-switch a[aria-current] {
    color: var(--site-footer-heading);
}

.site-footer .lang-switch a[aria-current] {
    background: rgba(255, 255, 255, 0.1);
}

/* Anchored sections land below the sticky header. */
[id] {
    scroll-margin-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
    .site-header .nav-link::after {
        transition: none;
    }
}
