.grid {
    display: grid;
    gap: 16px;
}
.shell,
.course-shell,
.editorial-shell {
    min-height: 100dvh;
}
.content,
.course-shell {
    background: transparent;
}

.card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .56);
    backdrop-filter: blur(12px) saturate(112%);
    -webkit-backdrop-filter: blur(12px) saturate(112%);
}

.button,
.editorial-button,
.editorial-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 250, .35);
    color: var(--ink);
    font-size: 13px;
    font-weight: 760;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.button:hover,
.editorial-button:hover,
.editorial-cta:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--ink) 45%, var(--line));
    background: rgba(255, 255, 250, .58);
    box-shadow: var(--shadow-small);
}

.editorial-button-dark:hover,
.editorial-button-dark:focus-visible {
    border-color: color-mix(in srgb, var(--ink) 82%, var(--accent));
    background: color-mix(in srgb, var(--ink) 88%, var(--accent));
    color: var(--canvas);
    box-shadow: 0 10px 24px rgba(18, 21, 16, .14);
}

.button:active,
.editorial-button:active,
.editorial-cta:active {
    transform: translateY(0) scale(.98);
}

.button.primary,
.button.completed,
.editorial-button-dark,
.status-card .button {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--canvas);
}

.button.danger {
    border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
    color: var(--danger);
}

.progress,
.week-bar,
.editorial-progress,
.next-panel-bar {
    position: relative;
    overflow: hidden;
    height: 6px;
    border-radius: 999px;
    background: rgba(18, 21, 16, .14);
}

.progress {
    margin: 18px 0 12px;
}

.progress > i,
.week-bar i,
.editorial-progress i,
.next-panel-bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--route, var(--accent));
    transition: width .55s cubic-bezier(.16, 1, .3, 1);
}

.eyebrow,
.section-kicker,
.metric span,
.status-card > span,
.table th {
    color: var(--muted);
    font: 760 10px/1 var(--mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.table tr:last-child td {
    border-bottom: 0;
}

.table td:last-child {
    text-align: right;
}

/* Shared navigation */
.editorial-header,
.sidebar,
.course-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 76px;
    padding: 0 clamp(20px, 3.5vw, 56px);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--canvas) 88%, transparent);
    backdrop-filter: blur(18px) saturate(112%);
    -webkit-backdrop-filter: blur(18px) saturate(112%);
}

.editorial-brand,
.brand,
.course-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    color: var(--ink);
}

.brand-mark,
.logo,
.course-brand span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--canvas);
    font: 800 12px/1 var(--mono);
    letter-spacing: .06em;
}

.brand-copy,
.brand span:last-child,
.course-brand strong {
    color: var(--ink);
    font: 760 11px/1.05 var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}

body[data-page="route"] .brand span:last-child {
    font-size: 0;
}

body[data-page="route"] .brand span:last-child::after {
    content: "Learning Routes";
    font: 760 11px/1.05 var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.editorial-nav,
.nav,
.course-nav {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 28px);
    min-width: 0;
}

.editorial-nav a,
.nav a,
.course-nav a {
    position: relative;
    padding: 27px 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.editorial-nav a::after,
.nav a::after,
.course-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 19px;
    height: 2px;
    background: var(--ink);
    transition: right .18s ease;
}

body:not(.navigation-ready) .editorial-nav a::after,
body:not(.navigation-ready) .nav a::after,
body:not(.navigation-ready) .course-nav a::after {
    transition: none;
}

.editorial-nav a:hover::after,
.editorial-nav a.active::after,
.editorial-nav a.active-route::after,
.nav a:hover::after,
.nav a.active::after,
.nav a.active-route::after,
.course-nav a:hover::after,
.course-nav a.active::after,
.course-nav a.active-route::after {
    right: 0;
}

body[data-page="route"] .editorial-nav a.active-route::after,
body[data-page="route"] .nav a.active-route::after,
body[data-page="route"] .course-nav a.active-route::after {
    background: var(--accent);
}

.editorial-cta,
.sidebar-note,
.course-header > .button {
    justify-self: end;
}

.sidebar-note {
    max-width: 15ch;
    padding: 10px 14px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 720;
    line-height: 1.25;
    text-align: center;
}
