/* Shared typography and header for the learning studios and public pages. */
@font-face {
  font-family: "VMS Rounded";
  src: url("/puzzle-studio/fonts/nunito.ttf?v=common-round-1") format("truetype");
  font-weight: 900;
  font-display: swap;
}
:root {
  --vms-font: "Avenir Next", Avenir, "Nunito Sans", Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --vms-text-compact: 1rem;
  --vms-text-body: 1.125rem;
  --vms-text-nav: 1.1875rem;
  --vms-text-muted: #425e78;
}
:where(small) { font-size: var(--vms-text-compact); }
.vms-site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-areas: "brand navigation" "brand actions";
  align-items: center;
  gap: 8px 20px;
  padding: clamp(12px, 1.5vw, 22px) max(16px, calc((100% - 1530px) / 2));
  border-bottom: 1px solid #dce8f4;
  color: #193a5c;
  background: #fff;
  font-family: var(--vms-font);
}
.vms-brand {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 16px);
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  color: #0859bf;
  background: transparent;
  font-family: var(--vms-font);
  text-align: start;
  text-decoration: none;
}
.vms-site-header > .vms-brand { grid-area: brand; justify-self: start; }
.vms-brand-mark {
  display: block;
  width: clamp(76px, 8.25vw, 112px);
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}
.vms-brand-copy { display: grid; min-width: 0; gap: 4px; }
.vms-brand-name {
  display: flex;
  flex-wrap: wrap;
  gap: 0 .19em;
  color: #0859bf;
  font: 900 clamp(1.75rem, 3.4vw, 3rem)/1.06 "VMS Rounded", "Arial Rounded MT Bold", var(--vms-font);
  letter-spacing: -.035em;
}
.vms-brand-name span { white-space: nowrap; }
.vms-brand-name span:nth-child(2) {
  color: #ad365e;
  background: linear-gradient(90deg, #cf245c, #a75105 29%, #1475a6 57%, #07785f 78%, #6947b9);
  background-clip: text;
  color: transparent;
}
.vms-brand-motto, .vms-brand-description {
  display: block;
  color: var(--vms-text-muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.vms-brand-motto { font-size: clamp(1rem, 1.4vw, 1.25rem); font-weight: 800; }
.vms-brand-motto i { color: #d33768; font-style: normal; }
.vms-brand-description { font-size: clamp(1.125rem, 1.5vw, 1.3125rem); }
.vms-site-nav, .vms-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.vms-site-nav { grid-area: navigation; align-self: end; }
.vms-header-actions { grid-area: actions; align-self: start; }
.vms-site-nav > a, .vms-site-nav > button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 6px 10px;
  border: 0;
  border-radius: 10px;
  color: #234565;
  background: transparent;
  font: 800 var(--vms-text-nav)/1.35 var(--vms-font);
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
}
.vms-site-nav > :is(a, button):hover, .vms-site-nav > [aria-current="page"] {
  color: #0758bb;
  background: #edf5ff;
}
.vms-header-button, .vms-site-header select.site-language-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbdded;
  border-radius: 12px;
  color: #193d65;
  background: #fff;
  font: 800 var(--vms-text-body)/1.3 var(--vms-font);
  text-align: center;
  text-decoration: none;
}
.vms-site-header .vms-header-actions select { width: min(100%, 12rem); text-align: start; }
.vms-header-button svg { width: 18px; height: 18px; flex: 0 0 auto; }
.vms-header-button:hover { border-color: #91b7e4; background: #f4f9ff; }
.vms-header-credit { color: #256549; border-color: #cce5d8; background: #eaf7f0; white-space: nowrap; }
.vms-header-button[hidden] { display: none; }
.vms-brand:focus-visible, .vms-site-nav > :focus-visible, .vms-header-actions > :focus-visible {
  outline: 3px solid #4388ed;
  outline-offset: 3px;
}
@media (max-width: 900px) {
  .vms-site-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "navigation" "actions";
    gap: 10px;
  }
  .vms-site-header > .vms-brand { justify-self: center; }
  .vms-site-nav, .vms-header-actions { justify-content: center; }
}
@media print {
  .vms-site-header { display: none; }
}
