/* WerkPlaner: an explorable office constellation, sized to the viewport. */
.landing[data-chapter='werkplaner'] { min-height: 0; }
#werkplaner-chapter-title:focus { outline: none; }
.werkplaner-chapter { position: absolute; inset: calc(var(--public-nav-height) + 3.2rem) 0 0; z-index: 5; display: flex; flex-direction: column; overflow: hidden; color: #eeeafa; background: radial-gradient(ellipse at 50% 42%, #153c682e, transparent 49%), radial-gradient(ellipse at 88% 63%, #54227b22, transparent 40%), #03040c; }
.werkplaner-chapter::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, #abb7e6 0 .8px, transparent 1.3px), radial-gradient(circle, #689ce1 0 .6px, transparent 1px); background-size: 173px 131px, 251px 193px; background-position: 21px 17px, 72px 91px; opacity: .45; }
.wp-intro { position: relative; flex: none; padding: clamp(.4rem, 2vh, 1.4rem) 1rem 0; text-align: center; }
.wp-intro h2 { margin: 0 0 .55rem; font-size: clamp(1.7rem, 3vw, 2.8rem); font-weight: 550; line-height: 1.12; letter-spacing: -.025em; }
.wp-intro p { max-width: 780px; margin: 0 auto; color: #aca8be; font-size: .9rem; line-height: 1.5; }
.wp-universe { position: relative; flex: 1 1 0; min-height: 0; width: min(1500px, 100%); margin: 0 auto; container-type: size; }
.wp-routes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wp-route { fill: none; stroke: #79acf2; stroke-width: 1; opacity: .21; transition: opacity .5s; }
.wp-packet { fill: none; stroke: #77a7ff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 3 100; stroke-dashoffset: 3; filter: drop-shadow(0 0 5px #3b82f6); animation: wp-travel 1.6s ease-in-out forwards; }
.wp-route--team { stroke: #cd8758; }
.wp-packet--team { stroke: #eea16e; filter: drop-shadow(0 0 5px #d47b47); }
.wp-region { margin: 0 0 1.3rem; text-align: center; font: .58rem/1.5 'Ubuntu Mono', monospace; letter-spacing: .13em; color: #9391ac; }
.wp-problems { position: absolute; top: 7%; bottom: 5%; left: 4%; width: 24%; display: flex; flex-direction: column; }
.wp-problem-list { display: flex; flex-direction: column; justify-content: space-around; flex: 1; gap: .6rem; }
.wp-problem { position: relative; width: fit-content; max-width: 100%; display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; color: #b5b6c9; background: #0c0c18d9; border: 1px solid #8c91af32; border-radius: 7px; font: .74rem/1.5 'Ubuntu Mono', monospace; text-align: left; cursor: pointer; transition: border-color .4s, color .4s, transform .4s; }
.wp-problem::before { content: ''; width: 4px; height: 4px; flex: none; background: #abaebe; border-radius: 50%; }
.wp-problem:nth-child(even) { align-self: flex-end; }
.wp-problem:hover, .wp-problem[aria-pressed='true'] { border-color: #b5b6c980; color: #edf4ff; }
.wp-problem[aria-pressed='true']::before { background: #cbd0dc; box-shadow: 0 0 10px #a5a8b6; }
.wp-station { position: absolute; top: 8%; left: 31%; width: 34%; height: 82%; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: .5rem; border: 0; border-radius: 50%; background: transparent; color: #f4f1fc; cursor: pointer; }
.wp-station-visual { position: relative; display: grid; place-items: center; width: min(255px, 21vw, 48cqh); aspect-ratio: 1; flex: none; border-radius: 50%; background: radial-gradient(circle, #174f8038 0, #0b193035 44%, transparent 70%); box-shadow: 0 0 70px #185ac01a; }
.wp-station-visual img { width: 40%; height: auto; border-radius: 22%; filter: drop-shadow(0 0 20px #418cff55); transition: transform .7s; }
.wp-station:hover img { transform: scale(1.08); }
.wp-orbit { position: absolute; inset: 4%; border: 2px solid #3b82f64d; border-top-color: #619cff; border-right-color: #3b82f6a6; border-radius: 50%; box-shadow: 0 0 20px #2563eb18, inset 0 0 20px #2563eb0d; animation: wp-orbit 22s linear infinite; }
.wp-orbit::after { content: ''; position: absolute; top: -4px; left: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: #e4a073; box-shadow: 0 0 8px #d78956, 0 0 19px #cd703b99; animation: wp-copper-pulse 5.8s ease-in-out infinite; }
.wp-station-grid { position: absolute; inset: 17%; border: 1px solid #90beea28; border-radius: 50%; box-shadow: 0 0 0 15px #70a9ee05, 0 0 0 35px #70a9ee03; }
.wp-wordmark { display: block; font: 700 clamp(1.4rem, 2.7vw, 2.4rem)/1.2 'Ubuntu Mono', monospace; margin-top: 1rem; letter-spacing: -.055em; }
.wp-wordmark > span { color: #508fff; }
.wp-station-hint { color: #c2bdd3; font-size: .8rem; margin-top: .55rem; }
.wp-station-readout { margin-top: .6rem; color: #7ea0be; font: .58rem/1.5 'Ubuntu Mono', monospace; }
.wp-modules { position: absolute; top: 7%; bottom: 5%; right: 3%; width: 31%; display: flex; flex-direction: column; }
.wp-module-list { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); gap: .8rem 1.2rem; min-height: 0; flex: 1; }
.wp-module { --module-color: #8bb9ff; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .35rem; min-width: 0; padding: .45rem; border: 1px solid transparent; border-radius: 15px; background: radial-gradient(ellipse, #1c31511a, transparent 70%); color: var(--module-color); cursor: pointer; transition: opacity .4s, border-color .4s, background .4s; }
.wp-module[data-wp-node='planning'] { --module-color: #9c8ce7; }
.wp-module[data-wp-node='invoices'] { --module-color: #74d5ba; }
.wp-module[data-wp-node='documents'] { --module-color: #d79ef1; }
.wp-module[data-wp-node='team'] { --module-color: #ef966c; }
.wp-module:hover, .wp-module.is-selected { border-color: color-mix(in srgb, var(--module-color) 30%, transparent); background: color-mix(in srgb, var(--module-color) 5%, transparent); }
.wp-module-visual { display: grid; place-items: center; width: min(70px, 6vw, 12cqh); aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--module-color) 50%, transparent); border-radius: 18%; background: #0c1221d9; box-shadow: 0 0 28px color-mix(in srgb, var(--module-color) 8%, transparent); }
.wp-module-visual svg { width: 57%; height: 57%; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.wp-module-name { font: 500 clamp(.66rem, .95vw, .85rem)/1.35 'Ubuntu Mono', monospace; }
.wp-module-meta { color: #87869e; font: .52rem/1.3 'Ubuntu Mono', monospace; }
.wp-module.is-receiving .wp-module-visual, .wp-station.is-receiving .wp-station-visual { box-shadow: 0 0 34px #69bfff66; }
.wp-module[data-wp-node='team'].is-receiving .wp-module-visual { box-shadow: 0 0 34px #d7895666; }
.wp-module.is-receiving { opacity: 1; }
.wp-narrative { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; gap: 1.4rem; flex: none; width: min(1110px, calc(100% - 4rem)); min-height: 112px; margin: 0 auto; padding: .9rem 1.3rem; }
.wp-narrative-label { margin: 0 0 .3rem; color: #85b4e1; font: .57rem/1.4 'Ubuntu Mono', monospace; letter-spacing: .08em; }
.wp-narrative > div { padding: .55rem .9rem; border: 1px solid transparent; border-radius: 10px; transition: border-color .25s ease, background-color .25s ease; }
.wp-narrative[data-context='problem'] > div { border-color: #a5a8b64d; background: #a5a8b60a; }
.wp-narrative[data-context='problem'] .wp-narrative-label { color: #b5b6c9; }
.wp-narrative[data-context='solution'] > div { border-color: #508fff70; background: #508fff0d; }
.wp-narrative-title { margin: 0 0 .25rem; font-size: 1.15rem; font-weight: 500; line-height: 1.3; }
.wp-narrative-copy { margin: 0; max-width: 85ch; color: #afaac3; font-size: .84rem; line-height: 1.5; }
.wp-footer { position: relative; flex: none; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 1.8rem; padding: .6rem 1rem; }
.wp-footer a, .wp-footer button { border: 0; padding: .4rem 0; background: transparent; color: #b4a9d0; font: .64rem/1.3 'Ubuntu Mono', monospace; text-decoration: none; cursor: pointer; }
.wp-footer a:hover, .wp-footer button:hover { color: #f3eaff; }
.werkplaner-chapter :is(button, a):focus-visible { outline: 2px solid #a7a0ff; outline-offset: 4px; }
.wp-story { width: min(660px, calc(100% - 2rem)); max-height: calc(100svh - 2rem); box-sizing: border-box; overflow-y: auto; padding: 2.6rem; border: 1px solid #759dd359; border-radius: 18px; background: radial-gradient(ellipse at top left, #192d48, #090a17 65%); color: #f1eafa; box-shadow: 0 30px 130px #000a; }
.wp-story::backdrop { background: #02030aba; backdrop-filter: blur(7px); }
.wp-story-close { position: absolute; right: .75rem; top: .65rem; width: 36px; height: 36px; border: 1px solid #9ab8da44; border-radius: 50%; background: #131b2b; color: #eee9fa; font-size: 1.35rem; cursor: pointer; }
.wp-story-eyebrow { margin: 0 1rem 1rem 0; color: #87b4eb; font: .58rem/1.6 'Ubuntu Mono', monospace; letter-spacing: .12em; }
.wp-story h2 { margin: 0 0 1.4rem; font-size: clamp(1.55rem, 3vw, 2.3rem); line-height: 1.15; font-weight: 550; letter-spacing: -.02em; }
.wp-story-copy p { margin: 0 0 1rem; font-size: .94rem; line-height: 1.7; color: #bfb7cf; }
.wp-story-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.wp-story-back { padding: .75rem 1rem; border: 1px solid #80a7d75e; border-radius: 7px; background: #1b3450; color: #e1edff; font: inherit; font-size: .8rem; cursor: pointer; }
.wp-story-actions a { color: #a4b4d6; font-size: .78rem; text-decoration: none; }
@media (max-width: 600px) {
  .wp-story { padding: 2.8rem 1.25rem 1.4rem; }
  .wp-story-eyebrow { font-size: .53rem; margin-bottom: .7rem; }
  .wp-story h2 { font-size: 1.6rem; margin-bottom: 1rem; }
  .wp-story-copy p { font-size: .83rem; line-height: 1.55; margin-bottom: .8rem; }
  .wp-story-actions { margin-top: 1rem; gap: .8rem; }
  .wp-story-back { font-size: .72rem; padding: .65rem .8rem; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .wp-story { width: min(830px, calc(100% - 2rem)); padding: 2.5rem 1.5rem 1.2rem; }
  .wp-story[open] { display: grid; grid-template-columns: 1fr 1.6fr; column-gap: 1.6rem; }
  .wp-story-close-form { position: absolute; right: 0; top: 0; }
  .wp-story h2 { font-size: 1.6rem; }
  .wp-story-copy p { font-size: .77rem; line-height: 1.45; margin-bottom: .65rem; }
  .wp-story-actions { grid-column: 1 / -1; margin-top: .5rem; }
}
.werkplaner-chapter[data-paused='true'] *, .werkplaner-chapter[data-paused='true'] *::before, .werkplaner-chapter[data-paused='true'] *::after { animation-play-state: paused !important; }
@keyframes wp-orbit { to { transform: rotate(360deg); } }
@keyframes wp-copper-pulse { 0%, 55%, 100% { opacity: 0; transform: scale(.65); } 12%, 28% { opacity: 1; transform: scale(1); } }
@keyframes wp-travel { to { stroke-dashoffset: -100; } }
@media (max-width: 1100px) {
  .wp-problem { font-size: .64rem; padding: .65rem; }
  .wp-station-readout { max-width: 23ch; }
  .wp-region { font-size: .51rem; margin-bottom: .6rem; }
  .wp-narrative { min-height: 105px; }
}
@media (max-width: 820px) and (orientation: portrait) {
  .werkplaner-chapter { top: calc(var(--public-nav-height) + 2.2rem); }
  .wp-intro { padding: .6rem 1rem 0; }
  .wp-intro h2 { font-size: clamp(1.3rem, 5.6vw, 1.8rem); margin-bottom: .4rem; }
  .wp-intro p { font-size: .73rem; max-width: 38ch; margin: auto; }
  .wp-problems { top: 2%; left: 5%; width: 90%; bottom: auto; height: 28%; }
  .wp-region { text-align: center; font-size: .48rem; margin-bottom: .35rem; }
  .wp-problem-list { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .6rem; }
  .wp-problem { width: 100%; font-size: .55rem; padding: .45rem .55rem; justify-content: center; text-align: center; }
  .wp-problem:nth-child(even) { align-self: stretch; }
  .wp-problem:last-child { grid-column: 1 / -1; width: fit-content; justify-self: center; }
  .wp-station { left: 25%; top: 34%; width: 50%; height: 26%; padding: 0; }
  .wp-station-visual { width: min(100px, 18cqh); }
  .wp-wordmark { margin-top: .4rem; font-size: 1.25rem; }
  .wp-station-hint { margin-top: .25rem; font-size: .6rem; }
  .wp-station-readout { display: none; }
  .wp-modules { top: 65%; bottom: 0; right: 3%; width: 94%; }
  .wp-module-list { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: .2rem .3rem; }
  .wp-module { flex-direction: row; flex-wrap: wrap; align-content: center; gap: .25rem; padding: .2rem; border-radius: 7px; }
  .wp-module-visual { width: min(30px, 6cqh); }
  .wp-module-name { font-size: .55rem; }
  .wp-module-meta { width: 100%; font-size: .43rem; }
  .wp-narrative { width: calc(100% - 1.5rem); min-height: 112px; gap: .5rem; padding: .7rem .3rem; margin-top: .4rem; }
  .wp-narrative-label { font-size: .47rem; }
  .wp-narrative-title { font-size: .9rem; }
  .wp-narrative-copy { font-size: .69rem; line-height: 1.4; }
  .wp-footer { gap: 1rem; min-height: 38px; padding: .3rem .5rem; }
  .wp-footer a, .wp-footer button { font-size: .53rem; }
}
/* Safari's visible iPad viewport can be substantially shorter than the device's
   nominal landscape height. Keep the constellation inside that usable space. */
@media (max-height: 720px) and (orientation: landscape) {
  .wp-intro { padding-top: .25rem; }
  .wp-intro h2 { font-size: 1.45rem; margin-bottom: .3rem; }
  .wp-intro p { font-size: .7rem; }
  .wp-region { font-size: .46rem; }
  .wp-problems, .wp-modules { top: 5%; bottom: 3%; }
  .wp-problem { padding: .35rem .5rem; font-size: .55rem; }
  .wp-problem-list { gap: .3rem; }
  .wp-station-hint, .wp-station-readout, .wp-module-meta { display: none; }
  .wp-wordmark { font-size: 1.3rem; margin-top: .5rem; }
  .wp-module-list { gap: .2rem .5rem; grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .wp-module { flex-direction: row; gap: .4rem; min-height: 0; padding: .15rem; }
  .wp-module-name { font-size: .55rem; }
  .wp-module-visual { width: min(32px, 12cqh); }
  .wp-narrative { min-height: 78px; padding: .4rem 1rem; }
  .wp-narrative-title { font-size: .95rem; }
  .wp-narrative-copy { font-size: .7rem; }
  .wp-footer { min-height: 34px; padding: .15rem 1rem; }
}
@media (max-height: 430px) and (orientation: landscape) {
  .wp-narrative > div { padding: .25rem .5rem; }
  .wp-problem-list { gap: .1rem; }
  .wp-intro p { display: none; }
  .wp-region { margin-bottom: .2rem; font-size: .42rem; }
  .wp-problem { padding: .12rem .4rem; font-size: .5rem; line-height: 1.2; }
  .wp-module-name { font-size: .5rem; line-height: 1.2; }
  .wp-narrative { min-height: 66px; padding: .3rem .7rem; }
  .wp-narrative-title { font-size: .85rem; }
  .wp-narrative-copy { font-size: .65rem; line-height: 1.35; }
  .wp-narrative-label { font-size: .48rem; }
}
@media (max-width: 820px) and (max-height: 700px) and (orientation: portrait) {
  .wp-narrative > div { padding: .3rem .4rem; }
  .wp-story { padding: 2.6rem 1rem 1.1rem; }
  .wp-story h2 { font-size: 1.4rem; }
  .wp-story-copy p { font-size: .8rem; line-height: 1.5; }
  .wp-intro h2 { font-size: 1.25rem; }
  .wp-intro p { font-size: .68rem; }
  .wp-problems { height: 29%; }
  .wp-problem { font-size: .5rem; padding: .35rem; gap: .4rem; }
  .wp-station { top: 50%; height: 18%; }
  .wp-station-visual { width: min(65px, 15cqh); }
  .wp-wordmark { font-size: 1.05rem; margin-top: .2rem; }
  .wp-station-hint { display: none; }
  .wp-modules { top: 70%; }
  .wp-module-list { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .wp-module { flex-wrap: nowrap; }
  .wp-module-visual { width: 22px; flex: none; }
  .wp-module-name { font-size: .5rem; }
  .wp-module-meta { display: none; }
  .wp-narrative { min-height: 106px; }
  .wp-narrative-copy { font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .werkplaner-chapter *, .werkplaner-chapter *::before, .werkplaner-chapter *::after { animation: none !important; transition: none !important; }
}

/* Reserve the same space for every problem and solution. */
.werkplaner-chapter .wp-narrative {
  width: min(900px, calc(100% - 2rem)); height: 126px; min-height: 126px;
  margin: .5rem auto 0; padding: .35rem 0; flex-shrink: 0;
}
.werkplaner-chapter .wp-narrative > div {
  width: 100%; height: 100%; padding: .7rem 1rem;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.wp-narrative-title { text-wrap: balance; }
.wp-narrative-copy { text-wrap: pretty; }
.wp-problem.is-sending { animation: wp-problem-pulse 1.1s ease-in-out infinite; }
@keyframes wp-problem-pulse { 50% { border-color: #cbd0dc; background: #a5a8b622; box-shadow: 0 0 14px #a5a8b622; } }
@media (max-width: 820px) and (orientation: portrait) {
  .werkplaner-chapter .wp-narrative { height: 140px; min-height: 140px; margin-top: .35rem; }
  .werkplaner-chapter .wp-narrative > div { padding: .45rem .65rem; }
  .wp-problems { height: 35%; }
  .wp-station { top: 40%; height: 23%; }
  .wp-modules { top: 67%; }
  .wp-problem-list { grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .wp-problem:last-child { grid-column: auto; width: 100%; justify-self: stretch; }
}
@media (max-width: 820px) and (max-height: 700px) and (orientation: portrait) {
  .werkplaner-chapter .wp-narrative { height: 128px; min-height: 128px; }
  .wp-problems { height: 40%; }
  .wp-station { top: 50%; height: 18%; }
  .wp-modules { top: 70%; }
  .wp-problem-list { min-height: 0; }
  .wp-problem { padding: .18rem .2rem; line-height: 1.2; gap: .25rem; }
}
@media (max-height: 720px) and (orientation: landscape) {
  .werkplaner-chapter .wp-narrative { height: 94px; min-height: 94px; margin-top: .2rem; }
  .werkplaner-chapter .wp-narrative > div { padding: .3rem .7rem; }
  /* A fallback for Safari font metrics or a future longer label: only the
     problem list, not the complete Universe, may scroll vertically. */
  .wp-problem-list { min-height: 0; gap: .1rem; overflow-y: auto; overscroll-behavior: contain; }
  .wp-problem { padding: .12rem .4rem; line-height: 1.2; }
}
@media (max-height: 430px) and (orientation: landscape) {
  .werkplaner-chapter .wp-narrative { height: 78px; min-height: 78px; }
  .wp-problem-list { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem; }
  .wp-problem { width: 100%; padding: .15rem; font-size: .46rem; }
}
