/* Shared stylesheet for all four sites. Site colours/images come from the
   per-site file (ca.css, ny.css, ohdc.css, tn.css) loaded after this one. */

:root {
  /* defaults; overridden per site */
  --accordion-bg: #2E755B;
  --accordion-border: #0B3D2E;
  --accordion-hover-bg: #56A485;
  --accordion-open-bg: #0B3D2E;
  --accordion-text: #fff;
  --accordion-hover-text: #fff;
  --accordion-open-text: #fff;
  --focus-color: #ffbf47;
  --heading-color: #333;
  --header-bg: #fff;
  --body-bg: #fff;
  --news-date-color: #e31937;
  --link-color: #0b5aa2;
  --content-width: 1100px;
  /* tabs (main menu + Knowledge Center / FAQ sections): light grey with dark text like the live sites (user
     2026-10-29); accordions keep their dark colour with white text */
  --tab-bg: #f1f1f1;           /* text #333 on it: 11.2:1 */
  --tab-text: #333;
  --tab-border: #bdbdbd;
  --tab-hover-bg: #dcdcdc;     /* text #000 on it: 15.6:1 */
  --tab-hover-text: #000;
  --tab-active-bg: #fff;       /* current page / selected section */
  --tab-active-text: #000;
  --tab-active-border: var(--accordion-bg);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #222;
  background: var(--body-bg);
}

a { color: var(--link-color); }
a:hover, a:focus { text-decoration: none; }

/* ---------- accessibility (Section 508 / WCAG 2.1 AA) ---------- */
/* visible keyboard focus on everything focusable (SC 2.4.7) */
:focus-visible { outline: 3px solid var(--focus-color); outline-offset: 2px; box-shadow: 0 0 0 5px #000; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: .5rem 1rem; background: #000; color: #fff; }
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html { scroll-behavior: smooth; }

/* ---------- header (logo, CGI logo, main menu) ---------- */
/* Logos on white, then the site's own fade (white -> --header-fade -> --nav-bg) exactly as tall as the menu tabs:
   a tab's top is where the fade starts, its bottom where the fade ends, at the top of the page (user 2026-10-29).
   Tabs are solid (--accordion-bg) so white text keeps its contrast over the light part of the fade. */
.site-header {
  --nav-h: 2.5rem;  /* ~40px tabs */
  background: linear-gradient(to bottom, #fff 0, #fff calc(100% - var(--nav-h)),
                              var(--header-fade, #999) calc(100% - var(--nav-h) * .45), var(--nav-bg, #333) 100%);
  padding: .75rem 1rem 0;
}
.site-header .inner { max-width: var(--content-width); margin: 0 auto; padding-bottom: .5rem;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.site-header img.logo { max-width: 100%; height: auto; max-height: 140px; display: block; }
.partner-logo { flex: none; }
.partner-logo img { display: block; height: 25px; width: auto; }

/* ---------- main menu: tabs in the header fade ---------- */
.site-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--content-width);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 2px;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 .62rem;
  font-size: .9rem;
  white-space: nowrap;
  color: var(--tab-text);
  background: var(--tab-bg);
  text-decoration: none;
  border: 1px solid var(--tab-border);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;  /* flat bottom on the page edge: tabs, not buttons */
}
.site-nav a:hover, .site-nav a:focus { background: var(--tab-hover-bg); color: var(--tab-hover-text); }
.site-nav a[aria-current="page"] { background: var(--tab-active-bg); color: var(--tab-active-text); border-color: var(--tab-active-bg); }

/* ---------- content + left sidebar ---------- */
/* <main> comes first in the HTML (phones / screen readers get content first); on wide screens the
   grid puts the sidebar in the left column, as on the Drupal sites. */
.site-body {
  max-width: var(--content-width);
  margin: 0 auto;
  background: #fff;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  grid-template-areas: "sidebar main";
}
.site-main {
  grid-area: main;
  padding: 1.5rem 1.5rem 4rem;
  min-height: 60vh;
}
.site-sidebar {
  grid-area: sidebar;
  padding: 1.5rem 1rem;
  text-align: center;
  border-right: 1px solid #ddd;
}
.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-section h2 { font-size: .95rem; margin: .5rem 0; border: 0; padding: 0; color: var(--heading-color); }  /* "The CA Quarterly Review" on one line */
.sidebar-section ul { list-style: none; margin: 0; padding: 0; font-size: .875rem; line-height: 1.35; }  /* links: smaller than body text and headings */
.sidebar-section li { margin: .45rem 0; }
.sidebar-section figure { margin: 0; }
.sidebar-section img { max-width: 100%; height: auto; }
.sidebar-section figcaption { font-size: .875rem; color: #444; }
.page-top {  /* houses picture: right on top of the footer (user 2026-10-29) */
  background-image: var(--bg-bottom-image, none);
  background-position: right bottom;
  background-repeat: no-repeat;
  background-size: var(--bg-bottom-size, auto);
}
.site-footer { text-align: center; font-size: .875rem; padding: 1.5rem 1rem; color: #fff; background: var(--footer-bg, #222); }
.site-footer a { color: #fff; }
.site-footer .footer-title { font-size: 1.15rem; font-weight: bold; margin: .5rem 0; }
.site-footer .footer-text p { margin: .25rem 0; }
.footer-links { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.5rem; }

/* Headings (user 2026-10-29): page title in the site colour; every other heading in the page body black, in two
   sizes only - "header 1" (h2) and "header 2" (h3-h6, the look of the bold "Mission" line on CA About Us).
   The left sidebar headings keep the site colour (see .sidebar-section h2). */
h1, h2, h3, h4, h5, h6 { line-height: 1.25; color: #000; }
h1 { font-size: 2rem; margin-top: 0; color: var(--heading-color); }
h2 { font-size: 1.3rem; margin-top: 2rem; padding-bottom: .25rem; border-bottom: 2px solid var(--accordion-bg); }
h3, h4, h5, h6 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.home > h2:first-of-type { border-bottom: 0; padding-bottom: 0; }  /* home "Welcome ..." heading: no line (user) */
/* "informational purposes only" notice (Tenant Knowledge Center): red warning, 6.9:1 on its background */
.notice-warning { color: #b3122b; font-weight: bold; background: #fdf2f3; border-left: 4px solid #b3122b;
  padding: .5rem .8rem; margin: 1rem 0; }

/* ---------- former Drupal tabs: section jump links ---------- */
/* compact so the usual five sections fit on one line (user request) */
nav.tab-nav ul {
  list-style: none;
  margin: 1.25rem 0 .75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
}
nav.tab-nav li { margin: 0; }
nav.tab-nav a {
  display: inline-block;
  padding: .3rem .6rem;
  font-size: .8rem;
  border: 1px solid var(--tab-border);
  border-bottom: 2px solid var(--accordion-bg);
  margin-bottom: -2px;         /* sits on the bar's line; the selected tab hides the line under it */
  border-radius: 6px 6px 0 0;  /* tabs sitting on the bar's bottom line (same look as the main menu) */
  text-decoration: none;
  color: var(--tab-text);
  background: var(--tab-bg);
}
nav.tab-nav a:hover, nav.tab-nav a:focus { background: var(--tab-hover-bg); color: var(--tab-hover-text); }
h2[id] { scroll-margin-top: 1rem; }

/* ---------- former CKEditor accordions: <details> ---------- */
details {
  margin: .5rem 0;
  border-radius: 12px;
  border: 1px solid var(--accordion-border);
  overflow: hidden;
}
details > summary {
  cursor: pointer;
  padding: .7rem 1rem;
  background: var(--accordion-bg);
  color: var(--accordion-text);
  font-weight: bold;
  list-style-position: inside;
}
details > summary:hover, details > summary:focus-visible { background: var(--accordion-hover-bg); color: var(--accordion-hover-text); }
details[open] > summary { background: var(--accordion-open-bg); color: var(--accordion-open-text); }
details > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
details > :last-child { margin-bottom: 1rem; }

/* ---------- FAQ ---------- */
.faq-category { margin-bottom: 2rem; }
.faq-answer { padding: .25rem 0 0; }
.faq-permalink { font-size: .875rem; }

/* ---------- lists (formerly tables) ---------- */
.site-main li { margin: .3rem 0; }
.site-main ul, .site-main ol { padding-left: 1.4rem; }

/* long URLs/words must not force horizontal scrolling on phones */
.site-main { overflow-wrap: anywhere; }

/* ---------- news ---------- */
.site-main .news-list { list-style: none; padding: 0; }
.news-list li { margin: 0 0 1.25rem; }
.news-list .news-title { margin: 0; font-size: 1.1rem; border: 0; padding: 0; }
.news-list p { margin: .2rem 0; }
.news-list .date, .news-post .date { font-size: .875rem; color: var(--news-date-color); }
.news-post .date { margin-top: -.5rem; }

/* ---------- mobile ---------- */
@media (max-width: 700px) {
  h1 { font-size: 1.6rem; }
  .site-header { padding-bottom: 0; }
  .site-header .inner { padding-bottom: 1rem; }
  .page-top { background-image: none; }
  nav.tab-nav ul, .kc-bar ul { flex-direction: column; align-items: stretch; }
  nav.tab-nav a { display: block; border-radius: 8px; border-bottom: 1px solid var(--tab-border); margin-bottom: 0; }
  /* menu as a two-column grid; sidebar stacks under the content */
  /* several rows: a light grey block of menu cells (same colours as the tabs), current page white with a
     site-colour bar on the left; a thin site-colour line closes the header */
  .site-nav { background: var(--tab-bg); margin: 0 -1rem; border-bottom: 3px solid var(--nav-bg, #333); }
  .site-nav ul { display: grid; grid-template-columns: 1fr 1fr; padding: 0; gap: 0; }
  .site-nav li { display: flex; box-shadow: inset -1px -1px 0 var(--tab-border); }  /* cell lines */
  .site-nav a { flex: 1; height: auto; padding: .55rem .9rem; border: 0; border-left: 4px solid transparent; border-radius: 0; white-space: normal; }
  .site-nav a[aria-current="page"] { border-left-color: var(--nav-bg, #333); }
  .site-body { display: block; }
  .site-main { padding: 1rem 1rem 2rem; min-height: 0; }
  .site-sidebar { border-right: 0; border-top: 1px solid #ddd; }
}

/* ---------- Our Staff ---------- */
.staff-list { list-style: none; padding: .5rem 0 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .75rem; }
.staff-list li { margin: 0; padding: .6rem .8rem; border: 1px solid #ccc; border-radius: 8px; }
.staff-list p { margin: .1rem 0; }
.staff-list .staff-name { font-weight: bold; }
.staff-list .staff-title { font-style: italic; }

/* ---------- home page announcement cards (same look as the staff cards) ---------- */
.site-main .news-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 700px) { .site-main .news-cards { grid-template-columns: 1fr; } }
.news-cards li { margin: 0; padding: .6rem .8rem; border: 1px solid #ccc; border-radius: 8px; }
.news-more { margin-top: 1rem; }

/* ---------- board meetings (CA) ---------- */
.site-main .meeting-list { list-style: none; padding-left: 0; }
.meeting-list li { margin: .5rem 0; }
.meeting-next { padding: .6rem .8rem; border-left: 4px solid var(--accordion-bg); background: #f6f6f6; }

/* ---------- newsletters ---------- */
.nl-masthead { font-size: .875rem; letter-spacing: .02em; text-transform: none; color: #444; }
.nl-welcome img { display: block; max-width: 100%; max-height: 28rem; width: auto; height: auto; margin: 0 auto; }
.site-main .nl-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.nl-cards li { margin: 0; padding: .5rem .75rem; border: 1px solid #ccc; border-radius: 8px; font-size: .9rem; line-height: 1.35; }
.nl-cards a, .nl-card-title { font-weight: bold; }
.nl-files { display: block; margin-top: .25rem; font-size: .85rem; }
.nl-files a { font-weight: normal; }
.expand-tools button { font: inherit; font-size: .85rem; padding: .25rem .6rem; margin-right: .3rem; border: 1px solid var(--accordion-border);
  border-radius: 4px; background: #fff; color: var(--heading-color); cursor: pointer; }
.nl-body img { max-width: 100%; height: auto; }
details.nl-article { scroll-margin-top: 1rem; }
.nl-current a { font-size: 1.15rem; font-weight: bold; }
@media (max-width: 700px) { .site-main .nl-cards { grid-template-columns: 1fr; } }

.expand-tools { margin: .5rem 0 1rem; }
.poster-files { padding-left: 1.2rem; }

/* ---------- Contact Center poster cards (thumbnail of page 1 + title) ---------- */
.site-main .poster-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .75rem; }
.poster-cards li { margin: 0; }
.poster-cards a { display: block; height: 100%; padding: .5rem; border: 1px solid #ccc; border-radius: 8px; text-align: center; font-weight: bold; }
.poster-cards a:hover { border-color: var(--accordion-bg); }
.poster-cards img { display: block; width: 100%; max-width: 160px; height: auto; margin: 0 auto .4rem; border: 1px solid #ddd; }
.poster-cards .file-type { font-weight: normal; font-size: .85rem; }

/* ---------- property listings: compact columns of county names (user 2026-10-29) ---------- */
.county-list { column-width: 14rem; column-gap: 1.5rem; margin-top: .75rem; }
details.county { break-inside: avoid; margin: 0 0 .15rem; border: 0; border-bottom: 1px solid #ddd; border-radius: 0; background: none; }
details.county > summary { background: none; color: #000; font-weight: normal; padding: .35rem .25rem; font-size: .95rem; border-radius: 0; }
details.county > summary:hover, details.county > summary:focus-visible { background: var(--tab-hover-bg); color: #000; }
details.county[open] > summary { background: var(--tab-bg); color: #000; font-weight: bold; }
details.county > :not(summary) { margin: 0; }
.site-main .property-list { list-style: none; padding: .25rem .25rem .5rem; margin: 0; }
.property-list li { margin: 0; padding: .3rem 0; border-bottom: 1px solid #eee; line-height: 1.35; font-size: .9rem; }
.kc.finding .county-list { columns: 1; }  /* while using Find: matches across the full width */
.kc.finding .property-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 1rem; }

/* Open all / Close all, sticky variant (Knowledge Center, FAQ): a zero-height bar, so it takes no room and never
   squeezes the content; the buttons sit on the first section heading's line (right) and stay in view while
   scrolling (position: sticky - no script needed for the movement) */
.expand-tools.sticky {
  position: sticky; top: .5rem; z-index: 5; height: 0; margin: 0; padding: 0;
  display: flex; justify-content: flex-end; align-items: flex-start;
}
.expand-tools.sticky button { transform: translateY(1.3rem); background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.expand-tools.sticky button:last-child { margin-right: 0; }
.expand-tools[hidden] { display: none; }

/* ---------- tabs (Knowledge Center, FAQ): one section at a time, CSS only ----------
   The section named after # in the URL is shown (a link to a question inside it counts too); with none, the
   first. Browsers without :has() simply show every section. While the Find box is in use, all sections show. */
.kc-bar { position: sticky; top: 0; z-index: 6; background: #fff; padding: .35rem 0 0; border-bottom: 2px solid var(--accordion-bg); }
.kc-bar ul { margin: 0 !important; align-items: flex-end; }
.kc-tab { scroll-margin-top: 6rem; }
.kc-tab > h2:first-child, .kc-tab > h2 { margin-top: 1rem; }
@supports selector(:has(a)) {
  .kc-tab { display: none; }
  .kc-tab:target, .kc-tab:has(:target), .kc:not(:has(:target)) .kc-tab:first-of-type, .kc.finding .kc-tab { display: block; }
}
.kc-tab[hidden] { display: none !important; }
@media print { .kc-tab { display: block !important; } .kc-bar, .kc-find, .expand-tools { display: none !important; } }
/* Find box: above the section buttons, right-aligned (user request) */
.kc-find { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; margin: 1rem 0 .25rem; }
.kc-find[hidden] { display: none; }
.kc-find input { font: inherit; font-size: .9rem; padding: .3rem .55rem; width: 16rem; max-width: 100%;
  border: 1px solid #767676; border-radius: 4px; }
.kc-count { font-size: .85rem; color: #444; }
.expand-tools.sticky { top: 3rem; }
@media (max-width: 700px) {
  .kc-bar { position: static; }
  .expand-tools.sticky { top: .5rem; }
  .kc-find input { width: 100%; }
}

/* ---------- forms ---------- */
.site-form { max-width: 40rem; }
.site-form .form-field { margin: 0 0 .9rem; }
.site-form label, .site-form legend { display: block; font-weight: bold; margin-bottom: .25rem; }
.site-form .req { font-weight: normal; font-size: .875rem; color: #444; }
.site-form input[type=text], .site-form input[type=email], .site-form input[type=tel], .site-form select, .site-form textarea {
  font: inherit; width: 100%; padding: .45rem .55rem; border: 1px solid #767676; border-radius: 4px; background: #fff; }
.site-form fieldset { border: 0; padding: 0; }
.site-form label.choice { font-weight: normal; display: block; margin: .2rem 0; }
.site-form .form-note { font-size: .875rem; color: #444; }
.form-submit { font: inherit; font-weight: bold; padding: .55rem 1.4rem; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--accordion-bg); color: var(--accordion-text); }
.form-submit:hover, .form-submit:focus { background: var(--accordion-hover-bg); color: var(--accordion-hover-text); }
/* spam trap: off screen for people, still in the form for bots */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- data tables (e.g. FAQ utility-analysis sample sizes) ---------- */
.site-main table { border-collapse: collapse; margin: .75rem 0 1rem; }
.site-main th, .site-main td { border: 1px solid #999; padding: .3rem .8rem; text-align: left; }
.site-main th { background: var(--tab-bg); }
