/* =====================================================================
   candidate · core/style.css
   Поверх tokens.css из handoff/beta. Здесь только shell, dashboard и
   базовая стилизация форм/таблиц. Модульные стили (chat, schedule) —
   рядом с модулями.
   ===================================================================== */

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-red); }
img, picture, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }

/* ---------- Shell layout (как в handoff/beta/dashboard.html) ---------- */
.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
    grid-template-rows: var(--topbar-h) 1fr auto;
    grid-template-areas:
      "topbar topbar"
      "rail   main"
      "rail   footer";
}
.topbar {
    grid-area: topbar;
    position: sticky; top: 0; z-index: var(--z-topbar);
    height: var(--topbar-h);
    display: flex; align-items: center; gap: var(--space-s);
    padding-inline: var(--gutter);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-rule-soft);
}
.rail {
    grid-area: rail;
    position: sticky; top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
    padding: var(--space-m) var(--space-s);
    background: var(--color-surface);
    border-right: 1px solid var(--color-rule-soft);
    display: flex; flex-direction: column; gap: 2px;
}
.rail__sep { block-size: 1px; background: var(--color-rule-soft); margin-block: var(--space-xs); margin-inline: var(--space-2xs); }
.main {
    grid-area: main;
    width: 100%; max-width: var(--content-max);
    margin-inline: auto;
    padding: var(--space-l) var(--gutter) var(--space-2xl);
}
.footer {
    grid-area: footer;
    border-top: 1px solid var(--color-rule-soft);
    background: var(--color-surface);
    padding-block: var(--space-m);
}
.footer__inner {
    width: 100%; max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex; gap: var(--space-m);
    align-items: center; justify-content: space-between;
    font-size: var(--step--1);
    color: var(--color-text-muted);
}

/* ---------- Footer ---------- */
.footer-phone {
    color: var(--color-text); text-decoration: none;
    font-weight: var(--weight-semibold);
    font-size: var(--step-0);
    display: inline-flex; align-items: center; gap: var(--space-2xs);
    font-feature-settings: var(--feat-num);
}
.footer-phone .icon { color: var(--brand-red); }
.footer-apps, .footer-legal {
    display: inline-flex; align-items: center; gap: var(--space-s);
    color: var(--color-text-muted);
}
.footer-apps a, .footer-legal a {
    color: var(--color-text-muted); text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.3rem;
    transition: color var(--dur-fast) var(--ease-out);
}
.footer-apps a:hover, .footer-legal a:hover { color: var(--color-text); text-decoration: underline; text-underline-offset: 0.25em; }
.footer-apps .icon { font-size: 1.125rem; }
.footer-sep { color: var(--color-rule); user-select: none; }

/* ---------- Footer ---------- */
.footer {
    grid-area: footer;
    border-top: 1px solid var(--color-rule-soft);
    background: var(--color-surface);
    padding-block: var(--space-m);
}
.footer__inner {
    width: 100%; max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex; gap: var(--space-m);
    align-items: center; justify-content: space-between;
    flex-wrap: wrap;
    font-size: var(--step--1);
}

/* ---------- Mobile ---------- */
@media (max-width: 47.99rem) {
    .shell {
        grid-template-columns: minmax(0,1fr);
        grid-template-areas: "topbar" "main" "footer";
    }
    .rail {
        position: fixed; inset: var(--topbar-h) auto 0 0;
        width: min(20rem, 84vw);
        transform: translateX(-100%);
        transition: transform var(--dur-slow) var(--ease-emph);
        z-index: var(--z-modal);
        box-shadow: var(--shadow-overlay);
    }
    .rail[data-open="true"] { transform: translateX(0); }
    .rail-scrim {
        position: fixed; inset: var(--topbar-h) 0 0;
        background: rgba(11,13,18, .4);
        z-index: calc(var(--z-modal) - 1);
        opacity: 0; pointer-events: none;
        transition: opacity var(--dur-base) var(--ease-out);
    }
    .rail-scrim[data-open="true"] { opacity: 1; pointer-events: auto; }
}
@media (min-width: 48rem) {
    .menu-toggle { display: none; }
    .rail-scrim { display: none; }
}

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: var(--space-2xs); color: var(--color-text); margin-inline-end: auto; }
.brand-mark { display: block; width: 2.25rem; height: 2.25rem; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word__top { font-size: var(--step--2); letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-text-muted); font-weight: var(--weight-medium); }
.brand-word__bot { font-size: var(--step-0); letter-spacing: 0.04em; text-transform: uppercase; font-weight: var(--weight-bold); margin-top: 3px; }

/* ---------- Icon button + avatar ---------- */
.icon-btn {
    inline-size: 2.5rem; block-size: 2.5rem;
    display: grid; place-items: center;
    background: transparent; border: 0; border-radius: var(--radius-pill);
    color: var(--color-text-muted); cursor: pointer; font-size: 1.25rem;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.icon-btn:hover { background: var(--color-sunken); color: var(--color-text); }
.avatar {
    inline-size: 2.25rem; block-size: 2.25rem;
    border-radius: 50%; background: var(--hue-blue); color: var(--ink-0);
    display: grid; place-items: center;
    font-size: var(--step--1); font-weight: var(--weight-semibold);
    border: 0; cursor: pointer; flex-shrink: 0;
}

/* ---------- Rail item ---------- */
.rail-item {
    display: flex; align-items: center; gap: var(--space-xs);
    padding: 0.625rem var(--space-xs);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: var(--step-0); font-weight: var(--weight-medium);
    position: relative;
}
.rail-item .icon { font-size: 1.25rem; flex-shrink: 0; }
.rail-item:hover { background: var(--color-sunken); color: var(--color-text); }
.rail-item.is-active, .rail-item[aria-current="page"] {
    color: var(--color-text); background: var(--color-sunken); font-weight: var(--weight-semibold);
}
.rail-item.is-active::before, .rail-item[aria-current="page"]::before {
    content: ""; position: absolute; left: -2px; top: 0.5rem; bottom: 0.5rem;
    width: 3px; border-radius: var(--radius-xs); background: var(--brand-red);
}
.rail-item__badge {
    margin-inline-start: auto;
    background: var(--brand-red); color: var(--ink-0);
    border-radius: var(--radius-pill);
    font-size: var(--step--2); font-weight: var(--weight-semibold);
    min-width: 1.25rem; height: 1.25rem;
    padding: 0 0.4rem; display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Dropdown (lang/role/group) ---------- */
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd__menu {
    position: absolute; right: 0; top: calc(100% + 4px);
    background: var(--color-surface);
    border: 1px solid var(--color-rule-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-overlay);
    padding: var(--space-2xs);
    min-width: 12rem; z-index: var(--z-overlay);
    display: flex; flex-direction: column;
}
.dd__item { display: block; padding: 0.5rem var(--space-xs); border-radius: var(--radius-sm); color: var(--color-text); font-size: var(--step--1); }
.dd__item:hover { background: var(--color-sunken); }
.dd__item.is-active { color: var(--brand-red); font-weight: var(--weight-semibold); }
.lang-badge { font-size: var(--step--2); font-weight: var(--weight-semibold); letter-spacing: 0.04em; }

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute; left: var(--space-s); top: var(--space-2xs);
    padding: var(--space-2xs) var(--space-s);
    background: var(--brand-red); color: var(--ink-0);
    border-radius: var(--radius-sm); font-weight: var(--weight-semibold);
    transform: translateY(-200%);
    transition: transform var(--dur-base) var(--ease-out);
    z-index: var(--z-modal);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Hero (на дашборде/страницах) ---------- */
.hero { padding-block-end: var(--space-l); }
.hero__title { font-size: var(--step-4); font-weight: var(--weight-bold); letter-spacing: var(--tracking-tight); line-height: var(--leading-tight); text-wrap: balance; }
.hero__lede  { color: var(--color-text-muted); font-size: var(--step-0); line-height: var(--leading-relaxed); margin-block-start: var(--space-2xs); max-width: 77ch; }

/* ---------- Dashboard tiles (списком, в стиле beta) ---------- */
.dashboard-grid {
    margin-block-start: var(--space-m);
    display: flex; flex-direction: column;
    border-block-start: 1px solid var(--color-rule-soft);
}
.dashboard-tile {
    display: grid; grid-template-columns: 3rem minmax(0,1fr) auto;
    column-gap: var(--space-s); align-items: center;
    padding: var(--space-s) var(--space-s) var(--space-s) 0;
    border-block-end: 1px solid var(--color-rule-soft);
    color: var(--color-text); position: relative;
    transition: background var(--dur-fast) var(--ease-out);
}
.dashboard-tile:hover { background: var(--color-sunken); }
.dashboard-tile-icon {
    inline-size: 3rem; block-size: 3rem;
    border-radius: var(--radius-sm); background: var(--color-sunken); color: var(--color-text-muted);
    display: grid; place-items: center; font-size: 1.5rem;
}
.dashboard-tile-label { font-size: var(--step-1); font-weight: var(--weight-semibold); display: flex; align-items: center; gap: var(--space-2xs); }
.dashboard-tile-desc { font-size: var(--step--1); color: var(--color-text-muted); margin-block-start: 2px; }
.dashboard-tile-arrow { font-size: 1.25rem; color: var(--color-text-soft); }
.dashboard-tile .badge {
    background: var(--brand-red); color: var(--ink-0);
    border-radius: var(--radius-pill);
    font-size: var(--step--2); font-weight: var(--weight-semibold);
    min-width: 1.5rem; height: 1.5rem; padding: 0 0.5rem;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Empty state ---------- */
.empty-state {
    padding: var(--space-l);
    text-align: center; color: var(--color-text-muted);
    border: 1px dashed var(--color-rule);
    border-radius: var(--radius-md);
}

/* ---------- Login ---------- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; background: var(--color-bg); }
.login-card {
    background: var(--color-surface);
    border: 1px solid var(--color-rule-soft);
    border-radius: var(--radius-md);
    padding: var(--space-l);
    width: 100%; max-width: 22rem;
    display: flex; flex-direction: column; gap: var(--space-s);
}
.login-card h1 { font-size: var(--step-2); }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: var(--step--1); color: var(--color-text-muted); }
.login-card input {
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--color-rule); border-radius: var(--radius-sm);
    font-size: var(--step-0); outline: none; background: var(--color-surface);
}
.login-card input:focus { border-color: var(--color-text); box-shadow: var(--shadow-focus); }
.login-card button {
    padding: 0.7rem; border-radius: var(--radius-sm); border: 0; cursor: pointer;
    background: var(--brand-red); color: var(--ink-0);
    font-size: var(--step-0); font-weight: var(--weight-semibold);
}
.login-card button:hover { background: var(--brand-red-hover); }
.login-error { background: var(--brand-red-tint); color: var(--brand-red); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; font-size: var(--step--1); }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--color-text-soft); font-size: var(--step--1); }
.login-or::before, .login-or::after { content: ''; flex: 1; border-top: 1px solid var(--color-rule-soft); }
.sso-button {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.7rem; border: 1px solid var(--color-rule); border-radius: var(--radius-sm);
    background: var(--color-surface); color: var(--color-text); font-weight: var(--weight-semibold);
}
.sso-button:hover { border-color: var(--color-text); color: var(--color-text); }

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.5rem 0.95rem; border-radius: var(--radius-sm);
    border: 0; cursor: pointer; font-size: var(--step--1); font-weight: var(--weight-medium);
}
.btn-primary { background: var(--color-text); color: var(--ink-0); }
.btn-primary:hover { background: var(--brand-red); color: var(--ink-0); }
.btn-secondary { background: var(--color-sunken); color: var(--color-text); }
.btn-secondary:hover { background: var(--color-rule-soft); }

/* ---------- Pages: Notes (и аналогичные) ---------- */
.page-container { max-width: var(--reading-max); margin-inline: auto; }
.page-header { display: flex; align-items: baseline; gap: var(--space-s); margin-block-end: var(--space-m); border-block-end: 1px solid var(--color-rule); padding-block-end: var(--space-s); }
.page-header h1 { flex: 1; }
.page-back { color: var(--color-text-muted); font-size: var(--step--1); }

.field { display: flex; flex-direction: column; gap: 4px; font-size: var(--step--1); color: var(--color-text-muted); }
.field input, .field textarea {
    padding: 0.6rem 0.8rem; border: 1px solid var(--color-rule); border-radius: var(--radius-sm);
    font: inherit; outline: none; background: var(--color-surface);
}
.field input:focus, .field textarea:focus { border-color: var(--color-text); box-shadow: var(--shadow-focus); }
.form-actions { display: flex; justify-content: flex-end; gap: var(--space-2xs); margin-block-start: var(--space-s); }

.notes-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.note-item { display: flex; gap: var(--space-s); align-items: flex-start; padding: var(--space-s) 0; border-block-end: 1px solid var(--color-rule-soft); }
.note-link { flex: 1; min-width: 0; color: inherit; }
.note-title { font-weight: var(--weight-semibold); font-size: var(--step-1); }
.note-body  { color: var(--color-text-muted); font-size: var(--step--1); margin-block-start: 4px; white-space: pre-wrap; }
.note-meta  { color: var(--color-text-soft); font-size: var(--step--2); margin-block-start: 6px; }
.note-form  { display: flex; flex-direction: column; gap: var(--space-s); margin-block-start: var(--space-s); }

/* ==========================================================================
   Dashboard components — копия из handoff/beta/dashboard.html на наши токены.
   ========================================================================== */

/* ---------- Eyebrow + section heading ---------- */
.eyebrow {
    font-size: var(--step--2);
    text-transform: uppercase;
    letter-spacing: var(--tracking-label);
    font-weight: var(--weight-semibold);
    color: var(--color-text-soft);
}
.section {
    margin-block-start: var(--space-xl);
    container-type: inline-size;
}
.section__head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: var(--space-s);
    padding-block-end: var(--space-s);
    border-block-end: 1px solid var(--color-rule);
    margin-block-end: var(--space-s);
}
.section__title {
    font-size: var(--step-2);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-snug);
}
.section__link {
    color: var(--color-text-muted);
    font-size: var(--step--1);
    display: inline-flex; align-items: center; gap: 0.25rem;
}
.section__link:hover { color: var(--color-text); }
.layout-cols__aside .section { margin-block-start: 0; }

/* ---------- KPI strip ---------- */
.kpi-strip {
    margin-block-start: var(--space-m);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-block-start: 1px solid var(--color-rule-soft);
}
.kpi {
    padding: var(--space-s) var(--space-s) var(--space-s) 0;
    display: flex; flex-direction: column; gap: var(--space-3xs);
    min-width: 0;
}
.kpi + .kpi {
    border-inline-start: 1px solid var(--color-rule-soft);
    padding-inline-start: var(--space-s);
}
.kpi__value {
    font-size: var(--step-3);
    font-weight: var(--weight-bold);
    color: var(--color-text);
    line-height: 1;
    letter-spacing: var(--tracking-tight);
    font-feature-settings: var(--feat-num);
    font-variant-numeric: tabular-nums lining-nums;
    margin-block-start: 0.25rem;
}
.kpi__caption {
    font-size: var(--step--1);
    color: var(--color-text-muted);
    margin-block-start: var(--space-2xs);
}
@media (max-width: 47.99rem) {
    .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); border-block-start: 0; }
    .kpi { padding: var(--space-s) 0; border-block-start: 1px solid var(--color-rule-soft); }
    .kpi + .kpi { border-inline-start: 0; padding-inline-start: 0; }
    .kpi:nth-child(odd)  { padding-inline-end: var(--space-s); border-inline-end: 1px solid var(--color-rule-soft); }
    .kpi:nth-child(even) { padding-inline-start: var(--space-s); }
}

/* ---------- Двухколоночный layout (предметы | aside) ---------- */
.layout-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-l);
    margin-block-start: var(--space-xl);
}
.layout-cols__main { min-width: 0; }
.layout-cols__aside {
    display: flex; flex-direction: column;
    gap: var(--space-l);
    min-width: 0;
}
@media (min-width: 64rem) {
    .layout-cols {
        grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
        gap: var(--space-xl);
    }
}

/* ---------- Subject row (list, not card) ---------- */
.subjects { display: flex; flex-direction: column; }
.subject {
    position: relative;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    column-gap: var(--space-s);
    align-items: start;
    padding: var(--space-s) var(--space-s) var(--space-s) 0;
    border-block-end: 1px solid var(--color-rule-soft);
    color: var(--color-text);
    transition: background var(--dur-fast) var(--ease-out);
}
.subject:hover { background: var(--color-sunken); }
.subject__code {
    inline-size: 3rem; block-size: 3rem;
    border-radius: var(--radius-sm);
    display: grid; place-items: center;
    font-size: var(--step--1);
    font-weight: var(--weight-bold);
    color: var(--ink-0);
}
.subject__code--blue   { background: var(--hue-blue); }
.subject__code--teal   { background: var(--hue-teal); }
.subject__code--orange { background: var(--hue-orange); }
.subject__code--purple { background: var(--hue-purple); }
.subject__main { min-width: 0; }
.subject__title {
    font-size: var(--step-1);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-snug);
    line-height: var(--leading-snug);
}
.subject__title-link { color: inherit; }
.subject__title-link::before { content: ""; position: absolute; inset: 0; z-index: 0; }
.subject__teacher  { font-size: var(--step--1); color: var(--color-text-muted); margin-block-start: 0.125rem; }
.subject__schedule { font-size: var(--step--1); color: var(--color-text-muted); margin-block-start: var(--space-2xs); display: flex; align-items: center; gap: 0.4rem; }
.subject__schedule .icon { color: var(--color-text-soft); font-size: 1rem; }
.subject__schedule-empty { font-style: italic; }
.subject__actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2xs); padding-block-start: 0.125rem; }
.subject__arrow { font-size: 1.25rem; color: var(--color-text-soft); }
@container (max-width: 32rem) {
    .subject { grid-template-columns: 2.5rem minmax(0, 1fr); }
    .subject__code { inline-size: 2.5rem; block-size: 2.5rem; }
    .subject__actions { display: none; }
}

/* ---------- Debts ---------- */
.debts { display: flex; flex-direction: column; }
.debt {
    position: relative;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    column-gap: var(--space-s);
    align-items: start;
    padding: var(--space-s) var(--space-s) var(--space-s) 0;
    border-block-end: 1px solid var(--color-rule-soft);
}
.debt__mark {
    inline-size: 3rem; block-size: 3rem;
    display: grid; place-items: center;
    color: var(--brand-red);
    background: var(--brand-red-tint);
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
}
.debt__title { font-size: var(--step-1); font-weight: var(--weight-semibold); }
.debt__sub   { font-size: var(--step--1); color: var(--color-text-muted); margin-block-start: 0.125rem; }
.debt__meta  { font-size: var(--step--1); color: var(--color-text-muted); margin-block-start: var(--space-2xs); display: flex; align-items: center; gap: 0.4rem; }
.debt__meta b { color: var(--color-text); }
.debt__meta--pending, .debt__meta--pending b { color: var(--brand-red); }
.debt__actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2xs); padding-block-start: 0.125rem; }
.debt__action { font-weight: var(--weight-semibold); font-size: var(--step--1); border-bottom: 1px solid currentColor; }
.debt__action:hover { color: var(--brand-red); }

/* ---------- Schedule (aside) ---------- */
.schedule { display: flex; flex-direction: column; }
.schedule__row {
    display: grid; grid-template-columns: 3.25rem minmax(0,1fr);
    column-gap: var(--space-s);
    padding-block: var(--space-s);
    border-block-end: 1px solid var(--color-rule-soft);
    color: inherit;
}
.schedule__row:last-child { border-block-end: 0; }
.schedule__row:hover { background: var(--color-sunken); }
.schedule__date { text-align: center; padding-block-start: 0.125rem; }
.schedule__date-day { font-size: var(--step-2); font-weight: var(--weight-bold); color: var(--color-text); line-height: 1; font-feature-settings: var(--feat-num); }
.schedule__date-mo  { font-size: var(--step--2); color: var(--color-text-soft); text-transform: uppercase; letter-spacing: var(--tracking-label); margin-block-start: 0.25rem; font-weight: var(--weight-semibold); }
.schedule__date--today .schedule__date-day,
.schedule__date--today .schedule__date-mo { color: var(--brand-red); }
.schedule__time  { font-size: var(--step--1); color: var(--color-text-muted); font-feature-settings: var(--feat-num); }
.schedule__title { font-size: var(--step-0); font-weight: var(--weight-semibold); margin-block-start: 0.125rem; }
.schedule__meta  { font-size: var(--step--1); color: var(--color-text-muted); margin-block-start: 0.125rem; }
.live-dot {
    display: inline-block;
    width: 0.5rem; height: 0.5rem; border-radius: 50%;
    background: var(--brand-red);
    margin-inline-end: 0.4rem; vertical-align: middle;
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1);} 50% { opacity:.4; transform:scale(1.4);} }

/* ---------- Curator ---------- */
.curator { display: flex; flex-direction: column; gap: var(--space-s); }
.curator__head { display: flex; align-items: center; gap: var(--space-s); }
.curator__name { font-weight: var(--weight-semibold); }
.curator__role { font-size: var(--step--1); color: var(--color-text-muted); }
.curator__avatar {
    inline-size: 2.75rem; block-size: 2.75rem;
    background: var(--hue-purple); color: var(--ink-0);
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: var(--weight-semibold);
    position: relative;
    font-size: var(--step--1);
}
.curator__avatar[data-online="true"]::after {
    content: ""; position: absolute;
    right: 0.05rem; bottom: 0.05rem;
    width: 0.75rem; height: 0.75rem;
    border-radius: 50%;
    background: var(--hue-teal);
    box-shadow: 0 0 0 2px var(--color-bg);
}
.curator__messages { display: flex; flex-direction: column; }
.curator__msg {
    display: grid; grid-template-columns: minmax(0,1fr) auto;
    gap: 0.125rem var(--space-s);
    padding-block: var(--space-xs);
    border-block-end: 1px solid var(--color-rule-soft);
    color: inherit;
}
.curator__msg:last-of-type { border-block-end: 0; }
.curator__msg-author { font-weight: var(--weight-semibold); font-size: var(--step--1); }
.curator__msg-time   { font-size: var(--step--2); color: var(--color-text-soft); text-align: end; font-feature-settings: var(--feat-num); }
.curator__msg-body   {
    grid-column: 1 / -1;
    font-size: var(--step-0);
    color: var(--color-text-muted);
    line-height: var(--leading-body);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.curator__msg--unread .curator__msg-body { color: var(--color-text); font-weight: var(--weight-medium); }
.curator__msg--unread .curator__msg-time::after {
    content: ""; display: inline-block;
    width: 0.5rem; height: 0.5rem; border-radius: 50%;
    background: var(--brand-red);
    margin-inline-start: 0.4rem; vertical-align: middle;
}
.curator__compose {
    display: flex; gap: var(--space-2xs);
    padding-block-start: var(--space-s);
    border-block-start: 1px solid var(--color-rule-soft);
}
.curator__compose input {
    flex: 1; min-width: 0; height: 2.5rem;
    padding-inline: var(--space-s);
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-rule);
    background: var(--color-surface);
    color: var(--color-text);
}
.curator__compose input:focus { outline: none; border-color: var(--color-text); box-shadow: var(--shadow-focus); }
.curator__compose button {
    inline-size: 2.5rem; block-size: 2.5rem;
    border-radius: 50%;
    border: 0; background: var(--color-text); color: var(--ink-0);
    display: grid; place-items: center; cursor: pointer; font-size: 1rem;
}
.curator__compose button:hover { background: var(--brand-red); }

/* ==========================================================================
   Fix: вертикальные пробелы на дашборде.
   .section имеет margin-block-start: var(--space-xl) для разделения секций,
   но первая секция в каждой колонке layout-cols этого отступа НЕ должна
   получать — иначе двойной зазор (от .layout-cols + от первой section).
   ========================================================================== */
.layout-cols { margin-block-start: var(--space-l); }
.layout-cols__main > .section:first-child,
.layout-cols__aside > .section:first-child { margin-block-start: 0; }

/* Hero не должен «жирно» висеть над KPI: уменьшаем низ */
.hero { padding-block-end: var(--space-m); }
.kpi-strip { margin-block-start: var(--space-s); }

/* Сервисы (карта модулей) — компактнее под layout-cols */
#apps.section { margin-block-start: var(--space-l); }

/* Атрибут hidden должен скрывать элементы поверх любых display: ... */
[hidden] { display: none !important; }

/* Бургер виден только на мобильном. На десктопе .icon-btn { display: grid }
   побеждает по порядку каскада, поэтому скрываем явно (с !important на случай,
   если кто-то ниже снова переопределит). */
@media (min-width: 48rem) {
    .menu-toggle { display: none !important; }
    .rail-scrim  { display: none !important; }
}
