/* QATSICPP 2026: site styles. Colours and type come from theme.json (guide v3.3). */

:root {
	--qp-deep: var(--wp--preset--color--deep-ocean, #095968);
	--qp-ocean: var(--wp--preset--color--ocean, #0c7e91);
	--qp-night: var(--wp--preset--color--night-sky, #00587f);
	--qp-stone: var(--wp--preset--color--stone, #faf2ec);
	--qp-grass-l: var(--wp--preset--color--grass-light, #b5e5ce);
	--qp-sky-l: var(--wp--preset--color--sky-light, #c4e7ec);
	--qp-flame-l: var(--wp--preset--color--flame-light, #f5d7c6);
	--qp-flame: var(--wp--preset--color--flame, #f48058);
	--qp-purple: #6b4d9a;
	--qp-line: 1.33px;
	--qp-r: 8px;
}

body { -webkit-font-smoothing: antialiased; }
.qp-main { min-height: 50vh; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--qp-flame); outline-offset: 3px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Safety notice */
.qp-safety { background: var(--qp-deep); color: var(--qp-stone); font-size: 0.875rem; line-height: 1.5; }
.qp-safety__inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; justify-content: space-between; padding: 0.6rem 0; }
.qp-safety p { margin: 0; }
.qp-safety a { color: var(--qp-stone); font-weight: 700; text-underline-offset: 3px; }

/* Header */
.qp-header { background: #fff; border-bottom: var(--qp-line) solid var(--qp-sky-l); position: relative; z-index: 20; }
.qp-header__row { padding: 1rem 0; gap: 1.5rem; }
.qp-logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.qp-logo__img { height: 64px; width: auto; display: block; }
.qp-logo__text { font-weight: 700; font-size: 1.5rem; letter-spacing: 2px; color: var(--qp-deep); }
.qp-footer .qp-logo__text { color: var(--qp-stone); }
.qp-nav { flex: 1; }
.qp-nav .wp-block-navigation-item__content { color: var(--qp-deep); text-decoration: none; padding: 0.5rem 0; }
.qp-nav .wp-block-navigation-item__content:hover { text-decoration: underline; text-underline-offset: 4px; }
.qp-nav .wp-block-navigation__submenu-container { border: var(--qp-line) solid var(--qp-deep) !important; border-radius: var(--qp-r); padding: 0.5rem 0 !important; min-width: 280px !important; }
.qp-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.45rem 1.1rem !important; font-weight: 400; }
.qp-nav .wp-block-navigation__submenu-container .wp-block-navigation-item:first-child .wp-block-navigation-item__content { font-weight: 700; }
.qp-header__cta .wp-block-button__link { white-space: nowrap; }
@media (max-width: 1100px) { .qp-header__cta { display: none; } }
@media (max-width: 600px) { .qp-logo__img { height: 48px; } }

/* Banner */
.qp-banner { background: linear-gradient(180deg, var(--qp-grass-l) 0%, var(--qp-stone) 100%); padding-top: clamp(1.75rem, 4vw, 2.75rem) !important; padding-bottom: clamp(1.75rem, 4vw, 2.5rem) !important; position: relative; overflow: hidden; }
.qp-banner__title { margin-top: 0.5rem !important; margin-bottom: 0 !important; }
.qp-banner__title--post { text-transform: none; letter-spacing: 0; font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.qp-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: 0.875rem; }
.qp-crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--qp-deep); }
.qp-crumbs a { color: #000; text-underline-offset: 3px; }
.qp-meta { font-family: Arial, Helvetica, sans-serif; font-size: 0.8125rem; font-weight: 700; color: var(--qp-deep); margin: 0.5rem 0 0; }
.qp-meta a { color: var(--qp-deep); }

/* Content */
.qp-content { padding-top: clamp(2rem, 4vw, 2.75rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.qp-content > * + * { margin-top: 1rem; }
.qp-lead { font-size: var(--wp--preset--font-size--lead); line-height: 1.55; }
.qp-subline { font-size: 1.375rem; font-weight: 700; color: var(--qp-night); margin: 0; }
.qp-content ul:not(.qp-plain) { padding-left: 1.25rem; }
.qp-content ul:not(.qp-plain) li::marker { color: var(--qp-deep); }
.qp-content li + li { margin-top: 0.3rem; }
.qp-link-strong a, a.qp-link-strong { font-weight: 700; text-underline-offset: 3px; }

/* Draft and placeholder notes: visible on staging only */
.qp-note { font-family: Arial, Helvetica, sans-serif; font-size: 0.875rem; line-height: 1.5; background: var(--qp-flame-l); border-radius: var(--qp-r); padding: 0.65rem 0.9rem; display: flex; gap: 0.6rem; align-items: baseline; }
.qp-note::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--qp-night); flex-shrink: 0; transform: translateY(1px); }
.qp-status { display: inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px; background: #fff; border: var(--qp-line) solid var(--qp-deep); color: var(--qp-deep); }

/* Tiles */
.qp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.qp-tile { position: relative; display: flex; flex-direction: column; gap: 0.5rem; background: var(--qp-sky-l); border-radius: var(--qp-r); padding: 1.25rem 1.25rem 2.75rem; color: #000; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.qp-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(9, 89, 104, .15); color: #000; }
.qp-tile__title { font-size: 1.1875rem; font-weight: 700; color: var(--qp-night); line-height: 1.3; }
.qp-tile__text { font-size: 0.9375rem; line-height: 1.5; }
.qp-tile__go { position: absolute; right: 1.25rem; bottom: 1rem; font-weight: 700; color: var(--qp-night); font-size: 1.25rem; }
.qp-tiles--grass .qp-tile { background: var(--qp-grass-l); }
.qp-tiles--grass .qp-tile__title, .qp-tiles--grass .qp-tile__go { color: var(--qp-deep); }
.qp-tiles--stone .qp-tile { background: var(--qp-stone); border: var(--qp-line) solid var(--qp-deep); }
.qp-tiles--stone .qp-tile__title, .qp-tiles--stone .qp-tile__go { color: var(--qp-deep); }

/* Home */
.qp-hero { background: linear-gradient(180deg, var(--qp-grass-l) 0%, var(--qp-stone) 100%); padding-top: clamp(2.5rem, 6vw, 4.5rem) !important; padding-bottom: clamp(2.5rem, 6vw, 4.5rem) !important; overflow: hidden; position: relative; margin-top: 0 !important; }
.qp-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.qp-hero h1 { margin: 0 0 1rem; }
.qp-hero__statement { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.4; font-weight: 700; color: var(--qp-deep); margin: 0 0 1rem; }
.qp-hero__art { position: relative; min-height: 240px; }
.qp-hero__art img { width: 120%; max-width: none; transform: rotate(10deg) translateX(8%); }
@media (max-width: 800px) { .qp-hero__grid { grid-template-columns: 1fr; } .qp-hero__art { display: none; } }
.qp-section { padding-top: clamp(2.5rem, 5vw, 3.5rem) !important; padding-bottom: clamp(2.5rem, 5vw, 3.5rem) !important; margin-top: 0 !important; }
.qp-section--stone { background: var(--qp-stone); }
.qp-section--deep { background: var(--qp-deep); color: var(--qp-stone); }
.qp-section--deep h2, .qp-section--deep a { color: var(--qp-stone); }
.qp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.qp-stat__num { font-family: Fredoka, Poppins, Arial, sans-serif; font-weight: 700; font-size: var(--wp--preset--font-size--statistic); line-height: .9; color: var(--qp-deep); display: block; }
.qp-stat__label { display: block; margin-top: 0.5rem; font-size: 0.9375rem; }

/* Feeds and cards */
.qp-feed { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; margin-top: 2.5rem !important; }
.qp-feed h2 { margin-top: 0; }
.qp-feed__item { border-top: var(--qp-line) solid var(--qp-deep); padding: 0.75rem 0 0.5rem; }
.qp-feed__item h3 { margin: 0.2rem 0; font-size: 1.0625rem; color: #000; }
.qp-feed__item h3 a { color: #000; text-decoration: none; }
.qp-feed__item h3 a:hover { text-decoration: underline; }
.qp-feed__res { background: var(--qp-sky-l); border-radius: var(--qp-r); padding: 0.85rem 1rem; margin-bottom: 0.75rem; }
.qp-feed__res .qp-meta { color: var(--qp-night); margin: 0; }
.qp-feed__res h3 { margin: 0.2rem 0 0; font-size: 1rem; }
.qp-feed__res h3 a { color: #000; }
.qp-feed__empty { background: var(--qp-stone); border-radius: var(--qp-r); padding: 1rem; font-size: 0.9375rem; }
.qp-feed__more { font-weight: 700; text-underline-offset: 3px; }
.qp-cards .qp-card { border: var(--qp-line) solid var(--qp-deep); border-radius: var(--qp-r); padding: 1.1rem; height: 100%; gap: 0.35rem; }
.qp-cards .qp-card h3 { margin: 0; font-size: 1.0625rem; color: #000; }
.qp-cards .qp-card h3 a { color: #000; text-decoration: none; }

/* Library (resources and news) */
.qp-lib { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 2.25rem; align-items: start; }
@media (max-width: 900px) { .qp-lib { grid-template-columns: 1fr; } }
.qp-lib__search { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.qp-lib__search input[type=search] { flex: 1 1 320px; min-height: 52px; padding: 0 1.25rem; border: var(--qp-line) solid var(--qp-deep); border-radius: 999px; font: inherit; }
.qp-lib__search button, .qp-btn { min-height: 52px; padding: 0 1.5rem; border: 0; border-radius: 999px; background: var(--qp-deep); color: var(--qp-stone); font: inherit; font-weight: 700; cursor: pointer; }
.qp-lib__filters { display: flex; flex-direction: column; gap: 1rem; }
.qp-lib__group { border-radius: var(--qp-r); padding: 1rem 1.1rem; background: var(--qp-grass-l); }
.qp-lib__group:nth-child(2) { background: var(--qp-sky-l); }
.qp-lib__group:nth-child(3) { background: var(--qp-stone); border: var(--qp-line) solid var(--qp-deep); }
.qp-lib__group h3 { margin: 0 0 0.6rem; font-size: 1.0625rem; color: var(--qp-deep); }
.qp-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.qp-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.9rem; border-radius: 999px; border: var(--qp-line) solid var(--qp-deep); background: #fff; color: var(--qp-deep); font-size: 0.875rem; font-weight: 700; text-decoration: none; }
.qp-chip[aria-current="true"] { background: var(--qp-deep); color: var(--qp-stone); }
.qp-lib__count { border-bottom: var(--qp-line) solid var(--qp-deep); padding-bottom: 0.6rem; margin: 0 0 1rem; }
.qp-lib__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }
.qp-lib__card { border: var(--qp-line) solid var(--qp-deep); border-radius: var(--qp-r); padding: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; background: #fff; }
.qp-lib__card h3 { margin: 0; font-size: 1.0625rem; line-height: 1.35; flex: 1; }
.qp-lib__card h3 a { color: #000; text-decoration: none; }
.qp-lib__card h3 a:hover { text-decoration: underline; }
.qp-lib__card p { margin: 0; font-size: 0.875rem; }

/* Password portal */
.post-password-form { background: var(--qp-stone); border: var(--qp-line) solid var(--qp-deep); border-radius: var(--qp-r); padding: 1.75rem; max-width: 620px; }
.post-password-form input[type=password] { min-height: 48px; padding: 0 0.9rem; border: var(--qp-line) solid var(--qp-deep); border-radius: var(--qp-r); font: inherit; margin-top: 0.4rem; }
.post-password-form input[type=submit] { min-height: 48px; padding: 0 1.5rem; border: 0; border-radius: 999px; background: var(--qp-deep); color: var(--qp-stone); font: inherit; font-weight: 700; cursor: pointer; margin-top: 0.75rem; }

/* Forms */
.qp-form { display: flex; flex-direction: column; gap: 0.6rem; max-width: 560px; }
.qp-form label { font-size: 0.875rem; font-weight: 700; }
.qp-form input, .qp-form textarea { min-height: 48px; padding: 0.6rem 0.9rem; border: var(--qp-line) solid var(--qp-deep); border-radius: var(--qp-r); font: inherit; }

/* Tables (guide 4.7) */
.wp-block-table table { border-collapse: collapse; }
.wp-block-table thead th { background: var(--qp-deep); color: var(--qp-stone); text-align: left; }
.wp-block-table td, .wp-block-table th { border: 0; border-bottom: var(--qp-line) solid var(--qp-deep); padding: 0.6rem 0.75rem; }
.wp-block-table tbody tr:nth-child(even) { background: var(--qp-sky-l); }

/* Feature boxes */
.qp-box { border-radius: var(--qp-r); padding: 1.25rem 1.5rem; }
.qp-box--stone { background: var(--qp-stone); border: var(--qp-line) solid var(--qp-deep); }
.qp-box--sky { background: var(--qp-sky-l); }
.qp-box--grass { background: var(--qp-grass-l); }
.qp-box--deep { background: var(--qp-deep); color: var(--qp-stone); }
.qp-box--deep a, .qp-box--deep h2, .qp-box--deep h3 { color: var(--qp-stone); }
.qp-box > :first-child { margin-top: 0; }
.qp-dymo { display: inline-block; background: var(--qp-deep); color: var(--qp-stone); font-weight: 700; text-transform: uppercase; letter-spacing: 1.33px; padding: 0.35rem 0.9rem; font-size: 1.25rem; }

/* Footer */
.qp-footer { background: var(--qp-deep); color: var(--qp-stone); padding-top: 2.75rem !important; padding-bottom: 1.75rem !important; margin-top: 0 !important; }
.qp-footer a { color: var(--qp-stone); text-underline-offset: 3px; }
.qp-footer__top { gap: 2rem; align-items: flex-start; }
.qp-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(170px, 1fr)); gap: 0.5rem 2.5rem; font-size: 0.9375rem; }
.qp-footer__base { border-top: var(--qp-line) solid var(--qp-stone); margin-top: 1.5rem !important; padding-top: 1.1rem; gap: 0.75rem 2rem; font-size: 0.875rem; }
.qp-footer__base p { margin: 0; max-width: 720px; }

/* Centre of Excellence sub-brand (settled 14 and 15 November 2026):
   Night Sky replaces navy, Night Sky and purple headings, Poppins, no tints,
   Night Sky buttons with Stone text, Night Sky links underlined. */
.qp-coe .qp-coe-banner { background: var(--qp-night); color: var(--qp-stone); min-height: 260px; }
.qp-coe .qp-coe-banner .qp-banner__title, .qp-coe .qp-coe-banner .qp-crumbs a, .qp-coe .qp-coe-banner .qp-crumbs li, .qp-coe .qp-coe-banner .qp-crumbs li::before { color: var(--qp-stone); }
.qp-coe-banner__art { position: absolute; right: -6%; top: -20%; width: min(560px, 55vw); height: auto; opacity: 1; pointer-events: none; }
.qp-coe .qp-banner__title, .qp-coe .qp-crumbs { position: relative; z-index: 1; }
.qp-coe .qp-content h2 { color: var(--qp-purple); font-weight: 700; }
.qp-coe .qp-content h3 { color: var(--qp-night); }
.qp-coe .qp-content a { color: var(--qp-night); }
.qp-coe .wp-element-button, .qp-coe .wp-block-button__link { background: var(--qp-night); color: var(--qp-stone); }
.qp-coe .qp-tile, .qp-coe .qp-feed__res { background: #fff; border: var(--qp-line) solid var(--qp-night); }
.qp-coe .qp-tile__title, .qp-coe .qp-tile__go, .qp-coe .qp-meta { color: var(--qp-night); }
.qp-coe .qp-band { background: var(--qp-night); color: var(--qp-stone); }
.qp-coe .qp-band h2, .qp-coe .qp-band a { color: var(--qp-stone); }
.qp-coe-marker { display: flex; gap: 1rem; align-items: flex-start; }
.qp-coe-marker img { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }

@media (max-width: 782px) {
	.qp-header__row { flex-wrap: wrap !important; }
}

/* Home: hero sits directly under the header */
.qp-home .qp-content { padding-top: 0; padding-bottom: 0; }
.qp-home .qp-content > .qp-hero:first-child, .qp-home .qp-content > :first-child { margin-top: 0 !important; }
.qp-hero h1 { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--qp-deep); border: 2px solid var(--qp-deep); }

/* Layout fixes after first staging check, 17 November 2026 */
.wp-site-blocks > * { margin-block-start: 0 !important; }
@media (min-width: 1000px) { .qp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
html, body { overflow-x: clip; }
@media (max-width: 1100px) { .qp-header .qp-header__cta { display: none !important; } }
@media (max-width: 800px) { .qp-coe .qp-coe-banner { min-height: 0; } }
.qp-ey-art { float: right; margin: 0 0 1rem 1.5rem !important; width: 200px; }
.qp-ey-art img { width: 100%; height: auto; display: block; }
@media (max-width: 600px) { .qp-ey-art { float: none; margin: 0 0 1rem !important; width: 160px; } }
.qp-hero__art { min-height: 320px; }
.qp-hero__art img { position: absolute; left: 0; top: 50%; width: 150%; transform: translateY(-50%) rotate(10deg); }
/* Round 3 fixes */
.qp-ey-art, .qp-content > .qp-ey-art { float: none !important; margin-top: 0.5rem !important; margin-bottom: 1rem !important; }
.qp-ey-art img { width: 180px; }
.qp-hero__art img { width: 230%; left: 5%; }
.qp-logo__img { height: 80px; }
@media (max-width: 600px) { .qp-logo__img { height: 56px; } }

/* Page status (key of 18 Nov 2026): red dirt = rough draft, purple = reviewed by Ash, teal = approved by Which Way. No dot = approved by QATSICPP. */
.qp-status-line { display: flex; align-items: center; gap: 0.5rem; font-family: Arial, Helvetica, sans-serif; font-size: 0.8125rem; font-weight: 700; color: #000; margin: 0 0 1rem !important; }
.qp-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.qp-dot--red-dirt { background: #a5452b; }
.qp-dot--purple { background: #6b4d9a; }
.qp-dot--teal { background: #0c7e91; }
