/* Cedar Quay Tasks demo: tokens, type and layout from DESIGN.md (ledger direction). No gradients, no shadows except the award dialog, no pill shapes. */

:root {
	--cq-ink: #1D2A2C;
	--cq-muted: #505C5B;
	--cq-canvas: #F6F3EC;
	--cq-surface: #FFFDF8;
	--cq-surface-alt: #E8E2D4;
	--cq-sand: #EFE9DA;
	--cq-primary: #1D5A4B;
	--cq-primary-deep: #123E33;
	--cq-slate: #2D4A6A;
	--cq-ochre: #7A4F00;
	--cq-notice: #F3E2B3;
	--cq-warn: #F6E7C4;
	--cq-error: #A12828;
	--cq-error-bg: #F7E0DD;
	--cq-success: #1F6A3D;
	--cq-success-bg: #DCEFE2;
	--cq-border: #586664;
	--cq-rule: #CFC7B4;
	--cq-focus: #0A4FB8;
	--cq-footer-bg: #1D2A2C;
	--cq-footer-text: #F6F3EC;
	--cq-footer-link: #BFE5D8;
	--cq-footer-muted: #C9D2D0;
	--cq-heading: Archivo, "Segoe UI", Arial, sans-serif;
	--cq-body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
	--cq-mono: "IBM Plex Mono", Consolas, monospace;
	--cq-margin: 16px;
	--cq-gutter: 16px;
	--cq-fs-body: 16px;
	--cq-fs-cell: 15px;
	--cq-fs-meta: 14px;
	--cq-fs-h1: 28px;
	--cq-fs-h2: 22px;
	--cq-fs-h3: 18px;
	--cq-fs-display: 32px;
	--cq-fs-price: 20px;
	--cq-pad-section: 24px;
}
@media (min-width: 390px) { :root { --cq-margin: 20px; --cq-fs-h1: 30px; --cq-fs-h2: 24px; --cq-fs-h3: 19px; --cq-fs-display: 34px; } }
@media (min-width: 768px) { :root { --cq-margin: 32px; --cq-gutter: 24px; --cq-fs-h1: 34px; --cq-fs-h2: 26px; --cq-fs-h3: 20px; --cq-fs-display: 40px; --cq-pad-section: 32px; } }
@media (min-width: 1024px) { :root { --cq-margin: 40px; --cq-fs-body: 17px; --cq-fs-cell: 16px; --cq-fs-meta: 15px; --cq-fs-h1: 38px; --cq-fs-h2: 28px; --cq-fs-h3: 21px; --cq-fs-display: 48px; --cq-fs-price: 22px; } }
@media (min-width: 1440px) { :root { --cq-margin: 48px; --cq-gutter: 32px; --cq-fs-body: 18px; --cq-fs-h1: 42px; --cq-fs-h2: 30px; --cq-fs-h3: 22px; --cq-fs-display: 56px; --cq-fs-price: 24px; --cq-pad-section: 48px; } }

/* ---------- base ---------- */
html, body { overflow-x: clip; }
body { margin: 0; background: var(--cq-canvas); color: var(--cq-ink); font-family: var(--cq-body); font-size: var(--cq-fs-body); line-height: 1.6; }
*, *::before, *::after { box-sizing: border-box; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }
.cq-main { display: block; min-height: 50vh; }
.cq-main > * { max-width: none; }
img, table, dialog { max-width: 100%; }
p, li, dd, dt, td, th, h1, h2, h3, a { overflow-wrap: anywhere; }
a { color: var(--cq-primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--cq-primary-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cq-focus); outline-offset: 2px; }
.cq-footer :focus-visible { outline-color: var(--cq-footer-link); }
.cq-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cq-muted { color: var(--cq-muted); }
.cq-ochre { color: var(--cq-ochre); }
.cq-ok { color: var(--cq-success); font-weight: 600; }
.cq-hint { color: var(--cq-muted); font-size: var(--cq-fs-meta); font-weight: 400; }

h1, h2, h3, .cq-wordmark { font-family: var(--cq-heading); color: var(--cq-ink); letter-spacing: 0; font-style: normal; }
h1 { font-size: var(--cq-fs-h1); line-height: 1.2; font-weight: 700; margin: 0 0 16px; }
h2 { font-size: var(--cq-fs-h2); line-height: 1.25; font-weight: 700; margin: 32px 0 16px; padding-top: 12px; border-top: 2px solid var(--cq-ink); }
h3 { font-size: var(--cq-fs-h3); line-height: 1.3; font-weight: 600; margin: 0 0 8px; }
.cq-display { font-size: var(--cq-fs-display); line-height: 1.15; font-weight: 700; }
.cq-wrap, .cq-doc, .cq-detail, .cq-browse, .cq-dashboard, .cq-compare, .cq-home, .cq-system, .cq-account, .cq-request-form, .cq-offer-form, .cq-profile {
	width: calc(100% - 2 * var(--cq-margin)); max-width: 1200px; margin-left: auto; margin-right: auto;
}
.cq-doc, .cq-detail, .cq-browse, .cq-dashboard, .cq-compare, .cq-home, .cq-system, .cq-account, .cq-request-form, .cq-offer-form, .cq-profile { padding-top: var(--cq-pad-section); padding-bottom: var(--cq-pad-section); }
.cq-main .wp-block-post-title { font-family: var(--cq-heading); }
.cq-wrap > .wp-block-post-title, .cq-main .cq-wrap { margin-left: auto; margin-right: auto; }
.cq-detail, .cq-doc { padding-top: var(--cq-pad-section); }
.cq-account, .cq-request-form, .cq-offer-form, .cq-profile, .cq-system { max-width: 760px; }
/* the plugin forms sit inside post content on application pages: align them in the page column */
.cq-main > .wp-block-post-content { padding: 0; margin: 0; }

/* ---------- notice bar, header, navigation ---------- */
.cq-skip { position: absolute; left: 8px; top: -100px; z-index: 50; background: var(--cq-surface); color: var(--cq-ink); padding: 12px 16px; border: 2px solid var(--cq-ink); }
.cq-skip:focus { top: 8px; }
.cq-notice-bar { background: var(--cq-notice); color: var(--cq-ink); font-size: 15px; }
.cq-notice-bar p { margin: 0; padding: 8px 0; }
.cq-notice-label { color: var(--cq-ochre); }
.cq-notice-bar a { color: var(--cq-primary); }
.cq-wrap { padding-left: 0; padding-right: 0; }
.cq-header { background: var(--cq-surface); border-bottom: 1px solid var(--cq-rule); }
.cq-header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 12px 0; }
.cq-wordmark { font-weight: 700; font-size: 22px; color: var(--cq-ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.cq-wordmark:hover { text-decoration: underline; color: var(--cq-ink); }
.cq-demo-tag { font-family: var(--cq-body); font-size: 14px; font-weight: 600; color: var(--cq-ochre); border: 1px dashed var(--cq-ochre); border-radius: 2px; padding: 0 6px; letter-spacing: .04em; }
.cq-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
.cq-nav li { margin: 0; }
.cq-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cq-ink); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; }
.cq-nav a:hover { border-bottom-color: var(--cq-ink); }
.cq-nav a[aria-current="page"] { font-weight: 600; border-bottom-color: var(--cq-primary); }
.cq-nav a.cq-btn { border-bottom: 0; }
.cq-menu-btn { display: none; min-height: 44px; padding: 8px 16px; background: var(--cq-surface); color: var(--cq-ink); border: 1px solid var(--cq-border); border-radius: 4px; font: 600 16px/1.4 var(--cq-body); cursor: pointer; }
.cq-menu-btn[aria-expanded="true"] { background: var(--cq-surface-alt); }
@media (max-width: 1023px) {
	.cq-js .cq-menu-btn { display: inline-flex; align-items: center; }
	.cq-js .cq-nav { flex-basis: 100%; }
	.cq-js .cq-nav:not(.is-open) { display: none; }
	.cq-nav ul { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
	.cq-nav li { width: 100%; border-top: 1px solid var(--cq-rule); }
	.cq-nav a { width: 100%; }
}
@media (max-width: 1023px) and (min-width: 768px) { .cq-header-row { flex-wrap: wrap; } }

/* ---------- buttons ---------- */
.cq-btn, .cq-form button, .cq-controls button, .cq-filters button {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 4px; border: 1px solid var(--cq-primary);
	background: var(--cq-primary); color: var(--cq-surface); font: 600 16px/1.4 var(--cq-body); text-decoration: none; cursor: pointer; white-space: normal; text-align: center;
}
.cq-btn:hover, .cq-form button:hover { background: var(--cq-primary-deep); color: var(--cq-surface); border-color: var(--cq-primary-deep); }
.cq-btn--secondary, .cq-controls button, .cq-filters button { background: var(--cq-surface); color: var(--cq-primary); border-color: var(--cq-border); }
.cq-btn--secondary:hover, .cq-controls button:hover, .cq-filters button:hover { background: var(--cq-sand); color: var(--cq-primary-deep); border-color: var(--cq-primary); }
/* fix5c F2: `.cq-form button` (0,1,1) outranks `.cq-btn--secondary` (0,1,0), so Cancel in the award dialog looked like Confirm. Re-state the variants with a higher specificity inside forms. */
.cq-form button.cq-btn--secondary { background: var(--cq-surface); color: var(--cq-primary); border-color: var(--cq-border); }
.cq-form button.cq-btn--secondary:hover { background: var(--cq-sand); color: var(--cq-primary-deep); border-color: var(--cq-primary); }
.cq-btn--quiet, .cq-withdraw button, .cq-close button { background: var(--cq-surface); color: var(--cq-error); border-color: var(--cq-border); }
.cq-btn--quiet:hover, .cq-withdraw button:hover, .cq-close button:hover { background: var(--cq-error-bg); color: var(--cq-error); border-color: var(--cq-error); }
.cq-btn[disabled], .cq-btn[aria-disabled="true"], button[disabled] { background: var(--cq-surface-alt); color: var(--cq-muted); border-color: var(--cq-surface-alt); cursor: not-allowed; }
.cq-header .cq-btn--primary { color: var(--cq-surface); }
.cq-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }

/* ---------- forms ---------- */
.cq-form, .cq-controls form, .cq-filters { margin: 0 0 24px; }
.cq-form p, .cq-filters p, .cq-controls p { margin: 0 0 24px; }
.cq-form label, .cq-filters label, .cq-controls label, .cq-label { font-weight: 600; font-size: 16px; }
.cq-form label { display: inline-block; margin-bottom: 4px; }
.cq-form input[type="text"], .cq-form input[type="email"], .cq-form input[type="password"], .cq-form input[type="date"], .cq-form textarea, .cq-form select,
.cq-filters select, .cq-controls select {
	width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--cq-border); border-radius: 4px; background: var(--cq-surface); color: var(--cq-ink); font: 400 16px/1.5 var(--cq-body);
}
.cq-form textarea { min-height: 160px; resize: vertical; }
.cq-form input:hover, .cq-form textarea:hover, .cq-form select:hover, .cq-filters select:hover, .cq-controls select:hover { border-color: var(--cq-primary); }
.cq-form fieldset, .cq-filters fieldset, .cq-controls fieldset { border: 0; border-top: 2px solid var(--cq-ink); padding: 12px 0 0; margin: 0 0 24px; min-width: 0; }
.cq-form legend, .cq-filters legend, .cq-controls legend { font: 700 var(--cq-fs-h3)/1.3 var(--cq-heading); padding: 0 8px 0 0; }
.cq-form fieldset label { display: inline-flex; align-items: center; gap: 8px; margin: 0 20px 8px 0; min-height: 44px; font-weight: 400; }
.cq-form input[type="radio"], .cq-form input[type="checkbox"], .cq-controls input[type="checkbox"] { width: 22px; height: 22px; flex: none; accent-color: var(--cq-primary); margin: 0; }
.cq-controls .cq-checks label { display: inline-flex; align-items: center; gap: 8px; margin: 0 20px 4px 0; min-height: 44px; font-weight: 400; }
.cq-notice { background: var(--cq-notice); padding: 12px 16px; margin: 0 0 24px; font-size: 15px; border-top: 2px solid var(--cq-ochre); }
.cq-errors { background: var(--cq-error-bg); color: var(--cq-error); border-top: 2px solid var(--cq-error); padding: 12px 16px; margin: 0 0 24px; }
.cq-errors h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 18px; color: var(--cq-error); }
.cq-errors ul { margin: 0; padding-left: 20px; }
.cq-error { color: var(--cq-error); font-weight: 600; }
.cq-success { background: var(--cq-success-bg); color: var(--cq-success); padding: 12px 16px; margin: 0 0 24px; font-weight: 600; border-top: 2px solid var(--cq-success); }
.cq-frozen, .cq-profile-status { background: var(--cq-sand); padding: 12px 16px; }
.cq-system { background: var(--cq-sand); padding: 24px; margin-top: 24px; margin-bottom: 24px; }
.cq-system h1 { font-size: var(--cq-fs-h2); }
.cq-account form { background: var(--cq-surface); padding: 24px; margin-bottom: 24px; border: 1px solid var(--cq-rule); }
.cq-account h2, .cq-form h2 { margin-top: 0; }
.cq-withdraw { border-top: 2px solid var(--cq-ink); padding-top: 12px; }
.cq-inline-form { display: inline-block; margin: 0; }

/* ---------- panels, badges, tags ---------- */
.cq-panel { padding: 12px 16px; margin: 0 0 24px; background: var(--cq-sand); }
.cq-panel p { margin: 0 0 8px; }
.cq-panel p:last-child { margin-bottom: 0; }
.cq-panel--warn { background: var(--cq-warn); }
.cq-panel--notice { background: var(--cq-notice); border-top: 2px solid var(--cq-ochre); }
.cq-panel--error { background: var(--cq-error-bg); border-top: 2px solid var(--cq-error); }
.cq-panel--success { background: var(--cq-success-bg); border-top: 2px solid var(--cq-success); }
.cq-panel--banner { background: var(--cq-sand); border-top: 2px solid var(--cq-slate); font-weight: 600; }
.cq-badge { display: inline-block; padding: 2px 8px; border-radius: 2px; font-size: var(--cq-fs-meta); font-weight: 600; line-height: 1.5; border: 1px solid transparent; white-space: nowrap; }
.cq-badge--info { background: var(--cq-surface); color: var(--cq-primary); border-color: var(--cq-primary); }
.cq-badge--awarded { background: var(--cq-slate); color: var(--cq-surface); border-color: var(--cq-slate); }
.cq-badge--muted { background: var(--cq-surface-alt); color: var(--cq-muted); border-color: var(--cq-surface-alt); }
.cq-badge--ok { background: var(--cq-success-bg); color: var(--cq-success); border-color: var(--cq-success-bg); }
.cq-badge--warn { background: var(--cq-warn); color: var(--cq-ochre); border-color: var(--cq-warn); }
.cq-badge--error { background: var(--cq-error-bg); color: var(--cq-error); border-color: var(--cq-error-bg); white-space: normal; }
.cq-sample { display: inline-block; padding: 0 6px; border: 1px dashed var(--cq-ochre); border-radius: 2px; color: var(--cq-ochre); font-size: var(--cq-fs-meta); font-weight: 600; letter-spacing: .04em; background: transparent; line-height: 1.5; }
.cq-sample--long { letter-spacing: 0; }
.cq-ref { font-family: var(--cq-mono); font-weight: 500; font-size: var(--cq-fs-meta); color: var(--cq-slate); }
.cq-price { font-size: var(--cq-fs-price); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }

/* ---------- ledger rows (browse, home board, dashboards) ---------- */
.cq-ledger { list-style: none; margin: 0 0 24px; padding: 0; border-top: 2px solid var(--cq-ink); }
.cq-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; background: var(--cq-surface); border-bottom: 1px solid var(--cq-rule); }
.cq-row:hover { background: var(--cq-canvas); }
.cq-row-main > * { margin-top: 0; }
.cq-row-kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 4px; }
.cq-row-title { margin: 0 0 4px; }
.cq-row-title a { color: var(--cq-ink); text-decoration: none; }
.cq-row-title a:hover { text-decoration: underline; }
.cq-row-scope { margin: 0 0 8px; color: var(--cq-muted); }
.cq-row-meta { margin: 0; font-size: var(--cq-fs-meta); color: var(--cq-muted); }
.cq-row-side { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.cq-count-text { font-size: var(--cq-fs-meta); color: var(--cq-ink); font-variant-numeric: tabular-nums; }
.cq-gate { margin: 8px 0 0; font-size: var(--cq-fs-meta); }
.cq-gate--reason { color: var(--cq-ink); background: var(--cq-warn); padding: 4px 8px; display: inline-block; }
.cq-gate--ok { color: var(--cq-success); font-weight: 600; }
.cq-window { margin: 8px 0 0; font-size: var(--cq-fs-meta); color: var(--cq-slate); font-weight: 600; }
.cq-facts { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 8px 0 0; }
.cq-facts > div { min-width: 0; }
.cq-facts dt { font-size: var(--cq-fs-meta); color: var(--cq-muted); margin: 0; }
.cq-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.cq-outcome { font-weight: 600; }
@media (min-width: 768px) {
	.cq-row { grid-template-columns: minmax(0, 1fr) auto; padding: 24px; gap: 24px; align-items: start; }
	.cq-row-side { justify-content: flex-end; flex-direction: column; align-items: flex-end; gap: 8px; }
}
.cq-empty { background: var(--cq-sand); padding: 24px; margin: 0 0 24px; }
.cq-empty p { margin: 0 0 8px; }
.cq-tabs { list-style: none; display: flex; flex-wrap: wrap; gap: 0 24px; margin: 16px 0 24px; padding: 0; border-bottom: 1px solid var(--cq-rule); }
.cq-tab { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--cq-primary); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cq-tab[aria-current="page"] { font-weight: 600; color: var(--cq-ink); border-bottom-color: var(--cq-primary); }
.cq-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 24px; }
.cq-pagination a.page-numbers, .cq-pagination span.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--cq-border); background: var(--cq-surface); text-decoration: none; }
.cq-pagination .page-numbers.current { background: var(--cq-ink); color: var(--cq-surface); border-color: var(--cq-ink); }
.cq-result-line { margin: 0 0 16px; font-weight: 600; }
.cq-result-line .cq-muted, .cq-result-line span { font-weight: 400; color: var(--cq-muted); margin-left: 8px; }

/* browse: filters */
.cq-filters fieldset { margin-bottom: 16px; }
.cq-filter-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; }
@media (min-width: 768px) { .cq-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cq-filter-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 0 !important; }

/* ---------- request detail (spec sheet) ---------- */
.cq-request-detail { max-width: 860px; }
.cq-sample { margin-bottom: 0; }
.cq-request-detail > .cq-sample { margin-bottom: 16px; }
.cq-spec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0 0 24px; border-top: 2px solid var(--cq-ink); }
.cq-spec dt { font-size: var(--cq-fs-meta); color: var(--cq-muted); padding-top: 12px; }
.cq-spec dd { margin: 0; padding: 0 0 12px; border-bottom: 1px solid var(--cq-rule); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) {
	.cq-spec { grid-template-columns: 220px minmax(0, 1fr); }
	.cq-spec dt { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--cq-rule); }
	.cq-spec dd { padding: 12px 0; }
}
.cq-scope { max-width: 68ch; margin-bottom: 24px; }
.cq-my-offer { background: var(--cq-surface); border: 1px solid var(--cq-rule); padding: 16px 24px; margin: 24px 0; }
.cq-my-offer h2 { margin-top: 0; border: 0; padding: 0; }
.cq-make-offer, .cq-compare-link, .cq-edit { margin: 0; }

/* ---------- comparison ---------- */
.cq-strip { background: var(--cq-surface); border-top: 2px solid var(--cq-ink); border-bottom: 1px solid var(--cq-rule); padding: 16px; margin: 0 0 24px; }
.cq-strip p { margin: 0 0 8px; }
.cq-strip p:last-child { margin-bottom: 0; }
.cq-controls fieldset { margin-bottom: 16px; }
.cq-table-wrap { display: none; }
.cq-offer-stack { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; }
.cq-offer-card { background: var(--cq-sand); padding: 16px; border-top: 2px solid var(--cq-ink); }
.cq-offer-card h3 { margin: 0 0 12px; }
.cq-offer-card dl { margin: 0; }
.cq-offer-card dl > div { padding: 8px 0; border-top: 1px solid var(--cq-rule); }
.cq-offer-card dt { font-size: var(--cq-fs-meta); color: var(--cq-muted); }
.cq-offer-card dd { margin: 0; font-size: var(--cq-fs-cell); }
.cq-row--awarded, .cq-offer-card.cq-row--awarded, .cq-compare-table tr.cq-row--awarded > * { background: var(--cq-success-bg); }
.cq-row--muted { color: var(--cq-muted); }
.cq-expand summary { cursor: pointer; min-height: 44px; } /* fix11 D26: DESIGN "Expand controls are at least 44 px"; the open "Show less" line was 24 px */
.cq-expand-label { color: var(--cq-primary); text-decoration: underline; white-space: nowrap; }
.cq-expand p { margin: 8px 0 0; }
/* fix10 N8: open = full text once below, the clipped text is hidden and the label reads "Show less" (display:none keeps the unused label out of the accessible name) */
.cq-expand .cq-expand-less, .cq-expand[open] .cq-expand-short, .cq-expand[open] .cq-expand-more { display: none; }
.cq-expand[open] .cq-expand-less { display: inline; }
@media (min-width: 768px) {
	.cq-table-wrap { position: relative; display: block; overflow-x: auto; margin: 0 0 24px; border-top: 2px solid var(--cq-ink); }
	.cq-offer-stack, .cq-offer-stack-h { display: none; }
	.cq-compare-table { width: 100%; border-collapse: collapse; background: var(--cq-surface); font-size: var(--cq-fs-cell); line-height: 1.5; min-width: 1180px; }
	.cq-compare-table caption { text-align: left; font-size: var(--cq-fs-meta); color: var(--cq-muted); padding: 8px 0; caption-side: top; }
	.cq-compare-table th, .cq-compare-table td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--cq-rule); font-weight: 400; }
	.cq-compare-table thead th { background: var(--cq-surface-alt); font-weight: 600; font-size: var(--cq-fs-meta); }
	.cq-compare-table tbody th { font-weight: 400; min-width: 180px; }
	.cq-compare-table .cq-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
	.cq-compare-table tbody tr:hover > * { background: var(--cq-canvas); }
	.cq-compare-table tbody tr.cq-row--awarded:hover > * { background: var(--cq-success-bg); }
	.cq-compare-table .cq-badge { margin-top: 4px; }
}
@media (min-width: 1024px) { .cq-compare-table th, .cq-compare-table td { padding: 12px 10px; } }
/* fix7 F01: eight columns need about 1180 px; keep the labelled scroll region (tabindex 0) wherever they do not fit, never squeeze Scope / Message below 160 px */
.cq-compare-table td:nth-child(4), .cq-compare-table td:nth-child(7) { min-width: 160px; }
.cq-compare-table th, .cq-compare-table td { overflow-wrap: break-word; }
.cq-table-wrap:focus-visible { outline: 3px solid var(--cq-focus); outline-offset: 0; }

/* award dialog */
.cq-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; border: 1px solid var(--cq-border); border-radius: 6px; background: var(--cq-surface); color: var(--cq-ink); box-shadow: 0 8px 24px #1D2A2C33; }
.cq-dialog::backdrop { background: #1D2A2CB3; }
.cq-dialog h2 { margin-top: 0; border: 0; padding-top: 0; }
.cq-summary { margin: 0 0 16px; }
.cq-summary > div { padding: 8px 0; border-top: 1px solid var(--cq-rule); }
.cq-summary dt { font-size: var(--cq-fs-meta); color: var(--cq-muted); }
.cq-summary dd { margin: 0; }
.cq-confirm-body { max-width: 640px; background: var(--cq-surface); border: 1px solid var(--cq-border); padding: 24px; }
.cq-award-form .cq-actions { margin-bottom: 0; }
@media (max-width: 389px) { .cq-award-form .cq-actions { flex-direction: column; align-items: stretch; } }

/* ---------- home ---------- */
.cq-home-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1024px) { .cq-home-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; } }
.cq-home-statement p { max-width: 56ch; }
.cq-board h2 { margin-top: 0; }
.cq-home-block { margin-top: 48px; }
.cq-index { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--cq-ink); }
.cq-index li { padding: 12px 0; border-bottom: 1px solid var(--cq-rule); }
.cq-index a { font-weight: 600; margin-right: 8px; }
.cq-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 48px; }
@media (min-width: 768px) { .cq-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cq-steps h2 { margin-top: 0; }
.cq-steps ol { padding-left: 24px; }

/* ---------- footer ---------- */
.cq-footer { background: var(--cq-footer-bg); color: var(--cq-footer-text); padding: 48px 0 32px; margin-top: 64px; }
.cq-footer a { color: var(--cq-footer-link); }
.cq-footer li a, .cq-index a { display: inline-block; min-height: 24px; }
.cq-footer h2 { color: var(--cq-footer-text); border-top: 2px solid var(--cq-footer-muted); font-size: 18px; margin-top: 0; }
.cq-footer .cq-footer-mark { font-family: var(--cq-heading); font-weight: 700; font-size: 22px; margin: 0 0 8px; }
.cq-footer p, .cq-footer li { color: var(--cq-footer-text); font-size: 15px; }
.cq-footer ul { list-style: none; padding: 0; margin: 0; }
.cq-footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 768px) { .cq-footer-grid { grid-template-columns: 1fr 2fr 1fr; gap: 48px; } }

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

/* ---------- C refinements after the first screenshot review ---------- */
.cq-notice-bar p.cq-wrap { margin: 0 auto; }
.cq-sample { white-space: nowrap; }
.cq-sample--long { white-space: normal; }
.cq-controls select { max-width: 360px; }
.cq-controls .cq-label { display: inline-block; margin-right: 12px; }
.cq-compare-table tbody th { width: 21%; min-width: 160px; } /* fix11 N9: was 190 px; the action column below is 12 px wider and 18 px more is needed for "Award offer" on one line, so the table still fits from 1260 */
.cq-compare-table td:nth-child(2) { min-width: 130px; }
.cq-compare-table td:nth-child(5) { min-width: 165px; }
.cq-compare-table td:nth-child(6) { min-width: 140px; }
.cq-compare-table td:nth-child(8), .cq-compare-table th:nth-child(8) { min-width: 140px; } /* fix11 N9: was 120 px; the button (129 px, label on one line) plus cell padding */
.cq-compare-table .cq-btn { white-space: nowrap; } /* fix11 N9: .cq-btn is white-space: normal (line 116); table action labels never wrap */
.cq-compare-table .cq-badge { white-space: normal; }
.cq-offer-card h3 .cq-muted { display: block; font-family: var(--cq-body); font-size: var(--cq-fs-meta); font-weight: 400; margin-top: 4px; }
.cq-offer-card h3 strong { font-weight: 600; }
a.cq-make-offer { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border-radius: 4px; background: var(--cq-primary); color: var(--cq-surface); border: 1px solid var(--cq-primary); font-weight: 600; text-decoration: none; }
a.cq-make-offer:hover { background: var(--cq-primary-deep); color: var(--cq-surface); }

/* ---------- Phase D: content pages, drawings, public provider profile ---------- */
.cq-about, .cq-how, .cq-services, .cq-provider { width: calc(100% - 2 * var(--cq-margin)); max-width: 1200px; margin-left: auto; margin-right: auto; padding-top: var(--cq-pad-section); padding-bottom: var(--cq-pad-section); }
.cq-lead { font-size: calc(var(--cq-fs-body) + 2px); max-width: 62ch; margin: 0 0 24px; }
.cq-prose { max-width: 68ch; min-width: 0; }
.cq-prose h1 { margin-top: 0; }
.cq-prose > h2:first-of-type { margin-top: 32px; }
.cq-art { display: block; color: var(--cq-primary); }
.cq-art .cq-acc { stroke: var(--cq-ochre); }
.cq-about-strip { color: var(--cq-primary); border-bottom: 2px solid var(--cq-ink); margin-bottom: 32px; overflow: hidden; }
.cq-art--quay { width: 100%; height: 88px; }
.cq-doc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.cq-toc { border-top: 2px solid var(--cq-ink); padding-top: 8px; font-size: var(--cq-fs-meta); }
.cq-toc-title { margin: 0; font-weight: 600; color: var(--cq-slate); letter-spacing: .04em; }
.cq-toc ol { list-style: none; margin: 0; padding: 0; }
.cq-toc li { border-bottom: 1px solid var(--cq-rule); }
.cq-toc a { display: block; padding: 10px 0; min-height: 44px; }
@media (min-width: 1024px) {
	.cq-doc-grid { grid-template-columns: 240px minmax(0, 68ch); gap: 64px; }
	.cq-toc { position: sticky; top: 16px; align-self: start; }
}
.cq-checklist { list-style: none; margin: 0 0 24px; padding: 0; }
.cq-checklist li { position: relative; padding: 10px 0 10px 32px; border-bottom: 1px solid var(--cq-rule); }
.cq-checklist li::before { content: ""; position: absolute; left: 6px; top: 15px; width: 12px; height: 7px; border-left: 2px solid var(--cq-primary); border-bottom: 2px solid var(--cq-primary); transform: rotate(-45deg); }
.cq-links { padding-left: 20px; margin: 0 0 24px; }
.cq-leftout { width: 100%; border-collapse: collapse; margin: 0 0 24px; background: var(--cq-surface); font-size: var(--cq-fs-cell); }
.cq-leftout thead th { background: var(--cq-surface-alt); text-align: left; padding: 12px 16px; }
.cq-leftout tbody th, .cq-leftout td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--cq-rule); font-weight: 400; }
.cq-leftout tbody th { font-weight: 600; width: 34%; }
@media (max-width: 767px) {
	.cq-leftout thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.cq-leftout, .cq-leftout tbody, .cq-leftout tr, .cq-leftout th, .cq-leftout td { display: block; width: 100%; }
	.cq-leftout tbody th { width: 100%; padding-bottom: 0; border-bottom: 0; }
	.cq-leftout tbody td { padding-top: 4px; }
}

/* How it works: two lanes, a bar figure, rules */
.cq-lanes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 64px; margin-bottom: 16px; }
@media (min-width: 768px) { .cq-lanes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cq-lane h2 { margin-top: 24px; }
.cq-lane-steps { list-style: none; counter-reset: cqstep; margin: 0; padding: 0; }
.cq-lane-steps li { counter-increment: cqstep; position: relative; padding: 14px 0 14px 52px; border-bottom: 1px solid var(--cq-rule); }
.cq-lane-steps li::before { content: counter(cqstep, decimal-leading-zero); position: absolute; left: 0; top: 16px; font-family: var(--cq-mono); font-weight: 500; font-size: var(--cq-fs-meta); color: var(--cq-slate); }
.cq-example p { max-width: 68ch; }
.cq-barfig { margin: 16px 0 24px; padding: 0; }
.cq-bars { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--cq-ink); background: var(--cq-surface); }
.cq-bars li { padding: 16px; border-bottom: 1px solid var(--cq-rule); }
.cq-bar-head { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cq-bar-track { position: relative; display: block; height: 20px; background: var(--cq-canvas); border: 1px solid var(--cq-rule); }
.cq-band { position: absolute; top: 0; bottom: 0; background: var(--cq-success-bg); border-left: 2px dashed var(--cq-success); border-right: 2px dashed var(--cq-success); }
.cq-bar { position: absolute; left: 0; top: 4px; height: 10px; background: var(--cq-primary); }
.cq-bar--above { background: var(--cq-ochre); }
.cq-bar-facts { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.cq-barfig figcaption { margin-top: 8px; font-size: var(--cq-fs-meta); color: var(--cq-muted); max-width: 68ch; }
.cq-spec--wide dd { max-width: 68ch; }
.cq-spec > div { display: contents; }
.cq-statuses .cq-panel { max-width: 68ch; }
.cq-statuses > p { max-width: 68ch; }

/* Services: ruled index with one drawing per category */
.cq-service-list { list-style: none; margin: 0 0 24px; padding: 0; border-top: 2px solid var(--cq-ink); }
.cq-service { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 24px; padding: 24px 0; border-bottom: 1px solid var(--cq-rule); align-items: start; }
.cq-service .cq-art--service { width: 96px; height: 72px; grid-row: 1 / span 2; }
.cq-service-body { grid-column: 2; }
.cq-service-body h2 { margin: 0 0 8px; padding-top: 0; border-top: 0; }
.cq-service-body p { margin: 0 0 8px; max-width: 62ch; }
.cq-service-side { grid-column: 2; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
@media (min-width: 768px) {
	.cq-service { grid-template-columns: 96px minmax(0, 1fr) 220px; }
	.cq-service .cq-art--service { grid-row: auto; }
	.cq-service-side { grid-column: 3; flex-direction: column; align-items: flex-start; }
}

/* Provider profile: identity left, evidence ledger right */
.cq-provider-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 768px) { .cq-provider-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; } }
.cq-identity { min-width: 0; }
.cq-monogram { width: 72px; height: 72px; display: grid; place-items: center; border: 2px solid var(--cq-ink); background: var(--cq-surface); color: var(--cq-slate); font-family: var(--cq-heading); font-weight: 700; font-size: 28px; letter-spacing: .04em; margin-bottom: 16px; }
.cq-identity .cq-spec { margin-top: 16px; grid-template-columns: minmax(0, 1fr); }
.cq-identity .cq-spec dd { padding-top: 0; }
.cq-evidence { min-width: 0; }
.cq-evidence h2:first-child { margin-top: 0; }
.cq-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: var(--cq-fs-price); font-weight: 600; }
.cq-stars { display: inline-flex; gap: 2px; color: var(--cq-ochre); }
.cq-stars svg { display: block; }
.cq-bio { max-width: 62ch; }
.cq-ledger--plain { margin-bottom: 16px; }
.cq-row--compact { padding: 12px 16px; }
@media (min-width: 768px) { .cq-row--compact { padding: 16px 24px; } }

/* review5c-r2 N1, N2: the Award button sits 8px under the status badge; the Sort by label keeps a gap to its select */
.cq-compare-table .cq-award-btn, .cq-offer-card .cq-award-btn { margin-top: 8px; }
.cq-controls label[for="cmp-sort"] { display: inline-block; margin-right: 8px; margin-bottom: 4px; }
