/* ZuperPost homepage. Self-contained: the other pages still use style.css. */

:root {
    --ink: #1d1d1f;
    --ink-2: #424245;
    --muted: #6e6e73;
    --line: #d2d2d7;
    --line-soft: #e8e8ed;
    --bg: #ffffff;
    --bg-alt: #f5f5f7;
    --bg-dark: #000000;
    --card-dark: #161617;
    /* Brand orange - sampled from logo.svg */
    --brand: #F58345;
    --brand-hover: #E7742F;
    --brand-active: #D96621;
    --brand-2: #f09819;
    --brand-ink: #D96621;
    --link: #0066cc;
    --ok: #1aa260;
    --warn: #e8a100;
    --err: #e5383b;
    --radius: 28px;
    --radius-sm: 18px;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --nav-h: 52px;
    --gutter: 22px;
    --max: 1024px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--nav-h);
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.022em;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

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

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
p {
    margin: 0;
}

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

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 12px;
    z-index: 100;
    padding: 8px 14px;
    border-radius: 980px;
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    transition: top 0.2s var(--ease);
}

.skip-link:focus {
    top: 8px;
}

.wrap {
    width: 100%;
    max-width: calc(var(--max) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.wrap-wide {
    max-width: calc(1180px + var(--gutter) * 2);
}

/* ---------- Type ---------- */

.eyebrow {
    display: inline-block;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--brand-ink);
    margin-bottom: 10px;
}

.display {
    font-size: clamp(48px, 8.4vw, 96px);
    line-height: 1.04;
    font-weight: 700;
    letter-spacing: -0.045em;
}

.headline {
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.title {
    font-size: clamp(28px, 3.6vw, 40px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.lede {
    font-size: clamp(19px, 2.1vw, 24px);
    line-height: 1.35;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--muted);
}

.lede strong {
    color: var(--ink);
    font-weight: 600;
}

.gradient-text {
    background: linear-gradient(100deg, var(--brand) 10%, #ff3d6e 50%, var(--brand-2) 90%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--brand);
    animation: sheen 8s var(--ease) infinite alternate;
}

@keyframes sheen {
    to {
        background-position: 100% 0;
    }
}

.center {
    text-align: center;
}

.center .lede {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Buttons & links ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 12px 24px;
    border-radius: 980px;
    border: 0;
    font: inherit;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.25s var(--ease-out), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
    will-change: transform;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 1px 2px rgba(245, 131, 69, 0.2);
    transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-primary:hover {
    background: var(--brand-hover);
    box-shadow: 0 10px 30px -8px rgba(245, 131, 69, 0.55);
}

.btn-primary:active {
    background: var(--brand-active);
}

.btn-ghost {
    color: var(--brand);
    background: transparent;
    box-shadow: inset 0 0 0 1.5px var(--brand);
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.btn-ghost:hover {
    color: #fff;
    background: var(--brand);
}

.btn-sm {
    min-height: 30px;
    padding: 5px 14px;
    font-size: 13px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 22px;
}

.chev {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 19px;
    color: var(--link);
}

.chev::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 4px;
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s var(--ease-out);
}

.chev:hover {
    text-decoration: underline;
}

.chev:hover::after {
    transform: translateX(3px) rotate(45deg);
}

/* ---------- Nav ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.nav.is-scrolled {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 24px;
}

.nav-logo img {
    height: 30px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-size: 14px;
    color: var(--ink-2);
    transition: color 0.2s var(--ease);
}

.nav-links a:hover {
    color: var(--ink);
    text-decoration: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-actions .signin {
    font-size: 14px;
    color: var(--ink-2);
    transition: color 0.2s var(--ease);
}

.nav-actions .signin:hover {
    color: var(--ink);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    position: relative;
}

.nav-toggle span {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}

.nav-toggle span:first-child {
    top: 18px;
}

.nav-toggle span:last-child {
    top: 25px;
}

.nav.is-open .nav-toggle span:first-child {
    top: 21.5px;
    transform: rotate(45deg);
}

.nav.is-open .nav-toggle span:last-child {
    top: 21.5px;
    transform: rotate(-45deg);
}

@media (max-width: 833px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        inset: var(--nav-h) 0 auto 0;
        height: 0;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.96);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
        transition: height 0.5s var(--ease-out);
    }

    .nav.is-open .nav-menu {
        height: calc(100vh - var(--nav-h));
        height: calc(100dvh - var(--nav-h));
    }

    .nav.is-open .nav-menu {
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px var(--gutter) calc(32px + env(safe-area-inset-bottom));
    }

    .nav-menu .nav-links > li {
        width: 100%;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.4s var(--ease), transform 0.5s var(--ease-out);
    }

    .nav.is-open .nav-menu .nav-links > li {
        opacity: 1;
        transform: none;
    }

    .nav.is-open .nav-menu .nav-links > li:nth-child(2) { transition-delay: 0.04s; }
    .nav.is-open .nav-menu .nav-links > li:nth-child(3) { transition-delay: 0.08s; }
    .nav.is-open .nav-menu .nav-links > li:nth-child(4) { transition-delay: 0.12s; }
    .nav.is-open .nav-menu .nav-links > li:nth-child(5) { transition-delay: 0.16s; }
    .nav.is-open .nav-menu .nav-links > li:nth-child(6) { transition-delay: 0.2s; }

    .nav-menu .nav-links > li > a {
        display: block;
        padding: 12px 0;
        font-size: 24px;
        font-weight: 600;
        letter-spacing: -0.01em;
        color: var(--ink);
        border-bottom: 1px solid var(--line-soft);
    }

    .nav-menu .nav-links > li.only-mobile > a {
        border-bottom: 0;
        font-size: 17px;
        font-weight: 500;
        color: var(--link);
        padding-top: 20px;
    }

    .nav-actions .signin {
        display: none;
    }

    body.menu-open {
        overflow: hidden;
    }
}

@media (min-width: 834px) {
    .nav-menu .only-mobile {
        display: none;
    }
}

/* ---------- Sections ---------- */

.section {
    padding: clamp(80px, 12vw, 140px) 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-dark {
    background: var(--bg-dark);
    color: #f5f5f7;
}

.section-dark .lede {
    color: #a1a1a6;
}

.section-dark .lede strong {
    color: #f5f5f7;
}

.section-head {
    margin-bottom: clamp(48px, 7vw, 80px);
}

.section-head .lede {
    margin-top: 18px;
}

/* ---------- Hero ---------- */

.hero {
    padding: clamp(56px, 9vw, 104px) 0 120px;
    margin-bottom: -120px;
    text-align: center;
    overflow: hidden;
}

.hero .display {
    margin: 4px auto 20px;
    max-width: 900px;
}

.hero .lede {
    max-width: 640px;
    margin: 0 auto 32px;
}

.hero-note {
    margin-top: 16px;
    font-size: 14px;
    color: var(--muted);
}

.hero-stage {
    position: relative;
    margin-top: clamp(48px, 7vw, 80px);
}

.hero-device {
    --p: 0;
    position: relative;
    max-width: 1060px;
    margin: 0 auto;
    transform-origin: 50% 0;
    transform: scale(calc(0.94 + 0.06 * var(--p)));
    transition: transform 0.1s linear;
}

.hero-glow {
    position: absolute;
    inset: 10% 8% auto;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 92, 53, 0.35), rgba(240, 152, 25, 0.18) 55%, transparent);
    filter: blur(40px);
    z-index: -1;
}

/* Floating platform badges around the hero device */
.float {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
    animation: bob 6s ease-in-out infinite;
}

.float svg {
    width: 30px;
    height: 30px;
}

.float-1 { top: 6%; left: 1%; animation-delay: -1s; }
.float-2 { top: 34%; right: 0; animation-delay: -3s; }
.float-3 { bottom: 18%; left: -1%; animation-delay: -2s; }
.float-4 { top: -4%; right: 9%; animation-delay: -4s; }
.float-5 { bottom: 2%; right: 6%; animation-delay: -5s; }
.float-6 { top: 58%; left: 5%; animation-delay: -1.5s; }
.float-7 { top: 70%; right: -1%; animation-delay: -3.5s; }

@keyframes bob {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-12px) rotate(2deg);
    }
}

@media (max-width: 734px) {
    .float {
        width: 46px;
        height: 46px;
        border-radius: 13px;
    }

    .float svg {
        width: 22px;
        height: 22px;
    }

    .float-1 { top: -6%; left: 2%; }
    .float-3,
    .float-5,
    .float-6,
    .float-7 { display: none; }
}

/* ---------- App window mock ---------- */

.window {
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 50px 100px -30px rgba(0, 0, 0, 0.35), 0 30px 60px -40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    text-align: left;
}

.window-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    background: #f6f6f8;
    border-bottom: 1px solid var(--line-soft);
}

.window-bar i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff5f57;
}

.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }

.window-bar b {
    flex: 1;
    margin-right: 50px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.demo-tag {
    position: absolute;
    top: 50%;
    left: calc(50% + 58px);
    transform: translateY(-50%);
    white-space: nowrap;
    padding: 2px 9px;
    border-radius: 980px;
    background: rgba(245, 131, 69, 0.12);
    color: var(--brand-ink);
    font-size: 11px;
    font-weight: 600;
}

.app {
    position: relative;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    height: 520px;
}

.app-side {
    padding: 18px 12px;
    border-right: 1px solid var(--line-soft);
    background: #fbfbfd;
}

.app-brand-wrap {
    position: relative;
    margin-bottom: 16px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line-soft);
    color: inherit;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.app-brand:hover,
.app-brand[aria-expanded="true"] {
    background: #f6f6f9;
    box-shadow: 0 0 0 1px var(--line);
}

.app-brand:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.app-brand-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-brand > svg {
    flex: none;
    width: 14px;
    height: 14px;
    color: var(--muted);
}

.brand-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    width: 230px;
    padding: 5px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line-soft), 0 12px 32px rgba(17, 17, 26, 0.14);
    font-size: 12.5px;
}

.brand-menu[hidden] {
    display: none;
}

.brand-menu-head {
    padding: 6px 9px 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 9px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.brand-menu button:hover,
.brand-menu button:focus-visible {
    background: #f4f4f7;
    outline: none;
}

.brand-menu button.is-current {
    background: #fff4f0;
}

.brand-menu-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.brand-menu-text b {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-menu-text small {
    color: var(--muted);
    font-size: 11px;
}

.brand-menu svg {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.brand-menu .is-current svg {
    color: var(--brand);
}

.brand-menu hr {
    margin: 5px 4px;
    border: 0;
    border-top: 1px solid var(--line-soft);
}

.avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.app-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.app-nav button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    background: none;
    font: inherit;
    font-size: 13px;
    letter-spacing: inherit;
    color: var(--ink-2);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.app-nav button:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--ink);
}

.app-nav button.on {
    background: rgba(255, 92, 53, 0.1);
    color: var(--brand-ink);
    font-weight: 600;
}

.app-nav svg {
    flex: none;
    width: 16px;
    height: 16px;
}

.app-main {
    padding: 20px 22px;
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.app-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.app-head h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-head small {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.pill-btn {
    flex: none;
    padding: 7px 14px;
    border: 0;
    border-radius: 980px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--brand);
    cursor: pointer;
    transition: background-color 0.15s var(--ease);
}

.pill-btn:hover {
    background: var(--brand-hover);
}

.cal {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid var(--line-soft);
    border-left: 1px solid var(--line-soft);
    border-radius: 10px;
    overflow: hidden;
}

.cal > div {
    min-height: 74px;
    padding: 6px;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    font-size: 11px;
    color: var(--muted);
}

.cal .dow {
    min-height: 0;
    padding: 6px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.04em;
    background: #fbfbfd;
}

.cal .past {
    background-image: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(0, 0, 0, 0.02) 6px 12px);
    color: #b0b0b5;
}

.cal .today .day {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
}

.chip {
    --c: var(--brand);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 3px 5px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--c) 12%, #fff);
    border-left: 2.5px solid var(--c);
    color: var(--ink-2);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chip svg {
    flex: none;
    width: 10px;
    height: 10px;
    fill: var(--c);
}

.chip.ok::after {
    content: "✓";
    margin-left: auto;
    color: var(--ok);
    font-weight: 700;
}

.chip.fb { --c: #1877f2; }
.chip.ig { --c: #e4405f; }
.chip.li { --c: #0a66c2; }
.chip.x { --c: #0f1419; }
.chip.gc { --c: #00ac47; }
.chip.th { --c: #000000; }
.chip.yt { --c: #ff0000; }
.chip.pi { --c: #bd081c; }
.chip.bs { --c: #0085ff; }
.chip.sl { --c: #4a154b; }
.chip.tm { --c: #5059c9; }
.chip.gb { --c: #4285f4; }

.hero .chip {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
    transition: opacity 0.5s var(--ease), transform 0.6s var(--spring);
}

.hero.is-ready .chip {
    opacity: 1;
    transform: none;
}

@media (max-width: 833px) {
    .app {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        height: 500px;
    }

    .app-side {
        padding: 8px;
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
    }

    .app-brand-wrap {
        display: none;
    }

    .app-nav {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .app-nav::-webkit-scrollbar {
        display: none;
    }

    .app-nav li {
        flex: none;
    }

    .app-nav button {
        gap: 6px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .app-nav svg {
        width: 14px;
        height: 14px;
    }

    .cal > div {
        min-height: 54px;
        padding: 4px;
    }

    .chip {
        font-size: 0;
        padding: 3px;
        justify-content: center;
    }

    .chip.ok::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .app {
        height: 470px;
    }

    .demo-tag {
        display: none;
    }

    .app-main {
        padding: 14px 10px;
    }

    .app-head h4 {
        font-size: 16px;
    }

    .cal > div {
        min-height: 44px;
        font-size: 10px;
    }

    .cal .chip:nth-of-type(n + 2) {
        display: none;
    }
}

/* ---------- Hero demo: the clickable app ---------- */

.app-view {
    animation: dm-fade 0.22s var(--ease);
}

.app-view[hidden] {
    display: none;
}

.app-head h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-head > div {
    min-width: 0;
}

.dm-count {
    padding: 2px 8px;
    border-radius: 980px;
    background: #fff1ec;
    color: var(--brand-ink);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
}

.hero .cal .can-schedule {
    cursor: pointer;
    transition: background-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.hero .cal .can-schedule:hover {
    background-color: #fffaf6;
}

.hero .cal .is-over {
    background-color: rgba(245, 131, 69, 0.1);
    box-shadow: inset 0 0 0 2px var(--brand);
}

.hero .cal .chip {
    cursor: pointer;
}

.hero .cal .chip:hover {
    background: color-mix(in srgb, var(--c) 20%, #fff);
}

.hero .cal .chip[draggable="true"] {
    cursor: grab;
}

.hero .cal .chip.is-dragging {
    opacity: 0.35;
}

.hero .cal .chip.is-new {
    animation: dm-pop 0.55s var(--spring);
}

/* Buttons and fields */

.dm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ink-2);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.dm-btn:hover {
    border-color: var(--line);
    color: var(--ink);
}

.dm-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.dm-btn svg {
    width: 14px;
    height: 14px;
}

.dm-btn.is-primary {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.dm-btn.is-primary:not(:disabled):hover {
    border-color: var(--brand-hover);
    background: var(--brand-hover);
}

.dm-btn.is-danger {
    color: var(--err);
}

.dm-btn.is-danger:hover {
    border-color: #f1aeb5;
    background: #fff5f5;
}

.dm-btn.is-icon {
    width: 28px;
    padding: 0;
}

.dm-input,
.dm-select,
.dm-textarea {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background-color: #fff;
    font: inherit;
    font-size: 13px;
    letter-spacing: normal;
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.dm-input:focus,
.dm-select:focus,
.dm-textarea:focus {
    border-color: #ffb59f;
    box-shadow: 0 0 0 3px rgba(255, 92, 53, 0.15);
}

.dm-input.is-invalid {
    border-color: var(--err);
}

.dm-select {
    padding-right: 28px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 13px;
    cursor: pointer;
}

.dm-select.is-sm {
    height: 28px;
    font-size: 12px;
}

.dm-textarea {
    display: block;
    width: 100%;
    height: auto;
    min-height: 76px;
    padding: 9px 10px;
    line-height: 1.45;
    resize: vertical;
}

.dm-empty {
    padding: 34px 16px;
    border: 1px dashed #e2e5e9;
    border-radius: 12px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}

.dm-empty strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--ink);
}

.dm-empty .dm-btn {
    margin-top: 12px;
}

.dm-pill {
    padding: 1px 7px;
    border-radius: 980px;
    background: #f1f3f5;
    color: #6c757d;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dm-pill.is-on,
.dm-pill.is-published {
    background: #e7f6ec;
    color: #1e7b3c;
}

.dm-pill.is-owner {
    background: #fff1ec;
    color: var(--brand-ink);
}

.dm-pill.is-scheduled {
    background: #eef4ff;
    color: #1d4ed8;
}

.dm-section-title {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Content */

.dm-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.dm-search {
    position: relative;
    flex: 1 1 auto;
    max-width: 320px;
}

.dm-search svg {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.dm-search .dm-input {
    width: 100%;
    padding-left: 30px;
}

.dm-seg {
    display: inline-flex;
    gap: 2px;
    margin-left: auto;
    padding: 2px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
}

.dm-seg button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 26px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--muted);
    cursor: pointer;
}

.dm-seg button[aria-pressed="true"] {
    background: #fff1ec;
    color: var(--brand-ink);
}

.dm-seg svg {
    width: 15px;
    height: 15px;
}

.dm-filters {
    display: flex;
    gap: 6px;
    margin: 0 -2px 12px;
    padding: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.dm-filters::-webkit-scrollbar {
    display: none;
}

.dm-filter {
    --c: var(--ink-2);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--line-soft);
    border-radius: 980px;
    background: #fff;
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ink-2);
    cursor: pointer;
    transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.dm-filter:hover {
    border-color: var(--line);
}

.dm-filter svg {
    width: 11px;
    height: 11px;
    fill: var(--c);
}

.dm-filter[aria-pressed="true"] {
    border-color: #33475b;
    background: #33475b;
    color: #fff;
}

.dm-filter[aria-pressed="true"] svg {
    fill: #fff;
}

.dm-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.dm-list li + li {
    border-top: 1px solid #f1f2f4;
}

.dm-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: none;
    font: inherit;
    letter-spacing: normal;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s var(--ease);
}

.dm-row:hover {
    background: #fcfaf9;
}

.dm-row-main {
    min-width: 0;
}

.dm-row:hover .dm-title,
.dm-card-btn:hover .dm-title {
    color: var(--brand-ink);
}

.dm-thumb,
.dm-card-media {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #f4f5f7;
    color: #b3bcc6;
}

.dm-thumb {
    width: 44px;
    height: 44px;
    border-radius: 9px;
}

.dm-thumb img,
.dm-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dm-thumb > svg {
    width: 42%;
    height: 42%;
}

.dm-thumb.is-video,
.dm-card-media.is-video {
    background: linear-gradient(135deg, #3b2a20, #b06a3b);
    color: #fff;
}

.dm-badge {
    position: absolute;
    right: 3px;
    bottom: 3px;
    padding: 0 5px;
    border-radius: 980px;
    background: rgba(17, 24, 39, 0.65);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
}

.dm-title {
    display: block;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: color 0.12s var(--ease);
}

.dm-preview {
    display: block;
    overflow: hidden;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.dm-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
}

.dm-nets {
    display: flex;
    gap: 4px;
}

.dm-nets svg {
    width: 12px;
    height: 12px;
}

.dm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dm-card-btn {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    letter-spacing: normal;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}

.dm-card-btn:hover {
    box-shadow: 0 8px 24px rgba(31, 45, 61, 0.08);
    transform: translateY(-1px);
}

.dm-card-media {
    width: 100%;
    aspect-ratio: 16 / 10;
}

.dm-card-media > svg {
    width: 26px;
    height: 26px;
}

.dm-card-media.is-text {
    display: block;
    padding: 12px 12px 0;
    background: linear-gradient(160deg, #fff7f4, #f7f8fa);
    color: #4a5866;
    font-size: 11.5px;
    line-height: 1.5;
}

.dm-card-media.is-text span {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dm-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
}

.dm-card-body .dm-meta {
    justify-content: space-between;
    margin-top: auto;
}

.dm-new {
    animation: dm-flash 2.4s ease-out;
}

/* Channels, brands, team */

.dm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.dm-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: #fff;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.dm-card.is-off {
    background: #fcfcfd;
}

.dm-card.is-current {
    border-color: #ffd2c4;
    box-shadow: 0 0 0 3px rgba(245, 131, 69, 0.1);
}

.dm-card-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.dm-card-main {
    flex: 1;
    min-width: 0;
}

.dm-ch-icon {
    --c: var(--ink);
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--c) 10%, #fff);
    transition: filter 0.2s var(--ease), opacity 0.2s var(--ease);
}

.dm-ch-icon svg {
    width: 17px;
    height: 17px;
    fill: var(--c);
}

.is-off .dm-ch-icon {
    filter: grayscale(1);
    opacity: 0.55;
}

.dm-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.is-off .dm-name {
    color: var(--muted);
}

.dm-sub {
    margin: 0;
    overflow: hidden;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.dm-card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--ink-2);
}

.dm-card-meta svg {
    width: 13px;
    height: 13px;
}

.dm-card-meta .is-ok {
    color: var(--ok);
}

.dm-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.dm-switch {
    position: relative;
    flex: none;
    width: 34px;
    height: 20px;
}

.dm-switch input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.dm-switch span {
    position: absolute;
    inset: 0;
    border-radius: 980px;
    background: #d2d2d7;
    transition: background-color 0.2s var(--ease);
}

.dm-switch span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s var(--ease-out);
}

.dm-switch input:checked + span {
    background: var(--brand);
}

.dm-switch input:checked + span::after {
    transform: translateX(14px);
}

.dm-switch input:focus-visible + span {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.avatar.is-lg {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 15px;
}

.dm-current {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ok);
}

.dm-current svg {
    width: 14px;
    height: 14px;
}

.dm-panel {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: #fff;
}

.dm-panel h5 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
}

.dm-panel > p {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--muted);
}

.dm-panel > p.dm-help {
    margin: 8px 0 0;
    font-size: 11.5px;
}

.dm-invite {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dm-invite .dm-input {
    flex: 1 1 180px;
    min-width: 0;
}

.dm-invite .dm-btn {
    height: 32px;
}

.dm-error {
    margin: 6px 0 0;
    font-size: 11.5px;
    color: var(--err);
}

.dm-people {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dm-person {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.dm-person + .dm-person {
    border-top: 1px solid #f1f2f4;
}

.dm-face {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--c, #6366f1);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.dm-face.is-pending {
    background: #f1f3f5;
    color: var(--muted);
}

.dm-face svg {
    width: 14px;
    height: 14px;
}

.dm-you {
    padding: 0 6px;
    border-radius: 980px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 10px;
    font-weight: 700;
}

.dm-person-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Dialogs and toast */

.dm-modal {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(250, 250, 252, 0.65);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: dm-fade 0.18s var(--ease);
}

.dm-dialog {
    width: min(100%, 430px);
    max-height: 100%;
    overflow-y: auto;
    padding: 18px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.06);
    animation: dm-rise 0.3s var(--ease-out);
}

.dm-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.dm-dialog-head h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.dm-dialog-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    font-size: 12px;
    color: var(--muted);
}

.dm-dialog-sub svg {
    width: 13px;
    height: 13px;
}

.dm-close {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    cursor: pointer;
}

.dm-close:hover {
    background: #f1f3f5;
    color: var(--ink);
}

.dm-close svg {
    width: 16px;
    height: 16px;
}

.dm-label {
    display: block;
    margin: 14px 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.dm-dialog-head + .dm-label {
    margin-top: 4px;
}

.dm-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dm-pick {
    --c: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--line-soft);
    border-radius: 980px;
    background: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--muted);
    cursor: pointer;
    transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.dm-pick svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.dm-pick[aria-pressed="true"] {
    border-color: var(--c);
    background: color-mix(in srgb, var(--c) 10%, #fff);
    color: var(--ink);
}

.dm-pick[aria-pressed="true"] svg {
    fill: var(--c);
}

.dm-when {
    display: flex;
    gap: 6px;
}

.dm-when .dm-select {
    flex: 1;
    min-width: 0;
}

.dm-media {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.dm-media img,
.dm-media .dm-thumb {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
}

.dm-checks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    color: var(--ink-2);
}

.dm-checks li {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dm-checks li::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
}

.dm-checks li.is-err {
    color: var(--err);
}

.dm-checks li.is-err::before {
    background: var(--err);
}

.dm-when-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 12.5px;
    color: var(--ink-2);
}

.dm-post-text {
    margin: 0;
    padding: 12px;
    border-radius: 10px;
    background: #f7f8fa;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-2);
    white-space: pre-wrap;
}

.dm-hint {
    margin: 10px 0 0;
    font-size: 11.5px;
    color: var(--muted);
}

.dm-dialog-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    position: sticky;
    bottom: -18px;
    margin: 4px -18px -18px;
    padding: 12px 18px 18px;
    background: #fff;
}

.dm-dialog-foot .dm-btn {
    height: 32px;
}

.dm-dialog-foot .is-start {
    margin-right: auto;
}

.dm-toast {
    position: absolute;
    bottom: 16px;
    left: 50%;
    z-index: 6;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 9px 14px;
    border-radius: 10px;
    background: rgba(29, 29, 31, 0.94);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
    font-size: 12.5px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.3s var(--ease-out);
}

.dm-toast.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
}

@keyframes dm-fade {
    from {
        opacity: 0;
    }
}

@keyframes dm-rise {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
}

@keyframes dm-pop {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
}

@keyframes dm-flash {
    from {
        background-color: #fff1ec;
    }
}

@media (max-width: 833px) {
    .dm-row {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .dm-row .dm-meta {
        grid-column: 2;
    }

    .dm-thumb {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .app-head {
        gap: 10px;
    }

    .dm-toolbar {
        flex-wrap: wrap;
    }

    .dm-search {
        max-width: none;
    }

    .dm-cards {
        grid-template-columns: 1fr;
    }

    .dm-dialog {
        padding: 14px;
    }

    .dm-dialog-foot {
        bottom: -14px;
        margin: 4px -14px -14px;
        padding: 12px 14px 14px;
    }
}

/* ---------- Channels marquee ---------- */

.channels {
    padding: clamp(72px, 10vw, 120px) 0 clamp(40px, 6vw, 64px);
}

.channel-group {
    margin: 52px 0 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.channel-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    list-style: none;
    padding: 0;
}

.channel-row > li {
    display: flex;
}

.channel {
    --c: #000;
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px 14px 16px;
    border-radius: 980px;
    background: var(--bg-alt);
    font-size: 17px;
    font-weight: 600;
    transition: transform 0.4s var(--spring), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.channel svg {
    width: 26px;
    height: 26px;
    fill: var(--c);
    transition: fill 0.3s var(--ease);
}

.channel:hover,
.channel:focus-visible {
    transform: translateY(-4px) scale(1.03);
    background: var(--c);
    color: #fff;
}

.channel:focus-visible {
    outline: 2px solid var(--c);
    outline-offset: 3px;
}

.channel:hover svg,
.channel:focus-visible svg {
    fill: #fff;
}

.channel small {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.channel:hover small,
.channel:focus-visible small {
    color: rgba(255, 255, 255, 0.8);
}

.channel.soon {
    opacity: 0.6;
}

@media (max-width: 734px) {
    .channel {
        padding: 10px 16px 10px 12px;
        font-size: 15px;
        gap: 9px;
    }

    .channel svg {
        width: 20px;
        height: 20px;
    }
}

/* ---------- Scroll-lit statement ---------- */

.statement {
    padding: clamp(80px, 14vw, 180px) 0;
}

.statement p {
    max-width: 900px;
    margin: 0 auto;
    font-size: clamp(32px, 5.2vw, 56px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.statement .w {
    color: #d2d2d7;
    transition: color 0.4s var(--ease);
}

.statement .w.lit {
    color: var(--ink);
}

.statement .w.lit.accent {
    color: var(--brand);
}

/* ---------- Feature split ---------- */

.split {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: clamp(40px, 6vw, 88px);
}

.split.reverse .split-copy {
    order: 2;
}

.split-copy .title {
    margin-bottom: 18px;
}

.split-copy .lede {
    font-size: clamp(17px, 1.7vw, 21px);
}

.ticks {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
}

.ticks li {
    position: relative;
    padding: 12px 0 12px 34px;
    border-top: 1px solid var(--line-soft);
    font-size: 17px;
    color: var(--ink-2);
}

.section-dark .ticks li {
    border-color: #2c2c2e;
    color: #d2d2d7;
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

@media (max-width: 833px) {
    .split {
        grid-template-columns: 1fr;
    }

    .split.reverse .split-copy {
        order: 0;
    }
}

/* ---------- Composer mock ---------- */

.panel {
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: clamp(18px, 3vw, 28px);
}

.panel-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 8px;
}

.compose-text {
    min-height: 116px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--bg-alt);
    font-size: 16px;
    line-height: 1.45;
    color: var(--ink);
    word-wrap: break-word;
}

.compose-text .caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 1px;
    vertical-align: text-bottom;
    background: var(--brand);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.compose-media {
    display: flex;
    gap: 10px;
    margin: 14px 0 18px;
}

/* The gradient shows through until the photo decodes. */
.thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffd3a5, #fd6585);
    transform: scale(0.6);
    opacity: 0;
    transition: transform 0.5s var(--spring), opacity 0.3s var(--ease);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb:nth-child(2) {
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
    transition-delay: 0.08s;
}

.thumb.add {
    display: grid;
    place-items: center;
    background: none;
    border: 1.5px dashed var(--line);
    color: var(--muted);
    font-size: 24px;
    opacity: 1;
    transform: none;
}

.compose.has-media .thumb {
    opacity: 1;
    transform: none;
}

.checks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.check {
    --c: #000;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--bg-alt);
    font-size: 14px;
    transition: background-color 0.35s var(--ease);
}

.check svg {
    width: 20px;
    height: 20px;
    fill: var(--c);
}

.check .meter {
    position: relative;
    height: 4px;
    margin-top: 6px;
    border-radius: 4px;
    background: var(--line-soft);
    overflow: hidden;
}

.check .meter i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: var(--ok);
    transition: width 0.25s var(--ease), background-color 0.3s var(--ease);
}

.check .status {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ok);
    white-space: nowrap;
    transition: color 0.3s var(--ease);
}

.check.is-err {
    background: #fff1f0;
}

.check.is-err .status {
    color: var(--err);
}

.check.is-err .meter i {
    background: var(--err);
}

.check .note {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

/* ---------- Dark calendar (drag & drop) ---------- */

.dark-window {
    border-radius: var(--radius);
    background: var(--card-dark);
    padding: clamp(16px, 3vw, 28px);
    box-shadow: 0 0 0 1px #2c2c2e;
}

.dark-window .cal {
    border-color: #2c2c2e;
}

.dark-window .cal > div {
    border-color: #2c2c2e;
    color: #86868b;
    min-height: 88px;
    position: relative;
}

.dark-window .cal .dow {
    background: #1d1d1f;
    min-height: 0;
}

.dark-window .chip {
    background: color-mix(in srgb, var(--c) 28%, #1d1d1f);
    color: #f5f5f7;
}

.dark-window .chip.x,
.dark-window .chip.th { --c: #8e8e93; }
.dark-window .chip.sl { --c: #9b59b6; }

.drop-target {
    transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.drop-target.is-over {
    background: rgba(255, 92, 53, 0.14);
    box-shadow: inset 0 0 0 1.5px var(--brand);
}

.drag-chip {
    position: absolute;
    z-index: 3;
    left: 6px;
    right: 6px;
    top: 26px;
    margin: 0;
    transition: transform 0.9s var(--ease-out), box-shadow 0.3s var(--ease);
}

.drag-chip.is-lifted {
    box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.6);
}

.cursor {
    position: absolute;
    z-index: 4;
    width: 18px;
    height: 18px;
    left: 50%;
    top: 34px;
    pointer-events: none;
    transition: transform 0.9s var(--ease-out);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 18px;
    font-size: 13px;
    color: #a1a1a6;
}

.legend span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--c, #fff);
}

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

.library {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lib-card {
    padding: 16px;
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 12px 30px -18px rgba(0, 0, 0, 0.25);
    transition: transform 0.45s var(--spring), box-shadow 0.35s var(--ease);
}

.lib-card:hover {
    transform: translateY(-6px) rotate(-0.6deg);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 24px 40px -18px rgba(0, 0, 0, 0.3);
}

.lib-card .img {
    display: block;
    width: 100%;
    height: 96px;
    border-radius: 12px;
    margin-bottom: 12px;
    object-fit: cover;
    background: var(--bg-alt);
}

.lib-card h5 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.lib-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

.lib-card .tags {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.lib-card .tags svg {
    width: 14px;
    height: 14px;
}

/* ---------- Brands & team ---------- */

.team-card {
    display: grid;
    gap: 14px;
}

.brand-list,
.member-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.brand-list li,
.member-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.25s var(--ease);
}

.brand-list li:hover,
.member-list li:hover {
    background: var(--bg-alt);
}

.brand-list li.on {
    background: rgba(255, 92, 53, 0.08);
}

.brand-list li.on::after {
    content: "✓";
    margin-left: auto;
    color: var(--brand);
    font-weight: 700;
}

.brand-list .avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 13px;
}

.brand-list li:nth-child(2) .avatar { background: linear-gradient(135deg, #0a84ff, #5ac8fa); }
.brand-list li:nth-child(3) .avatar { background: linear-gradient(135deg, #30d158, #a8e063); }

.member-list .face {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--line-soft);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
}

.member-list small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}

.role {
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 980px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-alt);
    color: var(--ink-2);
}

.role.owner {
    background: rgba(255, 92, 53, 0.12);
    color: var(--brand-ink);
}

.role.pending {
    background: #fff6e0;
    color: #a26b00;
}

/* ---------- Bento ---------- */

.bento {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
}

.tile {
    position: relative;
    grid-column: span 2;
    min-height: 260px;
    padding: 30px;
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    transition: transform 0.5s var(--ease-out), box-shadow 0.4s var(--ease);
}

.tile:hover {
    transform: scale(1.015);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.18);
}

.tile.wide {
    grid-column: span 3;
}

.tile .tile-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 40px;
    border-radius: 14px;
    background: rgba(255, 92, 53, 0.1);
    color: var(--brand);
}

.tile .tile-icon svg {
    width: 26px;
    height: 26px;
}

.tile .tile-icons {
    display: inline-flex;
    align-items: center;
    width: auto;
    gap: 12px;
    padding: 0 12px;
}

.tile .tile-icons > span {
    display: flex;
}

.tile .tile-icons svg {
    width: 24px;
    height: 24px;
}

.tile h3 {
    font-size: 24px;
    line-height: 1.17;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.tile p {
    font-size: 17px;
    color: var(--muted);
}

.tile .big {
    display: block;
    margin-bottom: 18px;
    font-size: clamp(56px, 7vw, 80px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.tile.dark {
    background: var(--ink);
    color: #f5f5f7;
}

.tile.dark p {
    color: #a1a1a6;
}

.tile.brand {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
}

.tile.brand p {
    color: rgba(255, 255, 255, 0.85);
}

.status-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 600;
    background: #2c2c2e;
    color: #f5f5f7;
}

.status-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c);
}

.status-pill.pulse::before {
    animation: pulse 1.6s var(--ease) infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(10, 132, 255, 0.7);
    }
    100% {
        box-shadow: 0 0 0 8px rgba(10, 132, 255, 0);
    }
}

@media (max-width: 1068px) {
    .tile,
    .tile.wide {
        grid-column: span 3;
    }
}

@media (max-width: 734px) {
    .bento {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tile,
    .tile.wide {
        grid-column: auto;
        min-height: 0;
        padding: 26px;
    }

    .tile .tile-icon {
        margin-bottom: 24px;
    }
}

/* ---------- Steps ---------- */

.steps {
    --gap: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
    list-style: none;
    margin: 0;
    padding: 0;
}

.step {
    display: flex;
    flex-direction: column;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--bg-alt);
}

.step-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.step-num {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 8px 18px -8px rgba(245, 131, 69, 0.8);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

/* Runs across the gap to the next card's number, so the lines read as one timeline. */
.step-line {
    position: relative;
    z-index: 1;
    flex: 1;
    height: 2px;
    margin-right: calc(-56px - var(--gap) - 12px);
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.9s var(--ease-out) calc(var(--d, 0s) + 0.5s);
}

.step.in .step-line {
    transform: none;
}

.step-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 172px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 20px;
    background: radial-gradient(120% 90% at 50% 0%, #fff 0%, rgba(255, 255, 255, 0.55) 100%);
    box-shadow: inset 0 0 0 1px var(--line-soft);
}

.step h3 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.step p {
    color: var(--muted);
}

.step-cta.btn-sm {
    align-self: flex-start;
    min-height: 38px;
    margin-top: 18px;
    padding: 8px 18px;
    font-size: 14px;
}

.sv-pill {
    padding: 5px 11px;
    border-radius: 99px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.sv-pill.is-ok {
    color: #15803d;
    background: #ecfdf3;
    box-shadow: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--spring);
    transition-delay: calc(var(--d, 0s) + 1.3s);
}

.step.in .sv-pill.is-ok {
    opacity: 1;
    transform: none;
}

/* Step 1: each network gets its check in turn. */
.sv-nets {
    display: flex;
    gap: 10px;
}

.sv-nets > span {
    position: relative;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line-soft), 0 8px 20px -12px rgba(0, 0, 0, 0.3);
    fill: var(--c);
    transform: translateY(10px) scale(0.85);
    opacity: 0;
    transition: transform 0.5s var(--spring), opacity 0.3s var(--ease);
    transition-delay: calc(var(--d, 0s) + 0.3s + var(--i) * 0.1s);
}

.sv-nets svg {
    width: 24px;
    height: 24px;
}

.sv-nets i {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    transform: scale(0);
    transition: transform 0.4s var(--spring);
    transition-delay: calc(var(--d, 0s) + 0.8s + var(--i) * 0.12s);
}

.sv-nets i svg {
    width: 11px;
    height: 11px;
    stroke-width: 3;
}

.step.in .sv-nets > span {
    transform: none;
    opacity: 1;
}

.step.in .sv-nets i {
    transform: none;
}

/* Steps 2 and 3: a small app card. */
.sv-card {
    width: 100%;
    max-width: 260px;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line-soft), 0 14px 30px -18px rgba(0, 0, 0, 0.35);
    font-size: 12px;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.6s var(--ease-out), opacity 0.4s var(--ease);
    transition-delay: calc(var(--d, 0s) + 0.3s);
}

.step.in .sv-card {
    transform: none;
    opacity: 1;
}

.step .sv-text {
    margin: 0 0 10px;
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.45;
}

.sv-text .caret {
    display: inline-block;
    width: 1.5px;
    height: 1.05em;
    margin-left: 1px;
    vertical-align: -2px;
    background: var(--brand);
    animation: blink 1s steps(1) infinite;
}

.sv-media {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.sv-media img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.sv-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sv-checks span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px 3px 6px;
    border-radius: 99px;
    background: #ecfdf3;
    color: #15803d;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    transform: scale(0.8);
    transition: transform 0.4s var(--spring), opacity 0.3s var(--ease);
    transition-delay: calc(var(--d, 0s) + 0.9s);
}

.sv-checks span + span {
    transition-delay: calc(var(--d, 0s) + 1.05s);
}

.sv-checks svg {
    width: 12px;
    height: 12px;
    fill: var(--c);
}

.step.in .sv-checks span {
    opacity: 1;
    transform: none;
}

.sv-day {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--ink);
    font-weight: 700;
}

.sv-day svg {
    width: 15px;
    height: 15px;
    color: var(--brand);
}

.sv-times {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.sv-times span {
    padding: 5px 0;
    border-radius: 7px;
    background: var(--bg-alt);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.4s var(--spring);
    transition-delay: calc(var(--d, 0s) + 0.8s);
}

.step.in .sv-times .on {
    background: var(--brand);
    color: #fff;
    transform: scale(1.06);
}

.sv-post {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 8px;
    border-radius: 9px;
    background: var(--bg-alt);
}

.sv-post-nets {
    display: flex;
    gap: 6px;
}

.sv-post-nets svg {
    display: block;
    width: 14px;
    height: 14px;
}

/* Both labels share one grid cell; the second fades in over the first. */
.sv-status {
    display: grid;
}

.sv-status b {
    grid-area: 1 / 1;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 700;
    text-align: center;
    transition: opacity 0.4s var(--ease), transform 0.4s var(--spring);
    transition-delay: calc(var(--d, 0s) + 1.8s);
}

.sv-status .is-sched {
    background: #fff;
    color: var(--muted);
}

.sv-status .is-live {
    background: #22c55e;
    color: #fff;
    opacity: 0;
    transform: scale(0.8);
}

.step.in .sv-status .is-sched {
    opacity: 0;
}

.step.in .sv-status .is-live {
    opacity: 1;
    transform: none;
}

@media (max-width: 833px) {
    .steps {
        grid-template-columns: 1fr;
    }

    .step-line {
        display: none;
    }
}

/* ---------- Final CTA ---------- */

.cta {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(96px, 14vw, 180px) 0;
    background: radial-gradient(60% 80% at 50% 110%, rgba(255, 92, 53, 0.22), transparent 70%), var(--bg-alt);
}

.cta .headline {
    max-width: 820px;
    margin: 0 auto 20px;
}

.cta .lede {
    margin-bottom: 36px;
}

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

.footer {
    padding: 48px 0 28px;
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    font-size: 12px;
    line-height: 1.33;
    color: var(--muted);
}

.footer a {
    color: var(--ink-2);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.footer-top img {
    height: 28px;
    width: auto;
    margin-bottom: 12px;
}

.footer-top p {
    max-width: 240px;
    font-size: 13px;
}

.footer h3 {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
}

.footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer li {
    margin-bottom: 8px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding-top: 18px;
}

.footer-bottom ul {
    display: flex;
    gap: 18px;
}

@media (max-width: 833px) {
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top > :first-child {
        grid-column: 1 / -1;
    }
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--ease), transform 1.1s var(--ease-out);
    transition-delay: var(--d, 0s);
}

.js .reveal.scale {
    transform: translateY(30px) scale(0.94);
}

.js .reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        transition-delay: 0s !important;
    }

    .hero-device {
        transform: none;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Mega Menu ---------- */

.nav-mega-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 14px;
    color: var(--ink-2);
    cursor: pointer;
    transition: color 0.2s var(--ease);
}

.nav-mega-trigger:hover,
.nav-mega-trigger[aria-expanded="true"] {
    color: var(--ink);
}

.nav-mega-trigger:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-mega-arrow {
    flex-shrink: 0;
    transition: transform 0.25s var(--ease-out);
}

.nav-mega-trigger[aria-expanded="true"] .nav-mega-arrow {
    transform: rotate(180deg);
}

.nav-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-mega-heading {
    margin: 0 0 8px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.nav-mega-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
    transition: background-color 0.15s var(--ease);
}

.nav-mega-link:hover {
    background: var(--bg-alt);
    text-decoration: none;
}

.nav-mega-link:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: -2px;
}

.nav-mega-link[aria-current="page"] {
    background: var(--bg-alt);
}

/* Brand-tinted icon tile; the icon colour comes from the inline style. */
.nav-mega-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-alt);
    background: color-mix(in srgb, currentColor 10%, #fff);
    transition: transform 0.2s var(--ease-out);
}

.nav-mega-icon svg {
    width: 20px;
    height: 20px;
}

.nav-mega-link:hover .nav-mega-icon {
    transform: scale(1.06);
}

.nav-mega-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.nav-mega-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.nav-mega-desc {
    font-size: 13px;
    line-height: 1.35;
    color: var(--muted);
}

.nav-mega-badge {
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--line-soft);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--muted);
}

.nav-mega-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-links .nav-mega-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--link);
    text-decoration: none;
}

.nav-mega-view-all:hover {
    text-decoration: none;
}

.nav-mega-view-all svg {
    transition: transform 0.2s var(--ease);
}

.nav-mega-view-all:hover svg {
    transform: translateX(3px);
}

/* Desktop: full-width-anchored panel under the nav bar */
@media (min-width: 834px) {
    /* Let the panel position against the sticky .nav, so it is centred on the page. */
    .nav-item-with-mega {
        position: static;
    }

    .nav-mega-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        z-index: 100;
        width: min(860px, calc(100vw - 32px));
        background: var(--bg);
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: var(--radius-sm);
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, -6px);
        transition: opacity 0.2s var(--ease), transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
    }

    /* Invisible bridge over the gap so the pointer can travel from trigger to panel. */
    .nav-mega-menu::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 100%;
        height: 24px;
    }

    .nav-item-with-mega.is-open .nav-mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
        transition: opacity 0.2s var(--ease), transform 0.25s var(--ease-out), visibility 0s;
    }

    /* minmax(0, 1fr) so a long link label cannot widen one section over the other. */
    .nav-mega-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px 24px;
        padding: 24px 24px 0;
    }

    .nav-mega-section + .nav-mega-section {
        padding-left: 24px;
        border-left: 1px solid var(--line-soft);
    }

    /* Every section lists its schedulers in two columns. */
    .nav-mega-list {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 2px 8px;
    }

    .nav-mega-footer {
        grid-column: 1 / -1;
        margin: 16px -24px 0;
        padding: 14px 34px;
        background: var(--bg-alt);
        border-top: 1px solid var(--line-soft);
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    }
}

/* Mobile: accordion inside the full-screen menu */
@media (max-width: 833px) {
    .nav-item-with-mega {
        border-bottom: 1px solid var(--line-soft);
    }

    .nav-mega-trigger {
        width: 100%;
        justify-content: space-between;
        padding: 12px 0;
        font-size: 24px;
        font-weight: 600;
        letter-spacing: -0.01em;
        color: var(--ink);
    }

    .nav-mega-arrow {
        width: 14px;
        height: 9px;
        color: var(--muted);
    }

    /* Collapsible height via the grid-rows trick, so it animates. */
    .nav-mega-menu {
        display: grid;
        grid-template-rows: 0fr;
        visibility: hidden;
        transition: grid-template-rows 0.35s var(--ease-out), visibility 0s linear 0.35s;
    }

    .nav-item-with-mega.is-open .nav-mega-menu {
        grid-template-rows: 1fr;
        visibility: visible;
        transition: grid-template-rows 0.35s var(--ease-out), visibility 0s;
    }

    .nav-mega-inner {
        min-height: 0;
        overflow: hidden;
    }

    .nav-mega-section {
        padding-bottom: 16px;
    }

    .nav-mega-heading {
        padding: 0;
        margin-bottom: 6px;
        font-size: 11px;
    }

    .nav-mega-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2px 8px;
    }

    .nav-mega-link {
        gap: 10px;
        min-height: 48px;
        padding: 6px 8px 6px 0;
    }

    .nav-mega-link:hover {
        background: none;
    }

    .nav-mega-link:active {
        background: var(--bg-alt);
    }

    .nav-mega-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .nav-mega-icon svg {
        width: 18px;
        height: 18px;
    }

    .nav-mega-name {
        font-size: 15px;
        font-weight: 500;
        gap: 4px;
    }

    .nav-mega-desc {
        display: none;
    }

    .nav-mega-badge {
        padding: 1px 5px;
        font-size: 9px;
    }

    .nav-mega-footer {
        padding: 4px 0 16px;
    }

    .nav-mega-view-all {
        min-height: 44px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .nav-mega-list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-mega-menu,
    .nav-mega-arrow,
    .nav-mega-icon {
        transition: none !important;
    }
}

/* ==========================================
   Back to Top Button
   ========================================== */

.back-to-top {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #F58345;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #E7742F;
    transform: translateY(-2px);
}

.back-to-top:active {
    transform: translateY(0);
}

.back-to-top:focus {
    outline: 2px solid #F58345;
    outline-offset: 2px;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 90px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none !important;
    }
}
