@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/golos-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/golos-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0d0d12;
  --muted: #6f6f6f;
  --line: #ededed;
  --border: #c7c7c7;
  --paper: #f6f6f6;
  --white: #fff;
  --blue: #008cff;
  --blue-deep: #0070d6;
  --blue-light: #9ad1ff;
  --blue-tint: #f0f7ff;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #d82c20;
  --red-light: #ffcfcf;
  --dark-elevated: #15161c;
  --radius: 8px;
  --radius-lg: 16px;
  --radius-pill: 100px;
  --content-max: 1440px;
  --shadow-sm: 0 2px 8px rgba(13, 13, 18, .06);
  --shadow-md: 0 8px 40px rgba(13, 13, 18, .12);
  color: var(--ink);
  background: var(--white);
  font-family: "Golos Text", Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--white); color: var(--ink); font-size: 16px; line-height: 1.55; }
body.has-dialog { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.08; letter-spacing: -.025em; }
h1 { margin-bottom: 18px; font-size: clamp(38px, 5vw, 64px); letter-spacing: -.035em; }
h2 { margin-bottom: 14px; font-size: clamp(24px, 3vw, 36px); }
h3 { margin-bottom: 8px; font-size: 20px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 16px; border-radius: var(--radius); background: var(--white); color: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.muted { color: var(--muted); }

/* Header mirrors the current kt-team.ru proportions and contrast. */
.topbar { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255, 255, 255, .12); background: rgba(13, 13, 18, .96); color: var(--white); backdrop-filter: blur(18px); }
.topbar__inner { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; min-height: 66px; padding: 14px clamp(20px, 4vw, 64px); }
.brand { display: inline-flex; align-items: center; gap: 14px; width: max-content; color: var(--white); text-decoration: none; }
.brand img { width: 149px; height: auto; }
.brand__product { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .26); color: rgba(255, 255, 255, .7); font-size: 14px; font-weight: 400; }
.primary-nav { display: flex; align-items: center; justify-content: space-between; gap: clamp(18px, 3vw, 48px); min-width: 0; }
.primary-nav__list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.primary-nav__list a { display: inline-flex; padding: 8px 2px; color: rgba(255, 255, 255, .76); font-size: 15px; font-weight: 400; text-decoration: none; }
.primary-nav__list a:hover, .primary-nav__list a[aria-current="page"] { color: var(--white); }
.primary-nav__list a[aria-current="page"] { box-shadow: inset 0 -2px var(--blue); }
.user-menu { display: flex; align-items: center; gap: 12px; min-width: 0; white-space: nowrap; }
.user-menu__identity { display: grid; min-width: 0; text-align: right; }
.user-menu__name { max-width: 190px; overflow: hidden; color: var(--white); font-size: 14px; text-overflow: ellipsis; }
.user-menu__role { color: rgba(255, 255, 255, .58); font-size: 12px; }
.user-menu form { margin: 0; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar--fallback { display: grid; place-items: center; background: var(--blue); color: var(--white); font-size: 14px; font-weight: 500; }
.avatar--large { width: 48px; height: 48px; font-size: 18px; }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: var(--radius); background: transparent; }
.nav-toggle > span:not(.sr-only) { width: 24px; height: 2px; margin: 5px 0; background: var(--white); transition: transform .18s ease, opacity .18s ease; }
.nav-toggle[aria-expanded="true"] > span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] > span:nth-of-type(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] > span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }

.page-shell { width: min(100%, var(--content-max)); min-height: calc(100vh - 66px); margin: 0 auto; padding: clamp(42px, 6vw, 84px) clamp(20px, 4vw, 64px) 96px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 44px; }
.page-head > div:first-child { max-width: 940px; }
.page-head .lead { max-width: 760px; margin-bottom: 0; }
.page-head__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.eyebrow { margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.lead { color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.5; }
.title-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 18px; color: var(--muted); }
.breadcrumbs { display: flex; gap: 9px; margin: -18px 0 34px; color: var(--muted); font-size: 14px; }
.breadcrumbs a:hover { color: var(--blue); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1.5px solid transparent; border-radius: var(--radius-pill); background: var(--white); color: var(--ink); font-size: 15px; font-weight: 400; line-height: 1.2; text-decoration: none; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.button--primary { border-color: var(--blue); background: var(--blue); color: var(--white); }
.button--primary:hover { border-color: var(--blue-deep); background: var(--blue-deep); }
.button--outline { border-color: var(--blue); background: var(--white); color: var(--blue-deep); }
.button--outline:hover { background: var(--blue); color: var(--white); }
.button--header { min-height: 38px; padding: 8px 17px; border-color: var(--white); background: transparent; color: var(--white); }
.button--header:hover { background: var(--white); color: var(--ink); }
.button--quiet { min-height: 40px; border-color: var(--line); background: transparent; color: var(--muted); }
.button--quiet:hover { border-color: var(--blue-light); color: var(--blue-deep); }
.button--small { min-height: 36px; padding: 8px 15px; font-size: 13px; }
.button--large { min-height: 54px; padding: 15px 28px; font-size: 16px; }
.text-link, .external-link, .entity-link { color: var(--blue-deep); font-weight: 400; }
.text-link, .external-link { display: inline-flex; align-items: center; gap: 6px; }
.external-link { overflow-wrap: anywhere; }
.entity-link { font-weight: 500; text-decoration: none; }
.entity-link:hover, .text-link:hover, .external-link:hover { color: var(--blue); }

.flash-stack { display: grid; gap: 10px; margin-bottom: 28px; }
.flash { padding: 14px 18px; border-radius: var(--radius); background: var(--blue-tint); color: var(--ink); }
.flash--success { background: #e7f9ed; }
.flash--warning { background: #fff4d8; }
.flash--error { background: var(--red-light); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card { display: grid; min-height: 182px; padding: 22px; border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); text-decoration: none; }
.metric-card:hover { background: var(--blue-tint); }
.metric-card__label { color: var(--muted); font-size: 14px; }
.metric-card strong { align-self: end; color: var(--blue); font-size: clamp(42px, 5vw, 58px); font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.metric-card__hint { color: var(--muted); font-size: 13px; }
.metric-card--warning strong { color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, .8fr); gap: 24px; }

.panel, .workflow-panel { min-width: 0; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--paper); }
.panel--wide { min-width: 0; }
.panel--span-2 { grid-column: 1 / -1; }
.panel__head { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.panel__head h2 { margin-bottom: 0; font-size: clamp(22px, 2.4vw, 30px); }
.panel__head .eyebrow { margin-bottom: 7px; }
.panel-note, .field-hint { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.inline-empty { display: grid; gap: 4px; padding: 20px; border-radius: var(--radius); background: var(--white); }
.inline-empty span { color: var(--muted); }

.table-wrap { max-width: 100%; overflow-x: auto; border-radius: var(--radius); background: var(--white); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.data-table th { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--blue-tint); }
.table-subtitle { display: block; max-width: 360px; margin-top: 3px; color: var(--muted); font-size: 12px; }
.epic-table-wrap { box-shadow: inset 0 0 0 1px var(--line); }
.epic-table td:first-child { min-width: 250px; }

.status { display: inline-flex; align-items: center; width: max-content; min-height: 26px; padding: 5px 10px; border-radius: var(--radius-pill); background: var(--blue-tint); color: var(--blue-deep); font-size: 12px; line-height: 1.1; white-space: nowrap; }
.status--queued, .status--planned { background: #ececef; color: #55555f; }
.status--in-progress, .status--active, .status--accrued { background: var(--blue-tint); color: var(--blue-deep); }
.status--closed, .status--invoiced { background: #fff2cf; color: #805a00; }
.status--paid, .status--bonuses-paid { background: #e4f8ea; color: #126b31; }
.status--inactive, .status--needs-score { background: #f0f0f0; color: var(--muted); }
.deadline--overdue { color: var(--red) !important; font-weight: 500; }
.score { color: var(--muted); white-space: nowrap; }
.score strong { color: var(--blue); font-size: 18px; font-weight: 500; }
.score--large strong { font-size: 34px; }

.deadline-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.deadline-list li { display: grid; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.deadline-list li:first-child { border-top: 0; padding-top: 0; }
.deadline-list time { color: var(--blue-deep); font-size: 13px; }
.deadline-list a { font-weight: 500; text-decoration: none; }
.deadline-list a:hover { color: var(--blue); }
.deadline-list span { color: var(--muted); font-size: 13px; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 28px; padding: 16px; border-radius: var(--radius-lg); background: var(--paper); }
.filter-bar .field--search { flex: 1 1 300px; }
.filter-bar .field--compact { flex: 0 1 210px; }
.field { display: grid; gap: 7px; min-width: 0; color: var(--ink); font-size: 14px; }
.field > span, .score-picker legend { color: var(--muted); font-size: 13px; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--ink); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 2px solid rgba(0, 140, 255, .18); outline-offset: 0; }
.field small { color: var(--muted); font-size: 12px; }
.form-stack { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field--span-2 { grid-column: 1 / -1; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.entity-card { display: grid; gap: 22px; min-width: 0; padding: clamp(22px, 3vw, 30px); border-radius: var(--radius-lg); background: var(--paper); }
.entity-card__head { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.entity-card__head h2 { margin: 12px 0 0; font-size: clamp(24px, 3vw, 34px); }
.entity-card__head h2 a { text-decoration: none; }
.entity-card__head h2 a:hover { color: var(--blue); }
.entity-card__metric { flex: none; color: var(--muted); font-size: 13px; text-align: right; }
.entity-card__metric strong { display: block; color: var(--blue); font-size: 26px; font-weight: 500; }
.entity-card__note { margin: 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.entity-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.key-values { display: grid; gap: 0; margin: 0; }
.key-values > div { display: grid; grid-template-columns: minmax(120px, .75fr) minmax(0, 1.25fr); gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.key-values dt { color: var(--muted); }
.key-values dd { min-width: 0; margin: 0; }
.key-values--large > div { padding: 14px 0; }

.process-list { display: grid; gap: 12px; }
.process-row { display: grid; grid-template-columns: 56px minmax(240px, 1.4fr) minmax(330px, 1fr) auto; gap: clamp(18px, 3vw, 34px); align-items: center; padding: 24px; border-radius: var(--radius-lg); background: var(--paper); }
.process-row__number { color: var(--blue); font-size: 30px; font-weight: 500; }
.process-row__body h2 { margin-bottom: 8px; font-size: clamp(22px, 2.5vw, 30px); }
.process-row__body p:last-child { margin-bottom: 0; color: var(--muted); }
.process-row__meta { display: grid; gap: 8px; margin: 0; }
.process-row__meta div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; }
.process-row__meta dt { color: var(--muted); }
.process-row__meta dd { min-width: 0; margin: 0; }

.workflow-panel { margin-bottom: 24px; }
.workflow { display: grid; grid-template-columns: repeat(6, minmax(105px, 1fr)); margin: 0; padding: 8px 0 0; list-style: none; overflow-x: auto; }
.workflow__step { position: relative; display: grid; grid-template-rows: 24px auto; gap: 8px; min-width: 105px; padding-right: 12px; color: var(--muted); font-size: 13px; }
.workflow__step::before { content: ""; position: absolute; top: 8px; left: 11px; right: -1px; height: 2px; background: var(--line); }
.workflow__step:last-child::before { display: none; }
.workflow__dot { position: relative; z-index: 1; width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 50%; background: var(--white); }
.workflow__step.is-complete::before { background: var(--blue); }
.workflow__step.is-complete .workflow__dot { border-color: var(--blue); background: var(--blue); }
.workflow__step.is-current { color: var(--ink); font-weight: 500; }
.workflow__step.is-current .workflow__dot { border: 5px solid var(--blue); }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.date-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.date-grid div { padding: 18px; border-radius: var(--radius); background: var(--white); }
.date-grid dt { margin-bottom: 5px; color: var(--muted); font-size: 13px; }
.date-grid dd { margin: 0; font-size: 19px; font-weight: 500; }
.money-callout { display: grid; gap: 4px; margin-bottom: 14px; padding: 20px; border-radius: var(--radius); background: var(--blue); color: var(--white); }
.money-callout span { color: rgba(255, 255, 255, .72); font-size: 13px; }
.money-callout strong { font-size: clamp(28px, 4vw, 42px); font-weight: 500; letter-spacing: -.03em; }
.history-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.history-list li { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding: 16px; border-radius: var(--radius); background: var(--white); }
.history-list p { margin-bottom: 5px; }
.history-list li div span { color: var(--muted); font-size: 12px; }

.people-section + .people-section { margin-top: 48px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-head h2 { margin-bottom: 0; }
.section-head > span { color: var(--blue); font-size: 32px; font-weight: 500; }
.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.person-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: start; padding: 22px; border-radius: var(--radius-lg); background: var(--paper); }
.person-card h3 { margin: 2px 0 3px; }
.person-card a { color: var(--blue-deep); font-size: 14px; }
.person-card p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.notice-card { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-top: 48px; padding: 28px; border: 1px solid var(--blue-light); border-radius: var(--radius-lg); background: var(--blue-tint); }
.notice-card h2 { font-size: 26px; }
.notice-card p:last-child { max-width: 720px; margin-bottom: 0; color: var(--muted); }

.empty-state { display: grid; justify-items: start; max-width: 680px; padding: clamp(32px, 6vw, 64px); border-radius: var(--radius-lg); background: var(--paper); }
.empty-state__mark { margin-bottom: 22px; color: var(--blue); font-size: 46px; line-height: .6; }
.empty-state h2 { margin-bottom: 10px; }
.empty-state p { margin-bottom: 24px; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; color: var(--muted); font-size: 13px; }

.dialog { width: min(560px, calc(100vw - 32px)); max-height: min(880px, calc(100dvh - 32px)); padding: 0; overflow: auto; border: 0; border-radius: var(--radius-lg); background: var(--white); color: var(--ink); box-shadow: var(--shadow-md); }
.dialog--wide { width: min(800px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(13, 13, 18, .58); backdrop-filter: blur(4px); }
.dialog__body { padding: clamp(22px, 4vw, 34px); }
.dialog__head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog__head h2 { margin-bottom: 0; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.icon-button { display: grid; flex: none; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); font-size: 24px; line-height: 1; }
.icon-button:hover { border-color: var(--blue); color: var(--blue); }
.score-picker { display: flex; gap: 10px; margin: 0; padding: 0; border: 0; }
.score-picker legend { margin-bottom: 8px; }
.score-picker label { position: relative; }
.score-picker input { position: absolute; opacity: 0; }
.score-picker span { display: grid; place-items: center; width: 46px; height: 46px; border: 1.5px solid var(--border); border-radius: 50%; }
.score-picker input:checked + span { border-color: var(--blue); background: var(--blue); color: var(--white); }
.score-picker input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.contact-summary, .contact-person-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.contact-summary li, .contact-person-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.contact-summary strong, .contact-person-list strong { font-size: 14px; }
.contact-summary span, .contact-person-list span { color: var(--muted); font-size: 13px; }
.contact-summary a, .contact-person-list a { color: var(--blue-deep); font-size: 13px; }
.contact-person-list { margin: 0; }
.contact-list { display: grid; gap: 14px; }
.contact-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.contact-card--new { border-color: var(--blue-light); background: var(--blue-tint); }
.contact-card .dialog__actions { margin: 0; padding-top: 0; }
.checkbox-list { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.checkbox-list label { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; }
.checkbox-list label:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); }
.checkbox-list input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.checkbox-list span { display: grid; gap: 3px; }
.checkbox-list small { color: var(--muted); }

.login-page { background: var(--white); }
.login-page .page-shell { width: 100%; min-height: 100vh; padding: 0; }
.login-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(480px, 1.1fr); min-height: 100vh; }
.login-brand { display: flex; align-items: flex-start; gap: 18px; padding: clamp(36px, 6vw, 80px); background: var(--ink); color: var(--white); }
.login-brand img { width: 149px; }
.login-brand span { padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .28); color: rgba(255, 255, 255, .7); }
.login-card { align-self: center; width: min(560px, 100%); padding: clamp(36px, 8vw, 96px); }
.login-card h1 { max-width: 540px; }
.login-card .lead { margin-bottom: 34px; }
.google-button { width: 100%; max-width: 340px; }
.login-note { max-width: 430px; margin: 18px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 1100px) {
  .user-menu__identity { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-row { grid-template-columns: 44px minmax(220px, 1fr) minmax(290px, 1fr); }
  .process-row > .button { grid-column: 2; justify-self: start; }
}

@media (max-width: 920px) {
  .topbar__inner { grid-template-columns: auto auto; justify-content: space-between; }
  .brand img { width: 132px; }
  .nav-toggle { display: block; justify-self: end; }
  .primary-nav { display: none; grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 0; max-height: calc(100dvh - 72px); overflow-y: auto; padding-top: 12px; }
  .primary-nav.is-open { display: flex; }
  .primary-nav__list { display: grid; gap: 0; }
  .primary-nav__list li { border-top: 1px solid rgba(255, 255, 255, .12); }
  .primary-nav__list a { width: 100%; padding: 14px 6px; font-size: 16px; }
  .primary-nav__list a[aria-current="page"] { box-shadow: inset 3px 0 var(--blue); }
  .user-menu { justify-content: space-between; padding: 16px 0 6px; border-top: 1px solid rgba(255, 255, 255, .12); }
  .user-menu__identity { display: grid; text-align: left; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .card-grid, .detail-grid, .people-grid { grid-template-columns: 1fr; }
  .process-row { grid-template-columns: 44px 1fr; }
  .process-row__meta { grid-column: 2; }
  .panel--span-2 { grid-column: auto; }
  .login-layout { grid-template-columns: 1fr; }
  .login-brand { min-height: 170px; }
  .login-card { margin: 0 auto; }
}

@media (max-width: 700px) {
  .page-shell { padding-top: 36px; padding-bottom: 64px; }
  .page-head { align-items: start; flex-direction: column; gap: 22px; margin-bottom: 34px; }
  .page-head__actions { justify-content: flex-start; }
  .page-head > .button, .page-head__actions { width: 100%; }
  .page-head__actions .button { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .field--span-2 { grid-column: auto; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .data-table tr:last-child { border-bottom: 0; }
  .data-table td { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr); gap: 14px; padding: 8px 0; border: 0; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  .epic-table td:first-child { min-width: 0; }
  .entity-card__head, .notice-card { align-items: start; flex-direction: column; }
  .entity-card__metric { text-align: left; }
  .key-values > div { grid-template-columns: 1fr; gap: 3px; }
  .workflow { grid-template-columns: repeat(6, 130px); }
  .dialog__actions { flex-direction: column-reverse; }
  .dialog__actions .button { width: 100%; }
}

@media (max-width: 560px) {
  h1 { font-size: clamp(36px, 12vw, 48px); }
  .topbar__inner { padding-inline: 16px; }
  .brand__product { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 150px; padding: 18px; }
  .metric-card strong { font-size: 40px; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar .field--search, .filter-bar .field--compact { flex: auto; width: 100%; }
  .filter-bar .button { width: 100%; }
  .process-row { grid-template-columns: 1fr; }
  .process-row__number, .process-row__meta, .process-row > .button { grid-column: auto; }
  .process-row__meta div { grid-template-columns: 1fr; gap: 2px; }
  .date-grid { grid-template-columns: 1fr; }
  .person-card { grid-template-columns: auto 1fr; }
  .person-card > .status { grid-column: 2; }
  .pagination { flex-wrap: wrap; }
  .login-brand { min-height: 130px; padding: 28px 20px; }
  .login-card { padding: 44px 20px; }
}

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