:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f7f8;
    color: #18313e;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 20rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #17675d;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: .2rem solid #e09d2f;
    outline-offset: .2rem;
}

.skip-link {
    position: fixed;
    z-index: 20;
    left: 1rem;
    top: 1rem;
    padding: .75rem 1rem;
    border-radius: .5rem;
    background: #102f3d;
    color: white;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header,
.site-nav,
.site-footer,
.page-shell {
    width: min(74rem, calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1.25rem;
}

.site-header p {
    margin: 0;
    color: #526a75;
}

.session-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .9rem;
}

.session-actions form {
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #17675d;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: #18313e;
    font-weight: 800;
    letter-spacing: .04em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: .55rem;
    background: #17675d;
    color: white;
}

.site-nav {
    display: flex;
    gap: .4rem;
    padding: .45rem;
    overflow-x: auto;
    border: 1px solid #d4dfe3;
    border-radius: .8rem;
    background: white;
}

.site-nav a,
.site-nav span {
    flex: 0 0 auto;
    padding: .6rem .8rem;
    border-radius: .5rem;
    text-decoration: none;
}

.site-nav a[aria-current="page"] {
    background: #e4f2ef;
    font-weight: 700;
}

.site-nav span {
    color: #71838b;
}

.page-shell {
    flex: 1;
    padding-block: 2rem 4rem;
}

.hero {
    padding: clamp(1.5rem, 4vw, 3.5rem);
    border-radius: 1.2rem;
    background: linear-gradient(135deg, #143c4d, #17675d);
    color: white;
}

.hero h1,
.error-page h1 {
    margin-block: .35rem 1rem;
    font-size: clamp(2.1rem, 6vw, 4.4rem);
    line-height: 1;
}

.lead {
    max-width: 47rem;
    font-size: 1.15rem;
    line-height: 1.65;
}

.eyebrow,
.module-code,
.error-status {
    margin: 0;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem 2rem;
    margin-top: 2rem;
}

.meta-list div {
    display: grid;
    gap: .25rem;
}

.meta-list dt {
    font-size: .8rem;
    opacity: .75;
}

.meta-list dd {
    margin: 0;
    font-weight: 700;
}

.status-chip {
    display: inline-block;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: #dff5e9;
    color: #174d3b;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-block: 3rem 1rem;
}

.section-heading h2 {
    margin: .3rem 0 0;
}

.section-heading > p {
    max-width: 34rem;
    color: #526a75;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.module-grid li {
    padding: 1.25rem;
    border: 1px solid #d4dfe3;
    border-radius: .8rem;
    background: white;
}

.module-grid h3 {
    margin-block: .55rem .35rem;
}

.module-grid p {
    margin: 0;
    color: #526a75;
    line-height: 1.5;
}

.build-note {
    margin-top: 2rem;
    color: #526a75;
}

.error-page {
    max-width: 48rem;
    padding-top: clamp(3rem, 10vh, 8rem);
}

.error-page .error-status {
    color: #9c3b35;
}

.error-page .meta-list {
    padding: 1rem;
    border: 1px solid #d4dfe3;
    border-radius: .8rem;
    background: white;
}

.button {
    display: inline-block;
    margin-top: 1.5rem;
    padding: .75rem 1rem;
    border-radius: .55rem;
    background: #17675d;
    color: white;
    font-weight: 700;
    text-decoration: none;
}

button.button {
    border: 0;
    cursor: pointer;
}

.auth-body {
    display: grid;
    place-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #102f3d, #17675d);
}

.auth-shell {
    width: min(100%, 28rem);
}

.auth-card,
.panel {
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid #d4dfe3;
    border-radius: 1rem;
    background: white;
}

.auth-card h1,
.narrow-page h1,
#users-title {
    margin-block: .4rem .8rem;
}

.auth-card .brand-mark {
    margin-bottom: 1rem;
}

.form-stack {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-stack .button {
    margin-top: .25rem;
}

.field {
    display: grid;
    gap: .35rem;
}

.field label {
    font-weight: 700;
}

.field input,
.field select {
    width: 100%;
    padding: .72rem .8rem;
    border: 1px solid #9bafb8;
    border-radius: .5rem;
    background: white;
    color: #18313e;
    font: inherit;
}

.notice {
    margin-block: 1rem;
    padding: .8rem 1rem;
    border-left: .3rem solid #17675d;
    border-radius: .35rem;
    background: #e4f2ef;
}

.notice-error,
.field-error {
    color: #7f2925;
}

.notice-error {
    border-left-color: #9c3b35;
    background: #fbe9e7;
}

.field-error {
    margin: 0;
    font-size: .9rem;
}

.narrow-page {
    width: min(42rem, calc(100% - 2rem));
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(18rem, 25rem) minmax(25rem, 1fr);
    gap: 1rem;
    align-items: start;
    margin-top: 1.5rem;
}

.table-panel {
    overflow-x: auto;
}

.compact-lead {
    max-width: 54rem;
    color: #526a75;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: .75rem;
    margin-block: 1.5rem;
}

.summary-grid div {
    padding: 1rem;
    border: 1px solid #d4dfe3;
    border-radius: .7rem;
    background: white;
}

.summary-grid dt {
    color: #526a75;
    font-size: .8rem;
}

.summary-grid dd {
    margin: .3rem 0 0;
    font-size: 1.6rem;
    font-weight: 800;
}

.policy-table {
    margin-top: 1rem;
}

.table-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.table-actions form {
    margin: 0;
}

.button-compact {
    margin: 0;
    padding: .5rem .7rem;
    white-space: nowrap;
}

.button-secondary {
    background: #31576a;
}

.legacy-row {
    background: #f7eee0;
    color: #6b4b22;
}

.workforce-layout {
    display: grid;
    grid-template-columns: minmax(30rem, 1.15fr) minmax(24rem, .85fr);
    gap: 1rem;
    align-items: start;
    margin-top: 1rem;
}

.inline-form,
.form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: end;
}

.inline-form label,
.form-grid label,
.panel > form label {
    display: grid;
    gap: .3rem;
    font-weight: 700;
}

.inline-form input,
.inline-form select,
.form-grid input,
.form-grid select,
.panel > form input,
.panel > form select,
td input {
    max-width: 100%;
    padding: .55rem;
    border: 1px solid #9bafb8;
    border-radius: .4rem;
    font: inherit;
}

.check-label {
    display: flex !important;
    align-items: center;
}

.preference-card {
    margin-block: .65rem;
    padding: .75rem;
    border-left: .25rem solid #17675d;
    background: #f4f7f8;
}

.preference-card p {
    margin-block: .35rem;
}

.create-panel {
    margin-top: 1rem;
}

.wide-shell {
    width: min(96rem, calc(100% - 1.5rem));
    max-width: none;
}

.documentation-page {
    width: min(82rem, calc(100% - 2rem));
}

.documentation-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 24rem);
    gap: 2rem;
    align-items: end;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: 1.2rem;
    background: linear-gradient(135deg, #143c4d, #17675d);
    color: white;
}

.documentation-hero h1 {
    max-width: 46rem;
    margin-block: .35rem .75rem;
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: 1.05;
}

.documentation-hero .lead {
    margin-bottom: 0;
}

.documentation-callout {
    display: grid;
    gap: .4rem;
    padding: 1rem;
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: .75rem;
    background: rgb(255 255 255 / 10%);
}

.documentation-callout span {
    line-height: 1.5;
}

.documentation-layout {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
}

.documentation-index {
    min-width: 0;
    position: sticky;
    top: 1rem;
    padding: 1rem;
    border: 1px solid #d4dfe3;
    border-radius: .8rem;
    background: white;
}

.documentation-index ol {
    display: grid;
    gap: .45rem;
    margin-block: .8rem 1rem;
    padding-left: 1.35rem;
}

.documentation-content {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.manual-section {
    scroll-margin-top: 1rem;
    min-width: 0;
    padding: clamp(1.2rem, 3vw, 2rem);
    border: 1px solid #d4dfe3;
    border-radius: .9rem;
    background: white;
}

.manual-section h2 {
    margin-block: .25rem 1rem;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.manual-section h3 {
    margin-block: 1.3rem .55rem;
}

.manual-section p,
.manual-section li,
.manual-section dd {
    line-height: 1.6;
}

.manual-section li + li {
    margin-top: .4rem;
}

.manual-step {
    margin: 0;
    color: #17675d;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.manual-note {
    margin-top: 1rem;
    padding: .8rem 1rem;
    border-left: .3rem solid #d28a1c;
    border-radius: .4rem;
    background: #fff7e6;
    line-height: 1.55;
}

.manual-grid,
.manual-definitions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-block: 1rem;
}

.manual-grid > div,
.manual-definitions > div {
    display: grid;
    gap: .35rem;
    padding: .9rem;
    border-radius: .6rem;
    background: #f4f7f8;
}

.manual-grid span,
.manual-definitions dd {
    margin: 0;
    color: #526a75;
}

.manual-definitions dt {
    font-weight: 800;
}

.workflow-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: .75rem;
    padding: 0;
    counter-reset: workflow;
    list-style: none;
}

.workflow-list li {
    display: grid;
    gap: .35rem;
    margin: 0;
    padding: 1rem;
    border-top: .25rem solid #17675d;
    border-radius: .55rem;
    background: #f4f7f8;
}

.workflow-list span {
    color: #526a75;
}

.manual-table {
    min-width: 42rem;
}

.manual-legend {
    margin-block: 1rem;
}

.manual-section > details {
    padding: .75rem 0;
    border-bottom: 1px solid #d4dfe3;
}

.manual-section > details summary {
    color: #17675d;
    font-weight: 800;
    cursor: pointer;
}

.manual-section > details p {
    margin-bottom: 0;
}

.manual-checklist {
    border-color: #17675d;
    background: #edf8f4;
}

.period-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
    gap: 1rem;
    align-items: start;
}

.compact-heading {
    margin-bottom: .75rem;
}

.status-pill,
.shift-code {
    display: inline-block;
    border-radius: 999px;
    padding: .2rem .55rem;
    background: #d9ede8;
    color: #124f48;
    font-weight: 700;
}

.danger-link {
    color: #9b2c2c;
}

.non-workday {
    background: #fff7e6;
}

.matrix-scroll {
    max-width: 100%;
    overflow: auto;
    border: 1px solid #d4dfe3;
}

.shift-matrix {
    width: max-content;
    min-width: 100%;
    font-size: .85rem;
}

.shift-matrix th,
.shift-matrix td {
    min-width: 2.7rem;
    padding: .4rem;
    text-align: center;
}

.shift-matrix .sticky-column {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 11rem;
    background: white;
    text-align: left;
}

.shift-matrix thead .sticky-column {
    z-index: 2;
}

.shift-matrix small {
    display: block;
    font-weight: 400;
}

.matrix-action {
    display: inline;
}

.mini-action {
    margin-left: .15rem;
    font-weight: 800;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: .75rem;
    margin-block: 1rem;
}

.metric-grid article {
    display: grid;
    gap: .2rem;
    padding: 1rem;
    border: 1px solid #d4dfe3;
    border-radius: .75rem;
    background: white;
}

.metric-grid strong {
    color: #124f48;
    font-size: 1.7rem;
}

.detail-list div {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) 3fr;
    gap: 1rem;
    padding-block: .4rem;
}

.detail-list dt,
.verdict {
    font-weight: 800;
}

.detail-list dd {
    margin: 0;
}

.checksum {
    overflow-wrap: anywhere;
    font-family: monospace;
}

.verdict-ok {
    color: #126356;
}

.verdict-error {
    color: #9b2c2c;
}

table {
    width: 100%;
    border-collapse: collapse;
}

caption {
    margin-bottom: .75rem;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: left;
}

th,
td {
    padding: .7rem;
    border-bottom: 1px solid #d4dfe3;
    text-align: left;
}

.site-footer {
    padding-block: 1rem 2rem;
    color: #526a75;
    font-size: .9rem;
}

.daily-heading,
.daily-toolbar,
.daily-actions,
.daily-block-header,
.daily-position > header,
.assigned-person,
.pending-panel li,
.alerts-panel li {
    display: flex;
    gap: .75rem;
}

.daily-heading,
.daily-toolbar,
.daily-block-header,
.daily-position > header {
    align-items: center;
    justify-content: space-between;
}

.daily-heading h1,
.daily-block-header h2,
.daily-position h3 {
    margin-block: .25rem;
}

.daily-summary,
.block-metrics {
    display: flex;
    gap: .6rem;
    margin: 0;
}

.daily-summary div,
.block-metrics div {
    min-width: 5rem;
    padding: .65rem;
    border: 1px solid #d4dfe3;
    border-radius: .65rem;
    background: white;
    text-align: center;
}

.daily-summary dt,
.block-metrics dt {
    color: #526a75;
    font-size: .72rem;
    text-transform: uppercase;
}

.daily-summary dd,
.block-metrics dd {
    margin: .15rem 0 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.daily-toolbar {
    margin-top: 1rem;
    padding: .75rem;
}

.date-selector,
.daily-actions {
    display: flex;
    align-items: end;
    gap: .6rem;
}

.date-selector label {
    font-weight: 800;
}

.date-selector input {
    padding: .5rem;
    border: 1px solid #9bafb8;
    border-radius: .4rem;
    font: inherit;
}

.daily-actions {
    flex-wrap: wrap;
    margin-block: .75rem;
}

.daily-actions form {
    margin: 0;
}

.daily-actions a:not(.button) {
    padding: .45rem 0;
}

.daily-back {
    margin-block: .75rem;
}

.service-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
}

.daily-service-legend {
    margin-bottom: .8rem;
    padding: .65rem .8rem;
    border: 1px solid #d4dfe3;
    border-radius: .7rem;
    background: white;
}

.daily-service-legend small {
    margin-left: auto;
    color: #526a75;
}

.service-legend span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .22rem .5rem;
    border-radius: 999px;
    background: var(--legend-bg, #edf3f5);
    color: var(--legend-color, #18313e);
    font-size: .75rem;
    font-weight: 800;
}

.service-legend span::before {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--legend-accent, #607d8b);
    content: "";
}

.legend-door,
.service-door {
    --legend-accent: #2368a2;
    --legend-bg: #e8f2fb;
    --legend-color: #164c78;
}

.legend-radiology,
.service-radiology {
    --legend-accent: #6a4c93;
    --legend-bg: #f0eafa;
    --legend-color: #4e3574;
}

.legend-plants,
.service-plants {
    --legend-accent: #2f855a;
    --legend-bg: #e8f6ee;
    --legend-color: #205f40;
}

.legend-emergency,
.service-emergency {
    --legend-accent: #c05621;
    --legend-bg: #fff0e7;
    --legend-color: #8b3d16;
}

.legend-maternity,
.service-maternity {
    --legend-accent: #b83280;
    --legend-bg: #fbeaf4;
    --legend-color: #81245b;
}

.legend-reinforcement,
.service-reinforcement {
    --legend-accent: #a06b00;
    --legend-bg: #fff5d6;
    --legend-color: #704b00;
}

.legend-supervisor,
.service-supervisor {
    --legend-accent: #3d5966;
    --legend-bg: #e9eff2;
    --legend-color: #2b414b;
}

.daily-board-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.daily-block {
    min-width: 0;
}

.daily-block-header,
.pending-panel,
.alerts-panel {
    margin-bottom: .8rem;
    padding: .75rem;
    border: 1px solid #d4dfe3;
    border-radius: .8rem;
    background: white;
}

.daily-position-list {
    display: grid;
    gap: .45rem;
    margin-bottom: .8rem;
}

.daily-position {
    min-width: 0;
    padding: .65rem;
    border: 1px solid #d4dfe3;
    border-left: .35rem solid var(--legend-accent, #607d8b);
    border-radius: .7rem;
    background: white;
}

.daily-position.is-vacant {
    background: #fff8f7;
    box-shadow: inset 0 0 0 1px #d98982;
}

.position-code {
    color: var(--legend-color, #17675d);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .06em;
}

.daily-position h3 {
    font-size: 1rem;
    line-height: 1.2;
}

.position-service {
    display: block;
    color: #526a75;
    font-size: .72rem;
}

.vacancy-pill {
    background: #fbe0dd;
    color: #7f2925;
}

.assigned-person {
    align-items: flex-start;
    flex-direction: column;
    gap: .18rem;
    margin-block: .45rem;
    padding: .5rem;
    border-radius: .5rem;
    background: var(--legend-bg, #f4f7f8);
    font-size: .82rem;
}

.assigned-person strong {
    font-size: .9rem;
}

.daily-position details {
    margin-top: .4rem;
    color: #526a75;
    font-size: .78rem;
}

.daily-position details summary {
    color: #17675d;
    font-weight: 700;
    cursor: pointer;
}

.daily-position details p {
    margin-block: .4rem;
}

.position-action {
    display: inline-block;
    margin-top: .35rem;
    font-size: .78rem;
    font-weight: 700;
}

.row-alerts,
.pending-panel ul,
.alerts-panel ul {
    display: grid;
    gap: .5rem;
    padding: 0;
    list-style: none;
}

.row-alerts li,
.pending-panel li,
.alerts-panel li {
    padding: .45rem;
    border-radius: .45rem;
    background: #f4f7f8;
}

.pending-panel li,
.alerts-panel li {
    align-items: flex-start;
    flex-direction: column;
}

.pending-panel h3,
.alerts-panel h3 {
    margin-block: 0 .35rem;
    font-size: .95rem;
}

.pending-panel > p {
    margin-block: .25rem .6rem;
    color: #526a75;
    font-size: .78rem;
}

.pending-panel ul,
.alerts-panel ul {
    margin-block: .5rem 0;
}

.pending-panel li,
.alerts-panel li {
    font-size: .78rem;
}

.severity-error,
.severity-critical {
    border-left: .25rem solid #9c3b35;
    background: #fbe9e7 !important;
}

.severity-warning,
.severity-warn {
    border-left: .25rem solid #d28a1c;
    background: #fff7e6 !important;
}

.dashboard-filters,
.history-filters,
.dashboard-actions,
.history-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .75rem;
}

.dashboard-filters label,
.history-filters label {
    display: grid;
    gap: .3rem;
    font-weight: 700;
}

.dashboard-filters select,
.history-filters select,
.history-filters input {
    padding: .55rem;
    border: 1px solid #9bafb8;
    border-radius: .4rem;
    background: white;
    font: inherit;
}

.dashboard-totals .metric-error,
.column-error {
    background: #fbe9e7;
    color: #7f2925;
}

.dashboard-totals .metric-warning,
.column-warning {
    background: #fff7e6;
    color: #6b4b22;
}

.dashboard-actions {
    margin-block: 1rem;
}

.dashboard-actions form,
.dashboard-table form {
    margin: 0;
}

.dashboard-table-panel {
    margin-block: 1rem;
}

.dashboard-table {
    min-width: 68rem;
    font-size: .88rem;
}

.dashboard-table th small {
    display: block;
    max-width: 18rem;
    margin-top: .25rem;
    color: #526a75;
    font-weight: 400;
}

.dashboard-problem {
    border-left: .25rem solid #b84b42;
}

.dashboard-ok {
    border-left: .25rem solid #17675d;
}

.history-count {
    margin-block: 1rem;
}

.history-list {
    display: grid;
    gap: 1rem;
}

.history-event > header {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(28rem, 2fr);
    gap: 1rem;
}

.history-event h2 {
    margin-block: .3rem;
}

.history-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
    margin: 0;
}

.history-meta div {
    min-width: 0;
    padding: .6rem;
    border-radius: .45rem;
    background: #f4f7f8;
}

.history-meta dt {
    color: #526a75;
    font-size: .75rem;
    text-transform: uppercase;
}

.history-meta dd {
    margin: .2rem 0 0;
    overflow-wrap: anywhere;
}

.history-diff {
    margin-top: 1rem;
    table-layout: fixed;
}

.history-diff td {
    overflow-wrap: anywhere;
}

.diff-before {
    background: #fff2f0;
}

.diff-after {
    background: #edf8f4;
}

.history-pagination {
    justify-content: center;
    margin-top: 1.5rem;
}

.closure-checks {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin-block: 1rem;
}

.closure-checks article {
    display: grid;
    gap: .35rem;
    padding: .85rem;
    border: 1px solid #d4dfe3;
    border-radius: .65rem;
}

.closure-checks article span {
    font-size: 1.15rem;
    font-weight: 800;
}

.check-ok,
.status-ok,
.conflict-accepted {
    background: #e8f5f1;
    color: #174f48;
}

.check-error,
.status-error,
.conflict-open {
    background: #fbe9e7;
    color: #7f2925;
}

.closure-snapshot dl,
.print-sheet-header dl {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.closure-snapshot dl div,
.print-sheet-header dl div {
    min-width: 8rem;
    padding: .6rem;
    border-radius: .45rem;
    background: #edf3f5;
}

.closure-snapshot dt,
.print-sheet-header dt {
    color: #526a75;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.closure-snapshot dd,
.print-sheet-header dd {
    margin: .2rem 0 0;
    font-weight: 800;
}

.checksum {
    display: block;
    overflow-wrap: anywhere;
    margin-top: .25rem;
    font-size: .78rem;
}

.conflict-list {
    display: grid;
    gap: .75rem;
}

.conflict-list article {
    padding: 1rem;
    border-left: .3rem solid currentColor;
    border-radius: .55rem;
}

.conflict-list article > header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.conflict-list article > header div {
    display: grid;
    gap: .25rem;
}

.export-buttons {
    display: inline-block;
    margin: .25rem .25rem .25rem 0;
}

.print-sheet-body {
    margin: 0;
    background: #eef3f4;
    color: #172b33;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.print-sheet {
    width: min(112rem, calc(100% - 2rem));
    margin: 1rem auto;
    padding: 1rem;
    background: white;
}

.print-sheet-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: .18rem solid #17675d;
}

.print-help {
    padding: .65rem;
    background: #fff7e6;
}

.print-block-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.print-block {
    min-width: 0;
}

.print-block > header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .75rem;
}

.print-assignment-table {
    width: 100%;
    font-size: .78rem;
}

.print-assignment-table th small {
    display: block;
    color: #526a75;
}

.print-pending,
.print-alerts {
    margin-top: .75rem;
    padding: .6rem;
    border: 1px solid #c9d7dc;
    border-radius: .45rem;
}

.print-pending h3,
.print-alerts h3 {
    margin: 0 0 .4rem;
    font-size: .9rem;
}

.print-pending ul,
.print-alerts ul {
    columns: 2;
    margin: 0;
    padding-left: 1.25rem;
    font-size: .75rem;
}

.print-critical {
    color: #7f2925;
    font-weight: 700;
}

.print-sheet footer {
    margin-top: 1rem;
    padding-top: .5rem;
    border-top: 1px solid #9bafb8;
    color: #526a75;
    font-size: .72rem;
}

@media (min-width: 86rem) {
    .daily-position-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pending-panel ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 64rem) {
    .documentation-hero,
    .documentation-layout {
        grid-template-columns: 1fr;
    }

    .documentation-index {
        position: static;
    }

    .documentation-index ol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .daily-board-grid {
        grid-template-columns: 1fr;
    }

    .daily-service-legend small {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 42rem) {
    .site-header,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header p {
        display: none;
    }

    .session-actions,
    .admin-grid {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .session-actions {
        flex-wrap: wrap;
    }

    .workforce-layout {
        grid-template-columns: 1fr;
    }

    .period-layout {
        grid-template-columns: 1fr;
    }

    .documentation-index ol,
    .manual-grid,
    .manual-definitions {
        grid-template-columns: 1fr;
    }

    .daily-heading,
    .daily-toolbar,
    .daily-block-header,
    .daily-position > header {
        align-items: stretch;
        flex-direction: column;
    }

    .daily-board-grid {
        grid-template-columns: 1fr;
    }

    .date-selector {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .dashboard-filters,
    .history-filters,
    .history-event > header,
    .history-meta {
        grid-template-columns: 1fr;
    }

    .dashboard-filters,
    .history-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .closure-checks,
    .print-block-grid {
        grid-template-columns: 1fr;
    }

    .conflict-list article > header,
    .print-sheet-header,
    .print-block > header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    .skip-link,
    .site-nav,
    .site-header,
    .site-footer,
    .daily-toolbar,
    .daily-actions,
    .daily-back {
        display: none;
    }

    body,
    .hero,
    .module-grid li {
        background: white;
        color: black;
        box-shadow: none;
    }

    .page-shell {
        width: 100%;
        padding: 0;
    }

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

    .daily-position,
    .pending-panel,
    .alerts-panel,
    .history-event {
        break-inside: avoid;
    }

    .dashboard-filters,
    .history-filters,
    .dashboard-actions,
    .history-pagination {
        display: none;
    }

    .print-sheet-body {
        background: white;
    }

    .print-sheet {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .print-help,
    .print-only-screen {
        display: none;
    }

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

    .print-assignment-table,
    .print-pending ul,
    .print-alerts ul {
        font-size: 7pt;
    }
}
