@view-transition {
  navigation: auto;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-variable.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --canvas: #f5f6f7;
  --surface: #ffffff;
  --surface-subtle: #eef1f3;
  --surface-raised: #ffffff;
  --text: #202428;
  --text-normal: #3c4248;
  --muted: #606872;
  --faint: #666e77;
  --border: #d6dbe0;
  --border-strong: #b7bec5;
  --brand-50: #f2dfe1;
  --brand-100: #e8c7ca;
  --brand-500: #a65158;
  --brand-600: #8b343b;
  --brand-700: #6f272e;
  --link: var(--brand-600);
  --link-hover: var(--brand-700);
  --danger: #9f332d;
  --success: #2f6b4f;
  --warning: #986315;
  --shadow: none;
  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --page-title-size: clamp(1.55rem, 1.35rem + .55vw, 1.9rem);
  --record-title-size: clamp(1.35rem, 1.25rem + .35vw, 1.55rem);
  --hero-title-size: clamp(1.7rem, 1.5rem + .7vw, 2.15rem);
  font-family: var(--font-sans);
  font-size: 16px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #191a18;
  --surface: #24251f;
  --surface-subtle: #2d2d27;
  --surface-raised: #30312b;
  --text: #f1ebdd;
  --text-normal: #ded7c9;
  --muted: #b8b0a1;
  --faint: #9a9488;
  --border: #48463f;
  --border-strong: #666157;
  --brand-50: #43252a;
  --brand-100: #613138;
  --brand-500: #d98286;
  --brand-600: #d98286;
  --brand-700: #efaaad;
  --link: var(--brand-500);
  --link-hover: var(--brand-700);
  --danger: #e9857d;
  --success: #72a98b;
  --warning: #d6a64f;
  --shadow: none;
}

* { box-sizing: border-box; }
.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; }
html, body { height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--text-normal); font-family: var(--font-sans); font-size: .875rem; line-height: 1.45; }
body[data-area="board"], body[data-area="orientation"] {
  --brand-50: #dfe6f3; --brand-100: #c7d3ea; --brand-500: #5575b3; --brand-600: #3157a3; --brand-700: #24427e;
}
body[data-area="maintenance"] {
  --brand-50: #f2e6ca; --brand-100: #e6d09e; --brand-500: #bc8a36; --brand-600: #986315; --brand-700: #70480d;
}
body[data-area="reports"] {
  --brand-50: #dce9e0; --brand-100: #c3d9ca; --brand-500: #548369; --brand-600: #2f6b4f; --brand-700: #22503a;
}
body[data-area="settings"], body[data-area="audit"], body[data-area="staff"], body[data-area="contractors"] {
  --brand-50: #eadfeb; --brand-100: #dac6dc; --brand-500: #88688b; --brand-600: #6b4c6f; --brand-700: #513954;
}
:root[data-theme="dark"] body[data-area="board"], :root[data-theme="dark"] body[data-area="orientation"] {
  --brand-50: #252f43; --brand-100: #2e3f5e; --brand-500: #7f9ed9; --brand-600: #7f9ed9; --brand-700: #adc2ea;
}
:root[data-theme="dark"] body[data-area="maintenance"] {
  --brand-50: #3c3020; --brand-100: #514027; --brand-500: #d6a64f; --brand-600: #d6a64f; --brand-700: #e9c77e;
}
:root[data-theme="dark"] body[data-area="reports"] {
  --brand-50: #22352a; --brand-100: #2b4938; --brand-500: #72a98b; --brand-600: #72a98b; --brand-700: #a3c9b3;
}
:root[data-theme="dark"] body[data-area="settings"], :root[data-theme="dark"] body[data-area="audit"], :root[data-theme="dark"] body[data-area="staff"], :root[data-theme="dark"] body[data-area="contractors"] {
  --brand-50: #392d3b; --brand-100: #4c3850; --brand-500: #a98aae; --brand-600: #a98aae; --brand-700: #cfb5d2;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: .16em; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-sans); font-weight: 650; }
h1 { margin-bottom: .3rem; color: var(--text); font-size: var(--page-title-size); line-height: 1.14; letter-spacing: -.01em; }
h2 { margin-bottom: .2rem; color: var(--text); font-size: 1.12rem; line-height: 1.2; }
small { color: var(--muted); }

.app-shell { display: flex; height: 100vh; overflow: hidden; background: var(--canvas); }
.sidebar { view-transition-name: app-sidebar; }
.mobile-header { view-transition-name: app-mobile-header; }
.main-content { view-transition-name: page-content; }

@keyframes page-content-out {
  to { opacity: 0; }
}

@keyframes page-content-in {
  from { opacity: 0; }
}

::view-transition-old(root),
::view-transition-new(root),
::view-transition-old(app-sidebar),
::view-transition-new(app-sidebar),
::view-transition-old(app-mobile-header),
::view-transition-new(app-mobile-header) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(page-content) {
  animation: 90ms ease-in both page-content-out;
}

::view-transition-new(page-content) {
  animation: 150ms ease-out 20ms both page-content-in;
}

.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 200; padding: .55rem .75rem; border: 2px solid var(--text); border-radius: 2px; background: var(--surface); color: var(--text); box-shadow: 4px 4px 0 rgb(0 0 0 / .18); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sidebar { z-index: 60; display: flex; width: 16.25rem; flex: 0 0 16.25rem; flex-direction: column; background: var(--surface-subtle); border-right: 1px solid var(--border-strong); box-shadow: none; }
.brand-block { display: flex; align-items: flex-start; gap: .6rem; padding: 1.4rem 1.25rem 1.25rem; border-bottom: 1px solid var(--border-strong); }
.brand { display: block; min-width: 0; flex: 1; color: var(--text); }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-lockup { display: flex; min-width: 0; align-items: center; gap: .7rem; }
.logo-plate { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; }
:root[data-theme="dark"] .logo-plate {
  padding: .18rem .28rem;
  border: 1px solid #77736b;
  border-radius: 2px;
  background: #e7e3da;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .24);
}
.brand-logo { display: block; width: auto; max-width: 4.25rem; height: 2.1rem; flex: 0 0 auto; object-fit: contain; }
.brand-copy { display: block; }
.brand strong, .brand small { display: block; line-height: 1; }
.brand strong { font-family: var(--font-sans); font-size: 1.15rem; font-weight: 680; letter-spacing: -.015em; }
.brand small { margin-top: .28rem; color: var(--muted); font-family: var(--font-sans); font-size: .67rem; font-weight: 550; letter-spacing: .08em; text-transform: uppercase; }
.nav-list { flex: 1; overflow-y: auto; padding: .9rem .75rem 1rem; }
.nav-section { margin: 1.5rem .7rem .45rem; padding-bottom: .32rem; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .63rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.nav-section-first { margin-top: .25rem; }
.nav-link { --nav-accent: var(--muted); position: relative; display: flex; width: 100%; align-items: center; gap: .72rem; margin-bottom: .05rem; padding: .58rem .65rem .58rem .78rem; border: 0; border-radius: 0; background: transparent; color: var(--text-normal); font-family: var(--font-sans); font-size: .84rem; font-weight: 540; text-align: left; cursor: pointer; transition: background-color 150ms, color 150ms; }
.nav-link::before { position: absolute; inset: .32rem auto .32rem 0; width: 3px; background: var(--nav-accent); content: ""; opacity: .72; transition: inset 150ms, opacity 150ms, width 150ms; }
.nav-link[data-nav-area="board"] { --nav-accent: #3157a3; }
.nav-link[data-nav-area="work-orders"] { --nav-accent: #8b343b; }
.nav-link[data-nav-area="maintenance"] { --nav-accent: #986315; }
.nav-link[data-nav-area="reports"] { --nav-accent: #2f6b4f; }
.nav-link[data-nav-area="administration"] { --nav-accent: #6b4c6f; }
.nav-link:not(.active) .nav-icon { color: color-mix(in srgb, var(--nav-accent) 82%, var(--text-normal)); }
.nav-link:hover { background: color-mix(in srgb, var(--surface) 62%, transparent); color: var(--text); text-decoration: none; }
.nav-link:hover::before { opacity: 1; }
.nav-link.active { background: var(--surface); color: var(--text); box-shadow: none; }
.nav-link.active::before { inset-block: 0; width: 4px; opacity: 1; }
.nav-link.active .nav-icon { color: var(--nav-accent); }
:root[data-theme="dark"] .nav-link.active { color: var(--brand-500); }
:root[data-theme="dark"] .nav-link[data-nav-area="board"] { --nav-accent: #7f9ed9; }
:root[data-theme="dark"] .nav-link[data-nav-area="work-orders"] { --nav-accent: #d98286; }
:root[data-theme="dark"] .nav-link[data-nav-area="maintenance"] { --nav-accent: #d6a64f; }
:root[data-theme="dark"] .nav-link[data-nav-area="reports"] { --nav-accent: #72a98b; }
:root[data-theme="dark"] .nav-link[data-nav-area="administration"] { --nav-accent: #a98aae; }
.nav-icon { width: 1.02rem; height: 1.02rem; flex: 0 0 1.02rem; stroke: currentColor; stroke-width: 1.35; stroke-linecap: square; stroke-linejoin: miter; }
.nav-link.compact { padding: .45rem .6rem; font-size: .75rem; }
.button-reset { border: 0; }
.sidebar-footer { padding: .72rem; border-top: 1px solid var(--border-strong); background: var(--surface-subtle); }
.public-language-switch { display: flex; align-items: center; justify-content: center; gap: .35rem; color: var(--muted); }
.public-language-switch button { border: 0; padding: .25rem .35rem; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.public-language-switch button[aria-current="true"] { color: var(--accent); text-decoration: underline; text-underline-offset: .2rem; }
.account-settings-link { display: flex; align-items: center; gap: .65rem; padding: .62rem; border: 0; border-left: 3px solid transparent; border-radius: 0; color: var(--text-normal); transition: background-color 150ms, border-color 150ms, color 150ms; }
.account-settings-link:hover { border-color: var(--border); background: var(--surface-subtle); color: var(--text); }
.account-settings-link.active { border-left-color: #6b4c6f; background: var(--surface); color: var(--text); box-shadow: none; }
.account-settings-copy { min-width: 0; flex: 1; }
.account-settings-copy strong, .account-settings-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-settings-copy strong { color: var(--text); font-size: .78rem; }
.account-settings-copy small { margin-top: .1rem; font-size: .66rem; text-transform: capitalize; }
.account-settings-icon { display: grid; width: 1.7rem; height: 1.7rem; place-items: center; border-radius: 0; color: var(--faint); }
.account-settings-icon .nav-icon { width: .95rem; height: .95rem; }
.account-settings-link:hover .account-settings-icon, .account-settings-link.active .account-settings-icon { color: var(--brand-600); }
.avatar { display: grid; width: 1.9rem; height: 1.9rem; place-items: center; border: 1px solid color-mix(in srgb, #6b4c6f 42%, var(--border)); border-radius: 2px; background: color-mix(in srgb, #6b4c6f 13%, var(--surface)); color: var(--text); font-family: var(--font-sans); font-weight: 700; }
.main-column { min-width: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.main-content { flex: 1; overflow-y: auto; padding: clamp(1.25rem, 2.5vw, 2.25rem); }
.mobile-header { display: none; }
.mobile-header-spacer { width: 2.25rem; height: 2.25rem; }
.mobile-backdrop { display: none; }
.sidebar-reveal-rail { display: none; }

.page-layout { width: 100%; margin: 0 auto; }
.page-layout > * + * { margin-top: 1.25rem; }
.page-wide { max-width: 100rem; }
.page-narrow { max-width: 48rem; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.page-header p { margin-bottom: 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
.record-title { margin-top: .25rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--record-title-size); }
.back-link { color: var(--muted); font-size: .76rem; font-weight: 600; }
.auth-page { padding-top: clamp(2rem, 10vh, 7rem); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: .75rem; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3, .card-header p { margin-bottom: 0; }
.card-header p { color: var(--muted); font-size: .78rem; }
.card-body { padding: 1.25rem; }
.form-card { padding: 1.25rem; }
.form-section > * + * { margin-top: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; padding-top: .25rem; }
.label { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.input, .select { width: 100%; min-height: 2.35rem; padding: .5rem .7rem; border: 1px solid var(--border-strong); border-radius: .5rem; background: var(--surface); color: var(--text); transition: border-color 150ms, box-shadow 150ms; }
.input:focus, .select:focus { outline: 0; border-color: var(--brand-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent); }
textarea.input { resize: vertical; }
.compact-select { width: auto; min-width: 6.5rem; min-height: 1.95rem; padding: .28rem .45rem; }
.field-help { display: block; margin-top: .25rem; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.contractor-options-toggle { display: flex; align-items: center; gap: .7rem; padding: .75rem .85rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--surface-subtle); cursor: pointer; }
.contractor-options-toggle input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--brand-600); }
.contractor-options-copy { min-width: 0; flex: 1; }
.contractor-options-copy strong, .contractor-options-copy small { display: block; }
.contractor-options-copy strong { color: var(--text); font-size: .76rem; }
.contractor-options-copy small { margin-top: .08rem; color: var(--muted); font-size: .67rem; font-weight: 500; }
.contractor-options-chevron { width: .48rem; height: .48rem; margin: -.2rem .12rem 0 .4rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 150ms; }
.contractor-options-toggle:has(input:checked) { border-color: color-mix(in srgb, var(--brand-500) 45%, var(--border)); background: var(--brand-50); }
.contractor-options-toggle:has(input:checked) .contractor-options-chevron { margin-top: .2rem; transform: rotate(225deg); }
.contractor-options-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: .6rem; background: color-mix(in srgb, var(--surface-subtle) 65%, var(--surface)); }
.contractor-options-fields[hidden] { display: none; }

.settings-page { max-width: 76rem; }
.settings-header { max-width: 44rem; padding: .2rem 0 .35rem; }
.settings-header h1 { margin-top: .16rem; letter-spacing: -.01em; }
.settings-section > * + * { margin-top: .55rem; }
.settings-section-header { padding: 0 0 .45rem; border-bottom: 1px solid var(--border-strong); }
.settings-section-header h2 { margin: 0; font-family: var(--font-sans); font-size: .88rem; font-weight: 700; letter-spacing: .01em; }
.settings-panel { overflow: hidden; border: 1px solid var(--border); border-top: 2px solid var(--brand-600); border-radius: 2px; background: var(--surface); }
.settings-panel > * + * { border-top: 1px solid var(--border); }
.settings-setting-row { display: grid; grid-template-columns: minmax(13rem, .72fr) minmax(0, 1.28fr); gap: 2rem; align-items: center; min-height: 4.7rem; padding: .9rem 1rem; }
.settings-setting-copy h3, .settings-setting-copy p { margin: 0; }
.settings-setting-copy h3 { color: var(--text); font-family: var(--font-sans); font-size: .86rem; font-weight: 680; letter-spacing: 0; }
.settings-setting-copy p { max-width: 34rem; margin-top: .16rem; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.settings-setting-control { min-width: 0; justify-self: end; }
.settings-inline-control { display: flex; width: min(27rem, 100%); align-items: center; justify-content: flex-end; gap: .55rem; }
.settings-inline-control label { min-width: 10rem; flex: 1; }
.settings-inline-control .select { width: 100%; }
.page-kicker, .section-kicker { display: block; color: var(--brand-600); font-size: .62rem; font-weight: 780; letter-spacing: .105em; text-transform: uppercase; }
.section-kicker { margin-bottom: .18rem; }
.theme-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.theme-options { display: grid; width: min(27rem, 100%); grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border-strong); }
.theme-option { position: relative; display: flex; min-height: 3.2rem; align-items: center; gap: .6rem; padding: .5rem .65rem; border: 0; border-radius: 0; background: var(--surface); color: var(--text-normal); cursor: pointer; transition: background-color 150ms, box-shadow 150ms; }
.theme-option + .theme-option { border-left: 1px solid var(--border-strong); }
.theme-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.theme-option:has(input:focus-visible) { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.theme-option:has(input:checked) { background: var(--brand-50); box-shadow: inset 0 -3px var(--brand-600); }
.theme-option-icon { display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 1.8rem; place-items: center; color: var(--muted); }
.theme-option:has(input:checked) .theme-option-icon { color: var(--brand-600); }
.theme-icon { width: 1.05rem; height: 1.05rem; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.theme-option strong { color: var(--text); font-family: var(--font-sans); font-size: .8rem; }
.account-identity { display: flex; min-width: 0; align-items: center; gap: .75rem; }
.account-identity h3, .account-identity p { margin: 0; }
.account-identity h3 { color: var(--text); font-family: var(--font-sans); font-size: .86rem; font-weight: 680; }
.account-identity p { margin-top: .1rem; color: var(--muted); font-size: .76rem; }
.avatar-large { width: 2.6rem; height: 2.6rem; flex: 0 0 2.6rem; font-size: .95rem; }
.account-inline-meta { display: flex; justify-self: end; gap: 1.25rem; margin: 0; }
.account-inline-meta > div { display: flex; align-items: center; gap: .45rem; }
.account-inline-meta dt { color: var(--muted); font-size: .7rem; }
.account-inline-meta dd { margin: 0; }
.settings-role { text-transform: capitalize; }
.password-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.password-current, .password-actions { grid-column: 1 / -1; }
.settings-actions { display: flex; justify-content: flex-end; }
.password-actions { align-self: end; }
.settings-disclosure > summary { list-style: none; cursor: pointer; }
.settings-disclosure > summary::-webkit-details-marker { display: none; }
.settings-disclosure-chevron { width: .55rem; height: .55rem; justify-self: end; margin-right: .35rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 150ms; }
.settings-disclosure[open] .settings-disclosure-chevron { transform: rotate(225deg); }
.settings-disclosure-body { padding: 1rem; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface-subtle) 48%, var(--surface)); }
.settings-disclosure-intro { max-width: 46rem; margin: 0 0 1rem; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.settings-users-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; }
.settings-users-header h3 { margin: 0; color: var(--text); font-family: var(--font-sans); font-size: .86rem; font-weight: 700; }
.settings-users-panel th { font-size: .68rem; }
.settings-users-panel td { font-size: .78rem; }
.settings-users-panel td small { font-size: .7rem; }
.settings-users-panel .table-scroll { border-top: 1px solid var(--border); }
.settings-users-panel .table-footer { border-top: 1px solid var(--border); }
.settings-administration-section > * + * { margin-top: .55rem; }
.organization-branding-body { display: grid; grid-template-columns: minmax(14rem, .8fr) minmax(18rem, 1.2fr); gap: 1.25rem; align-items: start; }
.orientation-settings-card { border-top-color: var(--border-strong); }

.orientation-page { max-width: 76rem; padding: clamp(.25rem, 1.5vh, 1.25rem) 0; }
.orientation-heading { max-width: 42rem; margin: 0 auto 1.15rem; text-align: center; }
.orientation-heading h1 { margin-top: .18rem; letter-spacing: -.012em; }
.orientation-heading p { margin: .3rem 0 0; color: var(--muted); }
.orientation-card { overflow: hidden; border-color: color-mix(in srgb, var(--brand-500) 25%, var(--border)); box-shadow: 0 12px 36px rgb(15 23 42 / .08); }
.orientation-progress { display: flex; align-items: center; gap: 1.25rem; padding: .75rem 1.1rem; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface-subtle) 78%, var(--surface)); }
.orientation-progress > div { display: flex; min-width: 11rem; align-items: baseline; justify-content: space-between; gap: .75rem; }
.orientation-progress span { color: var(--text); font-size: .72rem; font-weight: 760; }
.orientation-progress small { font-size: .65rem; }
.orientation-progress progress { width: 100%; height: .42rem; overflow: hidden; border: 0; border-radius: 0; background: var(--border); color: var(--brand-600); }
.orientation-progress progress::-webkit-progress-bar { border-radius: 0; background: var(--border); }
.orientation-progress progress::-webkit-progress-value { border-radius: 0; background: var(--brand-600); }
.orientation-progress progress::-moz-progress-bar { border-radius: 0; background: var(--brand-600); }
.orientation-stage { min-height: 31rem; }
.orientation-step { display: grid; min-height: 31rem; grid-template-columns: minmax(0, 1fr) minmax(22rem, .92fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding: clamp(2rem, 5vw, 4.2rem); }
.orientation-step[hidden], [data-orientation-finish][hidden], [data-orientation-next][hidden] { display: none; }
.orientation-copy h2 { max-width: 33rem; margin: .28rem 0 .75rem; font-size: clamp(1.35rem, 2.4vw, 1.85rem); line-height: 1.18; letter-spacing: -.025em; }
.orientation-copy h2:focus { outline: none; }
.orientation-copy > p { max-width: 36rem; margin-bottom: 1.25rem; color: var(--muted); font-size: .9rem; }
.orientation-step-label { color: var(--brand-600); font-size: .64rem; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.orientation-points, .orientation-checklist { margin: 0; padding: 0; list-style: none; }
.orientation-points { display: grid; gap: .8rem; }
.orientation-points li { display: flex; align-items: center; gap: .75rem; }
.orientation-points li > span { display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 1.8rem; place-items: center; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-size: .68rem; font-weight: 800; }
.orientation-points strong, .orientation-points small { display: block; }
.orientation-points strong { color: var(--text); font-size: .78rem; }
.orientation-points small { margin-top: .06rem; }
.orientation-checklist { display: grid; gap: .72rem; }
.orientation-checklist li { position: relative; padding-left: 1.55rem; color: var(--text-normal); font-size: .8rem; }
.orientation-checklist li::before { position: absolute; top: .08rem; left: 0; display: grid; width: 1rem; height: 1rem; place-items: center; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); content: "✓"; font-size: .62rem; font-weight: 850; }
.orientation-preview-link { display: inline-block; margin-top: 1rem; font-size: .72rem; font-weight: 700; }
.orientation-ready-note { margin-top: 1.25rem; padding: .8rem .9rem; border: 1px solid color-mix(in srgb, var(--brand-500) 25%, var(--border)); border-radius: .6rem; background: var(--brand-50); }
.orientation-ready-note strong, .orientation-ready-note span { display: block; }
.orientation-ready-note strong { color: var(--text); font-size: .78rem; }
.orientation-ready-note span { margin-top: .08rem; color: var(--muted); font-size: .7rem; }
.orientation-visual { position: relative; min-height: 20rem; overflow: hidden; border: 1px solid color-mix(in srgb, var(--brand-500) 24%, var(--border)); border-radius: 1rem; background: var(--surface); box-shadow: 0 18px 38px rgb(15 23 42 / .1); }
.orientation-flow-visual { display: flex; flex-direction: column; justify-content: center; gap: .65rem; padding: 3.2rem 2rem 2rem; }
.orientation-app-mark { position: absolute; top: 1rem; left: 1rem; display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .55rem; background: var(--brand-600); color: white; font-size: .62rem; font-weight: 850; }
.orientation-flow-line { position: absolute; top: 4.8rem; bottom: 3rem; left: 3rem; width: 2px; background: color-mix(in srgb, var(--brand-500) 35%, var(--border)); }
.orientation-flow-card { z-index: 1; margin-left: 1.75rem; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--surface); box-shadow: var(--shadow); }
.orientation-flow-card::before { position: absolute; left: 2.61rem; width: .65rem; height: .65rem; margin-top: .1rem; border: 3px solid var(--surface); border-radius: 50%; background: var(--faint); content: ""; box-shadow: 0 0 0 1px var(--border); }
.orientation-flow-card.active::before { background: #3b82f6; }
.orientation-flow-card.complete::before { background: #22c55e; }
.orientation-flow-card span, .orientation-flow-card strong, .orientation-flow-card small { display: block; }
.orientation-flow-card span { color: var(--brand-600); font-size: .58rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.orientation-flow-card strong { margin-top: .08rem; color: var(--text); font-size: .75rem; }
.orientation-flow-card small { margin-top: .06rem; font-size: .62rem; }
.orientation-board-visual { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; padding: 2rem 1rem; }
.orientation-mini-column { padding: .65rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--surface-subtle); }
.orientation-mini-column strong { display: flex; justify-content: space-between; margin-bottom: .65rem; color: var(--text); font-size: .58rem; }
.orientation-mini-column strong span { color: var(--muted); }
.orientation-mini-column i { display: block; height: 3.2rem; margin-top: .45rem; border: 1px solid var(--border); border-left: 3px solid var(--faint); border-radius: .4rem; background: var(--surface); }
.orientation-mini-column.active i { border-left-color: #3b82f6; }
.orientation-mini-column.complete i { border-left-color: #22c55e; }
.orientation-detail-visual { padding: 1.5rem; }
.orientation-detail-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.orientation-detail-header span { color: var(--brand-600); font-family: ui-monospace, monospace; font-size: .7rem; font-weight: 750; }
.orientation-detail-header b { padding: .2rem .42rem; border-radius: 2px; background: #dbeafe; color: #1e40af; font-size: .58rem; }
.orientation-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 1rem 0; }
.orientation-detail-grid i { height: 2.6rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--surface-subtle); }
.orientation-activity-preview { padding: .75rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); }
.orientation-activity-preview strong { display: block; margin-bottom: .55rem; color: var(--text); font-size: .68rem; }
.orientation-activity-preview span { display: block; width: 82%; height: .42rem; margin-top: .5rem; border-radius: 0; background: var(--border); }
.orientation-activity-preview span:nth-child(3) { width: 64%; }
.orientation-activity-preview span:nth-child(4) { width: 72%; }
.orientation-calendar-visual { padding: 1.3rem; }
.orientation-calendar-title { display: flex; align-items: center; justify-content: space-between; padding-bottom: .85rem; }
.orientation-calendar-title strong { color: var(--text); font-size: .75rem; }
.orientation-calendar-title span { color: var(--muted); font-size: .6rem; }
.orientation-calendar-days { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); }
.orientation-calendar-days i { height: 3rem; border-top: 1px solid var(--border); border-left: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 80%, transparent); }
.orientation-calendar-days i:nth-child(7n) { border-right: 1px solid var(--border); }
.orientation-calendar-days i:nth-last-child(-n+7) { border-bottom: 1px solid var(--border); }
.orientation-calendar-days b { position: absolute; right: .4rem; bottom: .65rem; max-width: 42%; overflow: hidden; padding: .18rem .3rem; border-radius: .25rem; background: var(--brand-100); color: var(--brand-700); font-size: .5rem; text-overflow: ellipsis; white-space: nowrap; }
.orientation-ready-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.orientation-ready-check { display: grid; width: 4rem; height: 4rem; place-items: center; margin-bottom: 1rem; border-radius: 50%; background: var(--brand-600); color: white; font-size: 1.8rem; box-shadow: 0 0 0 .65rem var(--brand-100); }
.orientation-ready-visual > strong { color: var(--text); font-size: 1rem; }
.orientation-ready-visual > span { margin-top: .15rem; color: var(--muted); font-size: .7rem; }
.orientation-ready-visual > div:last-child { display: flex; gap: .35rem; margin-top: 1rem; }
.orientation-ready-visual i { width: 1.6rem; height: .3rem; border-radius: 0; background: var(--brand-500); opacity: .35; }
.orientation-actions { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; padding: .85rem 1.1rem; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface-subtle) 70%, var(--surface)); }
.orientation-actions > .btn:first-child { margin-right: auto; }
.orientation-actions form { margin: 0; }
:root[data-theme="dark"] .orientation-card, :root[data-theme="dark"] .orientation-visual { box-shadow: none; }
:root[data-theme="dark"] .orientation-detail-header b { background: #172554; color: #bfdbfe; }

.btn { display: inline-flex; min-height: 2.25rem; align-items: center; justify-content: center; gap: .4rem; padding: .48rem .85rem; border: 1px solid transparent; border-radius: .5rem; font-size: .78rem; font-weight: 700; line-height: 1.2; text-align: center; cursor: pointer; transition: background-color 150ms, border-color 150ms, color 150ms, transform 80ms; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand-600); color: white; }
.btn-primary:hover { background: var(--brand-700); color: white; }
.btn-secondary { border-color: var(--border-strong); background: var(--surface); color: var(--text-normal); }
.btn-secondary:hover { background: var(--surface-subtle); color: var(--text); }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-subtle); color: var(--text); }
.btn-sm { min-height: 1.9rem; padding: .35rem .58rem; font-size: .7rem; }
.btn-link { padding: 0; border: 0; background: none; color: var(--brand-600); font-size: .72rem; font-weight: 700; cursor: pointer; }
.btn-link.danger { color: var(--danger); }
.icon-button { display: inline-grid; width: 2.25rem; height: 2.25rem; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); color: var(--text); cursor: pointer; }
.sidebar-visibility-button { width: 2rem; height: 2rem; flex: 0 0 2rem; border-radius: 2px; background: transparent; color: var(--muted); }
.sidebar-visibility-button:hover { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.sidebar-hide-button { margin: -.35rem -.35rem 0 0; }
.sidebar-visibility-button .nav-icon { width: 1rem; height: 1rem; }

.badge { display: inline-flex; align-items: center; padding: .16rem .46rem; border-radius: 2px; font-size: .65rem; font-weight: 750; line-height: 1.4; white-space: nowrap; }
.badge-status-todo, .btn-status-todo { background: #f3f4f6; color: #374151; }
.badge-status-in-progress, .btn-status-in-progress { background: #dbeafe; color: #1e40af; }
.badge-status-completed, .btn-status-completed, .badge-success { background: #dcfce7; color: #166534; }
.badge-urgency-low { background: #dcfce7; color: #166534; }
.badge-urgency-medium, .badge-warning { background: #fef3c7; color: #92400e; }
.badge-urgency-high { background: #fee2e2; color: #991b1b; }
.badge-neutral { background: #f3f4f6; color: #6b7280; }
:root[data-theme="dark"] .badge-status-todo, :root[data-theme="dark"] .btn-status-todo, :root[data-theme="dark"] .badge-neutral { background: #263244; color: #d1d5db; }
:root[data-theme="dark"] .badge-status-in-progress, :root[data-theme="dark"] .btn-status-in-progress { background: #172554; color: #bfdbfe; }
:root[data-theme="dark"] .badge-status-completed, :root[data-theme="dark"] .btn-status-completed, :root[data-theme="dark"] .badge-success, :root[data-theme="dark"] .badge-urgency-low { background: #052e16; color: #bbf7d0; }
:root[data-theme="dark"] .badge-warning, :root[data-theme="dark"] .badge-urgency-medium { background: #451a03; color: #fde68a; }
:root[data-theme="dark"] .badge-urgency-high { background: #450a0a; color: #fecaca; }

.alert { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: .75rem 1rem; border: 1px solid; border-radius: .6rem; }
.alert p { margin: .15rem 0 0; font-size: .75rem; }
.alert-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.alert-warning { border-color: #fde68a; background: #fffbeb; color: #78350f; }
:root[data-theme="dark"] .alert-error { border-color: #7f1d1d; background: #2b1010; color: #fecaca; }
:root[data-theme="dark"] .alert-warning { border-color: #78350f; background: #2b1d09; color: #fde68a; }
.temporary-password { padding: .45rem .65rem; border: 1px dashed currentColor; border-radius: .4rem; font-size: .9rem; user-select: all; }

.board-help { display: flex; align-items: flex-start; gap: .5rem; padding: .65rem .9rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface-subtle); color: var(--muted); font-size: .74rem; }
.board-help[hidden], html[data-board-help-dismissed="true"] .board-help { display: none; }
.board-help-copy { display: flex; min-width: 0; flex: 1; flex-wrap: wrap; gap: .45rem 1.25rem; }
.board-help-dismiss { display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 1.8rem; place-items: center; margin: -.32rem -.45rem 0 0; padding: 0; border: 0; border-radius: 2px; background: transparent; color: var(--muted); font-size: 1.05rem; line-height: 1; cursor: pointer; }
.board-help-dismiss:hover { background: var(--surface-subtle); color: var(--text); }
.kanban-grid { display: grid; grid-template-columns: repeat(3, minmax(18rem, 1fr)); gap: 1rem; align-items: start; overflow-x: auto; padding-bottom: .5rem; }
.kanban-column { min-height: 22rem; padding: .75rem; border: 1px solid var(--border); border-radius: .75rem; background: color-mix(in srgb, var(--surface-subtle) 88%, var(--brand-50)); transition: border-color 150ms, background 150ms; }
.kanban-column.drop-active { border-color: var(--brand-500); background: var(--brand-50); }
.kanban-header { display: flex; align-items: center; justify-content: space-between; padding: .15rem .2rem .7rem; }
.kanban-header h2 { margin: 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.count-badge { display: inline-grid; min-width: 1.45rem; height: 1.45rem; place-items: center; border-radius: 2px; background: var(--surface); color: var(--muted); font-size: .67rem; font-weight: 700; }
.kanban-list > * + * { margin-top: .7rem; }
.column-empty { display: grid; min-height: 8rem; place-items: center; border: 1px dashed var(--border-strong); border-radius: .65rem; color: var(--faint); font-size: .75rem; }
.kanban-footer { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-top: .75rem; padding: .7rem .2rem .05rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .68rem; }
.kanban-footer-actions { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; }
.column-table-link { color: var(--muted); font-weight: 650; white-space: nowrap; }
.column-table-link:hover { color: var(--brand-600); }
.work-card { padding: .9rem; border: 1px solid var(--border); border-left-width: 3px; border-radius: .65rem; background: var(--surface); box-shadow: var(--shadow); cursor: grab; transition: box-shadow 150ms, opacity 150ms, transform 150ms; }
.work-card:hover { box-shadow: 0 4px 12px rgb(15 23 42 / .08); }
.work-card.dragging { opacity: .45; transform: rotate(1deg); }
.urgency-border-low { border-left-color: #22c55e; }
.urgency-border-medium { border-left-color: #f59e0b; }
.urgency-border-high { border-left-color: #ef4444; }
.work-card-heading, .work-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.record-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; font-weight: 750; }
.work-card-status { margin-top: .55rem; }
.card-details { margin: .65rem 0 0; }
.card-details div { display: grid; grid-template-columns: 4.1rem 1fr; gap: .5rem; margin-top: .25rem; }
.card-details dt { color: var(--muted); font-size: .68rem; }
.card-details dd { margin: 0; color: var(--text); font-size: .73rem; font-weight: 600; overflow-wrap: anywhere; }
.card-description { display: -webkit-box; margin: .7rem 0; overflow: hidden; color: var(--text-normal); font-size: .76rem; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.assignment-line { padding: .4rem .5rem; border-radius: .4rem; background: var(--surface-subtle); color: var(--muted); font-size: .68rem; }
.status-actions { display: flex; flex-wrap: wrap; gap: .38rem; margin-top: .7rem; }
.status-actions form { margin: 0; }
.work-card-footer { margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--border); font-size: .72rem; }
.work-card-footer form { margin: 0; }
.work-card-links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.card-action { display: inline-flex; min-height: 1.9rem; align-items: center; justify-content: center; gap: .32rem; padding: .3rem .5rem; border: 1px solid var(--border); border-radius: .45rem; font-size: .68rem; font-weight: 750; line-height: 1; cursor: pointer; }
.card-action-details { border-color: color-mix(in srgb, var(--brand-500) 35%, var(--border)); background: var(--brand-50); color: var(--brand-700); }
.card-action-details:hover { border-color: var(--brand-500); background: var(--brand-100); color: var(--brand-700); }
:root[data-theme="dark"] .card-action-details, :root[data-theme="dark"] .card-action-details:hover { color: var(--link); }
.card-action-details > span:first-child { font-size: .78rem; }
.card-action-notes { background: var(--surface); color: var(--text-normal); }
.card-action-notes:hover { border-color: var(--border-strong); background: var(--surface-subtle); color: var(--text); }
.sticky-note-mark { font-size: .76rem; line-height: 1; }
.note-count { display: inline-grid; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; place-items: center; border-radius: 2px; background: var(--surface-subtle); color: var(--muted); font-size: .6rem; font-weight: 800; }
.card-action-notes:hover .note-count { background: var(--brand-50); color: var(--brand-700); }

/* Density changes vertical rhythm only; card width, type size, and controls stay consistent. */
.density-compact .kanban-list > * + * { margin-top: .55rem; }
.density-compact .work-card { padding: .72rem .9rem; }
.density-compact .work-card-status { margin-top: .42rem; }
.density-compact .card-details { margin-top: .48rem; }
.density-compact .card-details div { margin-top: .16rem; }
.density-compact .card-description { margin: .5rem 0; -webkit-line-clamp: 2; }
.density-compact .assignment-line { padding-top: .3rem; padding-bottom: .3rem; }
.density-compact .status-actions { margin-top: .5rem; }
.density-compact .work-card-footer { margin-top: .55rem; padding-top: .48rem; }

.density-condensed .kanban-list > * + * { margin-top: .42rem; }
.density-condensed .work-card { padding: .56rem .9rem; }
.density-condensed .work-card-status { margin-top: .3rem; }
.density-condensed .card-details { margin-top: .34rem; }
.density-condensed .card-details div { margin-top: .1rem; }
.density-condensed .card-description { margin: .38rem 0; -webkit-line-clamp: 1; }
.density-condensed .assignment-line { padding-top: .22rem; padding-bottom: .22rem; }
.density-condensed .status-actions { margin-top: .38rem; }
.density-condensed .work-card-footer { margin-top: .42rem; padding-top: .38rem; }

.filter-bar { display: grid; grid-template-columns: minmax(14rem, 2fr) repeat(3, minmax(8rem, 1fr)) auto; gap: .75rem; align-items: end; padding: .9rem; }
.mobile-sort-field { display: none; }
.filter-actions { display: flex; gap: .4rem; }
.audit-filter-bar { display: grid; grid-template-columns: minmax(14rem, 2fr) repeat(3, minmax(10rem, 1fr)); gap: .75rem; align-items: end; padding: .9rem; }
.audit-filter-bar .filter-actions { justify-content: flex-end; }
.audit-time { min-width: 10.5rem; white-space: nowrap; }
.audit-changes { min-width: 13rem; margin: 0; padding: 0; list-style: none; }
.audit-changes li + li { margin-top: .2rem; }
.audit-changes strong { display: inline; margin-right: .2rem; font-size: .68rem; }
.audit-changes span { color: var(--muted); }
.audit-no-changes { color: var(--faint); }
.table-card { overflow: hidden; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface-subtle); }
th { padding: .68rem .8rem; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .65rem; font-weight: 750; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.table-sort-link { display: flex; width: calc(100% + 1.6rem); min-height: 2.75rem; align-items: center; gap: .35rem; margin: -.68rem -.8rem; padding: .68rem .8rem; color: inherit; }
.table-sort-link:hover { background: color-mix(in srgb, var(--brand-500) 7%, transparent); color: var(--text); text-decoration: none; }
.table-sort-link:focus-visible { position: relative; z-index: 1; }
th.numeric .table-sort-link { justify-content: flex-end; }
.sort-indicator { color: var(--faint); font-size: .75rem; letter-spacing: 0; }
th[aria-sort] .sort-indicator { color: var(--brand-600); }
td { padding: .72rem .8rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent); color: var(--text-normal); font-size: .76rem; vertical-align: middle; }
tbody tr:hover { background: var(--surface-subtle); }
td strong, td small { display: block; }
td small { margin-top: .12rem; font-size: .67rem; }
.numeric { text-align: right; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; }
.actions-column { width: 1%; text-align: right; }
.row-actions, .inline-form, .inline-create { display: flex; align-items: center; gap: .45rem; }
.row-actions { justify-content: flex-end; white-space: nowrap; }
.inline-create { align-items: end; }
.inline-create label { flex: 1; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem .9rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .7rem; }
.pagination { display: flex; align-items: center; gap: .65rem; }

.status-panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; }
.status-panel .status-actions { margin-top: .3rem; }
.metadata { margin: 0; color: var(--muted); font-size: .72rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); gap: 1rem; align-items: start; }
.detail-sidebar > * + * { margin-top: 1rem; }
.summary-card { padding: 1rem; }
.summary-card h2 { margin-bottom: .75rem; }
.summary-card dl { margin: 0; }
.summary-card dl div { display: flex; justify-content: space-between; padding: .42rem 0; border-bottom: 1px solid var(--border); }
.summary-card dt { color: var(--muted); }
.summary-card dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.summary-card .summary-total { padding-top: .65rem; border: 0; color: var(--text); }
.note-form { padding: 1rem; border-bottom: 1px solid var(--border); }
.note-form .btn { margin-top: .55rem; }
.notes-list { max-height: 28rem; overflow-y: auto; }
.notes-list article { padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.notes-list article p { margin-bottom: .45rem; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.notes-list article footer, .small-empty { color: var(--muted); font-size: .67rem; }
.small-empty { padding: 1.25rem; text-align: center; }
.activity-list { position: relative; max-height: 36rem; overflow-y: auto; }
.activity-list::before { position: absolute; top: 1rem; bottom: 1rem; left: 1.27rem; width: 1px; background: var(--border); content: ""; }
.activity-item { position: relative; display: grid; grid-template-columns: 1.15rem minmax(0, 1fr); gap: .65rem; padding: .85rem 1rem; }
.activity-item + .activity-item { border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.activity-marker { z-index: 1; display: grid; width: 1.15rem; height: 1.15rem; margin-top: .06rem; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--brand-600); font-size: .66rem; font-weight: 800; }
.activity-note .activity-marker { border-color: color-mix(in srgb, var(--brand-500) 45%, var(--border)); background: var(--brand-50); }
.activity-content > strong { display: block; color: var(--text); font-size: .75rem; }
.activity-content > p { margin: .42rem 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.activity-content footer { margin-top: .38rem; color: var(--muted); font-size: .65rem; }
.activity-changes { margin: .45rem 0 0; padding: .45rem .55rem; border-radius: .42rem; background: var(--surface-subtle); list-style: none; }
.activity-changes li { color: var(--text-normal); font-size: .66rem; overflow-wrap: anywhere; }
.activity-changes li + li { margin-top: .2rem; }
.activity-changes li > span { color: var(--muted); font-weight: 650; }
.activity-changes s { color: var(--faint); }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem; text-align: center; }
.empty-state p { margin: .15rem 0 0; color: var(--muted); }
.empty-icon { display: grid; width: 2.75rem; height: 2.75rem; place-items: center; margin-bottom: .65rem; border-radius: 50%; background: var(--surface-subtle); color: var(--muted); font-size: 1.15rem; }
.error-card { display: flex; flex-direction: column; align-items: center; padding: 2.5rem; text-align: center; }
.error-card p { color: var(--muted); }

.dialog { width: min(32rem, calc(100% - 2rem)); max-height: 90vh; padding: 0; overflow: auto; border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); color: var(--text-normal); box-shadow: 0 24px 48px rgb(15 23 42 / .24); }
.dialog[open] { animation: overlay-in 140ms ease-out both; }
.dialog::backdrop { background: rgb(15 23 42 / .5); backdrop-filter: blur(2px); }
.dialog[open]::backdrop { animation: backdrop-in 140ms ease-out both; }
@keyframes overlay-in { from { opacity: 0; transform: translateY(.2rem) scale(.995); } }
@keyframes backdrop-in { from { opacity: 0; } }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.dialog-header h2, .dialog-header p { margin-bottom: 0; }
.dialog-header p { color: var(--muted); font-size: .75rem; }
.dialog-body { padding: 1.15rem 1.25rem; }
.dialog-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .85rem 1.25rem; border-top: 1px solid var(--border); background: var(--surface-subtle); }
.board-notes-dialog { position: relative; width: min(38rem, calc(100% - 2rem)); }
.board-notes-loading { position: absolute; inset: 0; z-index: 5; display: flex; visibility: hidden; align-items: center; justify-content: center; gap: .55rem; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text); font-size: .75rem; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity 120ms, visibility 0s linear 120ms; }
.board-notes-loading.htmx-request { visibility: visible; opacity: 1; transition-delay: 0s; }
.loading-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand-500); animation: loading-pulse 800ms ease-in-out infinite alternate; }
@keyframes loading-pulse { to { opacity: .35; transform: scale(.72); } }
.board-notes-placeholder { padding: 3rem 1.25rem; color: var(--muted); text-align: center; }
.board-notes-overview { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface-subtle); color: var(--muted); font-size: .68rem; }
.board-notes-overview strong { color: var(--text); }
.board-notes-overview a { font-weight: 700; }
.board-notes-error { margin: .8rem 1rem 0; }
.board-note-form { padding: 1rem; }
.board-note-form textarea { min-height: 5.5rem; }
.board-note-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .6rem; }
.board-note-form .board-note-actions .btn { margin-top: 0; }
.board-notes-list { max-height: min(36vh, 20rem); overflow-y: auto; }
.board-notes-list article:first-child { box-shadow: inset 3px 0 var(--brand-500); }

.toast-region { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 100; display: flex; width: min(22rem, calc(100% - 2rem)); flex-direction: column; gap: .5rem; }
.toast { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .85rem; border: 1px solid var(--border); border-left: 3px solid var(--brand-500); border-radius: .6rem; background: var(--surface-raised); color: var(--text); box-shadow: 0 10px 25px rgb(15 23 42 / .16); animation: toast-in 150ms ease-out; }
.toast.toast-leaving { pointer-events: none; animation: toast-out 120ms ease-in both; }
.toast.success { border-left-color: #22c55e; }
.toast.error { border-left-color: #ef4444; }
.toast button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
@keyframes toast-in { from { transform: translateY(.5rem); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(.35rem); opacity: 0; } }

.export-menu { position: relative; flex: 0 0 auto; }
.export-menu > summary { list-style: none; user-select: none; }
.export-menu > summary::-webkit-details-marker { display: none; }
.export-menu[open] > summary { background: var(--brand-700); }
.export-chevron { width: .45rem; height: .45rem; margin: -.2rem .05rem 0 .15rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 150ms; }
.export-menu[open] .export-chevron { margin-top: .2rem; transform: rotate(225deg); }
.export-menu-panel { position: absolute; top: calc(100% + .45rem); right: 0; z-index: 40; width: 17rem; padding: .35rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--surface-raised); box-shadow: 0 14px 32px rgb(15 23 42 / .16); transform-origin: top right; }
.export-menu[open] .export-menu-panel { animation: overlay-in 140ms ease-out both; }
.export-option { display: flex; width: 100%; align-items: center; gap: .7rem; padding: .65rem; border: 0; border-radius: .5rem; background: transparent; color: var(--text-normal); text-align: left; cursor: pointer; }
.export-option:hover { background: var(--surface-subtle); color: var(--text); }
.export-option + .export-option { margin-top: .12rem; }
.export-option > span:last-child { min-width: 0; }
.export-option strong, .export-option small { display: block; }
.export-option strong { color: var(--text); font-size: .76rem; }
.export-option small { margin-top: .08rem; font-size: .64rem; line-height: 1.35; }
.export-format-badge { display: grid; width: 2rem; height: 1.55rem; flex: 0 0 2rem; place-items: center; border: 1px solid color-mix(in srgb, var(--brand-500) 35%, var(--border)); border-radius: .4rem; background: var(--brand-50); color: var(--brand-700); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .56rem; font-weight: 800; letter-spacing: .025em; }

.report-header { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid #bfdbfe; border-bottom: 4px solid #eab308; border-radius: .65rem .65rem 0 0; background: #eff6ff; color: #172554; }
.report-header h1 { margin: 0; color: #172554; font-size: 1.35rem; }
.report-header p { margin-bottom: 0; color: #475569; }
.report-kicker { color: #1d4ed8 !important; font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.report-count { display: flex; flex-direction: column; align-items: flex-end; }
.report-count strong { font-size: 1.6rem; line-height: 1; }
.report-count span { color: #64748b; font-size: .65rem; font-weight: 600; text-transform: uppercase; }
.report-table-wrap { overflow-x: auto; border-right: 1px solid var(--border); border-left: 1px solid var(--border); background: white; }
.report-table { color: #1f2937; }
.report-table thead { background: #334155; color: white; }
.report-table th { border-color: #475569; color: #f8fafc; font-size: .58rem; }
.report-table td { padding: .5rem .55rem; border-color: #e5e7eb; color: #1f2937; font-size: .65rem; }
.report-table tbody tr:nth-child(even) { background: #fffbeb; }
.report-table tbody tr:hover { background: inherit; }
.report-table .report-urgency-high { box-shadow: inset 3px 0 #ef4444; }
.report-table .report-urgency-medium { box-shadow: inset 3px 0 #f59e0b; }
.report-description { min-width: 13rem; max-width: 22rem; }
.report-footer { padding: .5rem .75rem; border: 1px solid #fde047; border-radius: 0 0 .5rem .5rem; background: #fefce8; color: #64748b; font-size: .6rem; text-align: right; }
.report-mobile-summary { display: none; }
.report-summary-card { padding: .8rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--surface); }
.report-summary-card header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.report-summary-card p { margin: .35rem 0; color: var(--text-normal); }
.report-summary-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .75rem; margin: 0; }
.report-summary-card dl div:first-child { grid-column: 1 / -1; }
.report-summary-card dt { color: var(--muted); font-size: .6rem; font-weight: 650; text-transform: uppercase; }
.report-summary-card dd { margin: .08rem 0 0; color: var(--text); font-size: .72rem; }

.badge-scheduled { border: 1px solid color-mix(in srgb, var(--brand-500) 35%, var(--border)); background: var(--brand-50); color: var(--brand-700); }
:root[data-theme="dark"] .badge-scheduled { color: var(--link); }
.work-card-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.scheduled-due-line { margin-top: .55rem; padding: .38rem .5rem; border-radius: .4rem; background: var(--brand-50); color: var(--text-normal); font-size: .67rem; }
.mobile-board-tabs { display: none; }

.schedule-origin-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-color: color-mix(in srgb, var(--brand-500) 32%, var(--border)); background: var(--surface); }
.schedule-origin-card strong, .schedule-origin-card p { display: block; margin: 0; }
.schedule-origin-card p { margin-top: .12rem; color: var(--muted); font-size: .72rem; }

.photo-card { overflow: hidden; }
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .8rem; padding: 1rem 1.25rem; }
.photo-item { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: .65rem; background: var(--surface-subtle); }
.photo-open { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; border: 0; background: #111827; cursor: zoom-in; }
.photo-open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-item footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .12rem .5rem; align-items: center; padding: .55rem .65rem; font-size: .65rem; }
.photo-item footer > span { overflow: hidden; color: var(--text); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.photo-item footer time { color: var(--muted); }
.photo-item footer form { grid-column: 1 / -1; margin-top: .2rem; }
.photo-upload-form { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: .8rem 1.25rem; border-top: 1px solid var(--border); }
.photo-upload-form > span { color: var(--muted); font-size: .68rem; }
.photo-picker { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem; border: 1px dashed var(--border-strong); border-radius: .65rem; background: var(--surface-subtle); }
.photo-picker p { margin: 0; color: var(--muted); font-size: .72rem; }
.optional-label { color: var(--faint); font-weight: 600; letter-spacing: 0; text-transform: none; }
.photo-picker-button { position: relative; display: inline-flex; cursor: pointer; }
.photo-picker-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.photo-picker-button:has(input:focus-visible) .btn { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.photo-preview-list { display: flex; width: 100%; flex-wrap: wrap; gap: .5rem; }
.photo-preview { width: 5.25rem; margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); }
.photo-preview img { display: block; width: 100%; height: 4rem; object-fit: cover; }
.photo-preview figcaption { padding: .25rem; color: var(--muted); font-size: .6rem; text-align: center; }
.photo-preview-warning { width: 100%; margin: 0; color: var(--danger); font-size: .72rem; font-weight: 700; }
.photo-limit-message { margin: 0; padding: .8rem 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .72rem; }
.photo-lightbox { width: min(72rem, calc(100% - 2rem)); }
.photo-lightbox-body { display: grid; min-height: 12rem; max-height: calc(90vh - 4rem); place-items: center; padding: 1rem; background: #020617; }
.photo-lightbox-body img { display: block; max-width: 100%; max-height: calc(90vh - 7rem); object-fit: contain; }

.maintenance-page > * + *, .maintenance-schedule-page > * + * { margin-top: 1rem; }
.maintenance-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.summary-stat { padding: .85rem 1rem; }
.summary-stat span, .summary-stat strong { display: block; }
.summary-stat span { color: var(--muted); font-size: .67rem; font-weight: 600; text-transform: uppercase; }
.summary-stat strong { margin-top: .22rem; color: var(--text); font-size: 1.5rem; line-height: 1; }
.summary-stat-danger { border-color: color-mix(in srgb, #ef4444 38%, var(--border)); }
.summary-stat-danger strong { color: var(--danger); }
.maintenance-primary { display: grid; grid-template-columns: minmax(19rem, .7fr) minmax(32rem, 1.3fr); gap: 1rem; align-items: start; }
.maintenance-attention-card, .maintenance-calendar-card { overflow: hidden; }
.maintenance-agenda-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); box-shadow: inset 3px 0 var(--border-strong); }
.maintenance-agenda-item.state-overdue { box-shadow: inset 3px 0 #ef4444; }
.maintenance-agenda-item.state-due { box-shadow: inset 3px 0 #f59e0b; }
.maintenance-agenda-item strong, .maintenance-agenda-item small { display: block; }
.maintenance-agenda-item > div:first-child > strong { margin-top: .15rem; color: var(--text); font-size: .76rem; }
.maintenance-agenda-item small { margin-top: .12rem; }
.agenda-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.badge-maintenance-overdue { background: #fee2e2; color: #991b1b; }
.badge-maintenance-due { background: #fef3c7; color: #92400e; }
.badge-maintenance-upcoming, .badge-maintenance-open { background: var(--brand-50); color: var(--brand-700); }
.badge-maintenance-completed { background: #dcfce7; color: #166534; }
.badge-maintenance-skipped { background: #f3f4f6; color: #4b5563; }
:root[data-theme="dark"] .badge-maintenance-overdue { background: #451a1a; color: #fca5a5; }
:root[data-theme="dark"] .badge-maintenance-due { background: #422006; color: #fcd34d; }
:root[data-theme="dark"] .badge-maintenance-completed { background: #052e16; color: #86efac; }
:root[data-theme="dark"] .badge-maintenance-skipped { background: #1f2937; color: #d1d5db; }
.calendar-header { align-items: center; }
.calendar-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.mobile-calendar-toggle { display: none; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.calendar-weekdays span { padding: .42rem; color: var(--muted); font-size: .6rem; font-weight: 650; text-align: center; text-transform: uppercase; }
.calendar-grid { background: var(--border); gap: 1px; }
.calendar-day { display: flex; min-width: 0; min-height: 5rem; flex-direction: column; gap: .25rem; padding: .4rem; background: var(--surface); color: var(--text-normal); }
.calendar-day:hover { background: var(--surface-subtle); color: var(--text); }
.calendar-day.outside-month { background: color-mix(in srgb, var(--surface-subtle) 65%, var(--surface)); color: var(--faint); }
.calendar-day.today .calendar-day-number { display: grid; width: 1.35rem; height: 1.35rem; place-items: center; border-radius: 50%; background: var(--brand-600); color: white; }
.calendar-day.selected { outline: 2px solid var(--brand-500); outline-offset: -2px; }
.calendar-day-number { font-size: .65rem; font-weight: 750; }
.calendar-events { display: flex; min-width: 0; flex-direction: column; gap: .18rem; }
.calendar-event { overflow: hidden; padding: .15rem .25rem; border-radius: .25rem; background: var(--brand-50); color: var(--brand-700); font-size: .62rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.state-overdue { background: #fee2e2; color: #991b1b; }
.calendar-event.state-completed { background: #dcfce7; color: #166534; }
.calendar-event.state-skipped { background: #f3f4f6; color: #6b7280; }
.calendar-agenda { border-top: 1px solid var(--border); }
.calendar-agenda-header, .calendar-agenda-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .55rem .75rem; }
.calendar-agenda-header { display: flex; justify-content: space-between; background: var(--surface-subtle); font-size: .68rem; }
.calendar-agenda-row + .calendar-agenda-row { border-top: 1px solid var(--border); }
.calendar-agenda-row time { color: var(--muted); font-size: .68rem; }
.calendar-agenda-row a { min-width: 0; overflow: hidden; color: var(--text-normal); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.schedule-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(18rem, .75fr); gap: 1rem; align-items: start; }
.schedule-sidebar > * + * { margin-top: 1rem; }
.schedule-workflow-card { padding: 1rem; border-color: color-mix(in srgb, var(--brand-500) 42%, var(--border)); }
.schedule-workflow-card h2 { margin: .2rem 0 .45rem; }
.schedule-workflow-card p { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 0; }
.maintenance-status-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.maintenance-status-actions form { flex: 1 1 8rem; }
.maintenance-status-actions .btn { width: 100%; min-height: 2.75rem; }
.schedule-admin-card { padding: 1rem; }
.schedule-admin-card h2 { margin-bottom: .75rem; }
.schedule-admin-card .btn { margin-top: .75rem; }
.form-grid-fieldset { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.form-grid-fieldset .full { grid-column: 1 / -1; }
.recurrence-fields { display: grid; grid-template-columns: minmax(5rem, .6fr) minmax(7rem, 1fr); gap: .45rem; }

/* Institutional editorial layer */
.page-layout > * + * { margin-top: 1.35rem; }
.page-header {
  min-height: 3.8rem;
  padding: .15rem 0 .7rem 1rem;
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--brand-600);
}
.page-header p {
  max-width: 52rem;
  margin-top: .25rem;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .84rem;
  line-height: 1.45;
}
.record-title { font-family: var(--font-mono); font-size: clamp(1.45rem, 2vw, 1.9rem); letter-spacing: -.035em; }
.back-link { font-family: var(--font-sans); font-size: .72rem; letter-spacing: .025em; text-transform: uppercase; }

.card {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  box-shadow: none;
}
.card-header {
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.card-header h2, .card-header h3 { font-size: 1.08rem; }
.card-header p { margin-top: .12rem; font-family: var(--font-sans); font-size: .78rem; }
.card-body { padding: 1.1rem; }
.form-card {
  padding: 1.2rem;
  border-top: 1px solid var(--border);
  border-left: 4px solid var(--brand-600);
}
.label {
  margin-bottom: .32rem;
  color: var(--text-normal);
  font-size: .71rem;
  font-weight: 650;
  letter-spacing: .025em;
  text-transform: none;
}
.input, .select {
  min-height: 2.45rem;
  padding: .5rem .65rem;
  border-color: var(--border-strong);
  border-radius: 1px;
  background: var(--surface-raised);
}
.input:focus, .select:focus {
  border-color: var(--brand-600);
  outline: 2px solid var(--brand-600);
  outline-offset: 1px;
  box-shadow: none;
}
.field-help { color: var(--muted); font-family: var(--font-sans); font-size: .71rem; }
.contractor-options-toggle, .contractor-options-fields, .photo-picker {
  border-radius: 2px;
  background: var(--surface-subtle);
}
.contractor-options-toggle:has(input:checked) { background: var(--brand-50); }

.btn {
  min-height: 2.3rem;
  padding: .48rem .82rem;
  border-radius: 2px;
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .015em;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.btn:active { transform: translateY(1px); }
.btn-primary { border-color: var(--brand-600); background: var(--brand-600); color: #ffffff; }
.btn-primary:hover { border-color: var(--brand-700); background: var(--brand-700); color: #ffffff; text-decoration: none; }
:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .btn-primary:hover { color: #191a18; }
.btn-secondary { border-color: var(--border-strong); background: transparent; color: var(--text); }
.btn-secondary:hover { border-color: var(--text-normal); background: var(--surface-subtle); color: var(--text); text-decoration: none; }
.btn-ghost { color: var(--text-normal); }
.btn-ghost:hover { background: var(--surface-subtle); text-decoration: none; }
.btn-danger { background: var(--danger); }
.btn-link { font-weight: 650; text-underline-offset: .16em; }
.icon-button {
  border-radius: 2px;
  background: transparent;
}

.badge, .count-badge, .note-count {
  border: 1px solid color-mix(in srgb, currentColor 34%, transparent);
  border-radius: 2px;
  font-weight: 650;
  letter-spacing: .015em;
}
.badge-status-todo, .btn-status-todo, .badge-neutral, .badge-urgency-low {
  background: #eceef0; color: #4f5358;
}
.badge-status-in-progress, .btn-status-in-progress {
  background: #e8edf5; color: #24427e;
}
.badge-status-completed, .btn-status-completed, .badge-success, .badge-maintenance-completed {
  background: #e7f0ea; color: #22503a;
}
.badge-urgency-medium, .badge-warning, .badge-maintenance-due {
  background: #f4ecd9; color: #7b5012;
}
.badge-urgency-high, .badge-maintenance-overdue {
  background: #f3e2e0; color: #852d27;
}
:root[data-theme="dark"] .badge-status-todo,
:root[data-theme="dark"] .btn-status-todo,
:root[data-theme="dark"] .badge-neutral,
:root[data-theme="dark"] .badge-urgency-low {
  background: #34363a; color: #d4d6d9;
}
:root[data-theme="dark"] .badge-status-in-progress,
:root[data-theme="dark"] .btn-status-in-progress {
  background: #263653; color: #b8caf0;
}
:root[data-theme="dark"] .badge-status-completed,
:root[data-theme="dark"] .btn-status-completed,
:root[data-theme="dark"] .badge-success,
:root[data-theme="dark"] .badge-maintenance-completed {
  background: #243b2f; color: #abd1b9;
}
:root[data-theme="dark"] .badge-warning,
:root[data-theme="dark"] .badge-urgency-medium,
:root[data-theme="dark"] .badge-maintenance-due {
  background: #493820; color: #e5c37c;
}
:root[data-theme="dark"] .badge-urgency-high,
:root[data-theme="dark"] .badge-maintenance-overdue {
  background: #4a2927; color: #efaaa4;
}
.alert, .temporary-password { border-radius: 2px; }

.page-kicker, .section-kicker {
  color: var(--brand-600);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .08em;
}
.organization-branding-preview {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  gap: .85rem;
  margin-top: .35rem;
  padding: .75rem;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}
.organization-branding-preview img { display: block; width: auto; max-width: 6rem; height: 3.5rem; object-fit: contain; }
.organization-branding-copy strong, .organization-branding-copy small { display: block; line-height: 1; }
.organization-branding-copy strong { color: var(--text); font-family: var(--font-sans); font-size: 1.05rem; font-weight: 680; }
.organization-branding-copy small { margin-top: .3rem; color: var(--muted); font-size: .65rem; font-weight: 550; letter-spacing: .07em; text-transform: uppercase; }
.organization-branding-controls { display: flex; align-items: flex-end; gap: .65rem; }
.organization-logo-form { min-width: 0; flex: 1; }
.organization-logo-form .input { margin-top: .35rem; }
.organization-branding-actions { display: flex; justify-content: flex-start; margin-top: .75rem; }
.organization-branding-controls > form:last-child { padding-bottom: .02rem; }

.board-help {
  gap: .75rem;
  padding: .55rem .8rem;
  border-width: 1px 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: .72rem;
}
.board-help-copy { gap: .35rem 1.5rem; }
.board-help-copy > span::before { margin-right: .45rem; color: var(--brand-600); content: "—"; }
.kanban-grid {
  gap: 1px;
  align-items: stretch;
  padding: 1px;
  background: var(--border-strong);
}
.kanban-column {
  min-height: 22rem;
  padding: .75rem;
  border: 0;
  border-radius: 0;
  background: var(--surface-subtle);
  box-shadow: inset 0 4px var(--border-strong);
}
.kanban-column[data-drop-status="Todo"] { box-shadow: inset 0 4px #986315; }
.kanban-column[data-drop-status="In Progress"] { box-shadow: inset 0 4px #3157a3; }
.kanban-column[data-drop-status="Completed"] { box-shadow: inset 0 4px #2f6b4f; }
:root[data-theme="dark"] .kanban-column[data-drop-status="Todo"] { box-shadow: inset 0 4px #d6a64f; }
.kanban-column.drop-active { background: var(--brand-50); box-shadow: inset 0 4px var(--brand-600); }
.kanban-header { padding: .3rem .1rem .8rem; border-bottom: 1px solid var(--border); }
.kanban-header h2 {
  font-size: .92rem;
  font-weight: 620;
  letter-spacing: .01em;
  text-transform: none;
}
.count-badge { min-width: 1.5rem; background: transparent; color: var(--text-normal); }
.column-empty { border-radius: 0; background: color-mix(in srgb, var(--surface) 45%, transparent); }
.work-card {
  padding: .85rem;
  border-radius: 1px;
  background: var(--surface);
  box-shadow: none;
  transition: border-color 120ms, background-color 120ms, opacity 120ms, transform 120ms;
}
.work-card:hover { border-color: var(--border-strong); background: var(--surface-raised); box-shadow: none; }
.urgency-border-low { border-left-color: #697178; }
.urgency-border-medium { border-left-color: #a66f19; }
.urgency-border-high { border-left-color: #9f332d; }
.record-number { font-family: var(--font-mono); font-size: .74rem; font-weight: 650; letter-spacing: -.02em; }
.card-details dd { font-weight: 540; }
.card-description {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .84rem;
  line-height: 1.45;
}
.assignment-line, .scheduled-due-line { border-radius: 1px; background: var(--surface-subtle); }
.card-action { border-radius: 1px; font-weight: 650; }
.card-action:hover { text-decoration: none; }

.filter-bar, .audit-filter-bar {
  padding: .9rem 0;
  border: 0;
  border-top: 2px solid var(--brand-600);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.table-card {
  overflow: hidden;
  border: 0;
  border-top: 2px solid var(--brand-600);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
thead { background: var(--text); }
th { border-color: color-mix(in srgb, var(--canvas) 28%, transparent); color: var(--canvas); font-weight: 600; letter-spacing: .045em; }
.table-sort-link:hover { background: color-mix(in srgb, var(--canvas) 10%, transparent); color: var(--canvas); }
th[aria-sort] .sort-indicator { color: var(--canvas); }
td { border-bottom-color: var(--border); }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-subtle) 58%, transparent); }
tbody tr:hover { background: var(--brand-50); }
.mono { font-family: var(--font-mono); }
.table-footer { border-top: 1px solid var(--border-strong); }
.status-panel { border-left: 4px solid var(--brand-600); }
.detail-grid, .schedule-detail-grid { gap: 1rem; padding: 0; background: transparent; }
.summary-card { border-top: 3px solid var(--brand-600); }
.summary-card dd { font-family: var(--font-mono); }
.notes-list article p, .activity-content > p { font-family: var(--font-sans); font-size: .83rem; line-height: 1.5; }
.activity-marker { border-radius: 1px; }
.activity-changes { border-radius: 1px; }
.empty-state { font-family: var(--font-sans); }
.empty-icon {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--border-strong);
  border-radius: 1px;
  background: transparent;
}

.photo-item, .photo-preview { border-radius: 1px; }
.photo-picker { border-style: solid; border-left: 4px solid var(--brand-600); }
.schedule-origin-card {
  border-left: 4px solid var(--brand-600);
  background: var(--surface);
}
.summary-stat { border-top: 3px solid var(--border-strong); }
.summary-stat strong { font-family: var(--font-sans); font-weight: 680; }
.summary-stat-danger { border-top-color: var(--danger); }
.maintenance-attention-card { border-top: 3px solid var(--warning); }
.maintenance-calendar-card { border-top: 3px solid var(--brand-600); }
.maintenance-agenda-item { box-shadow: inset 3px 0 var(--border-strong); }
.calendar-weekdays { background: var(--text); }
.calendar-weekdays span { color: var(--canvas); }
.calendar-day { background: var(--surface); }
.calendar-day.today .calendar-day-number { border-radius: 1px; background: var(--brand-600); }
.calendar-event { border-radius: 1px; }
.schedule-workflow-card { border-left: 4px solid var(--brand-600); }

.dialog {
  border: 2px solid var(--border-strong);
  border-radius: 3px;
  box-shadow: 8px 10px 0 rgb(0 0 0 / .2);
}
.dialog::backdrop { background: rgb(20 20 18 / .68); backdrop-filter: none; }
.dialog-header, .dialog-footer { background: var(--surface-subtle); }
.toast {
  border-radius: 2px;
  box-shadow: 5px 6px 0 rgb(0 0 0 / .16);
}
.export-menu-panel { border-radius: 2px; box-shadow: 6px 7px 0 rgb(0 0 0 / .16); }
.export-option, .export-format-badge { border-radius: 1px; }

.report-header {
  border-color: #2f6b4f;
  border-bottom-color: #2f6b4f;
  border-radius: 0;
  background: #eef5f1;
  color: #1f3e2f;
}
.report-header h1 { color: #1f3e2f; font-family: var(--font-sans); }
.report-header p { color: #496253; }
.report-kicker { color: #2f6b4f !important; }
.report-count strong { font-family: var(--font-sans); font-weight: 700; }
.report-table thead { background: #20382b; }
.report-table tbody tr:nth-child(even) { background: #f4f7f5; }
.report-footer { border-color: #7b9b86; border-radius: 0; background: #eef5f1; color: #496253; }
.report-summary-card { border-radius: 1px; }

.auth-page {
  display: grid;
  max-width: 64rem;
  grid-template-columns: minmax(16rem, .8fr) minmax(20rem, 1.1fr);
  align-items: stretch;
  padding-top: clamp(2rem, 9vh, 6rem);
  gap: 0;
}
.auth-page > * + * { margin-top: 0; }
.auth-page .page-header {
  min-height: 22rem;
  align-content: end;
  padding: 2rem;
  border: 0;
  border-top: 5px solid var(--brand-600);
  background: var(--surface-subtle);
}
.auth-page .form-card {
  display: grid;
  align-content: center;
  border: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.orientation-heading { max-width: 48rem; text-align: left; }
.orientation-heading h1 { font-size: var(--hero-title-size); }
.orientation-heading p { font-family: var(--font-sans); font-size: .9rem; }
.orientation-card { border-radius: 1px; box-shadow: none; }
.orientation-progress { background: var(--surface-subtle); }
.orientation-progress progress,
.orientation-progress progress::-webkit-progress-bar,
.orientation-progress progress::-webkit-progress-value,
.orientation-progress progress::-moz-progress-bar { border-radius: 0; }
.orientation-progress progress::-webkit-progress-value,
.orientation-progress progress::-moz-progress-bar { background: var(--brand-600); }
.orientation-copy h2 { font-size: clamp(1.5rem, 2.7vw, 2.15rem); }
.orientation-copy > p { font-family: var(--font-sans); font-size: .96rem; }
.orientation-step:not([hidden]) { animation: orientation-step-in 120ms ease-out both; }
@keyframes orientation-step-in { from { opacity: 0; transform: translateY(.15rem); } }
.orientation-points li { border-bottom: 1px solid var(--border); padding-bottom: .65rem; }
.orientation-points li > span, .orientation-checklist li::before {
  border: 1px solid var(--brand-600);
  border-radius: 1px;
  background: transparent;
}
.orientation-visual {
  border: 2px solid var(--border-strong);
  border-radius: 1px;
  background: var(--surface);
  box-shadow: none;
}
.orientation-app-mark { border-radius: 1px; }
.orientation-flow-card {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}
.orientation-flow-card::before { border-radius: 1px; }
.orientation-mini-column {
  border: 0;
  border-top: 4px solid var(--border-strong);
  border-radius: 0;
  background: transparent;
}
.orientation-mini-column.active { border-top-color: #3157a3; }
.orientation-mini-column.complete { border-top-color: #2f6b4f; }
.orientation-mini-column i {
  display: grid;
  height: 2.6rem;
  place-items: center start;
  padding: .45rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--faint);
  border-radius: 0;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .56rem;
  font-style: normal;
}
.orientation-detail-grid { margin: 1rem 0; }
.orientation-detail-grid > div {
  min-height: 3.25rem;
  padding: .55rem;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}
.orientation-detail-grid dt { color: var(--muted); font-size: .55rem; letter-spacing: .06em; text-transform: uppercase; }
.orientation-detail-grid dd { margin: .18rem 0 0; color: var(--text); font-family: var(--font-sans); font-size: .68rem; }
.orientation-activity-preview { border-radius: 0; }
.orientation-activity-preview span { height: 1px; border-radius: 0; }
.orientation-calendar-days i {
  display: block;
  padding: .28rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .52rem;
  font-style: normal;
}
.orientation-calendar-days b { border-radius: 1px; }
.orientation-ready-check {
  width: 4.2rem;
  height: 4.2rem;
  border: 2px solid var(--brand-600);
  border-radius: 1px;
  background: transparent;
  color: var(--brand-600);
  box-shadow: none;
}
.orientation-ready-index {
  display: grid !important;
  width: min(21rem, 80%);
  gap: 0 !important;
  margin-top: 1.25rem !important;
  border-top: 1px solid var(--border);
}
.orientation-ready-index span {
  display: block;
  padding: .35rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .65rem;
  text-align: left;
}
.orientation-actions { background: var(--surface-subtle); }

@media (max-width: 72rem) {
  .maintenance-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .maintenance-primary { grid-template-columns: 1fr; }
}

@media (max-width: 78rem) {
  .filter-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter-bar .search-field { grid-column: span 2; }
  .filter-actions { grid-column: span 2; justify-content: flex-end; }
  .audit-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .audit-search { grid-column: span 2; }
}

@media (min-width: 52.001rem) {
  .sidebar {
    overflow: hidden;
    visibility: visible;
    opacity: 1;
    transition: width 180ms ease, flex-basis 180ms ease, border-color 180ms ease, opacity 120ms ease, visibility 0s;
  }
  .sidebar > * { width: 16.25rem; }
  .sidebar-reveal-rail {
    display: flex;
    width: 0;
    flex: 0 0 0;
    justify-content: center;
    overflow: hidden;
    visibility: hidden;
    border-right: 0 solid transparent;
    background: var(--surface-subtle);
    opacity: 0;
    transition: width 180ms ease, flex-basis 180ms ease, border-color 180ms ease, opacity 120ms ease, visibility 0s linear 180ms;
  }
  .sidebar-show-button { margin-top: 1rem; visibility: hidden; pointer-events: none; }
  :root[data-sidebar-hidden="true"] .sidebar {
    width: 0;
    flex-basis: 0;
    visibility: hidden;
    border-right-width: 0;
    border-color: transparent;
    opacity: 0;
    pointer-events: none;
    transition: width 180ms ease, flex-basis 180ms ease, border-color 180ms ease, opacity 120ms ease, visibility 0s linear 180ms;
  }
  :root[data-sidebar-hidden="true"] .sidebar-reveal-rail {
    width: 3.25rem;
    flex-basis: 3.25rem;
    visibility: visible;
    border-right-width: 1px;
    border-color: var(--border-strong);
    opacity: 1;
    transition-delay: 0s;
  }
  :root[data-sidebar-hidden="true"] .sidebar-hide-button { visibility: hidden; pointer-events: none; }
  :root[data-sidebar-hidden="true"] .sidebar-show-button { visibility: visible; pointer-events: auto; }
}

@media (max-width: 52rem) {
  .sidebar-reveal-rail, .sidebar-hide-button { display: none; }
  .sidebar { position: fixed; inset: 0 auto 0 0; visibility: hidden; transform: translateX(-105%); transition: transform 180ms ease, visibility 0s linear 180ms; box-shadow: 12px 0 30px rgb(15 23 42 / .18); }
  body.nav-open .sidebar { visibility: visible; transform: translateX(0); transition-delay: 0s; }
  .mobile-backdrop { position: fixed; inset: 0; z-index: 50; display: block; visibility: hidden; padding: 0; border: 0; background: rgb(15 23 42 / .45); opacity: 0; pointer-events: none; transition: opacity 180ms ease, visibility 0s linear 180ms; }
  body.nav-open .mobile-backdrop { visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }
  .mobile-header { display: flex; height: 3.5rem; flex: 0 0 3.5rem; align-items: center; justify-content: space-between; padding: 0 .8rem; border-bottom: 1px solid var(--border-strong); background: var(--surface-subtle); }
  .mobile-brand { display: flex; min-width: 0; align-items: center; gap: .45rem; }
  .mobile-brand img { display: block; width: auto; max-width: 2.75rem; height: 1.55rem; object-fit: contain; }
  .mobile-header strong { font-family: var(--font-sans); font-size: .92rem; font-weight: 680; }
  .main-content { padding: 1rem; }
  .page-header { flex-direction: column; }
  .page-actions { justify-content: flex-start; }
  .auth-page { display: grid; grid-template-columns: 1fr; padding-top: 1rem; }
  .auth-page .page-header { min-height: 10rem; padding: 1.25rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .kanban-grid { grid-template-columns: 1fr; overflow-x: visible; }
  .kanban-column { min-height: auto; }
  .kanban-footer { align-items: flex-start; flex-direction: column; }
  .kanban-footer-actions { width: 100%; justify-content: space-between; }
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-search { grid-column: 1 / -1; }
  .filter-bar .search-field { grid-column: 1 / -1; }
  .status-panel { align-items: flex-start; flex-direction: column; }
  .settings-setting-row { grid-template-columns: 1fr; gap: .75rem; }
  .settings-setting-control, .account-inline-meta { justify-self: start; }
  .settings-setting-control, .settings-inline-control, .theme-fieldset, .theme-options { width: 100%; }
  .account-inline-meta { flex-wrap: wrap; }
  .organization-branding-body { grid-template-columns: 1fr; }
  .orientation-step { min-height: 0; grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
  .orientation-stage { min-height: 0; }
  .orientation-visual { min-height: 15rem; }
  .orientation-board-visual { min-height: 18rem; }
  .orientation-actions { position: sticky; bottom: 0; z-index: 2; }
  .mobile-board-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; background: transparent; }
  .mobile-board-tabs button { min-height: 2.75rem; padding: .45rem; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: .7rem; font-weight: 650; cursor: pointer; }
  .mobile-board-tabs button.active { border-bottom-color: var(--brand-600); background: transparent; color: var(--text); box-shadow: none; }
  .kanban-column[hidden] { display: none; }
  .board-help { display: none; }
  .work-card { padding: .8rem; }
  .work-card .card-description { -webkit-line-clamp: 2; }
  .schedule-origin-card { align-items: flex-start; flex-direction: column; }
  .photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .8rem; }
  .photo-upload-form { align-items: stretch; flex-direction: column; }
  .photo-upload-form .btn { width: 100%; min-height: 2.75rem; }
  .maintenance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .maintenance-primary { display: flex; flex-direction: column; }
  .maintenance-attention-card { order: 1; width: 100%; }
  .maintenance-calendar-card { order: 2; width: 100%; }
  .mobile-calendar-toggle { display: inline-flex; }
  .maintenance-calendar-card:has([data-calendar-toggle][aria-expanded="false"]) [data-calendar-body] { display: none; }
  .calendar-day { min-height: 4rem; }
  .calendar-event { width: .45rem; height: .45rem; padding: 0; border-radius: 50%; color: transparent; }
  .calendar-agenda-row { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .calendar-agenda-row .badge { grid-column: 2; justify-self: start; }
  .schedule-detail-grid { grid-template-columns: 1fr; }
  .responsive-table { display: block; }
  .mobile-sort-field { display: block; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .responsive-table tbody { display: block; }
  .responsive-table tbody tr { display: grid; grid-template-columns: 1fr; padding: .65rem .8rem; border-bottom: 1px solid var(--border); background: var(--surface); }
  .responsive-table tbody tr:hover { background: transparent; }
  .responsive-table tbody td { display: grid; grid-template-columns: minmax(6.5rem, .38fr) minmax(0, 1fr); align-items: start; gap: .65rem; padding: .42rem 0; border: 0; text-align: left; white-space: normal; }
  .responsive-table tbody td::before { color: var(--muted); content: attr(data-label); font-size: .62rem; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; }
  .responsive-table tbody td[colspan] { display: block; }
  .responsive-table tbody td[colspan]::before { display: none; }
  .responsive-table .row-actions, .responsive-table .inline-form { align-items: stretch; flex-direction: column; }
  .responsive-table .row-actions .btn, .responsive-table .inline-form .btn, .responsive-table .compact-select { width: 100%; min-height: 2.75rem; }
  .report-mobile-summary { display: grid; gap: .65rem; padding: .75rem 0; }
  .report-table-wrap { display: none; }
  .btn, .input, .select, .icon-button, .card-action, .btn-link { min-height: 2.75rem; }
  .btn-sm { min-height: 2.75rem; }
  .main-content { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
}

@media (max-width: 36rem) {
  .form-grid, .filter-bar, .audit-filter-bar { grid-template-columns: 1fr; }
  .form-grid .full, .filter-bar .search-field, .filter-actions { grid-column: auto; }
  .filter-actions { justify-content: stretch; }
  .filter-actions > * { flex: 1; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .alert { align-items: flex-start; flex-direction: column; }
  .table-footer { align-items: flex-start; flex-direction: column; }
  .theme-options, .password-grid { grid-template-columns: 1fr; }
  .theme-option + .theme-option { border-top: 1px solid var(--border-strong); border-left: 0; }
  .settings-setting-row { padding: .8rem; }
  .settings-inline-control { align-items: stretch; flex-direction: column; }
  .settings-inline-control label, .settings-inline-control .btn { width: 100%; }
  .settings-users-header { align-items: stretch; flex-direction: column; }
  .settings-users-header .btn { width: 100%; }
  .organization-branding-controls { align-items: stretch; flex-direction: column; }
  .organization-branding-controls .btn { width: 100%; min-height: 2.75rem; }
  .password-current, .password-actions { grid-column: auto; }
  .orientation-settings-action .btn { width: 100%; }
  .orientation-heading { text-align: left; }
  .orientation-progress { align-items: stretch; flex-direction: column; gap: .45rem; }
  .orientation-progress > div { width: 100%; min-width: 0; }
  .orientation-step { padding: 1.2rem; }
  .orientation-visual { min-height: 13rem; }
  .orientation-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orientation-actions > .btn:first-child { width: 100%; margin-right: 0; }
  .orientation-actions form, .orientation-actions form .btn, .orientation-actions > .btn { width: 100%; }
  .export-menu, .export-menu > summary { width: 100%; }
  .export-menu-panel { right: auto; left: 0; width: min(17rem, 100%); }
  .board-notes-overview, .board-note-actions { align-items: flex-start; flex-direction: column; }
  .board-note-actions .btn { width: 100%; }
  .contractor-options-fields { grid-template-columns: 1fr; }
  .audit-search { grid-column: auto; }
  .maintenance-summary { grid-template-columns: 1fr 1fr; }
  .maintenance-summary .summary-stat:last-child { grid-column: 1 / -1; }
  .maintenance-agenda-item { align-items: flex-start; flex-direction: column; }
  .agenda-actions { width: 100%; align-items: stretch; }
  .agenda-actions .btn { width: 100%; }
  .calendar-header { align-items: flex-start; flex-direction: column; }
  .calendar-controls { width: 100%; justify-content: flex-start; }
  .calendar-day { min-height: 3.1rem; padding: .3rem; }
  .calendar-weekdays span { padding-inline: .1rem; }
  .calendar-agenda-row { grid-template-columns: 1fr; gap: .25rem; }
  .calendar-agenda-row .badge { grid-column: auto; }
  .form-grid-fieldset { grid-template-columns: 1fr; }
  .form-grid-fieldset .full { grid-column: auto; }
  .maintenance-status-actions { flex-direction: column; }
  .maintenance-status-actions form { flex-basis: auto; }
  .photo-gallery { grid-template-columns: 1fr; }
  .photo-picker { align-items: stretch; flex-direction: column; }
  .photo-picker-button .btn { width: 100%; min-height: 2.75rem; }
}

@page { size: landscape; margin: .35in; }
@media print {
  :root { color-scheme: light; }
  body { background: white !important; color: #111827 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sidebar, .mobile-header, .no-print, .toast-region { display: none !important; }
  .app-shell, .main-column, .main-content { display: block; height: auto; overflow: visible; padding: 0; background: white; }
  .page-layout > * + * { margin-top: 0; }
  .print-report { width: 100%; }
  .report-header { break-after: avoid; }
  .report-table-wrap { display: block; overflow: visible; }
  .report-table { table-layout: auto; }
  .report-table thead { display: table-header-group; }
  .report-table tr { break-inside: avoid; }
  .report-table th, .report-table td { padding: .28rem .32rem; font-size: 6.5pt; }
  .report-description { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
