/* P2 public UX — audience-first header/home/footer/help.
   Extends the existing public design system; does not replace site.css. */

:root {
  --p2-navy: #08182c;
  --p2-deep: #060e1c;
  --p2-gold: #d6b25e;
  --p2-gold-soft: #f0d58a;
  --p2-ink: #f5f1e7;
  --p2-muted: #aab7ca;
  --p2-paper: #f7f8fa;
  --p2-line: rgba(214, 178, 94, 0.22);
  /* Light-surface readable aliases (shared with site.css dual palette) */
  --p2-ink-on-light: var(--ink-on-light, #0b1728);
  --p2-muted-on-light: var(--muted-on-light, #4a5565);
  --p2-accent-on-light: var(--accent-on-light, #705b2a);
}

/* Header: keep one primary CTA; secondary is quieter */
.header-primary-cta {
  min-height: 44px;
}
.header-primary-cta .cta-text-short {
  display: none;
}
.header-secondary-cta {
  min-height: 44px;
}
@media (min-width: 1181px) and (max-width: 1260px) {
  .header-primary-cta .cta-text-full {
    display: none;
  }
  .header-primary-cta .cta-text-short {
    display: inline;
  }
}
@media (max-width: 390px) {
  .header-actions .header-secondary-cta {
    display: none;
  }
  .header-actions .header-primary-cta {
    min-width: 44px;
  }
}
@media (max-width: 1180px) {
  .site-navigation .mobile-nav-actions .button {
    min-height: 44px;
    width: 100%;
    justify-content: center;
  }
}

/* Homepage P2 hero — calm, fewer competing CTAs */
.home-p2 .premium-hero-p2 {
  min-height: min(78vh, 720px);
  padding-block: clamp(48px, 8vw, 96px);
}
.home-p2 .premium-hero-inner-p2 {
  grid-template-columns: 1fr;
  max-width: 820px;
}
.home-p2 .premium-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.home-p2 .premium-hero-actions .button {
  min-height: 48px;
}
.home-p2 .premium-hero-tertiary {
  margin-top: 18px;
  color: var(--p2-muted);
  font-size: 1rem;
}
.home-p2 .premium-hero-tertiary .text-link {
  font-weight: 800;
  color: var(--p2-gold);
}
.home-p2 .premium-hero-tertiary .text-link:hover,
.home-p2 .premium-hero-tertiary .text-link:focus-visible {
  color: var(--p2-ink);
}
.home-p2 .audience-section-p2 {
  padding-top: clamp(40px, 6vw, 72px);
}
.home-p2 .audience-grid-quad,
.home-p2 .audience-grid-five {
  gap: 14px;
}
.home-p2 .audience-grid-five {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.home-p2 .audience-card {
  min-height: 220px;
}
.home-p2 .audience-card:focus-visible {
  outline: 2px solid var(--p2-gold);
  outline-offset: 3px;
}
.home-p2 .home-how-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.home-p2 .home-how-grid-five {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.home-p2 .home-how-card {
  padding: 28px 26px;
  border: 1px solid rgba(8, 24, 44, 0.08);
  border-radius: 18px;
  background: var(--paper, #fff);
  color: var(--p2-ink-on-light);
  --ink: var(--p2-ink-on-light);
  --muted: var(--p2-muted-on-light);
  --gold-light: var(--p2-accent-on-light);
}
.home-p2 .home-how-card h3 {
  margin: 0 0 14px;
  font-size: 1.2rem;
  color: var(--p2-ink-on-light);
}
.home-p2 .home-how-card ol {
  margin: 0 0 18px;
  padding-left: 1.15rem;
  color: var(--p2-muted-on-light);
  line-height: 1.55;
}
.home-p2 .home-how-card .card-link,
.home-p2 .home-how-card .text-link {
  color: var(--p2-accent-on-light);
  font-weight: 800;
}
.home-p2 .home-how-card .card-link:hover,
.home-p2 .home-how-card .card-link:focus-visible,
.home-p2 .home-how-card .text-link:hover,
.home-p2 .home-how-card .text-link:focus-visible {
  color: var(--p2-ink-on-light);
}
.home-p2 .process-section-p2 {
  background: var(--paper-soft, var(--p2-paper));
  color: var(--p2-ink-on-light);
  --ink: var(--p2-ink-on-light);
  --muted: var(--p2-muted-on-light);
  --gold-light: var(--p2-accent-on-light);
}
.home-p2 .process-section-p2 .section-kicker {
  color: var(--p2-accent-on-light);
}
.home-p2 .process-section-p2 .premium-section-heading h2 {
  color: var(--p2-ink-on-light);
}
.home-p2 .process-section-p2 .premium-section-heading > p {
  color: var(--p2-muted-on-light);
}
.home-p2 .premium-services-p2 {
  background: var(--p2-paper);
}
.home-p2 .verification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
@media (max-width: 768px) {
  .home-p2 .home-how-grid,
  .home-p2 .home-how-grid-five {
    grid-template-columns: 1fr;
  }
  .home-p2 .premium-hero-actions .button,
  .home-p2 .verification-actions .button,
  .home-p2 .premium-final-cta .button {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 390px) {
  .home-p2 .premium-hero-p2 {
    min-height: 0;
    padding-block: 36px 28px;
  }
  .home-p2 .audience-card {
    min-height: 0;
  }
}

/* Footer audience grouping */
.site-footer-p2 .footer-grid-p2 {
  grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(140px, 1fr));
  gap: 28px 22px;
}
.site-footer-p2 .footer-grid-p2 h2 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  .site-footer-p2 .footer-grid-p2 {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer-p2 .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Help centre — finder list (not equal card grid). Owner (13 Aug
   2026): the white panel was off-theme — this is the one public page
   that abandoned the navy identity. Same navy surface language as
   .section-contrast everywhere else; gold ink for actions. */
.page-help .help-section.section-light,
.page-help .help-section {
  background: transparent;
  color: inherit;
}
.page-help .q-help-finder {
  background: rgba(10, 25, 48, 0.34);
  border: 1px solid rgba(214, 178, 94, 0.16);
  border-radius: 16px;
  padding: 8px 22px;
}
.page-help .q-help-item {
  border-bottom: 1px solid rgba(214, 178, 94, 0.12);
}
.page-help .q-help-item__title {
  color: #f4f0e6 !important;
}
.page-help .q-help-item__desc {
  color: #9fb0c4 !important;
}
.page-help .q-help-item__cta {
  color: #f0d58a !important;
}
.page-help .help-desk-note.surface-light,
.page-help .help-desk-note {
  background: rgba(10, 25, 48, 0.34);
  border: 1px solid rgba(214, 178, 94, 0.16);
  border-radius: 16px;
  color: inherit;
}
.page-help .help-desk-note h2 {
  color: #f4f0e6;
}
.page-help .help-desk-note p,
.page-help .help-desk-note li {
  color: #9fb0c4;
}

/* Legacy help-topic cards kept for older markup / tests. */
.help-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.page-help .help-topic,
.help-topic.surface-light,
.help-topic {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 168px;
  padding: 22px 20px;
  border: 1px solid rgba(8, 24, 44, 0.1);
  border-radius: 16px;
  background: #ffffff !important;
  color: #0b1728 !important;
  --ink: #0b1728;
  --muted: #4a5565;
  --gold-light: #705b2a;
  --p2-ink-on-light: #0b1728;
  --p2-muted-on-light: #4a5565;
  --p2-accent-on-light: #705b2a;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.page-help .help-topic:hover,
.page-help .help-topic:focus-visible,
.page-help .help-topic:visited,
.help-topic:hover,
.help-topic:focus-visible,
.help-topic:visited {
  border-color: rgba(214, 178, 94, 0.55);
  box-shadow: 0 10px 28px rgba(8, 24, 44, 0.08);
  outline: none;
  color: #0b1728 !important;
}
.page-help .help-topic h2,
.help-topic h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #0b1728 !important;
}
.page-help .help-topic p,
.help-topic p {
  margin: 0;
  color: #4a5565 !important;
  line-height: 1.5;
  flex: 1;
}
.page-help .help-topic .card-link,
.help-topic .card-link {
  color: #705b2a !important;
  font-weight: 800;
  font-size: 0.86rem;
}
.page-help .help-topic:hover .card-link,
.page-help .help-topic:focus-visible .card-link,
.help-topic:hover .card-link,
.help-topic:focus-visible .card-link {
  color: #0b1728 !important;
}
.page-help .help-desk-note,
.help-desk-note.surface-light,
.help-desk-note {
  margin-top: 36px;
  padding: 24px 22px;
  border-left: 3px solid #d6b25e;
  background: #f3f5f8 !important;
  border-radius: 0 14px 14px 0;
  color: #0b1728 !important;
  --ink: #0b1728;
  --muted: #4a5565;
  --gold-light: #705b2a;
}
.page-help .help-desk-note h2,
.help-desk-note h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: #0b1728 !important;
}
.page-help .help-desk-note > p,
.help-desk-note > p {
  color: #4a5565 !important;
}
.page-help .help-route-clarify,
.help-route-clarify {
  margin: 14px 0 0;
  padding-left: 1.1rem;
  color: #4a5565 !important;
  line-height: 1.55;
}
.page-help .help-route-clarify strong,
.help-route-clarify strong {
  color: #0b1728 !important;
}
/* Dark page chrome only — do not let cream ink leak into light cards */
.page-help .help-section {
  color: inherit;
}
.page-help .help-hero,
.page-help .page-hero {
  color: #f4f0e6;
}

/* Student hub P2 */
.su-hub-p2 .su-cta-dual {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.su-hub-p2 .su-cta-dual .button {
  min-height: 48px;
}
/* Student hub is a dark surface — helpers must stay light, not navy-on-navy */
.su-hub-p2 .su-help-inline {
  margin-top: 14px;
  color: var(--muted, #9aa8bf);
}
.su-hub-p2 .su-help-inline a {
  color: var(--gold-light, #f0d58a);
  font-weight: 700;
}
.su-hub-p2 .su-help-inline a:hover,
.su-hub-p2 .su-help-inline a:focus-visible {
  color: var(--ink, #f4f0e6);
}
.su-hub-p2 .su-secondary-paths {
  margin-top: 18px;
  max-width: 420px;
}
.su-hub-p2 .su-secondary-paths summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink, #f4f0e6);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.su-hub-p2 .su-secondary-paths ul {
  margin: 10px 0 0;
  padding-left: 1.1rem;
  line-height: 1.6;
  color: var(--muted, #9aa8bf);
}
.su-hub-p2 .su-secondary-paths a {
  color: var(--gold-light, #f0d58a);
  font-weight: 700;
}
.su-hub-p2 .su-secondary-paths a:hover,
.su-hub-p2 .su-secondary-paths a:focus-visible {
  color: var(--ink, #f4f0e6);
}
.su-hub-p2 .su-steps-plain {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.55;
  color: var(--muted, #9aa8bf);
}
.su-hub-p2 .su-institution-aside {
  margin-top: 36px;
  padding: 22px 20px;
  border-top: 1px solid rgba(214, 178, 94, 0.18);
  color: var(--ink, #f4f0e6);
}
.su-hub-p2 .su-institution-aside h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--ink, #f4f0e6);
}
.su-hub-p2 .su-institution-aside p,
.su-hub-p2 .su-institution-aside a:not(.button) {
  color: var(--muted, #9aa8bf);
}
.su-hub-p2 .su-institution-aside a:not(.button):hover,
.su-hub-p2 .su-institution-aside a:not(.button):focus-visible {
  color: var(--gold-light, #f0d58a);
}
@media (max-width: 390px) {
  .su-hub-p2 .su-cta-dual .button {
    width: 100%;
    justify-content: center;
  }
}

/* Partner public landing */
.partner-network-page .pn-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.partner-network-page .pn-hero-actions .button {
  min-height: 48px;
}
/* Partner public landing is a dark surface */
.partner-network-page .pn-help-inline {
  margin-top: 14px;
  color: var(--muted, #9aa8bf);
}
.partner-network-page .pn-help-inline a {
  color: var(--gold-light, #f0d58a);
  font-weight: 700;
}
.partner-network-page .pn-help-inline a:hover,
.partner-network-page .pn-help-inline a:focus-visible {
  color: var(--ink, #f4f0e6);
}
@media (max-width: 390px) {
  .partner-network-page .pn-hero-actions .button {
    width: 100%;
    justify-content: center;
  }
}

/* Requirement form sections — dark elevated fields (Partner apply bar),
   not white paper islands on the dark premium-form card. */
.premium-form .form-section {
  margin: 0 0 22px;
  padding: 18px 16px 8px;
  border: 1px solid rgba(214, 178, 94, 0.16);
  border-radius: 14px;
  background: rgba(8, 18, 36, 0.55);
  color: #e9e3d6;
}
.premium-form .form-section legend {
  padding: 0 6px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #f0d58a;
}
.premium-form .form-section-help {
  margin: 0 0 12px;
  color: #9aa8bf;
  font-size: 0.86rem;
}
.premium-form .form-section .form-field label {
  color: #e9e3d6;
}
.premium-form .form-section .form-field small {
  color: #9aa8bf;
}
.premium-form .form-section .form-field input:not([type="checkbox"]):not([type="radio"]),
.premium-form .form-section .form-field select,
.premium-form .form-section .form-field textarea {
  background: rgba(8, 18, 36, 0.96);
  color: #f4f0e6;
  border: 1.5px solid rgba(201, 162, 39, 0.45);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(214, 178, 94, 0.04);
}
.premium-form .form-section .form-field input:hover,
.premium-form .form-section .form-field select:hover,
.premium-form .form-section .form-field textarea:hover {
  border-color: rgba(214, 178, 94, 0.7);
}
.premium-form .form-section .form-field input:focus,
.premium-form .form-section .form-field select:focus,
.premium-form .form-section .form-field textarea:focus,
.premium-form .form-section .form-field input:focus-visible,
.premium-form .form-section .form-field select:focus-visible,
.premium-form .form-section .form-field textarea:focus-visible {
  border-color: #d6b25e;
  background: rgba(10, 22, 42, 0.98);
  box-shadow:
    0 0 0 3px rgba(214, 178, 94, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  outline: none;
}
.premium-form .form-section .form-field input::placeholder,
.premium-form .form-section .form-field textarea::placeholder {
  color: #8b96a8;
  opacity: 1;
}
.premium-form .form-section .form-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, #f0d58a 50%),
    linear-gradient(135deg, #f0d58a 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.premium-form .form-section .form-field input:disabled,
.premium-form .form-section .form-field select:disabled,
.premium-form .form-section .form-field textarea:disabled {
  color: #8a94a3;
  background: rgba(6, 14, 28, 0.55);
  border-color: rgba(154, 168, 191, 0.22);
}
@media (max-width: 768px) {
  .premium-form .button-large {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .help-topic,
  .home-p2 .audience-card {
    transition: none;
  }
}
