:root {
  --ink: #14221d;
  --muted: #66736d;
  --paper: #f4f5f0;
  --white: #ffffff;
  --line: #dfe4dc;
  --green: #a8f06a;
  --green-deep: #23583f;
  --amber: #f7bc5b;
  --blue: #d8e7ff;
  --red: #b84232;
  --radius: 18px;
  --shadow: 0 14px 35px rgba(22, 42, 33, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", system-ui, sans-serif; }
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: flex; align-items: center; gap: 11px; margin: 0 10px 44px; text-decoration: none; font: 800 23px/1 "Manrope", sans-serif; letter-spacing: -.8px; }
.brand > span:last-child > span { color: var(--green); }
.brand-mark { width: 29px; height: 29px; display: grid; place-items: center; border: 2px solid var(--green); border-radius: 50% 50% 50% 12%; transform: rotate(-12deg); }
.brand-mark span { width: 8px; height: 8px; background: var(--green); border-radius: 50%; }
.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: 9px; text-transform: uppercase; letter-spacing: .7px; }
.sidebar-note { margin-top: auto; padding: 18px; border: 1px solid #344841; border-radius: 14px; background: #192a24; }
.sidebar-note strong { display: block; margin: 9px 0 4px; font: 700 14px "Manrope"; }
.sidebar-note p { margin: 0; color: #9caea7; font-size: 11px; line-height: 1.55; }
.eyebrow, .section-kicker { font-size: 10px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--green-deep); }
.sidebar-note .eyebrow { color: var(--green); font-size: 9px; }
.profile { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; margin-top: 17px; 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: 11px; font-weight: 800; }
.profile strong, .profile small { display: block; }
.profile strong { font-size: 11px; }
.profile small { margin-top: 3px; color: #8e9c97; font-size: 9px; }
.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: 11px; 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: -.5px; }
.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: 10px; }
.workspace strong { font-size: 12px; }
.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: -1.6px; }
.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; }
.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-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: 12px; }
.accent-dark div span { color: #c3cec9; }
.metric-card div strong { font: 800 30px/1 "Manrope"; }
.metric-card small { grid-column: 2; color: #89938e; font-size: 10px; }
.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: 12px; }
.drop-zone u { color: var(--green-deep); font-weight: 700; }
.drop-zone small { margin-top: 14px; color: #929d97; font-size: 9px; }
.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[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: 9px; 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: -.5px; }
.subtle { color: var(--muted); font-size: 11px; }
.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; }
.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: 12px; font-weight: 700; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.pagination a { color: var(--green-deep); font-weight: 700; }
.document-row { display: grid; grid-template-columns: 42px minmax(150px, 1fr) auto 20px; 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: 12px; }
.document-name small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.status { width: fit-content; display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; color: #7f570f; background: #fff2d9; font-size: 9px; 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-failed { color: #a13e31; background: #fae5e1; }
.row-arrow { color: #91a099; }
.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: 11px; 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: -.6px; }
.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: 10px; 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: 11px; }
.process-list small { margin-top: 5px; font-size: 9px; }
.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: 9px; 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: 12px; }
.message.error { border-color: #ecc0b9; background: #fff0ed; }

/* document detail */
.breadcrumbs { display: flex; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 11px; }
.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: -1.2px; }
.detail-head p { margin: 0; color: var(--muted); font-size: 11px; }
.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: -8px 0 24px; 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: 12px; }
.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: 12px; font-weight: 700; }
.metadata-form input, .metadata-form textarea { 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); }
.metadata-form .secondary-button { grid-column: 2; width: fit-content; }
.progress-panel { margin-bottom: 25px; padding: 22px 25px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.progress-copy { display: flex; align-items: center; gap: 13px; margin-bottom: 15px; }
.progress-copy > span { font: 800 23px "Manrope"; }
.progress-copy strong, .progress-copy small { display: block; }
.progress-copy strong { font-size: 11px; }
.progress-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.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); }
.stage-labels { display: flex; justify-content: space-between; margin-top: 10px; color: #8d9892; font-size: 9px; }
.stage-labels .done { color: var(--green-deep); font-weight: 700; }
.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: 11px; }
.issue-card { margin-bottom: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.issue-card.resolved { opacity: .7; }
.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: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.critical { background: #fae5e1; color: var(--red); }
.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: 10px; 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: 10px; font-weight: 700; cursor: pointer; }
.decision-row button:hover { border-color: var(--green-deep); background: #f1f8eb; }
.decision-field { grid-column: 1 / -1; font-size: 12px; 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: 12px; 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: 11px; }
.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: 10px; 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: 12px; }
.preview-pagination { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.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-artifact { border-style: dashed; border-color: #89958f; background: rgba(137,149,143,.12); }
.preview-status { min-height: 18px; margin: 7px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.block-list { max-height: 700px; overflow-y: auto; padding: 13px; }
.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: 12px; 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: #89958f; font-size: 8px; }
.content-block p { margin: 5px 0 0; color: #405048; font-size: 10px; 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: 12px; font-weight: 700; }
.block-editor select, .block-editor textarea { 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; }
.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: 12px; }
.order-actions button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: white; cursor: pointer; }
.error-panel { margin-bottom: 20px; padding: 18px; border: 1px solid #e9bcb4; border-radius: 12px; background: #fff0ed; }
.error-panel p { margin-bottom: 0; font-size: 11px; }
.remediation-panel { margin: -8px 0 25px; padding: 18px; border: 1px solid #edcf9b; border-radius: 12px; background: #fff8ea; }
.remediation-panel p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.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.validation-passed { border-color: #cfe7bf; background: #f4faee; }
.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: 12px; line-height: 1.6; }
.validation-panel p { padding-left: 0; }
.validation-panel a { color: var(--green-deep); }
.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: 12px; }
.audit-list small { color: var(--muted); font-size: 12px; }

/* 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: 12px; }

@media (max-width: 1050px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .process-card { position: static; }
  .detail-grid { grid-template-columns: 1fr; }
  .metric-card div { display: block; }
  .metric-card div strong { display: block; margin-top: 8px; }
}

@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 16px; }
  .document-filters { grid-template-columns: 1fr; }
  .document-filters .secondary-button { width: 100%; }
  .document-row .status { grid-column: 2; }
  .row-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .stage-labels { gap: 10px; }
  .selected-file { grid-template-columns: 45px 1fr; }
  .selected-file .primary-button { grid-column: 1 / -1; }
  .validation-panel { grid-template-columns: 1fr; }
  .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%; }
}

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