:root {
  --brand: #8d1732;
  --brand-dark: #641025;
  --brand-deep: #430917;
  --brand-soft: #f6e9ed;
  --brand-pale: #fcf7f8;
  --ink: #17202a;
  --muted: #5e6874;
  --surface: #ffffff;
  --surface-alt: #f5f7f9;
  --line: #dfe3e8;
  --line-dark: #c7ced6;
  --focus: #ffbf47;
  --success: #176b45;
  --warning: #8b5b00;
  --danger: #a61b29;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 8px 24px rgba(26, 31, 37, .06);
  --shadow: 0 20px 55px rgba(26, 31, 37, .11);
  --bs-primary: #8d1732;
  --bs-primary-rgb: 141, 23, 50;
  --bs-link-color: #7b132b;
  --bs-link-hover-color: #541020;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--surface);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body, button, input, textarea, select { font-family: inherit; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-dark); text-underline-offset: .18em; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; letter-spacing: -.025em; }
button, a, input, textarea, select { outline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus) !important; box-shadow: 0 0 0 2px #111 !important; }
.container { width: min(1180px, calc(100% - 32px)); }
.visually-hidden-focusable:not(:focus):not(:focus-within), .skip-link:not(:focus) { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 9999; padding: 12px 16px; color: #111; background: #fff; border: 3px solid #111; font-weight: 800; }

.btn { min-height: 44px; border-radius: 12px; padding: .72rem 1.05rem; font-weight: 800; }
.btn-sm { min-height: 34px; padding: .35rem .65rem; border-radius: 9px; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-deep); --bs-btn-active-border-color: var(--brand-deep); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.form-control, .form-select { min-height: 46px; border-color: var(--line-dark); border-radius: 10px; }
textarea.form-control { min-height: auto; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(141, 23, 50, .16); }
.form-label { margin-bottom: .4rem; font-weight: 750; }
.form-text { color: var(--muted); }

/* Public utility bar and navigation */
.utility { color: #fff; background: var(--brand-deep); font-size: .86rem; }
.utility-inner { display: flex; min-height: 46px; align-items: center; gap: 12px; }
.utility a { color: #fff; text-decoration: none; }
.utility > .container > a:not(.emergency-link) { display: none; }
.emergency-link { display: inline-flex; align-items: center; gap: 7px; }
.emergency-link strong { display: grid; width: 34px; height: 34px; place-items: center; color: var(--brand-deep); background: #fff; border-radius: 50%; }
.emergency-link span { display: none; }
.utility-actions { display: flex; margin-left: auto; align-items: center; gap: 6px; }
.utility-actions > button, .lang-switch { min-width: 40px; min-height: 36px; padding: 6px 9px; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; font-weight: 800; }
.quick-exit { color: var(--brand-deep) !important; background: #fff !important; border-color: #fff !important; white-space: nowrap; }
.site-search-mini { display: none; position: relative; }
.site-search-mini input { width: 170px; height: 34px; padding: 5px 36px 5px 10px; color: #111; background: #fff; border: 0; border-radius: 8px; }
.site-search-mini button { position: absolute; right: 0; width: 34px; height: 34px; color: #111; background: transparent; border: 0; }
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.nav-wrap { position: relative; display: flex; min-height: 74px; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; max-width: calc(100% - 64px); color: var(--ink); text-decoration: none; font-size: .78rem; font-weight: 850; line-height: 1.2; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; color: #fff; background: var(--brand); border-radius: 13px; font-size: 1rem; }
.menu-toggle { display: inline-grid; margin-left: auto; width: 46px; height: 44px; place-items: center; color: var(--brand-dark); background: var(--brand-soft); border: 0; border-radius: 11px; font-size: 1.3rem; }
.main-nav { display: none; position: absolute; top: 74px; right: -16px; left: -16px; padding: 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.main-nav.open { display: grid; gap: 3px; }
.main-nav a { display: block; padding: 11px 12px; color: var(--ink); text-decoration: none; border-radius: 8px; font-size: .95rem; font-weight: 750; }
.main-nav a:hover { color: var(--brand); background: var(--brand-pale); }

/* Hero and homepage */
.hero { position: relative; overflow: hidden; padding: 48px 0 66px; color: #fff; background: linear-gradient(135deg, var(--brand-deep), var(--brand) 65%, #a82946); }
.hero::after { content: ""; position: absolute; right: -180px; bottom: -240px; width: 520px; height: 520px; border: 80px solid rgba(255,255,255,.06); border-radius: 50%; }
.hero-grid { position: relative; z-index: 1; display: grid; gap: 28px; }
.eyebrow { display: inline-block; color: var(--brand); font-size: .75rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.hero .eyebrow { color: #f5cbd5; }
.hero h1 { max-width: 900px; margin: .35em 0 .25em; color: #fff; font-size: clamp(2.45rem, 12vw, 5.4rem); line-height: .98; }
.hero p { max-width: 730px; margin: 0; color: rgba(255,255,255,.9); font-size: 1.06rem; }
.hero-actions { display: grid; gap: 10px; margin-top: 28px; }
.hero-actions .btn { width: 100%; }
.help-card { padding: 24px; color: var(--ink); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.help-card h2 { margin: 14px 0 6px; font-size: 1.45rem; }
.help-card p { color: var(--muted); font-size: .96rem; }
.help-card a { color: var(--brand); font-size: 1.25rem; font-weight: 900; text-decoration: none; }
.help-number { display: grid; width: 66px; height: 66px; place-items: center; color: #fff; background: var(--brand); border-radius: 50%; font-size: 1.45rem; font-weight: 900; }
.quick-links { position: relative; z-index: 4; margin-top: -28px; }
.cards, .grid-3 { display: grid; gap: 14px; }
.cards > a { display: block; padding: 22px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); text-decoration: none; }
.cards > a:hover { transform: translateY(-2px); border-color: rgba(141,23,50,.35); box-shadow: var(--shadow); }
.cards strong { color: var(--brand); font-size: .78rem; letter-spacing: .12em; }
.cards h2 { margin: 9px 0 6px; font-size: 1.25rem; }
.cards p { margin: 0; color: var(--muted); }
.listing { padding: 54px 0; }
.listing:nth-of-type(even) { background: var(--surface-alt); }
.section-head { display: flex; margin-bottom: 22px; align-items: end; justify-content: space-between; gap: 15px; }
.section-head h2 { margin: 4px 0 0; font-size: clamp(1.7rem, 5vw, 2.55rem); }
.section-link { font-weight: 800; white-space: nowrap; }
.content-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e8ebef; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.content-card:hover .card-media img { transform: scale(1.025); }
.card-body { padding: 20px; }
.card-body > span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.card-body h2, .card-body h3 { margin: 8px 0; line-height: 1.2; }
.card-body h2 { font-size: 1.35rem; }
.card-body h3 { font-size: 1.2rem; }
.card-body h2 a, .card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body p { margin: 0; color: var(--muted); }
.read-more { display: inline-block; margin-top: 14px; font-weight: 800; }
.empty-state { grid-column: 1 / -1; padding: 34px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line-dark); border-radius: var(--radius); }
.institution-links { padding: 55px 0; background: var(--brand-pale); }
.institution-links .grid-3 a { display: grid; gap: 6px; padding: 24px; color: var(--ink); background: #fff; border: 1px solid #ead8dd; border-radius: var(--radius); text-decoration: none; }
.institution-links strong { color: var(--brand-dark); font-size: 1.2rem; }
.institution-links span { color: var(--muted); }

/* Public inner pages */
.page-hero { padding: 48px 0; background: linear-gradient(135deg, var(--brand-soft), #fff); border-bottom: 1px solid #ead8dd; }
.page-hero h1 { max-width: 980px; margin: 8px 0 10px; font-size: clamp(2.1rem, 8vw, 4.4rem); line-height: 1.03; }
.page-hero p { max-width: 800px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.detail-hero { padding-bottom: 58px; }
.breadcrumbs { display: flex; margin-bottom: 22px; gap: 8px; color: var(--muted); font-size: .9rem; }
.detail-meta { display: flex; margin-top: 20px; flex-wrap: wrap; gap: 8px; }
.detail-meta span { padding: 6px 10px; background: rgba(255,255,255,.7); border: 1px solid #e7d5da; border-radius: 999px; font-size: .88rem; font-weight: 700; }
.detail-cover { display: block; width: 100%; max-height: 560px; margin-top: -28px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-layout { display: grid; gap: 28px; padding-top: 42px; padding-bottom: 70px; }
.prose { width: 100%; max-width: 860px; font-size: 1.04rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2em; font-size: 1.8rem; }
.prose h3 { margin-top: 1.7em; font-size: 1.4rem; }
.prose p, .prose li { max-width: 78ch; }
.prose a { font-weight: 700; }
.prose img { border-radius: 12px; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); }
.prose th { background: var(--surface-alt); }
.article-side { display: grid; align-content: start; gap: 15px; }
.share-box, .event-box { display: grid; gap: 9px; padding: 18px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.share-box button { padding: 8px 10px; color: var(--brand); background: #fff; border: 1px solid var(--line-dark); border-radius: 8px; font-weight: 750; }
.public-filter { display: grid; gap: 10px; margin-bottom: 28px; padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.public-filter input, .public-filter select { min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-dark); border-radius: 10px; }
.content-list-grid { display: grid; gap: 18px; }
.horizontal-card { display: grid; }
.pagination-simple { display: flex; margin-top: 30px; flex-wrap: wrap; gap: 7px; }
.pagination-simple a { display: grid; min-width: 42px; min-height: 42px; place-items: center; background: #fff; border: 1px solid var(--line-dark); border-radius: 9px; text-decoration: none; font-weight: 800; }
.pagination-simple a.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.search-summary { margin-bottom: 22px; color: var(--muted); }
.search-results { display: grid; gap: 12px; }
.search-results article { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.search-results article > span { color: var(--brand); font-size: .78rem; font-weight: 850; text-transform: uppercase; }
.search-results h2 { margin: 6px 0; font-size: 1.25rem; }
.search-results p { margin: 0; color: var(--muted); }

/* Buyer profile */
.procurement-list { display: grid; gap: 14px; }
.procurement-list article { display: grid; gap: 18px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.procurement-list h2 { margin: 8px 0; font-size: 1.3rem; line-height: 1.25; }
.procurement-list h2 a { color: var(--ink); text-decoration: none; }
.procurement-list p { margin: 0; color: var(--muted); }
.status-pill { display: inline-flex; padding: 4px 9px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; font-size: .76rem; font-weight: 850; }
.procurement-list dl, .detail-list { display: grid; margin: 0; gap: 10px; }
.procurement-list dl div, .detail-list div { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.procurement-list dt, .detail-list dt { color: var(--muted); font-size: .78rem; font-weight: 700; }
.procurement-list dd, .detail-list dd { margin: 1px 0 0; font-weight: 800; }
.procurement-detail { display: grid; gap: 28px; padding-top: 36px; padding-bottom: 70px; }
.public-card { padding: 22px; }
.documents-section { padding-top: 16px; }
.document-list { display: grid; gap: 10px; }
.document-list > a { display: grid; gap: 2px; padding: 15px 16px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 8px; text-decoration: none; }
.document-list > a span, .document-list > a small { color: var(--muted); font-size: .78rem; }

/* Gallery */
.public-gallery { display: grid; gap: 16px; padding-top: 10px; padding-bottom: 70px; }
.public-gallery figure { margin: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.gallery-open { display: block; width: 100%; padding: 0; background: #e7eaee; border: 0; }
.gallery-open img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.public-gallery figcaption { padding: 12px 14px; color: var(--muted); }
.video-embed { display: grid; min-height: 220px; place-items: center; background: var(--ink); }
.video-embed a { color: #fff; font-weight: 800; }
dialog#galleryDialog { width: min(1100px, calc(100% - 28px)); max-height: 92vh; padding: 12px; background: #111; border: 0; border-radius: 14px; }
dialog#galleryDialog::backdrop { background: rgba(0,0,0,.82); }
dialog#galleryDialog img { display: block; max-height: calc(92vh - 24px); margin: auto; }
dialog#galleryDialog button { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; color: #111; background: #fff; border: 0; border-radius: 50%; font-size: 1.5rem; }

/* Secure report */
.report-hero { color: #fff; background: linear-gradient(135deg, var(--brand-deep), var(--brand)); }
.report-hero h1, .report-hero .eyebrow { color: #fff; }
.report-hero p { color: rgba(255,255,255,.9); }
.report-layout { display: grid; gap: 24px; padding-top: 40px; padding-bottom: 70px; }
.report-guidance { padding: 22px; background: var(--brand-pale); border: 1px solid #ead8dd; border-radius: var(--radius); }
.report-guidance h2 { font-size: 1.45rem; }
.report-guidance ul { padding-left: 20px; }
.emergency-box { display: flex; margin-top: 20px; padding: 14px; align-items: center; gap: 12px; color: #fff; background: var(--brand-dark); border-radius: 12px; text-decoration: none; }
.emergency-box strong { font-size: 1.5rem; }
.report-form-wrap { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.success-page { display: grid; min-height: 65vh; padding: 50px 0; place-items: center; background: var(--surface-alt); }
.success-card { max-width: 680px; margin: auto; padding: 38px 24px; text-align: center; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.success-card > span { display: grid; width: 68px; height: 68px; margin: 0 auto 15px; place-items: center; color: #fff; background: var(--success); border-radius: 50%; font-size: 2rem; }
.success-card > strong { display: block; margin: 14px 0; color: var(--brand); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(1.15rem, 5vw, 1.8rem); }

/* Footer and accessibility */
footer { padding: 48px 0 18px; color: #fff; background: #111923; }
footer h2 { color: #fff; font-size: 1rem; }
footer a { color: #fff; }
.footer-grid { display: grid; gap: 26px; }
.footer-grid > div { display: grid; align-content: start; gap: 6px; }
.footer-grid p { margin: 4px 0; color: rgba(255,255,255,.75); }
.footer-bottom { display: flex; margin-top: 30px; padding-top: 16px; flex-direction: column; gap: 5px; color: rgba(255,255,255,.65); border-top: 1px solid rgba(255,255,255,.14); font-size: .82rem; }
.a11y-panel { position: fixed; right: 14px; bottom: 14px; z-index: 500; display: flex; padding: 10px; align-items: center; gap: 5px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.a11y-panel[hidden] { display: none; }
.a11y-panel strong { display: none; }
.a11y-panel button { min-width: 40px; height: 40px; background: #fff; border: 1px solid var(--line-dark); border-radius: 8px; font-weight: 800; }
.high-contrast { --brand: #770021; --brand-dark: #4d0015; --muted: #323232; --line: #777; filter: contrast(1.15); }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }

/* Admin */
.admin-body { min-height: 100vh; color: var(--ink); background: #eef1f4; }
.admin-top { position: sticky; top: 0; z-index: 300; display: flex; min-height: 62px; padding: 0 14px; align-items: center; gap: 12px; color: #fff; background: #17202a; box-shadow: 0 4px 15px rgba(0,0,0,.1); }
.admin-brand { color: #fff; text-decoration: none; font-weight: 850; }
.admin-brand:hover { color: #fff; }
.admin-menu-toggle { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; background: rgba(255,255,255,.1); border: 0; border-radius: 8px; }
.admin-user { display: flex; margin-left: auto; align-items: center; gap: 10px; font-size: .88rem; }
.admin-user > span { display: none; }
.admin-user form { margin: 0; }
.link-button { padding: 0; color: #fff; background: transparent; border: 0; text-decoration: underline; }
.admin-shell { display: block; min-height: calc(100vh - 62px); }
.admin-sidebar { display: none; position: fixed; top: 62px; right: 0; bottom: 0; left: 0; z-index: 250; padding: 16px; overflow-y: auto; background: #1f2a35; }
.admin-sidebar.open { display: block; }
.admin-sidebar nav { display: grid; gap: 2px; }
.admin-sidebar a { padding: 10px 12px; color: #e7edf2; border-radius: 8px; text-decoration: none; font-size: .92rem; font-weight: 700; }
.admin-sidebar a:hover { color: #fff; background: rgba(255,255,255,.08); }
.admin-sidebar hr { border-color: rgba(255,255,255,.18); }
.admin-main { width: min(1380px, calc(100% - 24px)); margin: 0 auto; padding: 22px 0 48px; }
.admin-login-wrap { display: grid; min-height: 100vh; padding: 20px; place-items: center; background: linear-gradient(135deg, #17202a, var(--brand-dark)); }
.login-card { width: min(460px, 100%); padding: 28px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.login-card h1 { margin: 15px 0 6px; font-size: 1.8rem; }
.login-card > p { color: var(--muted); }
.login-mark { display: grid; width: 58px; height: 58px; place-items: center; color: #fff; background: var(--brand); border-radius: 16px; font-weight: 900; }
.admin-page-head { display: flex; margin-bottom: 20px; flex-direction: column; align-items: flex-start; gap: 14px; }
.admin-page-head h1 { margin: 1px 0 3px; font-size: clamp(1.75rem, 5vw, 2.5rem); }
.admin-page-head p { margin: 0; color: var(--muted); }
.admin-kicker { color: var(--brand); font-size: .74rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.admin-card { padding: 18px; background: #fff; border: 1px solid #e1e5e9; border-radius: 15px; box-shadow: 0 4px 14px rgba(25,33,42,.04); }
.admin-card h2 { margin: 0 0 16px; font-size: 1.25rem; }
.admin-card-head { display: flex; margin-bottom: 14px; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-card-head h2 { margin-bottom: 2px; }
.admin-card-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.admin-stats { display: grid; margin-bottom: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-stats a { display: grid; padding: 16px; color: var(--ink); background: #fff; border: 1px solid #e1e5e9; border-radius: 13px; text-decoration: none; }
.admin-stats strong { font-size: 1.75rem; line-height: 1; }
.admin-stats span { margin-top: 7px; color: var(--muted); font-size: .78rem; }
.admin-filter { display: grid; margin-bottom: 15px; gap: 8px; }
.table { margin: 0; }
.table th { color: var(--muted); background: #f7f8fa; font-size: .74rem; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.table td { vertical-align: middle; }
.table td small { display: block; color: var(--muted); }
.type-badge { display: inline-flex; padding: 4px 8px; color: #33404c; background: #edf0f3; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.status { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.status-published, .status-closed { color: #105839; background: #dff4e9; }
.status-draft, .status-new { color: #785000; background: #fff0c7; }
.status-review, .status-assigned { color: #164e7a; background: #e0f0fd; }
.status-archived { color: #555; background: #e9e9e9; }
.editor-layout { display: grid; gap: 16px; }
.editor-main { display: grid; gap: 16px; min-width: 0; }
.editor-side { min-width: 0; }
.sticky-card { position: static; }
.featured-preview { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; }
.nav-tabs .nav-link { color: var(--muted); font-weight: 800; }
.nav-tabs .nav-link.active { color: var(--brand); }
.code-editor { min-height: 360px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.5; tab-size: 2; }
.html-toolbar { display: flex; margin-bottom: 6px; flex-wrap: wrap; gap: 4px; }
.html-toolbar button { min-width: 42px; padding: 5px 8px; color: #33404c; background: #f2f4f6; border: 1px solid var(--line-dark); border-radius: 7px; font-size: .78rem; font-weight: 800; }
.type-section[hidden] { display: none !important; }
.danger-zone { margin-top: 22px; padding: 20px; background: #fff5f5; border: 1px solid #f0c6c9; border-radius: 14px; }
.danger-zone h2 { color: var(--danger); font-size: 1.2rem; }
.gallery-admin-grid, .media-grid { display: grid; gap: 12px; }
.gallery-admin-grid article, .media-card { display: grid; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.gallery-admin-grid img, .media-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e9edf0; }
.gallery-admin-grid article > strong { padding: 10px 12px 0; }
.gallery-admin-grid article > form { padding: 10px 12px; }
.video-placeholder, .file-icon { display: grid; min-height: 150px; place-items: center; color: var(--muted); background: #e9edf0; font-weight: 900; }
.media-grid { margin-top: 16px; }
.media-card > div:not(.media-actions) { display: grid; padding: 12px; gap: 4px; }
.media-card code { overflow-wrap: anywhere; color: var(--brand); font-size: .72rem; }
.media-card small { color: var(--muted); }
.media-actions { display: flex; padding: 0 12px 12px; flex-wrap: wrap; gap: 7px; }
.media-actions form { margin: 0; }
.signal-layout { display: grid; gap: 16px; }
.signal-meta { display: grid; gap: 10px; }
.signal-meta div { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.signal-meta dt { color: var(--muted); font-size: .78rem; }
.signal-meta dd { margin: 0; font-weight: 750; }
.signal-message { margin-top: 22px; padding: 18px; background: #f7f8fa; border-left: 4px solid var(--brand); border-radius: 7px; white-space: normal; }
.security-note { margin: 18px 0 0; padding: 12px; color: #5c4300; background: #fff3cd; border-radius: 9px; font-size: .84rem; }
.narrow-card { max-width: 720px; }

@media (min-width: 576px) {
  .hero-actions { display: flex; flex-wrap: wrap; }
  .hero-actions .btn { width: auto; }
  .public-filter { grid-template-columns: minmax(0, 1fr) auto; }
  .procurement-filter { grid-template-columns: minmax(0, 1fr) minmax(160px, .35fr) auto; }
  .admin-filter { grid-template-columns: minmax(170px, .35fr) minmax(220px, 1fr) auto; }
  .admin-page-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .gallery-admin-grid, .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .utility > .container > a:not(.emergency-link) { display: inline-flex; }
  .emergency-link span, .admin-user > span { display: inline; }
  .site-search-mini { display: block; }
  .brand { max-width: 440px; font-size: .9rem; }
  .hero { padding: 72px 0 86px; }
  .hero-grid { grid-template-columns: minmax(0, 1.7fr) minmax(290px, .65fr); align-items: end; }
  .cards, .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.6fr .8fr .8fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .horizontal-card { grid-template-columns: 240px minmax(0, 1fr); }
  .horizontal-card .card-media { height: 100%; aspect-ratio: auto; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .procurement-list article { grid-template-columns: minmax(0, 1fr) 280px; }
  .procurement-detail { grid-template-columns: 300px minmax(0, 1fr); }
  .documents-section { grid-column: 1 / -1; }
  .report-layout { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
  .report-guidance { position: sticky; top: 100px; }
  .admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery-admin-grid, .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .signal-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .public-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .menu-toggle { display: none; }
  .main-nav { display: flex; position: static; margin-left: auto; padding: 0; align-items: center; gap: 1px; background: transparent; border: 0; box-shadow: none; }
  .main-nav a { padding: 9px 8px; font-size: .82rem; }
  .admin-menu-toggle { display: none; }
  .admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
  .admin-sidebar { display: block; position: sticky; top: 62px; height: calc(100vh - 62px); padding: 18px 14px; }
  .admin-main { width: min(1380px, calc(100% - 38px)); padding-top: 28px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; }
  .sticky-card { position: sticky; top: 88px; }
  .gallery-admin-grid, .media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .a11y-panel strong { display: block; margin-right: 4px; font-size: .8rem; }
}

@media (min-width: 1280px) {
  .main-nav a { padding-inline: 10px; font-size: .86rem; }
}

@media (max-width: 430px) {
  .quick-exit { max-width: 100px; font-size: .72rem; }
  .utility-actions { gap: 4px; }
  .utility-actions > button, .lang-switch { min-width: 36px; padding-inline: 6px; }
  .brand span:last-child { max-width: 220px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .section-link { white-space: normal; }
  .admin-user { font-size: .78rem; }
}

@media print {
  .utility, .site-header, footer, .a11y-panel, .article-side, .menu-toggle, .admin-top, .admin-sidebar, .btn, form { display: none !important; }
  body { color: #000; background: #fff; font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .page-hero { padding: 15px 0; background: #fff; border: 0; }
  .article-layout, .procurement-detail { display: block; padding: 0; }
  .prose { max-width: none; }
}

/* v0.3.0: migration, quality and expanded content modules */
.site-notice { padding: 9px 0; color: #2d2325; background: #fff2c9; border-bottom: 1px solid #ead99d; font-weight: 750; font-size: .88rem; }
.admin-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-nav-label { display: block; margin: 18px 12px 6px; color: #9fa8b2; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.settings-grid, .migration-grid { display: grid; gap: 16px; }
.admin-save-bar { position: sticky; z-index: 5; bottom: 0; display: flex; margin-top: 18px; padding: 14px; justify-content: flex-end; background: rgba(244,246,248,.95); border-top: 1px solid var(--line-dark); backdrop-filter: blur(8px); }
.quality-stats .is-current { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(128,17,38,.08); }
.quality-overview { margin-bottom: 16px; }
.quality-inline { display: grid; gap: 8px; }
.quality-inline a { display: flex; padding: 12px; align-items: center; justify-content: space-between; color: var(--ink); background: #f7f8fa; border-radius: 10px; text-decoration: none; }
.quality-inline strong { font-size: 1.3rem; }
.command-box, .audit-details { max-width: 100%; margin: 0; padding: 14px; overflow: auto; color: #e9eef2; background: #192028; border-radius: 10px; font-size: .76rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.status-imported { color: #105839; background: #dff4e9; }
.status-pending { color: #785000; background: #fff0c7; }
.status-failed { color: #7a1423; background: #f9dde2; }
.advanced-public-filter { grid-template-columns: minmax(0,1fr); }
.advanced-public-filter > div, .advanced-public-filter input, .advanced-public-filter select { width: 100%; }
.results-count { margin: 12px 0 20px; color: var(--muted); font-size: .85rem; font-weight: 750; }
.content-category { display: inline-flex; width: max-content; margin-bottom: 5px; padding: 3px 8px; color: var(--brand); background: #f7e9ec; border-radius: 999px; font-size: .72rem; font-weight: 850; }
.card-meta-line { display: flex; margin: 5px 0 12px; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .8rem; }
.card-meta-line strong { color: var(--brand); }
.resource-hub { padding: 54px 0; background: #f5f1ef; }
.resource-columns { display: grid; gap: 18px; }
.resource-columns > div { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.resource-columns h3 { margin-bottom: 16px; }
.resource-columns > div > a:not(.section-link) { display: grid; padding: 12px 0; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; gap: 4px; }
.resource-columns > div > a span { color: var(--muted); font-size: .78rem; }
.resource-columns .section-link { display: inline-flex; margin-top: 16px; }
.local-support { padding: 54px 0; }
.commission-grid { display: grid; gap: 12px; }
.commission-grid > a { display: grid; padding: 18px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; text-decoration: none; gap: 6px; }
.commission-grid > a span { color: var(--brand); font-size: .78rem; font-weight: 800; }
.commission-grid > a p { margin: 0; color: var(--muted); }
.search-page-filter { grid-template-columns: 1fr; }
.event-box a { display: block; margin-top: 8px; overflow-wrap: anywhere; }

@media (min-width: 768px) {
  .settings-grid, .migration-grid, .resource-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quality-inline { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .commission-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .advanced-public-filter { grid-template-columns: minmax(220px,1fr) repeat(3,minmax(140px,.35fr)) auto; align-items: end; }
  .search-page-filter { grid-template-columns: minmax(0,1fr) minmax(180px,.35fr) auto; }
}

@media (min-width: 1100px) {
  .commission-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

/* v0.4.0: configurable navigation and production diagnostics */
.nav-group { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 42px; align-items: center; }
.nav-group > a { min-width: 0; }
.submenu-toggle { min-height: 42px; color: var(--brand); background: transparent; border: 0; font-weight: 900; }
.submenu { grid-column: 1 / -1; display: grid; padding: 5px 12px 10px 18px; background: #f6f2f3; }
.submenu[hidden] { display: none; }
.submenu a { padding-block: 8px; }
.menu-tabs { display: flex; margin-bottom: 16px; overflow-x: auto; gap: 7px; }
.menu-tabs a { padding: 9px 13px; color: var(--ink); background: #fff; border: 1px solid var(--line-dark); border-radius: 9px; text-decoration: none; white-space: nowrap; }
.menu-tabs a.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.menu-admin-layout, .system-grid { display: grid; gap: 16px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.table-actions form { margin: 0; }
.health-summary { display: grid; margin-bottom: 16px; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.health-summary > div { display: grid; padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.health-summary strong { font-size: 1.65rem; line-height: 1; }
.health-summary span { margin-top: 6px; color: var(--muted); font-size: .78rem; }
.health-bad { border-left: 4px solid #b4232f !important; }
.health-warning { border-left: 4px solid #bc7a00 !important; }
.health-ok { border-left: 4px solid #18734a !important; }
.health-neutral { border-left: 4px solid #45627a !important; }
.health-list { display: grid; gap: 8px; }
.health-row { display: grid; padding: 10px 12px; grid-template-columns: 30px minmax(0,1fr); align-items: start; border-radius: 10px; }
.health-row > span { display: grid; width: 24px; height: 24px; place-items: center; color: #fff; border-radius: 50%; font-weight: 900; }
.health-row strong, .health-row small { display: block; }
.health-row small { margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.health-row.is-ok { background: #eef8f2; }.health-row.is-ok > span { background: #18734a; }
.health-row.is-warning { background: #fff7e5; }.health-row.is-warning > span { background: #bc7a00; }
.health-row.is-error { background: #fff0f1; }.health-row.is-error > span { background: #b4232f; }
.system-env { display: grid; gap: 8px; }
.system-env div { display: grid; padding-bottom: 8px; grid-template-columns: 130px minmax(0,1fr); border-bottom: 1px solid var(--line); }
.system-env dt { color: var(--muted); font-size: .8rem; }.system-env dd { margin: 0; overflow-wrap: anywhere; font-weight: 750; }
.log-level { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .72rem; font-weight: 900; }
.level-critical,.level-error { color: #8d1721; background: #ffe2e5; }.level-warning { color: #704800; background: #ffefc2; }.level-notice { color: #31546c; background: #e5f0f7; }

@media (min-width: 768px) {
  .menu-admin-layout { grid-template-columns: minmax(0,1fr) 360px; align-items: start; }
  .system-grid { grid-template-columns: minmax(0,1.3fr) minmax(300px,.7fr); align-items: start; }
}
@media (min-width: 1100px) {
  .nav-group { display: flex; align-items: center; }
  .submenu-toggle { min-width: 28px; min-height: 38px; padding: 0 7px 2px 1px; }
  .submenu { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; min-width: 240px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 32px rgba(26,31,36,.14); }
  .submenu a { display: block; padding: 9px 10px; border-radius: 7px; }
  .submenu a:hover { background: #f5f1f2; }
}
