.shell {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.shell__header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: calc(var(--safe-top) + 10px) var(--gutter) 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--sp-3);
    background: var(--paper);
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur-2) var(--ease);
}

.shell__header--scrolled {
    border-bottom-color: var(--line);
}

.brand {
    display: flex;
    min-width: 0;
}

.brand__name {
    font-size: var(--step-1);
    font-weight: 700;
    letter-spacing: -0.015em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand__mark {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.brand__glyph {
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    overflow: hidden;
}

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

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.shell__main {
    flex: 1;
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--sp-4) var(--gutter) calc(var(--dock-height) + var(--safe-bottom) + var(--sp-6));
}

.dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: stretch;
    height: calc(var(--dock-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--paper);
    border-top: 1px solid var(--line);
}

.dock__item {
    position: relative;
    display: grid;
    grid-template-rows: auto auto;
    justify-items: center;
    align-content: center;
    gap: 3px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 500;
    transition: color var(--dur-2) var(--ease);
    -webkit-user-select: none;
    user-select: none;
}

.dock__item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.7;
    transition: transform var(--dur-2) var(--ease-out);
}

.dock__item:active svg {
    transform: scale(0.9);
}

.dock__item--active {
    color: var(--accent);
}

.dock__badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 20px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--r-pill);
    background: var(--signal);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.section {
    margin-top: var(--sp-6);
}

.section:first-child {
    margin-top: 0;
}

.section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-3);
}

.section__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section__link {
    font-size: var(--step--1);
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

.stack {
    display: grid;
    gap: var(--sp-3);
}

.stack--tight {
    gap: var(--sp-2);
}

.row {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.row--between {
    justify-content: space-between;
}

.grow {
    flex: 1;
    min-width: 0;
}
