/**
 * Global chrome: header (spec 0.1) + footer (spec 0.2).
 */

/* ---- Header ---- */
.t101-header { background: var(--t101-evergreen); position: relative; z-index: var(--t101-z-header); }
.t101-header__inner { max-width: 1280px; margin: 0 auto; padding: var(--t101-sp-3) var(--t101-sp-6);
	display: flex; align-items: center; gap: var(--t101-sp-6); }
.t101-brand { display: flex; align-items: center; gap: var(--t101-sp-3); text-decoration: none; }
.t101-brand__seal { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
	background: url("../img/sg-seal.svg") center / contain no-repeat; } /* S47: real seal asset replaces CSS placeholder */
.t101-brand__words { display: flex; flex-direction: column; line-height: 1.15; }
.t101-brand__name { font-family: var(--t101-font-display); font-weight: 700;
	font-size: var(--t101-fs-md); color: var(--t101-paper); }
.t101-brand__sub { font-family: var(--t101-font-mono); font-size: 0.65rem;
	letter-spacing: 0.08em; text-transform: uppercase; color: var(--t101-brass); }
.t101-nav { margin-left: auto; }
.t101-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--t101-sp-4); }
.t101-nav__list a { font-family: var(--t101-font-body); font-size: var(--t101-fs-sm); font-weight: 500;
	color: var(--t101-paper); text-decoration: none; padding: var(--t101-sp-2) 0;
	border-bottom: 2px solid transparent; transition: border-color var(--t101-dur) var(--t101-ease); }
.t101-nav__list a:hover { color: var(--t101-paper); border-bottom-color: var(--t101-brass); }
.t101-header__actions { display: flex; align-items: center; gap: var(--t101-sp-3); }
.t101-btn { display: inline-block; font-family: var(--t101-font-body); font-weight: 600;
	font-size: var(--t101-fs-sm); text-decoration: none; line-height: 1;
	padding: 0.7em 1.1em; border-radius: var(--t101-radius);
	transition: background var(--t101-dur) var(--t101-ease); }
.t101-btn--cta { background: var(--t101-brass); color: var(--t101-evergreen); }
.t101-btn--cta:hover { background: #CDA050; color: var(--t101-evergreen); }
/* S42: bare .t101-btn--ghost REMOVED from these selectors — the unscoped rule
   painted paper-on-paper on every light page once S37 conditional enqueue stopped
   registry.css (which had been re-declaring it) from loading site-wide. Global
   light default now lives in components.css; this rule is header-scoped ONLY. */
.t101-header .t101-btn--ghost { color: var(--t101-paper); border: 1px solid var(--t101-brass); background: transparent; white-space: nowrap; }
.t101-header .t101-btn--ghost:hover { background: var(--t101-brass-soft); color: var(--t101-paper); }
.t101-member { position: relative; }
.t101-member__toggle { font-family: var(--t101-font-body); font-size: var(--t101-fs-sm); font-weight: 600;
	color: var(--t101-paper); background: transparent; border: 1px solid var(--t101-brass);
	border-radius: var(--t101-radius); padding: 0.7em 1.1em; cursor: pointer; }
.t101-member .t101-member__menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; line-height: 1.5;
	list-style: none; margin: 0; padding: var(--t101-sp-2);
	background: var(--t101-paper-raised); border: 1px solid var(--t101-line);
	border-radius: var(--t101-radius); box-shadow: var(--t101-shadow); }
.t101-member .t101-member__menu li { margin: 0; padding: 0; list-style: none; }
.t101-member .t101-member__menu a { display: block; padding: var(--t101-sp-2) var(--t101-sp-3);
	font-size: var(--t101-fs-sm); color: var(--t101-ink); text-decoration: none;
	border-radius: var(--t101-radius-sm); }
.t101-member .t101-member__menu a:hover { background: var(--t101-evergreen-soft); }
.t101-member .t101-member__menu li:last-child { border-top: 1px solid var(--t101-line);
	margin-top: var(--t101-sp-1); padding-top: var(--t101-sp-1); }
.t101-member__state { padding: var(--t101-sp-2) var(--t101-sp-3); }
.t101-burger { display: none; flex-direction: column; gap: 4px; background: none;
	border: 0; padding: var(--t101-sp-2); cursor: pointer; }
.t101-burger span { width: 22px; height: 2px; background: var(--t101-paper); display: block; }

@media (max-width: 1024px) {
	.t101-nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
		background: var(--t101-evergreen); padding: var(--t101-sp-4) var(--t101-sp-6) var(--t101-sp-6);
		border-top: 1px solid var(--t101-brass); }
	.t101-nav.is-open { display: block; }
	.t101-nav__list { flex-direction: column; gap: var(--t101-sp-2); }
	.t101-burger { display: flex; }
	.t101-brand__sub { display: none; }
}

/* ---- Footer ---- */
.t101-footer { background: var(--t101-evergreen); color: var(--t101-paper); margin-top: var(--t101-sp-16); }
.t101-footer__inner { max-width: 1280px; margin: 0 auto; padding: var(--t101-sp-12) var(--t101-sp-6);
	display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--t101-sp-8); }
.t101-footer__h { font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); font-weight: 600;
	letter-spacing: 0.08em; text-transform: uppercase; color: var(--t101-brass);
	margin: 0 0 var(--t101-sp-3); }
.t101-footer__col ul { list-style: none; margin: 0; padding: 0; }
.t101-footer__col li { margin: 0 0 var(--t101-sp-2); }
.t101-footer__col a { color: var(--t101-paper); text-decoration: none; font-size: var(--t101-fs-sm); }
.t101-footer__col a:hover { color: var(--t101-brass); }
.t101-footer__ack { font-size: var(--t101-fs-sm); color: var(--t101-paper); opacity: 0.85;
	margin-top: var(--t101-sp-4); max-width: 34ch; }
.t101-footer__base { border-top: 1px solid rgba(185, 138, 52, 0.35); }
.t101-footer__base span { display: block; max-width: 1280px; margin: 0 auto;
	padding: var(--t101-sp-4) var(--t101-sp-6); font-family: var(--t101-font-mono);
	font-size: var(--t101-fs-xs); color: var(--t101-paper); opacity: 0.7; }
@media (max-width: 900px) { .t101-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .t101-footer__inner { grid-template-columns: 1fr; } }


/* ---- Full-width site-wide (Session 7) ----
   Singulars are natively full-width via the _et_pb_page_layout filter in
   functions.php; these rules cover archive/index/search views where Divi
   renders a sidebar unconditionally, plus any stray sidebar remnants. */
#sidebar { display: none !important; }
#left-area { width: 100% !important; padding-right: 0 !important; float: none !important; }
#main-content .container:before { display: none !important; } /* sidebar divider line */
.et_right_sidebar #main-content .container:before,
.et_left_sidebar #main-content .container:before { display: none !important; }

/* Contain last-child bottom margins inside the white content area (margin-collapse
   escaped through #left-area and rendered in the bone page-end strip — Session 10). */
#main-content .entry-content { display: flow-root; }

/* Plain default-template pages (scorecard, future legal/utility): DIVI full-width
   pages zero #left-area bottom padding, hugging the last paragraph to the footer
   (S18 fix, Michael flag on /policy/scorecard). */
.page.et_full_width_page #left-area,
.t101-single #left-area { padding-bottom: var(--t101-sp-16); }

/* ---- S46 mobile header fit (launch smoke finding 3) ----
   At narrow widths the brand + CTA + auth button overflowed the viewport and
   pushed the burger off-screen. CTA moves into the burger menu (nav__cta li,
   header.php); header keeps brand + auth + burger, compacted. */
.t101-nav__cta { display: none; }
@media (max-width: 1024px) {
	.t101-nav__cta { display: block; margin-top: var(--t101-sp-3); }
	.t101-nav__cta a { display: inline-block; background: var(--t101-brass); color: var(--t101-evergreen);
		font-weight: 600; border-radius: var(--t101-radius); padding: 0.6em 1em; border-bottom: 0; }
	.t101-nav__cta a:hover { background: #CDA050; color: var(--t101-evergreen); border-bottom: 0; }
}
@media (max-width: 700px) {
	.t101-header__inner { gap: var(--t101-sp-3); }
	.t101-header__actions { margin-left: auto; gap: var(--t101-sp-2); }
	.t101-header .t101-btn--cta { display: none; }
	.t101-header .t101-btn--ghost, .t101-member__toggle { font-size: var(--t101-fs-xs); padding: 0.6em 0.8em; }
	.t101-brand__seal { width: 32px; height: 32px; }
	.t101-brand__name { font-size: var(--t101-fs-base); }
}

/* S47: seal in the footer brand column (2-class scope — TB layout cascade) */
.t101-footer .t101-footer__seal { display: block; width: 48px; height: 48px;
	margin-bottom: var(--t101-sp-4); }

/* S47: sticky header, all viewports (Michael: desktop first, extended to
   mobile — compact header, small viewport cost). Sticky lives on the Divi
   TB wrapper — .t101-header itself sits inside a section only as tall as
   itself, so the outer .et-l--header is the element that sticks.
   Admin-bar offsets track WP breakpoints: fixed 32px desktop, fixed 46px
   601-782px, absolute (scrolls away) below 600px. */
.et-l--header { position: sticky; top: 0; z-index: var(--t101-z-header); }
.et-l--header .t101-header { box-shadow: var(--t101-shadow-sm); }
body.admin-bar .et-l--header { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .et-l--header { top: 46px; }
}
@media (max-width: 600px) {
	body.admin-bar .et-l--header { top: 0; }
}
