/* A368: company navigation, footer and a shared button system.
   Existing form logic, viewer controls and page content remain independent. */
:root {
  --phd-button-blue: #075dbf;
  --phd-button-blue-dark: #064d9e;
  --phd-button-navy: #001c55;
  --phd-button-line: #075dbf;
  --phd-control-radius: 10px;
  --phd-control-height: 52px;
  --phd-control-pad-y: 13px;
  --phd-control-pad-x: 22px;
  --phd-control-font: 15px;
}
body.phd-page .button:not([role="switch"]) {
  border-radius: var(--phd-control-radius);
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 650;
  letter-spacing: normal;
  box-shadow: none;
  text-decoration: none;
}
body.phd-page .button.button-secondary:not([role="switch"]),
body.phd-page .button:not([class*="button-primary"]):not([class*="button-danger"]):not([role="switch"]):not(.is-active) {
  color: var(--phd-button-blue);
  border-color: var(--phd-button-blue);
  background: #fff;
  box-shadow: none;
}
body.phd-page .button.button-primary,
body.phd-page .button.admin-tab.is-active {
  color: #fff;
  background: var(--phd-button-blue);
  border-color: var(--phd-button-blue);
  box-shadow: none;
}
body.phd-page .button.button-primary:not(:disabled):hover {
  color: #fff;
  background: var(--phd-button-blue-dark);
  border-color: var(--phd-button-blue-dark);
}
body.phd-page .button.button-secondary:not(:disabled):hover {
  background: #eff5fc;
  border-color: var(--phd-button-blue-dark);
  color: var(--phd-button-blue-dark);
}
body.phd-page .button:disabled { opacity: .55; cursor: default; }
body.phd-page .button:focus-visible { outline: 3px solid #075dbf; outline-offset: 3px; }
body.phd-page .button svg { width: 20px; height: 20px; flex: none; }
/* Compact utilities share the same color, radius and focus treatment. */
body.phd-page .viewer-zoom-button {
  border-radius: 10px;
  border-color: #075dbf;
  color: #075dbf;
  background: #fff;
}
body.phd-page .viewer #viewerHelpButton.button {
  border-radius: 10px;
  box-shadow: none;
  background: #fff;
  color: #075dbf;
  border-color: #075dbf;
}
body.phd-page .viewer #viewerHelpButton.button:not(:disabled):hover { background: #eff5fc; }
.site-skip-link {
  position: absolute;
  z-index: 100;
  left: 16px;
  top: -80px;
  padding: 12px 16px;
  background: #fff;
  color: #001c55;
  border: 2px solid #075dbf;
  border-radius: 10px;
}
.site-skip-link:focus { top: 10px; }
body.phd-page .phd-site-header { position: relative; z-index: 20; background: #fff; border-bottom: 1px solid #e0e6ed; }
body.phd-page .phd-site-header .header-inner {
  width: min(calc(100% - 64px), 1360px);
  min-height: 76px;
  padding: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
body.phd-page .phd-site-header .company-lockup { display: inline-flex; gap: 10px; align-items: center; flex-shrink: 0; text-decoration: none; color: #001c55; }
body.phd-page .phd-site-header .company-lockup img { display: block; width: 34px; height: 34px; object-fit: contain; flex: none; }
body.phd-page .phd-site-header .company-type { display: flex; flex-direction: column; gap: 3px; }
body.phd-page .phd-site-header .company-wordmark { font: 650 20px/1.2 "Segoe UI", Arial, sans-serif; letter-spacing: -.035em; white-space: nowrap; }
body.phd-page .phd-site-header .company-descriptor { font: 600 8px/1.5 "Segoe UI", Arial, sans-serif; letter-spacing: .14em; color: #536b8a; white-space: nowrap; }
body.phd-page .site-primary-nav { display: flex; align-items: center; gap: 30px; }
body.phd-page .site-primary-nav a { position: relative; padding: 26px 0; color: #263f62; font: 500 14px/1.5 "Segoe UI", Arial, sans-serif; text-decoration: none; white-space: nowrap; }
body.phd-page .site-primary-nav a:hover, body.phd-page .site-primary-nav a[aria-current="page"] { color: #075dbf; }
body.phd-page .site-primary-nav a[aria-current="page"] { font-weight: 650; }
body.phd-page .site-primary-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: 17px; left: 0; right: 0; height: 2px; border-radius: 2px; background: #075dbf; }
body.phd-page .site-primary-nav a:focus-visible, body.phd-page .site-mobile-nav a:focus-visible { outline: 2px solid #075dbf; outline-offset: 5px; }
body.phd-page .site-mobile-nav { display: none; position: relative; flex: none; }
body.phd-page .site-mobile-nav summary { display: flex; justify-content: center; align-items: center; width: 44px; height: 44px; border: 1px solid #075dbf; border-radius: 10px; color: #075dbf; background: #fff; list-style: none; cursor: pointer; }
body.phd-page .site-mobile-nav summary::-webkit-details-marker { display: none; }
body.phd-page .site-mobile-nav summary:focus-visible { outline: 3px solid #075dbf; outline-offset: 3px; }
body.phd-page .site-mobile-nav summary svg { width: 22px; height: 22px; }
body.phd-page .site-mobile-nav .nav-close-icon, body.phd-page .site-mobile-nav[open] .nav-menu-icon { display: none; }
body.phd-page .site-mobile-nav[open] .nav-close-icon { display: block; }
body.phd-page .site-mobile-nav nav { position: absolute; right: 0; top: 54px; width: min(300px, calc(100vw - 32px)); padding: 10px; box-sizing: border-box; background: #fff; border: 1px solid #d5e0ee; border-radius: 12px; box-shadow: 0 14px 34px rgba(0,28,85,.12); }
body.phd-page .site-mobile-nav nav a { display: block; padding: 13px 14px; color: #263f62; border-radius: 7px; font: 500 16px/1.4 "Segoe UI", Arial, sans-serif; text-decoration: none; }
body.phd-page .site-mobile-nav nav a[aria-current="page"], body.phd-page .site-mobile-nav nav a:hover { color: #075dbf; background: #eff5fc; }
body.phd-page .phd-site-footer { padding: 26px 32px; margin: 0; border-top: 1px solid #dbe3ec; background: #fff; }
body.phd-page .phd-site-footer .site-footer-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px 36px; max-width: 1360px; margin: 0 auto; }
body.phd-page .phd-site-footer .footer-founder { margin: 0; color: #314967; font: normal 12px/1.65 "Segoe UI", Arial, sans-serif; }
body.phd-page .phd-site-footer .footer-founder strong { display: block; color: #001c55; font-weight: 650; }
body.phd-page .phd-site-footer .site-footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 20px; font: 400 12px/1.65 "Segoe UI", Arial, sans-serif; letter-spacing: normal; }
body.phd-page .phd-site-footer .site-footer-nav a { color: #314967; text-decoration: none; }
body.phd-page .phd-site-footer .site-footer-nav a:hover { color: #075dbf; text-decoration: underline; text-underline-offset: 3px; }
body.phd-page .phd-site-footer .company-status { text-align: right; }
body.phd-page .phd-site-footer .active-status, body.phd-page .phd-site-footer .site-copyright { margin: 0; color: #4d627c; font: 400 11px/1.7 "Segoe UI", Arial, sans-serif; letter-spacing: normal; }
body.phd-page .phd-site-footer .active-status span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #188454; }
body.phd-page .admin-header .company-lockup img { width: 34px; height: 34px; }
@media (max-width: 1100px) {
  body.phd-page .phd-site-footer .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 18px; }
  body.phd-page .phd-site-footer .site-footer-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}
@media (max-width: 959px) {
  body.phd-page .site-primary-nav { display: none; }
  body.phd-page .site-mobile-nav { display: block; }
  body.phd-page .phd-site-header .header-inner { width: calc(100% - 40px); min-height: 72px; gap: 12px; }
}
@media (max-width: 600px) {
  :root { --phd-control-height: 48px; --phd-control-pad-y: 12px; --phd-control-pad-x: 18px; --phd-control-font: 15px; }
  body.phd-page .phd-site-header .header-inner { width: calc(100% - 32px); min-height: 68px; }
  body.phd-page .phd-site-header .company-lockup { gap: 8px; }
  body.phd-page .phd-site-header .company-lockup img { width: 28px; height: 28px; }
  body.phd-page .phd-site-header .company-wordmark { font-size: clamp(14px, 4.2vw, 18px); }
  body.phd-page .phd-site-header .company-descriptor { display: none; }
  body.phd-page .phd-site-footer { padding: 24px 20px; }
  body.phd-page .phd-site-footer .site-footer-inner { grid-template-columns: 1fr; gap: 18px; }
  body.phd-page .phd-site-footer .site-footer-nav { grid-column: auto; grid-row: auto; justify-content: flex-start; gap: 6px 18px; }
  body.phd-page .phd-site-footer .site-footer-nav a { display: inline-block; padding-block: 5px; }
  body.phd-page .phd-site-footer .company-status { text-align: left; }
}

/* A369: five public navigation items stay clear of the company lockup. */
@media (max-width: 1119px) {
  body.phd-page .site-primary-nav { display:none; }
  body.phd-page .site-mobile-nav { display:block; }
}

/* A372: gentle color-only activity pulse; the dot stays fully visible.
   Reduced-motion users retain the existing steady #188454 dot. */
@keyframes phd-program-status-a372 {
  0%, 100% { background-color: #188454; }
  50% { background-color: #89fe05; }
}
@media (prefers-reduced-motion: no-preference) {
  body.phd-page .phd-site-footer .active-status > span[aria-hidden="true"] {
    animation: phd-program-status-a372 3s ease-in-out infinite;
  }
}
