/*
 * Colours follow the TGZ 2018 identity: TGZ yellow on dark grey, a light grey
 * page with white cards, and a medium grey footer.
 */
:root {
	--tgz-yellow: #fbd65f;
	--tgz-dark: #535353;
	--tgz-mid: #7b7b7b;
	--tgz-light: #ededed;
	--tgz-white: #fff;
	--tgz-alert: #cc4b37;
	--tgz-line: rgba(123, 123, 123, .25);
	--tgz-line-strong: rgba(123, 123, 123, .5);
	--tgz-shadow: 0 10px 25px rgba(10, 10, 10, .16);
	--tgz-radius: 5px;
	--tgz-font: "Open Sans", Helvetica, Roboto, Arial, sans-serif;
	--tgz-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--tgz-dark); background: var(--tgz-light); font: 17px/1.65 var(--tgz-font); -webkit-font-smoothing: antialiased; }
a { color: var(--tgz-dark); font-weight: 600; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--tgz-mid); }
img { max-width: 100%; height: auto; }
.wp-site-blocks { overflow: clip; }
.skip-link { position: absolute; left: -10000px; top: auto; z-index: 10; padding: .8rem 1rem; background: var(--tgz-white); }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header: dark grey bar, yellow wordmark, white menu with yellow active state */
.tgz-site-header { position: relative; z-index: 10; max-width: none !important; padding: 0 max(20px, calc((100vw - var(--tgz-width)) / 2)); color: var(--tgz-white); background: var(--tgz-dark); box-shadow: var(--tgz-shadow); }
/* One bar, as in 2018: large TGZ, the menu right after it, the login on the right */
.tgz-site-header .tgz-header-bar { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 0 2.2rem; min-height: 64px; }
.tgz-header-bar > .tgz-account { align-items: center; }
.tgz-site-title { flex: none; margin: 0; font: 400 50px/1 var(--tgz-font); letter-spacing: -.01em; }
.tgz-site-title a, .tgz-site-title a:hover { color: var(--tgz-yellow); font-weight: 400; text-decoration: none; }
.tgz-primary-navigation { display: flex; flex: 1 1 auto; align-items: stretch; min-width: 0; }
/* Login / profile / logout: icon + label, styled like the 2018 meta navigation */
.tgz-account { display: inline-flex; flex-wrap: nowrap; gap: 1.4rem; }
.tgz-account-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--tgz-white); font-size: 15px; font-weight: 700; white-space: nowrap; text-decoration: none; transition: color 200ms ease-in-out; }
.tgz-account-link:hover { color: var(--tgz-yellow); }
.tgz-icon { flex: none; width: 20px; height: 20px; }
.tgz-mobile-account { margin-top: .4rem; padding-top: .8rem; border-top: 1px solid rgba(255, 255, 255, .35); }
.tgz-mobile-account .tgz-account { display: grid; gap: .8rem; }

/* Logged in: the user's name; profile and logout open on hover or keyboard focus */
.tgz-header-bar > .tgz-account-user { align-items: stretch; }
.tgz-user-menu { position: relative; display: flex; align-items: stretch; }
.tgz-user-menu-toggle { padding: 0 .2rem; background: none; border: 0; font-family: inherit; cursor: pointer; }
.tgz-user-menu-toggle::after { content: ""; width: 0; height: 0; margin-left: .15rem; border: 5px solid transparent; border-top-color: currentColor; border-bottom-width: 0; }
.tgz-user-menu:hover .tgz-user-menu-toggle, .tgz-user-menu:focus-within .tgz-user-menu-toggle { color: var(--tgz-yellow); }
.tgz-user-menu-panel { position: absolute; top: 100%; right: 0; z-index: 20; display: grid; gap: 1px; min-width: 210px; padding-top: 3px; background: var(--tgz-yellow); box-shadow: var(--tgz-shadow); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 150ms ease-out, transform 150ms ease-out, visibility 0s linear 150ms; }
.tgz-user-menu:hover .tgz-user-menu-panel, .tgz-user-menu:focus-within .tgz-user-menu-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.tgz-user-menu-link { display: flex; align-items: center; gap: .55rem; padding: .85rem 1.1rem; color: var(--tgz-yellow); background: var(--tgz-dark); font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: none; transition: background-color 200ms ease-in-out; }
.tgz-user-menu-link:hover, .tgz-user-menu-link:focus { color: var(--tgz-yellow); background: var(--tgz-mid); }
/* Mobile drop-down: name as a label, both links listed below it */
.tgz-mobile-account .tgz-user-name { display: flex; align-items: center; gap: .4rem; color: var(--tgz-white); font-size: 15px; font-weight: 700; }
.tgz-mobile-account .tgz-user-menu-link { padding: .55rem .9rem; }
.tgz-navigation-list { display: flex; flex-wrap: wrap; gap: 0 1.7rem; margin: 0; padding: 0; list-style: none; }
.tgz-navigation-list a { display: block; color: var(--tgz-white); font-size: 15px; font-weight: 700; text-decoration: none; transition: color 200ms ease-in-out; }
.tgz-navigation-list a:hover { color: var(--tgz-yellow); }
.tgz-desktop-navigation, .tgz-desktop-navigation nav { display: flex; align-items: stretch; }
.tgz-desktop-navigation .tgz-navigation-list { flex-wrap: nowrap; gap: 0 1.5rem; }
.tgz-desktop-navigation .tgz-navigation-list li { display: flex; }
.tgz-desktop-navigation .tgz-navigation-list a { display: flex; align-items: center; padding-top: 3px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tgz-desktop-navigation .current-menu-item > a, .tgz-desktop-navigation .current-menu-ancestor > a, .tgz-desktop-navigation .current-page-ancestor > a { color: var(--tgz-yellow); border-bottom-color: var(--tgz-yellow); }
.tgz-mobile-navigation { display: none; }
.tgz-mobile-navigation summary { display: flex; align-items: center; gap: .45rem; height: 100%; color: var(--tgz-yellow); font-weight: 700; cursor: pointer; list-style: none; }
.tgz-mobile-navigation summary::-webkit-details-marker { display: none; }
.tgz-mobile-navigation summary::before { content: "☰"; font-size: 20px; line-height: 1; }
.tgz-mobile-navigation[open] summary::before { content: "✕"; font-size: 16px; }
.tgz-mobile-navigation nav { position: absolute; top: 100%; left: 0; right: 0; padding: .4rem max(20px, calc((100vw - var(--tgz-width)) / 2)) 1rem; background: var(--tgz-dark); box-shadow: var(--tgz-shadow); }
.tgz-mobile-navigation .tgz-navigation-list { display: grid; gap: 0; }
.tgz-mobile-navigation .tgz-navigation-list li { border-top: 1px solid rgba(255, 255, 255, .15); }
.tgz-mobile-navigation .tgz-navigation-list a { padding: .7rem 0; }
.tgz-mobile-navigation .current-menu-item > a, .tgz-mobile-navigation .current-page-ancestor > a { color: var(--tgz-yellow); }

/* Below this width the menu items no longer fit next to the wordmark and login */
@media (max-width: 1140px) {
	.tgz-desktop-navigation { display: none; }
	.tgz-primary-navigation { justify-content: flex-end; }
	.tgz-mobile-navigation { display: block; }
	.tgz-site-header .tgz-header-bar { gap: 0 1.2rem; }
	/* The login moves into the drop-down */
	.tgz-header-bar > .tgz-account { display: none; }
}

/* Page banner: the full-width yellow band directly under the dark header, as in 2018 */
.tgz-page-banner { margin: 0 !important; padding: 1.9rem max(20px, calc((100vw - var(--tgz-width)) / 2)) 1.5rem; color: var(--tgz-dark); background: var(--tgz-yellow); }
.tgz-page-banner-text { max-width: 900px; margin: 0; font: 600 clamp(22px, 2.4vw, 30px)/1.35 var(--tgz-font); }

/* Page title: a plain heading on the grey page, above the content cards */
.tgz-main { width: min(calc(100% - 40px), var(--tgz-width)); margin-inline: auto; padding-block: 2.6rem 5rem; }
.tgz-page-banner + .tgz-main { margin-top: 0; }
.tgz-page-header { margin: 0 0 1.6rem; }
.tgz-page-header h1 { max-width: 900px; margin: 0; color: var(--tgz-dark); font: 600 clamp(28px, 3vw, 34px)/1.25 var(--tgz-font); }
.tgz-eyebrow { margin: 0 0 .5rem; color: var(--tgz-mid); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Content: white cards with the 2018 shadow */
.tgz-content-layout { align-items: start; gap: 2.5rem; }
.tgz-content-primary, .tgz-content-aside { min-width: 0; }
.tgz-content-block { margin-block: 0 2rem; }
.tgz-component-text, .tgz-component-list, .tgz-teaser { padding: clamp(1.2rem, 3vw, 2rem); background: var(--tgz-white); border-radius: var(--tgz-radius); box-shadow: var(--tgz-shadow); }
.tgz-content-block > .tgz-component + .tgz-component { margin-top: 1.5rem; }
.tgz-component-text.has--background-primary { background: var(--tgz-yellow); }
.tgz-component-text.has--background-gray { background: var(--tgz-light); box-shadow: inset 0 0 0 1px var(--tgz-line); }
.tgz-component-text h2, .tgz-teaser h2 { margin-top: 0; font: 600 26px/1.25 var(--tgz-font); }
.tgz-component-text > h2 { margin: calc(-1 * clamp(1.2rem, 3vw, 2rem)) calc(-1 * clamp(1.2rem, 3vw, 2rem)) 1.2rem; padding: 1.1rem clamp(1.2rem, 3vw, 2rem) .8rem; border-bottom: 1px solid var(--tgz-line); }
.tgz-rich-content a { text-decoration: underline; word-break: break-word; }
.tgz-rich-content > :first-child { margin-top: 0; }
.tgz-rich-content > :last-child { margin-bottom: 0; }
.tgz-list-item { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 1.25rem; padding-block: 1.1rem; border-bottom: 1px solid var(--tgz-line); }
.tgz-list-item:last-child { border-bottom: 0; }
.tgz-list-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tgz-list-copy h3 { margin: 0 0 .25rem; font: 600 21px/1.25 var(--tgz-font); }
.tgz-image-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tgz-image-pair-item { width: 100%; max-height: 420px; object-fit: cover; }
.tgz-figure { margin: 0; }
.tgz-figure figcaption, .tgz-rich-content .wp-caption-text { margin-top: .4rem; color: var(--tgz-mid); font-size: 14px; }
.tgz-rich-content iframe, .tgz-rich-content video { max-width: 100%; }
.tgz-rich-content iframe[src*="youtube"], .tgz-rich-content iframe[src*="youtu.be"], .tgz-rich-content iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* Accordion */
.tgz-accordion-list { overflow: hidden; background: var(--tgz-white); border-radius: var(--tgz-radius); box-shadow: var(--tgz-shadow); }
.tgz-accordion { border-top: 1px solid var(--tgz-line-strong); transition: background-color 200ms ease-in-out; }
.tgz-accordion:first-child { border-top: 0; }
.tgz-accordion[open] { background: var(--tgz-light); }
.tgz-accordion summary { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 3rem 1rem 1.4rem; position: relative; cursor: pointer; list-style: none; font-weight: 700; }
.tgz-accordion summary::-webkit-details-marker { display: none; }
.tgz-accordion summary { padding-right: 3.8rem; }
.tgz-accordion summary .tgz-toggle { position: absolute; top: 50%; right: 1.2rem; margin-top: -15px; }

/* Round plus/minus toggle for accordions and events. The bars are drawn in CSS so
   they sit exactly in the centre (font glyphs don't); + turns into − when open. */
.tgz-toggle { position: relative; flex: none; width: 30px; height: 30px; color: var(--tgz-yellow); background: var(--tgz-dark); border-radius: 50%; transition: background-color 200ms ease-in-out, color 200ms ease-in-out; }
.tgz-toggle::before, .tgz-toggle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: currentColor; border-radius: 1px; transition: transform 200ms ease-in-out; }
.tgz-toggle::after { transform: rotate(90deg); }
details[open] > summary .tgz-toggle { color: var(--tgz-dark); background: var(--tgz-yellow); }
details[open] > summary .tgz-toggle::after { transform: rotate(0deg); }
.tgz-accordion summary small { color: var(--tgz-mid); font-size: 14px; font-weight: 400; }
.tgz-accordion > div { padding: 0 1.4rem 1.4rem; }
.tgz-download::before { content: "↓ "; }

/* Teasers and their grey/yellow buttons */
.tgz-teaser { margin-bottom: 1.5rem; border-top: 4px solid var(--tgz-yellow); }
.tgz-teaser h2 { font-size: 19px; font-weight: 700; }
.tgz-teaser-links { margin: 0; padding: 0; list-style: none; }
.tgz-teaser-links li + li { margin-top: 1px; }
.tgz-teaser-link, .tgz-teaser-button { position: relative; display: block; padding: .85rem 1rem .85rem 2.6rem; color: var(--tgz-yellow); background: var(--tgz-dark); font-size: 14px; font-weight: 700; line-height: 1.35; text-decoration: none; transition: background-color 200ms ease-in-out; }
.tgz-teaser-link::before, .tgz-teaser-button::before { content: "→"; position: absolute; left: 1rem; top: .8rem; }
.tgz-teaser-link:hover, .tgz-teaser-button:hover { color: var(--tgz-yellow); background: var(--tgz-mid); }
.tgz-teaser-button { margin-top: 1rem; }
.tgz-teaser-link.is-disabled { color: var(--tgz-mid); background: var(--tgz-light); cursor: not-allowed; }
.tgz-teaser-more { margin-top: 1px; }
.tgz-teaser-more summary { padding: .85rem 1rem; color: var(--tgz-dark); background: var(--tgz-light); font-size: 14px; font-weight: 700; cursor: pointer; }
.tgz-teaser-more[open] summary { margin-bottom: 1px; }
.tgz-teaser-note { margin: .75rem 0 0; color: var(--tgz-mid); font-size: 14px; }
.tgz-teaser-subtitle { margin: 1.5rem 0 .5rem; font: 700 16px/1.3 var(--tgz-font); }

/* Compact member login (Profile Builder forms inside the login teaser) */
.tgz-teaser-login { padding: 1.1rem 1.25rem 1.2rem; }
.tgz-teaser-login h2 { margin-bottom: .8rem; }
.tgz-teaser-login form { margin: 0; }
.tgz-teaser-login form p, .tgz-teaser-login form ul { margin: 0 0 .65rem; padding: 0; list-style: none; }
.tgz-teaser-login label { display: block; margin-bottom: .2rem; font-size: 13px; font-weight: 600; line-height: 1.3; }
.tgz-teaser-login input[type="text"], .tgz-teaser-login input[type="email"], .tgz-teaser-login input[type="password"] { display: block; width: 100%; padding: .45rem .6rem; color: var(--tgz-dark); background: var(--tgz-white); border: 1px solid var(--tgz-line-strong); border-radius: 3px; font: 15px/1.3 var(--tgz-font); }
.tgz-teaser-login input:focus { outline: 2px solid var(--tgz-yellow); outline-offset: 0; border-color: var(--tgz-dark); }
.tgz-teaser-login .wppb-password-field-container { display: block; position: relative; }
.tgz-teaser-login .login-remember { display: flex; align-items: center; gap: .4rem; }
.tgz-teaser-login .login-remember label { display: inline; margin: 0; font-weight: 400; font-size: 14px; }
.tgz-teaser-login .login-submit, .tgz-teaser-login .form-submit { margin-bottom: 0; }
.tgz-teaser-login #wppb-loginform input[type="submit"], .tgz-teaser-login .wppb-user-forms input[type="submit"] { width: 100%; padding: .6rem 1rem; }
.tgz-teaser-login .wppb-error, .tgz-teaser-login .wppb-success, .tgz-teaser-login .wppb-warning { display: block; margin: 0 0 .65rem; padding: .5rem .65rem; font-size: 14px; line-height: 1.4; border-radius: 3px; background: var(--tgz-light); }
.tgz-teaser-login .wppb-error { color: var(--tgz-alert); }
.tgz-recover { margin-top: .75rem; padding-top: .7rem; border-top: 1px solid var(--tgz-line); }
.tgz-recover summary { color: var(--tgz-dark); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; list-style: none; }
.tgz-recover summary::-webkit-details-marker { display: none; }
.tgz-recover summary:hover { color: var(--tgz-mid); }
.tgz-recover[open] summary { margin-bottom: .6rem; }
.tgz-recover form > p:first-child { color: var(--tgz-mid); font-size: 13px; line-height: 1.45; }

/* Form buttons (Gravity Forms, Profile Builder) */
.gform_wrapper .gform_button, .gform_wrapper input[type="submit"], .wppb-user-forms input[type="submit"], #wppb-loginform input[type="submit"] { display: inline-block; padding: .85rem 1.3rem; color: var(--tgz-yellow); background: var(--tgz-dark); border: 0; border-radius: 3px; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.3; cursor: pointer; transition: background-color 200ms ease-in-out; }
.gform_wrapper .gform_button:hover, .gform_wrapper input[type="submit"]:hover, .wppb-user-forms input[type="submit"]:hover, #wppb-loginform input[type="submit"]:hover { background: var(--tgz-mid); }

/* Events */
.tgz-events { display: grid; gap: .75rem; }
.tgz-event { margin-bottom: .75rem; overflow: hidden; background: var(--tgz-white); border-radius: var(--tgz-radius); box-shadow: var(--tgz-shadow); transition: background-color 200ms ease-in-out; }
.tgz-event summary { display: grid; grid-template-columns: minmax(145px, .7fr) minmax(0, 2fr) 30px; align-items: center; gap: 1.5rem; padding: 1.15rem 1.35rem; cursor: pointer; list-style: none; }
.tgz-event summary::-webkit-details-marker { display: none; }
.tgz-event[open] { background: var(--tgz-light); }
.tgz-event[open] summary { border-bottom: 1px solid var(--tgz-line-strong); }
.tgz-event-meta, .tgz-event-heading { display: grid; gap: .15rem; }
.tgz-event-meta { color: var(--tgz-mid); font-size: 14px; }
.tgz-event-meta strong { color: var(--tgz-dark); font-size: 16px; }
.tgz-event-speaker { color: var(--tgz-mid); font-size: 14px; }
.tgz-event-title { font: 700 20px/1.25 var(--tgz-font); }
.tgz-event-notice { color: var(--tgz-alert); font-size: 14px; }
.tgz-event-details { padding: 1.3rem clamp(1rem, 4vw, 3rem) 1.8rem; }
.tgz-event-image { float: right; width: min(34%, 280px); margin: 0 0 1rem 1.5rem; }
.tgz-event-information { padding-top: .5rem; border-top: 1px solid var(--tgz-line-strong); }
.tgz-event-signup { margin-top: 1.5rem; padding: 1.2rem; background: var(--tgz-white); border-radius: var(--tgz-radius); }
.tgz-event-login-prompt { padding: .9rem 1.3rem; font-size: 14px; }

/* Footer: medium grey with white type */
.tgz-site-footer { max-width: none !important; padding: 2.5rem max(20px, calc((100vw - var(--tgz-width)) / 2)); color: var(--tgz-white); background: var(--tgz-mid); font-weight: 600; }
.tgz-footer-inner { gap: 1rem 2rem; }
.tgz-footer-title { color: var(--tgz-white); font: 700 20px var(--tgz-font); }
.tgz-site-footer a { color: var(--tgz-white); text-decoration: none; }
.tgz-site-footer a:hover { color: var(--tgz-yellow); }
.tgz-site-footer .tgz-navigation-list a { padding-block: .3rem; border-bottom: 0; }
.tgz-footer-copyright { margin-bottom: 0; color: var(--tgz-white); font-size: 13px; opacity: .85; }
.tgz-archive-item { margin-block: 1rem; padding: 1.2rem; background: var(--tgz-white); border-radius: var(--tgz-radius); box-shadow: var(--tgz-shadow); }

@media (max-width: 760px) {
	.tgz-main { padding-block: 1.75rem 3rem; }
	.tgz-site-title { font-size: 40px; }
	.tgz-site-header .tgz-header-bar { min-height: 58px; }
	.tgz-page-banner { padding-block: 1.2rem 1rem; }
	.tgz-content-layout { display: block; }
	.tgz-content-aside { margin-top: 1.5rem; }
	.tgz-event summary { grid-template-columns: 1fr 30px; gap: .5rem 1rem; }
	.tgz-event-meta { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; gap: .25rem .8rem; }
	.tgz-event-heading { grid-column: 1; grid-row: 1; }
	.tgz-event-toggle { grid-column: 2; grid-row: 1 / span 2; }
	.tgz-footer-inner { display: block; }
}

@media (max-width: 480px) {
	.tgz-main { width: calc(100% - 24px); }
	.tgz-list-item, .tgz-image-pair { grid-template-columns: 1fr; }
	.tgz-list-image { max-height: 260px; }
	.tgz-event-image { float: none; width: 100%; margin: 0 0 1rem; }
	.tgz-site-title { font-size: 34px; }
}
