/* v0.8.3 public quality pass. Loaded after the existing brand styles. */
:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid #27d7cf;
  outline-offset: 4px;
}
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 200; padding: 14px 20px; background: #071014; color: #fff; border: 2px solid #27d7cf; }
.skip-link:focus { top: 12px; }
.launch-footer nav, .footer-links { flex-wrap: wrap; }
.launch-footer nav a { min-height: 44px; display: inline-flex; align-items: center; }
.gateway-choice, .showcase-card > *, .field-grid > *, .portal-main { min-width: 0; }
.signin-modal { padding: 16px 0; overflow-y: auto; }
.signin-panel { max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal-close { width: 44px; height: 44px; }
.modal-locked { overflow: hidden; }
.product-mobile-nav, .business-ecosystem-mobile { display: none; }
.portal-mobile-header { display: none; }
.custody-page .system-node:focus-visible { border-color: #4b7cff; }
.custody-page #system, .custody-page #workflow, .custody-page #features, .custody-page #modules { scroll-margin-top: 104px; }

@media (max-width: 900px) {
  .gateway-header, .audience-header { height: auto; min-height: 78px; gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
  .gateway-header > div, .audience-header nav, .header-account { flex-wrap: wrap; }
  .gateway-header > div { gap: 12px; }
  .header-account > span { overflow-wrap: anywhere; }
}

@media (max-width: 1000px) {
  .custody-page .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .custody-page .topbar .desktop-nav, .custody-page .topbar .nav-actions { display: none; }
  .product-mobile-nav { display: block; }
  .product-mobile-nav summary { display: flex; align-items: center; min-height: 44px; padding: 0 14px; cursor: pointer; border: 1px solid #819097; border-radius: 10px; }
  .product-mobile-nav nav { position: absolute; right: 10px; top: calc(100% + 8px); width: min(260px, calc(100vw - 48px)); padding: 12px; display: grid; background: #121c24; border: 1px solid #53616e; border-radius: 14px; box-shadow: 0 16px 40px #0008; }
  .product-mobile-nav nav a { padding: 12px; min-height: 44px; }
}

/* Use a readable foundation-and-modules list instead of a scaled desktop diagram. */
@media (max-width: 820px) {
  .custody-page .ac-hero { padding-top: 48px; }
  .custody-page .custody-hero-plaque { width: min(100%, 560px); max-width: 100%; margin-bottom: 24px; }
  .custody-page .ac-hero h1 { font-size: clamp(2.5rem, 8vw, 3.75rem); line-height: 1.06; }
  .custody-page .custody-system { padding-top: 64px; }
  .custody-page .two-column-heading { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 24px; }
  .custody-page .section-heading h2, .custody-page .showcase-copy h2,
  .custody-page .modules-copy h2, .custody-page .build-section h2 { font-size: clamp(1.9rem, 5.7vw, 2.8rem); line-height: 1.12; }
  .custody-page .ecosystem-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; height: auto; min-height: 0; padding: 16px; margin-top: 24px; border-radius: 22px; }
  .custody-page .ecosystem-stage::before, .custody-page .connections { display: none; }
  .custody-page .ecosystem-stage .system-node,
  .custody-page .ecosystem-stage .system-node:hover,
  .custody-page .ecosystem-stage .system-node.highlight,
  .custody-page .ecosystem-stage .system-node.active { position: relative; inset: auto; transform: none !important; width: 100%; min-width: 0; margin: 0; padding: 20px; }
  .custody-page .ecosystem-stage .core-node { text-align: left; }
  .custody-page .core-node strong { font-size: clamp(1.45rem, 4vw, 1.8rem); }
  .custody-page .system-node strong { overflow-wrap: anywhere; }
  .custody-page .node-icon { margin-bottom: 8px; }
  .custody-page .workflow-section, .custody-page .showcase,
  .custody-page .intelligence, .custody-page .modules-section { padding-top: 64px; }
  .custody-page .lifecycle, .custody-page .intel-grid { margin-top: 24px; }
  .custody-page .lifecycle { gap: 12px; }
  .custody-page .lifecycle article { min-height: 0; border-radius: 14px; }
  .custody-page .lifecycle article strong { margin-top: 12px; }
  .custody-page .build-section { margin-top: 64px; }
}

@media (max-width: 760px) {
  .gateway-choices { grid-template-columns: minmax(0, 1fr); }
  .gateway-choice { padding: 26px; }
  .gateway-choice h2 { font-size: clamp(1.6rem, 7vw, 2rem); overflow-wrap: anywhere; }
  .showcase-card, .showcase-card.active { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 24px; }
  .showcase-card h2 { font-size: clamp(1.8rem, 7vw, 2.4rem); overflow-wrap: anywhere; }
  .showcase-card .primary-button { white-space: normal; text-align: center; padding: 12px 16px; max-width: 100%; }
  .business-ecosystem-art { display: none; }
  .business-ecosystem-mobile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ecosystem-foundation, .ecosystem-capabilities { min-width: 0; padding: 20px; border: 1px solid #2a5458; border-radius: 16px; background: #0b1b20; }
  .ecosystem-foundation h3 { color: #27d7cf; margin-top: 0; }
  .ecosystem-foundation p { margin-bottom: 0; line-height: 1.6; color: #b7c9cc; }
  .ecosystem-capabilities h3 { margin-top: 0; }
  .ecosystem-capabilities ul { margin-bottom: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
  .ecosystem-capabilities li { padding: 5px 0; break-inside: avoid; }
  .auth-card, .signin-panel, .center-card { padding: 26px; }
  .legal-shell h1 { font-size: clamp(2rem, 9vw, 3rem); overflow-wrap: anywhere; }
  .portal-sidebar-bottom, .sidebar-user-chip, .sidebar-user-chip > span { min-width: 0; overflow-wrap: anywhere; }
}

@media (max-width: 480px) {
  .ecosystem-capabilities ul { columns: 1; }
  .gateway-header > a { width: 100%; }
  .gateway-header > div { width: 100%; justify-content: space-between; }
  .gateway-header .header-account { width: 100%; justify-content: space-between; }
  .audience-header nav { gap: 12px; justify-content: flex-start; }
  .audience-header > a { width: 100%; }
  .launch-footer nav { column-gap: 16px; row-gap: 2px; }
  .frame-label { font-size: .6rem; left: 12px; letter-spacing: .06em; }
  .frame-label b { display: none; }
}

@media (min-width: 681px) and (max-width: 1100px) {
  .portal-v07 .portal-brand-v07 img { width: 50px; height: auto; max-height: 64px; object-fit: contain; }
}

@media (max-width: 680px) {
  .portal-v07 .portal-sidebar { display: none; }
  .portal-mobile-header { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #30444c; background: #0c191e; }
  .portal-mobile-header > a { display: flex; min-width: 0; }
  .portal-mobile-header img { width: 130px; height: 44px; object-fit: contain; }
  .portal-mobile-menu summary { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid #53616e; border-radius: 10px; cursor: pointer; }
  .portal-mobile-menu nav { position: absolute; right: 12px; top: calc(100% + 4px); width: min(280px, calc(100vw - 32px)); max-height: calc(100dvh - 100px); overflow-y: auto; display: grid; padding: 12px; border: 1px solid #53616e; border-radius: 14px; background: #101d22; box-shadow: 0 20px 40px #0008; }
  .portal-mobile-menu a, .portal-mobile-menu button { min-height: 44px; width: 100%; padding: 12px; text-align: left; font: inherit; color: #edf7f8; background: none; border: 0; cursor: pointer; }
  .portal-mobile-menu form { margin: 8px 0 0; border-top: 1px solid #30444c; }
  .portal-mobile-menu button:disabled { opacity: .5; cursor: default; }
  .portal-v07 .portal-content { padding-bottom: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
