/* Dev Hub workspace */

body:has(.devhub) {
    background: #07100d;
    background-image: none;
}

.devhub {
    --devhub-bg: #07100d;
    --devhub-panel: #101815;
    --devhub-panel-strong: #141d1a;
    --devhub-panel-soft: #0c1411;
    --devhub-line: rgba(189, 218, 206, 0.13);
    --devhub-line-strong: rgba(189, 218, 206, 0.22);
    --devhub-text: #f0f7f4;
    --devhub-muted: #98aaa3;
    --devhub-subtle: #71847c;
    --devhub-public: #66d3ab;
    --devhub-public-soft: rgba(102, 211, 171, 0.11);
    --devhub-login: #e6c979;
    --devhub-login-soft: rgba(230, 201, 121, 0.11);
    --devhub-restricted: #e7a1a4;
    --devhub-restricted-soft: rgba(231, 161, 164, 0.1);
    position: relative;
    width: 100%;
    min-height: calc(100svh - 4.5rem);
    overflow: hidden;
    padding: clamp(1.4rem, 3vw, 3rem) clamp(1rem, 3vw, 2.75rem) 4rem;
    background:
        radial-gradient(circle at 12% 0%, rgba(46, 135, 105, 0.13), transparent 31rem),
        radial-gradient(circle at 88% 20%, rgba(24, 95, 74, 0.1), transparent 34rem),
        linear-gradient(180deg, #08110e 0%, var(--devhub-bg) 55%, #050b09 100%);
    color: var(--devhub-text);
    color-scheme: dark;
    isolation: isolate;
}

.devhub__atmosphere {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(132, 183, 162, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(132, 183, 162, 0.025) 1px, transparent 1px);
    background-position: center top;
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 58%);
}

.devhub-shell {
    display: grid;
    gap: 1rem;
    width: min(100%, 80rem);
    margin: 0 auto;
}

.devhub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.35rem 1.5rem;
    border: 1px solid var(--devhub-line);
    border-radius: 1.5rem;
    background: rgba(14, 23, 19, 0.86);
    box-shadow: 0 24px 70px -52px rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(18px);
    animation: devhub-enter 480ms var(--motion-ease-enter) both;
}

.devhub-header__identity {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    min-width: 0;
}

.devhub-brand-mark {
    display: grid;
    flex: 0 0 auto;
    width: 3.35rem;
    height: 3.35rem;
    place-items: center;
    border: 1px solid rgba(102, 211, 171, 0.28);
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(102, 211, 171, 0.17), rgba(102, 211, 171, 0.045));
    color: #a5ead0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.devhub-brand-mark .dev-page-icon {
    width: 1.45rem;
    height: 1.45rem;
}

.devhub-header__copy {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.devhub-kicker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: #80c9ad;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
}

.devhub-kicker__signal {
    width: 0.42rem;
    height: 0.42rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--devhub-public);
    box-shadow: 0 0 0 0.28rem rgba(102, 211, 171, 0.09), 0 0 1rem rgba(102, 211, 171, 0.38);
}

.devhub-title {
    margin: 0;
    color: var(--devhub-text);
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    font-weight: 760;
    letter-spacing: -0.045em;
    line-height: 1.03;
}

.devhub-intro {
    max-width: 42rem;
    margin: 0.18rem 0 0;
    color: var(--devhub-muted);
    font-size: clamp(0.82rem, 1.2vw, 0.94rem);
    line-height: 1.5;
}

.devhub-header__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.65rem;
}

.devhub-mode,
.devhub-sign-in {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.82rem;
    font-size: 0.72rem;
    font-weight: 780;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.devhub-mode {
    gap: 0.5rem;
    padding: 0 0.85rem;
    border: 1px solid rgba(102, 211, 171, 0.2);
    background: rgba(102, 211, 171, 0.07);
    color: #a5ead0;
    cursor: default;
    user-select: none;
}

.devhub-mode__dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--devhub-public);
    box-shadow: 0 0 0 0.22rem rgba(102, 211, 171, 0.1);
}

.devhub-sign-in {
    gap: 0.48rem;
    padding: 0 0.95rem;
    border: 1px solid #75d7b4;
    background: #83daba;
    color: #092018;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.devhub-sign-in svg,
.devroute__arrow svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.devhub-sign-in:hover {
    border-color: #a0efd2;
    background: #9ce8cd;
    color: #071a14;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -18px rgba(102, 211, 171, 0.8);
}

.devhub-sign-in:active {
    transform: translateY(0);
}

.devhub-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--devhub-line);
    border-radius: 1.25rem;
    background: rgba(11, 19, 16, 0.84);
    animation: devhub-enter 480ms var(--motion-ease-enter) 70ms both;
}

.devhub-overview__item {
    position: relative;
    display: grid;
    min-width: 0;
    gap: 0.32rem;
    padding: 1rem 1.15rem;
}

.devhub-overview__item + .devhub-overview__item {
    border-left: 1px solid var(--devhub-line);
}

.devhub-overview__item::before {
    content: "";
    position: absolute;
    top: 1rem;
    left: 1.15rem;
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 999px;
    background: currentColor;
}

.devhub-overview__item--public {
    color: var(--devhub-public);
}

.devhub-overview__item--login {
    color: var(--devhub-login);
}

.devhub-overview__item--restricted {
    color: var(--devhub-restricted);
}

.devhub-overview dt {
    margin: 0;
    padding-left: 0.8rem;
    color: inherit;
    font-size: 0.7rem;
    font-weight: 780;
    letter-spacing: 0.12em;
    line-height: 1.3;
    text-transform: uppercase;
}

.devhub-overview dd {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 0.65rem;
    margin: 0;
}

.devhub-overview dd strong {
    color: var(--devhub-text);
    font-size: 1.65rem;
    font-weight: 740;
    letter-spacing: -0.04em;
    line-height: 1;
}

.devhub-overview dd span {
    overflow: hidden;
    color: var(--devhub-muted);
    font-size: 0.8rem;
    font-weight: 580;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.devhub-workspace {
    display: grid;
    grid-template-columns: 14.5rem minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    animation: devhub-enter 520ms var(--motion-ease-enter) 130ms both;
}

.devhub-sidebar {
    position: sticky;
    top: 5.5rem;
    display: grid;
    gap: 0.85rem;
}

.devhub-sidebar__nav,
.devhub-testing-note {
    border: 1px solid var(--devhub-line);
    border-radius: 1.25rem;
    background: rgba(13, 22, 18, 0.9);
    box-shadow: 0 22px 60px -48px rgba(0, 0, 0, 0.95);
}

.devhub-sidebar__nav {
    padding: 0.7rem;
}

.devhub-sidebar__label {
    margin: 0;
    padding: 0.45rem 0.55rem 0.65rem;
    color: var(--devhub-subtle);
    font-size: 0.7rem;
    font-weight: 760;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.devhub-route-nav {
    display: grid;
    gap: 0.26rem;
}

.devhub-route-nav__link {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.58rem;
    min-height: 2.95rem;
    padding: 0.4rem 0.48rem;
    border: 1px solid transparent;
    border-radius: 0.85rem;
    color: var(--devhub-muted);
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
    transition: border-color 170ms ease, background-color 170ms ease, color 170ms ease, transform 170ms ease;
}

.devhub-route-nav__link:hover {
    border-color: var(--devhub-line);
    background: rgba(255, 255, 255, 0.035);
    color: var(--devhub-text);
    text-decoration: none;
    transform: translateX(2px);
}

.devhub-route-nav__link strong {
    display: grid;
    min-width: 1.55rem;
    height: 1.55rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--devhub-text);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.devhub-route-nav__icon {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    place-items: center;
    border-radius: 0.58rem;
    background: rgba(255, 255, 255, 0.045);
}

.devhub-route-nav__icon .dev-page-icon {
    width: 0.92rem;
    height: 0.92rem;
}

.devhub-route-nav__link--public .devhub-route-nav__icon {
    color: var(--devhub-public);
}

.devhub-route-nav__link--login .devhub-route-nav__icon {
    color: var(--devhub-login);
}

.devhub-route-nav__link--restricted .devhub-route-nav__icon {
    color: var(--devhub-restricted);
}

.devhub-testing-note {
    display: flex;
    gap: 0.7rem;
    padding: 0.9rem;
}

.devhub-testing-note__icon {
    display: grid;
    flex: 0 0 auto;
    width: 1.85rem;
    height: 1.85rem;
    place-items: center;
    border-radius: 0.62rem;
    background: var(--devhub-public-soft);
    color: var(--devhub-public);
}

.devhub-testing-note__icon svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
}

.devhub-testing-note strong {
    display: block;
    color: #dce9e4;
    font-size: 0.76rem;
    font-weight: 680;
    line-height: 1.4;
}

.devhub-testing-note p {
    margin: 0.18rem 0 0;
    color: var(--devhub-subtle);
    font-size: 0.72rem;
    line-height: 1.55;
}

.devhub-content {
    overflow: hidden;
    border: 1px solid var(--devhub-line);
    border-radius: 1.5rem;
    background: rgba(13, 21, 18, 0.92);
    box-shadow: 0 28px 80px -58px rgba(0, 0, 0, 0.98);
}

.devhub-section {
    scroll-margin-top: 6rem;
    padding: clamp(1.1rem, 2.2vw, 1.65rem);
}

.devhub-section + .devhub-section {
    border-top: 1px solid var(--devhub-line);
}

.devhub-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.devhub-section__identity {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.devhub-section__icon {
    display: grid;
    flex: 0 0 auto;
    width: 2.45rem;
    height: 2.45rem;
    place-items: center;
    border: 1px solid var(--devhub-line);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.025);
}

.devhub-section__icon .dev-page-icon {
    width: 1.08rem;
    height: 1.08rem;
}

.devhub-section--public .devhub-section__icon,
.devhub-section--public .devhub-section__eyebrow {
    color: var(--devhub-public);
}

.devhub-section--login .devhub-section__icon,
.devhub-section--login .devhub-section__eyebrow {
    color: var(--devhub-login);
}

.devhub-section--restricted .devhub-section__icon,
.devhub-section--restricted .devhub-section__eyebrow {
    color: var(--devhub-restricted);
}

.devhub-section__eyebrow {
    margin: 0 0 0.12rem;
    font-size: 0.68rem;
    font-weight: 780;
    letter-spacing: 0.13em;
    line-height: 1.35;
    text-transform: uppercase;
}

.devhub-section__title {
    margin: 0;
    color: var(--devhub-text);
    font-size: clamp(1.08rem, 2vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.devhub-section__meta {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.55rem;
}

.devhub-section__count {
    color: var(--devhub-muted);
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dev-page-status {
    display: inline-flex;
    min-height: 1.65rem;
    align-items: center;
    gap: 0.36rem;
    padding: 0 0.58rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 780;
    letter-spacing: 0.075em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.dev-page-status__dot {
    width: 0.3rem;
    height: 0.3rem;
    border-radius: 999px;
    background: currentColor;
}

.dev-page-status--public {
    border-color: rgba(102, 211, 171, 0.24);
    background: var(--devhub-public-soft);
    color: var(--devhub-public);
}

.dev-page-status--login {
    border-color: rgba(230, 201, 121, 0.24);
    background: var(--devhub-login-soft);
    color: var(--devhub-login);
}

.dev-page-status--restricted {
    border-color: rgba(231, 161, 164, 0.22);
    background: var(--devhub-restricted-soft);
    color: var(--devhub-restricted);
}

.dev-page-icon {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
}

.dev-page-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.7;
}

.devroute-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    overflow: hidden;
    padding: 1px;
    border-radius: 1rem;
    background: var(--devhub-line);
    list-style: none;
}

.devroute-list > li {
    min-width: 0;
    background: var(--devhub-panel);
}

.devroute {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr) auto 1.25rem;
    min-height: 4.65rem;
    align-items: center;
    gap: 0.72rem;
    padding: 0.72rem 0.82rem;
    color: inherit;
    text-decoration: none;
    transition: background-color 170ms ease, color 170ms ease, box-shadow 170ms ease;
}

.devroute:hover {
    background: var(--devhub-panel-strong);
    color: inherit;
    text-decoration: none;
    box-shadow: inset 3px 0 0 currentColor;
}

.devroute--public {
    color: var(--devhub-public);
}

.devroute--login {
    color: var(--devhub-login);
}

.devroute--restricted {
    color: var(--devhub-restricted);
}

.devroute__icon {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 0.74rem;
    background: rgba(255, 255, 255, 0.02);
    opacity: 0.82;
    transition: opacity 170ms ease, transform 170ms ease, background-color 170ms ease;
}

.devroute:hover .devroute__icon {
    background: rgba(255, 255, 255, 0.045);
    opacity: 1;
    transform: scale(1.04);
}

.devroute__icon .dev-page-icon {
    width: 1.08rem;
    height: 1.08rem;
}

.devroute__main {
    display: grid;
    min-width: 0;
    gap: 0.16rem;
}

.devroute__title {
    overflow: hidden;
    color: var(--devhub-text);
    font-size: 0.88rem;
    font-weight: 670;
    letter-spacing: -0.01em;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.devroute__path {
    overflow: hidden;
    color: var(--devhub-subtle);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.75rem;
    font-weight: 550;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.devroute__availability {
    max-width: 8.5rem;
    overflow: hidden;
    color: var(--devhub-muted);
    font-size: 0.75rem;
    font-weight: 620;
    line-height: 1.35;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.devroute__arrow {
    display: grid;
    width: 1.25rem;
    height: 1.25rem;
    place-items: center;
    color: currentColor;
    opacity: 0.56;
    transition: opacity 170ms ease, transform 170ms ease;
}

.devroute:hover .devroute__arrow {
    opacity: 1;
    transform: translateX(2px);
}

.devhub-empty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 4.5rem;
    padding: 0.9rem 1rem;
    border: 1px dashed var(--devhub-line-strong);
    border-radius: 1rem;
    background: var(--devhub-panel-soft);
}

.devhub-empty__icon {
    display: grid;
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    border-radius: 0.7rem;
    background: var(--devhub-restricted-soft);
    color: var(--devhub-restricted);
}

.devhub-empty p {
    margin: 0;
    color: var(--devhub-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.devhub :is(a, button):focus-visible {
    outline: 2px solid #9ce8cd;
    outline-offset: 3px;
}

@keyframes devhub-enter {
    from {
        opacity: 0;
        transform: translateY(0.7rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1040px) {
    .devhub-workspace {
        grid-template-columns: 1fr;
    }

    .devhub-sidebar {
        position: static;
        grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.58fr);
    }

    .devhub-route-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .devhub-route-nav__link:hover {
        transform: translateY(-1px);
    }
}

@media (max-width: 780px) {
    .devhub {
        padding-inline: 0.8rem;
    }

    .devhub-header {
        align-items: flex-start;
    }

    .devhub-header__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .devhub-mode,
    .devhub-sign-in {
        min-height: 2.4rem;
    }

    .devhub-overview dd span {
        white-space: normal;
    }

    .devhub-sidebar {
        grid-template-columns: 1fr;
    }

    .devhub-testing-note {
        display: none;
    }

    .devroute-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .devhub {
        min-height: calc(100svh - 4rem);
        padding-top: 0.8rem;
        padding-bottom: 2.5rem;
    }

    .devhub-shell {
        gap: 0.75rem;
    }

    .devhub-header {
        display: grid;
        gap: 1rem;
        padding: 1rem;
        border-radius: 1.15rem;
    }

    .devhub-brand-mark {
        width: 2.8rem;
        height: 2.8rem;
        border-radius: 0.85rem;
    }

    .devhub-title {
        font-size: 1.8rem;
    }

    .devhub-intro {
        font-size: 0.8rem;
    }

    .devhub-header__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .devhub-overview {
        grid-template-columns: 1fr;
        border-radius: 1.05rem;
    }

    .devhub-overview__item {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        padding: 0.85rem 1rem;
    }

    .devhub-overview__item + .devhub-overview__item {
        border-top: 1px solid var(--devhub-line);
        border-left: 0;
    }

    .devhub-overview__item::before {
        top: 50%;
        left: 1rem;
        transform: translateY(-50%);
    }

    .devhub-overview dd {
        justify-self: end;
    }

    .devhub-overview dd strong {
        font-size: 1.4rem;
    }

    .devhub-overview dd span {
        display: none;
    }

    .devhub-sidebar__nav {
        padding: 0.45rem;
        border-radius: 1.05rem;
    }

    .devhub-sidebar__label {
        display: none;
    }

    .devhub-route-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.2rem;
    }

    .devhub-route-nav__link {
        grid-template-columns: 1.65rem minmax(0, 1fr);
        gap: 0.42rem;
        min-height: 2.65rem;
        padding: 0.35rem;
        font-size: 0.75rem;
    }

    .devhub-route-nav__link strong {
        display: none;
    }

    .devhub-route-nav__icon {
        width: 1.65rem;
        height: 1.65rem;
    }

    .devhub-content {
        border-radius: 1.15rem;
    }

    .devhub-section {
        padding: 1rem 0.82rem;
    }

    .devhub-section__header {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .devhub-section__icon {
        width: 2.2rem;
        height: 2.2rem;
    }

    .devhub-section__title {
        font-size: 1rem;
    }

    .devhub-section__meta .dev-page-status {
        display: none;
    }

    .devroute {
        grid-template-columns: 2.2rem minmax(0, 1fr) 1.1rem;
        min-height: 4.35rem;
        gap: 0.65rem;
        padding: 0.65rem 0.72rem;
    }

    .devroute__icon {
        width: 2.2rem;
        height: 2.2rem;
    }

    .devroute__availability {
        grid-column: 2;
        max-width: none;
        margin-top: -0.36rem;
        overflow: visible;
        font-size: 0.75rem;
        text-align: left;
        text-overflow: clip;
        white-space: normal;
    }

    .devroute__arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

@media (max-width: 390px) {
    .devhub-header__identity {
        align-items: flex-start;
    }

    .devhub-kicker {
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    .devhub-header__actions {
        grid-template-columns: 1fr;
    }

    .devhub-route-nav__link {
        display: flex;
        justify-content: center;
    }

    .devhub-route-nav__link > span:not(.devhub-route-nav__icon) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .devhub-header,
    .devhub-overview,
    .devhub-workspace {
        animation: none;
    }

    .devhub :is(a, span) {
        transition: none !important;
    }
}
