@font-face {
    font-family: "Plantree Roboto";
    src: url("/static/assets/Roboto.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --graphite: #373530;
    --line: #e7e4e0;
    --surface: #ffffff;
    --soft: #f4f4f4;
    --coral: #de6b4a;
    --plum: #8a377f;
    --outer-gap: clamp(24px, 4vh, 42px);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body {
    overflow-x: hidden;
    background: #fbfaf8;
    color: var(--graphite);
}

.landing-page {
    overflow-y: hidden;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

.landing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 100svh;
}

.hero-copy {
    position: relative;
    display: flex;
    align-self: stretch;
    flex-direction: column;
    justify-content: center;
    padding: 7vw clamp(42px, 7vw, 118px);
}

.brand-lockup {
    position: absolute;
    top: var(--outer-gap);
    left: clamp(42px, 7vw, 118px);
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--graphite);
    text-decoration: none;
}

.brand-lockup:focus-visible,
.error-logo-link:focus-visible {
    border-radius: 8px;
    outline: 3px solid var(--plum);
    outline-offset: 4px;
}

.brand-lockup img {
    display: block;
    width: clamp(34px, 2.8vw, 44px);
    height: auto;
}

.brand-name {
    font-size: clamp(24px, 2.15vw, 34px);
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 1;
    white-space: nowrap;
}

.brand-suffix {
    color: var(--coral);
}

.slogan {
    display: flex;
    flex-direction: column;
    margin: 0;
    font-size: clamp(48px, 5.35vw, 88px);
    font-weight: 780;
    letter-spacing: -0.035em;
    line-height: 1.12;
    row-gap: 0.08em;
}

.slogan span:nth-child(1) {
    color: var(--coral);
}

.slogan span:nth-child(2) {
    color: var(--graphite);
}

.slogan span:nth-child(3) {
    color: var(--plum);
}

.android-download {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-top: clamp(24px, 3vw, 40px);
    border-radius: 12px;
    transition: background-color 160ms ease;
}

.android-download img {
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    .android-download:hover {
        background: var(--line);
    }
}

.android-download:focus-visible {
    outline: 3px solid var(--plum);
    outline-offset: 4px;
}

.phone-stage {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.phone-shell {
    height: calc(100svh - (2 * var(--outer-gap)));
    aspect-ratio: 9 / 20;
    margin-block: var(--outer-gap);
    margin-right: var(--outer-gap);
    padding: 8px;
    overflow: hidden;
    border-radius: 46px;
    background: #242321;
    box-shadow: 0 24px 68px rgba(55, 53, 48, 0.18), 0 3px 10px rgba(55, 53, 48, 0.16);
}

.phone-screen {
    --app-scale: 1.2;
    position: relative;
    container-type: inline-size;
    font-family: "Plantree Roboto", sans-serif;
    display: grid;
    contain: layout paint;
    min-width: 0;
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 38px;
    background: var(--surface);
}

.android-status-bar {
    position: relative;
    min-width: 0;
    width: 100%;
    aspect-ratio: 1080 / 132;
    overflow: hidden;
    background: #fff;
}

.android-status-bar time {
    position: absolute;
    z-index: 1;
    left: 7.4%;
    top: 52%;
    font-family: "Plantree Roboto", sans-serif;
    font-size: 3.89cqw;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    transform: translateY(-50%);
}

.android-status-icons {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    clip-path: inset(0 0 0 18%);
}

.task-screen {
    --app-unit: calc(100cqw / 411.4286 * var(--app-scale));
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    overflow-anchor: none;
}

.task-screen::-webkit-scrollbar,
.list-switcher::-webkit-scrollbar {
    display: none;
}

.task-header {
    position: sticky;
    z-index: 2;
    top: calc(-40 * var(--app-unit));
    display: flex;
    height: calc(70 * var(--app-unit));
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 calc(20 * var(--app-unit)) calc(6 * var(--app-unit));
    background: #fff;
}

.is-header-collapsed .task-header {
    box-shadow: 0 calc(2px * var(--app-scale)) calc(4px * var(--app-scale)) rgb(55 53 48 / 10%);
}

.task-header h2 {
    margin: 0;
    white-space: nowrap;
    font-size: calc(25.2 * var(--app-unit));
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.2;
    transform-origin: bottom left;
    transform: scale(calc(1 - var(--header-progress, 0) * 0.428571));
}

.sync-login {
    display: grid;
    width: max(44px, calc(44 * var(--app-unit)));
    height: max(44px, calc(44 * var(--app-unit)));
    flex: 0 0 auto;
    place-items: center;
    margin-right: calc(-8 * var(--app-unit));
    margin-bottom: calc(-8 * var(--app-unit));
    border-radius: calc(12 * var(--app-unit));
    color: inherit;
    text-decoration: none;
}

.sync-login:hover {
    background: var(--soft);
}

.sync-login:focus-visible {
    outline: calc(3px * var(--app-scale)) solid rgba(222, 107, 74, 0.52);
    outline-offset: calc(2px * var(--app-scale));
}

.sync-status {
    position: relative;
    width: calc(28 * var(--app-unit));
    height: calc(24 * var(--app-unit));
    flex: 0 0 auto;
}

.sync-status img {
    display: block;
    width: 100%;
    height: 100%;
    opacity: calc(1 - var(--header-progress, 0));
    object-fit: contain;
}

/* Pixel: a 10 dp status dot, independent of the fading cloud outline. */
.sync-status::after {
    position: absolute;
    left: calc(16 * var(--app-unit));
    top: calc(14 * var(--app-unit));
    width: calc(10 * var(--app-unit));
    height: calc(10 * var(--app-unit));
    box-shadow: 0 0 0 calc(1.5 * var(--app-unit)) #fff;
    border-radius: 50%;
    background: #ff2d2d;
    content: "";
}

.task-tree {
    display: flex;
    row-gap: calc(4 * var(--app-unit));
    flex-direction: column;
    margin: 0;
    padding: calc(22 * var(--app-unit)) calc(12 * var(--app-unit)) calc(128 * var(--app-unit)) 0;
    list-style: none;
}

.task-row {
    position: relative;
    min-height: calc(34 * var(--app-unit));
    padding-left: calc(var(--tree-depth) * 20 * var(--app-unit));
}

.task-check {
    position: relative;
    display: block;
    min-height: calc(34 * var(--app-unit));
    cursor: pointer;
}

.task-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.checkbox-visual {
    position: absolute;
    left: calc(21.5 * var(--app-unit));
    top: calc(7.5 * var(--app-unit));
    display: grid;
    width: calc(19 * var(--app-unit));
    height: calc(19 * var(--app-unit));
    place-items: center;
    border: calc(2 * var(--app-unit)) solid #666666;
    border-radius: calc(2 * var(--app-unit));
    background: white;
}

.checkbox-visual.has-collapsed-count {
    color: #666666;
    font-size: calc(10 * var(--app-unit));
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.task-check input:checked + .checkbox-visual {
    border-color: var(--plum);
    background: var(--plum);
}

.task-check input:checked + .checkbox-visual::after {
    position: absolute;
    top: calc(1 * var(--app-unit));
    left: calc(5 * var(--app-unit));
    width: calc(5 * var(--app-unit));
    height: calc(10 * var(--app-unit));
    border: solid white;
    border-width: 0 calc(2 * var(--app-unit)) calc(2 * var(--app-unit)) 0;
    content: "";
    transform: rotate(45deg);
}

.task-check input:focus-visible + .checkbox-visual,
.collapse-button:focus-visible,
.list-card:focus-visible {
    outline: calc(3px * var(--app-scale)) solid rgba(222, 107, 74, 0.52);
    outline-offset: calc(3px * var(--app-scale));
}

.task-copy {
    position: relative;
    display: block;
    padding: calc(4 * var(--app-unit)) calc(32 * var(--app-unit)) calc(3 * var(--app-unit)) calc(48 * var(--app-unit));
}

.task-text {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: calc(5 * var(--app-unit));
    font-size: calc(18 * var(--app-unit));
    font-weight: 400;
    letter-spacing: normal;
    line-height: calc(24 * var(--app-unit));
    transform: translateY(calc(1.5 * var(--app-unit)));
}

.task-text-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.task-brand-icon {
    display: block;
    width: calc(18 * var(--app-unit));
    height: calc(18 * var(--app-unit));
    flex: 0 0 auto;
    object-fit: contain;
}

.task-brand-icon[data-brand="chatgpt"] {
    border-radius: calc(4 * var(--app-unit));
    background: #000;
}

.task-check input:checked ~ .task-copy .task-text {
    color: #aaa6a0;
}

.task-check input:checked ~ .task-copy .task-text-label {
    text-decoration: line-through;
    text-decoration-thickness: calc(1 * var(--app-unit));
}

.task-check input:checked ~ .task-copy .task-brand-icon {
    opacity: 0.48;
}

.has-metadata .task-copy {
    padding-top: calc(9 * var(--app-unit));
}

.task-metadata {
    position: absolute;
    top: 0;
    left: calc(48 * var(--app-unit));
    max-width: calc(100% - 80 * var(--app-unit));
    display: flex;
}

.task-meta-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #888888;
    font-size: calc(8 * var(--app-unit));
    font-weight: 400;
    padding: calc(1 * var(--app-unit)) calc(5 * var(--app-unit));
    border-radius: calc(3 * var(--app-unit));
    background: #f4f4f4;
    line-height: calc(11 * var(--app-unit));
}

.task-meta-text[data-kind="today"] {
    color: #8a377f99;
    font-weight: 700;
}

.task-meta-text[data-kind="tomorrow"] {
    color: #de6b4acc;
}

.task-memberships {
    position: absolute;
    top: calc(8 * var(--app-unit));
    left: calc(var(--tree-depth) * 20 * var(--app-unit));
    width: calc(20 * var(--app-unit));
    height: calc(18 * var(--app-unit));
    display: flex;
    justify-content: flex-end;
    padding-right: calc(1 * var(--app-unit));
    pointer-events: none;
}

.membership-marker {
    position: relative;
    width: calc(4 * var(--app-unit));
    height: 100%;
    flex-shrink: 0;
    background: var(--marker-color);
}

.membership-marker::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(1 * var(--app-unit));
    height: calc(5 * var(--app-unit));
    transform: translate(-50%, -50%);
    background: white;
    content: "";
}

.collapse-button {
    position: absolute;
    top: 0;
    right: calc(-1 * var(--app-unit));
    display: grid;
    width: calc(34 * var(--app-unit));
    height: calc(34 * var(--app-unit));
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: calc(6 * var(--app-unit));
    background: transparent;
    cursor: pointer;
}

.collapse-button:hover {
    background: var(--soft);
}

.collapse-button img {
    width: calc(24 * var(--app-unit));
    height: calc(24 * var(--app-unit));
    transition: transform 160ms ease;
}

.collapse-button img.is-collapsed {
    transform: rotate(-90deg);
}

.list-drawer {
    /* Pixel 8 reference: 1080 physical px / 2.625 density = 411.43 dp. */
    --filter-unit: calc(100cqw / 411.4286 * var(--app-scale));
    position: absolute;
    z-index: 3;
    inset: auto 0 0;
    padding: calc(14 * var(--filter-unit)) calc(13 * var(--filter-unit)) calc(20 * var(--filter-unit));
    border-top: calc(1px * var(--app-scale)) solid var(--line);
    background: #fff;
    transition: transform 260ms cubic-bezier(0.2, 0, 0, 1);
}

.is-drawer-hidden .list-drawer:not(:has(:focus-visible)) {
    transform: translateY(calc(100% - 12px * var(--app-scale)));
}

.drawer-handle {
    position: absolute;
    top: calc(-7px * var(--app-scale));
    left: calc(50% - 20px * var(--app-scale));
    width: calc(40px * var(--app-scale));
    height: calc(4px * var(--app-scale));
    border-radius: calc(5px * var(--app-scale));
    background: #d8d5d1;
}

.list-drawer h3 {
    margin: 0 0 calc(12 * var(--filter-unit));
    font-size: calc(16 * var(--filter-unit));
    font-weight: 780;
    letter-spacing: -0.025em;
}

.list-switcher {
    display: flex;
    gap: calc(13 * var(--filter-unit));
    overflow-x: auto;
    margin-inline: calc(-13 * var(--filter-unit));
    padding: calc(2px * var(--app-scale)) 0 calc(4px * var(--app-scale));
    padding-inline: calc(13 * var(--filter-unit) + 1px * var(--app-scale));
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-padding-inline: calc(13 * var(--filter-unit) + 1px * var(--app-scale));
    scroll-snap-type: x proximity;
}

.list-card {
    position: relative;
    isolation: isolate;
    display: grid;
    flex: 0 0 auto;
    min-width: calc(114 * var(--filter-unit));
    height: max(calc(44px * var(--app-scale)), calc(42 * var(--filter-unit)));
    grid-template-columns: calc(30 * var(--filter-unit)) auto;
    align-items: center;
    gap: calc(6 * var(--filter-unit));
    padding: 0 calc(6 * var(--filter-unit));
    scroll-snap-align: start;
    border: 0;
    border-radius: calc(6 * var(--filter-unit));
    background: transparent;
    color: #95918c;
    cursor: pointer;
    text-align: left;
}

.list-card::before {
    position: absolute;
    z-index: -1;
    inset: 50% 0 auto;
    height: calc(42 * var(--filter-unit));
    border-radius: inherit;
    background: var(--soft);
    transform: translateY(-50%);
    content: "";
}

.list-card[aria-pressed="true"]::before {
    background: linear-gradient(90deg, var(--plum), var(--coral));
}

.list-card[aria-pressed="true"] {
    color: #fff;
}

.list-card-emoji,
.list-card-icon-container {
    display: grid;
    width: calc(30 * var(--filter-unit));
    height: calc(30 * var(--filter-unit));
    place-items: center;
    border-radius: calc(6 * var(--filter-unit));
    background: white;
}

.list-card-emoji {
    font-family: system-ui, sans-serif;
    font-size: calc(18 * var(--filter-unit));
    line-height: 1;
}

.list-card-icon {
    width: calc(20 * var(--filter-unit));
    height: calc(20 * var(--filter-unit));
    object-fit: contain;
}

.list-card-label {
    max-width: calc(100 * var(--filter-unit));
    font-size: calc(12 * var(--filter-unit));
    font-weight: 750;
    line-height: 1.2;
}

.list-card--all .list-card-label {
    max-width: calc(50 * var(--filter-unit));
}

.today-calendar {
    display: flex;
    width: calc(30 * var(--filter-unit));
    height: calc(30 * var(--filter-unit));
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: calc(6 * var(--filter-unit));
    background: white;
    color: var(--coral);
}

.today-number {
    font-size: calc(16 * var(--filter-unit));
    font-weight: 650;
    line-height: 1;
}

.today-weekday {
    margin-top: calc(2 * var(--filter-unit));
    color: #77736d;
    font-size: calc(8 * var(--filter-unit));
    text-transform: uppercase;
}

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

.dashboard-page {
    overflow-y: auto;
}

.dashboard-shell {
    width: min(100%, 1440px);
    min-height: 100svh;
    margin: 0 auto;
    padding: var(--outer-gap) clamp(24px, 5vw, 72px) clamp(40px, 7vw, 88px);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.dashboard-page .brand-lockup {
    position: static;
    flex: 0 0 auto;
}

.account-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.account-copy {
    display: grid;
    gap: 4px;
    margin: 0;
    text-align: right;
}

.account-copy span {
    color: #77736d;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.email {
    max-width: min(42vw, 360px);
    overflow: hidden;
    color: var(--graphite);
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sign-out-button,
.error-home-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--graphite);
    cursor: pointer;
    font-weight: 720;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.sign-out-button:hover,
.error-home-link:hover {
    border-color: #d6d0ca;
    background: var(--soft);
}

.sign-out-button:active,
.error-home-link:active {
    transform: translateY(1px);
}

.sign-out-button:focus-visible,
.error-home-link:focus-visible {
    outline: 3px solid rgba(222, 107, 74, 0.42);
    outline-offset: 3px;
}

.dashboard-content {
    padding-top: clamp(76px, 10vw, 144px);
}

.dashboard-intro {
    position: relative;
    margin-bottom: clamp(40px, 6vw, 72px);
}

.dashboard-kicker,
.card-eyebrow {
    margin: 0 0 12px;
    color: var(--coral);
    font-size: 12px;
    font-weight: 780;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-intro h1 {
    min-width: 0;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(18px, 2vw, 28px);
    align-items: stretch;
}

.dashboard-card {
    min-width: 0;
    padding: clamp(24px, 3vw, 40px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 0 22px 60px rgba(55, 53, 48, 0.07);
}

.dashboard-card h2 {
    margin: 0;
    color: var(--graphite);
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 760;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.endpoint-heading-row {
    --endpoint-size: clamp(26px, 3.6vw, 52px);
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.1vw, 16px);
    margin: 20px 0;
}

.endpoint-url {
    display: block;
    overflow-wrap: anywhere;
    color: var(--plum);
    font-family: "Plantree Roboto", ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: var(--endpoint-size);
    font-weight: 650;
    letter-spacing: -0.035em;
    line-height: 1.25;
}

.endpoint-icon-download {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: var(--endpoint-size);
    height: var(--endpoint-size);
    border-radius: 10px;
    color: var(--plum);
}

.endpoint-icon-download img {
    display: block;
    width: 100%;
    height: 100%;
}

.endpoint-icon-badge {
    position: absolute;
    right: -8px;
    bottom: -12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--graphite);
    border-radius: 5px;
    background: rgba(250, 249, 247, 0.8);
    opacity: 0;
    transition: opacity 160ms ease;
}

.endpoint-icon-download:hover .endpoint-icon-badge,
.endpoint-icon-download:focus-visible .endpoint-icon-badge {
    opacity: 0.85;
}

.endpoint-icon-download:focus-visible {
    outline: none;
}

@media (hover: none) {
    .endpoint-icon-badge {
        opacity: 0.85;
    }
}

.copy-endpoint-button {
    display: inline-flex;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: var(--plum);
    cursor: pointer;
    transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.copy-endpoint-button[hidden],
.copy-endpoint-button .copied-icon,
.copy-endpoint-button[data-state="copied"] .copy-icon {
    display: none;
}

.copy-endpoint-button[data-state="copied"] .copied-icon {
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    .copy-endpoint-button:hover {
        border-color: #d9bdd3;
        background: #ece0e9;
    }
}

.copy-endpoint-button:active {
    border-color: #d9bdd3;
    background: #ece0e9;
    transform: scale(0.96);
}

.copy-endpoint-button:focus-visible {
    outline: 3px solid rgba(222, 107, 74, 0.42);
    outline-offset: 3px;
    transition: none;
}

.endpoint-copy-status {
    position: absolute;
    top: 100%;
    margin: 8px 0 0;
    color: var(--plum);
    font-size: 13px;
    line-height: 1.4;
}

.endpoint-note {
    max-width: 34rem;
    margin: 0;
    color: #77736d;
    font-size: 15px;
    line-height: 1.55;
}

.devices-card {
    display: flex;
    min-height: 390px;
    flex-direction: column;
}

.devices-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.selection-status {
    max-width: 230px;
    margin: 0;
    padding: 9px 12px;
    border-radius: 999px;
    background: #fff2ed;
    color: #a34227;
    font-size: 12px;
    font-weight: 720;
    line-height: 1.3;
    text-align: center;
}

.selection-status:empty {
    display: none;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.device-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid #ece9e5;
    border-radius: 18px;
    background: #fbfaf8;
}

.device-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.device-card h3,
.empty-state h3 {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--graphite);
    font-size: 17px;
    font-weight: 740;
    line-height: 1.25;
}

.device-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    color: #77736d;
    font-size: 12px;
    font-weight: 720;
}

.device-status::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #aaa6a0;
    content: "";
}

.device-status[data-status="online"] {
    color: #357153;
}

.device-status[data-status="online"]::before {
    background: #42a66c;
}

.device-version {
    margin: 9px 0 18px;
    color: #88837c;
    font-size: 13px;
    line-height: 1.35;
}

.selected-badge {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 8px;
    background: #f5eaf4;
    color: var(--plum);
    font-size: 11px;
    font-weight: 760;
}

.device-delete {
    margin-top: 18px;
    font-size: 13px;
    line-height: 1.5;
}

.device-delete summary {
    width: fit-content;
    padding: 8px 0;
    color: #a3313d;
    cursor: pointer;
}

.device-delete p {
    color: #77736d;
    margin: 8px 0 14px;
}

.delete-device-button {
    max-width: 100%;
    padding: 10px 14px;
    border: 1px solid #a3313d;
    border-radius: 10px;
    background: #a3313d;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.delete-device-button:hover {
    background: #842632;
}

.device-delete summary:focus-visible,
.delete-device-button:focus-visible {
    outline: 3px solid var(--plum);
    outline-offset: 4px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: clamp(28px, 5vw, 56px) 24px;
    border: 1px dashed #d9d5d0;
    border-radius: 18px;
    text-align: center;
}

.empty-state p {
    max-width: 410px;
    margin: 10px auto 0;
    color: #77736d;
    font-size: 14px;
    line-height: 1.5;
}

.dashboard-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 26px;
    color: #908b84;
    font-size: 12px;
}

.dashboard-meta p {
    margin: 0;
}

.dashboard-status {
    color: var(--coral);
    font-weight: 720;
}

.dashboard-status a {
    color: var(--plum);
    text-underline-offset: 3px;
}

.oauth-page .brand-lockup {
    position: static;
    margin: 0;
}

.oauth-home-link {
    flex: 0 0 auto;
    padding: 12px 0;
    color: #68635d;
    font-size: 14px;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.oauth-content {
    width: min(100%, 680px);
    margin: clamp(48px, 7vw, 88px) auto 0;
}

.oauth-intro {
    margin-bottom: 28px;
}

.oauth-intro h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 760;
    letter-spacing: -0.04em;
    line-height: 1.12;
    text-wrap: balance;
}

.oauth-description {
    margin: 18px 0 0;
    color: #68635d;
    font-size: 16px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.oauth-description strong {
    color: var(--plum);
    font-weight: 700;
}

.oauth-details {
    display: grid;
    gap: 20px;
    margin: 24px 0 28px;
}

.oauth-details > div {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.oauth-details dt {
    color: #68635d;
}

.oauth-details dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.oauth-resource {
    color: var(--plum);
    font-weight: 650;
}

.oauth-permissions {
    padding: 22px;
    border: 1px solid #e8dce5;
    border-radius: 18px;
    background: #f8f3f7;
}

.oauth-card h2 {
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.oauth-permissions h2 {
    font-size: 17px;
}

.oauth-permissions p {
    margin: 12px 0 0;
    color: #68635d;
    font-size: 14px;
    line-height: 1.6;
}

.oauth-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.oauth-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 720;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    transition: background-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.oauth-button-primary {
    background: var(--plum);
    color: white;
}

.oauth-button-secondary {
    border-color: var(--line);
    background: var(--surface);
    color: var(--graphite);
}

@media (hover: hover) and (pointer: fine) {
    .oauth-button-primary:hover {
        background: #742c6a;
    }

    .oauth-button-secondary:hover {
        background: var(--soft);
    }
}

.oauth-button:active {
    transform: scale(0.97);
}

.oauth-button:focus-visible,
.oauth-home-link:focus-visible {
    outline: 3px solid var(--plum);
    outline-offset: 4px;
    transition: none;
}

@media (max-width: 520px) {
    .oauth-shell {
        padding-inline: 20px;
    }

    .oauth-page .dashboard-header {
        gap: 16px;
        align-items: center;
    }

    .oauth-card {
        padding: 22px;
        border-radius: 22px;
    }

    .oauth-details > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .oauth-permissions {
        padding: 18px;
    }

    .oauth-actions {
        flex-direction: column;
    }

    .oauth-button {
        width: 100%;
    }
}

.error-page {
    display: grid;
    min-height: 100svh;
    place-items: center;
    padding: 24px;
}

.error-card {
    width: min(100%, 500px);
    padding: clamp(32px, 6vw, 58px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 0 22px 60px rgba(55, 53, 48, 0.08);
    text-align: center;
}

.error-logo {
    display: block;
    width: 52px;
    height: auto;
}

.error-logo-link {
    display: inline-block;
}

.error-card h1 {
    margin: 24px 0 12px;
    font-size: clamp(32px, 7vw, 52px);
    letter-spacing: -0.04em;
    line-height: 1;
}

.error-card p {
    margin: 0 0 28px;
    color: #77736d;
    line-height: 1.55;
}

@media (max-width: 860px) {
    body {
        overflow-y: auto;
    }

    .landing {
        display: flex;
        min-height: auto;
        flex-direction: column;
        padding: 40px 18px 34px;
    }

    .hero-copy {
        width: min(100%, 520px);
        padding: 0 2px 34px;
    }

    .brand-lockup {
        position: static;
        gap: 11px;
        margin-bottom: 28px;
    }

    .brand-lockup img {
        width: 34px;
    }

    .brand-name {
        font-size: 24px;
    }

    .slogan {
        font-size: clamp(28px, 9.2vw, 48px);
    }

    .phone-stage {
        width: 100%;
        justify-content: center;
    }

    .phone-shell {
        width: min(100%, 370px);
        height: auto;
        margin: 0;
    }

    .dashboard-shell {
        padding: 30px 18px 48px;
    }

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

    .dashboard-page .brand-lockup {
        margin-bottom: 0;
    }

    .account-copy {
        display: none;
    }

    .dashboard-content {
        padding-top: 76px;
    }

    .dashboard-intro {
        margin-bottom: 56px;
    }

    .devices-card {
        min-height: auto;
    }

    .copy-endpoint-button {
        width: 44px;
        height: 44px;
    }

    .device-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-meta {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .dashboard-page .brand-name {
        display: none;
    }

    .devices-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .selection-status {
        max-width: none;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
