/* ==========================================================================
   Evora — marketing site
   Apple-style editorial layout, DARK theme: black + Evora-green shades.
   Design tokens mirror the SwiftUI system (EvoraColor / Typography / Spacing).
   ========================================================================== */

:root {
    /* Brand colors — exact values from Evora Assets.xcassets/Colors */
    --green:        #51B164;
    --green-dark:   #449957;
    --green-light:  #69C678;
    --coral:        #F67D6F;   /* Accent / ProteinRing */
    --blue:         #4CB8EF;   /* HydrationRing */
    --warning:      #F69E4F;

    /* Surfaces — dark theme: black + Evora-green shades */
    --bg:           #0A0C0B;   /* near-black, faint green undertone */
    --bg-2:         #0E120F;   /* deep green-black for alternating bands */
    --surface:      #121712;   /* card / tile — dark green-tinted */
    --surface-2:    #18211A;   /* raised surface / hover */
    --hairline:     rgba(105, 198, 120, 0.14);   /* green-tinted borders */

    --ink:          #F2F4F1;   /* primary text on dark */
    --ink-2:        #9BA89E;   /* secondary text (green-grey) */
    --ink-on-dark:  #F2F4F1;
    --ink-2-on-dark:#9BA89E;

    /* Type scale — fluid, tight tracking like SF Pro Display */
    --fs-display: clamp(3rem, 8vw, 6.5rem);
    --fs-h1:      clamp(2.4rem, 5.5vw, 4.5rem);
    --fs-h2:      clamp(2rem, 4vw, 3.25rem);
    --fs-lead:    clamp(1.25rem, 2.2vw, 1.7rem);

    /* Spacing */
    --gutter: clamp(20px, 5vw, 40px);
    --section-y: clamp(80px, 12vh, 160px);

    --radius: 28px;
    --content-max: 1180px;
    --text-max: 720px;

    color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
    margin: 0;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont,
                 "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-light); text-decoration: none; }

h1, h2, h3 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

/* Green-tinted scrollbars that read on black */
html { scrollbar-color: rgba(105, 198, 120, 0.45) var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: rgba(105, 198, 120, 0.32);
    border-radius: 999px;
    border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(105, 198, 120, 0.55); }

::selection { background: rgba(81, 177, 100, 0.35); color: #fff; }

.wrap {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.center { text-align: center; }
.text-block { max-width: var(--text-max); margin-inline: auto; }

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Nav — dark, translucent, sits above everything
   -------------------------------------------------------------------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 52px;
    display: flex;
    align-items: center;
    background: rgba(10, 12, 11, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }

/* Hamburger toggle — hidden on desktop, shown on mobile via the breakpoint. */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    margin: -8px -8px -8px 0;
    padding: 0 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.brand img { width: 24px; height: 24px; border-radius: 6px; }

.nav-links { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); font-size: 0.9rem; font-weight: 400; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 500; }
.nav-cta { color: var(--green-light) !important; font-weight: 500 !important; }
/* Footer language picker — a popup opened from the footer. */
.lang-picker { position: relative; }
/* NOTE: do not set `display` on <summary> — in WebKit that disables the native
   click-to-toggle. Hide the marker and lay out an inner wrapper instead. */
.lang-picker > summary {
    list-style: none;
    cursor: pointer;
    color: var(--ink-2);
    font-size: 0.9rem;
    user-select: none;
}
.lang-picker > summary::-webkit-details-marker { display: none; }
.lang-picker > summary::marker { content: ""; }
.lang-picker > summary:hover { color: var(--ink); }
.lang-current { display: inline-flex; align-items: center; gap: 8px; }
.lang-current i, .lang-current svg { width: 16px; height: 16px; }
.lang-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    padding: 6px;
    background: rgba(16, 19, 17, 0.98);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.5);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 1100;
}
.lang-menu a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 9px;
    color: var(--ink-2);
}
.lang-menu a:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
.lang-menu a.active { color: var(--ink); }
.lang-menu a.active .lang-code { color: var(--green-light); }
.lang-menu .lang-name { font-size: 0.95rem; }
.lang-menu .lang-code { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Buttons — Apple pill links
   -------------------------------------------------------------------------- */
.link-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: transform 0.2s, opacity 0.2s, background 0.2s, color 0.2s;
}
.link-pill:active { transform: scale(0.97); }

.fill {
    background: var(--green);
    color: #07120B;
}
.fill:hover { background: var(--green-light); color: #07120B; }

/* primary CTA on dark — bright green pill */
.fill-light {
    background: var(--green);
    color: #07120B;
    font-weight: 600;
}
.fill-light:hover { background: var(--green-light); }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--green-light);
}
.text-link::after { content: "›"; font-size: 1.3em; line-height: 0; transform: translateY(1px); transition: transform 0.2s; }
.text-link:hover::after { transform: translate(3px, 1px); }
.text-link.on-dark { color: var(--green-light); }

/* --------------------------------------------------------------------------
   HERO — full-bleed, oversized centered type, green glow
   -------------------------------------------------------------------------- */
.hero {
    background: radial-gradient(120% 90% at 50% -10%, #16271C 0%, var(--bg) 58%);
    color: var(--ink);
    text-align: center;
    padding-top: clamp(64px, 12vh, 130px);
    overflow: hidden;
}

.hero .eyebrow {
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--green-light);
    margin-bottom: 14px;
}

.hero h1 {
    font-size: var(--fs-display);
    font-weight: 600;
    letter-spacing: -0.045em;
    margin-bottom: 22px;
}
.hero h1 .grad {
    background: linear-gradient(120deg, var(--green-light) 0%, var(--blue) 50%, var(--coral) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .sub {
    font-size: var(--fs-lead);
    font-weight: 400;
    color: var(--ink-2);
    max-width: 30ch;
    margin: 0 auto 30px;
    line-height: 1.35;
}

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; align-items: center; margin-bottom: clamp(48px, 8vh, 90px); }

.hero-device {
    margin: 0 auto;
    max-width: 360px;
    position: relative;
}
.hero-device img {
    width: 100%;
    filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.6));
    border-radius: 44px;
}
.hero-device::after {
    content: "";
    position: absolute;
    inset: 30% 5% -5%;
    background: radial-gradient(circle, rgba(81,177,100,0.5), transparent 70%);
    filter: blur(60px);
    z-index: -1;
}

/* --------------------------------------------------------------------------
   Section heads
   -------------------------------------------------------------------------- */
.section { padding-block: var(--section-y); }
.section.tight { padding-block: clamp(48px, 8vh, 100px); }
.section.alt { background: var(--bg-2); }

.kicker {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 500;
    color: var(--green-light);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}
.headline {
    font-size: var(--fs-h2);
    font-weight: 600;
    letter-spacing: -0.035em;
    color: var(--ink);
}
.headline .muted { color: var(--ink-2); }
.section-sub {
    font-size: var(--fs-lead);
    color: var(--ink-2);
    margin-top: 18px;
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Editorial feature rows — alternating, big imagery
   -------------------------------------------------------------------------- */
.story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(32px, 6vw, 96px);
    padding-block: clamp(48px, 9vh, 120px);
}
.story.flip .story-media { order: 2; }

.story-copy .kicker { color: var(--coral); }
.story-copy h2 { font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.04em; color: var(--ink); }
.story-copy p { font-size: var(--fs-lead); color: var(--ink-2); margin: 18px 0 0; line-height: 1.4; max-width: 30ch; }
.story-copy .text-link { margin-top: 24px; }

.story-media { display: flex; justify-content: center; }
.story-media img { max-height: 600px; width: auto; }

/* tinted scene behind a phone — dark green-tinted glass */
.scene {
    border-radius: var(--radius);
    padding: clamp(36px, 6vw, 80px) clamp(28px, 5vw, 64px);
    width: 100%;
    display: flex;
    justify-content: center;
    border: 1px solid var(--hairline);
}
.scene-green { background: radial-gradient(120% 120% at 30% 20%, rgba(81,177,100,0.22), rgba(18,23,18,0.9)); }
.scene-coral { background: radial-gradient(120% 120% at 30% 20%, rgba(246,125,111,0.20), rgba(18,23,18,0.9)); }
.scene-blue  { background: radial-gradient(120% 120% at 30% 20%, rgba(76,184,239,0.20),  rgba(18,23,18,0.9)); }
.scene img { max-height: 540px; }

/* Phone screenshots are exported with their own device frame, so they sit on
   the section background directly — no tinted scene box. */
.phone-shot { max-height: 600px; width: auto; display: block; }

/* --------------------------------------------------------------------------
   Full-bleed background media (image or video) for sections
   -------------------------------------------------------------------------- */
.media-section {
    position: relative;
    isolation: isolate;          /* contain stacking for the absolute layers */
    overflow: hidden;
    color: var(--ink);
}
.media-section .bg-media,
.media-section .bg-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
}
.media-section .bg-overlay { z-index: -1; }
.media-section .bg-media-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
/* Darkening overlay — keeps text legible over any photo/video. A vertical
   gradient (denser at the bottom) reads better than a flat wash. */
.bg-overlay {
    background:
        linear-gradient(180deg, rgba(8,10,9,calc(var(--ov) * 0.55)) 0%,
                                 rgba(8,10,9,var(--ov)) 100%);
}
.bg-overlay.ov-light  { --ov: 0.35; }
.bg-overlay.ov-medium { --ov: 0.55; }
.bg-overlay.ov-strong { --ov: 0.78; }

/* Content sits above the media/overlay. */
.media-section-inner { position: relative; z-index: 1; }

/* Text shown over media is always light, with a soft shadow for contrast. */
.on-media,
.on-media h1, .on-media h2, .on-media h3, .on-media p { color: var(--ink-on-dark); }
.on-media p, .on-media .section-sub { color: rgba(242,244,241,0.86); }
.on-media .headline, .on-media h2, .on-media h1 { text-shadow: 0 2px 24px rgba(0,0,0,0.4); }
.on-media .kicker { color: var(--green-light); }

/* Dedicated Media Section spacing + optional full-height variant. */
.media-section { padding-block: clamp(80px, 16vh, 200px); }
.media-section.media-tall {
    min-height: 100svh;
    display: flex;
    align-items: center;
}
/* Hero with a media background fills the viewport behind the hero content. */
.hero.hero-media { position: relative; isolation: isolate; overflow: hidden; }
.hero.hero-media .bg-media { position: absolute; inset: 0; z-index: -2; }
.hero.hero-media .bg-overlay { position: absolute; inset: 0; z-index: -1; }
.hero.hero-media .bg-media-el { width: 100%; height: 100%; object-fit: cover; }

/* By default the looping video shows and its poster image is hidden. */
.bg-video-poster { display: none; }

/* Respect users who prefer less motion: hide the moving video, show the still
   poster instead (so the section still has its background). */
@media (prefers-reduced-motion: reduce) {
    .bg-video { display: none; }
    .bg-video-poster { display: block; }
}

/* ring chips */
.rings { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.ring { display: flex; align-items: center; gap: 14px; font-size: 1.1rem; color: var(--ink); }
.ring b { font-weight: 500; }
.ring .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 4px rgba(255,255,255,0.05); }
.dot.cal { background: var(--green); }
.dot.pro { background: var(--coral); }
.dot.hyd { background: var(--blue); }

/* --------------------------------------------------------------------------
   Feature mosaic — bento tiles
   -------------------------------------------------------------------------- */
.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(14px, 1.5vw, 22px);
    margin-top: clamp(40px, 6vh, 72px);
}
.tile {
    background: var(--surface);
    border-radius: 24px;
    padding: clamp(26px, 3vw, 40px);
    border: 1px solid var(--hairline);
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), background 0.4s, border-color 0.4s;
}
.tile:hover { transform: translateY(-6px); background: var(--surface-2); border-color: rgba(105,198,120,0.28); }
.tile.span-2 { grid-column: span 2; }
/* Single-colour line icon — no frame, sits in the tile's ink colour. */
.tile .ic {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--ink);
    margin-bottom: 18px;
}
.ic i, .ic svg { width: 30px; height: 30px; stroke-width: 1.75; }
.tile h3 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 8px; color: var(--ink); }
.tile p { color: var(--ink-2); margin: 0; font-size: 1.05rem; line-height: 1.4; }

/* --------------------------------------------------------------------------
   Stats — large numerals on a deep green-black band
   -------------------------------------------------------------------------- */
.stats-band {
    background: radial-gradient(120% 140% at 50% 0%, #14241A, var(--bg));
    color: var(--ink);
    border-block: 1px solid var(--hairline);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(32px, 5vw, 80px);
    text-align: center;
}
.stat .num {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 600;
    letter-spacing: -0.05em;
    background: linear-gradient(120deg, var(--green-light), var(--blue));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat .cap { color: var(--ink-2); font-size: 1.05rem; margin-top: 6px; }

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */
.cta {
    text-align: center;
    background: radial-gradient(110% 120% at 50% 0%, #16271C, var(--bg));
    color: var(--ink);
}
.cta h2 { font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.04em; color: var(--ink); }
.cta p { font-size: var(--fs-lead); color: var(--ink-2); margin: 18px auto 32px; max-width: 34ch; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    border-top: 1px solid var(--hairline);
    padding-block: 28px;
    color: var(--ink-2);
    font-size: 0.85rem;
    background: var(--bg);
}
.footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--ink); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Generic content page + Markdown rendering
   -------------------------------------------------------------------------- */
.page {
    max-width: var(--text-max);
    margin-inline: auto;
    padding: var(--section-y) var(--gutter);
}
.page > h1 { font-size: var(--fs-h1); margin-bottom: 32px; color: var(--ink); }

/* Markdown body — output of Umbraco.MarkdownEditor */
.markdown { color: var(--ink-2); font-size: 1.12rem; line-height: 1.7; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { color: var(--ink); letter-spacing: -0.03em; }
.markdown h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 24px; }
.markdown h2 { font-size: 1.8rem; margin: 48px 0 16px; }
.markdown h3 { font-size: 1.35rem; margin: 36px 0 12px; }
.markdown p { margin: 0 0 20px; }
.markdown a { color: var(--green-light); text-decoration: underline; text-underline-offset: 2px; }
.markdown a:hover { color: var(--green); }
.markdown strong { color: var(--ink); font-weight: 600; }
.markdown ul, .markdown ol { margin: 0 0 20px; padding-left: 1.4em; }
.markdown li { margin: 6px 0; }
.markdown li::marker { color: var(--green); }
.markdown blockquote {
    margin: 28px 0;
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--green);
    color: var(--ink);
    font-style: italic;
}
.markdown code {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.92em;
    font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--green-light);
}
.markdown pre {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 0 0 24px;
}
.markdown pre code { background: none; border: none; padding: 0; color: var(--ink); }
.markdown img { border-radius: 16px; margin: 28px 0; border: 1px solid var(--hairline); }
.markdown hr { border: none; border-top: 1px solid var(--hairline); margin: 40px 0; }
.markdown table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 1rem; }
.markdown th, .markdown td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--hairline); }
.markdown th { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   Block Grid — brand styling over Umbraco's .umb-block-grid scaffold
   -------------------------------------------------------------------------- */
.umb-block-grid {
    display: grid;
    grid-template-columns: repeat(var(--umb-block-grid--grid-columns, 12), minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
}
.umb-block-grid__layout-container { display: contents; }
.umb-block-grid__layout-item { grid-column: span var(--umb-block-grid--item-column-span, 12); }
.umb-block-grid__area-container {
    display: grid;
    grid-template-columns: repeat(var(--umb-block-grid--area-grid-columns, 12), minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
}
.umb-block-grid__area { grid-column: span var(--umb-block-grid--area-column-span, 12); }

/* the page wrapper that hosts a grid */
.evora-grid { max-width: var(--content-max); margin-inline: auto; padding: var(--section-y) var(--gutter); }

/* shared block spacing */
.block { margin-block: clamp(16px, 3vh, 32px); }
.block-richtext { max-width: var(--text-max); margin-inline: auto; }
.block-image figcaption { color: var(--ink-2); font-size: 0.95rem; text-align: center; margin-top: 12px; }
.block-cta h2 { font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.04em; color: var(--ink); }
.block-cta p { font-size: var(--fs-lead); color: var(--ink-2); margin: 18px auto 28px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 880px) {
    .story { grid-template-columns: 1fr; text-align: center; }
    .story.flip .story-media { order: 0; }
    .story-copy p { max-width: none; margin-inline: auto; }
    .story-copy .rings { align-items: center; }
    .bento { grid-template-columns: 1fr; }
    .tile.span-2 { grid-column: span 1; }
    .stats-grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 720px) {
    /* Show the hamburger; collapse the links into a toggleable drawer that
       drops down below the sticky bar. */
    .nav-burger { display: flex; }

    .nav-links {
        position: fixed;
        top: 52px;                 /* under the nav bar */
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0 max(8px, env(safe-area-inset-bottom));
        background: rgba(10, 12, 11, 0.96);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid var(--hairline);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);

        /* Hidden until toggled. */
        max-height: calc(100dvh - 52px);
        overflow-y: auto;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }
    .nav-toggle:checked ~ .nav-links {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        display: block;
        padding: 14px clamp(20px, 6vw, 32px);
        font-size: 1.05rem;
    }
    .nav-links li { width: 100%; }

    /* Animate the burger into an X when open. */
    .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
    .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --------------------------------------------------------------------------
   Support page — intro, help-article list, and the issue-report form
   (EvoraSupportForm.cshtml)
   -------------------------------------------------------------------------- */

/* Intro markdown shares the .markdown look without needing that class. */
.support-intro { color: var(--ink-2); font-size: 1.12rem; line-height: 1.7; }
.support-intro p { margin: 0 0 20px; }
.support-intro a { color: var(--green-light); text-decoration: underline; text-underline-offset: 2px; }
.support-intro a:hover { color: var(--green); }
.support-intro strong { color: var(--ink); font-weight: 600; }

.support h2 {
    color: var(--ink);
    font-size: 1.6rem;
    letter-spacing: -0.03em;
    margin: 56px 0 20px;
}

/* Help-article list — tappable cards linking to the wiki sub-pages. */
.support-article-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.support-article-list li { margin: 0; }
.support-article-list a {
    display: block;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.support-article-list a:hover {
    background: var(--surface-2);
    border-color: rgba(105, 198, 120, 0.3);
    transform: translateY(-2px);
}

/* The issue-report form. */
.support-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: clamp(20px, 4vw, 36px);
}
.support-field { display: flex; flex-direction: column; gap: 8px; }
.support-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.support-field label {
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 500;
}
.support-field small { color: var(--ink-2); font-size: 0.85rem; }

.support-form input,
.support-form select,
.support-form textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: var(--bg-2);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 12px 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.support-form textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.support-form input::placeholder,
.support-form textarea::placeholder { color: var(--ink-2); opacity: 0.7; }
.support-form input:focus,
.support-form select:focus,
.support-form textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(81, 177, 100, 0.2);
}
.support-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2369C678' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
/* File inputs — restyle the native button to match. */
.support-form input[type="file"] { padding: 10px 14px; cursor: pointer; }
.support-form input[type="file"]::file-selector-button {
    font: inherit;
    font-weight: 500;
    color: var(--bg);
    background: var(--green-light);
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    margin-right: 14px;
    cursor: pointer;
    transition: background 0.18s ease;
}
.support-form input[type="file"]::file-selector-button:hover { background: var(--green); }

/* Submit button — solid pill, brand green. */
.support-submit {
    align-self: flex-start;
    font: inherit;
    font-weight: 600;
    color: var(--bg) !important;
    background: var(--green);
    border: none;
    border-radius: 999px;
    padding: 14px 30px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}
.support-submit:hover { background: var(--green-light); transform: translateY(-1px); }
.support-submit:active { transform: translateY(0); }

.support-privacy-note { color: var(--ink-2); font-size: 0.85rem; margin: 0; }

/* Result banners. */
.support-success,
.support-error {
    border-radius: 16px;
    padding: 18px 22px;
    border: 1px solid var(--hairline);
}
.support-success {
    background: rgba(81, 177, 100, 0.12);
    border-color: rgba(81, 177, 100, 0.35);
    color: var(--ink);
}
.support-error {
    background: rgba(246, 125, 111, 0.1);
    border-color: rgba(246, 125, 111, 0.4);
    color: var(--ink);
    margin-bottom: 20px;
}
.support-success p, .support-error p { margin: 0; }

@media (max-width: 560px) {
    .support-field-row { grid-template-columns: 1fr; }
}
