:root {
  --plum:#481741; --anchor:#36132f; --ink:#30232a; --paper:#fffdf7;
  --surface:#faf5ea; --copper:#955331; --line:#e6d8c9; --border:#d8c4ac;
  --quiet:#66564f; --portal-purple:var(--plum); --portal-accent:#78405e;
}
body { background:var(--paper); color:var(--ink) }
#header::before,#header.compact::before,.p-header { background:#fffaf1fa; border-color:var(--border) }
#header .navigation { width:min(1480px,calc(100% - 64px)); min-height:76px; gap:1rem }
#header .navlinks { display:none }
#header .navigation .menu-toggle { display:inline-flex!important; width:44px; min-height:44px; border:1px solid var(--border) }
html { scroll-padding-top:var(--header-clearance,88px) }
#header.in-flow { position:relative }
.nav-account-actions { display:flex; align-items:center; gap:.55rem }
#header .navigation-actions { gap:.55rem; flex-wrap:nowrap }
#header .language-switch { background:transparent; color:var(--plum); border:1px solid var(--border); min-height:44px; padding-inline:.8rem }
#header .account-link,#header .desk-portal { min-height:44px }
#header .account-link { background:var(--plum) }
.btn-primary,.tab[aria-pressed="true"] { accent-color:var(--plum) }
#header .brand strong,.p-navigation .brand strong { color:var(--plum) }

.teaching-home { background:#f4e3c9 }
.table-stage { position:relative; overflow:hidden; perspective:1100px; background:#ac8055 }
.table-world { --tilt-x:0deg; --tilt-y:0deg; position:relative; width:100%; height:clamp(360px,45vw,740px);
  transform:scale(1.026) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transform-style:preserve-3d; transition:transform .35s ease-out }
.table-picture,.table-picture img { display:block; width:100%; height:100% }
.table-picture img { object-fit:cover; object-position:center 51% }
.table-choice { position:absolute; top:61%; min-height:54px; max-width:28%; padding:10px clamp(12px,1.8vw,28px);
  display:inline-flex; align-items:center; justify-content:center; gap:.45rem; font-weight:700; font-family:var(--display); line-height:1.45;
  text-align:center; color:#461839; border-radius:2rem; border:1px solid #91542e; background:linear-gradient(160deg,#fffaf0,#f0d3ad);
  box-shadow:inset 0 0 0 3px #fff2d9,0 3px 0 #955331,0 6px 16px #42241e46;
  transform:translateX(-50%) translateZ(9px); transition:transform .22s,box-shadow .22s }
.choice-folder { left:16% }
.choice-tablet { left:84% }
.table-choice:hover,.table-choice:focus-visible { transform:translateX(-50%) translateZ(20px) translateY(-3px); color:#39142d; box-shadow:inset 0 0 0 3px #fff4df,0 3px 0 #955331,0 9px 23px #42241e55 }
.table-choice:focus-visible,.desk-back:focus-visible { outline:3px solid white; outline-offset:3px; box-shadow:0 0 0 7px var(--plum) }
.table-caption { background:#fbf0dd; border-block:1px solid #cba783 }
.table-caption .wrap { display:flex; align-items:center; justify-content:space-between; gap:1.5rem; padding-block:clamp(18px,2vw,35px) }
.table-caption p { color:#784329; font-size:1rem; font-weight:600 }
.table-caption h1 { color:var(--plum); font-size:clamp(1.55rem,2.6vw,2.65rem); letter-spacing:normal; margin:.15rem 0 0 }
.table-caption .actions { flex-shrink:0 }
.table-caption .btn-outline { background:#fffbf3 }
#programs,#about { scroll-margin-top:2rem }
.service-nav { background:#fffaf1; border-color:var(--border) }
.service .tile-icon,.tile-icon { background:#f0e5d9; color:var(--plum) }
.program,.panel,.p-card { border-color:var(--line) }
#schedule,.workspace { background:#f9f4ed }
#online-training { background:#f6efe4; color:var(--ink) }
#online-training .online-intro { color:var(--ink) }
#online-training .online-intro h2,#online-training .online-intro p { color:var(--plum) }

.desk-open,.lesson-desk { position:relative; isolation:isolate; padding:clamp(18px,3vw,46px) 0 clamp(32px,6vw,76px); background:#ba8a58 }
.desk-open::before,.lesson-desk::before { content:''; position:absolute; inset:0; z-index:-1;
  background:linear-gradient(#54372854,#4e302455),url('/assets/teaching-table.webp') center 48%/cover }
.desk-open > .wrap { max-width:1110px }
.desk-back { display:inline-flex; min-height:44px; align-items:center; gap:.5rem; padding:6px 15px; margin-block-end:14px;
  color:var(--plum); background:#fff9eb; border:1px solid #b98c63; border-radius:20px; font-weight:700 }
.folio-spread { position:relative; display:grid; grid-template-columns:1.18fr 1fr; border:clamp(8px,1.2vw,18px) solid #5c2843;
  border-radius:10px 18px 18px 10px; background:#f7e6c8; box-shadow:0 4px 0 #341a28,0 22px 45px #321c2859; transform-origin:center 75% }
.folio-sheet { position:relative; align-self:stretch; padding:clamp(24px,4vw,60px); background:linear-gradient(90deg,#d7bb96,#fff4dc 5%,#ffefd4); color:var(--ink) }
html[dir=ltr] .folio-sheet { background:linear-gradient(270deg,#d7bb96,#fff4dc 5%,#ffefd4) }
.folio-sheet::before { content:''; position:absolute; top:-7px; inset-inline-start:12%; width:40px; height:14px; border-radius:3px; background:linear-gradient(#854520,#dda97b 46%,#a76039); box-shadow:0 2px 3px #734c4455 }
.folio-sheet h1,.tablet-glass h1,.lesson-device .learn-hero h1 { font-size:clamp(1.85rem,4vw,3.65rem); line-height:1.38; letter-spacing:normal; color:var(--plum); margin-block:0 .45rem }
.folio-sheet p,.tablet-glass p { color:#57433f }
.folio-plans { margin:1.1rem 0; border-block:1px solid #ba9972 }
.folio-plans div { display:flex; justify-content:space-between; align-items:center; gap:.8rem; padding-block:12px }
.folio-plans div+div { border-block-start:1px solid #d5b993 }
.folio-plans dd { margin:0; font-weight:700; color:var(--plum); white-space:nowrap }
.folio-sheet .actions { margin-block-start:1.2rem }
.desk-link { display:inline-flex; align-items:center; min-height:44px; color:var(--plum); font-weight:700; text-decoration:underline; text-underline-offset:4px }
.folio-illustration { display:grid; place-items:center; margin:0; padding:clamp(12px,3vw,42px); background:radial-gradient(ellipse,#fff3db,#f6e2be) }
.folio-illustration img { width:min(100%,400px); height:auto; mix-blend-mode:multiply; mask-image:radial-gradient(ellipse closest-side,#000 87%,transparent) }
.tablet-shell,.lesson-device { margin-inline:auto; border:clamp(7px,1.2vw,16px) solid #352d2d; border-radius:clamp(18px,3vw,38px); box-shadow:0 0 0 2px #c89465,0 5px 0 #603c2d,0 22px 52px #2c1e2b55; background:#fffbf3; overflow:hidden }
.tablet-glass { padding:clamp(20px,4vw,54px); background:linear-gradient(130deg,#fffaf1,#f6e9d8) }
.tablet-course { display:flex; align-items:center; justify-content:space-between; gap:1rem; border-block-start:1px solid #d5c0aa; padding-block:18px }
.tablet-glass > p { margin-block-end:1rem }
.tablet-course h2 { font-size:clamp(1.08rem,2.25vw,1.55rem); margin-block-end:.3rem }
.tablet-course .btn { flex-shrink:0 }
.lesson-device { width:min(1280px,calc(100% - 64px)) }
.lesson-device .learn-hero { padding:clamp(18px,3vw,40px) 0 18px; background:#faf1e1; color:var(--ink); border-block-end:1px solid var(--border) }
.lesson-device .learn-hero :is(.breadcrumb,p,.breadcrumb a) { color:#614440 }
.lesson-device .learn-layout { padding-block:24px 36px }
.lesson-device .learn-lesson,.lesson-device .learn-progress,.lesson-device .lesson-list,.lesson-device .learn-certificate { border-color:var(--border); background:#fffdf8 }
.lesson-device .lesson-list a[aria-current] { background:var(--plum); color:white }
.lesson-device .lesson-list a[aria-current] .icon { color:inherit }
.p-intro { background:var(--plum); border-block-end:3px solid #a76f48 }
@media (prefers-reduced-motion:no-preference) {
  .folio-spread { animation:folio-open .5s cubic-bezier(.22,.61,.36,1) both }
  .tablet-shell,.lesson-device { animation:tablet-open .46s cubic-bezier(.22,.61,.36,1) both }
  @keyframes folio-open { from { opacity:.55; transform:perspective(1200px) rotateY(-11deg) rotateX(5deg) scale(.91) } to { opacity:1;transform:none } }
  @keyframes tablet-open { from { opacity:.55; transform:perspective(1400px) rotateX(8deg) translateY(16px) scale(.94) } to { opacity:1;transform:none } }
}
@media(max-width:768px) {
  #header .navigation { width:calc(100% - 28px); min-height:64px }
  .table-world { height:auto; aspect-ratio:1.72 }
  .table-choice { min-height:44px; font-size:1rem; padding:7px 10px }
  .table-choice .icon { display:none }
  .table-caption .wrap { flex-wrap:wrap; gap:12px }
  .folio-spread { grid-template-columns:1.45fr .8fr }
  .folio-sheet { padding:22px 18px }
  .lesson-device { width:calc(100% - 28px) }
  .lesson-device .learn-layout,.lesson-device .learn-hero .wrap { width:calc(100% - 26px) }
  .tablet-course { flex-wrap:wrap }
}
@media(max-width:980px) {
  #header { container:site-nav / inline-size }
  #header .navigation {
    width:calc(100% - 28px); display:grid; align-items:center; justify-content:stretch;
    grid-template-columns:minmax(0,1fr) auto auto;
    grid-template-areas:"brand language menu" "account account account";
    gap:6px 8px; padding-block:7px;
  }
  #header .navigation-actions { display:contents }
  #header .navigation .brand { grid-area:brand; white-space:normal; min-width:0; gap:7px; justify-self:start }
  #header .navigation .brand img { width:40px; height:44px; flex:none }
  #header .navigation .brand span { min-width:0; overflow-wrap:anywhere }
  #header .navigation .brand strong { font-size:.95rem; line-height:1.35 }
  #header .navigation .brand small { font-size:.85rem; line-height:1.4; color:#704026 }
  #header .navigation .language-switch { grid-area:language; font-size:1rem; padding-inline:.65em; margin:0 }
  #header .navigation .menu-toggle { grid-area:menu }
  #header .nav-account-actions { grid-area:account; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px }
  #header .navigation .nav-account-actions :is(.desk-portal,.account-link) {
    width:100%; min-width:0; max-width:none; height:100%; min-height:44px;
    margin:0; padding:6px 8px; gap:6px; font-size:1rem; line-height:1.35; overflow-wrap:anywhere;
  }
  #header .navigation .account-link .icon { display:inline-block; font-size:1.05rem }
  #header.compact .navigation,#header.compact::before { transform:none }
  #header.compact::before { background:#fffaf1 }
}
@media(min-width:601px) and (max-width:980px) {
  #header .navigation { grid-template-columns:minmax(0,1fr) auto auto auto; grid-template-areas:"brand language menu account" }
  #header .nav-account-actions { display:flex; max-width:38vw }
  #header .navigation .nav-account-actions :is(.desk-portal,.account-link) { flex:1 }
}
@media(max-width:600px) {
  .table-world { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; direction:ltr; height:auto; aspect-ratio:auto; padding:0 13px 15px; transform:none; background:#efd7b6 }
  .table-picture { grid-column:1/-1; width:calc(100% + 26px); height:auto; margin-inline:-13px }
  .table-picture img { width:100%; height:auto; aspect-ratio:1.65; object-fit:cover }
  .table-choice,.table-choice:hover,.table-choice:focus-visible { position:relative; top:auto; left:auto; transform:none; max-width:100%; min-height:46px; font-size:.94rem; padding-inline:5px; border-radius:10px }
  .table-caption .wrap { width:calc(100% - 32px); padding-block:15px }
  .table-caption h1 { font-size:1.45rem }
  .table-caption p { font-size:1rem }
  .table-caption h1 { line-height:1.42; text-wrap:balance }
  .table-caption .btn,.table-choice { font-size:1rem }
  .lesson-device .lesson-list { display:flex; flex-wrap:wrap; gap:4px }
  .lesson-device .lesson-list a { flex:1 1 auto; justify-content:center; gap:5px; padding:7px 9px; min-height:44px; font-size:1rem; line-height:1.45 }
  .lesson-device .lesson-list a .lesson-done { margin:0; color:inherit }
  .service strong { font-size:1rem }
  .service small,.program .card-body p { font-size:.95rem }
  .filters,.demo-calendar-filters { grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr)) }
  .catalog-filters .field { flex-basis:13rem }
  :is(.field,.filters,.p-form,.search,.ops-form) :is(input,select,textarea) { font-size:max(16px,1rem) }
  .p-navigation .brand { max-width:100%; white-space:normal; overflow-wrap:anywhere }
  .p-navigation .brand span,.p-intro > div { min-width:0; max-width:100% }
  .p-intro h1,.p-tabs .btn { overflow-wrap:anywhere }
  .p-intro { flex-wrap:wrap }
  .p-intro h1 { line-height:1.35 }
  .table-caption .actions { flex-shrink:1; gap:7px }
  .table-caption .btn { min-height:44px }
  .desk-open > .wrap { width:calc(100% - 24px) }
  .folio-spread { display:flex; flex-direction:column }
  .folio-illustration { order:-1; height:94px; padding:5px; border-block-end:1px solid #dbc299 }
  .folio-illustration img { height:100%; width:auto }
  .folio-plans div { padding-block:8px }
}
@container site-nav (max-width:17em) {
  #header .navigation { grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"brand brand" "language menu" "account account" }
  #header .navigation .language-switch { justify-self:start }
}
@media(max-width:720px) {
  .service-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,9.5rem),1fr)) }
  .split { grid-template-columns:minmax(0,1fr) }
  .split > *,.schedule-list,.footer .brand span { min-width:0 }
  .split,.footer .brand,.app-banner h2,.page-title h1 { overflow-wrap:anywhere }
  .footer .brand { max-width:100%; white-space:normal }
  .footer .brand img { flex:none }
  .demo-calendar { container:calendar / inline-size }
  .app-downloads { container:download / inline-size }
  .page-title { container:page-title / inline-size }
  .schedule-list { container:schedule / inline-size }
}
.demo-cal-narrow { display:none }
@container calendar (max-width:19em) {
  .demo-cal-short { display:none }
  .demo-cal-narrow { display:inline }
}
@container schedule (max-width:19em) {
  .schedule-row { grid-template-columns:auto minmax(0,1fr) }
  .schedule-row .btn { grid-column:2; justify-self:start }
}
@container download (max-width:16em) {
  .app-banner { display:flex; flex-direction:column; align-items:stretch }
  .app-emblem { order:-1 }
}
@container page-title (max-width:16em) {
  .page-title .section-head:has(.section-thumbnail) { display:flex; flex-direction:column; align-items:start }
}
@media(prefers-reduced-motion:reduce) {
  .table-world,.table-choice,.table-choice:hover,.table-choice:focus-visible { transition:none }
  .table-world { transform:none }
}
@media(prefers-reduced-motion:no-preference) {
  html[data-table-journey]::view-transition-group(training-scene) { animation-duration:.52s; animation-timing-function:cubic-bezier(.22,.61,.36,1) }
  html[data-table-journey]::view-transition-old(training-scene) { animation:desk-approach .4s ease-out both }
  html[data-table-journey="folder"]::view-transition-old(training-scene) { transform-origin:16% 58% }
  html[data-table-journey="tablet"]::view-transition-old(training-scene) { transform-origin:84% 52% }
  html[data-table-journey]::view-transition-new(training-scene) { animation:desk-arrive .4s .09s ease-out both }
  @keyframes desk-approach { to { transform:scale(1.35); opacity:0 } }
  @keyframes desk-arrive { from { transform:perspective(1050px) rotateX(7deg) scale(.96); opacity:0 } to { transform:none; opacity:1 } }
}
