/* ============================================================================
   Norquest Knowledge Base
   Palette and typography lifted from norquestindustries.com (Avada theme
   variables --awb-color1..8 and --awb-typography1..5).
   ========================================================================== */

:root {
	color-scheme: light;

	/* Brand palette, straight from the site's theme variables */
	--nq-white:      #ffffff;
	--nq-surface:    #f1f1f1;   /* awb-color2 */
	--nq-line:       #e5e5e5;   /* awb-color3 */
	--nq-ink:        #222222;   /* awb-color4 — headings, nav */
	--nq-red:        #ee2d24;   /* awb-color5 — primary accent */
	--nq-gray:       #959ca2;   /* awb-color6 — muted UI text */
	--nq-olive:      #554f2d;   /* awb-color7 — body copy, footer */
	--nq-black:      #111111;   /* awb-color8 */

	/* Derived. --nq-red-dark matches the theme's own button hover (L - 8%). */
	--nq-red-dark:   #c81c14;
	--nq-red-wash:   #fdeceb;
	--nq-olive-soft: #8a8360;
	--nq-ink-soft:   #4a4a4a;

	/* Status colours — kept distinct from the brand red, which means "action" */
	--nq-amber:      #b8730a;
	--nq-amber-wash: #fdf3e2;
	--nq-green:      #2f7a48;
	--nq-green-wash: #eaf5ee;
	--nq-blue:       #2b5f8f;
	--nq-blue-wash:  #eaf1f8;

	--nq-font: 'Plus Jakarta Sans', Arial, Helvetica, sans-serif;

	--nq-shadow-sm: 0 1px 2px rgba(17, 17, 17, .06);
	--nq-shadow:    0 2px 10px rgba(17, 17, 17, .08);
	--nq-shadow-lg: 0 12px 32px rgba(17, 17, 17, .12);

	--nq-radius: 3px;         /* the site is squared off; keep corners tight */
	--nq-wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--nq-white);
	color: var(--nq-olive);
	font-family: var(--nq-font);
	font-size: 16px;
	font-weight: 300;         /* awb-typography4 */
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--nq-font);
	color: var(--nq-ink);
	font-weight: 700;         /* awb-typography1 */
	line-height: 1.2;
	margin: 0 0 .5em;
}
h1 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

a { color: var(--nq-red); text-decoration: none; }
a:hover { color: var(--nq-red-dark); text-decoration: underline; }

.wrap { width: 100%; max-width: var(--nq-wrap); margin: 0 auto; padding: 0 24px; }
.stack > * + * { margin-top: 1rem; }
.muted { color: var(--nq-gray); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

/* Small uppercase label, used above field groups and card sections */
.eyebrow {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--nq-gray);
	margin: 0 0 .5rem;
}

/* ------------------------------------------------------------------ header */

.topbar {
	background: var(--nq-ink);
	color: rgba(255, 255, 255, .75);
	font-size: .78rem;
	letter-spacing: .04em;
	border-bottom: 3px solid var(--nq-red);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 34px; }
.topbar a { color: rgba(255, 255, 255, .85); }
.topbar a:hover { color: #fff; }
.topbar strong { color: #fff; font-weight: 600; }

.masthead { background: var(--nq-white); border-bottom: 1px solid var(--nq-line); }
.masthead .wrap {
	display: flex; align-items: center; gap: 28px;
	min-height: 84px; flex-wrap: wrap;
}
.masthead__logo { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.masthead__logo img { height: 40px; width: auto; display: block; }
.masthead__logo span {
	font-weight: 700; color: var(--nq-ink); font-size: .95rem;
	border-left: 1px solid var(--nq-line); padding-left: 14px; line-height: 1.25;
}
.masthead__logo span em { display: block; font-style: normal; font-weight: 300; color: var(--nq-gray); font-size: .82rem; }

.masthead__search { flex: 1 1 260px; max-width: 520px; }
.masthead__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* Global nav */
.nav { background: var(--nq-surface); border-bottom: 1px solid var(--nq-line); }
.nav .wrap { display: flex; gap: 4px; flex-wrap: wrap; align-items: stretch; }
.nav a {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 13px 16px;
	font-size: .9rem; font-weight: 600;    /* awb-typography3 */
	color: var(--nq-ink);
	border-bottom: 3px solid transparent;
	text-transform: capitalize;
}
.nav a:hover { color: var(--nq-red); text-decoration: none; background: rgba(255,255,255,.6); }
.nav a.is-active { color: var(--nq-red); border-bottom-color: var(--nq-red); background: var(--nq-white); }
.nav .nav__spacer { margin-left: auto; }

.badge-count {
	display: inline-block; min-width: 20px; padding: 1px 6px;
	background: var(--nq-red); color: #fff;
	font-size: .72rem; font-weight: 700; line-height: 18px;
	border-radius: 999px; text-align: center;
}

/* ----------------------------------------------------------------- buttons */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 20px;
	font-family: inherit; font-size: .9rem; font-weight: 600;
	text-transform: capitalize;
	border: 1px solid transparent; border-radius: var(--nq-radius);
	background: var(--nq-red); color: #fff;
	cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease;
	text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--nq-red-dark); color: #fff; text-decoration: none; }
.btn:focus-visible { outline: 3px solid rgba(238, 45, 36, .35); outline-offset: 2px; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; }

.btn--ghost { background: transparent; color: var(--nq-ink); border-color: var(--nq-line); }
.btn--ghost:hover { background: var(--nq-surface); color: var(--nq-ink); border-color: var(--nq-gray); }
.btn--dark { background: var(--nq-ink); }
.btn--dark:hover { background: var(--nq-black); }
.btn--approve { background: var(--nq-green); }
.btn--approve:hover { background: #24603a; }
.btn--danger { background: transparent; color: var(--nq-red); border-color: var(--nq-red); }
.btn--danger:hover { background: var(--nq-red); color: #fff; }
.btn--sm { padding: 7px 13px; font-size: .82rem; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------------- forms */

label, .label { display: block; font-weight: 600; color: var(--nq-ink); font-size: .88rem; margin-bottom: 6px; }
.hint { font-size: .82rem; color: var(--nq-gray); margin: 4px 0 0; font-weight: 300; }

input[type=text], input[type=email], input[type=password], input[type=search],
input[type=number], select, textarea {
	width: 100%; padding: 11px 13px;
	font-family: inherit; font-size: .95rem; font-weight: 300; color: var(--nq-ink);
	background: var(--nq-white);
	border: 1px solid var(--nq-line); border-radius: var(--nq-radius);
	transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
	outline: none; border-color: var(--nq-red);
	box-shadow: 0 0 0 3px rgba(238, 45, 36, .12);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--nq-gray) 50%), linear-gradient(135deg, var(--nq-gray) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

.search-field { position: relative; display: flex; }
.search-field input { border-right: 0; border-radius: var(--nq-radius) 0 0 var(--nq-radius); }
.search-field .btn { border-radius: 0 var(--nq-radius) var(--nq-radius) 0; padding-inline: 18px; }

/* Checkbox grid for department pickers */
.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.checkgrid label {
	display: flex; align-items: flex-start; gap: 9px;
	padding: 10px 12px; margin: 0;
	border: 1px solid var(--nq-line); border-radius: var(--nq-radius);
	font-weight: 400; font-size: .88rem; color: var(--nq-ink);
	cursor: pointer; background: var(--nq-white);
	transition: border-color .15s ease, background .15s ease;
}
.checkgrid label:hover { border-color: var(--nq-gray); }
.checkgrid input { margin: 3px 0 0; accent-color: var(--nq-red); flex: 0 0 auto; }
.checkgrid input:checked + span { font-weight: 600; }
.checkgrid label:has(input:checked) { border-color: var(--nq-red); background: var(--nq-red-wash); }

/* --------------------------------------------------------------- surfaces */

.card {
	background: var(--nq-white);
	border: 1px solid var(--nq-line);
	border-radius: var(--nq-radius);
	box-shadow: var(--nq-shadow-sm);
}
.card__body { padding: 22px; }
.card__head {
	padding: 16px 22px; border-bottom: 1px solid var(--nq-line);
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card__head h2, .card__head h3 { margin: 0; }

.panel { background: var(--nq-surface); border-radius: var(--nq-radius); padding: 20px; }

.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.layout-sidebar { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .layout-sidebar { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- pills */

.pill {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 3px 10px; border-radius: 999px;
	font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	border: 1px solid transparent; white-space: nowrap;
}
.pill--live     { background: var(--nq-green-wash); color: var(--nq-green); border-color: #cfe6d8; }
.pill--pending  { background: var(--nq-amber-wash); color: var(--nq-amber); border-color: #f3e0bd; }
.pill--rejected { background: var(--nq-red-wash);   color: var(--nq-red-dark); border-color: #f7cfcd; }
.pill--draft    { background: var(--nq-surface);    color: var(--nq-ink-soft); border-color: var(--nq-line); }
.pill--kind     { background: var(--nq-blue-wash);  color: var(--nq-blue); border-color: #d3e2ef; }

/* Department + tag chips */
.chip {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 3px 10px; border-radius: var(--nq-radius);
	font-size: .78rem; font-weight: 600;
	background: var(--nq-surface); color: var(--nq-ink-soft);
	border: 1px solid var(--nq-line);
}
a.chip:hover { border-color: var(--nq-red); color: var(--nq-red); text-decoration: none; background: var(--nq-red-wash); }
.chip--dept { border-left: 3px solid var(--nq-red); }
.chip--tag::before { content: '#'; color: var(--nq-gray); font-weight: 400; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------------ flash */

.flash {
	display: flex; gap: 10px; align-items: flex-start;
	padding: 13px 18px; margin: 20px 0 24px;
	border-radius: var(--nq-radius); border-left: 4px solid;
	font-size: .92rem;
}
.flash--success { background: var(--nq-green-wash); border-color: var(--nq-green); color: #1f5733; }
.flash--error   { background: var(--nq-red-wash);   border-color: var(--nq-red);   color: #8f1913; }
.flash--info    { background: var(--nq-blue-wash);  border-color: var(--nq-blue);  color: #234e75; }

/* ------------------------------------------------------------------- page */

main { padding: 34px 0 72px; min-height: 60vh; }

.page-head { margin-bottom: 26px; }
.page-head h1 { margin-bottom: 6px; }
.page-head p { margin: 0; color: var(--nq-gray); }
.page-head__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.breadcrumb { font-size: .82rem; color: var(--nq-gray); margin-bottom: 10px; }
.breadcrumb a { color: var(--nq-gray); }
.breadcrumb a:hover { color: var(--nq-red); }
.breadcrumb span { margin: 0 7px; opacity: .6; }

/* --------------------------------------------------------------- hero/home */

.hero {
	background: var(--nq-ink);
	background-image: linear-gradient(115deg, #1a1a1a 0%, #2b2b2b 55%, #332f1f 100%);
	color: #fff; padding: 52px 0 56px; position: relative; overflow: hidden;
}
.hero::after {
	content: ''; position: absolute; right: -80px; top: -60px;
	width: 340px; height: 340px; transform: rotate(45deg);
	background: rgba(238, 45, 36, .14);
}
.hero h1 { color: #fff; margin-bottom: 10px; }
.hero p { color: rgba(255, 255, 255, .72); max-width: 60ch; margin: 0 0 26px; font-size: 1.02rem; }
.hero .search-field { max-width: 640px; position: relative; z-index: 1; }
.hero .search-field input { border-color: transparent; padding: 15px 18px; font-size: 1rem; }
.hero .search-field .btn { padding-inline: 26px; }
.hero__meta { display: flex; gap: 26px; margin-top: 26px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero__stat strong { display: block; font-size: 1.5rem; color: #fff; font-weight: 700; line-height: 1.1; }
.hero__stat span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); }

/* Department cards */
.dept-card {
	display: block; padding: 20px; height: 100%;
	background: var(--nq-white); border: 1px solid var(--nq-line);
	border-top: 3px solid var(--nq-red); border-radius: var(--nq-radius);
	transition: box-shadow .18s ease, transform .18s ease;
}
.dept-card:hover { box-shadow: var(--nq-shadow); text-decoration: none; transform: translateY(-2px); }
.dept-card h3 { margin-bottom: 5px; font-size: 1.02rem; }
.dept-card p { margin: 0 0 12px; font-size: .86rem; color: var(--nq-gray); line-height: 1.55; }
.dept-card .count { font-size: .78rem; font-weight: 700; color: var(--nq-red); text-transform: uppercase; letter-spacing: .06em; }

/* Entry result cards */
.entry-card {
	display: block; padding: 20px 22px;
	border: 1px solid var(--nq-line); border-radius: var(--nq-radius);
	background: var(--nq-white); border-left: 3px solid var(--nq-line);
	transition: border-left-color .18s ease, box-shadow .18s ease;
}
.entry-card:hover { border-left-color: var(--nq-red); box-shadow: var(--nq-shadow-sm); text-decoration: none; }
.entry-card h3 { margin-bottom: 6px; font-size: 1.05rem; }
.entry-card h3 a { color: var(--nq-ink); }
.entry-card:hover h3 a { color: var(--nq-red); }
.entry-card p { margin: 0 0 12px; font-size: .9rem; color: var(--nq-olive); line-height: 1.6; }
.entry-card__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .78rem; color: var(--nq-gray); }

.result-list { display: flex; flex-direction: column; gap: 12px; }

/* --------------------------------------------------------------- article */

.article { max-width: 78ch; }
.article__body { font-size: 1.02rem; line-height: 1.8; color: var(--nq-olive); }
.article__body > *:first-child { margin-top: 0; }
.article__body h1, .article__body h2, .article__body h3, .article__body h4 { margin-top: 1.9em; margin-bottom: .55em; }
.article__body h2 { padding-bottom: .3em; border-bottom: 1px solid var(--nq-line); }
.article__body p { margin: 0 0 1.15em; }
.article__body ul, .article__body ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.article__body li { margin-bottom: .45em; }
.article__body img { max-width: 100%; height: auto; border-radius: var(--nq-radius); border: 1px solid var(--nq-line); }
.article__body iframe, .article__body video {
	max-width: 100%; width: 100%; aspect-ratio: 16 / 9; height: auto;
	border: 0; border-radius: var(--nq-radius); background: var(--nq-ink);
	display: block; margin: 1.5em 0;
}
.article__body blockquote {
	margin: 1.5em 0; padding: 4px 0 4px 20px;
	border-left: 3px solid var(--nq-red); color: var(--nq-ink-soft); font-style: normal;
}
.article__body code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .88em; background: var(--nq-surface); padding: 2px 6px; border-radius: 2px; color: var(--nq-ink);
}
.article__body pre, .article__body .ql-syntax {
	background: var(--nq-ink); color: #f4f4f4; padding: 16px 18px;
	border-radius: var(--nq-radius); overflow-x: auto; font-size: .88rem; line-height: 1.6;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.article__body pre code, .article__body .ql-syntax code { background: none; padding: 0; color: inherit; }
.article__body table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .92rem; }
.article__body th, .article__body td { border: 1px solid var(--nq-line); padding: 9px 12px; text-align: left; }
.article__body th { background: var(--nq-surface); font-weight: 600; color: var(--nq-ink); }
.article__body .ql-align-center { text-align: center; }
.article__body .ql-align-right  { text-align: right; }
.article__body .ql-align-justify{ text-align: justify; }
.article__body .ql-indent-1 { padding-left: 3em; }
.article__body .ql-indent-2 { padding-left: 6em; }
.article__body .ql-indent-3 { padding-left: 9em; }

/* Wide content must scroll inside itself, never the page */
.scroll-x { overflow-x: auto; }

.article-meta {
	display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
	padding: 14px 0; margin-bottom: 24px;
	border-top: 1px solid var(--nq-line); border-bottom: 1px solid var(--nq-line);
	font-size: .84rem; color: var(--nq-gray);
}

/* ------------------------------------------------------------ attachments */

.attachment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.attachment {
	display: flex; align-items: center; gap: 13px;
	padding: 12px 14px; background: var(--nq-white);
	border: 1px solid var(--nq-line); border-radius: var(--nq-radius);
}
.attachment:hover { border-color: var(--nq-gray); }
.attachment__icon {
	flex: 0 0 auto; width: 38px; height: 38px; border-radius: var(--nq-radius);
	display: grid; place-items: center;
	font-size: .62rem; font-weight: 700; letter-spacing: .03em;
	background: var(--nq-surface); color: var(--nq-ink-soft); text-transform: uppercase;
}
.attachment__icon--sheet { background: var(--nq-green-wash); color: var(--nq-green); }
.attachment__icon--doc   { background: var(--nq-blue-wash);  color: var(--nq-blue); }
.attachment__icon--pdf   { background: var(--nq-red-wash);   color: var(--nq-red-dark); }
.attachment__icon--cad   { background: #efeaf7; color: #5b3f9e; }
.attachment__body { min-width: 0; flex: 1; }
.attachment__name { display: block; font-weight: 600; color: var(--nq-ink); font-size: .9rem; word-break: break-word; }
.attachment__meta { font-size: .78rem; color: var(--nq-gray); }

/* ---------------------------------------------------------------- tables */

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
	text-align: left; padding: 11px 14px;
	font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
	color: var(--nq-gray); border-bottom: 2px solid var(--nq-line); white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--nq-line); vertical-align: top; color: var(--nq-ink); }
.table tbody tr:hover { background: #fafafa; }
.table td strong { font-weight: 600; }

/* ------------------------------------------------------- review side-by-side */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .compare { grid-template-columns: 1fr; } }
.compare__col { min-width: 0; }
.compare__label {
	font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	padding: 8px 12px; border-radius: var(--nq-radius) var(--nq-radius) 0 0; color: #fff;
}
.compare__label--live { background: var(--nq-gray); }
.compare__label--new  { background: var(--nq-red); }
.compare__pane {
	border: 1px solid var(--nq-line); border-top: 0;
	border-radius: 0 0 var(--nq-radius) var(--nq-radius);
	padding: 20px; max-height: 620px; overflow: auto; background: var(--nq-white);
}

.decision-bar {
	position: sticky; bottom: 0; z-index: 20;
	background: var(--nq-white); border-top: 2px solid var(--nq-line);
	padding: 16px 0; margin-top: 30px; box-shadow: 0 -6px 18px rgba(17,17,17,.06);
}
.decision-bar .wrap { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.decision-bar .field { flex: 1 1 320px; margin: 0; }

/* -------------------------------------------------------------- timeline */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
	position: relative; padding: 0 0 20px 26px;
	border-left: 1px solid var(--nq-line); margin-left: 5px;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
	content: ''; position: absolute; left: -5px; top: 5px;
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--nq-white); border: 2px solid var(--nq-gray);
}
.timeline li.is-current::before { border-color: var(--nq-red); background: var(--nq-red); }
.timeline__title { font-weight: 600; color: var(--nq-ink); font-size: .93rem; }
.timeline__meta { font-size: .8rem; color: var(--nq-gray); }

/* ---------------------------------------------------------------- editor */

.editor-shell { border: 1px solid var(--nq-line); border-radius: var(--nq-radius); background: var(--nq-white); }
.editor-shell .ql-toolbar {
	border: 0 !important; border-bottom: 1px solid var(--nq-line) !important;
	background: var(--nq-surface); border-radius: var(--nq-radius) var(--nq-radius) 0 0;
	position: sticky; top: 0; z-index: 5;
}
.editor-shell .ql-container {
	border: 0 !important; font-family: var(--nq-font) !important;
	font-size: 1rem; font-weight: 300;
}
.editor-shell .ql-editor { min-height: 420px; line-height: 1.75; color: var(--nq-olive); padding: 20px; }
.editor-shell .ql-editor.ql-blank::before { color: var(--nq-gray); font-style: normal; left: 20px; }
.editor-shell .ql-snow .ql-stroke { stroke: var(--nq-ink); }
.editor-shell .ql-snow .ql-fill { fill: var(--nq-ink); }
.editor-shell .ql-snow .ql-picker { color: var(--nq-ink); }
.editor-shell .ql-snow .ql-active .ql-stroke { stroke: var(--nq-red) !important; }
.editor-shell .ql-snow .ql-active .ql-fill { fill: var(--nq-red) !important; }
.editor-shell .ql-snow button:hover .ql-stroke { stroke: var(--nq-red) !important; }
.editor-shell .ql-snow button:hover .ql-fill { fill: var(--nq-red) !important; }
.editor-shell .ql-editor img { max-width: 100%; height: auto; }
.editor-shell .ql-editor iframe { max-width: 100%; aspect-ratio: 16/9; width: 100%; }

.editor-status { font-size: .8rem; color: var(--nq-gray); padding: 8px 14px; border-top: 1px solid var(--nq-line); background: var(--nq-surface); }

/* Attachment staging list in the form */
.file-drop {
	border: 2px dashed var(--nq-line); border-radius: var(--nq-radius);
	padding: 26px; text-align: center; background: var(--nq-surface);
	transition: border-color .15s ease, background .15s ease;
}
.file-drop.is-over { border-color: var(--nq-red); background: var(--nq-red-wash); }
.file-drop p { margin: 0 0 4px; color: var(--nq-ink); font-weight: 600; font-size: .92rem; }

/* --------------------------------------------------------------- sidebar */

.sidebar { position: sticky; top: 18px; }
.sidebar__section + .sidebar__section { margin-top: 26px; }
.sidebar h4 {
	font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
	color: var(--nq-gray); margin-bottom: 11px; font-weight: 700;
}
.sidebar__list { list-style: none; margin: 0; padding: 0; }
.sidebar__list li + li { margin-top: 2px; }
.sidebar__list a {
	display: flex; justify-content: space-between; gap: 8px; align-items: center;
	padding: 7px 10px; border-radius: var(--nq-radius);
	color: var(--nq-ink); font-size: .88rem;
}
.sidebar__list a:hover { background: var(--nq-surface); text-decoration: none; color: var(--nq-red); }
.sidebar__list a.is-active { background: var(--nq-red-wash); color: var(--nq-red); font-weight: 600; }
.sidebar__list .n { font-size: .76rem; color: var(--nq-gray); }

/* ------------------------------------------------------------ empty state */

.empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--nq-line); border-radius: var(--nq-radius); background: var(--nq-surface); }
.empty h3 { margin-bottom: 6px; }
.empty p { margin: 0 auto 18px; max-width: 46ch; color: var(--nq-gray); }

/* ---------------------------------------------------------------- footer */

.site-footer {
	background: var(--nq-olive); color: rgba(255, 255, 255, .78);
	padding: 34px 0; font-size: .86rem; margin-top: auto;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer strong { color: #fff; font-weight: 600; }

/* ------------------------------------------------------------------ auth */

.auth-screen { min-height: 100vh; display: grid; place-items: center; background: var(--nq-surface); padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--nq-white); border: 1px solid var(--nq-line); border-top: 4px solid var(--nq-red); border-radius: var(--nq-radius); padding: 34px; box-shadow: var(--nq-shadow-lg); }
.auth-card img { height: 42px; margin-bottom: 22px; }

/* -------------------------------------------------------------- utilities */

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 18px; }
.wrap-flex { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-3 { margin-top: 14px; } .mt-4 { margin-top: 22px; } .mt-5 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-3 { margin-bottom: 14px; } .mb-4 { margin-bottom: 22px; }
.text-right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 720px) {
	.masthead .wrap { min-height: 0; padding-block: 14px; gap: 14px; }
	.masthead__search { order: 3; flex-basis: 100%; max-width: none; }
	.hero { padding: 36px 0 40px; }
	.decision-bar .wrap { flex-direction: column; align-items: stretch; }
}

@media print {
	.topbar, .nav, .masthead__search, .masthead__actions, .site-footer,
	.decision-bar, .btn { display: none !important; }
	body { color: #000; }
	.article { max-width: none; }
}

/* reCAPTCHA widget — the iframe is a fixed 304px, so allow it to scale down
   inside the auth card on a narrow phone rather than overflowing it. */
.g-recaptcha { display: flex; justify-content: center; }
@media (max-width: 380px) {
	.g-recaptcha { transform: scale(.88); transform-origin: center; }
}
