/* GWT WordPress 27: restrained visual refinement layer. */
:root {
  --gwt27-border: #dfe3e8;
  --gwt27-soft: #f6f7f8;
  --gwt27-text: #263746;
  --gwt27-blue: #1f5f99;
  --gwt27-radius: 3px;
}

body { color: var(--gwt27-text); line-height: 1.55; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; }
.entry-content p, .entry-content li, .widget p, .widget li { line-height: 1.58; }

/* Header: preserve the proven GWT 26 EAR widget flow. */
.container-masthead .row { display: flex; align-items: center; flex-wrap: wrap; }
@media screen and (max-width: 63.9375em) {
  .container-masthead .row { display: block; }
}
.container-masthead .ear-content.widget {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}
/* Prevent logo-tray / icon images from scaling up when the EAR column
   widens from a narrow desktop side-column to a full-width stacked row
   at tablet/mobile. Caps size in absolute units instead of letting
   percentage widths inflate with the container. */
.container-masthead .ear-content.widget img {
  width: 100%;
  max-width: 60px;
  max-height: 60px;
  height: auto;
  object-fit: contain;
}
h1.logo { line-height: 1.15; }
h1.logo a { display: block; overflow-wrap: anywhere; }
h1.logo img { width: auto; max-width: 100%; height: auto; max-height: 150px; object-fit: contain; }

/* Navigation
 * Keep GWT 26 / Foundation dropdown positioning and change only sizing,
 * wrapping, and spacing. Top-level and submenu rules are intentionally
 * separate so desktop-bar constraints cannot leak into flyout menus. */
#main-nav .row,
#aux-main .row { max-width: 75rem; }

/* Reserve one unbroken row for the left menu and the right-side tools. */
#main-nav .large-12.columns {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
}
#main-nav .top-bar-left {
  float: none;
  flex: 1 1 auto;
  min-width: 0;
}
#main-nav .top-bar-right {
  float: none;
  flex: 0 0 auto;
  margin-left: auto;
}
#main-nav .top-bar-left > .dropdown.menu,
#main-nav .top-bar-right > .dropdown.menu {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  height: 100%;
}
#main-nav .top-bar-left > .dropdown.menu > li {
  display: flex;
  align-items: stretch;
  flex: 0 1 auto;
  min-width: min-content;
  position: relative;
}
#main-nav .top-bar-right > .dropdown.menu > li {
  flex: 0 0 auto;
}

/* Top-level labels: based on the user's proven per-site CSS, without IDs. */
#main-nav .top-bar-left > .dropdown.menu > li > a,
#aux-main > .dropdown.menu > li > a {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: min-content;
  min-height: 58px;
  max-width: none;
  box-sizing: border-box;
  padding: 2px 6px !important;
  font-family: "Helvetica", sans-serif !important;
  font-size: 11pt !important;
  font-style: normal !important;
  line-height: 1.3 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
#main-nav .top-bar-left > .dropdown.menu > li.nav-item > a {
  font-size: 1.2rem !important;
}
#main-nav .top-bar-left > .dropdown.menu > li.has-dropdown > a,
#main-nav .top-bar-left > .dropdown.menu > li.is-dropdown-submenu-parent > a,
#aux-main > .dropdown.menu > li.has-dropdown > a,
#aux-main > .dropdown.menu > li.is-dropdown-submenu-parent > a {
  padding-right: 24px !important;
}
#main-nav .top-bar-left > .dropdown.menu > li.has-dropdown > a::after,
#main-nav .top-bar-left > .dropdown.menu > li.is-dropdown-submenu-parent > a::after,
#aux-main > .dropdown.menu > li.has-dropdown > a::after,
#aux-main > .dropdown.menu > li.is-dropdown-submenu-parent > a::after {
  top: 50% !important;
  right: 6px !important;
  margin-top: 0 !important;
  margin-right: 0 !important;
  transform: translateY(-50%);
}

/* Search and accessibility controls remain on the same line. */
#main-nav .top-bar-right,
#main-nav .top-bar-right > .dropdown.menu,
#main-nav .top-bar-right > .dropdown.menu > li,
#main-nav .top-bar-right > .dropdown.menu > li > .menu {
  white-space: nowrap;
}

/* First flyout starts below the full-height navigation row. Its width follows
 * its parent tab instead of using the former forced 16--21rem panel. */
#main-nav .top-bar-left > .dropdown.menu > li > .is-dropdown-submenu,
#aux-main > .dropdown.menu > li > .is-dropdown-submenu {
  top: 100% !important;
  left: 0;
  width: 100%;
  min-width: 100% !important;
  max-width: none;
}

/* Nested flyouts retain GWT 26's side-opening cascade. */
#main-nav .is-dropdown-submenu .is-dropdown-submenu,
#aux-main .is-dropdown-submenu .is-dropdown-submenu {
  top: 0 !important;
  left: 100%;
  width: 100%;
  min-width: 100% !important;
  max-width: none;
}
#main-nav .is-dropdown-submenu,
#aux-main .is-dropdown-submenu {
  border: 1px solid var(--gwt27-border);
  box-shadow: 0 4px 12px rgba(24, 39, 56, .10);
}
#main-nav ul.dropdown.vertical.menu.submenu.is-dropdown-submenu > li.is-submenu-item,
#aux-main ul.dropdown.vertical.menu.submenu.is-dropdown-submenu > li.is-submenu-item {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}
#main-nav ul.dropdown.vertical.menu.submenu.is-dropdown-submenu > li.is-submenu-item > a,
#aux-main ul.dropdown.vertical.menu.submenu.is-dropdown-submenu > li.is-submenu-item > a {
  display: block !important;
  width: 100%;
  max-width: none;
  min-height: 0;
  box-sizing: border-box;
  padding: 2px 6px !important;
  font-family: "Helvetica", sans-serif !important;
  font-size: 11pt !important;
  font-style: normal !important;
  line-height: 1.3 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

/* Keep hover/current-state emphasis from changing geometry. */
#main-nav ul li:hover:not(.has-form) > a,
#aux-main ul li:hover:not(.has-form) > a,
#main-nav li.current-menu-item:not(.has-form) > a:not(.button),
#aux-main li.current-menu-item:not(.has-form) > a:not(.button) {
  font-size: 11pt !important;
  font-weight: 600;
}

/* Cards, panels, widgets, and tables */
.card, .callout, .panel, .entry-content table, .widget { border-color: var(--gwt27-border); }
.card, .callout, .panel { border-width: 1px; border-radius: var(--gwt27-radius); box-shadow: 0 1px 2px rgba(24, 39, 56, .04); }
.card-section, .callout, .panel, .widget { padding: 1.15rem; }
.entry-content hr { border: 0; border-top: 1px solid var(--gwt27-border); margin: 1.5rem 0; }
.entry-content th { font-weight: 600; }

/* Icon-capable GWT 27 tabs */
.gwt27-tabs { border: 1px solid var(--gwt27-border); background: #fff; }
.gwt27-tabs .tabs-title > a { display: flex; align-items: center; gap: .5rem; padding: .9rem 1.05rem; line-height: 1.2; font-weight: 500; white-space: normal; }
.gwt27-tabs .tabs-title > a:focus, .gwt27-tabs .tabs-title > a[aria-selected="true"] { background: var(--gwt27-soft); box-shadow: inset 0 -2px 0 var(--gwt27-blue); }
.gwt27-tabs .tabs-title i { flex: 0 0 auto; width: 1.1em; text-align: center; }
.gwt27-tabs-content { border: 1px solid var(--gwt27-border); border-top: 0; }
.gwt27-tabs-content .tabs-panel { padding: 1.25rem; }

/* Agency and official government footers */
#footer { padding: 2rem 0; }
#footer #supplementary { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem 0; }
#footer .widget { border: 0; padding: .5rem 1.25rem; background: transparent; }
#footer .widget-title { margin-bottom: .75rem; font-size: 1rem; line-height: 1.3; font-weight: 600; }
#footer p, #footer li { line-height: 1.5; }
.gwt27-standard-footer-wrap { width: 100%; background: #eee; border-top: 1px solid #d9d9d9; padding: 1.5rem 0; }
#gwt-standard-footer.row { max-width: 75rem; margin: 0 auto; }
.gwt27-std-footer-col { font-size: .8rem; line-height: 1.5; color: #444; }
.gwt27-std-footer-col h4 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 700;
  color: var(--gwt27-text);
  margin: 0 0 .5rem;
}
.gwt27-std-footer-col p { margin: 0 0 .5rem; }
.gwt27-std-footer-col ul { list-style: none; margin: 0; padding: 0; }
.gwt27-std-footer-col li { margin-bottom: .3rem; }
.gwt27-std-footer-col a { color: var(--gwt27-blue); text-decoration: none; }
.gwt27-std-footer-col a:hover { text-decoration: underline; }
.gwt27-std-footer-brand { display: flex; gap: .85rem; align-items: flex-start; }
.gwt27-std-footer-seal { width: 60px; height: auto; opacity: .5; flex-shrink: 0; margin-top: .1rem; }
@media screen and (max-width: 63.9375em) {
  .gwt27-std-footer-col { margin-bottom: 1.25rem; }
}
