:root {
  --ink: #17231d;
  --ink-soft: #536159;
  --paper: #f4f3ed;
  --panel: #fffefa;
  --line: #dcded4;
  --line-strong: #bec5b9;
  --lime: #d7ff72;
  --lime-dark: #9fc73e;
  --coral: #ff6b4a;
  --blue: #4e75ff;
  --amber: #e9a82b;
  --red: #d43f42;
  --green: #2f8a5c;
  --shadow: 0 18px 48px rgb(23 35 29 / 10%);
  --radius: 18px;
  --font: Inter, "Avenir Next", Avenir, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { color-scheme: light; background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 2%, rgb(215 255 114 / 18%), transparent 24rem),
    var(--paper);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: 72px 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 28px 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgb(244 243 237 / 90%);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand img { border-radius: 12px; box-shadow: 0 4px 15px rgb(23 35 29 / 12%); }
.brand span { display: grid; line-height: 1.05; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.topbar-actions, .button-row { display: flex; align-items: center; gap: 10px; }
.topbar-actions form { margin: 0; }

.search-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 210px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--panel);
  text-align: left;
}

.search-trigger span:nth-child(2) { flex: 1; }
kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--paper);
  font-size: 11px;
}

.user-chip {
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 750;
}

.icon-button, .dialog-close, .drawer-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-size: 19px;
}

.primary-nav {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  padding: 24px 14px;
  border-right: 1px solid var(--line);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 5px;
  padding: 11px 13px;
  border: 0;
  border-radius: 11px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.nav-item span { width: 19px; color: var(--ink); font-size: 18px; text-align: center; }
.nav-item:hover { background: rgb(255 255 255 / 65%); }
.nav-item.is-active { background: var(--ink); color: white; }
.nav-item.is-active span { color: var(--lime); }

main { min-width: 0; padding: 42px clamp(24px, 4vw, 68px) 70px; }
.view { display: none; max-width: 1380px; margin: 0 auto; }
.view.is-active { display: block; animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } }

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(31px, 4vw, 49px); line-height: .98; letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: 20px; line-height: 1.15; letter-spacing: -.025em; }
h3 { margin-bottom: 6px; font-size: 15px; line-height: 1.25; letter-spacing: -.01em; }
.view-subtitle { margin: 11px 0 0; color: var(--ink-soft); font-size: 14px; }
.eyebrow { margin-bottom: 7px; color: var(--ink-soft); font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }

.primary-button, .secondary-button, .text-button {
  border-radius: 11px;
  font-weight: 780;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.primary-button {
  padding: 11px 17px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  box-shadow: 0 5px 14px rgb(23 35 29 / 15%);
}

.primary-button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgb(23 35 29 / 19%); }
.primary-button:disabled { cursor: wait; opacity: .6; transform: none; }
.secondary-button { padding: 10px 15px; border: 1px solid var(--line-strong); background: var(--panel); }
.secondary-button:hover { background: white; }
.text-button { padding: 5px; border: 0; color: var(--ink-soft); background: transparent; font-size: 12px; }
.text-button:hover { color: var(--ink); }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.metric-card { position: relative; min-height: 118px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.metric-card::after { content: ""; position: absolute; right: -24px; bottom: -34px; width: 88px; height: 88px; border-radius: 50%; background: var(--metric-color, var(--lime)); opacity: .32; }
.metric-label { display: block; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.metric-value { display: block; margin: 8px 0 2px; font-size: 31px; font-weight: 820; letter-spacing: -.05em; }
.metric-detail { color: var(--ink-soft); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: 1.45fr .85fr; gap: 16px; }
.panel { padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 2px 0 rgb(23 35 29 / 2%); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-heading .eyebrow { margin-bottom: 5px; }

.stack-list { display: grid; gap: 8px; }
.stack-list.compact { gap: 6px; }
.list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f7f7f1;
  text-align: left;
}
.list-row:hover { border-color: var(--line); background: white; }
.row-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: white; font-size: 14px; }
.row-copy { min-width: 0; }
.row-copy strong, .row-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-copy strong { font-size: 13px; }
.row-copy small { margin-top: 3px; color: var(--ink-soft); font-size: 10px; }
.row-date { color: var(--ink-soft); font-size: 10px; font-weight: 800; white-space: nowrap; }

.project-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.project-mini { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; text-align: left; }
.project-mini:hover { border-color: var(--ink); }
.project-mini-top { display: flex; justify-content: space-between; gap: 10px; }
.project-mini p { margin: 8px 0 11px; color: var(--ink-soft); font-size: 11px; line-height: 1.4; }

.progress-track { height: 5px; overflow: hidden; border-radius: 999px; background: #e6e8df; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--lime-dark); }
.progress-label { display: flex; justify-content: space-between; margin-top: 5px; color: var(--ink-soft); font-size: 9px; }

.filterbar { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.filterbar select, .search-field {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}
.filterbar select { max-width: 210px; padding: 0 34px 0 12px; color: var(--ink-soft); }
.search-field { display: flex; align-items: center; flex: 1; min-width: 180px; padding: 0 12px; }
.search-field span { margin-right: 8px; color: var(--ink-soft); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; }

.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.project-card {
  position: relative;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: left;
  transition: border .15s ease, transform .15s ease, box-shadow .15s ease;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.project-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.project-card h2 { font-size: 22px; }
.project-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.project-target { min-height: 42px; margin-bottom: 19px; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.project-footer { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 18px; }
.project-next { text-align: right; }
.project-next small { display: block; color: var(--ink-soft); font-size: 9px; text-transform: uppercase; }
.project-next strong { font-size: 11px; }

.badge, .kind-pill, .status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eceee7;
  color: #445149;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.badge[data-tone="critical"], .badge[data-status="blocked"], .badge[data-health="red"] { background: #ffe1dc; color: #9d2427; }
.badge[data-tone="high"], .badge[data-status="waiting"], .badge[data-health="amber"] { background: #fff0c9; color: #875b00; }
.badge[data-tone="upcoming"], .badge[data-status="sent"], .badge[data-status="negotiating"] { background: #e0e7ff; color: #3452b2; }
.badge[data-tone="stable"], .badge[data-status="done"], .badge[data-status="approved"], .badge[data-health="green"] { background: #dff4e5; color: #286743; }

.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start; }
.agenda-aside { position: sticky; top: 94px; }
.timeline { display: grid; gap: 9px; }
.timeline-group { margin: 11px 0 3px; color: var(--ink-soft); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.timeline-item {
  display: grid;
  grid-template-columns: 78px 6px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  text-align: left;
}
.timeline-item:hover { border-color: var(--line-strong); }
.timeline-when { color: var(--ink-soft); font-size: 10px; font-weight: 760; line-height: 1.45; }
.timeline-marker { width: 6px; height: 44px; border-radius: 999px; background: var(--blue); }
.timeline-marker[data-kind="task"] { background: var(--ink); }
.timeline-marker[data-kind="milestone"] { background: var(--green); }
.timeline-marker[data-kind="waiting"] { background: var(--amber); }
.timeline-marker[data-kind="call"], .timeline-marker[data-kind="email"] { background: var(--coral); }
.timeline-copy { min-width: 0; }
.timeline-copy p { margin: 5px 0 0; color: var(--ink-soft); font-size: 10px; }
.agenda-stat { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.agenda-stat:last-child { border: 0; }
.agenda-stat strong { font-size: 18px; }

.contacts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.contact-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); text-align: left; }
.contact-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.contact-avatar { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 24px; border-radius: 13px; background: var(--lime); font-size: 13px; font-weight: 850; }
.contact-card h2 { font-size: 17px; }
.contact-role { min-height: 34px; margin: 5px 0 14px; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.contact-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; }

.budgets-list { display: grid; gap: 10px; }
.budget-row {
  display: grid;
  grid-template-columns: 105px minmax(0, 1.5fr) minmax(140px, .7fr) 130px 130px auto;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  text-align: left;
}
.budget-row:hover { border-color: var(--line-strong); }
.budget-number strong, .budget-number small { display: block; }
.budget-number strong { font-size: 18px; font-weight: 850; letter-spacing: -.03em; }
.budget-number small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; font-weight: 700; }
.budget-title strong, .budget-title small { display: block; }
.budget-title strong { font-size: 13px; }
.budget-title small, .budget-cell small { margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.budget-cell { font-size: 12px; }
.budget-amount { text-align: right; font-size: 14px; font-weight: 800; }

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(600px, 94vw);
  height: 100vh;
  padding: 34px;
  overflow: auto;
  background: var(--panel);
  box-shadow: -24px 0 70px rgb(23 35 29 / 22%);
  transform: translateX(105%);
  transition: transform .24s ease;
}
.detail-drawer.is-open { transform: translateX(0); }
.drawer-scrim { position: fixed; inset: 0; z-index: 50; visibility: hidden; background: rgb(23 35 29 / 35%); opacity: 0; transition: opacity .2s; }
.drawer-scrim.is-open { visibility: visible; opacity: 1; }
.drawer-close { position: sticky; top: 0; z-index: 2; float: right; }
.drawer-hero { padding: 32px 0 23px; border-bottom: 1px solid var(--line); }
.drawer-hero h1 { max-width: 480px; font-size: 36px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.drawer-section { padding: 23px 0; border-bottom: 1px solid var(--line); }
.drawer-section:last-child { border: 0; }
.drawer-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.detail-field { padding: 12px; border-radius: 11px; background: #f6f6ef; }
.detail-field small, .detail-field strong { display: block; }
.detail-field small { margin-bottom: 5px; color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-field strong { font-size: 12px; line-height: 1.45; }
.drawer-text { color: var(--ink-soft); font-size: 12px; line-height: 1.65; white-space: pre-line; }
.document-link { display: inline-flex; margin-top: 10px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: var(--panel); font-size: 12px; font-weight: 750; }
.document-link:hover { background: white; }
.document-warning { margin: 10px 0 0; padding: 11px 12px; border-radius: 10px; color: #6a3d20; background: #fff0e4; font-size: 11px; line-height: 1.5; }
.local-copy { margin: 10px 0 0; overflow-wrap: anywhere; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }

dialog { color: var(--ink); }
dialog::backdrop { background: rgb(23 35 29 / 55%); backdrop-filter: blur(4px); }
.editor-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 21px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgb(23 35 29 / 35%);
}
.editor-dialog form { padding: 27px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 23px; }
.dialog-heading h2 { font-size: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .025em; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: white;
  color: var(--ink);
  font-weight: 520;
  letter-spacing: 0;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(78 117 255 / 12%); }
.form-grid textarea { min-height: 88px; resize: vertical; }
.form-grid select[multiple] { min-height: 112px; }
.form-span-2 { grid-column: 1 / -1; }
.checkbox-label { display: flex !important; grid-column: 1 / -1; align-items: center; gap: 9px !important; }
.checkbox-label input { width: 18px; min-height: 18px; }
.field-help { color: var(--ink-soft); font-size: 9px; font-weight: 500; line-height: 1.35; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-error { padding: 10px; border-radius: 10px; background: #ffe1dc; color: #922c2f; font-size: 12px; }

.search-dialog { width: min(680px, calc(100vw - 28px)); margin-top: 9vh; padding: 12px; border: 0; border-radius: 18px; background: var(--panel); box-shadow: 0 28px 90px rgb(23 35 29 / 35%); }
.global-search-box { display: flex; align-items: center; gap: 10px; padding: 8px 10px 13px; border-bottom: 1px solid var(--line); }
.global-search-box input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 18px; }
.global-search-box button { border: 0; background: transparent; font-size: 20px; }
.search-results { max-height: 55vh; padding-top: 8px; overflow: auto; }
.search-result { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 11px; width: 100%; padding: 11px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.search-result:hover { background: #f3f4ed; }
.search-result small { color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.search-result strong { font-size: 12px; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 390px; padding: 12px 15px; border-radius: 11px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translateY(14px); pointer-events: none; transition: .2s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: var(--red); }
.loading-screen { position: fixed; inset: 0; z-index: 120; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--paper); transition: opacity .25s; }
.loading-screen img { width: 54px; animation: pulse 1.3s infinite alternate; }
.loading-screen p { color: var(--ink-soft); font-size: 12px; }
.loading-screen.is-hidden { opacity: 0; pointer-events: none; }
@keyframes pulse { to { transform: translateY(-5px) rotate(-2deg); } }

.empty-state { padding: 32px 18px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--ink-soft); text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 13px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.login-page::before { content: ""; position: fixed; inset: 0; background: radial-gradient(circle at 20% 10%, rgb(215 255 114 / 22%), transparent 30rem), radial-gradient(circle at 90% 90%, rgb(255 107 74 / 14%), transparent 26rem); }
.login-card { position: relative; width: min(410px, 100%); padding: 38px; border-radius: 24px; background: var(--panel); box-shadow: 0 35px 100px rgb(0 0 0 / 28%); }
.login-logo { margin-bottom: 28px; }
.login-card h1 { font-size: 38px; }
.login-copy { margin: 11px 0 28px; color: var(--ink-soft); font-size: 13px; }
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.login-form input { min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(78 117 255 / 12%); }
.login-form .primary-button { margin-top: 5px; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .primary-nav { padding-inline: 10px; }
  .nav-item { justify-content: center; padding: 12px 8px; font-size: 0; }
  .nav-item span { width: auto; font-size: 19px; }
  .contacts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .budget-row { grid-template-columns: 90px minmax(0, 1fr) 120px 110px; }
  .budget-row .budget-cell:nth-of-type(4), .budget-row .budget-cell:nth-of-type(5) { display: none; }
}

@media (max-width: 760px) {
  .app-shell { display: block; padding-bottom: 72px; }
  .topbar { min-height: 62px; padding: 0 14px; }
  .brand img { width: 34px; height: 34px; }
  .brand small, .search-trigger span:nth-child(2), .search-trigger kbd, .user-chip { display: none; }
  .search-trigger { min-width: 38px; width: 38px; height: 38px; justify-content: center; padding: 0; }
  .primary-nav { position: fixed; top: auto; right: 10px; bottom: 9px; left: 10px; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); height: 58px; padding: 5px; border: 1px solid rgb(255 255 255 / 14%); border-radius: 17px; background: rgb(23 35 29 / 96%); box-shadow: 0 16px 40px rgb(23 35 29 / 28%); backdrop-filter: blur(14px); }
  .nav-item { margin: 0; color: #aab4ad; }
  .nav-item:hover { background: transparent; }
  .nav-item.is-active { background: #344039; }
  .nav-item span { color: inherit; }
  main { padding: 28px 14px 38px; }
  .view-heading { align-items: flex-start; margin-bottom: 22px; }
  .view-heading h1 { font-size: 35px; }
  .view-heading .view-subtitle { max-width: 260px; }
  .view-heading > .primary-button { padding: 10px 12px; font-size: 0; }
  .view-heading > .primary-button::first-letter { font-size: 17px; }
  .button-row { align-items: flex-end; flex-direction: column-reverse; gap: 6px; }
  .button-row button { padding: 8px 10px; font-size: 10px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { min-height: 105px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .panel-wide { grid-column: auto; }
  .project-strip, .projects-grid, .contacts-grid { grid-template-columns: 1fr; }
  .filterbar { align-items: stretch; flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .filterbar select { flex: 1; max-width: none; min-width: 130px; }
  .agenda-layout { display: block; }
  .agenda-aside { position: static; margin-top: 14px; }
  .timeline-item { grid-template-columns: 60px 5px minmax(0, 1fr); gap: 9px; }
  .timeline-item > .badge { display: none; }
  .budget-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "number amount" "title title"; gap: 9px 14px; padding: 14px; }
  .budget-number { grid-area: number; }
  .budget-title { grid-area: title; }
  .budget-amount { grid-area: amount; align-self: start; }
  .budget-row .budget-cell { display: none; }
  .detail-drawer { padding: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-span-2, .checkbox-label { grid-column: auto; }
  .editor-dialog form { padding: 20px; }
}

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