/* CANARIE Collaboration Hub. Matches the reviewed design 1:1, including its colours. */
:root {
  /* One place to change if the teal contrast issue (2.06:1) gets fixed. */
  --teal: #72bfce;
  --teal-text: var(--teal);
  --teal-dark: #4a9fb2;
  --teal-pale: #b8e0e8;
  --ink: #333;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --panel: #f4f4f4;
  --heading-font: "Outfit", "Avenir Next", system-ui, sans-serif;
  --body-font: "Roboto", system-ui, sans-serif;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 var(--body-font); color: var(--ink); background: #fff; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
a { color: var(--teal-text); }
h1, h2, h3 { font-family: var(--heading-font); font-weight: 400; line-height: 1.2; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: .5rem 1rem; z-index: 99; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid #1b4fd8; outline-offset: 2px; }

/* Header */
.site-header { border-bottom: 2px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 1rem; padding-bottom: .75rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: #000; }
.brand-word { font: 600 2rem/1 var(--heading-font); letter-spacing: -.02em; }
.brand-sub { font-size: .65rem; line-height: 1.2; border-left: 1px solid #999; padding-left: .6rem; color: #444; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; margin-left: auto; }
.utility { display: flex; gap: .6rem; align-items: center; font-size: .75rem; }
.utility a, .lang-current { text-decoration: none; color: #000; }
.utility a[hreflang] { color: var(--teal-text); }
.lang-current { font-weight: 700; }
.main-nav { display: flex; gap: 1.5rem; align-items: center; }
.main-nav > a, .dropdown-toggle { font: 700 .85rem/1 var(--body-font); letter-spacing: .12em; text-transform: uppercase; color: #000; text-decoration: none; background: none; border: 0; padding: .4rem 0; cursor: pointer; }
.dropdown-toggle::after { content: " \25BE"; color: var(--teal); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; z-index: 20; min-width: 15rem; margin: .25rem 0 0; padding: .5rem 0; list-style: none; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.dropdown-menu a, .link-button { display: block; padding: .55rem 1.25rem; font: 500 .8rem var(--body-font); letter-spacing: .1em; text-transform: uppercase; color: #000; text-decoration: none; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.dropdown-menu a:hover, .link-button:hover { background: var(--panel); }
.utility .dropdown-toggle { font-size: .75rem; letter-spacing: 0; text-transform: none; font-weight: 400; }
.canarie-link { flex: none; }

/* Buttons */
.btn { display: inline-block; font: 700 .72rem/1 var(--body-font); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: .8rem 1.2rem; border: 2px solid var(--teal); color: var(--teal-text); background: #fff; cursor: pointer; }
.btn-small { padding: .5rem .75rem; border-width: 1px; font-size: .65rem; }
.btn-solid { background: var(--teal); color: #fff; }
.btn-white { background: #fff; color: var(--teal-text); border-color: #fff; }
.btn-ghost { border-color: #888; color: #444; background: transparent; }
.btn:hover { filter: brightness(.95); }

/* Search + breadcrumb */
.searchbar { display: flex; margin: 1.25rem 0 0; background: var(--panel); padding: .6rem .8rem; }
.searchbar input { flex: 1; padding: .55rem .7rem; border: 1px solid #cfcfcf; font: inherit; font-size: .9rem; }
.searchbar button { width: 2.6rem; border: 0; background: var(--teal); color: #fff; cursor: pointer; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .8rem; margin: 1.5rem 0 .5rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb [aria-current] { font-weight: 500; }

/* Type */
.page-title { font-size: 2.4rem; margin: .5rem 0 1rem; }
.section-title { font: 600 1.25rem var(--heading-font); margin: 2rem 0 1rem; }
.lede, .intro { font-size: 1.1rem; color: #444; }
.rich p, .rich li { max-width: 72ch; }
.muted { color: var(--muted); font-size: .85rem; }
.empty { color: var(--muted); padding: 1rem 0; }
.notice { background: var(--panel); font-size: .8rem; padding: .7rem 1rem; color: #555; }
.messages { list-style: none; padding: 0; margin: 1rem 0; }
.message { padding: .75rem 1rem; background: #e7f4ea; border-left: 4px solid #2e7d32; }
.message.error { background: #fdecea; border-color: #b71c1c; }

/* TLP */
.tlp { display: inline-block; font: 700 .78rem/1 "Courier New", monospace; letter-spacing: .02em; padding: .22rem .35rem; background: #000; color: #fff; }
.tlp-green { color: #33ff00; }
.tlp-amber, .tlp-amber-strict { color: #ffc000; }

/* Notification block inside advisory bodies */
.notification { padding: .75rem 1rem; margin: 1rem 0; border-left: 4px solid var(--teal); background: var(--panel); }
.notification p { margin: .25rem 0; }
.notification-warning { border-color: #e0a800; background: #fff7e0; }
.notification-critical { border-color: #b71c1c; background: #fdecea; }
.rich-body .block-heading, .rich-body h2 { margin-top: 1.5rem; }
.rich-body pre { background: #f4f4f4; padding: 1rem; overflow-x: auto; }
.rich-body blockquote { border-left: 3px solid var(--line); margin: 1rem 0; padding-left: 1rem; color: #555; }
.rich-body table { border-collapse: collapse; margin: 1rem 0; }
.rich-body td, .rich-body th { border: 1px solid var(--line); padding: .4rem .6rem; }
.page-tlp { margin-top: 1rem; }

/* Knowledge base promo and stats */
.kb-promo { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; background: var(--teal); color: #fff; padding: 2rem; margin: 2rem 0; }
.kb-promo h2 { margin: 0 0 1rem; font-weight: 600; }
.kb-promo a:not(.btn) { color: #fff; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 0; align-content: center; }
.stat { background: #fff; color: var(--ink); text-align: center; padding: 1rem .5rem; }
.stat dd { margin: 0; font: 600 1.5rem var(--heading-font); color: var(--teal-text); }
.stat dt { font-size: .75rem; }
.stat-grid .stat { display: flex; flex-direction: column-reverse; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.5rem 0; }
.stat-flat { background: var(--panel); }
.stat-flat dd { color: var(--ink); font-size: 1.15rem; font-weight: 500; }

/* Card rows */
.row { margin: 2.5rem 0; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.row-head h2 { color: var(--teal-text); font-size: 1.6rem; margin: 0 0 1rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.cards-grid { margin: 1.5rem 0; }
.card { display: flex; flex-direction: column; padding: 1rem; box-shadow: 0 1px 6px rgba(0,0,0,.12); background: #fff; min-height: 14rem; }
.card-top { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; color: #555; }
.card-title { font: 400 1rem/1.35 var(--heading-font); margin: .9rem 0 .5rem; }
.card-desc, .card-author, .card-location { font-size: .75rem; color: #666; margin: .25rem 0; }
.card-bottom { margin-top: auto; padding-top: 1rem; display: flex; justify-content: space-between; align-items: flex-end; }
.pill { display: inline-block; font-size: .65rem; padding: .15rem .45rem; background: #f0f0f0; border: 1px solid #ddd; color: #222; }
.pill-dark { background: #666; border-color: #666; color: #fff; }

/* Filters + table */
.filters { background: var(--panel); padding: 1rem; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-label { font: 700 .7rem var(--body-font); letter-spacing: .08em; text-transform: uppercase; }
.filter-fields label, .filter-line label { display: block; font-weight: 500; margin-top: 1rem; }
.filter-fields input, .filter-fields select, .alert-form input, .alert-form select, .alert-form textarea, .stack input, .comment-form textarea, .reply-box textarea { width: 100%; padding: .6rem; border: 1px solid #cfcfcf; font: inherit; background: #fff; }
.filter-line { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; }
.btn-apply { min-width: 14rem; }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; font-size: .85rem; }
.results-bar select { width: auto; padding: .3rem; }
.kb-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .85rem; }
.kb-table th { text-align: left; padding: .8rem .5rem; border-bottom: 2px solid var(--line); font-weight: 700; }
.kb-table td { padding: .8rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.kb-table tbody tr:hover { background: var(--panel); }
.kb-title-line { display: flex; gap: .75rem; align-items: baseline; }
.kb-title-line a { font-weight: 700; color: var(--ink); text-decoration: none; }
.kb-title p { margin: .25rem 0 0; color: #666; font-size: .78rem; }
.kb-author, .kb-date { font-size: .78rem; white-space: nowrap; }
.pagination { display: flex; gap: 1.5rem; justify-content: center; margin: 1.5rem 0; }
.inline-filter { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin: 1rem 0; }
.inline-filter select { padding: .5rem; margin-left: .5rem; }

/* Article */
.meta-bar { display: flex; justify-content: space-between; gap: 1rem; background: var(--panel); padding: 1rem; margin: 1.25rem 0; font-size: .8rem; }
.meta-bar p { margin: .35rem 0; }
.meta-actions { display: flex; gap: .25rem; align-items: flex-start; }
.article-layout { display: grid; grid-template-columns: 1fr 18rem; gap: 2rem; align-items: start; }
.article-side { background: var(--panel); padding: 1rem 1.25rem; }
.article-side h2 { font-size: 1.15rem; margin-top: 0; }
.article-side ul { list-style: none; padding: 0; }
.article-side a { font-weight: 700; color: var(--ink); text-decoration: none; display: block; }
.article-side small { color: #666; }
.doc-card { display: flex; align-items: center; gap: 1rem; border: 1px solid var(--line); padding: 1rem; margin: 1rem 0; }
.doc-icon { background: #d32f2f; color: #fff; font: 700 .65rem var(--body-font); padding: .8rem .5rem; border-radius: 3px; }
.doc-info { flex: 1; display: flex; flex-direction: column; font-size: .85rem; }
.doc-info small { color: #666; }
.comments { margin: 3rem 0; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.comments-head { display: flex; justify-content: space-between; align-items: center; }
.comments-head h2 { font-size: 1.1rem; margin: 0; }
.comment { display: flex; gap: .8rem; margin: 1.25rem 0; }
.comment.reply { margin-left: .5rem; }
.comment-head { margin: 0 0 .25rem; font-size: .85rem; }
.avatar { flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font: 500 .7rem var(--body-font); }
.reply-box summary { cursor: pointer; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #555; }
.comment-form, .stack { display: flex; flex-direction: column; gap: .75rem; max-width: 40rem; margin-top: 1.5rem; }
.comment-form .btn { align-self: flex-start; }

/* Welcome */
.welcome { font-size: 1.05rem; }
.beta-note { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1rem; color: #555; font-size: .9rem; letter-spacing: .03em; }

/* Portal */
.submission { display: flex; justify-content: space-between; gap: 1.5rem; border: 1px solid var(--line); padding: 1rem 1.25rem; margin: 1rem 0; }
.submission-title { font: 500 1.1rem var(--heading-font); margin: 0 0 .25rem; }
.submission-side { display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; min-width: 13rem; }
.status { font: 700 .7rem var(--body-font); letter-spacing: .08em; text-transform: uppercase; padding: .35rem .6rem; border-radius: 2px; }
.status-draft { background: #eee; color: #333; }
.status-in_review { background: #fff1c2; color: #5c4400; }
.status-changes_requested { background: #fde0dc; color: #8a1c13; }
.status-published { background: #d9f0dd; color: #1b5e20; }
.feedback { background: #fff7e0; border-left: 4px solid #e0a800; padding: .75rem 1rem; margin: .75rem 0; }
.feedback p { margin: .25rem 0 0; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 500; margin-bottom: .3rem; }
.help { color: var(--muted); }
.error { color: #b71c1c; margin: .25rem 0 0; }
.form-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.alert-form { max-width: 46rem; }
.alert-form input[type="checkbox"] { width: auto; margin-right: .5rem; }
.alert-form input[type="file"] { padding: .5rem; }
.alert-form ul { list-style: none; padding: 0; margin: .25rem 0; }
.alert-form ul label { display: inline; font-weight: 400; }
.login-box { max-width: 28rem; margin: 3rem auto; }
.search-results { list-style: none; padding: 0; }
.search-results h2 { font-size: 1.2rem; margin: 1rem 0 .25rem; }

/* Footer */
.site-footer { margin-top: 4rem; }
.connects { background: var(--teal-pale); text-align: center; padding: 1rem; font: 400 1.15rem var(--heading-font); color: #000; }
.footer-links { display: flex; justify-content: space-between; padding-top: 1rem; padding-bottom: 1rem; font-size: .8rem; background: var(--panel); max-width: none; }
.footer-links a { margin-left: 1.5rem; color: #333; text-decoration: none; }

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; }
  .cards, .stat-row, .kb-promo, .article-layout, .filter-line { grid-template-columns: 1fr; }
  .submission { flex-direction: column; }
  .submission-side { align-items: flex-start; }
  .kb-table { display: block; overflow-x: auto; }
  .page-title { font-size: 1.9rem; }
}
@media print {
  .site-header, .searchbar, .meta-actions, .comments, .site-footer { display: none; }
}
