:root {
  --ink: #14221d;
  --muted: #56635d;
  --paper: #eef1ec;
  --white: #ffffff;
  --line: #dfe4dc;
  --green: #a8f06a;
  --green-deep: #2c6750;
  --amber: #f7bc5b;
  --blue: #d8e7ff;
  --red: #b84232;
  --radius: 12px;
  --shadow: 0 12px 28px rgba(20, 34, 29, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Atkinson Hyperlegible", system-ui, sans-serif; font-size: 16px; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #2876d2; outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: white; padding: 12px 18px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; z-index: 20; display: flex; flex-direction: column; padding: 28px 20px 20px; background: #13221d; color: white; }
.brand { display: block; width: 168px; margin: 0 10px 40px; color: white; text-decoration: none; }
.brand-logo { display: block; width: 100%; height: auto; }
.main-nav { display: grid; gap: 6px; }
.nav-item { min-height: 48px; display: flex; align-items: center; gap: 13px; padding: 0 13px; border-radius: 11px; color: #aebcb6; text-decoration: none; font-size: 14px; font-weight: 600; }
.nav-item:hover, .nav-item.active { color: white; background: #263933; }
.nav-item.disabled { cursor: not-allowed; opacity: .72; }
.nav-item.active { box-shadow: inset 3px 0 var(--green); }
.nav-item svg { width: 19px; height: 19px; fill: currentColor; }
.soon { margin-left: auto; color: #97a69f; font-size: 13px; text-transform: uppercase; letter-spacing: .7px; }
.eyebrow, .section-kicker { font-size: 13px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--green-deep); }
.profile { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; margin-top: auto; padding: 16px 8px 0; border-top: 1px solid #30423c; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: var(--ink); font-size: 13px; font-weight: 800; }
.profile strong, .profile small { display: block; }
.profile strong { font-size: 13px; }
.profile small { margin-top: 3px; color: #b4c2bc; font-size: 13px; }
.profile button { color: white; background: transparent; border: 0; cursor: pointer; }
.profile .logout-button { min-height: 32px; padding: 0 10px; border: 1px solid #344841; border-radius: 8px; color: #cfdad5; font-size: 13px; font-weight: 600; }
.profile .logout-button:hover { color: white; background: #263933; }
.profile strong { overflow-wrap: anywhere; }
.profile form { grid-column: 1 / -1; }
.profile .logout-button { width: 100%; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: #13221d; }
.login-card { width: 100%; max-width: 400px; padding: 36px 32px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.login-card .brand { margin: 0 0 28px; color: var(--ink); }
.login-card h1 { margin: 0 0 6px; font: 800 24px/1.2 "Manrope", sans-serif; letter-spacing: -0.01em; }
.login-card .lead { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.login-field { display: grid; gap: 6px; margin-bottom: 16px; }
.login-field label { font-size: 13px; font-weight: 600; }
.login-field input { min-height: 46px; width: 100%; padding: 0 14px; border: 1px solid #b9c3bd; border-radius: 10px; background: white; color: var(--ink); font-size: 15px; }
.login-field input[aria-invalid="true"] { border-color: var(--red); }
.login-error { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #ecc0b9; border-radius: 10px; background: #fff0ed; color: #8a2b1f; font-size: 13px; }
.login-card .primary-button { width: 100%; margin-top: 6px; font-size: 14px; }
.page { grid-column: 2; min-width: 0; }
.topbar { height: 75px; display: flex; justify-content: space-between; align-items: center; padding: 0 clamp(24px, 4vw, 60px); background: rgba(255,255,255,.72); border-bottom: 1px solid var(--line); }
.workspace span, .workspace strong { display: block; }
.workspace span { margin-bottom: 2px; color: var(--muted); font-size: 13px; }
.workspace strong { font-size: 13px; }
.top-actions { display: flex; gap: 8px; }
.icon-button, .mobile-menu { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--ink); cursor: pointer; font-weight: 700; text-decoration: none; }
.notification { position: relative; transform: rotate(-15deg); }
.notification span { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: #ec715e; border: 1px solid white; }
.mobile-menu { display: none; border-radius: 9px; }
.main-content { width: min(1440px, 100%); margin: 0 auto; padding: 38px clamp(24px, 4vw, 60px) 60px; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 30px; }
h1, h2, h3 { font-family: "Manrope", sans-serif; }
.hero-row h1 { margin: 7px 0 6px; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.05; letter-spacing: -0.01em; }
.hero-row p { margin: 0; color: var(--muted); font-size: 14px; }
.primary-button, .secondary-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; border: 0; border-radius: 11px; text-decoration: none; font-size: 13px; font-weight: 700; cursor: pointer; }
.primary-button { color: white; background: var(--ink); box-shadow: 0 7px 18px rgba(20,34,29,.18); }
.primary-button:hover { background: #29453b; transform: translateY(-1px); }
.primary-button span { color: var(--green); font-size: 20px; }
.primary-button.disabled { pointer-events: none; opacity: .45; }
.primary-button:disabled { cursor: not-allowed; color: #3d4a44; background: #dfe4dc; box-shadow: none; transform: none; }
.secondary-button { background: white; border: 1px solid var(--line); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.metric-grid.four-metrics { grid-template-columns: repeat(4, 1fr); }
.metric-card { min-height: 132px; display: grid; grid-template-columns: 43px 1fr; align-content: center; gap: 5px 15px; padding: 24px; background: white; border: 1px solid #e3e7e0; border-radius: var(--radius); }
.metric-card.accent-dark { color: white; background: var(--ink); border-color: var(--ink); }
.metric-icon { grid-row: 1; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--green); color: var(--ink); font-size: 20px; font-weight: 700; }
.metric-icon.amber { background: #fff0d5; color: #9c6511; }
.metric-icon.green { background: #e2f6d1; color: var(--green-deep); }
.metric-card div { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.metric-card div span { color: var(--muted); font-size: 13px; }
.accent-dark div span, .metric-card.accent-dark small { color: #c3cec9; }
.metric-card div strong { font: 800 30px/1 "Manrope"; }
.metric-card small { grid-column: 2; color: var(--muted); font-size: 13px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .7fr); gap: 24px; align-items: start; }
.upload-card { padding: 9px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.drop-zone { min-height: 187px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; border: 1.5px dashed #afbbb3; border-radius: 13px; background: #fbfcf9; text-align: center; cursor: pointer; transition: .2s ease; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--green-deep); background: #f4faed; }
.upload-symbol { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 16px; background: #e6f8d6; }
.upload-symbol svg { width: 30px; fill: none; stroke: var(--green-deep); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone strong { margin-bottom: 4px; font: 700 14px "Manrope"; }
.drop-zone > span:not(.upload-symbol) { color: var(--muted); font-size: 13px; }
.drop-zone u { color: var(--green-deep); font-weight: 700; }
.drop-zone small { margin-top: 14px; color: var(--muted); font-size: 13px; }
.visually-hidden { position: absolute!important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.selected-file { min-height: 100px; display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 15px; padding: 20px; }
.selected-file.with-team { grid-template-columns: 50px 1fr auto auto; }
.upload-team small { margin: 0 0 4px; font-weight: 700; color: var(--ink); }
.upload-team select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); }
.selected-file[hidden] { display: none; }
.selected-file span strong, .selected-file span small { display: block; }
.selected-file span small { color: var(--muted); margin-top: 4px; }
.file-badge, .document-icon { display: grid; place-items: center; background: #ffe5df; color: #a33d2f; font-size: 13px; font-weight: 800; }
.file-badge { width: 46px; height: 52px; border-radius: 8px 14px 8px 8px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 28px 2px 12px; }
.section-heading h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -0.01em; }
.subtle { color: var(--muted); font-size: 13px; }
.document-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.document-filters { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, .65fr) auto auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.dashboard-filters { grid-template-columns: minmax(180px, 1fr) minmax(150px, .55fr) minmax(150px, .55fr) auto auto; }
.document-filters label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.document-filters input, .document-filters select { min-height: 44px; width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); }
.filter-reset { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; color: var(--green-deep); font-size: 13px; font-weight: 700; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.pagination a { color: var(--green-deep); font-weight: 700; }
.document-row { display: grid; grid-template-columns: 42px minmax(150px, 1fr) auto auto; gap: 13px; align-items: center; min-height: 72px; padding: 12px 18px; border-bottom: 1px solid #edf0eb; text-decoration: none; }
.document-row:last-child { border-bottom: 0; }
.document-row:hover { background: #fafbf8; }
.document-icon { width: 40px; height: 46px; border-radius: 7px 12px 7px 7px; }
.document-name strong, .document-name small { display: block; }
.document-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.document-name small { margin-top: 5px; color: var(--muted); font-size: 13px; }
.status { width: fit-content; display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; color: #7f570f; background: #fff2d9; font-size: 13px; font-weight: 700; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-validated { color: #2b6a4b; background: #e6f6dc; }
.status-automatic { color: #3665a0; background: #e4edfb; }
.status-remediation { color: #765119; background: #fff0d5; }
.status-processing { color: #315d94; background: #e4edfb; }
.status-failed { color: #a13e31; background: #fae5e1; }
.row-action { color: var(--green-deep); font-size: 13px; font-weight: 700; white-space: nowrap; }
.row-action.ready { color: var(--ink); }
.empty-state { min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 22px; padding: 30px; }
.empty-state > span { font: 800 40px "Manrope"; color: #d9ded8; }
.empty-state strong { font: 700 14px "Manrope"; }
.empty-state p { max-width: 390px; margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.process-card { position: sticky; top: 24px; overflow: hidden; padding: 29px; border-radius: var(--radius); background: #20342d; color: white; box-shadow: var(--shadow); }
.process-card::after { content: ""; position: absolute; right: -45px; top: -55px; width: 135px; height: 135px; border: 26px solid rgba(168,240,106,.08); border-radius: 50%; }
.section-kicker.light { color: var(--green); }
.process-card h2 { position: relative; margin: 10px 0 27px; font-size: 21px; line-height: 1.35; letter-spacing: -0.01em; }
.process-list { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; }
.process-list li { position: relative; display: flex; gap: 14px; min-height: 68px; color: #93a39d; }
.process-list li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 3px; width: 1px; background: #40534c; }
.process-list li > span { flex: 0 0 29px; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #4c6058; border-radius: 50%; font-size: 13px; font-weight: 700; }
.process-list li.current > span { color: var(--ink); background: var(--green); border-color: var(--green); }
.process-list strong, .process-list small { display: block; }
.process-list strong { color: white; font-size: 13px; }
.process-list small { margin-top: 5px; font-size: 13px; }
.truth-note { display: flex; gap: 12px; margin-top: 17px; padding: 15px; border-radius: 12px; background: #2b4139; }
.truth-note > span { color: var(--green); }
.truth-note p { margin: 0; color: #aebdb7; font-size: 13px; line-height: 1.55; }
.truth-note strong { color: white; }
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.message { padding: 12px 16px; border: 1px solid #b9dba7; border-radius: 10px; background: #eff9e8; font-size: 13px; }
.message.error { border-color: #ecc0b9; background: #fff0ed; }
.message.warning { border-color: #edcf9b; background: #fff8ea; }

/* document detail */
.breadcrumbs { display: flex; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--green-deep); }
.detail-head { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; margin-bottom: 24px; }
.detail-head h1 { max-width: 760px; margin: 11px 0 6px; font-size: clamp(27px, 3vw, 39px); line-height: 1.12; letter-spacing: -0.01em; }
.detail-head p { margin: 0; color: var(--muted); font-size: 13px; }
.detail-actions { display: flex; gap: 9px; }
.danger-button { min-height: 42px; padding: 0 14px; border: 1px solid #d9a69e; border-radius: 9px; background: white; color: var(--red); font-weight: 700; cursor: pointer; }
.danger-button:hover { background: #fff0ed; border-color: var(--red); }
.metadata-panel { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.metadata-panel summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 15px 18px; cursor: pointer; list-style: none; }
.metadata-panel summary::-webkit-details-marker { display: none; }
.metadata-panel summary strong, .metadata-panel summary small { display: block; }
.metadata-panel summary strong { font-size: 13px; }
.metadata-panel summary small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.metadata-panel[open] summary > span:last-child { transform: rotate(45deg); }
.metadata-form { display: grid; grid-template-columns: minmax(140px, .35fr) 1fr; gap: 10px 16px; padding: 4px 18px 18px; border-top: 1px solid var(--line); }
.metadata-form label { align-self: center; font-size: 13px; font-weight: 700; }
.metadata-form input, .metadata-form textarea, .metadata-form select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font: inherit; }
.metadata-form small { grid-column: 2; margin-top: -8px; color: var(--muted); }
.team-note { margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); }
.metadata-form .secondary-button { grid-column: 2; width: fit-content; }
.processing-panel { display: grid; gap: 12px; margin-bottom: 20px; padding: 18px; border: 1px solid #b9d1ec; border-radius: 12px; background: #eef5fd; }
.processing-panel > p { margin: 0; color: var(--muted); font-size: 13px; }
.job-progress { display: grid; grid-template-columns: minmax(160px, .5fr) 1fr; gap: 14px; align-items: center; }
.job-progress span span, .job-progress small { display: block; }
.job-progress small { margin-top: 3px; color: var(--muted); }
.job-progress progress { width: 100%; height: 12px; accent-color: var(--green-deep); }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #e8ebe6; }
.progress-track span { display: block; height: 100%; min-width: 2%; border-radius: inherit; background: var(--green-deep); }
.detail-grid { display: grid; grid-template-columns: minmax(340px, .9fr) minmax(420px, 1.1fr); gap: 22px; align-items: start; }
.section-heading.compact { margin-top: 0; }
.count-pill { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: white; font-size: 13px; }
.issue-card { margin-bottom: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.issue-card.resolved { border-style: dashed; background: #fafbf8; }
.issue-top { display: flex; gap: 7px; align-items: center; }
.issue-category, .critical, .resolved-label { padding: 5px 7px; border-radius: 5px; background: var(--blue); color: #315d94; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.critical { background: #fae5e1; color: #9a2f21; }
.resolved-label { margin-left: auto; background: #e6f6dc; color: var(--green-deep); }
.issue-card h3 { margin: 14px 0 10px; font-size: 15px; line-height: 1.4; }
.issue-card blockquote { margin: 0 0 15px; padding: 12px 14px; border-left: 3px solid var(--amber); background: #f8f8f4; color: #4e5b55; font-size: 13px; line-height: 1.55; }
.decision-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.decision-row button { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.decision-row button:hover { border-color: var(--green-deep); background: #f1f8eb; }
.decision-field { grid-column: 1 / -1; font-size: 13px; font-weight: 700; }
.decision-row select, .decision-row textarea { grid-column: 1 / -1; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.decision-row select + button { grid-column: 1 / -1; }
.decision-row textarea { resize: vertical; }
.resolved-decision { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--green-deep); font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline; }
.success-state { padding: 45px 25px; border: 1px solid #cfe7bf; border-radius: var(--radius); background: #f4faee; text-align: center; }
.success-state > span { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 50%; background: var(--green); font-weight: 800; }
.success-state h3 { font-size: 15px; }
.success-state p { color: var(--muted); font-size: 13px; }
.structure-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 5px 0 0; font-size: 19px; }
.panel-head a { color: var(--green-deep); font-size: 13px; font-weight: 700; }
.page-preview { padding: 14px; border-bottom: 1px solid var(--line); background: #f7f8f4; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.preview-toolbar strong, .preview-toolbar small { display: block; }
.preview-toolbar strong { font-size: 13px; }
.preview-toolbar small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.preview-pagination { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.preview-pagination label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.preview-pagination select, .preview-pagination button { min-height: 34px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); }
.preview-pagination select { min-width: 56px; padding: 0 8px; }
.preview-pagination button { width: 34px; cursor: pointer; }
.preview-pagination button:disabled { cursor: default; opacity: .4; }
.preview-canvas { position: relative; width: min(100%, 520px); min-height: 180px; overflow: hidden; margin: 0 auto; border: 1px solid #cfd5cd; border-radius: 5px; background: white; box-shadow: 0 7px 20px rgba(20,34,29,.08); }
.preview-canvas img { display: block; width: 100%; height: auto; }
.preview-overlays { position: absolute; inset: 0; }
.preview-zone { position: absolute; min-width: 8px; min-height: 8px; padding: 0; border: 2px solid rgba(35,88,63,.7); background: rgba(168,240,106,.18); cursor: pointer; }
.preview-zone:hover, .preview-zone:focus-visible { z-index: 2; border-color: #174c34; background: rgba(168,240,106,.4); }
.preview-zone.zone-figure { border-color: rgba(49,93,148,.8); background: rgba(216,231,255,.25); }
.preview-zone.zone-table { border-color: rgba(156,101,17,.85); background: rgba(247,188,91,.22); }
.preview-zone.zone-artifact { border-style: dashed; border-color: var(--muted); background: rgba(137,149,143,.12); }
.preview-status { min-height: 18px; margin: 7px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.block-list { max-height: 700px; overflow-y: auto; padding: 13px; }
.block-browser { padding: 18px 14px 2px; border-bottom: 1px solid var(--line); }
.block-browser .section-heading { align-items: center; margin-bottom: 12px; }
.block-filters { grid-template-columns: repeat(3, minmax(110px, 1fr)) auto auto; }
.add-block-panel { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf8; }
.add-block-panel summary { padding: 11px 13px; color: var(--green-deep); font-size: 13px; font-weight: 700; cursor: pointer; }
.add-block-form { display: grid; gap: 8px; padding: 0 13px 13px; }
.add-block-form label { font-size: 13px; font-weight: 700; }
.add-block-form select, .add-block-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font: inherit; }
.add-block-form .secondary-button { width: fit-content; }
.content-block { display: block; padding: 0; border-bottom: 1px solid #edf0eb; }
.content-block:last-child { border-bottom: 0; }
.content-block summary { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 13px; cursor: pointer; list-style: none; }
.content-block summary::-webkit-details-marker { display: none; }
.content-block summary > span { width: 35px; height: 26px; display: grid; place-items: center; border-radius: 5px; background: #edf0eb; color: var(--muted); font-size: 13px; font-weight: 800; }
.content-block.type-h1 summary > span, .content-block.type-h2 summary > span, .content-block.type-h3 summary > span { background: #e2f6d1; color: var(--green-deep); }
.content-block small { color: var(--muted); font-size: 13px; }
.content-block p { margin: 5px 0 0; color: #405048; font-size: 13px; line-height: 1.5; }
.type-h1 p, .type-h2 p, .type-h3 p { color: var(--ink); font-family: "Manrope"; font-weight: 700; }
.block-editor { padding: 4px 13px 16px 63px; background: #fafbf8; }
.block-editor > form:first-child { display: grid; gap: 8px; }
.block-editor label { font-size: 13px; font-weight: 700; }
.block-editor select, .block-editor textarea, .block-editor input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font: inherit; resize: vertical; }
.block-editor .secondary-button { width: fit-content; margin-top: 3px; }
.table-scroll { overflow-x: auto; margin: 3px 0; border: 1px solid var(--line); border-radius: 8px; background: white; }
.table-scroll table { min-width: 100%; border-collapse: collapse; }
.table-scroll td { min-width: 150px; padding: 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll tr:last-child td { border-bottom: 0; }
.table-scroll td:last-child { border-right: 0; }
.table-scroll textarea { min-height: 58px; padding: 7px; border: 0; border-radius: 4px; }
.table-editor > .table-scroll { width: 100%; }
.order-actions { display: flex; align-items: center; gap: 8px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.order-actions span { margin-right: auto; color: var(--muted); font-size: 13px; }
.order-actions button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: white; cursor: pointer; }
.block-structure-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 10px; }
.block-structure-actions form { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; }
.block-structure-actions label { width: 100%; }
.block-structure-actions input { width: 120px; }
.block-structure-actions button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: white; cursor: pointer; }
.delete-block-button { margin-top: 10px; color: var(--red); }
.block-links { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.block-links > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.block-links a { overflow-wrap: anywhere; color: var(--green-deep); }
.add-link-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; align-items: end; }
.add-link-form label { grid-row: 1; }
.add-link-form input { grid-row: 2; }
.add-link-form button { grid-row: 2; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: white; cursor: pointer; }
.manual-checks-form { display: grid; gap: 12px; }
.manual-checks-form fieldset { display: grid; grid-template-columns: minmax(180px, .4fr) minmax(180px, .6fr); gap: 8px 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.manual-checks-form legend { padding: 0 5px; font-weight: 700; }
.manual-checks-form label { font-size: 13px; font-weight: 700; }
.manual-checks-form select, .manual-checks-form textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: white; font: inherit; }
.error-panel { margin-bottom: 20px; padding: 18px; border: 1px solid #e9bcb4; border-radius: 12px; background: #fff0ed; }
.error-panel p { margin-bottom: 0; font-size: 13px; }
.validation-panel { display: grid; grid-template-columns: minmax(220px, .7fr) 1.3fr; gap: 25px; align-items: start; margin-bottom: 25px; padding: 20px 22px; border: 1px solid #edcf9b; border-radius: var(--radius); background: #fff8ea; }
.validation-panel h2 { margin: 5px 0 0; font-size: 17px; }
.validation-panel ul, .validation-panel p { margin: 0; padding-left: 18px; color: #4e5b55; font-size: 13px; line-height: 1.6; }
.validation-panel p { padding-left: 0; }
.validation-panel a { color: var(--green-deep); }
.validation-panel li + li { margin-top: 6px; }
.validation-panel .finding-critical strong { color: var(--red); }
.validation-panel .finding-advisory strong { color: #8a5a09; }
.audit-panel { margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.audit-list { list-style: none; margin: 18px 0 0; padding: 0; }
.audit-list li { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding-bottom: 17px; }
.audit-list li:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 0; width: 1px; background: var(--line); }
.audit-marker { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 2px solid white; border-radius: 50%; background: var(--green-deep); box-shadow: 0 0 0 1px var(--green-deep); }
.audit-list strong { font-size: 13px; }
.audit-list p { margin: 3px 0; color: #405048; font-size: 13px; }
.audit-list small { color: var(--muted); font-size: 13px; }
.revision-list { display: grid; gap: 9px; margin: 16px 0 0; padding: 0; list-style: none; }
.revision-list > li { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf8; }
.revision-list strong, .revision-list small { display: block; }
.revision-list small { margin-top: 4px; color: var(--muted); }
.revision-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.detail-actions form { display: flex; }
.more-menu { position: relative; }
.more-menu > summary { list-style: none; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu-items { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 270px; display: grid; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.more-menu-items a, .more-menu-items button { display: block; width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.more-menu-items a:hover, .more-menu-items button:hover { background: var(--paper); }
.more-menu-items form:not(:first-child) { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.more-menu-items .menu-danger { color: var(--red); }
.form-warning { color: #6b4708 !important; font-weight: 600; }
.low-confidence { color: #6b4708; font-weight: 700; }

.next-step { margin-bottom: 25px; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.step-track { display: flex; gap: 6px; margin: 0; padding: 14px 24px; list-style: none; border-bottom: 1px solid var(--line); background: var(--paper); }
.step-track li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.step-track li + li::before { content: ""; width: 32px; height: 1px; margin-right: 4px; background: #b9c3bd; }
.step-track li > span[aria-hidden] { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #b9c3bd; border-radius: 50%; font-size: 13px; }
.step-track li.done { color: var(--green-deep); }
.step-track li.done > span[aria-hidden] { border-color: var(--green-deep); }
.step-track li.current { color: var(--ink); font-weight: 800; }
.step-track li.current > span[aria-hidden] { color: var(--ink); background: var(--green); border-color: var(--green); }
.next-step-body { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 24px; }
.next-step-body h2 { margin: 6px 0 8px; font-size: clamp(21px, 2.2vw, 27px); line-height: 1.2; letter-spacing: -0.01em; }
.next-step-body p { max-width: 720px; margin: 0; color: #2f3d37; font-size: 15px; line-height: 1.55; }
.next-step-body .next-step-hint { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--green-deep); background: #f4faee; }
.next-step-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.next-step-actions .primary-button { min-height: 52px; padding: 0 26px; font-size: 15px; }
.next-step-actions form { display: flex; }
.next-step-progress { padding: 0 24px 20px; }
.next-step-progress p { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.next-step-note { margin: 0; padding: 0 24px 22px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.next-step-note a { color: var(--green-deep); }
.resolved-issues { margin-top: 18px; }
.resolved-issues > summary { padding: 12px 2px; color: var(--green-deep); font-size: 14px; font-weight: 700; cursor: pointer; }
.document-settings { margin-top: 28px; }
.advanced-tools { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.advanced-tools > summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 15px 18px; cursor: pointer; list-style: none; }
.advanced-tools > summary::-webkit-details-marker { display: none; }
.advanced-tools > summary strong, .advanced-tools > summary small { display: block; }
.advanced-tools > summary small { margin-top: 3px; color: var(--muted); }
.advanced-tools[open] > summary > span:last-child { transform: rotate(45deg); }
.advanced-tools > .audit-panel { margin: 0 12px 12px; }

/* one question per screen */
.review-progress { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin-bottom: 20px; font-size: 14px; }
.review-progress > span { font-weight: 700; }
.review-progress a { color: var(--green-deep); font-weight: 700; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); gap: 24px; align-items: start; }
.review-card { padding: 28px; border: 2px solid var(--ink); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.review-card h1 { margin: 14px 0 10px; font-size: clamp(22px, 2.3vw, 29px); line-height: 1.25; letter-spacing: -0.01em; }
.review-card blockquote { margin: 0 0 16px; padding: 14px 16px; border-left: 3px solid var(--amber); background: #f8f8f4; color: #2f3d37; font-size: 15px; line-height: 1.55; }
.review-detected { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.review-why { margin-bottom: 22px; }
.review-why summary { color: var(--green-deep); font-size: 14px; font-weight: 700; cursor: pointer; }
.review-why p { margin: 8px 0 0; padding: 12px 14px; border-radius: 10px; background: #f4faee; color: #2f3d37; font-size: 14px; line-height: 1.6; }
.review-answer { display: grid; gap: 10px; }
.review-answer > label { font-size: 15px; font-weight: 700; }
.review-answer textarea, .review-answer input, .review-answer select { width: 100%; padding: 12px 14px; border: 1px solid #b9c3bd; border-radius: 10px; background: white; color: var(--ink); font: inherit; font-size: 15px; }
.review-answer small { color: var(--muted); }
.review-answer fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.review-answer legend { margin-bottom: 8px; font-size: 15px; font-weight: 700; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; cursor: pointer; }
.choice:hover { border-color: var(--green-deep); }
.choice:has(input:checked) { border: 2px solid var(--green-deep); background: #f4faee; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--green-deep); }
.choice .suggested { color: var(--green-deep); }
.more-choices summary { padding: 6px 2px; color: var(--green-deep); font-size: 14px; font-weight: 700; cursor: pointer; }
.more-choices .choice { margin-top: 8px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.review-actions .primary-button { min-height: 52px; padding: 0 24px; font-size: 15px; }
.review-actions .secondary-button { min-height: 52px; font-size: 14px; }
.review-fixes { flex-direction: column; align-items: stretch; }
.review-fixes button { justify-content: flex-start; text-align: left; line-height: 1.35; padding-top: 10px; padding-bottom: 10px; }
.review-table .table-editor { display: grid; gap: 8px; }
.review-instruction { margin: 0 0 14px; color: #2f3d37; font-size: 15px; line-height: 1.55; }
.review-table .primary-button { width: fit-content; min-height: 52px; margin-top: 6px; padding: 0 24px; font-size: 15px; }
.review-table label { font-size: 14px; font-weight: 700; }
.review-table select, .review-table input, .review-table textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font: inherit; }
.review-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.review-nav a { color: var(--green-deep); font-weight: 700; }
.review-preview { position: sticky; top: 24px; margin: 0; }
.review-page { position: relative; overflow: hidden; border: 1px solid #cfd5cd; border-radius: 6px; background: white; box-shadow: 0 7px 20px rgba(20,34,29,.08); }
.review-page img { display: block; width: 100%; height: auto; }
.review-highlight { position: absolute; margin: -4px; padding: 2px; box-sizing: content-box; border: 2px solid #d9480f; border-radius: 4px; background: transparent; }
.review-preview figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.review-preview figcaption a { color: var(--green-deep); font-weight: 700; }
.review-done { max-width: 640px; margin: 40px auto; padding: 36px; border: 2px solid var(--ink); border-radius: var(--radius); background: white; text-align: center; box-shadow: var(--shadow); }
.review-done-mark { width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: var(--green); font-size: 24px; font-weight: 800; }
.review-done h1 { margin: 0 0 10px; font-size: 27px; }
.review-done p { margin: 0 0 22px; color: #2f3d37; font-size: 15px; line-height: 1.55; }
.review-done-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.review-done-actions form { display: flex; }

/* check the result before approval */
.check-head { max-width: 820px; margin-bottom: 22px; }
.check-head h1 { margin: 8px 0 10px; font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.01em; }
.check-head p { margin: 0; color: #2f3d37; font-size: 15px; line-height: 1.6; }
.check-head a { color: var(--green-deep); font-weight: 700; }
.reader-panel { margin-bottom: 26px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.reader-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.reader-toolbar h2 { margin: 0; font-size: 20px; }
.reader-controls { display: flex; gap: 8px; }
.reader-controls[hidden] { display: none; }
.reader-controls button:disabled { cursor: default; opacity: .5; }
.reader-status { margin: 10px 0 12px; color: var(--muted); font-size: 14px; }
.reader-frame { display: block; width: 100%; height: min(70vh, 640px); border: 1px solid #cfd5cd; border-radius: 10px; background: white; }
.check-form { display: grid; gap: 16px; max-width: 860px; }
.check-form > h2 { margin: 0; font-size: 22px; }
.check-question { display: grid; gap: 10px; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.check-question legend { float: left; width: 100%; margin-bottom: 4px; padding: 0; font: 700 18px/1.35 "Manrope", sans-serif; }
.check-help { margin: 0; color: #2f3d37; font-size: 15px; line-height: 1.55; }
.check-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-notes-label { font-size: 14px; font-weight: 700; }
.check-notes-label span { color: var(--muted); font-weight: 400; }
.check-question textarea { width: 100%; padding: 10px 12px; border: 1px solid #b9c3bd; border-radius: 10px; font: inherit; }
.check-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.check-figures li { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf8; }
.check-figures img { display: block; max-width: 100%; max-height: 180px; margin: 0 auto 8px; }
.check-figures p { margin: 0; font-size: 14px; line-height: 1.5; }
.check-no-image { display: block; padding: 20px; color: var(--muted); text-align: center; }
.check-links { display: grid; gap: 6px; margin: 0; padding-left: 20px; font-size: 14px; }
.check-links span { color: var(--muted); overflow-wrap: anywhere; }
.check-submit { display: grid; gap: 8px; padding: 20px; border: 2px solid var(--ink); border-radius: var(--radius); background: white; }
.check-submit .primary-button { width: fit-content; min-height: 52px; padding: 0 26px; font-size: 15px; }
.check-submit p, .check-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.done-steps { margin: 12px 0 0; padding-left: 22px; color: #2f3d37; font-size: 15px; line-height: 1.6; }

.ocr-pages { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-size: 14px; }
.ocr-pages a { color: var(--green-deep); font-weight: 700; }
.ocr-pages a:last-child { justify-self: end; }
.ocr-text { max-height: 420px; overflow-y: auto; padding: 14px 16px; border: 1px solid #b9c3bd; border-radius: 10px; background: #fbfcf9; font-size: 15px; line-height: 1.6; }
.ocr-text p { margin: 0 0 10px; }
.ocr-fragment.ocr-h1, .ocr-fragment.ocr-h2, .ocr-fragment.ocr-h3 { font-weight: 700; }
.ocr-fragment.ocr-li { padding-left: 14px; }
.text-link { color: var(--green-deep); font-size: 14px; font-weight: 700; }

/* AI assistant */
.ai-badge { display: inline-block; padding: 2px 7px; border-radius: 6px; background: #ece4fb; color: #4b2a8a; font-size: 13px; font-weight: 800; letter-spacing: .3px; vertical-align: middle; }
.ai-note { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid #6c46b5; border-radius: 0 10px 10px 0; background: #f6f2fd; color: #2f2547; font-size: 14px; line-height: 1.55; }
.ai-note small { display: block; margin-top: 3px; color: #4f4566; }
.ai-note-inline { color: #2f2547 !important; }
.memory-note { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 0 0 18px; padding: 12px 16px; border-left: 3px solid #1f7a55; border-radius: 0 10px 10px 0; background: #eef8f2; color: #173d2c; font-size: 14px; line-height: 1.55; }
.memory-note p { margin: 3px 0 0; }
.memory-note a { color: inherit; }
.ai-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; padding: 18px 22px; border: 1px solid #d7c9f2; border-radius: var(--radius); background: #faf8fe; }
.ai-panel h2 { margin: 0 0 6px; font-size: 17px; }
.ai-panel p { margin: 0 0 6px; color: #2f3d37; font-size: 14px; line-height: 1.55; }
.ai-panel small { color: var(--muted); }
.ai-panel a { color: #4b2a8a; font-weight: 700; }
.ai-panel form { flex: 0 0 auto; }
.ai-error { color: #8a2b1f !important; font-weight: 600; }
.team-ai-form { margin-left: auto; }
.document-row .team-ai-form { grid-column: auto; }

/* validation and reporting center */
.validation-hero { margin-bottom: 24px; }
.validation-metrics { grid-template-columns: repeat(4, 1fr); }
.metric-icon.error-icon { background: #fae5e1; color: var(--red); }
.validation-filters { max-width: 850px; }
.validation-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.validation-row { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(105px, .55fr)) auto auto; gap: 18px; align-items: center; padding: 16px 18px; border-bottom: 1px solid #edf0eb; }
.validation-row:last-child { border-bottom: 0; }
.validation-document { min-width: 0; display: flex; align-items: center; gap: 13px; }
.validation-document > div { min-width: 0; }
.validation-document a { color: var(--ink); text-decoration-color: #9cb5a9; text-underline-offset: 3px; }
.validation-document strong, .validation-document small, .validation-result span, .validation-result strong { display: block; }
.validation-document strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.validation-document small, .validation-result span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.validation-result strong { margin-top: 3px; font-size: 13px; }
.compact-button { min-height: 36px; padding: 0 13px; }
.artifact-panel { margin-top: 30px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; scroll-margin-top: 20px; }
.artifact-panel .section-heading { margin-top: 0; }
.artifact-list { display: grid; }
.artifact-list > div { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.artifact-list strong, .artifact-list small { display: block; }
.artifact-list small { margin-top: 3px; color: var(--muted); }
.artifact-list a { flex: 0 0 auto; color: var(--green-deep); font-size: 13px; font-weight: 700; }

/* Czytelność jest częścią produktu dostępnościowego — tekst pomocniczy nie schodzi poniżej 12 px. */
small, .soon, .status, .issue-category, .critical, .resolved-label,
.content-block summary > span, .content-block small, .content-block p,
.decision-row button, .panel-head a, .truth-note p { font-size: 13px; }

/* Strona dokumentu: jedna ścieżka — etap, lista zadań, treść, ustawienia. */
.task-panel { padding: 4px 24px 22px; }
.task-panel h3 { margin: 6px 0 12px; font-size: 16px; }
.task-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.task-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.task-row.is-next { border-color: var(--green-deep); box-shadow: inset 4px 0 var(--green); background: #fbfdf8; }
.task-number { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #b9c3bd; border-radius: 50%; color: var(--muted); font-size: 13px; font-weight: 800; }
.task-row.is-next .task-number { border-color: var(--green); background: var(--green); color: var(--ink); }
.task-main { display: grid; gap: 4px; min-width: 0; }
.task-meta { color: var(--muted); font-size: 13px; }
.task-meta strong { color: var(--green-deep); }
.task-question { font-size: 15px; line-height: 1.4; }
.task-snippet { overflow: hidden; color: #4e5b55; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.task-go { align-self: center; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.task-go:hover { border-color: var(--green-deep); background: #f1f8eb; }
.quick-answer { margin-top: 6px; }
.quick-answer > summary { width: fit-content; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.quick-answer[open] > summary { color: var(--green-deep); font-weight: 700; }
.quick-answer .decision-row { margin-top: 10px; }
.task-extras { display: grid; gap: 4px; padding: 0 24px 18px; }
.task-more > summary { padding: 8px 0; color: var(--green-deep); font-size: 14px; font-weight: 700; cursor: pointer; }
.task-more .issue-card { margin-top: 8px; }
.advisory-list { margin: 4px 0 8px; padding-left: 20px; color: #4e5b55; font-size: 13px; line-height: 1.6; }
.advisory-list a { color: var(--green-deep); }
.next-step .ai-panel { margin: 0; border: 0; border-top: 1px solid #e6dcf7; border-radius: 0; }
.next-step .ai-panel h3 { margin: 0 0 6px; font-size: 15px; }
.content-section { margin-top: 36px; }
.content-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 0 2px 14px; }
.content-intro h2, .settings-intro h2 { margin: 5px 0 6px; font-size: 22px; letter-spacing: -0.01em; }
.content-intro p { max-width: 760px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.content-intro .secondary-button { flex: 0 0 auto; }
.preview-column { position: sticky; top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #f7f8f4; }
.preview-column .page-preview { border-bottom: 0; }
.block-browser h3 { margin: 0; font-size: 16px; }
.block-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.block-tool { flex: 1 1 220px; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: #fafbf8; }
.block-tool > summary { padding: 11px 13px; color: var(--green-deep); font-size: 13px; font-weight: 700; cursor: pointer; }
.block-tool[open] { flex-basis: 100%; }
.block-tool .block-filters { margin: 0; padding: 0 13px 13px; }
.settings-intro { margin: 0 2px 12px; }

.step-track.standalone { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; }
.review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.review-outline { margin: -6px 0 20px; }
.review-outline > summary { width: fit-content; padding: 6px 0; color: var(--green-deep); font-size: 14px; font-weight: 700; cursor: pointer; }
.review-outline .task-list { max-height: 420px; overflow-y: auto; margin-top: 8px; padding: 2px; }
.task-list.compact .task-row { align-items: center; padding: 10px 14px; }
.task-list.compact .task-question { font-size: 14px; }
.task-here { color: var(--green-deep); font-size: 13px; font-weight: 800; white-space: nowrap; }

@media (max-width: 1050px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr); }
  .process-card { position: static; }
  .detail-grid { grid-template-columns: 1fr; }
  .preview-column { position: static; }
  .metric-card div { display: block; }
  .metric-card div strong { display: block; margin-top: 8px; }
  .validation-metrics { grid-template-columns: repeat(2, 1fr); }
  .validation-row { grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(105px, .55fr)) auto; }
  .validation-row .validation-result:nth-of-type(4) { display: none; }
  .validation-row .compact-button { grid-column: 4; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .page { min-width: 0; }
  .mobile-menu { display: block; }
  .topbar { height: 65px; padding: 0 16px; }
  .workspace { display: none; }
  .main-content { padding: 24px 16px 45px; }
  .hero-row, .detail-head { align-items: stretch; flex-direction: column; }
  .hero-row .primary-button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 100px; }
  .document-row { grid-template-columns: 42px 1fr; }
  .document-filters { grid-template-columns: 1fr; }
  .document-filters .secondary-button { width: 100%; }
  .document-row .status { grid-column: 2; }
  .row-action { grid-column: 2; }
  .detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .next-step-body { align-items: stretch; flex-direction: column; padding: 20px; }
  .next-step-actions { justify-content: stretch; }
  .next-step-actions > *, .next-step-actions .primary-button { width: 100%; }
  .step-track { flex-wrap: wrap; padding: 12px 20px; }
  .step-track { gap: 8px 14px; }
  .review-grid { grid-template-columns: 1fr; }
  .review-preview { position: static; max-width: 420px; }
  .review-card { padding: 20px; }
  .review-progress { grid-template-columns: 1fr auto; }
  .review-progress .progress-track { grid-column: 1 / -1; grid-row: 2; }
  .review-actions > * { width: 100%; }
  .check-answers { grid-template-columns: 1fr; }
  .ai-panel, .memory-note { align-items: stretch; flex-direction: column; }
  .check-submit .primary-button { width: 100%; }
  .reader-frame { height: 60vh; }
  .step-track li + li::before { display: none; }
  .more-menu-items { left: 0; right: auto; min-width: 0; width: max(100%, 260px); }
  .selected-file { grid-template-columns: 45px 1fr; }
  .selected-file .primary-button, .selected-file .upload-team { grid-column: 1 / -1; }
  .selected-file.with-team { grid-template-columns: 45px 1fr; }
  .upload-team select { width: 100%; }
  .validation-panel { grid-template-columns: 1fr; }
  .task-row { grid-template-columns: 30px minmax(0, 1fr); }
  .task-go, .task-here { grid-column: 2; justify-self: start; }
  .task-panel, .task-extras { padding-left: 16px; padding-right: 16px; }
  .content-intro { align-items: stretch; flex-direction: column; }
  .metadata-form { grid-template-columns: 1fr; }
  .metadata-form small, .metadata-form .secondary-button { grid-column: 1; }
  .block-editor { padding-left: 13px; }
  .preview-toolbar { align-items: flex-start; flex-direction: column; }
  .order-actions { flex-wrap: wrap; }
  .order-actions span { width: 100%; }
  .add-link-form, .manual-checks-form fieldset { grid-template-columns: 1fr; }
  .add-link-form label, .add-link-form input, .add-link-form button { grid-row: auto; }
  .revision-list > li { align-items: stretch; flex-direction: column; }
  .validation-metrics { grid-template-columns: 1fr; }
  .validation-row { grid-template-columns: 1fr 1fr; }
  .validation-document { grid-column: 1 / -1; }
  .validation-row .validation-result:nth-of-type(4) { display: block; }
  .validation-row .status { grid-column: 1; }
  .validation-row .compact-button { grid-column: 2; }
  .artifact-list > div { align-items: flex-start; flex-direction: column; }
}

/* Site scanner */
.scan-start { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto auto; align-items: end; gap: 14px; margin-bottom: 4px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.scan-start label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.scan-start input, .scan-start select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #b9c3bc; border-radius: 10px; background: white; color: var(--ink); font: inherit; }
.scan-start small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.scan-start .primary-button { min-height: 46px; }
.scan-truth { margin: 14px 0 28px; }
.status-scan-done { color: #2b6a4b; background: #e6f6dc; }
.status-scan-running, .status-scan-queued { color: #315d94; background: #e4edfb; }
.status-scan-failed { color: #a13e31; background: #fae5e1; }
.scan-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-bottom: 22px; padding: 14px 18px; border-left: 3px solid #315d94; border-radius: 0 10px 10px 0; background: #eef3fb; }
.scan-progress p { flex: 1 1 320px; margin: 0; font-size: 14px; }
.scan-watch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 22px; padding: 14px 18px; border-left: 3px solid #1f7a55; border-radius: 0 10px 10px 0; background: #eef8f2; color: #173d2c; }
.scan-watch p { flex: 1 1 320px; margin: 0; font-size: 14px; line-height: 1.55; }
.watch-row { grid-template-columns: 42px minmax(150px, 1fr) auto auto; }
.watch-row.has-alert .document-icon { color: #8f2f24; background: #fae5e1; }
.watch-row.has-alert small { color: #8f2f24; }
.nav-badge { min-width: 22px; margin-left: auto; padding: 2px 7px; border-radius: 999px; background: #b3372a; color: white; font-size: 13px; font-weight: 700; text-align: center; }
.scan-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 22px 0; }
.scan-panel { padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.scan-panel h2 { margin: 0 0 10px; font-size: 18px; }
.scan-panel p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.scan-problems { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.scan-problems a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.scan-problems a:hover { text-decoration: underline; }
.severity { min-width: 38px; padding: 3px 8px; border-radius: 999px; font-weight: 700; text-align: center; }
.severity-critical { color: #8f2f24; background: #fae5e1; }
.severity-major { color: #765119; background: #fff0d5; }
.severity-minor { color: #3665a0; background: #e4edfb; }
.scan-next { border-color: #b9dcc6; background: #f3faf5; }
.declaration { margin-bottom: 22px; }
.declaration summary { font-weight: 700; cursor: pointer; }
.declaration p { margin-top: 10px; }
.declaration blockquote { margin: 0; padding: 12px 14px; border-left: 3px solid var(--green-deep); background: var(--paper); line-height: 1.6; }
.inline-check { display: inline-flex !important; align-items: center; gap: 6px; }
.scan-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.scan-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.scan-table th { padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f7f8f4; font-size: 13px; text-align: left; white-space: nowrap; }
.scan-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scan-table tr:last-child td { border-bottom: 0; }
.scan-table input[type="checkbox"] { width: 20px; height: 20px; }
.scan-file { min-width: 220px; overflow-wrap: anywhere; }
.scan-file > a { font-weight: 700; }
.scan-file small { display: block; margin-top: 3px; color: var(--muted); }
.new-badge { margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--green); color: var(--ink); font-size: 11px; font-weight: 700; }
.verdict { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.verdict-critical { color: #8f2f24; background: #fae5e1; }
.verdict-major { color: #765119; background: #fff0d5; }
.verdict-minor { color: #3665a0; background: #e4edfb; }
.verdict-ok { color: #2b6a4b; background: #e6f6dc; }
.verdict-error { color: var(--muted); background: #eef0ec; }
.scan-reasons { margin: 0; padding-left: 18px; }
.scan-import-selected { margin-top: 12px; }
.status-etr-draft { color: #765119; background: #fff0d5; }
.status-etr-approved { color: #2b6a4b; background: #e6f6dc; }
.etr-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 18px; align-items: start; margin: 22px 0; }
.etr-editor { display: grid; gap: 10px; }
.etr-editor small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.etr-editor code { padding: 1px 5px; border-radius: 5px; background: var(--paper); font-size: 13px; }
.etr-editor textarea { width: 100%; min-height: 420px; padding: 12px 14px; font-size: 16px; line-height: 1.6; resize: vertical; }
.etr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.etr-side { display: grid; gap: 12px; }
.etr-checks { display: grid; gap: 8px; max-height: 480px; margin: 0; padding: 0; overflow-y: auto; list-style: none; font-size: 14px; line-height: 1.45; }
.etr-checks .text-button { margin-right: 4px; font-size: 13px; }
.etr-preview-panel { margin-bottom: 22px; }
.etr-preview { max-width: 42rem; font-family: Verdana, "DejaVu Sans", sans-serif; font-size: 18px; line-height: 1.6; }
.etr-preview h1 { font-size: 28px; line-height: 1.25; margin: 0 0 18px; }
.etr-preview h2 { margin: 28px 0 10px; font-size: 22px; }
.etr-preview p { margin: 0 0 4px; color: inherit; font-size: inherit; }
.etr-preview .etr-paragraph { margin-bottom: 18px; }
.etr-source { max-height: 420px; overflow-y: auto; font-size: 14px; line-height: 1.55; }
#etr-snippet { width: 100%; font-family: monospace; font-size: 13px; }

@media (max-width: 760px) {
  .scan-start { grid-template-columns: 1fr; }
  .etr-layout { grid-template-columns: 1fr; }
  .watch-row { grid-template-columns: 42px 1fr; }
}

/* PDFPilot workbench: the document, its status and the next decision lead the interface. */
.app-shell { grid-template-columns: 220px 1fr; }
.sidebar { width: 220px; padding: 24px 16px 18px; }
.brand { width: 158px; margin: 0 8px 34px; }
.sidebar-close { display: none; }
.nav-item { min-height: 46px; padding: 0 12px; border-radius: 7px; font-size: 15px; }
.nav-item.active { box-shadow: inset 3px 0 var(--green); }
.page { grid-column: 2; }
.topbar { position: sticky; top: 0; z-index: 15; height: 64px; padding: 0 clamp(22px, 3.5vw, 48px); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.workspace { display: flex; align-items: baseline; gap: 10px; }
.workspace strong { font-size: 14px; }
.workspace span { margin: 0; font-size: 14px; }
.help-button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.help-button span { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #aeb9b2; border-radius: 50%; }
.main-content { width: min(1320px, 100%); padding: 32px clamp(22px, 3.5vw, 48px) 64px; }
.eyebrow, .section-kicker { font-size: 14px; letter-spacing: 0; text-transform: none; }
.primary-button, .secondary-button { border-radius: 8px; font-size: 14px; }
.primary-button { box-shadow: none; }
.primary-button:hover { transform: none; }

.dashboard-hero { align-items: center; margin-bottom: 20px; }
.dashboard-hero h1 { margin: 0 0 5px; font-size: clamp(30px, 3vw, 40px); }
.dashboard-hero p { font-size: 16px; }
.dashboard-summary { gap: 0; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.dashboard-summary .metric-card { min-height: 86px; grid-template-columns: 34px 1fr; gap: 2px 12px; padding: 14px 18px; border: 0; border-right: 1px solid var(--line); border-radius: 0; }
.dashboard-summary .metric-card:last-child { border-right: 0; }
.dashboard-summary .metric-card.accent-dark { color: var(--ink); background: white; border-left: 4px solid var(--green-deep); }
.dashboard-summary .metric-icon { width: 32px; height: 38px; border-radius: 5px 10px 5px 5px; font-size: 13px; }
.dashboard-summary .metric-card div span,
.dashboard-summary .accent-dark div span,
.dashboard-summary .metric-card.accent-dark small { color: var(--muted); font-size: 14px; }
.dashboard-summary .metric-card div strong { font-size: 25px; }
.dashboard-summary .metric-card small { font-size: 13px; }
.dashboard-workspace { grid-template-columns: 1fr; }
.dashboard-workspace .main-column { min-width: 0; }
.upload-card { border-radius: 10px; }
.drop-zone { min-height: 112px; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-content: center; justify-items: start; column-gap: 16px; padding: 18px 22px; border-radius: 7px; text-align: left; }
.upload-symbol { grid-row: 1 / span 3; width: 46px; height: 52px; margin: 0; border-radius: 5px 12px 5px 5px; }
.drop-zone strong { align-self: end; margin: 0; font-size: 16px; }
.drop-zone > span:not(.upload-symbol) { font-size: 14px; }
.drop-zone small { align-self: start; margin: 3px 0 0; font-size: 14px; }
.section-heading { align-items: end; }
.section-heading h2 { margin: 0; font-size: 22px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.section-heading > .subtle { flex: 0 0 auto; white-space: nowrap; }
.document-list { border-radius: 10px; }
.document-row { min-height: 78px; padding: 14px 18px; }
.document-name strong { font-size: 15px; }
.document-name small { font-size: 14px; }
.row-action { min-height: 38px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid #b9cfc3; border-radius: 7px; background: #f7fbf7; font-size: 14px; }
.row-action.ready { border-color: var(--green-deep); color: var(--green-deep); }
.empty-state > span { width: 56px; height: 64px; display: grid; place-items: center; border-radius: 7px 15px 7px 7px; background: #ffe5df; color: #a33d2f; font-size: 15px; }

.detail-head { align-items: center; }
.detail-head h1 { font-size: clamp(30px, 3vw, 42px); }
.next-step { border: 1px solid #9ba9a1; border-left: 5px solid var(--green-deep); border-radius: 9px; box-shadow: none; }
.next-step-body { padding: 26px 28px; }
.next-step-body h2 { font-size: clamp(23px, 2.2vw, 30px); }
.step-track { background: #f7f9f6; }
.task-row { border-radius: 8px; }
.task-row.is-next { box-shadow: inset 4px 0 var(--green); }
.task-go { border-color: #b9cfc3; border-radius: 7px; background: #f7fbf7; font-size: 14px; }
.content-section { padding-top: 4px; }
.preview-column { border: 1px solid #b8c2bc; border-left: 5px solid var(--green-deep); border-radius: 5px; box-shadow: 0 10px 28px rgba(20,34,29,.09); }
.structure-panel { border-radius: 9px; }
.review-card { border: 1px solid #9ba9a1; border-left: 5px solid var(--green-deep); border-radius: 9px; box-shadow: none; }
.review-highlight { border-color: #b84232; }
.check-question, .reader-panel, .check-submit { border-radius: 9px; }
.ai-panel { border-radius: 8px; }

.validation-hero { margin-bottom: 18px; }
.validation-header { min-height: 42px; padding-top: 10px; padding-bottom: 10px; background: #f7f9f6; color: var(--muted); font-size: 13px; font-weight: 700; }
.validation-list { border-radius: 9px; }
.validation-row { padding: 14px 18px; }
.validation-document strong { font-size: 15px; }
.validation-document small, .validation-result span, .validation-result strong { font-size: 13px; }
.artifact-panel { border-radius: 9px; }

.nav-scrim { position: fixed; inset: 0; z-index: 19; border: 0; background: rgba(9, 18, 14, .48); }
.nav-scrim[hidden] { display: none; }
body.menu-open { overflow: hidden; }
.confirm-dialog { width: min(440px, calc(100% - 32px)); padding: 26px; border: 0; border-radius: 10px; color: var(--ink); box-shadow: 0 24px 70px rgba(9,18,14,.28); }
.confirm-dialog::backdrop { background: rgba(9,18,14,.52); }
.confirm-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #fff0d5; color: #765119; font-weight: 800; }
.confirm-dialog h2 { margin: 14px 0 8px; font-size: 22px; }
.confirm-dialog p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }

@media (max-width: 1050px) {
  .dashboard-summary.four-metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-summary.four-metrics .metric-card:nth-child(2) { border-right: 0; }
  .dashboard-summary.four-metrics .metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .validation-header { display: none; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { width: min(86vw, 300px); padding-top: 20px; }
  .sidebar-close { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #43564f; border-radius: 8px; background: transparent; color: white; font-size: 25px; cursor: pointer; }
  .brand { margin-bottom: 26px; }
  .topbar { padding: 0 16px; }
  .workspace { display: none; }
  .help-button { padding: 0 10px; }
  .main-content { padding: 24px 16px 48px; }
  .dashboard-summary, .dashboard-summary.four-metrics { grid-template-columns: 1fr; }
  .dashboard-summary .metric-card,
  .dashboard-summary.four-metrics .metric-card:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .dashboard-summary .metric-card:last-child { border-bottom: 0; }
  .drop-zone { grid-template-columns: 42px 1fr; padding: 16px; }
  .upload-symbol { width: 40px; height: 46px; }
  .document-row { grid-template-columns: 42px minmax(0, 1fr); }
  .section-heading { align-items: flex-start; gap: 12px; }
  .row-action { justify-self: start; }
  .confirm-actions { flex-direction: column-reverse; }
  .confirm-actions > * { width: 100%; }
}

/* Critique follow-up 2026-11-04 */
h1, h2 { word-spacing: .08em; }
.choice > span { flex: 1; }
.review-preview-jump { display: none; }
.check-question:not(:has(input[value="no"]:checked)) .check-notes { display: none; }
.check-notes { display: grid; gap: 6px; }
.truth-note p, .next-step-note, .scan-panel p, .review-instruction { max-width: 75ch; }
.pointer-coarse { display: none; }
@media (hover: none) and (pointer: coarse) {
  .drop-zone .pointer-fine { display: none; }
  .drop-zone .pointer-coarse { display: block; }
}
.preview-zone::before { content: ""; position: absolute; inset: -6px -2px; }
.task-all { margin-top: 10px; }
.task-all > summary { padding: 10px 2px; color: var(--green-deep); font-size: 14px; font-weight: 700; cursor: pointer; }
.task-all .task-list { margin-top: 6px; }
.scan-panel.is-unavailable { background: #f7f9f6; }
.scan-panel.is-unavailable h2 { color: var(--muted); }
.expert-editor { margin: 18px 0; border: 1px solid var(--line); border-radius: 9px; background: white; }
.expert-editor > .expert-summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 16px 18px; cursor: pointer; list-style: none; }
.expert-editor > .expert-summary::-webkit-details-marker { display: none; }
.expert-editor > .expert-summary strong { display: block; font-size: 15px; }
.expert-editor > .expert-summary small { display: block; max-width: 75ch; margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.expert-editor[open] > .expert-summary { border-bottom: 1px solid var(--line); }
.expert-editor[open] > .expert-summary > span:last-child { transform: rotate(45deg); }
.expert-editor > .content-intro { padding: 16px 18px 0; }
.expert-editor > .content-intro p { margin: 0; color: var(--muted); font-size: 14px; }
.expert-editor > .detail-grid { padding: 16px 18px 18px; }
.choice-code { margin-left: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.check-headings { display: grid; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.check-heading { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 15px; line-height: 1.45; }
.check-heading.level-1 { font-weight: 700; }
.check-heading.level-3, .check-heading.level-4, .check-heading.level-5, .check-heading.level-6 { margin-left: 24px; }
.check-heading-level { margin-right: 6px; padding: 2px 6px; border-radius: 4px; background: #edf0eb; color: #405048; font-size: 13px; font-weight: 700; }
.check-heading small { color: var(--muted); font-size: 13px; }
.reader-frame:focus { outline: 3px solid #2876d2; outline-offset: 3px; }
.reader-controls button:disabled { opacity: 1; border-color: var(--line); background: #eef1ec; color: #4e5b55; }
.check-note, .check-submit p { max-width: 75ch; }
.topbar-document { display: none; }
.table-editor:has(select[name="header_rows"] option[value="1"]:checked) tr:nth-child(-n+1) textarea,
.table-editor:has(select[name="header_rows"] option[value="2"]:checked) tr:nth-child(-n+2) textarea,
.table-editor:has(select[name="header_rows"] option[value="3"]:checked) tr:nth-child(-n+3) textarea,
.table-editor:has(select[name="header_columns"] option[value="1"]:checked) td:nth-child(-n+1) textarea,
.table-editor:has(select[name="header_columns"] option[value="2"]:checked) td:nth-child(-n+2) textarea,
.table-editor:has(select[name="header_columns"] option[value="3"]:checked) td:nth-child(-n+3) textarea { border-color: var(--green-deep); background: #eef7e6; font-weight: 700; }
.table-editor small { color: var(--muted); font-size: 14px; }
#question-heading:focus, #review-done-heading:focus { outline: none; }
.help-page { display: grid; gap: 22px; max-width: 820px; }
.help-page section { padding: 22px 24px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.help-page h2 { margin: 0 0 12px; font-size: 20px; }
.help-page p, .help-steps li, .help-terms dd { color: #2f3d37; font-size: 15px; line-height: 1.6; }
.help-page a { color: var(--green-deep); font-weight: 700; }
.help-steps { display: grid; gap: 10px; margin: 0; padding-left: 22px; }
.help-terms { margin: 0; }
.help-terms dt { margin-top: 14px; font-weight: 700; }
.help-terms dt:first-child { margin-top: 0; }
.help-terms dd { max-width: 75ch; margin: 4px 0 0; }
@media (max-width: 760px) {
  .topbar-document { display: block; flex: 1; min-width: 0; margin: 0 12px; overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .review-preview-jump { display: inline-block; margin: 0 0 14px; color: var(--green-deep); font-size: 14px; font-weight: 700; }
  .dashboard-summary, .dashboard-summary.four-metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-summary .metric-card { min-height: 0; grid-template-columns: 1fr; padding: 12px 14px; }
  .dashboard-summary .metric-card:nth-child(odd) { border-right: 1px solid var(--line); }
  .dashboard-summary .metric-icon, .dashboard-summary .metric-card small { display: none; }
  .dashboard-summary .metric-card div { flex-direction: column; align-items: flex-start; gap: 2px; }
  .dashboard-summary .metric-card:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; transition: none!important; }
}

/* Forms tool */
.task-row.is-muted .task-question { color: var(--muted); text-decoration: line-through; }
.form-gap mark { padding: 0 .3em; border-bottom: 2px solid var(--green-deep); background: #e8f4d9; color: inherit; white-space: pre-wrap; }
.form-field-editor { display: grid; gap: 8px; margin-top: 18px; }
.form-field-editor input:not([type]), .form-field-editor input[type=number], .form-field-editor textarea { width: 100%; padding: 10px 12px; border: 1px solid #b9c3bd; border-radius: 8px; background: white; color: var(--ink); font: inherit; font-size: 16px; }
.form-field-editor label:not(.kind-choice):not(.inline-check) { margin-top: 10px; }
.form-field-editor small { color: var(--muted); font-weight: 400; }
.kind-choices { display: grid; gap: 6px; margin: 10px 0 4px; padding: 0; border: 0; }
.kind-choices legend { margin-bottom: 6px; }
.kind-choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.kind-choice:has(input:checked) { border-color: var(--green-deep); background: #f4faed; }
.kind-choice input { margin-top: 3px; }
.kind-choice small { display: block; }
.form-table-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); align-items: start; }
.form-table-editor table { width: 100%; border-collapse: collapse; font-size: 14px; }
.form-table-editor th, .form-table-editor td { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.form-table-editor thead th { font-size: 13px; color: var(--muted); }
.form-table-editor tbody th { white-space: nowrap; font-weight: 700; }
.form-table-editor textarea, .form-table-editor select { width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid #b9c3bd; border-radius: 6px; background: white; color: var(--ink); font: inherit; }
.form-table-editor td:nth-child(2) { width: 100%; min-width: 220px; }
.form-table-editor textarea { display: block; resize: vertical; line-height: 1.35; }
.form-table-editor select { width: 132px; }
.form-table-editor thead th:nth-child(n+4) { width: 56px; font-size: 12px; line-height: 1.2; text-align: center; hyphens: manual; }
.form-table-editor .table-scroll td { min-width: 0; }
.form-table-editor .table-scroll textarea { min-height: 0; border: 1px solid #b9c3bd; }
.form-table-editor .check-cell { width: 56px; text-align: center; }
.form-table-editor .check-cell input { width: 20px; height: 20px; }
.form-table-editor tr.is-rejected textarea { color: var(--muted); text-decoration: line-through; }
.ai-mark { margin-left: 4px; padding: 0 4px; border-radius: 4px; background: #e8eefc; font-size: 11px; }
.form-table-pages { display: grid; gap: 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.review-highlight.numbered::after { content: attr(data-number); position: absolute; top: -1px; left: -1px; transform: translateY(-100%); padding: 0 3px; background: #b3261e; color: white; font: 700 9px/1.3 sans-serif; }
@media (max-width: 900px) { .form-table-grid { grid-template-columns: 1fr; } .form-table-pages { position: static; max-height: none; } }
.form-export { margin-top: 12px; padding: 16px; border: 1px solid var(--green-deep); border-radius: 10px; background: #f4faed; }
.form-export h3 { margin: 0 0 6px; }
.table-columns { display: grid; gap: 8px; margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.table-columns legend { padding: 0 4px; }
.table-columns p { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.table-column-choice { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.table-column-choice > span { flex: 1 1 100%; }
.table-column-choice label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.review-highlight { pointer-events: none; }
.review-highlight.is-ai-box { padding: 0; margin: 0; box-sizing: border-box; border: 2px dashed #1d4ed8; background: rgba(29, 78, 216, .08); pointer-events: none; }
.ai-box-proposal form { margin-top: 8px; }
.mover-handle { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border: 2px solid white; border-radius: 50%; background: #d9480f; cursor: nwse-resize; }
.mover-form { margin-top: 10px; }
.mover-form p { margin: 0 0 8px; }
.mover-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mover-actions select { margin-left: 6px; padding: 6px 8px; border: 1px solid #b9c3bd; border-radius: 6px; }
/* Text over page previews: invisible, but it can be selected and copied. */
.text-layer { position: absolute; inset: 0; overflow: hidden; line-height: 1; }
.text-layer span { position: absolute; color: transparent; white-space: pre; transform-origin: 0 0; cursor: text; font-family: sans-serif; }
.text-layer span[data-wrap] { white-space: pre-wrap; overflow: hidden; }
.text-layer span::selection { background: rgba(29, 78, 216, .35); color: transparent; }
.certainty-group { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.certainty-group.is-sure { border-color: var(--green-deep); background: #f4faed; }
.certainty-group summary { cursor: pointer; }
.certainty-list { display: grid; gap: 2px; max-height: 420px; overflow-y: auto; margin: 10px 0 12px; padding: 0; list-style: none; }
.certainty-list li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.certainty-list label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.certainty-list input { flex: none; margin-top: 3px; width: 18px; height: 18px; }
.certainty-list small { display: block; color: var(--muted); }
.add-field { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 12px; }
.add-field select { margin-left: 6px; padding: 6px 8px; border: 1px solid #b9c3bd; border-radius: 6px; }

/* Screen reader transcript of a form (documents/form_reader.html) */
.form-reader-step { margin: 12px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.form-reader-step h3 { margin: 0 0 6px; }
.form-reader-step p { margin: 0 0 10px; }
.reader-transcript { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.reader-stop { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; scroll-margin-top: 80px; }
.reader-stop.has-problem { border-color: #edcf9b; box-shadow: inset 4px 0 #e0a83a; }
.reader-stop-head { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.reader-said { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.reader-problems { margin: 0; padding-left: 20px; color: #6a4410; font-size: 14px; line-height: 1.5; }
.reader-note { margin: 4px 0 0; }
.reader-note p { margin: 0 0 8px; }
.reader-note-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.reader-note-fields input { width: 100%; padding: 8px 10px; border: 1px solid #b9c3bd; border-radius: 8px; font: inherit; }
@media (max-width: 640px) {
  .reader-stop-head { grid-template-columns: 30px minmax(0, 1fr); }
  .reader-stop-head .text-button { grid-column: 2; justify-self: start; }
  .reader-note-fields { grid-template-columns: 1fr; }
}

/* Form generator: office profile (documents/office_profile.html) */
.office-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.office-form input[type="text"], .office-form input[type="email"], .office-form input[type="file"], .office-form select, .office-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #b9c3bd; border-radius: 8px; background: white; color: var(--ink); font: inherit; font-size: 16px; }
.theme-choices { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; border: 0; }
.theme-choices legend { margin-bottom: 6px; }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type="color"] { width: 52px; height: 44px; padding: 2px; border: 1px solid #b9c3bd; border-radius: 8px; background: white; }
.field-error { margin: 0; color: #9b2c1f; font-size: 14px; font-weight: 700; }
.office-logo { display: flex; gap: 14px; align-items: center; }
.office-logo img { max-height: 56px; }
.office-sample { position: sticky; top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.office-sample h2 { margin: 0 0 12px; font-size: 16px; }
.office-sample-page { display: grid; gap: 4px; padding: 22px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #111; font-size: calc(var(--sample-half-points) * .62px); box-shadow: 0 6px 18px rgba(0, 0, 0, .06); }
.office-sample-page img { max-height: 44px; justify-self: start; }
.office-sample-title { margin-top: 16px; color: var(--sample-accent); font-size: 1.6em; font-weight: 700; line-height: 1.2; }
.office-sample-heading { margin-top: 10px; color: var(--sample-accent); font-size: 1.2em; font-weight: 700; }
.office-sample-label { margin-top: 6px; font-weight: 700; }
.office-sample-frame { height: 26px; border: max(1px, calc(var(--sample-border-eighths) * .17px)) solid var(--sample-border); }
@media (max-width: 860px) {
  .office-layout { grid-template-columns: 1fr; }
  .office-sample { position: static; }
}

/* Form generator: library and editor */
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.forms-hero { max-width: 780px; }
.forms-start-heading { margin: 0 2px 12px; }
.forms-start-heading h2, .forms-create h2 { margin: 0 0 4px; font-size: 20px; }
.forms-start-heading p, .forms-create p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.forms-create { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 24px; align-items: center; margin-top: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9f6; }
.forms-create-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.forms-create-actions form { margin: 0; }
.library-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 6px; }
.team-save { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.team-save h2 { flex: 1 1 100%; margin: 0; font-size: 18px; }
.team-save label { font-weight: 700; }
.team-save input { flex: 1 1 220px; min-height: 44px; padding: 10px 12px; border: 1px solid #b9c3bd; border-radius: 8px; font: inherit; font-size: 16px; }
.library-search label { font-weight: 700; }
.library-search input { flex: 1 1 260px; min-height: 44px; padding: 10px 12px; border: 1px solid #b9c3bd; border-radius: 8px; font: inherit; font-size: 16px; }
.library-group { margin-top: 26px; }
.library-group h2 { margin: 0 0 12px; font-size: 20px; }
.library-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.library-card { display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.library-card:hover, .library-card:focus-within { border-color: var(--green-deep); }
.library-card img { width: 100%; aspect-ratio: 210 / 140; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 6px; }
.library-card h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.library-card h3 a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.library-card h3 a::after { content: ""; position: absolute; inset: 0; }
.library-card { position: relative; }
.library-card p { margin: 0; font-size: 14px; line-height: 1.5; }
.status-chip { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #fff3d6; color: #6a4410; font-size: 12px; font-weight: 800; vertical-align: middle; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.editor-form input[type="text"], .editor-form textarea, .editor-form select { width: 100%; padding: 9px 11px; border: 1px solid #b9c3bd; border-radius: 8px; background: white; color: var(--ink); font: inherit; font-size: 16px; }
.editor-section { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.editor-section.is-off .editor-section-body { display: none; }
.editor-section-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.editor-section-head h2 { margin: 0; font-size: 18px; }
.editor-section-body { display: grid; gap: 8px; margin-top: 10px; }
.editor-field { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf8; }
.editor-field.is-off { opacity: .7; }
.editor-field-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.editor-field-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.lock-note { color: #3d4a44; font-size: 14px; }
.editor-add summary { cursor: pointer; font-weight: 700; color: var(--green-deep); }
.editor-add[open] { padding: 10px 0; }
.editor-actions { position: sticky; bottom: 0; padding: 12px 0; background: var(--paper, #f4f5f0); }
.editor-preview { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.editor-preview h2 { margin: 0 0 6px; font-size: 16px; }
.form-draft { display: grid; gap: 4px; margin: 10px 0; padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #111; font-size: calc(var(--sample-half-points) * .56px); }
.form-draft img { max-height: 40px; justify-self: start; }
.form-draft-reference { justify-self: end; font-size: .8em; }
.form-draft-text { font-size: .9em; line-height: 1.45; }
.office-sample-frame.is-boxes { width: 60%; background-image: repeating-linear-gradient(90deg, transparent 0 calc(100% / 11 - 1px), var(--sample-border) calc(100% / 11 - 1px) calc(100% / 11)); }
@media (max-width: 860px) {
  .forms-create { grid-template-columns: 1fr; gap: 14px; }
  .forms-create-actions { justify-content: flex-start; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-preview { position: static; max-height: none; }
  .editor-field-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .forms-create { padding: 16px; }
  .forms-create-actions, .forms-create-actions > *, .forms-create-actions form > * { width: 100%; }
}
.review-toc { columns: 2 280px; margin: 0 0 18px; padding-left: 20px; }
.template-review h3 { margin: 16px 0 6px; font-size: 16px; }
.template-review-fields { display: grid; gap: 4px; margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }

/* Form builder (templates/documents/form_builder.html, static/js/form_builder.js) */
.builder { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.builder-bar { grid-column: 1 / -1; display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.builder-bar h1 { margin: 0; font: 800 24px/1.2 "Manrope", sans-serif; }
.builder-bar-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.builder input[type="text"], .builder input[type="url"], .builder input[type="number"], .builder select, .builder textarea { width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid #8a968f; border-radius: 8px; background: white; color: var(--ink); font: inherit; }
.builder-law h2, .builder-palette h2, .builder-properties h2 { margin: 0 0 8px; font: 700 17px/1.3 "Manrope", sans-serif; }
.builder-law ul { margin: 0 0 8px; padding-left: 20px; }
.builder-law li { margin-bottom: 6px; }
.builder-law .secondary-button, .builder-law .danger-button, .builder-buttons .secondary-button, .builder-buttons .danger-button { min-height: 36px; padding: 0 12px; }
.builder-law-add form, .builder-team form { display: grid; gap: 6px; max-width: 520px; margin-top: 8px; }
.builder-law-add .secondary-button, .builder-team .secondary-button { width: fit-content; }
.builder-law-add summary, .builder-team summary { cursor: pointer; font-weight: 700; }
.builder-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.builder-actions form { margin: 0; }
.builder-save { margin: 0; color: var(--muted); font-size: 14px; }
.builder-problems { padding: 10px 14px; border: 1px solid #ecc0b9; border-radius: 10px; background: #fff0ed; color: #8a2b1f; }
.builder-problems ul { margin: 4px 0 0; padding-left: 20px; }
.builder-palette, .builder-properties { position: sticky; top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.builder-palette h3 { margin: 12px 0 6px; font-size: 13px; letter-spacing: .8px; text-transform: uppercase; color: var(--green-deep); }
.builder-palette ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.builder-palette-item { width: 100%; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9f6; color: var(--ink); text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.builder-palette-item:hover { border-color: var(--green-deep); background: white; }
/* Taller than the window once a search opens the ready fields: the palette scrolls on its own. */
.builder-palette { max-height: calc(100vh - 32px); overflow-y: auto; }
.builder-palette-search { display: grid; gap: 4px; margin-bottom: 8px; }
.builder-palette-search label { font-weight: 700; }
.builder-palette-search input { width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid #8a968f; border-radius: 8px; background: white; color: var(--ink); font: inherit; }
.builder-palette-search p { margin: 0; }
.builder-palette-sub { margin-bottom: 6px; }
.builder-palette-sub summary { display: flex; align-items: center; min-height: 32px; cursor: pointer; font-weight: 700; font-size: 14px; }
.builder-palette-sub ul { margin: 4px 0 8px; }
.builder-format { margin: 0; font-size: 14px; color: var(--muted); }
.builder-keys { margin: 0 0 8px; font-size: 14px; }
.builder-sheet { --accent: #1f3a5f; --border: 0.75pt; --border-color: #000; --size: 12; --body-font: "Liberation Sans"; --heading-font: "Liberation Serif";
  max-width: 794px; min-height: 600px; margin: 0 auto; padding: 40px 48px; background: white; box-shadow: var(--shadow); border: 1px solid var(--line);
  font-family: var(--body-font), Arial, sans-serif; font-size: calc(var(--size) * 1pt); color: #000; }
.builder-office { display: grid; gap: 2px; font-size: .9em; }
.builder-office img { max-width: 80px; max-height: 80px; }
.builder-reference { float: right; font-size: .85em; }
.builder-title { display: block; margin: 18px 0 10px; color: var(--accent); font: 700 1.4em/1.25 var(--heading-font), Georgia, serif; }
.builder-pieces { display: flex; flex-wrap: wrap; gap: 6px 2%; margin: 0; padding: 0; list-style: none; }
.builder-piece { position: relative; flex: 0 0 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 4px 8px; align-items: start; padding: 6px 8px; border: 1px dashed transparent; border-radius: 6px; cursor: pointer; }
.builder-piece.in-row { flex-basis: calc(var(--share) * 100% - 2%); }
.builder-piece:hover { border-color: #b9c3bd; }
.builder-piece[aria-current="true"] { border: 1px solid #2876d2; background: #f1f6fd; }
.builder-handle { color: #6b7671; cursor: grab; user-select: none; }
.builder-body { display: grid; gap: 4px; min-width: 0; }
.builder-heading { color: var(--accent); font: 700 1.1em/1.3 var(--heading-font), Georgia, serif; }
.builder-text { white-space: pre-line; font-size: .92em; }
.builder-label { overflow-wrap: anywhere; }
.builder-label small { color: #444; }
.builder-frame { display: block; height: calc(var(--lines) * 1.6em); border: var(--border) solid var(--border-color); }
.builder-frame.is-signature { height: 3.6em; border-width: 0 0 var(--border); }
.builder-frame.is-choice::after { content: "▾"; float: right; padding: 0 6px; }
.builder-boxes { display: flex; flex-wrap: wrap; gap: 2px; }
.builder-boxes span { width: 1.4em; height: 1.6em; border: var(--border) solid var(--border-color); }
.builder-answer { padding-left: 8px; }
.builder-note { color: #56635d; font-size: .8em; }
.builder-badges { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; font-family: "Atkinson Hyperlegible", system-ui, sans-serif; font-size: 13px; }
.builder-lock, .builder-ai, .builder-problem { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 13px; }
.builder-lock { background: #eef1ec; color: #14221d; }
.builder-ai { background: #fff4dc; color: #6b4600; }
.builder-problem { background: #fff0ed; color: #8a2b1f; }
.builder-remove { grid-column: 3; grid-row: 1; min-height: 30px; padding: 0 10px; border: 1px solid #d9a69e; border-radius: 7px; background: white; color: var(--red); font: 600 13px/1 "Atkinson Hyperlegible", system-ui, sans-serif; cursor: pointer; }
.builder-remove:disabled { border-color: var(--line); color: #56635d; cursor: not-allowed; }
.builder-properties { display: grid; gap: 10px; }
.builder-properties [data-properties] { display: grid; gap: 10px; }
.builder-kind { margin: 0; font-weight: 700; color: var(--green-deep); }
.builder-control { display: grid; gap: 4px; }
.builder-control label { font-weight: 700; font-size: 14px; }
.builder-check { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.builder-check input { width: 20px; height: 20px; }
.builder-toggles { display: grid; gap: 6px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.builder-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.builder-reader { padding: 10px; border-radius: 8px; background: #f7f9f6; }
.builder-reader h3 { margin: 0 0 6px; font-size: 15px; }
.builder-reader ul { margin: 0 0 6px; padding-left: 18px; }
.builder-problem-list { color: #8a2b1f; }
.builder-conflict { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border: 2px solid #b3261e; border-radius: 10px; background: #fff0ed; color: #8a2b1f; font-weight: 700; }
.builder-conflict[hidden], .builder-create-reason[hidden], .builder-drop[hidden] { display: none; }
.builder-conflict p { margin: 0; }
.builder-create-reason { flex-basis: 100%; margin: 0; color: #8a2b1f; font-size: 14px; }
.builder-palette-toggle { display: none; }
.builder-sheet { position: relative; }
.builder-handle { touch-action: none; }
.builder-piece.is-dragged { opacity: .55; }
.builder-drop { position: absolute; height: 3px; border-radius: 2px; background: #2876d2; pointer-events: none; }
.builder-law a, .builder-law li { overflow-wrap: anywhere; }

/* Narrow screens: the columns stand one under another; the palette opens with "Dodaj klocek". */
@media (max-width: 720px) {
  .builder { grid-template-columns: minmax(0, 1fr); }
  .builder-bar { padding: 14px; }
  .builder-bar-fields { grid-template-columns: minmax(0, 1fr); }
  .builder-palette, .builder-properties { position: static; }
  .builder-palette { max-height: none; overflow: visible; }
  .builder-palette-toggle { display: inline-flex; }
  .builder-palette-items { display: none; }
  .builder-palette.is-open .builder-palette-items { display: block; margin-top: 8px; }
  .builder-sheet { min-height: 0; padding: 20px 14px; }
  .builder-piece { grid-template-columns: 18px minmax(0, 1fr); }
  .builder-remove { grid-column: 2; grid-row: auto; justify-self: start; }
}

.ai-card { margin: 0 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.ai-card h2 { margin: 0 0 6px; font-size: 17px; }
.ai-card p { margin: 0; }
.ai-form { display: grid; gap: 14px; max-width: 720px; }
.ai-form textarea { width: 100%; min-height: 160px; padding: 10px 12px; border: 1px solid #b9c3bd; border-radius: 10px; font: inherit; }
.ai-form fieldset { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 8px; }
.ai-form legend { padding: 0 6px; font-weight: 700; }
.ai-form .ai-answer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-form .ai-answer input[type=text] { flex: 1 1 200px; min-width: 0; padding: 8px 10px; border: 1px solid #b9c3bd; border-radius: 8px; font: inherit; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.builder-removed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.builder-removed[hidden] { display: none; }
.builder-removed p { margin: 0; flex: 1 1 260px; }

/* The field screen: the panel of the chosen field next to the form's page with all its fields. */
.fields-grid { grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); }
/* The whole column sticks, so the page does not slide over the list of fields without a place under it. */
.fields-preview { position: sticky; top: 16px; }
.fields-preview .review-preview { position: static; }
.field-boxes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.field-box { position: absolute; box-sizing: border-box; padding: 0; border: 2px solid #d9480f; border-radius: 3px; background: rgba(217, 72, 15, .12); cursor: pointer; pointer-events: auto; }
.field-box.is-confirmed { border-color: #2f7d4f; border-width: 1px; background: rgba(47, 125, 79, .08); }
.field-box.is-rejected { border-color: #8a948e; border-width: 1px; border-style: dashed; background: rgba(138, 148, 142, .1); opacity: .6; }
.field-box.is-rejected::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid #5f6a64; }
.field-box.is-selected { z-index: 1; border-width: 3px; border-style: solid; box-shadow: 0 0 0 2px white; cursor: move; touch-action: none; }
.field-box:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.field-box[hidden] { display: none; }
.field-box .mover-handle { pointer-events: auto; }
.review-nav [data-next] { margin-left: auto; }
.review-nav [hidden] { display: none; }
.field-spoken { margin: 16px 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8f8f4; font-size: 14px; }
.field-problems { margin: 0 0 12px; padding-left: 20px; color: #b3261e; font-size: 14px; font-weight: 700; }
.field-status { min-height: 1.5em; margin: 8px 0 0; }
.field-unplaced { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.field-unplaced h2 { margin: 0 0 8px; font-size: 16px; }
.field-unplaced ul { margin: 0; padding-left: 20px; }
.field-unplaced a { color: var(--green-deep); font-weight: 700; }
.field-unplaced a[aria-current] { text-decoration: none; }
.field-panel [hidden] { display: none; }
@media (max-width: 900px) { .fields-grid { grid-template-columns: 1fr; } .fields-preview { position: static; } .field-panel { scroll-margin-top: 80px; } .fields-preview .review-preview { max-width: none; } }

/* Zbiorcze zaznaczanie dokumentów na pulpicie */
.bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.bulk-actions select { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.document-row-bulk { grid-template-columns: auto 42px minmax(150px, 1fr) auto auto; }
.document-row-bulk .document-row-main { display: contents; color: inherit; text-decoration: none; }
.document-row-bulk > input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green-deep); }
@media (max-width: 640px) {
  .document-row-bulk { grid-template-columns: auto 42px 1fr; }
  .document-row-bulk .status, .document-row-bulk .row-action { grid-column: 3; }
}

/* Komentarze, powiadomienia i różnice rewizji */
.comments-panel summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; cursor: pointer; }
.comments-panel summary strong { display: block; font: 700 15px "Manrope"; }
.comments-panel summary small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.comment-form { display: grid; gap: 8px; margin: 18px 0 20px; padding: 16px; border-radius: 12px; background: #f7f9f4; }
.comment-form textarea { width: 100%; box-sizing: border-box; min-height: 80px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }
.comment-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.comment-list > li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.comment-list > li.is-unread { background: #f5faef; }
.comment-list p { margin: 6px 0; line-height: 1.55; }
.comment-list small { color: var(--muted); }
.comment-list form { margin-top: 6px; }
.revision-diff del { color: #8c3b2e; text-decoration-thickness: 1px; }
.revision-diff ins { color: #255c3c; text-decoration-thickness: 1px; }
.document-row-bulk:focus-within { outline: 2px solid var(--green-deep); outline-offset: 2px; }
.document-row-bulk > input[type="checkbox"] { width: 24px; height: 24px; }
@media (max-width: 640px) {
  .document-name strong { white-space: normal; overflow: visible; }
  .bulk-actions { gap: 8px; }
  .bulk-actions select { flex: 1 1 150px; }
  .comments-panel summary { gap: 10px; }
}
.bulk-actions[hidden] { display: none; }
.comment-list > li > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.comment-list > li > div strong { line-height: 1.45; }
.comment-list > li > div small { margin-left: auto; }
@media (max-width: 640px) { .comment-list > li > div small { margin-left: 0; width: 100%; } }
.team-roles { margin-top: 10px; font-size: 13px; }
.team-roles summary { color: var(--green-deep); font-weight: 700; cursor: pointer; }
.team-role-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.team-role-form select { min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 640px) {
  .topbar-document { display: none; }
}
.profile small a { display: inline-block; min-height: 24px; line-height: 24px; }
.team-roles summary { min-height: 24px; padding: 4px 0; }
.profile small a { min-width: 24px; text-align: center; }
.table-spans { display: grid; gap: 8px; margin: 14px 0 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9f4; }
.table-spans h4 { margin: 0; font: 700 14px "Manrope"; }
.table-spans ul { display: grid; gap: 6px; margin: 0; padding-left: 20px; }
.table-spans li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.table-spans form { display: inline-flex; }
.span-form { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.span-form input[type="number"] { width: 4.5rem; min-height: 34px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; }
.span-form select { min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 640px) {
  .span-form { align-items: stretch; }
  .span-form select, .span-form input[type="number"] { flex: 1 1 90px; }
}
.wcag-table { width: 100%; border-collapse: collapse; }
.wcag-table th, .wcag-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.wcag-table thead th { background: #f4f5f0; font-size: 13px; }
.wcag-table tbody th { font-weight: 600; }
.wcag-key { color: var(--muted); font-variant-numeric: tabular-nums; }
.wcag-status { white-space: nowrap; font-size: 13px; font-weight: 700; }
.wcag-pass { color: #2b6a4b; }
.wcag-fail { color: #a13e31; }
.wcag-manual { color: #7f570f; }
.wcag-not-applicable { color: var(--muted); }
.wcag-manual-item { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.wcag-manual-item legend { padding: 0 4px; }
.wcag-manual-item textarea { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
@media (max-width: 640px) { .wcag-table { font-size: 12px; } .wcag-table th, .wcag-table td { padding: 8px; } }

/* Dokumenty seryjne */
.serial-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 34px; }
.serial-card { display: grid; align-content: start; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.serial-card h3, .serial-card p { margin: 0; }
.serial-card h3 a { color: var(--ink); }
.serial-card h3, .serial-card p, .serial-card small, .serial-batch-row .document-name { min-width: 0; overflow-wrap: anywhere; }
.serial-card > small, .serial-card-top small { color: var(--muted); }
.serial-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.serial-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.serial-actions form { margin: 0; }
.serial-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.serial-title-line h1 { margin-inline-end: 4px; }
.serial-version-note { margin-top: 6px !important; color: var(--ink) !important; font-weight: 600; }
.serial-editor-grid { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(360px, 1.1fr); gap: 24px; align-items: start; margin-bottom: 28px; }
.serial-form, .serial-upload-card, .serial-mapping { display: grid; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.serial-editor-fields { min-width: 0; display: grid; gap: 16px; margin: 0; padding: 0; border: 0; }
.serial-editor-fields:disabled { opacity: .72; }
.serial-restore { margin: -10px 0 22px; }
.serial-form[data-dirty="true"] { border-color: #9ba99f; }
.serial-brand { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f6f8f4; }
.serial-brand div { display: grid; gap: 2px; }
.serial-brand span { color: var(--muted); font-size: 13px; }
.serial-brand a { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; font-weight: 700; }
.serial-field { display: grid; gap: 7px; }
.serial-field label, .serial-upload-card label { display: grid; gap: 3px; }
.serial-field label small, .serial-upload-card label small { color: var(--muted); font-weight: 400; }
.serial-field input, .serial-field select, .serial-field textarea, .serial-upload-card input[type=file], .serial-samples input, .serial-map-grid select { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #b9c3bd; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.serial-field input, .serial-field select, .serial-samples input, .serial-map-grid select { min-height: 46px; }
.serial-field [aria-invalid="true"], .serial-upload-card [aria-invalid="true"] { border-color: var(--red); background: #fff8f6; }
.serial-field input:focus, .serial-field select:focus, .serial-field textarea:focus, .serial-upload-card input:focus, .serial-samples input:focus, .serial-map-grid select:focus { border-color: var(--green-deep); }
.serial-field textarea { resize: vertical; }
.serial-error-summary { margin: 0; }
.serial-error-summary strong { display: block; margin-bottom: 5px; }
.serial-error-summary ul { margin: 0; padding-inline-start: 20px; }
.serial-error-summary a { text-underline-offset: 3px; }
.serial-samples { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: 8px 12px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.serial-samples legend { padding: 0 6px; font-weight: 700; }
.serial-samples label { align-self: center; }
.serial-preview { position: sticky; top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #eef1ed; }
.serial-preview.wide { position: static; margin: 24px 0; }
.serial-preview h2 { margin: 0 0 12px; font-size: 16px; }
.serial-preview iframe { width: 100%; height: 720px; border: 1px solid #bcc5bf; border-radius: 4px; background: white; }
.serial-preview-empty { min-height: 420px; display: grid; place-content: center; text-align: center; padding: 24px; border: 1px dashed #aeb8b2; border-radius: 8px; background: #fff; color: var(--muted); }
.serial-preview-empty p { max-width: 320px; }
.serial-upload-layout { display: grid; grid-template-columns: minmax(0, 680px) minmax(260px, 360px); gap: 20px; align-items: start; }
.serial-upload-card { width: 100%; max-width: 680px; }
.serial-guidance { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #f7f9f6; }
.serial-guidance h2 { margin: 0 0 8px; font-size: 18px; }
.serial-guidance p { margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.serial-guidance ul { margin: 8px 0 0; padding-inline-start: 20px; }
.serial-guidance li + li { margin-top: 5px; }
.serial-guidance pre { max-width: 100%; overflow-x: auto; margin: 14px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--ink); color: var(--white); font: 14px/1.5 ui-monospace, monospace; }
.serial-map-head { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(240px, 1fr); gap: 18px; padding: 0 2px; color: var(--muted); font-size: 13px; font-weight: 700; }
.serial-map-grid { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(240px, 1fr); gap: 10px 18px; align-items: center; }
.serial-map-grid label { display: flex; justify-content: space-between; gap: 14px; font-weight: 700; }
.serial-map-arrow { color: var(--muted); }
.serial-data-preview { overscroll-behavior-inline: contain; }
.serial-data-preview table { min-width: 760px; }
.serial-progress { display: grid; grid-template-columns: 1fr minmax(220px, 40%) auto; gap: 14px; align-items: center; margin: 20px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #f6f8f4; }
.serial-progress div { display: grid; gap: 4px; }
.serial-progress span { color: var(--muted); font-size: 13px; }
.serial-progress progress { width: 100%; height: 16px; accent-color: var(--green-deep); }
.serial-connection-warning { grid-column: 1 / -1; margin: 0; color: var(--red) !important; font-weight: 700; }
.serial-connection-warning button { min-height: 36px; margin-inline-start: 8px; padding: 0 10px; border: 1px solid currentColor; border-radius: 8px; background: var(--white); color: inherit; cursor: pointer; }
.serial-archive { margin-top: 28px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: #f7f8f5; }
.serial-archive summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.serial-archive ul { margin-bottom: 0; }
.serial-file-links { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.serial-file-links a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--green-deep); font-weight: 700; text-underline-offset: 3px; }
.serial-items-heading { margin-bottom: 8px; }
.serial-items-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.serial-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.serial-filters a { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); text-decoration: none; font-weight: 700; }
.serial-filters a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--white); }
.serial-filters a span { min-width: 24px; padding: 2px 6px; border-radius: 999px; background: var(--paper); color: var(--ink); text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.serial-results-table th, .serial-results-table td { vertical-align: middle; }
.serial-results-table tbody th { font-variant-numeric: tabular-nums; }
.serial-result-failed { background: #fff8f6; }
.serial-item-status { white-space: nowrap; }
.serial-filter-empty { margin-bottom: 16px; }
.serial-form [data-loading="true"], .serial-upload-card [data-loading="true"], .serial-mapping [data-loading="true"] { cursor: progress; opacity: .72; }
.pagination a { min-height: 40px; display: inline-flex; align-items: center; padding-inline: 8px; }
@media (max-width: 900px) {
  .serial-editor-grid { grid-template-columns: 1fr; }
  .serial-preview { position: static; }
  .serial-progress { grid-template-columns: 1fr auto; }
  .serial-progress progress { grid-column: 1 / -1; grid-row: 2; }
  .serial-upload-layout { grid-template-columns: minmax(0, 680px); }
}
@media (max-width: 640px) {
  .serial-title-line { align-items: flex-start; }
  .serial-title-line .status { margin-top: 3px; }
  .serial-form, .serial-upload-card, .serial-mapping { padding: 20px 22px; }
  .serial-brand { align-items: flex-start; }
  .serial-brand a { flex: 0 0 auto; }
  .serial-map-head { display: none; }
  .serial-map-grid, .serial-samples { grid-template-columns: minmax(0, 1fr); }
  .serial-map-grid { gap: 7px; }
  .serial-map-grid label { margin-top: 12px; }
  .serial-map-grid label:first-child { margin-top: 0; }
  .serial-map-arrow { display: none; }
  .serial-actions > *, .serial-actions .primary-button, .serial-actions .secondary-button { width: 100%; }
  .serial-preview iframe, .serial-preview-empty { height: auto; min-height: 0; aspect-ratio: 1 / 1.414; }
  .serial-progress { grid-template-columns: 1fr auto; padding: 16px; }
  .serial-progress > div { grid-column: 1 / -1; }
  .serial-progress progress { grid-column: 1; grid-row: auto; }
  .serial-progress [data-progress-label] { grid-column: 2; }
  .serial-filters { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
  .serial-filters a { flex: 0 0 auto; }
  .serial-results-wrap { overflow: visible; border: 0; background: transparent; }
  .serial-results-table, .serial-results-table tbody { display: grid; gap: 10px; width: 100%; }
  .serial-results-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .serial-results-table tr { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
  .serial-results-table tr.serial-result-failed { border-color: #e8b2aa; background: #fff8f6; }
  .serial-results-table tr > * { display: grid; grid-template-columns: minmax(82px, .42fr) minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); text-align: start; overflow-wrap: anywhere; }
  .serial-results-table tr > *:last-child { border-bottom: 0; }
  .serial-results-table tr > *::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 700; }
  .serial-file-links { gap: 6px; }
  .serial-file-links a { width: fit-content; }
  .serial-batch-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .serial-batch-row .document-icon { grid-row: 1 / 3; }
  .serial-batch-row .document-name { grid-column: 2 / 4; }
  .serial-batch-row .status { grid-column: 2; grid-row: 2; justify-self: start; }
  .serial-batch-row .row-arrow { grid-column: 3; grid-row: 2; align-self: center; }
  .pagination { flex-wrap: wrap; gap: 6px 12px; }
}
