/*
 * Отклики — общий стиль интерфейса.
 * 1. Основа и переменные     6. Список откликов
 * 2. Навигация              7. Сегодня и задачи
 * 3. Кнопки и поля          8. Расписание
 * 4. Раскрывающиеся блоки   9. Профиль и карточка
 * 5. Меню                 10. Главная и быстрое добавление
 *                        11. Вход, адаптивность и движение
 */
/* 1. Основа */
:root {
    color-scheme: light;
    --paper: #fdfcfb;
    --surface: #f4f3f0;
    --surface-hover: #eeede9;
    --ink: #292a27;
    --muted: #70716b;
    --line: #e3e2dc;
    --accent: #bd533a;
    --accent-soft: #fbefe8;
    --danger: #a63f3f;
    --success: #426651;
    --radius: 8px;
    --space: 24px;
    --page-width: 1160px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --fast: 160ms;
    --shadow: 0 8px 32px #292a2712, 0 2px 8px #292a2708;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button, summary, a, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

button, summary {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

a, button, summary {
    transition: color var(--fast), background-color var(--fast), border-color var(--fast), box-shadow var(--fast);
}

a:hover {
    color: var(--accent);
}

button:disabled, [aria-disabled="true"] {
    color: #92938d;
    cursor: default;
}

button:disabled {
    opacity: .6;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

main:focus {
    outline: none;
}

::selection {
    background: #f0d8cd;
}

summary {
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::marker {
    content: "";
}

h1, h2, h3, p {
    margin: 0;
}

h1 {
    font-size: clamp(32px, 3.5vw, 44px);
    font-weight: 500;
    letter-spacing: -.045em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

h2 {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.3;
}

h3 {
    font-size: 15px;
    font-weight: 500;
}

strong {
    font-weight: 550;
}

small, .muted, .optional-label {
    color: var(--muted);
}

small {
    display: block;
    font-size: 13px;
    line-height: 1.5;
}

svg {
    flex-shrink: 0;
    vertical-align: middle;
}

.icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: -.2em;
    flex-shrink: 0;
}

.icon-chevron {
    width: 14px;
    height: 14px;
}

.icon-more {
    width: 20px;
    height: 20px;
}

.row-menu-panel a, .task-links a, .back-link, .field-link {
    gap: 8px;
}

.row-menu-panel a .icon, .task-links a .icon {
    margin-left: auto;
}

select {
    appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2370716b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.heading-dot, .brand span {
    color: var(--accent);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Related values use spacing and labels, never decorative separators. */
.metadata {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
}

.metadata > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.summary-value {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    overflow-wrap: anywhere;
}

/* 2. Каркас и навигация */
.header-inner, .workspace, .footer-inner {
    width: min(100% - 64px, var(--page-width));
    margin-inline: auto;
}

.header-inner {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -.06em;
    white-space: nowrap;
}

.site-header nav {
    display: flex;
    gap: 20px;
}

.site-header nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    color: var(--muted);
}

.site-header nav a:hover {
    background: transparent;
    color: var(--ink);
}

.site-header nav a[aria-current] {
    color: var(--ink);
    border-bottom-color: var(--ink);
    background: transparent;
}

.workspace {
    margin-top: 48px;
    min-height: 60vh;
}

.page-heading, .profile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
}

.page-description {
    margin-top: 12px;
    color: var(--muted);
    max-width: 660px;
}

.site-footer {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(230px, 1.8fr) repeat(3, minmax(0, 1fr));
    gap: 24px 40px;
    padding-bottom: 40px;
}

.footer-intro p {
    max-width: 32ch;
    margin-top: 16px;
    color: var(--muted);
    line-height: 1.7;
}

.footer-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-group h2 {
    margin: 4px 0 12px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}

.footer-group a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding-block: 8px;
    color: var(--muted);
    line-height: 1.5;
}

.footer-group a:hover, .footer-bottom a:hover { color: var(--ink); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
    border-top: 1px solid var(--line);
    padding-block: 22px;
    color: var(--muted);
    font-size: 12px;
}

.footer-bottom a { margin-left: auto; overflow-wrap: anywhere; }

@media (max-width: 900px) {
    .footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
    .footer-intro { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
    .site-footer { padding-top: 32px; }
    .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-bottom: 28px; }
    .footer-group a { min-height: 44px; }
    .footer-bottom a { width: 100%; margin-left: 0; }
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 12px 18px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--muted);
    margin-bottom: 20px;
}

.scope-tabs, .profile-tabs, .today-tabs {
    display: flex;
    align-items: center;
    gap: 28px;
    border-bottom: 1px solid var(--line);
}

.scope-tabs a, .profile-tab, .today-tabs a {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    min-height: 52px;
    padding: 12px 0;
    color: var(--muted);
    white-space: nowrap;
}

.scope-tabs a::after, .profile-tab::after, .today-tabs a::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--fast);
}

.scope-tabs a:hover, .profile-tab:hover, .today-tabs a:hover {
    color: var(--ink);
}

.scope-tabs a[aria-current], .profile-tab[aria-current], .today-tabs a[aria-current] {
    color: var(--ink);
}

.scope-tabs a[aria-current]::after, .profile-tab[aria-current]::after, .today-tabs a[aria-current]::after {
    opacity: 1;
}

.profile-tabs {
    margin-bottom: 28px;
}

/* 3. Общие кнопки, поля и сообщения */
.btn, .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
}

.btn:hover, .icon-btn:hover {
    color: var(--ink);
    background: var(--surface-hover);
    border-color: #d3d2ca;
}

.btn:active, .icon-btn:active {
    background: #e3e2dc;
}

.btn-dark {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.btn-dark:hover {
    color: #fff;
    background: #41423d;
    border-color: #41423d;
}

.btn-dark:active {
    background: #1a1b18;
}

.btn-ghost {
    border-color: transparent;
    color: var(--muted);
}

.btn-danger {
    color: var(--danger);
    border-color: transparent;
}

.btn-danger:hover {
    color: var(--danger);
    background: #faeeee;
    border-color: transparent;
}

.btn-block {
    width: 100%;
}

.icon-btn {
    width: 44px;
    padding: 0;
}

button:disabled:hover {
    background: var(--surface);
    border-color: var(--line);
}

label {
    display: block;
    font-size: 14px;
    min-width: 0;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin-top: 8px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    font-size: 16px;
    line-height: 1.4;
    transition: border-color var(--fast), background-color var(--fast), box-shadow var(--fast);
}

input:hover, select:hover, textarea:hover {
    border-color: #c7c7bd;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #97988c;
    box-shadow: 0 0 0 3px #70716b10;
}

input::placeholder, textarea::placeholder {
    color: #85867e;
    opacity: 1;
}

input[type="checkbox"], input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--ink);
    flex-shrink: 0;
}

input[type="file"] {
    font-size: 14px;
}

input::file-selector-button {
    border: 0;
    border-radius: 4px;
    padding: 6px 10px;
    margin-right: 12px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input[aria-invalid="true"], textarea[aria-invalid="true"] {
    border-color: var(--danger);
}

.form-group {
    min-width: 0;
    margin-bottom: 22px;
}

.form-group small {
    margin-top: 7px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 20px;
}

.form-row > label {
    align-self: end;
    margin-bottom: 0;
}

.optional-label {
    font-size: 12px;
    font-weight: 400;
}

.auth-form, .event-form, .task-create-form, .task-edit-form, .quick-stage form {
    display: grid;
    gap: 18px;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form > .btn, .event-form > .btn, .task-create-form > .btn, .task-edit-form > .btn {
    justify-self: start;
}

.auth-form > .btn-block {
    justify-self: stretch;
}

.form-actions, .day-note-actions, .danger-zone {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.field-link, .text-button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    font-size: 13px;
    color: var(--muted);
}

.text-button {
    padding: 6px 10px;
    border: 0;
    background: transparent;
}

.text-button:hover {
    color: var(--ink);
    background: var(--surface);
}

.flash-ok, .flash-error, .auth-error, .task-notice, .duplicate-notice {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-block: 20px;
    font-size: 14px;
}

.flash-ok {
    color: var(--success);
    background: #eef4ed;
}

.flash-error, .auth-error {
    background: #faeeee;
    color: var(--danger);
}

.task-notice, .duplicate-notice {
    background: var(--accent-soft);
}

.flash-ok a, .flash-error a, small a, .muted a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.task-notice {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.task-notice a, .task-notice button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    font-size: inherit;
    background: none;
    border: 0;
    padding: 0;
}

.duplicate-notice label {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.empty-state {
    padding: 64px 24px;
    text-align: center;
}

.empty-mark {
    display: block;
    color: var(--accent);
    font-size: 32px;
    margin-bottom: 16px;
}

.empty-state p {
    margin: 12px auto 24px;
    color: var(--muted);
}

.empty-state h2 {
    font-size: 24px;
}

/* 4. Раскрывающиеся блоки: высотой управляет ui-motion.js */
.disclosure-content {
    display: flow-root;
}

.form-details {
    border-top: 1px solid var(--line);
}

.form-details > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 18px 0;
    overflow-wrap: anywhere;
}

.form-details > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 180ms var(--ease);
}

.form-details[open]:not([data-expanded="false"]) > summary::after {
    transform: rotate(225deg);
}

.form-details > summary:hover {
    color: var(--accent);
}

.form-details > .disclosure-content > :last-child {
    margin-bottom: 24px;
}

.form-details > :not(summary):not(.disclosure-content) {
    margin-bottom: 24px;
}

.form-details .disclosure-content > .muted {
    margin-bottom: 20px;
}

.form-details .form-details {
    margin-top: 24px;
}

/* 5. Контекстные меню. Все действия остаются в обычном HTML без JavaScript. */
[data-popover] {
    position: relative;
}

[data-popover][open] {
    z-index: 30;
}

[data-popover] > :not(summary) {
    position: absolute;
    z-index: 40;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    max-width: calc(100vw - 32px);
    max-height: min(540px, 75vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.row-menu > summary, .task-editor > summary, .schedule-date-picker > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 13px;
}

.row-menu > summary {
    width: 44px;
    font-size: 24px;
    padding: 0;
}

.row-menu > summary:hover, .task-editor > summary:hover, .schedule-date-picker > summary:hover {
    background: var(--surface-hover);
    color: var(--ink);
}

[data-popover][open] > summary {
    background: var(--surface);
}

.row-menu > .row-menu-panel {
    width: 248px;
    padding: 6px;
}

.row-menu-panel a, .row-menu-panel button, .task-links a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
    text-align: left;
    border: 0;
    border-radius: 6px;
    background: transparent;
}

.row-menu-panel a:hover, .row-menu-panel button:hover, .task-links a:hover {
    background: var(--surface);
    color: var(--ink);
}

.task-links {
    border-top: 1px solid var(--line);
    padding-top: 8px;
    margin-top: 2px;
}

.task-links a {
    font-size: 13px;
    padding-inline: 0;
}

.task-editor-icon {
    display: none;
    font-size: 24px;
}

.task-date-fields, .quick-event-date {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
}

.quick-stage > summary {
    min-height: 40px;
    cursor: pointer;
}

.quick-stage > summary:hover {
    filter: brightness(.97);
}

.quick-stage form > .btn {
    width: 100%;
}

/* Inline actions: one quiet preview, fields only when expanded. */
.inline-edit > summary {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 44px;
    padding-block: 10px 0;
}
.inline-edit-preview { flex: 1; min-width: 0; display: grid; gap: 6px; }
.inline-edit-icon { display: flex; padding-top: 2px; color: var(--muted); opacity: .55; }
.inline-edit > summary:hover .inline-edit-icon,
.inline-edit[open] .inline-edit-icon { opacity: 1; color: var(--accent); }
.inline-edit .next-step-link { min-height: 0; }
.quick-edit-form { display: grid; gap: 16px; padding-top: 18px; }
.quick-edit-form .form-row {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 12px;
}
.quick-edit-form .form-actions { gap: 6px; }
.quick-edit-form .btn { min-height: 42px; padding: 10px 14px; font-size: 13px; }
.quick-edit-form label { font-size: 13px; }
.quick-contact > summary { font-size: 13px; color: var(--muted); min-height: 32px; }
.quick-contact > summary::after { content: '+'; margin-left: 10px; }
.quick-contact[open] > summary::after { content: '−'; }
.quick-contact > div:not(.disclosure-content), .quick-contact > .disclosure-content > div { display: grid; gap: 14px; padding-top: 12px; }
.has-draft > summary {
    box-shadow: -2px 0 var(--accent);
}

.task-edit-heading {
    display: grid;
    gap: 4px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.task-edit-heading small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

/* Feedback follows the same spacing in cards, menus and full-page forms. */
.action-notice {
    position: fixed;
    z-index: 80;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 32px);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 12px 18px;
    margin: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 14px;
}
.action-notice > span { display: flex; align-items: center; gap: 10px; }
.action-notice .icon { flex-shrink: 0; color: #55705c; }
.action-notice .text-button { color: var(--accent); }
.action-notice .notice-dismiss { padding: 4px; color: var(--muted); min-width: 32px; font-size: 20px; }
.form-feedback {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-left: 2px solid var(--accent);
    background: var(--accent-soft);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.form-feedback p { margin: 0; }
.import-notice { padding: 14px 18px; margin-block: 20px; border-radius: var(--radius); background: var(--surface); font-size: 14px; line-height: 1.6; }
.draft-status .text-button { padding: 4px 8px; min-height: 36px; color: var(--accent); }
button[aria-busy="true"], form[aria-busy="true"] button[type="submit"] { cursor: progress; }
:where(.page-heading, .editor-card, .legal-copy, .stat-label) { overflow-wrap: anywhere; }

/* 6. Поиск и отклики */
.tracker-section {
    margin-top: 32px;
}

.filter-bar {
    margin-block: 24px 12px;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 4px 8px 4px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    transition: border-color var(--fast);
}

.search-field:focus-within {
    border-color: #b8b9ae;
}

.search-field input[type="search"] {
    margin: 0;
    padding: 8px 0;
    border: 0;
    background: transparent;
    min-height: 44px;
    box-shadow: none;
    color: var(--ink);
}

.search-submit {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
}

.search-submit:hover {
    background: var(--surface-hover);
}

.filter-details > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 13px;
    color: var(--muted);
}

.filter-details > summary:hover {
    color: var(--ink);
}

.filter-indicator {
    height: 5px;
    width: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.filter-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 16px;
    padding-block: 8px 20px;
}

/* Reset stays inside the filter panel so groups share one toolbar height. */
.filter-reset {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.filter-reset:hover {
    color: var(--ink);
}

.list-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    min-height: 60px;
    padding-bottom: 12px;
    font-size: 13px;
    color: var(--muted);
}

.result-range {
    white-space: nowrap;
    margin-right: auto;
    font-variant-numeric: tabular-nums;
}

.result-range strong {
    color: var(--ink);
    font-weight: 500;
}

.bulk-tools {
    order: 1;
}

.bulk-tools .btn {
    padding-inline: 12px;
    font-size: 13px;
}

.bulk-tools form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-sizes, .page-stepper, .day-page-links, .today-pagination, .page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-sizes {
    gap: 0;
}

.page-sizes > span {
    margin-right: 6px;
}

.page-sizes a, .page-stepper > a, .page-stepper > span[aria-disabled], .day-page-links a, .day-page-links > span[aria-disabled], .today-pagination > a, .today-pagination > span[aria-disabled], .page-numbers a, .page-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 44px;
    padding: 8px;
    border-radius: var(--radius);
    font-variant-numeric: tabular-nums;
}

.page-sizes a:hover, .page-stepper a:hover, .day-page-links a:hover, .today-pagination a:hover, .page-numbers a:hover {
    color: var(--ink);
    background: var(--surface-hover);
}

.page-sizes [aria-current], .page-numbers [aria-current] {
    color: var(--ink);
    background: var(--surface);
}

.page-position {
    min-width: 48px;
    text-align: center;
    color: var(--muted);
}

.list-labels, .job-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr) 170px 44px;
    gap: 24px;
    align-items: center;
    padding-inline: var(--space);
}

.list-labels {
    padding-block: 14px;
    border-block: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}

.job-card {
    position: relative;
    align-items: start;
    padding-block: 24px;
    border-bottom: 1px solid var(--line);
    transition: background-color var(--fast);
}

.job-card:hover {
    background: #f6f5f155;
}

.job-card > * {
    min-width: 0;
}

.job-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.job-identity > a {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding-block: 6px 0;
}

.jobs-list {
    overflow-anchor: none;
}

.job-card-company {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

.job-card-pos {
    font-size: 14px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.bulk-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.job-next, .job-stage {
    display: grid;
    gap: 7px;
}

.next-action, .schedule-event-info > span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.next-action {
    font-size: 14px;
}

.no-action, .job-date, .job-card-meta {
    color: var(--muted);
    font-size: 13px;
}

.job-salary {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.job-date {
    display: grid;
    gap: 2px;
}

.job-date-label {
    font-size: 12px;
}

.next-step-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    font-size: 13px;
    color: var(--muted);
    min-height: 36px;
}

.next-step-link .icon {
    width: 15px;
    height: 15px;
}

.job-stage {
    justify-items: start;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 5px;
    font-size: 12px;
    line-height: 1.5;
    background: var(--surface);
    color: #62645a;
}

.status-badge > span {
    display: inline-flex;
    align-items: center;
    margin-left: 3px;
}

.status-applied {
    background: #f0f1f4;
    color: #576679;
}

.status-screening {
    background: #eef1f5;
    color: #536984;
}

.status-test {
    background: var(--accent-soft);
    color: #a2593a;
}

.status-interview {
    background: #f1eef5;
    color: #765c8c;
}

.status-offer {
    background: #edf3ec;
    color: #426b4c;
}

.status-rejected {
    background: #f8eded;
    color: #9b5151;
}

.status-ghosted, .status-archived {
    background: var(--surface);
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    font-size: 14px;
}

.page-direction {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
}

.list-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 13px;
}

.list-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
}

/* 7. Компактный блок «Сегодня» и единые строки задач */
.today-panel {
    background: var(--surface);
    border-radius: var(--radius);
}

.today-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 20px var(--space);
    border-radius: var(--radius);
}

.today-summary:hover {
    background: var(--surface-hover);
}

.today-label {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -.02em;
}

.today-label small {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
}

.today-preview {
    display: grid;
    gap: 5px;
    min-width: 0;
    font-size: 13px;
    color: var(--muted);
}

.today-preview strong {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.today-preview.is-overdue strong {
    color: var(--accent);
}

.today-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}

.today-toggle svg {
    transition: transform 180ms var(--ease);
}

.today-close-label {
    display: none;
}

.today-panel[open]:not([data-expanded="false"]) .today-open-label {
    display: none;
}

.today-panel[open]:not([data-expanded="false"]) .today-close-label {
    display: inline;
}

.today-panel[open]:not([data-expanded="false"]) .today-toggle svg {
    transform: rotate(180deg);
}

.today-content {
    padding: 0 var(--space) 12px;
}

.today-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 8px 16px;
    font-size: 13px;
    color: var(--muted);
}

.today-heading a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

.today-tabs {
    gap: 24px;
    font-size: 13px;
}

.today-tabs a {
    min-height: 44px;
    padding-block: 10px;
}

.today-note {
    margin-top: 16px;
    font-size: 14px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.today-note > span {
    color: var(--accent);
    display: inline-block;
    margin-right: 12px;
}

.task-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px 16px;
    padding-block: 18px;
    border-bottom: 1px solid var(--line);
}

.task-row > * {
    min-width: 0;
}

.task-completion {
    margin: 0;
}

.task-check, .task-done-mark {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--success);
    font-size: 14px;
}

.task-check::before, .task-done-mark::before {
    content: "";
    position: absolute;
    width: 25px;
    height: 25px;
    border: 1px solid #b5b7aa;
    border-radius: 50%;
    transition: background-color var(--fast), border-color var(--fast);
}

.task-check > span {
    opacity: 0;
    z-index: 1;
    transition: opacity var(--fast);
}

.task-check:hover::before, .task-check:focus-visible::before {
    background: #e8ece2;
    border-color: #818b74;
}

.task-check:hover > span, .task-check:focus-visible > span {
    opacity: 1;
}

.is-done .task-check::before, .task-done-mark::before {
    border-color: #acbba9;
}

.task-copy {
    display: grid;
    gap: 4px;
}

.task-title {
    font-size: 15px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.task-context, .task-reason {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.task-reason {
    font-size: 12px;
}

.task-when {
    font-size: 13px;
    color: var(--muted);
    max-width: 180px;
}

.is-overdue {
    color: var(--accent);
}

.task-reschedule, .task-restore button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 12px;
    background: transparent;
    border: 0;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--muted);
}

.task-reschedule:hover, .task-restore button:hover {
    color: var(--ink);
    background: var(--surface-hover);
}

.today-footer {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 12px;
}

.task-create {
    flex: 1;
    min-width: min(280px, 100%);
}

.task-create > summary, .day-task-create > summary, .day-note-editor > summary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 0;
    color: var(--muted);
    font-size: 14px;
}

.task-create > summary:hover, .day-task-create > summary:hover, .day-note-editor > summary:hover {
    color: var(--ink);
}

.task-create-form {
    max-width: 480px;
    padding-block: 12px 20px;
}

.today-pagination {
    margin-left: auto;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}

.today-pagination > span:first-child {
    margin-right: 12px;
}

.today-empty {
    display: grid;
    gap: 6px;
    padding-block: 24px;
    font-size: 14px;
}

.today-empty > span {
    color: var(--muted);
    font-size: 13px;
}

.upcoming-task {
    display: grid;
    grid-template-columns: minmax(110px, auto) minmax(0, 1fr) 18px;
    align-items: center;
    gap: 20px;
    margin-top: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    color: var(--ink);
}

.upcoming-when, .upcoming-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.upcoming-when, .upcoming-copy > span {
    color: var(--muted);
    font-size: 13px;
}

.upcoming-when time {
    color: var(--ink);
    font-weight: 600;
}

.upcoming-copy strong {
    font-size: 14px;
    font-weight: 500;
    overflow-wrap: anywhere;
    transition: color var(--fast);
}

.upcoming-task:hover .upcoming-copy strong {
    color: var(--accent);
}

.today-suggestions {
    margin-top: 16px;
    border-top: 1px solid var(--line);
}

.today-suggestions > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-block: 18px;
    font-size: 14px;
}

.today-suggestions .muted {
    font-size: 13px;
    padding-bottom: 8px;
}

/* 8. Неделя и события */
/* Tabs and the selected week share one calm navigation line. */
.schedule-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 28px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
}

.schedule-controls .profile-tabs {
    border: 0;
    margin: 0;
}

.schedule-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.schedule-nav {
    display: grid;
    grid-template-columns: 40px minmax(0, auto) 40px;
    align-items: center;
    min-width: 0;
}

.week-arrow, .week-today {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: var(--radius);
}

.week-arrow {
    color: var(--muted);
}

.week-arrow:hover, .week-today:hover {
    color: var(--ink);
    background: var(--surface);
}

.week-today {
    padding-inline: 8px;
    color: var(--muted);
    font-size: 13px;
}

.schedule-date-picker {
    min-width: 0;
}

.schedule-date-picker > summary {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 8px;
    min-height: 44px;
    text-align: center;
}

.schedule-toolbar h2 {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.schedule-date-picker > form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 320px;
}

.schedule-date-picker input[type="date"] {
    margin: 0;
}

.schedule-days {
    position: relative;
    overflow-anchor: none;
}

.schedule-day {
    position: relative;
    border-top: 1px solid var(--line);
}

.schedule-day:first-child {
    border-top: 0;
}

.schedule-day:last-child {
    border-bottom: 1px solid var(--line);
}

.schedule-day > summary {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 24px;
    min-height: 88px;
    padding: 20px var(--space);
    border-radius: var(--radius);
}

.schedule-day > summary:hover {
    background: var(--surface);
}

.schedule-day.is-today > summary {
    background: var(--surface);
}

.day-date {
    font-size: 20px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.035em;
}

.is-today .day-date {
    color: var(--accent);
}

.day-heading {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.day-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.day-weekday {
    font-size: 17px;
    font-weight: 500;
}

.day-today, .day-important {
    font-size: 12px;
    color: var(--accent);
}

.schedule-day[open]:not([data-expanded="false"]) .day-note-preview {
    display: none;
}

.day-note-preview {
    max-width: 100%;
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-count {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 14px;
    font-size: 13px;
    color: var(--muted);
    text-align: right;
}

.day-chevron {
    color: var(--muted);
    transition: transform 200ms var(--ease);
}

.schedule-day[open]:not([data-expanded="false"]) > summary .day-chevron {
    transform: rotate(180deg);
}

.day-panel {
    padding: 4px var(--space) 24px;
    display: flow-root;
}

.day-empty {
    padding: 24px 0;
    color: var(--muted);
    font-size: 14px;
}

.day-note-saved, .day-note-error {
    padding-block: 12px;
    font-size: 13px;
}

.day-note-saved {
    color: var(--success);
}

.day-note-error {
    color: var(--danger);
}

.day-note-text {
    padding-block: 18px 6px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14px;
    color: var(--muted);
}

.schedule-group {
    margin-top: 22px;
}

.schedule-group h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    padding-bottom: 8px;
}

.schedule-group-count {
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
}

.schedule-event {
    display: grid;
    grid-template-columns: 44px 62px minmax(0, 1.1fr) minmax(0, 1fr) 44px;
    align-items: center;
    gap: 20px;
    padding-block: 18px;
    border-bottom: 1px solid var(--line);
}

.schedule-event > * {
    min-width: 0;
}

.schedule-event-time {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.schedule-event-identity {
    display: grid;
    gap: 4px;
    overflow-wrap: anywhere;
}

.schedule-event-identity strong {
    font-size: 16px;
    font-weight: 500;
}

.schedule-event-identity > span, .schedule-event-info {
    font-size: 13px;
    color: var(--muted);
}

.schedule-event-actions .task-editor > summary {
    width: 44px;
    padding: 0;
}

.schedule-event-actions .task-editor-label {
    display: none;
}

.schedule-event-actions .task-editor-icon {
    display: inline;
}

.schedule-event-arrow {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-other {
    margin-top: 24px;
}

.schedule-other > summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}

.schedule-other > summary svg {
    transition: transform 180ms var(--ease);
}

.schedule-other[open]:not([data-expanded="false"]) > summary svg {
    transform: rotate(180deg);
}

.schedule-other .schedule-group-count {
    margin-left: 8px;
}

.day-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.day-task-create {
    margin-top: 16px;
}

.day-note-editor {
    margin-top: 4px;
}

.note-editor-icon {
    font-size: 20px;
    font-weight: 300;
    transition: transform 180ms var(--ease);
}

.day-note-editor[open]:not([data-expanded="false"]) .note-editor-icon {
    transform: rotate(45deg);
}

.day-note-form {
    max-width: 600px;
    padding-top: 16px;
}

.important-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-block: 8px;
}

.schedule-exit {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    contain: layout paint;
}

/* 9. Карточка и профиль */
.editor-page, .profile-page {
    width: min(100% - 64px, 760px);
    margin: 48px auto 0;
    min-height: 60vh;
}

.editor-card > .muted, .editor-page > .page-description {
    margin-block: 14px 32px;
}

.application-form {
    margin-top: 32px;
}

.application-form > .timezone-caption {
    margin-block: -8px 24px;
}

.application-form > .form-details + .form-details {
    margin-top: 0;
}

.save-actions {
    margin-top: 24px;
    padding-block: 16px;
}

.application-form.is-dirty .save-actions {
    position: sticky;
    bottom: 0;
    z-index: 15;
    background: var(--paper);
    box-shadow: 0 -12px 24px var(--paper);
    border-top: 1px solid var(--line);
}

.draft-status {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.draft-restore {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    font-size: 13px;
}

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

.card-followup, .card-events {
    border-top: 1px solid var(--line);
    padding-block: 32px 20px;
}

.card-followup h2, .card-events h2 {
    margin-bottom: 12px;
}

.card-events > .muted {
    margin-bottom: 20px;
    font-size: 14px;
}

.card-followup .task-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
}

.card-followup .task-when {
    grid-column: 2;
}

.card-followup .task-editor {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.event-history-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    border-bottom: 1px solid var(--line);
    padding-block: 16px;
}

.event-history-row > div {
    flex: 1;
    min-width: min(220px, 100%);
    display: grid;
    gap: 4px;
}

.event-history-row strong {
    font-size: 15px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.event-history-row span {
    font-size: 13px;
    color: var(--muted);
}

.stage-history {
    padding: 0;
    margin: 0;
    list-style: none;
}

.stage-history li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    padding-block: 12px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.stage-history time {
    color: var(--muted);
    font-size: 12px;
}

.danger-zone {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 24px;
}

.profile-top {
    margin-bottom: 28px;
}

.profile-panel > .auth-form {
    margin-bottom: 36px;
}

.profile-panel > h2 {
    margin-bottom: 20px;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding-block: 4px 32px;
    border-bottom: 1px solid var(--line);
}

.stats-overview > * {
    display: grid;
    align-content: start;
    gap: 6px;
}

.stats-overview strong {
    font-size: 36px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.stats-overview span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.stats-overview .icon {
    width: 14px;
    height: 14px;
}

.stats-section {
    padding-block: 28px;
    border-bottom: 1px solid var(--line);
}

.stats-section:last-child {
    border-bottom: 0;
}

.stats-section h2 {
    font-size: 20px;
}

.stats-section > .muted {
    font-size: 13px;
    margin-top: 8px;
}

.stats-section-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.period-tabs {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: var(--surface);
    border-radius: var(--radius);
}

.period-tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    color: var(--muted);
}

.period-tabs a:hover {
    color: var(--ink);
}

.period-tabs [aria-current] {
    color: var(--ink);
    background: var(--paper);
    box-shadow: 0 1px 3px #292a270d;
}

.stats-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 36px;
    margin-top: 24px;
}

.stats-stage {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 12px;
    font-size: 13px;
}

.stats-stage strong {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.stats-stage progress {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    height: 4px;
    border: 0;
    border-radius: 3px;
    overflow: hidden;
    background: var(--surface);
    accent-color: #9ca190;
}

.stats-stage progress::-webkit-progress-bar {
    background: var(--surface);
    border-radius: 3px;
}

.stats-stage progress::-webkit-progress-value {
    background: #9ca190;
    border-radius: 3px;
}

.stats-stage progress::-moz-progress-bar {
    background: #9ca190;
    border-radius: 3px;
}

.stats-empty {
    margin-top: 20px;
    font-size: 14px;
}

.stats-empty > span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.stats-explanation {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
}

.stats-explanation > summary {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.stats-explanation p {
    padding-bottom: 12px;
}

.activity-list {
    margin-block: 20px 28px;
}

.activity-list > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-block: 12px;
    border-bottom: 1px solid var(--line);
}

.activity-list dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.data-links {
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
}

.data-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

.feature-status {
    margin-left: auto;
    white-space: nowrap;
    font-size: 12px;
    color: var(--muted);
}

.reminder-preview summary::after {
    margin-left: 0;
}

.reminder-preview fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 18px;
    color: var(--muted);
}

.reminder-preview legend {
    font-size: 13px;
    margin-bottom: 16px;
}

.preview-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 2px 10px;
    align-items: center;
}

.preview-option span {
    grid-column: 2;
    font-size: 13px;
}

.reminder-preview :disabled {
    cursor: not-allowed;
}

.reminder-preview input:disabled, .reminder-preview select:disabled {
    opacity: .6;
}

.recovery-code {
    display: block;
    padding: 24px;
    margin-block: 24px;
    background: var(--surface);
    border-radius: var(--radius);
    font-size: clamp(16px, 3vw, 22px);
    overflow-wrap: anywhere;
}

.recovery-code + .muted {
    margin-bottom: 24px;
}

.trash-row {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--line);
}

.trash-row > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.trash-row span {
    font-size: 13px;
    color: var(--muted);
}

.trash-row .btn {
    flex-shrink: 0;
}

.import-preview {
    margin-top: 36px;
}

.import-preview > p {
    margin-block: 16px;
}

.import-table {
    max-width: 100%;
    overflow-x: auto;
    margin-top: 24px;
}

.import-table table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.import-table th {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

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

.import-table td {
    overflow-wrap: anywhere;
}

.import-table small {
    margin-top: 4px;
}

/* Короткое обучение: добровольный вход и три спокойных шага. */
.getting-started {
    max-width: 460px;
    margin: 28px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.getting-started p {
    margin: 0;
    font-size: 14px;
}

.getting-started > div {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    margin-top: 8px;
}

.getting-started .field-link {
    color: var(--ink);
}

.guide-page {
    width: min(100% - 64px, 1040px);
    max-width: 1040px;
    margin-top: 32px;
}

.guide-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.guide-heading h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.guide-heading > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    white-space: nowrap;
    font-size: 13px;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

.guide-steps a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding-block: 12px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: 14px;
}

.guide-steps a[aria-current] {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.guide-steps a > span {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.guide-content h2 {
    font-size: clamp(24px, 3vw, 30px);
    margin-bottom: 8px;
}

.guide-content > p {
    color: var(--muted);
    font-size: 14px;
}

.guide-demo {
    margin: 28px 0 0;
}

.guide-window {
    overflow: hidden;
    isolation: isolate;
    border: 1px solid #deddd7;
    border-radius: 16px;
    background: var(--paper);
    box-shadow: 0 20px 64px -32px #292a2740, 0 3px 10px #292a2706;
}

.guide-window-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 48px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(#f7f6f3, #f0efeb);
}

.guide-traffic {
    display: flex;
    gap: 8px;
}

.guide-traffic i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #e59a8d;
    box-shadow: inset 0 0 0 1px #292a270a;
}

.guide-traffic i:nth-child(2) { background: #e8c580; }
.guide-traffic i:nth-child(3) { background: #a8c7a1; }

.guide-window-title {
    font-size: 15px;
    font-weight: 550;
    letter-spacing: -.5px;
}

.guide-window-mark {
    justify-self: end;
    font-size: 11px;
    color: var(--muted);
}

.guide-demo img, .guide-film {
    display: block;
    width: 100%;
    height: auto;
}

.guide-canvas {
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.guide-demo-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 52px;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.guide-demo button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding-inline: 8px;
    color: var(--ink);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.guide-demo button:hover {
    background: var(--surface);
}

.guide-demo .icon-stop, .guide-demo.is-playing .icon-play {
    display: none;
}

.guide-demo.is-playing .icon-stop {
    display: block;
}

.guide-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.guide-try {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--ink);
}

@media (max-width: 600px) {
    .guide-page { padding-top: 0; }
    .guide-window { border-radius: 12px; }
    .guide-window-bar { min-height: 42px; padding-inline: 14px; }
    .guide-window-mark { display: none; }
    .guide-steps a { gap: 6px; font-size: 12px; }
    .guide-steps a > span { font-size: 10px; }
    .guide-demo-controls { align-items: center; font-size: 11px; }
    .guide-demo img { aspect-ratio: 1; object-fit: cover; }
    .guide-heading > a > span { display: none; }
}

/* 10. Знакомство с сервисом и быстрое добавление */
@media (prefers-reduced-motion: no-preference) {
    html:has(.landing-body) { scroll-behavior: smooth; }
}

.landing-page {
    width: min(100% - 64px, 1080px);
    margin-inline: auto;
}

.landing-header .header-inner {
    max-width: 1080px;
}

.landing-hero {
    padding-block: 84px 64px;
    text-align: center;
}

.landing-eyebrow {
    color: var(--muted);
    margin-bottom: 24px;
    font-size: 14px;
}

.landing-hero h1 {
    font-size: clamp(40px, 5.8vw, 72px);
    line-height: 1.07;
    letter-spacing: -.055em;
}

.landing-description {
    margin-top: 24px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--muted);
}

.landing-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 28px;
    margin-top: 30px;
}

.landing-actions .btn, .landing-start .btn {
    min-height: 50px;
    padding-inline: 24px;
    gap: 18px;
}

.landing-example-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

.landing-example, .landing-workflow {
    scroll-margin-top: 28px;
}

.landing-example {
    margin-top: 64px;
}

.landing-hero + .landing-workflow {
    padding-top: 16px;
}

.demo-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.landing-demo {
    overflow-anchor: none;
    padding: 12px 32px 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* Both demo panels reserve the same area, so switching never moves the page. */
.landing-demo[data-enhanced] { display: grid; grid-template-columns: minmax(0, 1fr); }
.landing-demo[data-enhanced] .demo-tabs { grid-area: 1 / 1; }
.landing-demo[data-enhanced] .demo-panel { grid-area: 2 / 1; }
.landing-demo[data-enhanced] .demo-panel[hidden] { display: block !important; visibility: hidden; pointer-events: none; }

.demo-tabs {
    display: flex;
    gap: 28px;
    border-bottom: 1px solid var(--line);
}

.demo-tabs button {
    min-height: 52px;
    padding: 10px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--muted);
}

.demo-tabs button[aria-selected="true"] {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.demo-tabs button:hover {
    color: var(--ink);
}

.demo-panel {
    min-height: 384px;
}

.demo-panel-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-block: 26px 22px;
}

.demo-panel-title h2 {
    font-size: 28px;
}

.demo-table-head, .demo-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 160px;
    align-items: center;
    gap: 28px;
}

.demo-table-head {
    padding-bottom: 10px;
    font-size: 12px;
    color: var(--muted);
}

.demo-row {
    min-height: 86px;
    padding-block: 16px;
    border-top: 1px solid var(--line);
}

.demo-row strong {
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
}

.demo-row > div > span {
    color: var(--muted);
    font-size: 13px;
}

.demo-row > p {
    font-size: 14px;
}

.demo-row small {
    margin-top: 4px;
}

.demo-row .status-badge {
    justify-self: start;
    font-size: 12px;
}

.demo-agenda-day {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    min-height: 94px;
    padding-block: 16px;
    border-top: 1px solid var(--line);
}

.demo-agenda-day > span {
    font-weight: 500;
}

.demo-agenda-day > div {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    align-items: baseline;
    gap: 20px;
}

.demo-agenda-day time {
    color: var(--muted);
    font-size: 13px;
}

.demo-agenda-day small {
    margin-top: 4px;
}

/* Содержание главной: крупные заголовки, спокойные строки вместо сетки карточек. */
.landing-workflow {
    padding-block: 80px;
}

.landing-kicker {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.landing-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: end;
    gap: 48px;
    margin-bottom: 40px;
}

.landing-section-heading h2,
.landing-benefits h2,
.landing-audience h2,
.landing-answers h2 {
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.18;
    letter-spacing: -.035em;
}

.landing-section-heading > p,
.landing-benefits-intro > p:last-child,
.landing-steps p,
.landing-benefit-list p,
.landing-audience-list dd,
.landing-limits li p,
.landing-answers .form-details p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 44px;
}

.landing-step-number {
    display: block;
    color: var(--accent);
    font-size: 13px;
    margin-bottom: 18px;
}

.landing-steps h3,
.landing-benefit-list h3 {
    font-size: 19px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 10px;
}

.landing-benefits {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 80px;
    padding-block: 64px;
    border-block: 1px solid var(--line);
}

.landing-benefits-intro > p:last-child {
    margin-top: 22px;
    max-width: 37ch;
}

.landing-benefit-list article + article {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.landing-fit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 64px;
    padding-block: 80px;
}

.landing-audience-list {
    margin: 30px 0 0;
}

.landing-audience-list > div + div {
    margin-top: 24px;
}

.landing-audience-list dt,
.landing-limits li strong {
    display: block;
    font-size: 15px;
    font-weight: 550;
    margin-bottom: 6px;
}

.landing-audience-list dd {
    margin: 0;
}

.landing-limits {
    padding: 32px;
    background: var(--surface);
    border-radius: var(--radius);
}

.landing-limits h2 {
    font-size: 25px;
    line-height: 1.3;
    letter-spacing: -.025em;
}

.landing-limits ul {
    list-style: none;
    padding: 0;
    margin: 26px 0 0;
}

.landing-limits li + li {
    margin-top: 22px;
}

.landing-answers {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
    align-items: start;
    gap: 64px;
    padding-bottom: 80px;
}

.landing-answers .form-details:first-child {
    margin-top: 0;
}

.landing-body .footer-inner {
    max-width: 1080px;
}

.landing-start {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    border-top: 1px solid var(--line);
    padding-block: 48px 24px;
}

.landing-start h2 {
    font-size: 30px;
}

.landing-start p {
    margin-top: 10px;
    color: var(--muted);
}

.landing-footer {
    max-width: 1080px;
}

.new-application-page, .quick-add-page {
    margin-top: 28px;
}

.new-application-page .editor-card > .muted {
    margin-bottom: 24px;
}

.new-application-page .application-form {
    margin-top: 24px;
}

.new-application-page .form-group {
    margin-bottom: 18px;
}

.new-application-page .save-actions {
    padding-block: 8px;
    margin-top: 8px;
}

.quick-add-form {
    display: grid;
    gap: 12px;
}

.quick-add-form > label {
    font-weight: 500;
}

.quick-add-form > textarea {
    min-height: 230px;
    line-height: 1.7;
    padding: 18px;
}

.quick-add-form .form-actions {
    margin-top: 12px;
}

.quick-add-form .btn-dark {
    gap: 16px;
}

.source-keep {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-block: 12px 0;
}

/* Vacancy source is preserved in the form; the reading view stays compact. */
.vacancy-sections { margin-block: 24px; }
.vacancy-sections:empty { display: none; }
.vacancy-block > summary { font-size: 16px; font-weight: 500; }
.vacancy-step-count { color: var(--muted); font-size: 13px; font-weight: 400; }
.vacancy-block-body { font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.vacancy-block-body h3 { margin: 24px 0 10px; font-size: 15px; font-weight: 500; letter-spacing: 0; }
.vacancy-block-body > :first-child, .vacancy-description section:first-child > :first-child { margin-top: 0; }
.vacancy-description section + section { margin-top: 24px; }
.vacancy-description p + p { margin-top: 12px; }
.vacancy-block-body ul { margin: 0; padding-left: 20px; }
.vacancy-block-body li + li { margin-top: 8px; }
.vacancy-block-body li::marker { color: var(--muted); }
.vacancy-facts { margin: 0; display: grid; gap: 12px; }
.vacancy-facts > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; }
.vacancy-facts dt { color: var(--muted); }
.vacancy-facts dd { margin: 0; }
.vacancy-hiring-steps { list-style: none; counter-reset: hiring-step; padding: 0; margin: 0; }
.vacancy-hiring-steps li { counter-increment: hiring-step; position: relative; padding: 8px 0 8px 44px; min-height: 36px; }
.vacancy-hiring-steps li::before { content: counter(hiring-step, decimal-leading-zero); position: absolute; left: 0; top: 8px; color: var(--accent); font-variant-numeric: tabular-nums; font-size: 12px; line-height: 24px; }
.vacancy-source .vacancy-sections { margin-bottom: 8px; }
.vacancy-source .source-keep { margin-top: 0; font-size: 13px; color: var(--muted); }

@media (max-width: 520px) {
    .vacancy-facts > div { grid-template-columns: 1fr; gap: 2px; }
    .vacancy-facts { gap: 16px; }
}

@media (max-width: 760px) {
    .landing-hero { padding-block: 56px 48px; }
    .landing-example { margin-top: 48px; }
    .landing-demo { padding-inline: 20px; }
    .demo-panel { min-height: 446px; }
    .demo-table-head { display: none; }
    .demo-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
    .demo-row > p { grid-column: 1 / -1; grid-row: 2; }
    .demo-row .status-badge { grid-column: 2; grid-row: 1; }
    .demo-row > p small { display: flex; margin-left: 0; }
    .demo-agenda-day { grid-template-columns: 1fr; gap: 10px; min-height: 113px; }
    .landing-workflow, .landing-fit { padding-block: 56px; }
    .landing-section-heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
    .landing-section-heading > p { max-width: 52ch; }
    .landing-steps { grid-template-columns: 1fr; gap: 28px; }
    .landing-step-number { margin-bottom: 8px; }
    .landing-steps p { max-width: 60ch; }
    .landing-benefits { grid-template-columns: 1fr; gap: 32px; padding-block: 48px; }
    .landing-benefits-intro > p:last-child { max-width: 52ch; margin-top: 16px; }
    .landing-fit { grid-template-columns: 1fr; gap: 36px; }
    .landing-answers { grid-template-columns: 1fr; gap: 28px; padding-bottom: 56px; }
    .landing-start { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
    .landing-page { width: calc(100% - 32px); }
    .landing-header .header-inner { flex-direction: row; align-items: center; gap: 16px; padding-block: 12px; min-height: 80px; }
    .landing-header .header-inner nav {
        width: auto;
        justify-content: flex-end;
        gap: 18px;
    }

    .landing-header .header-inner nav a {
        flex: 0 0 auto;
        font-size: 12px;
        padding-inline: 0;
    }

    .landing-hero { text-align: left; padding-block: 44px 40px; }
    .landing-hero h1 { font-size: clamp(34px, 9.2vw, 46px); }
    .landing-eyebrow { font-size: 12px; margin-bottom: 18px; }
    .landing-description { font-size: 15px; margin-top: 20px; }
    .landing-desktop-break { display: none; }
    .landing-actions { justify-content: flex-start; gap: 8px 20px; margin-top: 24px; }
    .demo-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .landing-demo { padding-inline: 16px; border-radius: 8px; }
    .landing-example { margin-top: 40px; }
    .demo-panel { min-height: 482px; }
    .demo-panel-title { padding-block: 22px; }
    .demo-panel-title h2 { font-size: 25px; }
    .demo-row { grid-template-columns: 1fr; min-height: 127px; gap: 6px; }
    .demo-row > div { grid-row: 1; }
    .demo-row > p { grid-row: 3; font-size: 12px; }
    .demo-row > p small { font-size: 12px; }
    .demo-row .status-badge { grid-column: 1; grid-row: 2; padding: 2px 7px; font-size: 11px; }
    .demo-row strong { font-size: 16px; margin-bottom: 2px; }
    .demo-agenda-day { min-height: 127px; }
    .demo-agenda-day > div { grid-template-columns: 78px minmax(0, 1fr); gap: 10px; font-size: 13px; }
    .demo-agenda-day time, .demo-agenda-day small { font-size: 12px; }
    .landing-workflow, .landing-fit { padding-block: 44px; }
    .landing-benefits { padding-block: 40px; }
    .landing-benefit-list article + article { margin-top: 22px; padding-top: 22px; }
    .landing-limits { padding: 24px 20px; }
    .landing-limits h2 { font-size: 23px; }
    .landing-answers { padding-bottom: 44px; }
    .landing-kicker { margin-bottom: 12px; }
    .landing-start { padding-block: 32px 8px; }
    .landing-start h2 { font-size: 27px; }
    .landing-footer { align-items: flex-start; }
    .quick-add-form > textarea { min-height: 210px; font-size: 16px; }
}

/* 11. Вход, малые экраны и настройки движения */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(100% - 64px, var(--page-width));
    margin: 28px auto;
}

.auth-about {
    color: var(--muted);
    font-size: 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.auth-shell {
    width: min(100% - 40px, 420px);
    margin: clamp(40px, 7vh, 88px) auto 72px;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-header h1, .auth-card > h1 {
    font-size: 36px;
}

.auth-header p {
    margin-top: 16px;
    color: var(--muted);
}

.auth-card > h1 + p {
    margin: 16px 0 28px;
    color: var(--muted);
}

.auth-footer {
    margin-top: 20px;
    font-size: 14px;
    color: var(--muted);
}

.auth-footer a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.add-card {
    max-width: 520px;
    margin: 48px auto;
    padding: 24px;
}

.add-card-top {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.add-card-titles h1 {
    font-size: 28px;
}

.add-card-titles p {
    margin-top: 8px;
    color: var(--muted);
}

.navigation-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transform: scaleX(.1);
    transform-origin: left;
    pointer-events: none;
    z-index: 100;
    transition: opacity 120ms, transform 10s cubic-bezier(.1, .8, .2, 1);
}

html[data-navigating="true"] .navigation-progress {
    opacity: 1;
    transform: scaleX(.9);
}

.navigation-feedback {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 32px);
    z-index: 100;
    background: var(--ink);
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 14px;
}

form[aria-busy="true"] button[type="submit"] {
    opacity: .55;
    cursor: wait;
}

@media (max-width: 1000px) {
    .list-labels, .job-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 154px 36px;
        gap: 16px;
        padding-inline: 16px;
    }

    .row-menu > summary {
        width: 36px;
    }

    .schedule-event {
        grid-template-columns: 36px 52px minmax(0, 1fr) minmax(0, 1fr) 44px;
        gap: 12px;
    }

    .schedule-day > summary {
        grid-template-columns: 72px minmax(0, 1fr) auto 18px;
        gap: 16px;
    }

    .day-count {
        max-width: 210px;
    }

}

@media (max-width: 760px) {
    :root {
        --space: 20px;
    }

    .header-inner, .workspace, .footer-inner {
        width: calc(100% - 40px);
    }

    .header-inner {
        min-height: 88px;
        gap: 16px;
    }

    .site-header nav {
        gap: 2px;
    }

    .site-header nav a {
        padding-inline: 10px;
        font-size: 13px;
    }

    .workspace, .editor-page, .profile-page {
        margin-top: 32px;
    }

    .page-heading {
        align-items: flex-start;
    }

    .tracker-page .page-heading {
        flex-wrap: wrap;
    }

    .page-heading > .btn {
        flex-shrink: 0;
    }

    .page-description {
        font-size: 14px;
    }

    .scope-tabs {
        gap: 24px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .filter-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bulk-tools {
        order: 0;
    }

    .list-labels {
        display: none;
    }

    .jobs-list {
        border-top: 1px solid var(--line);
    }

    .job-card {
        grid-template-columns: minmax(0, 1fr) auto 36px;
        gap: 16px;
        padding: 22px 16px;
    }

    .job-identity {
        grid-column: 1;
        grid-row: 1;
    }

    .job-stage {
        grid-column: 2;
        grid-row: 1;
    }

    .job-card > .row-menu {
        grid-column: 3;
        grid-row: 1;
    }

    .job-next {
        grid-column: 1 / -1;
        grid-row: 2;
        gap: 4px;
    }


    .schedule-day > summary {
        grid-template-columns: 60px minmax(0, 1fr) 18px;
        gap: 4px 16px;
        padding: 18px var(--space);
    }

    .day-date {
        grid-row: 1 / span 2;
        align-self: start;
    }

    .day-count {
        grid-column: 2;
        text-align: left;
        max-width: none;
        font-size: 12px;
    }

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

    .schedule-event {
        grid-template-columns: 36px 48px minmax(0, 1fr) 44px;
        gap: 4px 12px;
    }

    .schedule-event > .task-completion {
        grid-row: 1 / span 2;
    }

    .schedule-event-time {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .schedule-event-identity {
        grid-column: 3;
        grid-row: 1;
    }

    .schedule-event-info {
        grid-column: 3;
        grid-row: 2;
    }

    .schedule-event-actions {
        grid-column: 4;
        grid-row: 1 / span 2;
    }

    .task-row {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        gap: 4px 12px;
    }

    .task-row > .task-completion, .task-row > .task-done-mark {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .task-row > .task-copy {
        grid-column: 2;
        grid-row: 1;
    }

    .task-row > .task-when {
        grid-column: 2;
        grid-row: 2;
        max-width: none;
    }

    .task-row > .task-editor, .task-row > .task-reschedule, .task-row > .task-restore {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .task-row .task-editor > summary {
        padding-inline: 8px;
    }

    .task-check, .task-done-mark {
        width: 36px;
    }

    .editor-page, .profile-page {
        width: calc(100% - 40px);
    }

}

@media (max-width: 520px) {
    :root {
        --space: 16px;
    }

    .header-inner, .workspace, .footer-inner, .editor-page, .profile-page {
        width: calc(100% - 32px);
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-block: 20px 4px;
    }

    .site-header nav {
        width: 100%;
        justify-content: space-between;
        gap: 4px;
    }

    .site-header nav a {
        justify-content: center;
        padding-inline: 3px;
        flex: 1;
        font-size: 12px;
        white-space: nowrap;
    }

    .brand {
        font-size: 24px;
    }

    .workspace, .editor-page, .profile-page {
        margin-top: 28px;
    }

    .page-heading {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 28px;
    }

    .page-heading .btn {
        width: 100%;
    }

    .profile-top {
        align-items: flex-start;
        gap: 12px;
    }

    .profile-top .btn {
        font-size: 13px;
        padding-inline: 8px;
        white-space: nowrap;
    }

    .today-summary {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
        padding: 18px 16px;
    }

    .today-preview {
        grid-row: 2;
        grid-column: 1 / -1;
        font-size: 13px;
    }

    .today-toggle {
        grid-row: 1;
        grid-column: 2;
    }

    .upcoming-task {
        grid-template-columns: minmax(0, 1fr) 18px;
        gap: 10px 16px;
    }

    .upcoming-when {
        grid-column: 1;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .upcoming-copy {
        grid-column: 1;
    }

    .upcoming-task > .icon {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .day-count {
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .form-details > summary:has(.summary-value) {
        flex-wrap: wrap;
        gap: 4px 12px;
    }

    .form-details > summary .summary-value {
        max-width: 100%;
    }

    .today-content {
        padding-inline: 16px;
    }

    .today-heading {
        gap: 8px;
    }

    .today-tabs {
        gap: 24px;
    }

    .task-row {
        column-gap: 8px;
    }

    .task-row .task-editor-label {
        display: none;
    }

    .task-row .task-editor-icon {
        display: inline;
    }

    .task-row .task-editor > summary {
        width: 36px;
        padding: 0;
    }

    .task-reschedule, .task-restore button {
        padding-inline: 4px;
        font-size: 12px;
    }

    .today-footer {
        gap: 0;
    }

    .today-pagination {
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid var(--line);
        margin-top: 8px;
        padding-top: 8px;
    }

    .today-pagination > span:first-child {
        margin-right: auto;
    }

    .scope-tabs {
        gap: 20px;
        font-size: 14px;
    }

    .filter-bar {
        margin-top: 18px;
    }

    .search-field {
        padding-left: 12px;
        gap: 10px;
    }

    .search-field input[type="search"] {
        font-size: 16px;
    }

    .search-submit {
        padding-inline: 10px;
    }

    .search-submit > span {
        display: none;
    }

    .filter-fields {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .list-controls {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 4px 8px;
    }

    .result-range {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
    }

    .page-sizes {
        grid-column: 1;
        grid-row: 2;
        margin: 0;
        justify-self: start;
    }

    .page-stepper {
        grid-column: 2;
        grid-row: 2;
        margin: 0;
    }

    .bulk-tools {
        grid-column: 2;
        grid-row: 1;
        width: auto;
    }

    .list-controls:has(#bulk-form:not([hidden])) {
        display: flex;
    }

    .list-controls:has(#bulk-form:not([hidden])) .bulk-tools {
        width: 100%;
    }

    .bulk-tools .btn {
        padding-left: 0;
    }

    .bulk-tools form .btn {
        padding-inline: 12px;
    }

    .page-stepper {
        margin-left: auto;
    }

    .job-card {
        grid-template-columns: minmax(0, 1fr) 36px;
        gap: 12px;
        padding-inline: 12px;
    }

    .job-card > .row-menu {
        grid-column: 2;
    }

    .job-next {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .job-stage {
        grid-column: 1 / -1;
        grid-row: 3;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px 14px;
    }

    .job-card-company {
        font-size: 17px;
    }

    .quick-stage > :not(summary) {
        right: auto;
        left: 0;
    }

    .page-direction > span {
        display: none;
    }

    .pagination {
        gap: 4px;
    }

    .page-numbers {
        gap: 0;
    }

    .page-numbers a, .page-gap {
        min-width: 32px;
        padding-inline: 6px;
    }

    .page-direction {
        justify-content: center;
        min-width: 32px;
    }

    .list-footer {
        margin-top: 18px;
        gap: 0;
    }

    .schedule-controls {
        gap: 4px;
        margin-bottom: 12px;
    }

    .schedule-controls .profile-tabs, .schedule-toolbar {
        width: 100%;
    }

    .schedule-controls .profile-tabs {
        gap: 24px;
    }

    .schedule-toolbar {
        justify-content: space-between;
        padding-block: 8px;
        gap: 4px;
    }

    .schedule-nav {
        flex: 1;
        grid-template-columns: 36px minmax(0, 1fr) 36px;
    }

    .schedule-toolbar h2 {
        font-size: 14px;
    }

    .schedule-date-picker > summary {
        padding-inline: 2px;
    }

    .week-today {
        font-size: 12px;
        padding-inline: 6px;
    }

    .profile-tabs {
        gap: 24px;
        font-size: 14px;
    }

    .schedule-day > summary {
        grid-template-columns: 52px minmax(0, 1fr) 16px;
        column-gap: 12px;
    }

    .day-weekday {
        font-size: 16px;
    }

    .day-title {
        gap: 4px 10px;
    }

    .day-today, .day-important {
        font-size: 11px;
    }

    .day-panel {
        padding-inline: 8px;
    }

    .schedule-event {
        grid-template-columns: 32px minmax(0, 1fr) 36px;
        gap: 4px 10px;
    }

    .schedule-event > .task-completion {
        grid-column: 1;
        grid-row: 1 / span 3;
    }

    .schedule-event-time {
        grid-column: 2;
        grid-row: 1;
        font-size: 12px;
    }

    .schedule-event-identity {
        grid-column: 2;
        grid-row: 2;
    }

    .schedule-event-info {
        grid-column: 2;
        grid-row: 3;
    }

    .schedule-event-actions {
        grid-column: 3;
        grid-row: 1 / span 3;
    }

    .schedule-event-actions .task-editor > summary {
        width: 36px;
    }

    .schedule-event-identity strong {
        font-size: 15px;
    }

    .schedule-event .task-check {
        width: 32px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row:has(> label) {
        gap: 18px;
    }

    .form-details > summary {
        min-height: 64px;
    }

    .form-actions .btn-dark {
        flex: 1;
    }

    .save-actions {
        gap: 8px;
    }

    .save-actions .draft-status {
        width: 100%;
    }

    .guide-heading {
        gap: 8px;
    }

    .guide-heading > a > span {
        display: none;
    }

    .guide-heading > a {
        min-width: 32px;
        min-height: 44px;
        justify-content: center;
    }

    .guide-steps a {
        gap: 6px;
        font-size: 12px;
    }

    .guide-steps a > span {
        font-size: 10px;
    }

    .guide-content h2 {
        font-size: 22px;
    }

    .guide-actions .btn {
        font-size: 13px;
        padding-inline: 12px;
    }

    .feature-status {
        font-size: 11px;
    }

    .stats-overview {
        gap: 12px;
    }

    .stats-overview strong {
        font-size: 30px;
    }

    .stats-overview span {
        font-size: 12px;
    }

    .stats-breakdown {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .stats-section-heading {
        gap: 16px;
    }

    .event-history-row {
        gap: 4px 12px;
    }

    .trash-row {
        flex-wrap: wrap;
        padding: 20px 12px;
        gap: 12px;
    }

    .site-footer {
        margin-top: 48px;
    }

    .auth-brand {
        width: calc(100% - 40px);
        margin-top: 24px;
    }

    .auth-shell {
        margin-top: 48px;
    }

    .auth-header h1, .auth-card > h1 {
        font-size: 32px;
    }

}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

}

/* Account safety and help: quiet secondary navigation, readable text width. */
.legal-copy { max-width: 660px; line-height: 1.7; }
.profile-page > h1 + .legal-copy { margin-top: 24px; }
.legal-copy h2 { margin: 36px 0 12px; font-size: 22px; letter-spacing: -.025em; }
.legal-copy p { margin: 0 0 18px; }
.legal-copy a:not(.btn), .auth-form small a { text-decoration: underline; text-underline-offset: 4px; }
.legal-draft { padding: 16px 20px; background: var(--surface); border-radius: 12px; color: var(--muted); font-size: 14px; }
.account-delete-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 24px; color: var(--muted); }
.account-delete-link:hover { color: var(--ink); }

/* Compact reading mode; editing stays one deliberate action away. */
.application-role { font-size: 22px; margin: 12px 0 16px; }
.application-facts { display: grid; gap: 18px; margin: 28px 0 20px; }
.application-facts div { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 24px; }
.application-facts dt { color: var(--muted); }
.application-facts dd { margin: 0; overflow-wrap: anywhere; }
.application-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.application-edit > summary { color: var(--accent); }
.application-edit .application-form { padding-top: 24px; }
.save-intent { display: flex; flex-wrap: wrap; gap: 12px 24px; border: 0; margin: 0 0 20px; padding: 0; }
.save-intent label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.save-intent input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.schedule-create { margin: 0 0 24px; }
.schedule-create:not([open]) { display: none; }
.just-created { background: var(--accent-soft); border-radius: var(--radius); }
.quick-stage .text-button { text-align: left; font-size: 12px; line-height: 1.5; }
@media (max-width: 640px) {
    .tracker-page .page-heading { margin-bottom: 24px; }
    .tracker-page .page-description { margin-top: 8px; }
    .tracker-page .today-panel { margin-bottom: 28px; }
    .tracker-page .filter-bar { margin-top: 18px; margin-bottom: 12px; }
    .tracker-page .list-controls { gap: 12px; padding-block: 12px; }
    .application-facts div { grid-template-columns: 1fr; gap: 4px; }
    .application-role { font-size: 18px; }
}

/* Keep the first vacancy in view on a phone; the cards retain their spacing. */
@media (max-width: 640px) {
    .tracker-page .page-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
    .tracker-page .page-heading h1 { font-size: 26px; }
    .tracker-page .page-description { display: none; }
    .tracker-page .page-heading > .btn { width: auto; padding: 12px 10px; font-size: 12px; }
    .tracker-page .today-label small { display: none; }
    .tracker-page .today-summary { padding-block: 14px; }
    .tracker-page .list-controls { gap: 4px 8px; padding-block: 8px; }
}

@media (max-width: 360px) {
    .tracker-page .page-heading {
        grid-template-columns: 1fr;
    }

    .tracker-page .page-heading > .btn {
        width: 100%;
    }
}

/* Legal documents use the same restrained reading rhythm as the workspace. */
.legal-meta { color: var(--muted); font-size: 13px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 32px; }
.legal-copy ul { padding-left: 20px; margin: 0 0 18px; }
.legal-copy li + li { margin-top: 8px; }
.legal-operator { margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--line); }
.legal-operator dd { margin: 4px 0 16px; white-space: pre-line; overflow-wrap: anywhere; }
.legal-operator dt { color: var(--muted); font-size: 13px; }
.auth-form .terms-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.6; }
.auth-form .terms-check input { width: 18px; height: 18px; flex: 0 0 18px; margin: 3px 0 0; accent-color: var(--accent); }
.terms-check a { text-decoration: underline; text-underline-offset: 3px; }


.auth-body {display:flex;flex-direction:column;min-height:100vh;min-height:100svh;}
.auth-body > .site-footer {margin-top:auto;}
.auth-actions {margin-top:28px;}
.auth-actions .btn {width:100%;white-space:normal;text-align:center;}
.auth-return {margin-top:24px;padding-top:20px;border-top:1px solid var(--line);}
.auth-return .back-link {margin:0;gap:10px;font-size:14px;}
/* Mobile spacing fixes; desktop composition stays unchanged. */
@media (max-width: 520px) {
    .landing-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .landing-actions > a { width: 100%; justify-content: center; }
    .landing-actions > .landing-example-link { min-height: 44px; }
    .landing-hero { padding-bottom: 24px; }
    .landing-hero + .landing-workflow { padding-top: 8px; }
    .landing-start > .btn { width: 100%; }
}
@media (max-width: 760px) {
    /* Keep native form controls legible at the page's normal scale. */
    body :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { font-size: 16px; }
    .task-date-fields, .quick-event-date {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
    }
}
