/* v5 — light, flat, solid-color design system. No gradients, no glass,
   no glow. Written from scratch; does not import v3.css or v4.css. */

:root {
    --bg: #ffffff;
    --bg-subtle: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --accent-soft: #f0fdfa;
    --paid: #92400e;
    --paid-soft: #fffbeb;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    --maxw: 1100px;
    --maxw-prose: 760px;
    --header-height: 60px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 16px;
    line-height: 1.6;
    /* Inherited, so one rule covers every heading/paragraph/span on the
       site: a long database-driven title, resource name, or job name can
       never force horizontal overflow past a container's padding. */
    overflow-wrap: break-word;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover, a:focus-visible {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.v5-transition,
.v5-card,
.v5-btn,
.v5-tag,
.v5-nav-link,
.v5-search-input,
.v5-dropdown-item {
    transition: border-color 120ms, background-color 120ms, box-shadow 120ms, color 120ms;
}

/* --- Layout ------------------------------------------------------------- */

.v5-container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
    /* Belt-and-suspenders: the rules above stop long dynamic content
       (titles, resource names) from forcing grid/flex children wider than
       their track, but if anything still does, this keeps it from bleeding
       past the container's own edge and visually erasing the side margin. */
    overflow-x: hidden;
}

.v5-prose {
    max-width: var(--maxw-prose);
    margin: 0 auto;
    padding: 0 1.5rem;
    overflow-x: hidden;
}

.v5-page {
    padding: 2rem 0 4rem;
}

.v5-page-header {
    margin-bottom: 2rem;
}

.v5-page-header h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}

.v5-page-header p {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0;
    max-width: 65ch;
}

/* --- Header / nav -------------------------------------------------------- */

.v5-header {
    position: relative;
    height: var(--header-height);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.v5-header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.v5-wordmark {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    white-space: nowrap;
}

.v5-wordmark:hover {
    text-decoration: none;
    color: var(--accent);
}

.v5-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.v5-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: var(--radius);
}

.v5-nav-item:hover,
.v5-nav-item.v5-open {
    background: var(--bg-subtle);
}

.v5-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    background: transparent;
}

/* Items with a caret button need the link's right padding to hand off to
   the caret's own padding, so the two together read as one evenly-padded
   pill instead of a lopsided one. Solo links (About) stay symmetric. */
.v5-nav-item:has(.v5-nav-caret-btn) .v5-nav-link {
    padding-right: 0.35rem;
}

.v5-nav-item:hover .v5-nav-link,
.v5-nav-item.v5-open .v5-nav-link {
    text-decoration: none;
}

.v5-nav-caret-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem 0.5rem 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

.v5-nav-link.v5-active {
    color: var(--accent);
}

.v5-nav-caret {
    font-size: 0.65rem;
    color: var(--muted);
}

.v5-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    min-width: 240px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.4rem;
    z-index: 30;
}

.v5-nav-item.v5-open .v5-dropdown {
    display: block;
}

.v5-dropdown-item {
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.92rem;
}

.v5-dropdown-item:hover {
    background: var(--bg-subtle);
    text-decoration: none;
}

.v5-dropdown-item .v5-dropdown-item-desc {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 0.1rem;
}

.v5-header-search {
    flex: 0 0 auto;
}

.v5-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 1rem;
}

/* --- Breadcrumb ---------------------------------------------------------- */

.v5-breadcrumb {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1rem 1.5rem 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.v5-breadcrumb a {
    color: var(--muted);
}

.v5-breadcrumb a:hover {
    color: var(--accent);
}

.v5-breadcrumb-sep {
    margin: 0 0.35rem;
    color: var(--border);
}

/* --- Search -------------------------------------------------------------- */

.v5-search {
    position: relative;
}

.v5-search-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
}

.v5-search-input:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.v5-header-search .v5-search-input {
    width: 220px;
}

.v5-search-hero .v5-search-input {
    padding: 0.85rem 1.1rem;
    font-size: 1.05rem;
}

.v5-search-suggest {
    display: none;
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 40;
    overflow: hidden;
}

.v5-search-suggest.v5-open {
    display: block;
}

.v5-search-suggest-item {
    display: block;
    padding: 0.6rem 0.85rem;
    color: var(--text);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.v5-search-suggest-item:last-child {
    border-bottom: none;
}

.v5-search-suggest-item:hover {
    background: var(--bg-subtle);
    text-decoration: none;
}

.v5-search-suggest-type {
    color: var(--muted);
    font-size: 0.78rem;
    margin-left: 0.4rem;
}

.v5-search-results-group {
    margin-bottom: 2rem;
}

.v5-search-results-group h2 {
    font-size: 1.1rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.75rem;
}

.v5-search-result {
    display: block;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
}

.v5-search-result:hover {
    text-decoration: none;
}

.v5-search-result-title {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.02rem;
}

.v5-search-result-desc {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 0.15rem;
}

/* --- Landing page --------------------------------------------------------- */

.v5-landing {
    min-height: calc(100vh - 3rem);
    min-height: calc(100dvh - 3rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.v5-landing-title {
    font-size: clamp(2.25rem, 5vw, 3rem);
    margin: 0 0 0.5rem;
}

.v5-landing-tagline {
    color: var(--muted);
    font-size: 1.1rem;
    margin: 0 0 2rem;
    max-width: 42ch;
}

.v5-search-hero {
    width: 100%;
    max-width: 520px;
    margin-bottom: 2.5rem;
}

.v5-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 900px;
}

.v5-pillar-btn {
    display: block;
    text-align: left;
    padding: 1.25rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
}

.v5-pillar-btn:hover,
.v5-pillar-btn:focus-visible {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.v5-pillar-btn-label {
    display: block;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.v5-pillar-btn-sub {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

@media (max-width: 720px) {
    .v5-pillars {
        grid-template-columns: 1fr;
    }
}

/* --- Cards / grids --------------------------------------------------------- */

.v5-card-grid {
    display: grid;
    /* Plain minmax(260px, 1fr) lets a track's minimum stay 260px even when
       the viewport is narrower than that (e.g. content min-content width
       running past a long title) — the track, and the whole grid, then
       overflows past the container's own padding instead of respecting it.
       min(260px, 100%) caps the minimum at whatever's actually available. */
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: 1rem;
}

.v5-card {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    color: var(--text);
    overflow-wrap: break-word;
}

.v5-card:hover,
.v5-card:focus-visible {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.v5-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
}

.v5-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.v5-card-meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}

/* --- Buttons / tags -------------------------------------------------------- */

.v5-btn {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    border: 1px solid var(--accent);
}

.v5-btn:hover,
.v5-btn:focus-visible {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    text-decoration: none;
    color: #fff;
}

.v5-btn-secondary {
    background: var(--bg);
    color: var(--accent);
    border: 1px solid var(--border);
}

.v5-btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--accent);
    color: var(--accent);
}

.v5-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
}

.v5-tag-paid {
    background: var(--paid-soft);
    color: var(--paid);
}

.v5-tag-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}

/* --- Prose (articles, blog posts) ------------------------------------------ */

.v5-article h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}

.v5-article h2 {
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem;
}

.v5-article h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.5rem;
}

.v5-article p {
    margin: 0 0 1rem;
}

.v5-article ul, .v5-article ol {
    margin: 0 0 1rem;
    padding-left: 1.4rem;
}

.v5-article-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Legacy blog article markup backfilled verbatim from old template <article>
   blocks (kasparovs-hypothesis, dr-nestler-vs-chatgpt, etc.) carries these
   bare class names with no stylesheet of its own once embedded here. */
.v5-article .category {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.v5-article .meta {
    display: flex;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.v5-article .note {
    background: var(--bg-subtle);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    font-size: 0.92rem;
}

.v5-article .video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-subtle);
    margin: 1rem 0;
}

.v5-article .video-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.v5-article .watch-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
}

.v5-article .watch-btn:hover {
    background: var(--accent-hover);
    color: #fff;
    text-decoration: none;
}

/* --- Disclosure rows (discounts, reports, blog list) ----------------------- */

.v5-disclosure-list {
    border-top: 1px solid var(--border);
}

.v5-disclosure {
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 0;
}

.v5-disclosure summary {
    cursor: pointer;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-weight: 600;
    list-style: none;
    /* A long tool/report name plus a cost badge, laid out as flex items with
       the browser default min-width:auto, can refuse to shrink below their
       own content width and push the row past the container's padding.
       Letting the row wrap keeps every child inside the container. */
    flex-wrap: wrap;
    overflow-wrap: break-word;
}

.v5-disclosure summary::-webkit-details-marker {
    display: none;
}

.v5-disclosure summary::before {
    content: "+";
    color: var(--accent);
    font-weight: 700;
    width: 1rem;
}

.v5-disclosure[open] summary::before {
    content: "\2212";
}

.v5-disclosure-sub {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.88rem;
}

.v5-disclosure-body {
    padding: 0.75rem 0 0 1.6rem;
    color: var(--text);
    font-size: 0.92rem;
}

.v5-disclosure-body p {
    margin: 0 0 0.6rem;
}

/* --- Jobs widget ------------------------------------------------------------ */

.v5-jobs-disclaimer {
    margin-bottom: 1.5rem;
}

.v5-jobs-disclaimer-btn {
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.7rem 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.v5-jobs-disclaimer-content {
    display: none;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 0.9rem 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.v5-jobs-disclaimer-content.v5-open {
    display: block;
}

.v5-jobs-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 800px) {
    .v5-jobs-layout {
        grid-template-columns: 1fr;
    }
}

.v5-jobs-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.v5-jobs-label {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.5rem;
}

.v5-jobs-select {
    position: relative;
}

.v5-jobs-select-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-size: 0.92rem;
}

.v5-jobs-select-trigger > span:first-child {
    /* Flex items default to min-width:auto (their own content width) —
       without this, a long job-role name refuses to shrink and pushes the
       trigger, and its container, wider than the page. */
    min-width: 0;
    overflow-wrap: break-word;
    text-align: left;
}

.v5-jobs-select-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 20;
}

.v5-jobs-select.v5-open .v5-jobs-select-menu {
    display: block;
}

.v5-jobs-select-option {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.8rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.88rem;
    cursor: pointer;
}

.v5-jobs-select-option:hover,
.v5-jobs-select-option.v5-active {
    background: var(--bg-subtle);
}

.v5-jobs-task-id {
    color: var(--muted);
    flex: 0 0 auto;
}

.v5-jobs-empty {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 1rem 0;
}

.v5-jobs-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin: 0.75rem 0;
}

@media (max-width: 560px) {
    .v5-jobs-grid-3 {
        grid-template-columns: 1fr;
    }
}

.v5-jobs-ai-label {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 0.3rem;
}

.v5-jobs-class-box {
    border-radius: var(--radius);
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
}

.v5-jobs-class-title {
    margin: 0;
    font-weight: 700;
    font-size: 0.92rem;
}

.v5-jobs-class-sub {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.v5-jobs-class-replace {
    background: #fef2f2;
    border-color: #fecaca;
}

.v5-jobs-class-replace .v5-jobs-class-title {
    color: #b91c1c;
}

.v5-jobs-class-augment {
    background: var(--accent-soft);
    border-color: #99f6e4;
}

.v5-jobs-class-augment .v5-jobs-class-title {
    color: var(--accent-hover);
}

.v5-jobs-class-human {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.v5-jobs-class-human .v5-jobs-class-title {
    color: #1d4ed8;
}

.v5-jobs-class-unknown {
    background: var(--bg-subtle);
}

.v5-jobs-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.7rem 0.85rem;
    font-size: 0.9rem;
}

.v5-jobs-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin: 0.9rem 0 0.4rem;
}

.v5-jobs-dcwf-badge {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

/* --- Video list -------------------------------------------------------------- */

.v5-video-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.v5-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-subtle);
    margin-bottom: 0.75rem;
}

.v5-video-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.v5-video-why {
    background: var(--accent-soft);
    border-radius: var(--radius);
    padding: 0.7rem 0.9rem;
    margin-top: 0.6rem;
    font-size: 0.9rem;
}

.v5-video-why h4 {
    margin: 0 0 0.3rem;
    font-size: 0.85rem;
    color: var(--accent-hover);
}

/* --- Footer ------------------------------------------------------------------ */

.v5-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.v5-footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.v5-footer-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.v5-footer-links a {
    color: var(--muted);
    font-size: 0.88rem;
}

.v5-footer-links a:hover {
    color: var(--accent);
}

.v5-footer-copy {
    color: var(--muted);
    font-size: 0.8rem;
    margin: 0;
}

/* --- News (full-bleed iframe) ------------------------------------------------ */

.v5-news-embed {
    border: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    display: block;
}

/* News is the one page allowed to escape the centered column and go full-bleed. */
.v5-container.v5-page:has(> .v5-news-embed) {
    max-width: none;
    padding: 0;
}

/* --- Workshop pager ----------------------------------------------------------- */

.v5-pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.v5-pager a {
    display: block;
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    color: var(--text);
}

.v5-pager a:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.v5-pager-next {
    text-align: right;
}

.v5-pager-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

/* --- Mobile nav ---------------------------------------------------------------- */

@media (max-width: 860px) {
    .v5-nav {
        display: none;
    }

    .v5-header-search {
        display: none;
    }

    .v5-menu-toggle {
        display: inline-block;
    }

    .v5-header-inner {
        justify-content: space-between;
    }

    .v5-mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        /* iOS Safari's address bar/toolbar grow and shrink as you scroll, and
           100vh is measured against the viewport with toolbars fully collapsed
           — so a max-height in 100vh clips real content behind the toolbar
           until the user scrolls enough to trigger it away. 100dvh tracks the
           viewport that's actually visible right now; vh is the fallback for
           browsers without dvh support. */
        max-height: calc(100vh - var(--header-height));
        max-height: calc(100dvh - var(--header-height));
        overflow-y: auto;
        background: var(--bg);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        padding: 1rem 1.5rem 1.5rem;
        z-index: 50;
    }

    .v5-mobile-menu.v5-open {
        display: block;
    }

    .v5-mobile-menu .v5-mobile-search {
        margin-bottom: 1rem;
    }

    .v5-mobile-group {
        margin-bottom: 1rem;
    }

    .v5-mobile-group-title {
        font-weight: 700;
        margin-bottom: 0.4rem;
    }

    .v5-mobile-group a {
        display: block;
        padding: 0.4rem 0;
        color: var(--text);
    }

    .v5-pillars {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 861px) {
    .v5-mobile-menu {
        display: none !important;
    }
}
