:root {
  color-scheme: light;
  --navy: #071b64;
  --blue: #1169ef;
  --green: #08a75a;
  --orange: #f5660a;
  --muted: #3f5d9b;
  --line: rgba(17, 78, 161, 0.14);
  --page: #f4f9ff;
  --sidebar: 250px;
  --sans: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; min-width: 320px; min-height: 100svh; overflow-x: hidden; color: var(--navy); background: #f5faff; font-family: var(--sans); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
a { color: inherit; }
button:disabled { cursor: not-allowed; }

.skip-link { position: fixed; z-index: 200; top: .7rem; left: .7rem; padding: .7rem 1rem; border-radius: .7rem; color: #fff; background: var(--navy); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.layer3-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; z-index: 20; height: 100svh; overflow-y: auto; border-right: 1px solid var(--line); background: rgba(255,255,255,.95); box-shadow: .8rem 0 2.5rem rgba(30,90,155,.04); }
.sidebar-brand { display: grid; height: 105px; place-items: center; border-bottom: 1px solid var(--line); }
.sidebar-brand img { display: block; width: 88px; height: auto; }
.sidebar-nav { display: grid; gap: .22rem; padding: .7rem .45rem; }
.nav-item { display: flex; min-height: 52px; align-items: center; gap: .85rem; padding: .65rem 1rem; border: 0; border-radius: 13px; color: var(--navy); background: transparent; text-align: left; text-decoration: none; font-size: .95rem; font-weight: 650; }
.nav-item:disabled { opacity: 1; }
.nav-item.is-active { color: #067340; background: linear-gradient(90deg, #dff8ed, #e9fbf4); }
.nav-item[href]:hover { background: #edf5ff; }
.nav-item:focus-visible, .premium-route-control:focus-visible, .language-control button:focus-visible, .menu-button:focus-visible, .program-action:focus-visible, .support-panel button:focus-visible { outline: 3px solid #f7ae18; outline-offset: 2px; }
.nav-icon { display: inline-grid; width: 30px; flex: 0 0 30px; place-items: center; color: currentColor; font-size: 1.25rem; font-weight: 900; }
.premium-route-controls, .mobile-route-controls { display: flex; align-items: center; gap: .6rem; }
.premium-route-controls { justify-content: center; padding: .25rem .55rem .65rem; }
.premium-route-control { display: inline-grid; width: 50px; height: 50px; flex: 0 0 50px; place-items: center; border: 1px solid #c9b6f2; border-radius: 50%; color: #5b2ecb; background: rgba(255,255,255,.95); box-shadow: 0 .55rem 1.4rem rgba(72,45,150,.12); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.premium-route-control svg { width: 23px; height: 23px; }
.premium-route-control:hover { background: #faf8ff; box-shadow: 0 .7rem 1.7rem rgba(72,45,150,.16); transform: translateY(-1px); }
.premium-route-control:active { transform: translateY(0) scale(.97); }
.mobile-route-controls { display: none; }

.workspace { min-width: 0; min-height: 100svh; background: radial-gradient(circle at 63% -30%, rgba(101,164,255,.35), transparent 42%), linear-gradient(145deg, #fff 0%, #f4f9ff 48%, #dff1ff 100%); }
.workspace::before, .workspace::after { position: fixed; z-index: 0; right: -10%; width: 68%; height: 26%; border-radius: 50%; background: rgba(72,158,243,.12); content: ""; pointer-events: none; transform: rotate(-13deg); }
.workspace::before { top: 8%; }
.workspace::after { top: 20%; right: -22%; background: rgba(44,139,237,.11); }
.workspace-header { position: relative; z-index: 2; display: flex; min-height: 82px; align-items: center; justify-content: flex-end; padding: .75rem clamp(1.1rem, 2vw, 2.2rem); border-bottom: 1px solid rgba(17,78,161,.06); }
.mobile-brand, .menu-button { display: none; }
.header-tools, .language-wrap, .clock-pill, .language-control { display: flex; align-items: center; }
.header-tools { gap: .8rem; }
.clock-pill { min-width: 155px; min-height: 45px; justify-content: center; gap: .55rem; padding: .55rem .9rem; border: 1px solid rgba(18,100,220,.08); border-radius: 999px; background: rgba(255,255,255,.86); box-shadow: 0 .6rem 1.8rem rgba(30,82,145,.07); }
.clock-pill svg, .globe { width: 20px; height: 20px; fill: none; stroke: var(--navy); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.live-clock { font-size: .82rem; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.language-wrap { gap: .55rem; }
.language-control { padding: .18rem; border-radius: 999px; background: #e3ecfb; }
.language-control button { min-width: 42px; min-height: 34px; border: 0; border-radius: 999px; color: #536788; background: transparent; cursor: pointer; font-size: .77rem; font-weight: 800; }
.language-control button[aria-pressed="true"] { color: #fff; background: var(--green); box-shadow: 0 .4rem 1rem rgba(0,171,92,.17); }

.workspace-main { position: relative; z-index: 1; width: min(100%, 1480px); padding: clamp(1rem, 2vh, 1.5rem) clamp(1rem, 2vw, 2rem) clamp(1rem, 2vh, 1.4rem); margin: 0 auto; }
.program-intro { margin-bottom: clamp(.8rem, 1.5vh, 1.2rem); }
.eyebrow { display: flex; align-items: center; gap: .7rem; margin: 0 0 .5rem; color: #154eb5; font-size: .78rem; font-weight: 850; letter-spacing: .08em; }
.eyebrow::after { width: 125px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #1681ff, transparent); content: ""; }
.program-intro h1 { margin: 0; color: var(--navy); font-size: clamp(2rem, 3vw, 3rem); font-weight: 840; letter-spacing: -.045em; line-height: 1.04; }
.program-intro h1 span:last-child { color: var(--orange); }
.program-intro > p:last-child { max-width: 900px; margin: .55rem 0 0; color: #173d8d; font-size: clamp(.88rem, 1.12vw, 1.08rem); font-weight: 620; line-height: 1.35; }

.program-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.45rem, .75vw, .8rem); }
.program-card { --accent: #079b49; --soft: #daf9e7; display: flex; min-width: 0; min-height: 410px; overflow: hidden; flex-direction: column; border: 1px solid rgba(25,94,180,.12); border-radius: 19px; background: rgba(255,255,255,.9); box-shadow: 0 .75rem 2rem rgba(39,96,160,.09); }
.program-card > img { display: block; width: calc(100% - 16px); height: clamp(132px, 18vh, 170px); margin: 8px 8px 0; border-radius: 13px; object-fit: cover; object-position: center; }
.card-talker > img { object-position: 42% 38%; }
.card-builder { --accent: #f36b00; --soft: #fff0d7; }
.card-builder > img { object-position: 50% 43%; }
.card-explorer { --accent: #f51670; --soft: #ffe0ec; }
.card-explorer > img { object-position: 66% 35%; }
.card-achiever { --accent: #5a1ce8; --soft: #e9dcff; }
.card-achiever > img { object-position: 34% 40%; }
.card-professional { --accent: #096de5; --soft: #d8edff; }
.card-professional > img { object-position: 50% 35%; }
.program-body { display: flex; min-height: 0; flex: 1; flex-direction: column; align-items: flex-start; padding: .5rem .75rem .65rem; }
.program-body h2 { margin: 0 0 .25rem; color: var(--accent); font-size: clamp(1.02rem, 1.3vw, 1.35rem); font-weight: 900; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.level { display: inline-flex; min-width: 82px; min-height: 28px; align-items: center; justify-content: center; padding: .25rem .75rem; border-radius: 999px; color: var(--accent); background: var(--soft); font-size: .82rem; font-weight: 850; }
.audience { margin: .45rem 0 .25rem; color: #12398a; font-size: clamp(.77rem, .9vw, .9rem); font-weight: 700; line-height: 1.18; }
.description { margin: 0 0 .45rem; color: #204aa0; font-size: clamp(.75rem, .82vw, .84rem); line-height: 1.3; }
.program-action, .support-panel .text-action { display: flex; width: 100%; min-height: 38px; align-items: center; justify-content: center; gap: .75rem; padding: .4rem .45rem .4rem .8rem; margin-top: auto; border: 1px solid color-mix(in srgb, var(--accent), transparent 50%); border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--soft), #fff 35%); font-size: .78rem; font-weight: 850; }
.program-action b, .support-panel .text-action b { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-size: 1rem; }
/* View Program is a real link to the program's LEVELS page; programs.js forwards clicks/taps anywhere on the card to it.
   No positioning or overlay, so the approved card rendering stays pixel-identical. */
a.program-action { text-decoration: none; }
.program-card:has(a.program-action) { cursor: pointer; }

.support-grid { display: grid; grid-template-columns: 1.15fr .95fr .85fr; gap: .65rem; margin-top: .7rem; }
.support-panel { display: grid; min-height: 112px; align-items: center; gap: .7rem; padding: .8rem 1rem; border: 1px solid rgba(25,94,180,.1); border-radius: 17px; background: rgba(255,255,255,.88); box-shadow: 0 .55rem 1.6rem rgba(39,96,160,.06); }
.placement-panel { grid-template-columns: 48px minmax(0,1fr) minmax(150px, .7fr); }
.try-panel { grid-template-columns: 52px minmax(0,1fr); }
.help-panel { grid-template-columns: 48px minmax(0,1fr); background: linear-gradient(115deg, rgba(231,255,245,.95), rgba(250,255,253,.95)); }
.support-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; color: #0c73e8; background: #dceeff; font-size: 1.4rem; font-weight: 900; }
.support-panel h2 { margin: 0 0 .2rem; color: var(--navy); font-size: .9rem; font-weight: 850; }
.support-panel p { margin: 0; color: #2b55a1; font-size: .75rem; line-height: 1.3; }
.support-panel .text-action { --accent: #0871ef; --soft: #ddecff; max-width: 210px; min-height: 36px; }
.premium-play-control { display: grid; width: 50px; height: 50px; min-width: 50px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: 0 .5rem 1.1rem rgba(15,84,190,.13); overflow: hidden; }
.premium-play-control img { display: block; width: 100%; height: 100%; object-fit: cover; }
.premium-play-control:disabled { opacity: .7; }
.help-panel { --accent: #079f58; }
.help-panel .support-icon { color: #079f58; background: #dff9eb; }
.help-panel .text-action { --accent: #079f58; --soft: #def8ea; grid-column: 2; }

@media (max-width: 1280px) {
  :root { --sidebar: 208px; }
  .sidebar-brand { height: 88px; }
  .sidebar-brand img { width: 70px; }
  .nav-item { min-height: 44px; gap: .5rem; padding: .45rem .65rem; font-size: .81rem; }
  .nav-icon { width: 24px; flex-basis: 24px; font-size: 1rem; }
  .workspace-header { min-height: 70px; }
  .workspace-main { padding-top: .75rem; }
  .program-intro h1 { font-size: clamp(1.85rem, 2.8vw, 2.45rem); }
  .program-card { min-height: 358px; }
  .program-card > img { height: clamp(112px, 17vh, 145px); }
  .program-body { padding: .45rem .58rem .55rem; }
  .program-body h2 { font-size: clamp(.87rem, 1.17vw, 1.08rem); }
  .audience, .description { font-size: .72rem; }
  .support-panel { min-height: 96px; padding: .65rem .75rem; }
}

@media (max-width: 980px) {
  .layer3-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; width: min(82vw, 290px); transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 15; inset: 0; display: block; border: 0; background: rgba(4,24,74,.3); }
  .sidebar-scrim[hidden] { display: none; }
  .workspace-header { position: sticky; top: 0; z-index: 10; min-height: 76px; justify-content: space-between; background: rgba(248,252,255,.9); backdrop-filter: blur(14px); }
  .menu-button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); background: #fff; }
  .mobile-brand { display: inline-flex; margin-right: auto; margin-left: .6rem; }
  .mobile-brand img { width: 52px; height: auto; }
  .premium-route-controls { display: none; }
  .mobile-route-controls { display: flex; gap: .35rem; margin-right: .45rem; }
  .mobile-route-controls .premium-route-control { width: 40px; height: 40px; flex-basis: 40px; }
  .mobile-route-controls .premium-route-control svg { width: 19px; height: 19px; }
  .program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-card { min-height: 430px; }
  .program-card > img { height: 210px; }
  .program-body h2 { font-size: 1.2rem; }
  .audience, .description { font-size: .87rem; }
  .support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .workspace-header { min-height: 70px; padding-inline: .75rem; }
  .mobile-brand img { width: 44px; }
  .header-tools { gap: .35rem; }
  .clock-pill { min-width: 0; min-height: 38px; padding-inline: .7rem; }
  .clock-pill svg, .globe { display: none; }
  .live-clock { font-size: .68rem; }
  .language-control button { min-width: 36px; min-height: 32px; font-size: .7rem; }
  .workspace-main { padding: 1.1rem .85rem 1.5rem; }
  .eyebrow { font-size: .69rem; }
  .program-intro h1 { font-size: clamp(2rem, 10.5vw, 2.7rem); }
  .program-intro > p:last-child { font-size: .92rem; }
  .program-grid { grid-template-columns: 1fr; }
  .program-card { min-height: 445px; }
  .program-card > img { height: 230px; }
  .program-body { padding: .75rem .85rem .8rem; }
  .program-body h2 { font-size: 1.25rem; }
  .audience, .description { font-size: .9rem; }
  .placement-panel, .try-panel, .help-panel { grid-template-columns: 44px minmax(0,1fr); }
  /* Every Placement child is placed explicitly: auto-placement used to push the text into the 44px icon track. */
  .placement-panel .support-icon { grid-column: 1; grid-row: 1; align-self: start; }
  .placement-panel > div { grid-column: 2; grid-row: 1; min-width: 0; }
  .placement-panel .premium-play-control { grid-column: 2; grid-row: 2; justify-self: start; }
  /* Header: controls keep their size instead of being squeezed; slightly tighter fit for phones. */
  .menu-button, .mobile-brand, .mobile-route-controls, .header-tools { flex-shrink: 0; }
  .mobile-brand { margin-left: .45rem; }
  .mobile-route-controls { gap: .3rem; margin-right: .35rem; }
  .mobile-route-controls .premium-route-control { width: 36px; height: 36px; flex-basis: 36px; }
  .clock-pill { padding-inline: .55rem; }
  .live-clock { font-size: .64rem; }
  .language-control button { min-width: 32px; min-height: 30px; }
}

@media (max-width: 374px) {
  .workspace-header { padding-inline: .55rem; }
  .menu-button { width: 38px; height: 38px; }
  .mobile-brand { margin-left: .3rem; }
  .mobile-brand img { width: 34px; }
  .mobile-route-controls .premium-route-control { width: 34px; height: 34px; flex-basis: 34px; }
  .header-tools { gap: .25rem; }
  .clock-pill { padding-inline: .45rem; }
  .live-clock { font-size: .6rem; }
  .language-control button { min-width: 30px; }
}

@media (max-height: 820px) and (min-width: 981px) {
  .workspace-header { min-height: 64px; padding-block: .45rem; }
  .clock-pill { min-height: 40px; }
  .workspace-main { padding-top: .55rem; padding-bottom: .6rem; }
  .program-intro { margin-bottom: .55rem; }
  .eyebrow { margin-bottom: .25rem; }
  .program-intro h1 { font-size: clamp(1.7rem, 2.55vw, 2.25rem); }
  .program-intro > p:last-child { margin-top: .3rem; font-size: .84rem; }
  .program-card { min-height: 337px; }
  .program-card > img { height: 110px; }
  .program-body h2 { font-size: clamp(.83rem, 1.08vw, 1rem); }
  .level { min-height: 24px; padding-block: .15rem; font-size: .74rem; }
  .audience { margin-top: .28rem; }
  .description { line-height: 1.22; }
  .program-action { min-height: 34px; }
  .support-grid { margin-top: .5rem; }
  .support-panel { min-height: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
