/* ==========================================================================
   JP-Dromedia — "Forest & Mint" brand layer
   Loaded AFTER assets/css/tailwind.css.
   Works with the existing precompiled Tailwind build (no rebuild required)
   and provides a real light/dark theme plus a set of component classes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
    /* Acid Mint (#B7FF72) */
    --mint-50:  #F5FFE8;
    --mint-100: #EAFEC9;
    --mint-200: #D9FD9F;
    --mint-300: #C8FF86;
    --mint-400: #B7FF72;   /* brand */
    --mint-500: #9BEF4A;
    --mint-600: #79C92E;
    --mint-700: #5AA01F;
    --mint-800: #427618;
    --mint-900: #2E5413;

    /* Forest Graphite (#18251D) */
    --forest-50:  #F2F6F3;
    --forest-100: #E1EAE4;
    --forest-200: #C4D5CA;
    --forest-300: #9BB4A4;
    --forest-400: #6E8F79;
    --forest-500: #4E6D5A;
    --forest-600: #3A5344;
    --forest-700: #2C4034;
    --forest-800: #223228;
    --forest-900: #18251D;  /* brand */
    --forest-950: #0D1511;

    --brand: var(--mint-400);
    --brand-strong: var(--mint-500);
    --brand-ink: #0D1511;   /* text on mint */

    /* Semantic (light) — soft, warm, premium */
    --bg: #FAFCF9;
    --surface-1: #FFFFFF;
    --surface-2: #F2F7F3;
    --surface-3: #E8F0EA;
    --card: #FFFFFF;
    --text: #10190F;
    --muted: #66796C;
    --border: #E4ECE5;
    --ring: rgba(120, 200, 90, .25);
    --shadow-color: 23 43 29;
}

html.dark {
    --bg: #0A110D;
    --surface-1: #0F1A14;
    --surface-2: #13211A;
    --surface-3: #182921;
    --card: #0F1A14;
    --text: #EAF3EC;
    --muted: #9DB3A5;
    --border: #1E3127;
    --ring: rgba(183, 255, 114, .45);
    --shadow-color: 0 0 0;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
    background-color: var(--bg) !important;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

::selection { background: var(--mint-400); color: var(--brand-ink); }

/* Center + pad the Tailwind v4 container (v3 had center:true). */
.container {
    margin-inline: auto;
    padding-inline: 1rem;
}
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }
@media (min-width: 1280px) { .container { padding-inline: 2.5rem; } }

/* Themed scrollbar */
* { scrollbar-color: var(--forest-400) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--forest-500), var(--forest-800));
    border-radius: 9999px;
    border: 2px solid var(--bg);
}
html.dark *::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--forest-600), var(--forest-900));
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   3. Components
   -------------------------------------------------------------------------- */

/* Buttons — soft, pill, premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .8rem 1.6rem;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.1;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, background-color .25s ease, color .25s ease, box-shadow .25s ease, border-color .25s ease;
    white-space: nowrap;
    text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
    background: linear-gradient(135deg, #C8FF86 0%, #B7FF72 55%, #9FEF57 100%);
    color: var(--brand-ink);
    box-shadow: 0 12px 32px -12px rgba(122, 200, 60, .65), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px -14px rgba(122, 200, 60, .8), inset 0 1px 0 rgba(255, 255, 255, .7);
    filter: brightness(1.03);
}
.btn-secondary {
    background: var(--forest-900);
    color: #EFF6F0;
    box-shadow: 0 12px 30px -14px rgba(24, 37, 29, .7);
}
.btn-secondary:hover { background: var(--forest-800); transform: translateY(-2px); }
html.dark .btn-secondary { background: var(--mint-400); color: var(--brand-ink); }
html.dark .btn-secondary:hover { background: var(--mint-300); }
.btn-outline {
    background: rgba(255, 255, 255, .7);
    color: var(--text);
    border-color: var(--border);
    box-shadow: 0 1px 2px rgba(23, 43, 29, .05);
}
.btn-outline:hover { border-color: var(--mint-600); color: var(--forest-800); background: #fff; transform: translateY(-1px); }
html.dark .btn-outline { background: rgba(255, 255, 255, .03); }
html.dark .btn-outline:hover { color: var(--mint-400); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(122, 200, 60, .12); color: var(--forest-800); }
html.dark .btn-ghost:hover { color: var(--mint-300); }
.btn-lg { padding: 1rem 2rem; font-size: 1.02rem; }
.btn-sm { padding: .55rem 1.1rem; font-size: .84rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 2.5rem; height: 2.5rem; border-radius: 9999px; }
.btn-on-dark { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .25); backdrop-filter: blur(8px); }
.btn-on-dark:hover { border-color: var(--mint-400); color: var(--mint-400); background: rgba(183, 255, 114, .1); }

/* Dark input (used on dark footer) */
.input-dark {
    background: #0D1511 !important;
    border-color: #223228 !important;
    color: #F1F7F2 !important;
}
.input-dark::placeholder { color: #7f9288; }

/* Surfaces / cards — soft & airy */
.card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    box-shadow: 0 1px 2px rgba(23, 43, 29, .04), 0 24px 48px -32px rgba(23, 43, 29, .18);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease, border-color .3s ease;
}
html.dark .card {
    background: linear-gradient(180deg, #101b15 0%, #0d1611 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.card-hover:hover {
    transform: translateY(-6px);
    border-color: rgba(122, 200, 60, .55);
    box-shadow: 0 2px 4px rgba(23, 43, 29, .05), 0 34px 64px -28px rgba(46, 90, 50, .35);
}
html.dark .card-hover:hover { box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .8); }

.surface-2 { background: var(--surface-2); }
.glass {
    background: color-mix(in srgb, var(--card) 78%, transparent);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--border);
}

/* Badges & pills — soft */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .42rem .9rem;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 9999px;
    letter-spacing: .02em;
    border: 1px solid transparent;
}
.badge-mint {
    background: linear-gradient(135deg, rgba(183, 255, 114, .5), rgba(183, 255, 114, .22));
    border-color: rgba(122, 200, 60, .4);
    color: var(--forest-800);
    box-shadow: 0 6px 16px -8px rgba(122, 200, 60, .6);
}
html.dark .badge-mint { color: var(--mint-200); }
.badge-forest { background: var(--forest-900); color: var(--mint-300); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--forest-500);
}
.eyebrow::before {
    content: "";
    width: 1.6rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--mint-500), var(--mint-300));
}
html.dark .eyebrow { color: var(--mint-400); }

/* Section rhythm */
.section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
@media (min-width: 768px) { .section { padding-top: 5rem; padding-bottom: 5rem; } }
.section-title { font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.muted { color: var(--muted); }

/* Gradient text */
.gradient-text {
    background: linear-gradient(100deg, var(--mint-400) 0%, var(--mint-300) 40%, #7DE0A6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Inputs — soft pill fields */
.input, .form-input, textarea.input, select.input {
    width: 100%;
    padding: .85rem 1.15rem;
    background: #fff;
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 1rem;
    box-shadow: inset 0 1px 2px rgba(23, 43, 29, .04);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
html.dark .input, html.dark .form-input { background: rgba(255, 255, 255, .03); }
.input:focus, .form-input:focus {
    border-color: var(--mint-500);
    box-shadow: 0 0 0 4px rgba(155, 239, 74, .22);
    outline: none;
    background: #fff;
}
.input::placeholder { color: #9AA9A0; opacity: 1; }
/* Themed native selects — explicit, opaque, always visible */
select.input {
    appearance: auto;
    background-color: #fff;
    background-image: none !important;
    border: 1.5px solid var(--border);
    color: var(--text);
    cursor: pointer;
}
select.input:invalid { color: var(--muted); }
html.dark select.input {
    background: rgba(255, 255, 255, .03);
    background-image: none !important;
    border-color: #2E4A3B;
    color: #EAF3EC;
}
html.dark select.input:invalid { color: #9DB3A5; }
html.dark select.input:focus { border-color: var(--mint-500); background: rgba(255, 255, 255, .05); background-image: none !important; }
/* Native controls (select popups, scrollbars, date pickers) follow the theme */
:root, html.light { color-scheme: light; }
html.dark { color-scheme: dark; }
/* Native dropdown options follow the theme (best effort — OS renders the popup) */
select option { background-color: #fff; color: #1d2b22; }
html.dark select option { background-color: #101c15; color: #dcebe1; }
select.input option, select.form-input option {
    background-color: #fff;
    color: #1d2b22;
}
html.dark select.input option, html.dark select.form-input option {
    background-color: #101c15;
    color: #dcebe1;
}
:where(.label) { display: block; margin-bottom: .5rem; font-size: .83rem; font-weight: 600; letter-spacing: .01em; color: #3d4f42; }
html.dark :where(.label) { color: #c6d4ca; }

/* Option picker — custom radio cards (checkout wallets, software page) */
.pay-grid, .pick-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.pick-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pay-option, .pick-option { position: relative; cursor: pointer; }
.pay-option input, .pick-option input {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}
.pay-card, .pick-card {
    position: relative;
    display: block;
    height: 100%;
    padding: .9rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 1rem;
    background: var(--card);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background-color .2s ease;
}
.pay-card:hover, .pick-card:hover { border-color: var(--mint-500); transform: translateY(-1px); }
.pay-option input:checked + .pay-card,
.pick-option input:checked + .pick-card {
    border-color: var(--mint-500);
    background: rgba(183, 255, 114, .10);
    box-shadow: 0 0 0 3px rgba(155, 239, 74, .20), 0 14px 28px -20px rgba(15, 26, 19, .6);
}
.pay-option input:focus-visible + .pay-card,
.pick-option input:focus-visible + .pick-card {
    outline: 2px solid var(--mint-500);
    outline-offset: 2px;
}
.pay-check, .pick-check {
    position: absolute;
    top: .55rem; right: .55rem;
    display: grid;
    place-items: center;
    width: 1.4rem; height: 1.4rem;
    border-radius: 50%;
    background: var(--forest-900);
    color: var(--mint-400);
    font-size: .75rem;
    line-height: 1;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .2s ease, transform .2s ease;
}
.pay-option input:checked + .pay-card .pay-check,
.pick-option input:checked + .pick-card .pick-check { opacity: 1; transform: scale(1); }
.pay-name, .pick-name { display: block; font-weight: 700; padding-right: 1.6rem; }
.pay-addr, .pick-sub {
    display: block;
    margin-top: .25rem;
    font-size: .75rem;
    color: var(--muted);
}
.pay-addr {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .72rem;
    word-break: break-all;
}
.pick-icon {
    display: grid;
    place-items: center;
    width: 2.5rem; height: 2.5rem;
    margin-bottom: .6rem;
    border-radius: .8rem;
    background: rgba(122, 200, 60, .16);
    color: var(--forest-700);
}
html.dark .pick-icon { color: var(--mint-300); }
.pick-empty {
    grid-column: 1 / -1;
    padding: 1.1rem 1.25rem;
    border: 1.5px dashed var(--border);
    border-radius: 1rem;
    font-size: .88rem;
    color: var(--muted);
    text-align: center;
}

/* Segmented control */
.seg { display: inline-flex; padding: .3rem; gap: .25rem; border: 1.5px solid var(--border); border-radius: 999px; background: var(--card); }
.seg-block { display: flex; width: 100%; }
.seg-option { position: relative; flex: 1 1 0; min-width: 0; cursor: pointer; }
.seg-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.seg-label {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .65rem 1rem; border-radius: 999px;
    font-weight: 600; font-size: .9rem; color: var(--muted);
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.seg-label small { font-weight: 400; font-size: .72rem; opacity: .75; }
.seg-label-stack { flex-direction: column; gap: .1rem; line-height: 1.25; }
.seg-option input:checked + .seg-label {
    background: var(--forest-900); color: var(--mint-300);
    box-shadow: 0 8px 18px -10px rgba(15, 26, 19, .7);
}
html.dark .seg-option input:checked + .seg-label {
    background: rgba(183, 255, 114, .16); color: var(--mint-300);
    box-shadow: inset 0 0 0 1px rgba(183, 255, 114, .35);
}
.seg-option input:focus-visible + .seg-label { outline: 2px solid var(--mint-500); outline-offset: 2px; }

/* Custom dropdown */
.dd { position: relative; }
.dd-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    width: 100%; padding: .85rem 1.15rem;
    border: 1.5px solid var(--border); border-radius: 1rem;
    background: var(--card); color: var(--text); cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.dd-btn:hover { border-color: var(--mint-500); }
.dd.open .dd-btn { border-color: var(--mint-500); box-shadow: 0 0 0 4px rgba(155, 239, 74, .22); }
.dd-btn.invalid { border-color: #f87171; }
.dd-btn-text { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; min-width: 0; }
.dd-btn-title { font-weight: 600; }
.dd-btn-sub { font-size: .75rem; color: var(--muted); }
.dd-chev { flex-shrink: 0; color: var(--muted); transition: transform .2s ease; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd-panel {
    position: absolute; top: calc(100% + .5rem); left: 0; right: 0; z-index: 60;
    overflow: hidden; border: 1px solid var(--border); border-radius: 1rem;
    background: var(--bg); box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .45);
    opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.dd.open .dd-panel { opacity: 1; transform: none; pointer-events: auto; }
.dd-search { padding: .6rem; border-bottom: 1px solid var(--border); }
.dd-search input {
    width: 100%; padding: .6rem .9rem; font-size: .9rem;
    border: 1px solid var(--border); border-radius: .7rem;
    background: transparent; color: var(--text);
}
.dd-search input:focus { outline: none; border-color: var(--mint-500); }
.dd-list { max-height: 240px; overflow-y: auto; padding: .4rem; }
.dd-item {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    width: 100%; padding: .7rem .9rem; border: 0; border-radius: .75rem;
    background: transparent; color: var(--text); cursor: pointer; text-align: left;
    transition: background-color .15s ease;
}
.dd-item:hover, .dd-item.active { background: rgba(122, 200, 60, .12); }
.dd-item.selected { background: rgba(183, 255, 114, .14); }
.dd-item-main { font-weight: 600; }
.dd-item-sub { font-size: .75rem; color: var(--muted); }
.dd-item .tick { flex-shrink: 0; font-weight: 700; color: var(--mint-600); opacity: 0; }
html.dark .dd-item .tick { color: var(--mint-400); }
.dd-item.selected .tick { opacity: 1; }
.dd-empty { padding: 1rem; text-align: center; font-size: .88rem; color: var(--muted); }
.dd-error { margin-top: .5rem; font-size: .8rem; color: #f87171; }

/* Nav links */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: .5rem .1rem;
    font-weight: 500;
    color: var(--text);
    transition: color .2s ease;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 0; height: 2px;
    background: var(--mint-400);
    transition: width .25s ease;
    border-radius: 2px;
}
.nav-link:hover { color: var(--forest-700); }
html.dark .nav-link:hover { color: var(--mint-400); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Icon tile — soft mint */
.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, rgba(183, 255, 114, .38), rgba(183, 255, 114, .12));
    color: var(--forest-700);
    font-size: 1.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 8px 18px -10px rgba(122, 200, 60, .5);
}
html.dark .icon-tile { color: var(--mint-400); background: rgba(183, 255, 114, .12); }

/* Glow blob */
.glow {
    position: absolute;
    border-radius: 9999px;
    filter: blur(70px);
    opacity: .5;
    pointer-events: none;
}

/* Divider */
.divider { height: 1px; background: var(--border); border: 0; }

/* --------------------------------------------------------------------------
   4. Hero background
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1100px 520px at 88% -12%, rgba(183, 255, 114, .32), transparent 60%),
        radial-gradient(700px 420px at 8% 108%, rgba(24, 37, 29, .08), transparent 55%),
        radial-gradient(600px 300px at 40% 0%, rgba(255, 255, 255, .9), transparent 70%),
        linear-gradient(180deg, #FDFEFB 0%, var(--surface-2) 100%);
    color: var(--text);
}
html.dark .hero {
    background:
        radial-gradient(1000px 520px at 85% -10%, rgba(183, 255, 114, .16), transparent 62%),
        radial-gradient(900px 520px at 0% 120%, rgba(183, 255, 114, .06), transparent 55%),
        linear-gradient(180deg, #0A110D 0%, #0F1A14 100%);
}
.hero-grid-mask {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(24, 37, 29, .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(24, 37, 29, .06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 50% 30%, black, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, black, transparent 72%);
    pointer-events: none;
}
html.dark .hero-grid-mask {
    background-image:
        linear-gradient(to right, rgba(183, 255, 114, .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(183, 255, 114, .06) 1px, transparent 1px);
}

/* Hero flash-console visual */
.hero-orbit {
    position: absolute;
    inset: -5% -6%;
    border: 1px dashed rgba(122, 200, 60, .45);
    border-radius: 2.5rem;
    transform: rotate(-4deg);
    pointer-events: none;
}
html.dark .hero-orbit { border-color: rgba(183, 255, 114, .3); }
.hero-app {
    box-shadow: 0 40px 80px -40px rgba(15, 26, 19, .55);
}
.hero-app-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-2) 80%, transparent);
}
.hero-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.hero-term {
    margin-top: 1.1rem;
    padding: .85rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(183, 255, 114, .16);
    background: linear-gradient(160deg, #0D1511 0%, #12211A 100%);
    box-shadow: inset 0 0 60px rgba(183, 255, 114, .05);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .82rem;
    line-height: 1.95;
    color: #CFE6D6;
}
.hero-term p {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0;
    white-space: nowrap;
}
.hero-term .t-dim { color: rgba(255, 255, 255, .32); }
.hero-term .t-ok { margin-left: auto; color: var(--mint-400); }
.hero-term .t-run {
    margin-left: auto;
    color: var(--mint-300);
    letter-spacing: .18em;
    animation: jp-blink 1.2s ease-in-out infinite;
}
@keyframes jp-blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
.hero-progress > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mint-500), var(--mint-300));
    box-shadow: 0 0 12px rgba(183, 255, 114, .5);
    animation: jp-progress 3.2s ease-in-out infinite alternate;
}
@keyframes jp-progress { from { filter: brightness(1); } to { filter: brightness(1.25); } }
.hero-app-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .95rem 1.4rem;
    border-top: 1px solid var(--border);
    background: rgba(183, 255, 114, .08);
}

/* --------------------------------------------------------------------------
   5. Animations
   -------------------------------------------------------------------------- */
@keyframes jp-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes jp-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-fade-up { animation: jp-fade-up .7s cubic-bezier(.22, 1, .36, 1) both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
.animate-float { animation: jp-float 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .animate-fade-up, .animate-float { animation: none !important; }
    html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   6. Brand remap of the template's accent utilities
   (Tailwind was compiled with `important: true`, hence !important here.)
   -------------------------------------------------------------------------- */

/* Indigo solid -> Acid Mint with dark ink */
.bg-indigo-600 {
    background-color: var(--mint-400) !important;
    color: var(--brand-ink) !important;
}
.hover\:bg-indigo-600:hover {
    background-color: var(--mint-400) !important;
    color: var(--brand-ink) !important;
}
.hover\:bg-indigo-700:hover,
.active.bg-indigo-700 {
    background-color: var(--mint-300) !important;
    color: var(--brand-ink) !important;
}
.border-indigo-600 { border-color: var(--mint-400) !important; }
.hover\:border-indigo-700:hover { border-color: var(--mint-500) !important; }

/* Indigo text */
.text-indigo-600 { color: var(--forest-700) !important; }
html.dark .text-indigo-600 { color: var(--mint-400) !important; }
.text-indigo-700,
.hover\:text-indigo-700:hover { color: var(--forest-800) !important; }
html.dark .text-indigo-700,
html.dark .hover\:text-indigo-700:hover { color: var(--mint-300) !important; }
.text-indigo-400 { color: var(--mint-600) !important; }
html.dark .text-indigo-400 { color: var(--mint-400) !important; }

/* Indigo tints */
.bg-indigo-600\/5  { background-color: rgba(183, 255, 114, .10) !important; }
.bg-indigo-600\/10 { background-color: rgba(183, 255, 114, .16) !important; }
.bg-indigo-600\/20 { background-color: rgba(183, 255, 114, .24) !important; }
.bg-indigo-50      { background-color: rgba(183, 255, 114, .14) !important; }
.hover\:bg-indigo-100:hover { background-color: rgba(183, 255, 114, .26) !important; }
.group:hover .group-hover\:bg-indigo-600 { background-color: var(--mint-400) !important; }

/* Green (secondary CTA) -> Forest Graphite */
.bg-green-600 {
    background-color: var(--forest-800) !important;
    color: #EAF3EC !important;
}
.hover\:bg-green-700:hover {
    background-color: var(--forest-900) !important;
    color: #EAF3EC !important;
}
.border-green-600 { border-color: var(--forest-800) !important; }
.hover\:border-green-700:hover { border-color: var(--forest-900) !important; }
.text-green-600 { color: var(--forest-700) !important; }
html.dark .text-green-600 { color: var(--mint-400) !important; }
html.dark .text-green-400 { color: var(--mint-300) !important; }
.bg-green-50 { background-color: rgba(24, 37, 29, .05) !important; }
html.dark .bg-green-50 { background-color: rgba(183, 255, 114, .08) !important; }
.hover\:bg-green-100:hover { background-color: rgba(24, 37, 29, .09) !important; }

/* Dark surfaces -> forest-tinted */
html.dark .dark\:bg-slate-900 { background-color: var(--surface-1) !important; }
html.dark .dark\:bg-slate-800 { background-color: var(--surface-2) !important; }
html.dark .dark\:bg-slate-700 { background-color: var(--surface-3) !important; }
html.dark .dark\:bg-slate-900\/50 { background-color: rgba(15, 26, 20, .5) !important; }
html.dark .dark\:bg-slate-800\/50 { background-color: rgba(19, 33, 26, .5) !important; }

/* Light gray sections */
.bg-gray-50 { background-color: var(--surface-2) !important; }
.bg-gray-100 { background-color: var(--surface-3) !important; }

/* Muted text */
.text-slate-400 { color: var(--muted) !important; }
.text-slate-500 { color: var(--muted) !important; }
html.dark .dark\:text-slate-300 { color: #C7D6CC !important; }
html.dark .dark\:text-slate-400 { color: var(--muted) !important; }

/* Borders */
html.dark .dark\:border-gray-800 { border-color: var(--border) !important; }
html.dark .dark\:border-slate-700 { border-color: var(--border) !important; }
.border-gray-200 { border-color: var(--border) !important; }
.border-gray-300 { border-color: var(--border) !important; }
.border-slate-800 { border-color: var(--border) !important; }

/* Footer background */
.bg-dark-footer { background-color: var(--forest-950) !important; }

/* --------------------------------------------------------------------------
   7. Dark-mode toggle button
   -------------------------------------------------------------------------- */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.theme-toggle:hover { border-color: var(--mint-400); transform: translateY(-1px); }
.theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

/* --------------------------------------------------------------------------
   8. Navigation (mobile-first)
   -------------------------------------------------------------------------- */
#topnav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999;
    width: 100%;
    transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease, border-color .3s ease;
    border-bottom: 1px solid transparent;
}
#topnav::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--mint-400), transparent);
    opacity: 0;
    transition: opacity .3s ease;
}
#topnav .navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem;
}
/* Compact navbar on small phones so Log in + Sign up stay visible */
@media (max-width: 430px) {
    #topnav .navbar-inner { height: 4rem; gap: .5rem; }
    #topnav .logo img { height: 2.1rem; }
    #topnav .btn-sm { padding: .45rem .65rem; font-size: .78rem; gap: .3rem; }
    #topnav .btn-sm svg { width: .8rem; height: .8rem; }
    #topnav .theme-toggle { width: 2.3rem; height: 2.3rem; }
    #topnav .burger { width: 2.3rem; height: 2.3rem; }
}
#topnav.nav-sticky {
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom-color: var(--border);
    box-shadow: 0 12px 32px -20px rgba(15, 26, 19, .45);
}
#topnav.nav-sticky::before { opacity: 1; }

/* Scroll progress */
.scroll-progress {
    position: absolute;
    top: 0; left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--mint-500), var(--mint-300));
    z-index: 1000;
}

/* Desktop menu */
#navigation { display: none; }
#navigation .menu { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: .3rem; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--card) 70%, transparent); }
#navigation .menu .nav-link { padding: .55rem 1.05rem; border-radius: 999px; }
#navigation .menu .nav-link::after { display: none; }
#navigation .menu .nav-link:hover { background: rgba(122, 200, 60, .14); color: var(--forest-800); }
html.dark #navigation .menu .nav-link:hover { color: var(--mint-300); }
#navigation .menu .nav-link.active { background: var(--forest-900); color: var(--mint-300); }
html.dark #navigation .menu .nav-link.active { background: rgba(183, 255, 114, .16); color: var(--mint-300); }
@media (min-width: 1024px) {
    #navigation { display: block; }
    .mobile-drawer, .drawer-overlay { display: none !important; }
}

/* Mobile slide-over */
.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 17, 13, .55);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }
.mobile-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    z-index: 1001;
    width: min(22rem, 88vw);
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-left: 1px solid var(--border);
    box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .5);
    transform: translateX(105%);
    transition: transform .38s cubic-bezier(.22, 1, .36, 1);
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer .menu { list-style: none; margin: 0; padding: 1rem 1.25rem .5rem; }
.mobile-drawer .menu a {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .9rem 1rem;
    margin-bottom: .35rem;
    border-radius: .9rem;
    font-weight: 600;
    color: var(--text);
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.mobile-drawer .menu a:hover { background: rgba(122, 200, 60, .14); transform: translateX(2px); }
.mobile-drawer .menu a.active { background: var(--forest-900); color: var(--mint-300); }
html.dark .mobile-drawer .menu a.active { background: rgba(183, 255, 114, .14); color: var(--mint-300); }
.mobile-drawer .drawer-cta { margin-top: auto; padding: 1.25rem; display: grid; gap: .7rem; border-top: 1px solid var(--border); }
.mobile-drawer .drawer-note { text-align: center; font-size: .75rem; color: var(--muted); margin: 0; }

/* Hamburger */
.burger {
    width: 2.75rem; height: 2.75rem;
    display: inline-flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 5px;
    border-radius: .75rem;
    border: 1px solid var(--border);
    background: var(--card);
    cursor: pointer;
}
.burger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1024px) { .burger { display: none; } }

/* --------------------------------------------------------------------------
   9. Admin sidebar (Forest theme)
   -------------------------------------------------------------------------- */
.jp-sidebar {
    background: linear-gradient(180deg, #0D1511 0%, #13211A 100%) !important;
}
.jp-sidebar .sidebar-brand {
    border-bottom: 1px solid rgba(183, 255, 114, .14) !important;
    padding: .9rem 1rem !important;
}
.jp-sidebar .brand-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    text-decoration: none;
}
.jp-sidebar .brand-logo { height: 28px; width: auto; }
.jp-sidebar .brand-name { color: #fff; font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.jp-sidebar .brand-name::after {
    content: "";
    display: block;
    height: 2px;
    margin-top: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--mint-400), transparent);
}
.sb-link {
    display: flex !important;
    align-items: center;
    padding: .72rem 1rem !important;
    margin: .15rem .75rem !important;
    border-radius: .8rem !important;
    color: rgba(255, 255, 255, .72) !important;
    font-weight: 500;
    transition: color .2s ease, background-color .2s ease;
}
.sb-link:hover {
    color: var(--mint-300) !important;
    background: rgba(183, 255, 114, .10) !important;
}
.sidebar-menu > li.active > .sb-link,
.sidebar-dropdown.active > .sb-link {
    color: var(--mint-300) !important;
    background: rgba(183, 255, 114, .14) !important;
    font-weight: 600;
}
.sb-link.sb-sub { padding: .55rem 1rem .55rem 2.4rem !important; font-size: .9rem; }
.sb-separator {
    height: 1px;
    margin: .8rem 1.25rem;
    background: rgba(183, 255, 114, .14);
}
.sb-danger:hover { color: #fca5a5 !important; background: rgba(248, 113, 113, .12) !important; }

/* --------------------------------------------------------------------------
   10. Admin tables & DataTables
   -------------------------------------------------------------------------- */
table.dataTable thead th {
    background: var(--surface-2) !important;
    color: var(--text) !important;
    font-size: .78rem !important;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid var(--border) !important;
    white-space: nowrap;
}
table.dataTable tbody td {
    border-top: 1px solid var(--border) !important;
    padding: .9rem 1rem !important;
    vertical-align: middle;
}
table.dataTable tbody tr { transition: background-color .15s ease; }
table.dataTable tbody tr:hover { background: rgba(122, 200, 60, .08) !important; }
html.dark table.dataTable tbody tr:hover { background: rgba(183, 255, 114, .06) !important; }
table.dataTable.no-footer { border-bottom: 0 !important; }

.dataTables_wrapper .dataTables_filter { margin-bottom: .75rem; }
.dataTables_wrapper .dataTables_length { margin-bottom: .75rem; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: var(--card) !important;
    color: var(--text) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: .75rem !important;
    padding: .45rem .8rem !important;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--mint-500) !important;
    box-shadow: 0 0 0 3px rgba(155, 239, 74, .22) !important;
    outline: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: .65rem !important;
    border: 1px solid transparent !important;
    color: var(--text) !important;
    background: transparent !important;
    padding: .35em .8em !important;
    margin-left: 2px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--mint-400) !important;
    color: var(--brand-ink) !important;
    border-color: var(--mint-400) !important;
    font-weight: 700;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(122, 200, 60, .16) !important;
    color: var(--forest-800) !important;
    border-color: transparent !important;
}
html.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover { color: var(--mint-300) !important; }
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label { color: var(--muted) !important; }

/* --------------------------------------------------------------------------
   11. Misc helpers
   -------------------------------------------------------------------------- */
.bookmark-btn, .floating-contact-us { z-index: 40; }
.text-balance { text-wrap: balance; }

/* Services page: brand-tinted cards and icons */
.service-ico { color: var(--mint-600); background: rgba(183, 255, 114, .12); }
.group:hover .service-ico { background: var(--forest-900); color: var(--mint-300); }
html.dark .group:hover .service-ico { background: rgba(183, 255, 114, .16); color: var(--mint-300); }
.group:hover .service-title { color: var(--mint-600); }
.service-check { color: var(--mint-600); width: 1rem; height: 1rem; flex-shrink: 0; }
.service-open { background: rgba(183, 255, 114, .10) !important; }

/* Signup wizard: progress + steps */
.wiz-track { height: .5rem; border-radius: 999px; background: rgba(127, 140, 130, .25); overflow: hidden; }
.wiz-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--mint-500), var(--mint-300)); transition: width .35s ease; }
.wiz-labels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .25rem; list-style: none; margin: 0; padding: 0; font-size: .68rem; font-weight: 600; color: var(--muted); }
.wiz-labels li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-labels li.active { color: var(--mint-600); }
.wiz-ico { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 999px; background: rgba(183, 255, 114, .16); color: var(--mint-600); }
.input-error { border-color: #f87171 !important; box-shadow: 0 0 0 4px rgba(248, 113, 113, .15); }

/* --------------------------------------------------------------------------
   12. Flash notifications (SweetAlert) — match the Forest/Mint theme
   -------------------------------------------------------------------------- */
html.dark .swal-overlay { background: rgba(8, 12, 10, .72); }
html.dark .swal-modal {
    background: linear-gradient(180deg, #101b15 0%, #0d1611 100%);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
}
html.dark .swal-title { color: #EAF3EC; }
html.dark .swal-text { color: #9DB3A5; }
html.dark .swal-button {
    background: linear-gradient(180deg, var(--mint-400), var(--mint-500));
    color: var(--brand-ink);
    border-radius: .9rem;
    font-weight: 700;
}
html.dark .swal-button:not([disabled]):hover { background: var(--mint-300); }
html.dark .swal-icon--success { border-color: rgba(183, 255, 114, .5); background-color: transparent; }
html.dark .swal-icon--success::before, html.dark .swal-icon--success::after { background-color: #101b15; }
html.dark .swal-icon--success__hide-corners { background-color: #101b15; }
html.dark .swal-icon--success__line { background-color: var(--mint-400); }
html.dark .swal-icon--success__ring { border-color: rgba(183, 255, 114, .25); }
html.dark .swal-icon--error { border-color: rgba(248, 113, 113, .6); }
html.dark .swal-icon--error__line { background-color: #f87171; }
.no-scroll { overflow: hidden; }

/* --------------------------------------------------------------------------
   Cart button + counter badge
   -------------------------------------------------------------------------- */
.cart-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.cart-button:hover { border-color: var(--mint-400); transform: translateY(-1px); }

.cart-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    right: auto;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: var(--mint-400);
    color: #101B15;
    font-size: .7rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 2px var(--bg);
    pointer-events: none;
}
/* An empty cart shows the bag only - no stray zero. */
.cart-badge.is-empty { display: none; }

.drawer-cart-link { display: flex; align-items: center; gap: .5rem; }
/* The drawer badge sits inline instead of floating over an icon. */
.drawer-cart-link .cart-badge {
    position: static;
    display: inline-flex;
    min-width: 1.35rem;
    height: 1.35rem;
    box-shadow: none;
}
.drawer-cart-link .cart-badge.is-empty { display: none; }

/* --------------------------------------------------------------------------
   Cart panel
   -------------------------------------------------------------------------- */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.75rem 1rem;
    border: 1px dashed var(--border);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--card) 60%, transparent);
}
.cart-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--mint-400) 14%, transparent);
    color: var(--mint-400);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .875rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--card);
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.cart-item + .cart-item { margin-top: .625rem; }
.cart-item:hover {
    border-color: color-mix(in srgb, var(--mint-400) 45%, var(--border));
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -20px rgba(15, 26, 19, .5);
}

.cart-thumb {
    flex: none;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: .625rem;
    object-fit: cover;
    border: 1px solid var(--border);
    background: #fff;
}

.cart-item-body { flex: 1 1 auto; min-width: 0; }

.cart-item-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-meta {
    margin-top: .25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
    font-size: .78rem;
    color: var(--muted);
}
.cart-dot { opacity: .5; }
.cart-tag {
    display: inline-flex;
    align-items: center;
    padding: .1rem .45rem;
    border-radius: 9999px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--mint-400);
    background: color-mix(in srgb, var(--mint-400) 14%, transparent);
}

.cart-item-side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .375rem;
}

.cart-item-total {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.cart-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: .5rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.cart-remove:hover {
    color: #DC2626;
    border-color: rgba(220, 38, 38, .5);
    background: rgba(220, 38, 38, .08);
}

.cart-summary {
    padding: 1rem 1.125rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--mint-400) 6%, transparent);
}
.cart-total {
    font-size: 1.5rem;
    font-weight: 800;
    color: #B7FF72;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

/* --------------------------------------------------------------------------
   Video frame (homepage demo)
   -------------------------------------------------------------------------- */
/* The demo clip was captured on a phone, so the footage is stored portrait while
   the screen recording inside it is landscape. The frame is landscape and the
   <video> is rotated a quarter turn so the content reads the right way up.
   Drop .video-rotate from the <video> to show it as-shot instead. */
.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid var(--border);
    background: #0B120D;
    box-shadow: 0 30px 60px -40px rgba(15, 26, 19, .65);
}
.video-frame video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
/* The source is 576x1264 (9:19.8) but shows a landscape screen recording, so a
   quarter turn makes it 2.19:1. These percentages size the portrait <video> box
   so that, once rotated, the picture spans the full 16:9 frame width and about
   81% of its height - nothing is cropped and nothing is shrunk to a sliver. */
.video-frame video.video-rotate {
    width: 45.5%;
    height: 177.8%;
    transform: translate(-50%, -50%) rotate(-90deg);
    transform-origin: center center;
}
