:root { color-scheme: light; --paper: var(--color-paper); --surface: var(--color-surface); --line: var(--color-line); --ink: var(--color-ink); --muted: var(--color-muted); --danger: #9a2626; font-size: var(--text-base); line-height: 1.55; color: var(--ink); background: var(--paper); }
body, h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
.office-header { min-height: var(--header-height); padding: var(--space-md) clamp(15px, 4vw, 55px); display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); background: var(--ink); color: var(--paper); }
.office-header a { text-decoration: none; }
.office-brand img { width: 109px; display: block; }
.header-actions { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: var(--space-md); font-size: var(--text-control); }
.header-actions .quiet { color: #eee; border-color: #676767; }
.office-page { --office-header-size: var(--header-height); scroll-padding-top: calc(var(--office-header-size) + var(--space-sm)); }
.office-page .office-header { position: sticky; top: 0; z-index: 5; }
.office-layout { display: grid; grid-template-columns: 183px minmax(0, 1fr); min-height: calc(100vh - var(--office-header-size)); min-height: calc(100dvh - var(--office-header-size)); }
.office-nav {
  position: sticky;
  top: var(--office-header-size);
  z-index: 4;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  height: calc(100vh - var(--office-header-size));
  height: calc(100dvh - var(--office-header-size));
  overflow-y: auto;
  padding: var(--space-xl) var(--space-md);
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.office-nav-main, .office-nav-more { display: flex; flex-direction: column; gap: var(--space-xs); }
.office-nav .office-nav-toggle { display: none; }
.office-nav a { display: flex; align-items: center; min-height: var(--control-height); padding: 6px var(--space-md); text-decoration: none; white-space: nowrap; }
.office-nav a:not([aria-current]):is(:hover, :active) { background: var(--line); }
.office-nav a[aria-current] { background: var(--ink); color: var(--paper); }
#workspace { min-width: 0; padding: clamp(17px, 3.5vw, 49px); max-width: 1590px; margin-inline: auto; width: 100%; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-lg); flex-wrap: wrap; padding-bottom: var(--space-lg); border-bottom: 2px solid var(--ink); margin-bottom: var(--space-xl); }
h1 { font-size: clamp(31px, 4vw, 52px); font-weight: 600; line-height: 1.18; overflow-wrap: anywhere; }
.page-head h1[tabindex="-1"]:focus { outline: none; }
h2 { font-size: 23px; line-height: 1.3; }
h3 { font-size: 16px; }
.page-head p { margin-top: 7px; }
.muted { color: var(--muted); }
.demo { margin-bottom: 14px; background: #f3f1e9; border: 1px solid #e5dfca; color: #574c2d; padding: 6px 11px; font-size: 12px; }
.primary, .quiet, .danger { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid var(--color-control-border); color: var(--ink); background: transparent; padding: 6px var(--space-md); overflow-wrap: anywhere; }
.primary { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.primary:hover { background: #383838; }
.quiet:hover { background: var(--surface); color: var(--ink); }
.danger { color: var(--danger); border-color: #bd9595; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.action-menu { display: inline-flex; vertical-align: top; }
.action-menu-toggle { min-width: var(--control-height); padding: 0; font-size: 24px; line-height: 1; }
.action-menu-toggle[aria-expanded="true"] { background: var(--surface); border-color: var(--ink); }
.action-menu-list { position: fixed; z-index: 6; inset: 0 auto auto 0; width: min(212px, calc(100vw - 16px)); overflow: auto; overscroll-behavior: contain; margin: 0; padding: var(--space-xs); list-style: none; border: 1px solid var(--color-control-border); background: var(--paper); text-align: left; box-shadow: 0 6px 16px #1717171a; }
.action-menu-list li + li { border-top: 1px solid var(--line); }
.action-menu-list :is(a, button) { display: flex; justify-content: flex-start; width: 100%; min-height: var(--control-height); padding: var(--space-sm) var(--space-md); border: 0; background: var(--paper); color: var(--ink); text-align: left; }
.action-menu-list :is(a, button):hover, .action-menu-list :is(a, button):focus-visible { background: var(--surface); }
.action-menu-list :focus-visible { outline-offset: -2px; }
.action-menu-list .danger { color: var(--danger); }
.status { display: inline-block; color: #303030; background: #eeefec; border: 1px solid #dfdfdb; padding: 2px 7px; font-size: 12px; white-space: nowrap; }
.status-warn { color: #854815; background: #f9eddf; border-color: #eed2b4; }
.section { margin-top: 27px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.project-board-group + .project-board-group { margin-top: 21px; }
.project-board-group h3 { margin-bottom: 8px; }
.project-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 302px), 1fr)); gap: 12px; align-items: stretch; }
.project-board-card { min-width: 0; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); padding: 14px; background: #fff; }
.project-board-card[data-relation="responsible"] { border-left: 4px solid #315849; background: #f0f6f2; }
.project-board-card[data-relation="participating"] { border-left: 4px solid #657d74; background: #f6f8f6; }
.project-board-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.project-board-role { background: #315849; color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; }
.project-board-card[data-relation="participating"] .project-board-role { color: #2e4940; background: #deebe3; }
.project-board-card h4 { margin: 0; line-height: 1.32; font-size: 18px; overflow-wrap: anywhere; }
.project-board-card h4 a { text-decoration: none; }
.project-board-card h4 a:hover { text-decoration: underline; }
.project-board-card dl { display: grid; gap: 5px; }
.project-board-card dl div { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 5px; }
.project-board-card dt { color: var(--muted); }
.project-board-card dd { overflow-wrap: anywhere; }
.project-board-actions { margin-top: auto; padding-top: 3px; }
.project-progress-summary { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); }
.project-progress-summary strong { color: #315849; font-size: var(--text-reading); }
.project-progress-summary > span { white-space: nowrap; font-size: var(--text-control); }
.project-progress-steps { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: var(--space-sm); padding: 0; margin: var(--space-sm) 0 0; list-style: none; }
.project-progress-steps li { display: flex; min-width: 0; flex-direction: column; gap: var(--space-xs); color: var(--muted); }
.project-progress-mark { height: 6px; background: var(--line); }
.project-progress-steps li[data-state="done"] .project-progress-mark { background: #789286; }
.project-progress-steps li[data-state="current"] .project-progress-mark { background: #315849; }
.project-progress-steps li:is([data-state="skipped"], [data-state="unrecorded"]) .project-progress-mark { background: transparent; border: 1px dashed var(--color-control-border); }
.project-progress-steps li[data-state="current"] .project-progress-name { color: #315849; font-weight: 700; }
.project-progress-name { line-height: 1.35; overflow-wrap: anywhere; text-underline-offset: 3px; }
.project-progress-steps small { font-size: var(--text-caption); }
.project-progress-compact .project-progress-steps { gap: var(--space-xs); }
.project-progress-compact .project-progress-mark { height: 5px; }
.project-progress-compact .project-progress-summary strong { font-size: var(--text-base); }
td .project-progress-compact { min-width: 148px; }
.stage-summary > p + p { margin-top: var(--space-sm); }
.stage-record { padding: var(--space-sm) var(--space-md); border-left: 2px solid var(--line); background: var(--surface); overflow-wrap: anywhere; }
.stage-record span { display: block; white-space: pre-wrap; }
.stage-record time { color: var(--muted); }
.notice-message { margin-top: var(--space-xs); white-space: pre-wrap; overflow-wrap: anywhere; }
.workflow-blocker { margin-block: var(--space-sm); color: var(--danger); overflow-wrap: anywhere; }
.approval-queue td:first-child { min-width: 112px; overflow-wrap: anywhere; }
.approval-queue td:nth-child(2) { min-width: 132px; overflow-wrap: anywhere; }
.approval-meta { display: none; }
.dispatch-stage { padding: var(--space-md); }
.dispatch-stage > legend { padding-inline: var(--space-sm); font-weight: 600; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: #444; white-space: nowrap; font-weight: 600; background: var(--surface); }
td { min-width: 64px; }
td p { margin: 3px 0; }
.table-actions { width: 1%; text-align: right; }
.empty { padding: 18px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.details-grid { display: grid; grid-template-columns: minmax(105px, 1fr) minmax(0, 4fr); margin: 10px 0 20px; }
.details-grid dt, .details-grid dd { padding: 7px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.details-grid dt { background: var(--surface); }
.tabs { display: flex; flex-wrap: wrap; gap: 5px 9px; margin-block: 13px 22px; border-bottom: 1px solid var(--line); }
.tabs a { text-decoration: none; padding: 8px 10px; }
.tabs a[aria-current] { border-bottom: 2px solid var(--ink); font-weight: 600; }
.content-tabs a { display: flex; align-items: center; min-height: var(--control-height); }
.content-tabs a:hover { background: var(--surface); }
.content-sections table { table-layout: fixed; }
.content-sections th:nth-child(2) { width: 88px; }
.content-sections th:nth-child(3) { width: 158px; }
.content-sections .table-actions { width: calc(var(--control-height) + 16px); }
.content-sections td { vertical-align: middle; }
.content-sections td:first-child { overflow-wrap: anywhere; white-space: pre-line; }
.content-sections .content-topic { font-size: var(--text-caption); margin: 0; }
.content-draft-status { max-width: 100%; white-space: normal; word-break: keep-all; }
.content-published-note { font-size: var(--text-caption); }
.record { padding: 12px 0; border-top: 1px solid var(--line); }
.record summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
.record p, .record .row-actions { margin-top: 8px; }
.record p { white-space: pre-wrap; overflow-wrap: anywhere; }
.record .subrecord { margin: 9px 0; padding: 7px 10px; background: var(--surface); }
.notice-list { display: grid; gap: 7px; }
.notification { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.critical { color: var(--danger); }
.calendar-grid { min-width: 565px; display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); }
.calendar-day, .calendar-weekday { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; }
.calendar-weekday { background: var(--surface); }
.calendar-day { min-height: 74px; min-width: 0; }
.calendar-day[data-current="false"] { color: #767676; background: #f7f7f6; }
.calendar-day[data-today="true"] { box-shadow: inset 0 0 0 1px #141414; }
.calendar-event { margin-top: 4px; display: block; width: 100%; border: 0; background: #eeeeeb; padding: 3px 4px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.calendar-event[data-state="tentative"] { background: #f5edda; }
.calendar-tools { display: flex; flex-wrap: wrap; gap: 11px; align-items: end; margin-bottom: 12px; }
.calendar-tools label { display: grid; gap: 4px; }
.login-page { background: var(--surface); min-height: 100vh; }
.login-box { max-width: 490px; margin: clamp(19px, 8vh, 100px) auto; padding: clamp(21px, 4vw, 47px); background: var(--paper); border-top: 2px solid var(--ink); }
.login-box h1 { font-size: clamp(31px, 4vw, 39px); margin-bottom: var(--space-sm); }
.login-box form { display: grid; gap: var(--space-md); margin-top: var(--space-xl); }
.login-box label, .form-grid label, .editor-line label { display: grid; gap: var(--space-xs); align-content: start; }
input, select, textarea { min-height: var(--control-height); padding: var(--space-sm); border: 1px solid var(--color-control-border); border-radius: 0; background: var(--paper); color: var(--ink); max-width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 82px; }
input[type="checkbox"] { min-height: auto; }
.login-box p[role="alert"], .form-error { color: var(--danger); }
.login-box p[role="alert"]:empty, .form-error:empty { display: none; }
.office-subpage { max-width: 920px; overflow-wrap: anywhere; }
.office-subpage > p + p { margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.form-grid > .full { grid-column: 1 / -1; }
.form-error { flex-basis: 100%; }
.customer-lookup { min-width: 0; display: grid; gap: 4px; }
.customer-status:empty { display: none; }
.customer-status { font-size: 13px; }
.customer-matches { list-style: none; margin: 2px 0 0; padding: 0; border: 1px solid var(--line); }
.customer-matches li + li { border-top: 1px solid var(--line); }
.customer-matches button { display: flex; width: 100%; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-md); min-height: var(--control-height); padding: var(--space-sm) var(--space-md); text-align: left; color: var(--ink); background: var(--paper); border: 0; overflow-wrap: anywhere; }
.customer-matches button:hover, .customer-matches button:focus-visible { background: var(--surface); }
.customer-matches button span { color: var(--muted); font-size: 13px; }
.customer-tools { margin-bottom: 15px; }
.customer-tools label { display: grid; gap: 4px; width: min(100%, 420px); }
.form-grid fieldset { margin: 0; min-width: 0; border: 1px solid var(--line); }
.check-group { display: flex; flex-wrap: wrap; gap: 12px; }
.check-group label, .form-grid .check-line { display: flex; align-items: center; gap: 5px; }
.form-grid .check-line { flex-wrap: wrap; }
.check-group:has(input[name="positions"]) { gap: 0 var(--space-md); }
.check-group label:has(input[name="positions"]), .check-group label:has(input[name="works"]) { min-height: var(--control-height); cursor: pointer; }
.check-group:has(input[name="works"]) { display: grid; gap: 0; margin-top: var(--space-xs); }
.check-group label:has(input[name="works"]) { align-items: start; gap: var(--space-sm); padding-block: var(--space-sm); overflow-wrap: anywhere; }
.check-group label:has(input[name="works"]) + label { border-top: 1px solid var(--line); }
.check-group input[name="works"] { flex: none; }
.check-description { display: block; font-size: var(--text-control); white-space: pre-line; }
.url-field { min-width: 0; }
.upload-line { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.upload-line input { max-width: 100%; font-size: 12px; }
.file-pickers { display: flex; flex-wrap: wrap; gap: 9px; padding-block: 5px 8px; }
.file-pickers label { position: relative; display: inline-flex; cursor: pointer; }
.file-pickers label:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.file-pickers input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-pickers input:disabled { cursor: wait; }
.avatar-controls, .profile-summary { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.avatar-controls { margin-bottom: var(--space-xs); }
.profile-summary { align-items: flex-start; overflow-wrap: anywhere; }
.profile-avatar { display: block; object-fit: cover; background: var(--surface); }
.profile-bio { white-space: pre-wrap; margin-top: var(--space-xs); max-width: 60ch; }
.form-footer { margin-top: var(--space-lg); }
.list-editor { display: grid; gap: 10px; }
.editor-line { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 1px solid var(--line); padding: clamp(12px, 2vw, 20px); }
.preview-img, .preview-video { width: 100%; max-height: 340px; object-fit: contain; background: #f1f1ee; display: block; margin: 9px 0; }
.page-notice { margin-bottom: 14px; border-left: 3px solid #315849; background: #f0f6f2; color: #274337; padding: 9px 12px; overflow-wrap: anywhere; }
.calendar-event { text-decoration: none; }
.editor-line > .full { grid-column: 1 / -1; }
@media (max-width: 990px) {
  .project-progress:not(.project-progress-compact) .project-progress-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--space-md); }
}
@media (max-width: 760px) {
  .office-page {
    --office-nav-size: calc(var(--control-height) + 2 * var(--space-sm) + 1px);
    scroll-padding-top: calc(var(--office-header-size) + var(--office-nav-size) + var(--space-sm));
  }
  .office-layout { display: block; }
  .office-nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    height: auto;
    overflow: visible;
    padding: var(--space-sm) var(--space-md);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .office-nav-main { display: contents; }
  .office-nav a { padding-inline: var(--space-sm); font-size: var(--text-control); }
  .office-nav .office-nav-toggle {
    display: inline-flex;
    min-width: var(--control-height);
    min-height: var(--control-height);
    margin-inline-start: auto;
    padding: 0;
    font-size: 24px;
    line-height: 1;
  }
  .office-nav-toggle:is(:active, [aria-expanded="true"]) { background: var(--line); border-color: var(--ink); }
  .office-nav-toggle.is-current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .office-nav-toggle[aria-expanded="false"] + .office-nav-more { display: none; }
  .office-nav-more {
    position: absolute;
    inset-block-start: calc(100% + var(--space-xs));
    inset-inline-end: var(--space-md);
    width: min(220px, calc(100% - 2 * var(--space-md)));
    max-height: calc(100vh - var(--office-header-size) - var(--office-nav-size) - var(--space-lg));
    max-height: calc(100dvh - var(--office-header-size) - var(--office-nav-size) - var(--space-lg));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: var(--space-xs);
    border: 1px solid var(--color-control-border);
    background: var(--paper);
    box-shadow: 0 6px 16px #1717171a;
  }
  .office-nav-more a { flex-shrink: 0; padding-inline: var(--space-md); }
  .office-nav-more a:focus-visible { outline-offset: -2px; }
  .office-header { padding: 9px 11px; }
  .header-actions { gap: 6px; font-size: 12px; }
  .office-brand img { width: 78px; }
  .header-actions #who { display: none; }
  .login-box { margin-inline: 13px; }
  .table-actions { position: sticky; right: 0; z-index: 1; box-shadow: -1px 0 var(--line); }
  td.table-actions { background: var(--paper); }
  .table-actions:has(.action-menu-toggle[aria-expanded="true"]) { z-index: 2; }
  .approval-queue table { table-layout: fixed; }
  .approval-queue :is(th, td):first-child { width: 31%; min-width: 0; }
  .approval-queue td:nth-child(2) { min-width: 0; }
  .approval-queue :is(th, td):is(:nth-child(3), :nth-child(4)) { display: none; }
  .approval-queue .table-actions { position: static; width: calc(var(--control-height) + 16px); box-shadow: none; }
  .approval-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 6px; margin-top: var(--space-sm); font-size: 12px; color: var(--muted); }
  input:not([type="file"], [type="checkbox"], [type="radio"]), select, textarea { font-size: var(--text-reading); }
}
@media (max-width: 470px) {
  .content-tabs { gap: var(--space-xs); }
  .content-tabs a { padding-inline: var(--space-sm); }
  .content-sections th:nth-child(2) { width: 73px; }
  .content-sections th:nth-child(3) { width: 92px; }
  .form-grid, .editor-line { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: minmax(82px, .85fr) minmax(0, 2fr); }
  .section-heading .row-actions { width: 100%; }
}
