.duties-page {
    --duty-surface: #fff;
    --duty-soft: #f3f7fb;
    --duty-ink: #172b3a;
    --duty-muted: #526777;
    --duty-border: #dce4e8;
    --duty-accent: #084fb9;
    padding-block-end: clamp(32px, 5vw, 56px);
    color: var(--duty-ink);
    font-family: Inter, sans-serif;
}

[data-theme="dark"] .duties-page {
    --duty-surface: #182b3c;
    --duty-soft: #20364a;
    --duty-ink: #e4edf5;
    --duty-muted: #afc0cf;
    --duty-border: #30495e;
    --duty-accent: #9ac4ff;
}

.duties-list {
    display: grid;
    gap: clamp(14px, 2vw, 22px);
}

.duties-page :is(.duty-card, .duties-empty-state) {
    min-width: 0;
    padding: clamp(16px, 3vw, 30px);
    border: 1px solid var(--duty-border);
    border-radius: 16px;
    background: var(--duty-surface);
    overflow-wrap: anywhere;
}

.duties-page .duty-card h2 {
    margin: 0;
    color: var(--duty-ink);
    font: 700 clamp(1.125rem, 2vw, 1.375rem)/1.4 Sora, sans-serif;
}

.duty-content {
    display: grid;
    align-items: start;
    gap: clamp(16px, 3vw, 32px);
    margin-block-start: 16px;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--duty-border);
}

.duty-content > section { min-width: 0; }

.duty-summary {
    padding: clamp(12px, 2vw, 18px);
    border-radius: 10px;
    background: var(--duty-soft);
}

.duties-page .duty-content h3 {
    margin: 0 0 8px;
    color: var(--duty-accent);
    font: 600 .9375rem/1.45 Sora, sans-serif;
}

.duties-page :is(.duty-summary p, .duty-richtext, .duties-empty) {
    margin: 0;
    color: var(--duty-muted);
    font-size: .9375rem;
    line-height: 1.7;
}

.duty-summary p { white-space: pre-line; }
.duties-page .duty-card > .duties-empty { margin-block-start: 12px; }

.duty-richtext { display: flow-root; }
.duty-richtext p { margin: 0 0 .75em; color: inherit; font: inherit; }
.duty-richtext > :last-child { margin-block-end: 0; }
.duty-richtext font { color: inherit; font: inherit; }
.duty-richtext :is(ul, ol) { margin: 0 0 .75em; padding-inline-start: 1.45em; }
.duty-richtext ul { list-style: disc; }
.duty-richtext ol { list-style: decimal; }
.duty-richtext li + li { margin-block-start: .45em; }
.duty-richtext li::marker { color: var(--duty-accent); }
.duty-richtext li > :is(ul, ol) { margin: .4em 0 0; }
.duty-richtext li > p:last-child { margin-block-end: 0; }
.duty-richtext a { color: var(--duty-accent); text-decoration: underline; text-underline-offset: 3px; }
.duty-richtext a:focus-visible { outline: 2px solid var(--duty-accent); outline-offset: 3px; }
.duty-richtext :is(img, iframe, video, audio, object, embed) { max-width: 100%; }
.duty-richtext img { height: auto; }
.duty-richtext table { display: block; max-width: 100%; overflow-x: auto; }

@media (min-width: 768px) {
    .duty-content:has(.duty-summary + .duty-functions) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
    }
}
