/* The annotated Path dashboard. Screen presentation only; lesson and worksheet
   printing retain the existing print contract in styles.css. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.workspace-skip-link { position: fixed; z-index: 200; top: -90px; left: 24px; padding: 12px 20px; border-radius: 12px; background: #d4f27a; color: #07110c; }
@media screen { .workspace-skip-link { background: #e6c47c; color: #15171a; } }
.workspace-skip-link:focus { top: 16px; }
@media screen {
  html { scroll-padding-top: 100px; }
  body { background-color: #06080a; }
  body[data-workspace-view] .topbar {
    position: fixed; z-index: 40; top: 35px; left: 30px; width: 212px; padding: 0;
    display: block; border: 0; background: none; box-shadow: none; backdrop-filter: none;
  }
  .topbar .brand { display: flex; gap: 11px; width: fit-content; margin: 0 0 46px 8px; }
  .topbar .brand-name { font-size: 1.5rem; letter-spacing: -.045em; }
  .topbar .brand-woven-p { width: 37px; height: 37px; }
  body[data-workspace-view] .primary-nav { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 12px; width: 100%; overflow: visible; }
  .primary-nav .nav-item {
    display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: auto; max-width: 100%; min-height: 49px;
    padding: 13px 20px 13px 16px; border-radius: 999px; border: 1px solid rgba(188, 190, 192, .11);
    background: rgba(25, 27, 30, .72); color: #bdbfc1; font-size: .875rem; line-height: 1.2; text-align: left;
    box-shadow: 0 6px 24px #00000013; backdrop-filter: blur(14px); transition: background .18s, color .18s, border-color .18s;
  }
  .primary-nav .nav-item:hover { background: #2d2f32; border-color: #a0bc8466; color: #f0f2f4; }
  .primary-nav .nav-item.active { background: #e6c47c; color: #1b1d20; border-color: #e6c47c; box-shadow: 0 4px 28px #e4b26816; }
  .path-nav-icon { position: relative; display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; border: 1.4px solid currentColor; opacity: .9; }
  .path-nav-icon-path { border-radius: 50%; border-style: dotted; transform: rotate(-25deg); }
  .path-nav-icon-path::after { content: ''; position: absolute; width: 5px; height: 5px; left: 5px; top: 5px; border-radius: 50%; background: currentColor; }
  .path-nav-icon-record { border: 0; border-bottom: 1px solid currentColor; }
  .path-nav-icon-record::before { content: ''; position: absolute; inset: 3px 1px 3px; background: linear-gradient(currentColor,currentColor) 0 7px/3px 7px no-repeat, linear-gradient(currentColor,currentColor) 6px 3px/3px 11px no-repeat, linear-gradient(currentColor,currentColor) 12px 0/3px 14px no-repeat; }
  .path-nav-icon-plan { border-radius: 3px; }
  .path-nav-icon-plan::before { content: ''; position: absolute; top: 4px; left: 3px; width: 9px; height: 1px; background: currentColor; box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor; }
  .path-nav-icon-upload { border-top: 0; border-radius: 0 0 3px 3px; height: 11px; margin-top: 6px; }
  .path-nav-icon-upload::before { content: ''; position: absolute; width: 7px; height: 7px; border-left: 1.4px solid currentColor; border-top: 1.4px solid currentColor; transform: rotate(45deg); left: 4px; top: -7px; }
  .path-nav-icon-upload::after { content: ''; position: absolute; width: 1.4px; height: 12px; left: 7px; top: -7px; background: currentColor; }
  .workspace-top-tools { position: fixed; top: 30px; right: 34px; left: 280px; display: flex; justify-content: flex-end; align-items: flex-start; gap: 12px; pointer-events: none; }
  .workspace-top-tools > * { pointer-events: auto; }
  .learner-pills { display: flex; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; justify-content: flex-end; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
  .learner-pill { border: 1px solid #b6b9bd29; border-radius: 999px; background: #17191bed; color: #bdbfc1; min-height: 44px; max-width: 185px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 10px 19px; font-size: .875rem; cursor: pointer; box-shadow: 0 5px 20px #00000022; }
  .learner-pill:hover { color: #f0f2f4; background: #2f3134; border-color: #b6b9bd6b; }
  .learner-pill.selected { background: #e6c47c; border-color: #e6c47c; color: #1c1e21; }
  .learner-pill:disabled { opacity: .5; cursor: default; }
  .add-learner-pill { background: #111315eb; color: #bdbfc1; border-style: dashed; }
  body[data-workspace-view] .account-mount { margin: 0; width: auto; flex: 0 0 auto; }
  .workspace-account-menu { position: relative; }
  .workspace-account-toggle { display: flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; border: 1px solid #b6b9bd29; border-radius: 50%; background: #17191bed; color: #bdbfc1; list-style: none; cursor: pointer; }
  .workspace-account-toggle::-webkit-details-marker { display: none; }
  .workspace-account-symbol { font: 400 1.2rem/1 Arial,sans-serif; transform: translateY(-3px); }
  .workspace-account-menu[open] .workspace-account-toggle { color: #e6c47c; border-color: #e6c47c66; }
  .workspace-account-panel { position: absolute; z-index: 70; right: 0; top: 54px; width: min(320px,calc(100vw - 32px)); padding: 18px; display: flex; flex-direction: column; gap: 4px; border: 1px solid #b6b9bd33; border-radius: 20px; background: #16181bfc; box-shadow: 0 20px 60px #00000099; max-height: calc(100dvh - 100px); overflow: auto; }
  .workspace-account-menu:not([open]) > .workspace-account-panel { display: none; }
  .workspace-account-panel > .eyebrow { margin: 0 0 8px; }
  .workspace-menu-item { width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #f0f2f4; text-align: left; cursor: pointer; }
  .workspace-menu-item:hover, .workspace-menu-item[aria-current] { background: #2d2f32; border-color: #a0bc8433; }
  .workspace-account-controls { margin-top: 12px; padding-top: 16px; border-top: 1px solid #b6b9bd29; }
  .workspace-account-controls .account-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .workspace-account-controls .account-summary .eyebrow { display: block; width: 100%; position: static; height: auto; margin: 0; clip-path: none; }
  .workspace-account-controls .account-usage { width: 100%; font-size: .875rem; }
  body[data-workspace-view] .main-content { width: calc(100% - 308px); max-width: none; margin: 0 28px 0 280px; padding: 112px 0 84px; }
  .main-content:focus { outline: none; }
  .catalog-status.success { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .catalog-status:empty, .workspace-status:empty { display: none; }
  .workspace-status { margin-bottom: 12px; padding: 10px 15px; border-radius: 12px; width: fit-content; }
  .vault-sync-status { font-size: .75rem; color: #969a9e; margin: -16px 0 16px; }
  .path-home { display: flex; flex-direction: column; gap: 0; }
  .path-heading { margin: 0 0 23px; }
  .path-heading h1 { margin: 0; font: 400 clamp(2.4rem,3.8vw,4.1rem)/1.05 var(--pw-serif); letter-spacing: -.04em; color: #f0f2f4; }
  .path-welcome { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: -4px 0 24px; }
  .path-welcome p { margin: 0; color: #bdbfc1; font-size: .875rem; }
  .path-welcome .button { min-height: 44px; padding: 8px 16px; border-radius: 999px; }
  .path-explorer { width: 100%; min-width: 0; }
  .path-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin: 0 0 16px; }
  .path-view-switch { display: flex; align-items: center; gap: 3px; padding: 4px; width: fit-content; border: 1px solid #b6b9bd28; border-radius: 999px; background: #16181ba8; flex: 0 0 auto; }
  .path-view-button { min-height: 42px; padding: 10px 18px; border: 0; border-radius: 999px; background: transparent; color: #b2b6ba; font-size: .875rem; cursor: pointer; }
  .path-view-button[aria-selected=true] { background: var(--pw-select, #dfe1e3); color: var(--pw-select-ink, #181a1d); }
  .path-filters { display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; }
  .path-filters label { margin: 0; }
  body .path-filters select, body .path-filters input { min-height: 44px; padding: 9px 33px 9px 14px; border: 1px solid #b6b9bd29; border-radius: 999px; background-color: #16181bca; color: #bdbfc1; font-size: .75rem; width: 100%; }
  .path-subject-filter { max-width: 190px; }
  .path-area-filter { max-width: 235px; }
  .path-search { max-width: 190px; }
  body .path-search input { padding-right: 12px; }
  .path-area-filter[hidden] { display: none; }
  .path-stage { position: relative; width: 100%; min-width: 0; overflow: hidden; border: 1px solid #b6b9bd1a; border-radius: 24px; background: radial-gradient(ellipse at 52% 47%,#1d1f2277,transparent 68%),#080a0ca8; }
  .path-constellation { position: relative; width: 100%; height: clamp(450px,62dvh,850px); min-height: 450px; isolation: isolate; }
  .path-constellation[hidden], .path-tracker[hidden] { display: none; }
  .path-constellation-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; outline-offset: -6px !important; }
  .path-subject-labels { position: absolute; inset: 0; pointer-events: none; }
  .path-subject-label { position: absolute; transform: translate(-50%,-50%); border: 1px solid #b6b9bd26; border-radius: 999px; padding: 7px 12px; min-height: 44px; background: #0d0f11b5; color: #d6d8da; font-size: .75rem; white-space: nowrap; pointer-events: auto; cursor: pointer; backdrop-filter: blur(4px); }
  .path-subject-label:hover { color: #e6c47c; border-color: #e6c47c77; }
  .path-subject-label[hidden] { display: none; }
  .path-camera-controls { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 5px; }
  .path-icon-button { display: flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; padding: 0; border: 1px solid #b6b9bd29; border-radius: 50%; background: #16181ae3; color: #d6d8da; font-size: 1.2rem; cursor: pointer; }
  .path-icon-button:hover { border-color: #e6c47c88; color: #e6c47c; }
  .path-icon-button:disabled { opacity: .45; cursor: default; }
  .path-gesture-hint { position: absolute; margin: 0; left: 22px; bottom: 26px; color: #979a9e; font-size: .75rem; pointer-events: none; }
  .path-canvas-label { position: absolute; z-index: 4; transform: translate(-50%,-50%); max-width: 280px; padding: 9px 13px; border: 1px solid #e6c47c55; border-radius: 10px; background: #1b1d20f5; color: #f0f2f4; font-size: .75rem; text-align: center; pointer-events: none; box-shadow: 0 8px 30px #00000066; }
  .path-canvas-label[hidden] { display: none; }
  .path-explorer.is-warping .path-constellation { animation: path-warp 420ms cubic-bezier(.55,.06,.88,.45) forwards; pointer-events: none; }
  .path-explorer.is-warping .path-gesture-hint, .path-explorer.is-warping .path-camera-controls { opacity: 0; }
  @keyframes path-warp { 0% { transform: scale(1); opacity: 1; filter: blur(0); } 70% { opacity: .8; } 100% { transform: scale(3.8); opacity: 0; filter: blur(6px); } }
  .path-tracker { width: 100%; min-height: 450px; }
  .path-tracker-intro { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding: 17px 22px 12px; border-bottom: 1px solid #b6b9bd1a; }
  .path-tracker-intro p { margin: 0; font-size: .75rem; color: #e6c47c; }
  .path-tracker-intro .path-age-note { color: #a8abaf; font-size: .75rem; }
  .path-tracker-scroll { width: 100%; max-height: min(65dvh,750px); min-height: 390px; overflow: auto; scrollbar-color: #4f5154 #111315; overscroll-behavior: contain; }
  .path-tracker-scroll:focus-visible { outline-offset: -4px; }
  .path-tracker-chart { position: relative; }
  .path-tracker-chart > svg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
  .path-age-label { position: absolute; top: 28px; transform: translateX(-50%); color: #c5c7c9; font-size: 1rem; z-index: 1; }
  .path-age-axis-label { position: absolute; left: 24px; top: 8px; color: #969a9e; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
  .path-age-grid { stroke: #b6b9bd1b; stroke-dasharray: 2 9; stroke-width: 1; }
  .path-age-band { fill: #e6c47c09; stroke: #e6c47c18; stroke-width: 1; }
  .path-lane-label { position: absolute; left: 24px; display: flex; align-items: baseline; gap: 12px; z-index: 1; color: #e3e6e8; font-size: .75rem; }
  .path-lane-label span { color: #85888c; font-size: .75rem; }
  .path-lane-divider { stroke: #b6b9bd12; }
  .path-track-edge { fill: none; stroke: #878a8e; stroke-width: 1.7; opacity: .56; }
  .path-track-edge.confirmed { stroke: #e6c47c; opacity: .85; stroke-width: 2.4; }
  .path-track-edge.selected { stroke: #e6c47c; opacity: 1; stroke-width: 2.5; }
  .path-topic-age-span { stroke: #b9bdc118; stroke-width: 9; stroke-linecap: round; }
  .path-tracker-topic { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translate(-50%,-13px); width: 150px; min-height: 52px; padding: 4px 6px 6px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #caccce; font: inherit; cursor: pointer; }
  .path-tracker-topic .path-status-dot { width: 18px; height: 18px; flex: 0 0 18px; box-shadow: 0 0 0 5px #0d0f11; }
  .path-tracker-topic-name { font-size: .75rem; line-height: 1.3; padding: 3px 5px; border-radius: 5px; background: #0d0f11e6; max-width: 142px; }
  .path-tracker-topic:hover, .path-tracker-topic.selected { background: #232528cc; border-color: #e6c47c55; color: #f0f2f4; }
  .path-tracker-topic.confirmed .path-status-dot { box-shadow: 0 0 0 5px #0d0f11, 0 0 18px #e6c47c66; }
  .path-tracker-key { margin: 0; padding: 12px 22px; border-top: 1px solid #b6b9bd1a; color: #979a9e; font-size: .75rem; }
  .path-map-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 18px; padding: 16px 4px 8px; }
  .path-status-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 17px; }
  .path-legend-item { display: inline-flex; align-items: center; gap: 7px; color: #a6aaae; font-size: .75rem; white-space: nowrap; }
  .path-status-dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #111315; border: 1px solid #888b8f; }
  .path-status-dot.confirmed { background: #e6c47c; border-color: #e6c47c; }
  .path-status-dot.practising { background: #a0bc84; border-color: #a0bc84; }
  .path-status-dot.starting { background: #c7c9cb; border-color: #c7c9cb; }
  .path-status-dot.proposed { border: 1.5px dashed #c7c9cb; background: #131517; }
  .path-topic-count { margin: 0; color: #979a9e; font-size: .75rem; }
  .path-topic-browser { border: 0; border-top: 1px solid #b6b9bd1c; margin: 9px 0 0; padding: 0; border-radius: 0; background: transparent; }
  .path-topic-browser > summary { width: fit-content; padding: 14px 4px; color: #bec0c2; font-size: .75rem; cursor: pointer; }
  .path-topic-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; padding: 0 0 18px; }
  .path-topic-option { display: flex; align-items: flex-start; gap: 10px; padding: 14px; min-height: 62px; border: 1px solid #b6b9bd29; border-radius: 12px; background: #181a1d; color: #e5e7e9; text-align: left; font: inherit; cursor: pointer; }
  .path-topic-option > .path-status-dot { margin-top: 5px; }
  .path-topic-option strong { display: block; font-size: .75rem; line-height: 1.35; }
  .path-topic-meta { display: block; margin-top: 6px; color: #9ca0a4; font-size: .75rem; line-height: 1.5; }
  .path-topic-option:hover, .path-topic-option[aria-current=true] { border-color: #e6c47c77; background: #25272a; }
  .path-list-pager { grid-column: 1/-1; display: flex; align-items: center; gap: 12px; color: #a6aaae; font-size: .75rem; }
  .path-empty { padding: 24px; color: #afb2b6; font-size: .875rem; }
  .path-selected-detail:empty { display: none; }
  .path-selected-detail { margin-top: 16px; }
  .path-selected-detail > .learning-sky-detail { border: 1px solid #b6b9bd33; border-radius: 20px; background: #191b1e; padding: 24px; }
  .path-selected-detail .learning-sky-detail > h3 { font: 400 1.5rem/1.2 var(--pw-serif); }
  .path-selected-detail .learning-sky-observation-form { max-width: 720px; }
  .path-map-loading { min-height: 56vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px solid #b6b9bd1c; border-radius: 24px; background: radial-gradient(ellipse,#25272a55,transparent 60%); }
  .path-map-loading h2 { margin: 18px 0 8px; }
  .path-map-loading p { color: #a6aaae; }
  .path-loading-orbit { width: 90px; height: 90px; border-radius: 50%; border: 1px dotted #a0bc8466; box-shadow: 0 0 0 15px #a0bc8406, 0 0 40px #a0bc8411; }
  .path-loading-orbit::after { content: ''; display: block; width: 10px; height: 10px; margin: 40px; border-radius: 50%; background: #e6c47c; box-shadow: 0 0 24px #e6c47c66; }
  .dashboard-unavailable { margin-bottom: 16px; font-size: .875rem; }
}
@media screen and (min-width: 1800px) {
  body[data-workspace-view] .main-content { width: calc(100% - 365px); margin-left: 310px; margin-right: 55px; }
  body[data-workspace-view] .topbar { left: 45px; }
  .workspace-top-tools { right: 55px; }
}
@media screen and (max-width: 1100px) {
  body[data-workspace-view] .topbar { left: 18px; width: 180px; }
  .topbar .brand { margin-left: 6px; gap: 7px; }
  .topbar .brand-name { font-size: 1.2rem; }
  .topbar .brand-woven-p { width: 31px; height: 31px; }
  .primary-nav .nav-item { gap: 10px; padding: 12px 15px; font-size: .75rem; }
  body[data-workspace-view] .main-content { width: calc(100% - 235px); margin-left: 215px; margin-right: 20px; }
  .workspace-top-tools { left: 215px; right: 20px; }
  .path-toolbar { align-items: flex-start; }
  .path-filters { width: 100%; }
  .path-search { flex: 1 1 140px; max-width: none; }
  .path-topic-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media screen and (max-width: 760px) {
  html { scroll-padding-top: 155px; }
  body[data-workspace-view] .topbar { position: relative; top: auto; left: auto; width: 100%; padding: 20px 18px 0; }
  .topbar .brand { margin: 0; }
  .topbar .brand-name { font-size: 1.2rem; }
  body[data-workspace-view] .primary-nav { flex-direction: row; gap: 7px; margin-top: 24px; align-items: stretch; justify-content: flex-start; }
  .primary-nav .nav-item { flex: 1 1 0; justify-content: center; min-width: 0; min-height: 44px; padding: 9px 8px; font-size: .75rem; text-align: center; gap: 6px; line-height: 1.25; }
  .path-nav-icon { width: 14px; height: 14px; flex-basis: 14px; }
  .path-nav-icon-plan::before { width: 7px; top: 3px; left: 2px; box-shadow: 0 3px 0 currentColor,0 6px 0 currentColor; }
  .path-nav-icon-path::after { width: 4px; height: 4px; top: 4px; left: 4px; }
  .path-nav-icon-upload { height: 10px; }
  .path-nav-icon-upload::before { left: 2px; }
  .path-nav-icon-upload::after { left: 5px; }
  .path-nav-icon-record::before { transform: scale(.75); transform-origin: left center; }
  .workspace-top-tools { position: static; display: flex; flex-wrap: nowrap; justify-content: flex-start; margin-top: 16px; gap: 8px; }
  .learner-pills { flex: 1 1 auto; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
  .learner-pill { flex: 0 0 auto; min-height: 44px; padding: 9px 15px; font-size: .75rem; max-width: 160px; }
  .workspace-account-toggle { width: 44px; min-height: 44px; }
  body[data-workspace-view] .main-content { width: calc(100% - 36px); margin: 0 18px; padding: 30px 0 110px; }
  .path-heading { margin-bottom: 20px; }
  .path-heading h1 { font-size: clamp(2.2rem,7vw,3.2rem); }
  .path-constellation { height: clamp(390px,57dvh,650px); min-height: 390px; }
  .path-stage { border-radius: 18px; }
  .path-view-switch { width: 100%; }
  .path-view-button { flex: 1 1 0; padding-inline: 14px; font-size: .75rem; }
  .path-toolbar { gap: 11px; margin-bottom: 12px; }
  .path-filters { gap: 7px; }
  .path-subject-filter { flex: 1 1 120px; max-width: none; }
  .path-search { flex: 1 1 120px; width: 0; }
  .path-area-filter { flex: 1 1 100%; max-width: none; order: 3; }
  body .path-filters input, body .path-filters select { min-height: 42px; font-size: .75rem; }
  .path-subject-label { min-height: 44px; font-size: .75rem; padding: 5px 8px; }
  .path-camera-controls { right: 10px; bottom: 12px; }
  .path-icon-button { width: 44px; min-height: 44px; }
  .path-gesture-hint { left: 13px; bottom: 63px; font-size: .75rem; }
  .path-tracker-intro { padding: 14px; }
  .path-tracker-scroll { max-height: 57dvh; }
  .path-tracker-key { padding: 12px 14px; font-size: .75rem; }
  .path-status-legend { gap: 9px 13px; }
  .path-legend-item { font-size: .75rem; }
  .path-topic-list { grid-template-columns: 1fr; }
  .path-selected-detail > .learning-sky-detail { padding: 18px; }
}
@media screen and (max-width: 480px) {
  .primary-nav .nav-item { font-size: .75rem; }
  .primary-nav .path-nav-icon { display: none; }
}
@media screen and (max-width: 380px) {
  .primary-nav .nav-item { padding: 8px 5px; font-size: .75rem; gap: 4px; }
  .primary-nav .path-nav-icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .path-explorer.is-warping .path-constellation { animation: none; }
}
@media print {
  .workspace-skip-link, .workspace-top-tools, .path-toolbar, .path-stage, .path-map-footer, .path-topic-browser, .parent-assistant { display: none !important; }
}

/* The Path is a viewport, with controls floating over one continuous sky.
   Other workspace pages keep the dashboard layout above. */
@media screen {
  body[data-workspace-view="journey"] { min-height: 100dvh; overflow-x: hidden; background: #080a0c; }
  body[data-workspace-view="journey"] .app-body { display: block; }
  body[data-workspace-view="journey"] .main-content { width: 100%; max-width: none; margin: 0; padding: 0; min-height: 100dvh; pointer-events: none; }
  body[data-workspace-view="journey"] #workspace { min-height: 100dvh; }
  body[data-workspace-view="journey"] .path-home { min-height: 100dvh; gap: 0; }
  body[data-workspace-view="journey"] .path-heading { position: fixed; z-index: 20; top: 112px; left: 280px; right: 35px; margin: 0; pointer-events: none; }
  body[data-workspace-view="journey"] .path-heading h1 { font-size: clamp(2.3rem,3.7vw,4rem); line-height: 1.06; text-shadow: 0 3px 28px #060709e6; }
  body[data-workspace-view="journey"] .path-welcome { position: fixed; z-index: 22; top: 88px; left: 280px; right: 28px; margin: 0; gap: 8px 18px; pointer-events: auto; }
  body[data-workspace-view="journey"] .path-welcome p { font-size: .75rem; }
  body[data-workspace-view="journey"] .path-welcome .button { min-height: 32px; padding: 4px 12px; font-size: .75rem; }
  body[data-workspace-view="journey"] .path-toolbar { position: fixed; z-index: 25; top: 184px; left: 280px; right: 28px; margin: 0; align-items: center; justify-content: flex-start; gap: 10px 16px; pointer-events: none; }
  body[data-workspace-view="journey"] .path-toolbar > * { pointer-events: auto; }
  body[data-workspace-view="journey"] .path-view-switch { background: #121416c9; backdrop-filter: blur(18px); box-shadow: 0 8px 40px #00000022; }
  body[data-workspace-view="journey"] .path-view-button { min-height: 40px; }
  body[data-workspace-view="journey"] .path-filters { width: auto; flex: 1 1 auto; justify-content: flex-end; }
  body[data-workspace-view="journey"] .path-filters select, body[data-workspace-view="journey"] .path-filters input { background-color: #131518d4; backdrop-filter: blur(12px); font-size: .75rem; min-height: 42px; }
  body[data-workspace-view="journey"] .path-subject-filter { width: 153px; }
  body[data-workspace-view="journey"] .path-area-filter { width: 195px; }
  body[data-workspace-view="journey"] .path-search { width: 155px; }
  .path-filter-toggle { display: none; }
  body[data-workspace-view="journey"] .path-stage { position: fixed; z-index: 0; inset: 0; width: 100vw; height: 100dvh; border: 0; border-radius: 0; overflow: hidden; pointer-events: auto; background: radial-gradient(ellipse at 40% 43%,#34363936,transparent 48%),radial-gradient(ellipse at 79% 68%,#3436392e,transparent 44%),radial-gradient(ellipse at 66% 9%,#33353822,transparent 50%),#080a0c; }
  body[data-workspace-view="journey"] .path-constellation,
  body[data-workspace-view="journey"] .path-tracker { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; }
  body[data-workspace-view="journey"] .path-constellation-canvas,
  body[data-workspace-view="journey"] .path-tracker-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline-offset: -6px !important; }
  body[data-workspace-view="journey"] canvas.is-dragging { cursor: grabbing; }
  body[data-workspace-view="journey"] canvas.over-topic { cursor: pointer; }
  body[data-workspace-view="journey"] .path-subject-label { border-color: transparent; background: #0f111345; color: #c5c7c9; font-size: .75rem; letter-spacing: .035em; text-shadow: 0 2px 10px #000000; backdrop-filter: blur(3px); }
  body[data-workspace-view="journey"] .path-subject-label:hover { background: #1e2023cf; border-color: #e6c47c55; }
  body[data-workspace-view="journey"] .path-camera-controls { position: fixed; z-index: 26; right: 128px; bottom: 37px; gap: 7px; }
  body[data-workspace-view="journey"] .path-icon-button { backdrop-filter: blur(12px); background: #17191bd6; box-shadow: 0 4px 25px #00000033; }
  body[data-workspace-view="journey"] .path-icon-button[aria-pressed="true"] { color: #e6c47c; border-color: #e6c47c66; }
  body[data-workspace-view="journey"] .path-icon-button[hidden] { display: none; }
  body[data-workspace-view="journey"] .path-gesture-hint { position: fixed; z-index: 12; left: 280px; bottom: 108px; color: #888b8f; font-size: .75rem; text-shadow: 0 2px 10px #000000; }
  body[data-workspace-view="journey"] .path-canvas-label { background: #0d0f11d9; border: 1px solid #b6b9bd1a; border-radius: 12px; color: #dadcde; backdrop-filter: blur(8px); }
  body[data-workspace-view="journey"] .path-map-footer { position: fixed; z-index: 18; left: 280px; bottom: 34px; right: 420px; padding: 0; gap: 9px; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; text-shadow: 0 2px 12px #000000; }
  body[data-workspace-view="journey"] .path-status-legend { gap: 8px 14px; }
  body[data-workspace-view="journey"] .path-legend-item { font-size: .75rem; color: #9ea1a5; }
  body[data-workspace-view="journey"] .path-topic-count { font-size: .75rem; color: #828589; }
  body[data-workspace-view="journey"] .path-topic-browser { position: fixed; z-index: 43; left: 30px; bottom: 37px; padding: 0; margin: 0; border: 0; pointer-events: auto; }
  body[data-workspace-view="journey"] .path-topic-browser > summary { min-height: 44px; padding: 13px 20px; border: 1px solid #b6b9bd2b; border-radius: 999px; background: #17191bdd; backdrop-filter: blur(12px); color: #d4d6d8; font-size: .75rem; box-shadow: 0 5px 25px #00000033; }
  body[data-workspace-view="journey"] .path-browser-panel { position: fixed; right: 28px; top: 103px; bottom: 119px; width: min(430px,calc(100vw - 56px)); border: 1px solid #b6b9bd30; border-radius: 24px; background: #141619ed; backdrop-filter: blur(24px); box-shadow: 0 22px 80px #00000099; overflow: auto; overscroll-behavior: contain; }
  body[data-workspace-view="journey"] .path-topic-browser:not([open]) .path-browser-panel { display: none; }
  .path-drawer-header { position: sticky; z-index: 2; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 20px; background: #17191bee; border-bottom: 1px solid #b6b9bd1a; backdrop-filter: blur(18px); }
  .path-drawer-header h2 { margin: 0; font: 400 1.5rem/1.2 var(--pw-serif); color: #e8eaec; }
  .path-drawer-header > .eyebrow { margin: 0; font-size: .75rem; }
  .path-drawer-close { min-width: 54px; min-height: 44px; padding: 10px 12px; border: 1px solid #b6b9bd2b; border-radius: 999px; background: #232528; color: #d7d9db; font-size: .75rem; cursor: pointer; }
  .path-drawer-close:hover { border-color: #e6c47c66; color: #e4c59a; }
  body[data-workspace-view="journey"] .path-topic-list { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 16px; }
  body[data-workspace-view="journey"] .path-topic-option { border-color: #b6b9bd1c; background: #1f212477; }
  body[data-workspace-view="journey"] .path-selected-detail { position: fixed; z-index: 52; top: 103px; right: 28px; bottom: 119px; width: min(430px,calc(100vw - 56px)); margin: 0; border: 1px solid #b6b9bd38; border-radius: 24px; overflow: auto; overscroll-behavior: contain; background: #141619f2; backdrop-filter: blur(24px); box-shadow: 0 22px 80px #00000099; pointer-events: auto; }
  body[data-workspace-view="journey"] .path-selected-detail[hidden] { display: none; }
  body[data-workspace-view="journey"] .path-detail-content { padding: 22px; }
  body[data-workspace-view="journey"] .path-detail-content > .learning-sky-detail { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  body[data-workspace-view="journey"] .path-detail-content h2,
  body[data-workspace-view="journey"] .path-detail-content .learning-sky-detail > h3 { font: 400 1.9rem/1.15 var(--pw-serif); margin-top: 7px; }
  body[data-workspace-view="journey"] .path-detail-content p { font-size: .875rem; line-height: 1.65; }
  body[data-workspace-view="journey"] .path-detail-content .learning-sky-observation-form { margin-top: 24px; gap: 16px; }
  body[data-workspace-view="journey"] .path-detail-content .editor-field { min-width: 0; }
  body[data-workspace-view="journey"] .path-detail-content .button { min-height: 44px; }
  body[data-workspace-view="journey"] .path-age-markers { position: absolute; z-index: 5; left: 0; right: 0; top: 260px; height: 28px; pointer-events: none; }
  body[data-workspace-view="journey"] .path-age-marker { position: absolute; transform: translateX(-50%); padding: 4px 9px; color: #7a7d81; font-size: .75rem; font-variant-numeric: tabular-nums; text-shadow: 0 1px 9px #060709; }
  body[data-workspace-view="journey"] .path-age-marker::after { content: ''; display: block; height: 9px; width: 1px; margin: 6px auto 0; background: #a0a4a825; }
  body[data-workspace-view="journey"] .path-age-marker.selected-range { color: #cdaf85; }
  body[data-workspace-view="journey"] .path-age-marker[hidden] { display: none; }
  body[data-workspace-view="journey"] .path-unaged-marker { white-space: nowrap; font-size: .75rem; color: #989ca0; }
  body[data-workspace-view="journey"] .path-tracker-intro { position: fixed; z-index: 12; left: 280px; bottom: 151px; padding: 0; border: 0; display: flex; flex-direction: column; gap: 4px; pointer-events: none; text-shadow: 0 2px 10px #000000; }
  body[data-workspace-view="journey"] .path-tracker-intro > p { font-size: .75rem; color: #d4be9f; }
  body[data-workspace-view="journey"] .path-tracker-intro .path-age-note { font-size: .75rem; color: #929599; }
  body[data-workspace-view="journey"] .path-tracker-key { position: fixed; z-index: 12; left: 280px; bottom: 127px; margin: 0; padding: 0; border: 0; font-size: .75rem; color: #808387; pointer-events: none; text-shadow: 0 2px 10px #000000; }
  body[data-workspace-view="journey"] .path-scene-empty { position: absolute; z-index: 8; top: 48%; left: 50%; transform: translate(-50%,-50%); max-width: 430px; width: calc(100% - 60px); text-align: center; font-size: 1rem; color: #c0c2c4; }
  body[data-workspace-view="journey"] .path-scene-empty[hidden] { display: none; }
  body[data-workspace-view="journey"] .path-map-loading { position: fixed; inset: 0; border: 0; border-radius: 0; padding: 260px 24px 180px; pointer-events: auto; }
  body[data-workspace-view="journey"] .workspace-status:not(:empty),
  body[data-workspace-view="journey"] .catalog-status:not(.success):not(:empty) { position: fixed; z-index: 80; top: 84px; left: 50%; transform: translateX(-50%); max-width: min(600px,calc(100vw - 50px)); margin: 0; background: #25272af5; border: 1px solid #b2b6ba55; box-shadow: 0 8px 40px #00000088; pointer-events: auto; font-size: .75rem; }
  body[data-workspace-view="journey"] .dashboard-unavailable { position: fixed; z-index: 22; top: 80px; left: 280px; right: 28px; margin: 0; pointer-events: auto; background: #222427e8; }
  body[data-workspace-view="journey"] .vault-sync-status { position: fixed; z-index: 19; top: 80px; right: 30px; margin: 0; font-size: .75rem; pointer-events: none; }
  body[data-workspace-view="journey"] #workspace > :not(.path-home):not(.vault-sync-status):not(.parent-assistant) { position: relative; z-index: 65; width: min(830px,calc(100% - 64px)); margin: 155px auto 48px; pointer-events: auto; }
  body[data-workspace-view="journey"] .without-canvas .path-subject-labels { display: none; }
}
@media screen and (min-width: 1800px) {
  body[data-workspace-view="journey"] .main-content { width: 100%; margin: 0; }
  body[data-workspace-view="journey"] .path-toolbar { top: 200px; }
}
@media screen and (max-width: 1250px) and (min-width: 761px) {
  body[data-workspace-view="journey"] .path-heading { left: 230px; }
  body[data-workspace-view="journey"] .path-toolbar { left: 230px; top: 178px; }
  body[data-workspace-view="journey"] .path-filters { justify-content: flex-start; flex-basis: 100%; }
  body[data-workspace-view="journey"] .path-age-markers { top: 292px; }
  body[data-workspace-view="journey"] .path-gesture-hint,
  body[data-workspace-view="journey"] .path-tracker-intro,
  body[data-workspace-view="journey"] .path-tracker-key,
  body[data-workspace-view="journey"] .path-map-footer { left: 230px; }
  body[data-workspace-view="journey"] .path-map-footer { right: 320px; }
  body[data-workspace-view="journey"] .path-camera-controls { right: 108px; }
}
@media screen and (max-width: 760px) {
  body[data-workspace-view="journey"] .topbar { position: fixed; z-index: 40; top: 17px; left: 18px; width: calc(100% - 36px); padding: 0; pointer-events: none; }
  body[data-workspace-view="journey"] .topbar > * { pointer-events: auto; }
  body[data-workspace-view="journey"] .topbar .brand { margin: 0; }
  body[data-workspace-view="journey"] .topbar .brand-woven-p { width: 31px; height: 31px; }
  body[data-workspace-view="journey"] .topbar .brand-name { font-size: 1.2rem; }
  body[data-workspace-view="journey"] .primary-nav { margin-top: 13px; gap: 6px; }
  body[data-workspace-view="journey"] .primary-nav .nav-item { font-size: .75rem; min-height: 40px; padding: 8px 7px; }
  body[data-workspace-view="journey"] .workspace-top-tools { position: static; margin-top: 10px; gap: 8px; }
  body[data-workspace-view="journey"] .learner-pills { padding-bottom: 0; gap: 6px; }
  body[data-workspace-view="journey"] .learner-pill { min-height: 40px; font-size: .75rem; padding: 8px 14px; }
  body[data-workspace-view="journey"] .workspace-account-toggle { width: 40px; min-height: 40px; }
  body[data-workspace-view="journey"] .main-content { width: 100%; margin: 0; padding: 0; }
  body[data-workspace-view="journey"] .path-heading { left: 20px; top: 177px; right: 20px; }
  body[data-workspace-view="journey"] .path-heading h1 { font-size: 2.1rem; }
  body[data-workspace-view="journey"] .path-toolbar { left: 18px; right: 18px; top: 226px; gap: 8px; flex-wrap: nowrap; }
  body[data-workspace-view="journey"] .path-view-switch { flex: 1 1 auto; width: auto; padding: 3px; }
  body[data-workspace-view="journey"] .path-view-button { min-height: 38px; padding: 8px 11px; font-size: .75rem; }
  body[data-workspace-view="journey"] .path-filter-toggle { display: block; min-height: 44px; padding: 10px 13px; border: 1px solid #b6b9bd2b; border-radius: 999px; background: #131518dd; backdrop-filter: blur(16px); color: #c5c7c9; font-size: .75rem; cursor: pointer; }
  body[data-workspace-view="journey"] .path-filters { display: none; position: absolute; top: 53px; left: 0; right: 0; padding: 14px; border: 1px solid #b6b9bd33; border-radius: 20px; background: #16181af5; backdrop-filter: blur(20px); box-shadow: 0 16px 45px #00000077; }
  body[data-workspace-view="journey"] .filters-open .path-filters { display: flex; }
  body[data-workspace-view="journey"] .path-subject-filter { flex: 1 1 100%; width: auto; }
  body[data-workspace-view="journey"] .path-area-filter { flex: 1 1 100%; width: auto; order: 0; }
  body[data-workspace-view="journey"] .path-search { flex: 1 1 100%; width: auto; }
  body[data-workspace-view="journey"] .path-filters input,
  body[data-workspace-view="journey"] .path-filters select { min-height: 44px; }
  body[data-workspace-view="journey"] .path-age-markers { top: 287px; }
  body[data-workspace-view="journey"] .path-welcome { top: 217px; left: 20px; right: 20px; gap: 4px 8px; }
  body[data-workspace-view="journey"] .path-home:has(.path-welcome) .path-toolbar { top: 282px; }
  body[data-workspace-view="journey"] .path-welcome p { font-size: .75rem; max-width: 210px; line-height: 1.5; }
  body[data-workspace-view="journey"] .path-welcome .button { font-size: .75rem; }
  body[data-workspace-view="journey"] .path-subject-label { font-size: .75rem; }
  body[data-workspace-view="journey"] .path-camera-controls { right: 18px; bottom: max(94px,calc(env(safe-area-inset-bottom) + 84px)); gap: 5px; }
  body[data-workspace-view="journey"] .path-icon-button { width: 44px; min-height: 44px; }
  body[data-workspace-view="journey"] .path-topic-browser { left: 18px; bottom: max(148px,calc(env(safe-area-inset-bottom) + 138px)); }
  body[data-workspace-view="journey"] .path-topic-browser > summary { min-height: 40px; padding: 11px 15px; font-size: .75rem; }
  /* One stack up the bottom edge: Legend and the count, the camera row, Browse topics.
     The legend folds behind its button at every phone height so nothing overlaps. */
  body[data-workspace-view="journey"] .path-map-footer { left: 20px; right: 89px; bottom: max(20px,env(safe-area-inset-bottom)); flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; }
  /* A long count ("20 path topics · 6 parent observations") wraps beside the Legend button, never under it. */
  body[data-workspace-view="journey"] .path-map-footer > .path-topic-count { flex: 1 1 auto; min-width: 0; margin: 0; text-align: right; }
  body[data-workspace-view="journey"] .path-map-footer.legend-open { z-index: 30; }
  body[data-workspace-view="journey"] .path-status-legend { display: none; gap: 8px 11px; }
  body[data-workspace-view="journey"] .path-legend-toggle { display: block; min-height: 44px; padding: 7px 14px; border: 1px solid #b6b9bd2b; border-radius: 999px; background: #131518e8; color: #c5c7c9; font-size: .75rem; pointer-events: auto; cursor: pointer; }
  body[data-workspace-view="journey"] .legend-open .path-status-legend { position: absolute; display: flex; flex-direction: column; align-items: flex-start; left: 0; bottom: 54px; width: 230px; padding: 14px; border: 1px solid #b6b9bd2b; border-radius: 18px; background: #131518f5; backdrop-filter: blur(16px); }
  body[data-workspace-view="journey"] .path-legend-item { font-size: .75rem; gap: 5px; }
  body[data-workspace-view="journey"] .path-status-dot { width: 7px; height: 7px; flex-basis: 7px; }
  body[data-workspace-view="journey"] .path-topic-count { font-size: .75rem; }
  body[data-workspace-view="journey"] .path-gesture-hint { left: 20px; right: 20px; bottom: 205px; font-size: .75rem; }
  body[data-workspace-view="journey"] .path-tracker-intro { left: 20px; bottom: 230px; gap: 4px; }
  body[data-workspace-view="journey"] .path-tracker-intro > p { font-size: .75rem; }
  body[data-workspace-view="journey"] .path-tracker-intro .path-age-note { font-size: .75rem; }
  body[data-workspace-view="journey"] .path-tracker-key { display: none; }
  body[data-workspace-view="journey"] .path-browser-panel,
  body[data-workspace-view="journey"] .path-selected-detail { top: 280px; bottom: max(90px,calc(env(safe-area-inset-bottom) + 84px)); left: 14px; right: 14px; width: auto; max-height: none; border-radius: 22px; }
  body[data-workspace-view="journey"] .path-detail-content { padding: 19px; }
  body[data-workspace-view="journey"] .path-detail-content .learning-sky-detail > h3 { font-size: 1.5rem; }
  body[data-workspace-view="journey"] .path-drawer-header { padding: 10px 15px; }
  body[data-workspace-view="journey"] .workspace-status:not(:empty),
  body[data-workspace-view="journey"] .catalog-status:not(.success):not(:empty) { top: 160px; font-size: .75rem; max-width: calc(100vw - 36px); }
  body[data-workspace-view="journey"] .vault-sync-status { top: 21px; right: 20px; max-width: 140px; font-size: .75rem; }
  body[data-workspace-view="journey"] .dashboard-unavailable { top: 272px; left: 18px; right: 18px; font-size: .75rem; }
  body[data-workspace-view="journey"] #workspace > :not(.path-home):not(.vault-sync-status):not(.parent-assistant) { width: calc(100% - 36px); margin: 180px auto 110px; }
}
@media screen and (max-height: 560px) and (min-width: 600px) {
  body[data-workspace-view="journey"] .topbar { left: 17px; top: 14px; width: 160px; }
  body[data-workspace-view="journey"] .topbar .brand { margin: 0 0 18px; }
  body[data-workspace-view="journey"] .primary-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; }
  body[data-workspace-view="journey"] .primary-nav .nav-item { min-height: 36px; padding: 8px 13px; flex: 0 0 auto; font-size: .75rem; }
  body[data-workspace-view="journey"] .workspace-top-tools { position: fixed; top: 14px; left: 192px; right: 17px; margin: 0; justify-content: flex-end; }
  body[data-workspace-view="journey"] .learner-pills { justify-content: flex-end; }
  body[data-workspace-view="journey"] .path-heading { left: 202px; top: 77px; }
  body[data-workspace-view="journey"] .path-heading h1 { font-size: 2rem; }
  body[data-workspace-view="journey"] .path-toolbar { left: 202px; top: 122px; right: 17px; }
  body[data-workspace-view="journey"] .path-filters { display: none; position: absolute; top: 52px; left: 0; right: 0; padding: 12px; border-radius: 18px; background: #16181af5; }
  body[data-workspace-view="journey"] .filters-open .path-filters { display: flex; }
  body[data-workspace-view="journey"] .path-filter-toggle { display: block; min-height: 40px; padding: 10px 13px; border: 1px solid #b6b9bd2b; border-radius: 999px; background: #131518dd; color: #c5c7c9; font-size: .75rem; }
  body[data-workspace-view="journey"] .path-camera-controls { right: 100px; bottom: 20px; }
  body[data-workspace-view="journey"] .path-topic-browser { left: 18px; bottom: 20px; }
  body[data-workspace-view="journey"] .path-map-footer { left: 202px; right: 325px; bottom: 20px; }
  body[data-workspace-view="journey"] .path-status-legend { display: none; }
  body[data-workspace-view="journey"] .path-gesture-hint { left: 202px; bottom: 70px; }
  body[data-workspace-view="journey"] .path-tracker-intro { left: 202px; bottom: 92px; }
  body[data-workspace-view="journey"] .path-tracker-key { display: none; }
  body[data-workspace-view="journey"] .path-age-markers { top: 180px; }
  body[data-workspace-view="journey"] .path-browser-panel,
  body[data-workspace-view="journey"] .path-selected-detail { top: 68px; left: auto; right: 14px; bottom: 80px; width: min(420px,calc(100vw - 210px)); }
  body[data-workspace-view="journey"] .path-welcome { top: 51px; left: 202px; }
  body[data-workspace-view="journey"] .path-home:has(.path-welcome) .path-toolbar { top: 122px; }
}
@media print {
  .path-selected-detail[hidden] { display: none !important; }
  .path-drawer-header { display: none; }
}

@media screen {
  .path-legend-toggle { display: none; }
}
@media screen and (max-width: 760px) and (max-height: 700px) and (orientation: portrait) {
  body[data-workspace-view="journey"] .topbar { top: 10px; }
  body[data-workspace-view="journey"] .primary-nav { margin-top: 9px; }
  body[data-workspace-view="journey"] .primary-nav .nav-item { min-height: 36px; }
  body[data-workspace-view="journey"] .workspace-top-tools { margin-top: 7px; }
  body[data-workspace-view="journey"] .learner-pill { min-height: 36px; padding: 7px 12px; }
  body[data-workspace-view="journey"] .workspace-account-toggle { min-height: 36px; width: 36px; }
  /* The child tags stay 44px touch targets here (earth-theme.css), so the title starts below them. */
  body[data-workspace-view="journey"] .path-heading { top: 164px; }
  body[data-workspace-view="journey"] .path-heading h1 { font-size: 1.8rem; }
  body[data-workspace-view="journey"] .path-toolbar { top: 204px; }
  body[data-workspace-view="journey"] .path-view-button { font-size: .75rem; padding-inline: 8px; }
  body[data-workspace-view="journey"] .path-filter-toggle { font-size: .75rem; padding-inline: 10px; }
  body[data-workspace-view="journey"] .path-age-markers { top: 260px; }
  body[data-workspace-view="journey"] .path-camera-controls { bottom: 120px; }
  body[data-workspace-view="journey"] .path-topic-browser { bottom: 70px; }
  body[data-workspace-view="journey"] .path-gesture-hint { bottom: 175px; font-size: .75rem; }
  body[data-workspace-view="journey"] .path-tracker-intro { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body[data-workspace-view="journey"] .path-map-footer { bottom: 15px; right: 90px; }
  body[data-workspace-view="journey"] .path-topic-count { font-size: .75rem; }
  body[data-workspace-view="journey"] .path-browser-panel,
  body[data-workspace-view="journey"] .path-selected-detail { top: 257px; bottom: 90px; }
  body[data-workspace-view="journey"] .path-welcome { top: 183px; }
  body[data-workspace-view="journey"] .path-home:has(.path-welcome) .path-toolbar { top: 248px; }
}

@media screen {
  body[data-workspace-view="journey"] .filters-open .path-toolbar { z-index: 50; }
}

@media screen and (min-width: 761px) and (max-width: 900px) and (min-height: 561px) {
  body[data-workspace-view="journey"] .path-gesture-hint { display: none; }
}

/* A neutral cosmic palette and a compact, single-row map toolbar. */
@media screen {
  body[data-workspace-view="journey"] { background: #07080a; }
  body[data-workspace-view="journey"] .path-stage { background: radial-gradient(ellipse at 38% 48%,#2c2e3128,transparent 54%),radial-gradient(ellipse at 72% 53%,#2c385030,transparent 54%),radial-gradient(ellipse at 52% 76%,#22242724,transparent 62%),#07080a; }
  body[data-workspace-view="journey"] .primary-nav .nav-item { background: #16181abf; border-color: #cdcfd11c; color: #babdc1; }
  body[data-workspace-view="journey"] .primary-nav .nav-item.active { background: #e3e6e8; border-color: #e3e6e8; color: #191b1e; box-shadow: 0 4px 25px #c6c8cb10; }
  body[data-workspace-view="journey"] .primary-nav .nav-item:hover { background: #282a2d; color: #eff1f3; border-color: #bdbfc166; }
  body[data-workspace-view="journey"] .primary-nav .nav-item.active:hover { background: #e3e6e8; color: #191b1e; }
  body[data-workspace-view="journey"] .learner-pill { background: #151719dd; border-color: #cdcfd12b; color: #c1c3c6; }
  body[data-workspace-view="journey"] .learner-pill.selected { background: var(--pw-select); border-color: var(--pw-select); color: var(--pw-select-ink); }
  body[data-workspace-view="journey"] .workspace-account-toggle { background: #16181add; border-color: #cdcfd12b; color: #bdbfc2; }
  body[data-workspace-view="journey"] .path-heading h1 { color: #eef1f3; }
  body[data-workspace-view="journey"] .path-toolbar { justify-content: flex-start; align-items: center; flex-wrap: nowrap; gap: 9px; }
  body[data-workspace-view="journey"] .path-view-switch { flex: 0 0 auto; background: #111315c9; border-color: #c7c9cc25; }
  body[data-workspace-view="journey"] .path-view-button { color: #b3b7bb; }
  body[data-workspace-view="journey"] .path-view-button[aria-selected="true"] { background: var(--pw-select); color: var(--pw-select-ink); }
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter { width: 148px; max-width: 148px; flex: 0 0 148px; margin: 0; }
  /* The subject list and search button keep an edge you can see on the sky (4.2:1). */
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter select { min-height: 44px; max-width: 100%; width: 100%; padding: 9px 26px 9px 13px; border: 1px solid #767a80; border-radius: 999px; background: #131517ce; color: #bfc1c4; font-size: .75rem; text-overflow: ellipsis; backdrop-filter: blur(14px); }
  .path-search-toggle { position: relative; width: 44px; min-height: 44px; flex: 0 0 44px; padding: 0; border: 1px solid #767a80; border-radius: 50%; background: #131517ce; color: #bfc1c4; cursor: pointer; backdrop-filter: blur(14px); }
  .path-search-toggle::before { content: ''; position: absolute; left: 13px; top: 11px; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; }
  .path-search-toggle::after { content: ''; position: absolute; left: 26px; top: 25px; width: 7px; height: 1.5px; transform: rotate(46deg); transform-origin: left center; background: currentColor; }
  .path-search-toggle:hover, .path-search-toggle.has-query { color: #e4e7e9; border-color: #bec0c2; }
  body[data-workspace-view="journey"] .path-toolbar > .path-search { position: absolute; top: 56px; left: 0; width: 330px; max-width: min(100%,330px); margin: 0; }
  body[data-workspace-view="journey"] .path-toolbar > .path-search input { min-height: 46px; padding: 11px 16px; width: 100%; border: 1px solid #b9bdc177; border-radius: 999px; background: #191b1ef5; color: #e8eaec; font-size: .875rem; box-shadow: 0 10px 45px #00000077; }
  body[data-workspace-view="journey"] .path-toolbar > .path-search[hidden] { display: none !important; }
  .path-search-tag { position: absolute; left: 0; top: 56px; max-width: min(280px,calc(100% - 48px)); padding: 7px 12px; min-height: 34px; border: 1px solid #b6babe3b; border-radius: 999px; background: #191b1ed9; color: #cacccf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .75rem; cursor: pointer; }
  .path-search-tag[hidden] { display: none; }
  body[data-workspace-view="journey"] .path-filter-toggle { display: flex; align-items: center; justify-content: center; min-height: 44px; width: 44px; flex: 0 0 44px; padding: 0 0 8px; border: 1px solid #cacccf29; border-radius: 50%; background: #131517ce; color: #bfc1c4; font-size: 1.2rem; line-height: 1; cursor: pointer; }
  body[data-workspace-view="journey"] .path-filter-toggle[hidden] { display: none; }
  body[data-workspace-view="journey"] .path-filters { display: none; position: absolute; z-index: 2; left: 0; top: 56px; right: auto; width: 310px; max-width: 100%; padding: 16px; border: 1px solid #bfc1c333; border-radius: 20px; background: #17191bf5; box-shadow: 0 16px 50px #00000088; backdrop-filter: blur(20px); }
  body[data-workspace-view="journey"] .filters-open .path-filters { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  body[data-workspace-view="journey"] .path-area-filter { width: 100%; max-width: none; flex: 1 1 auto; }
  body[data-workspace-view="journey"] .path-filters select { width: 100%; min-height: 44px; background: #202225; color: #cdcfd2; border-color: #cacccf29; }
  .path-scope-switch { display: flex; width: 100%; gap: 5px; }
  .path-scope-button { flex: 1 1 0; min-height: 40px; padding: 9px 12px; border: 1px solid #b7babe29; border-radius: 999px; background: #1a1c1f; color: #bcbec1; font-size: .75rem; cursor: pointer; }
  .path-scope-button[aria-pressed="true"] { background: var(--pw-select, #dfe1e3); color: var(--pw-select-ink, #181a1d); }
  .path-scope-button:disabled { opacity: .4; cursor: default; }
  body[data-workspace-view="journey"] .search-open .path-toolbar { z-index: 60; }
  body[data-workspace-view="journey"] .search-open .path-filters { display: none; }
  body[data-workspace-view="journey"] .path-subject-label { color: #bec0c2; background: #11131526; }
  body[data-workspace-view="journey"] .path-subject-label:hover { color: #e7e9eb; border-color: #c2c4c655; background: #202225cf; }
  body[data-workspace-view="journey"] .path-icon-button { background: #181a1dd6; border-color: #cacccf29; color: #c8cacd; }
  body[data-workspace-view="journey"] .path-icon-button:hover, body[data-workspace-view="journey"] .path-icon-button[aria-pressed="true"] { color: #ebedef; border-color: #c4c6c977; }
  body[data-workspace-view="journey"] .path-topic-browser > summary { background: #181a1de0; color: #cfd1d4; border-color: #c4c6c82b; }
  body[data-workspace-view="journey"] .path-browser-panel, body[data-workspace-view="journey"] .path-selected-detail { background: #121416f5; border-color: #c2c4c638; }
  body[data-workspace-view="journey"] .path-drawer-header { background: #191b1ef0; border-color: #c1c3c620; }
  body[data-workspace-view="journey"] .path-drawer-close { background: #242629; border-color: #c1c3c52d; color: #d6d8db; }
  body[data-workspace-view="journey"] .path-topic-option { background: #1f212477; border-color: #c0c2c41c; color: #e1e4e6; }
  body[data-workspace-view="journey"] .path-topic-option:hover, body[data-workspace-view="journey"] .path-topic-option[aria-current="true"] { background: #282a2d; border-color: #c4c7c977; }
  body[data-workspace-view="journey"] .path-topic-meta { color: #9b9fa3; }
  body[data-workspace-view="journey"] .path-status-dot { border-color: #9ea2a6; background: #0f1113; }
  body[data-workspace-view="journey"] .path-status-dot.confirmed { background: #e6c47c; border-color: #e6c47c; }
  body[data-workspace-view="journey"] .path-status-dot.practising { background: #a0bc84; border-color: #a0bc84; }
  body[data-workspace-view="journey"] .path-status-dot.starting { background: #bcbfc1; border-color: #bcbfc1; }
  body[data-workspace-view="journey"] .path-status-dot.proposed { background: #131518; border-color: #bcbfc1; }
  body[data-workspace-view="journey"] .path-legend-item, body[data-workspace-view="journey"] .path-topic-count { color: #929599; }
  body[data-workspace-view="journey"] .path-gesture-hint, body[data-workspace-view="journey"] .path-tracker-key { color: #83868a; }
  body[data-workspace-view="journey"] .path-tracker-intro > p { color: #c7c9cb; }
  body[data-workspace-view="journey"] .path-tracker-intro > .path-overview-caption { color: #dcdfe1; font-size: .75rem; margin-bottom: 2px; }
  body[data-workspace-view="journey"] .path-tracker-intro .path-age-note { color: #929599; }
  body[data-workspace-view="journey"] .path-age-marker { color: #83868a; }
  body[data-workspace-view="journey"] .path-age-marker.selected-range { color: #c8cacc; }
  body[data-workspace-view="journey"] .path-age-marker::after { background: #b8bcc025; }
  body[data-workspace-view="journey"] .path-canvas-label { background: #181a1de8; color: #e3e5e7; border-color: #c4c6c82b; }
  body[data-workspace-view="journey"] .path-legend-toggle { background: #181a1de8; color: #c8cacd; border-color: #c3c5c72b; }
  body[data-workspace-view="journey"] .legend-open .path-status-legend { background: #181a1df5; border-color: #c3c5c72b; }
}
@media screen and (max-width: 1250px) and (min-width: 761px) {
  body[data-workspace-view="journey"] .path-toolbar { flex-wrap: nowrap; }
  body[data-workspace-view="journey"] .path-filters { flex-basis: auto; }
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter { width: 128px; flex-basis: 128px; }
  body[data-workspace-view="journey"] .path-age-markers { top: 250px; }
}
@media screen and (max-width: 760px) {
  body[data-workspace-view="journey"] .path-toolbar { gap: 7px; }
  body[data-workspace-view="journey"] .path-view-switch { flex: 1 1 auto; min-width: 0; }
  body[data-workspace-view="journey"] .path-view-button { min-width: 0; padding: 8px 7px; font-size: .75rem; }
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter { width: 94px; max-width: 94px; flex-basis: 94px; }
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter select { min-height: 44px; font-size: .75rem; padding-left: 9px; padding-right: 16px; }
  .path-search-toggle { width: 40px; min-height: 44px; flex-basis: 40px; }
  .path-search-toggle::before { left: 10px; }
  .path-search-toggle::after { left: 23px; }
  body[data-workspace-view="journey"] .path-toolbar > .path-search { left: 0; right: 0; width: auto; max-width: none; top: 53px; }
  body[data-workspace-view="journey"] .path-filter-toggle { position: fixed; right: 154px; bottom: max(94px,calc(env(safe-area-inset-bottom) + 84px)); width: 44px; min-height: 44px; }
  body[data-workspace-view="journey"] .path-filters { position: fixed; left: auto; right: 18px; top: auto; bottom: max(144px,calc(env(safe-area-inset-bottom) + 134px)); width: min(310px,calc(100vw - 36px)); max-width: none; }
  body[data-workspace-view="journey"] .path-tracker-intro > .path-overview-caption { font-size: .75rem; }
  body[data-workspace-view="journey"] .path-search-tag { top: 53px; font-size: .75rem; }
}
@media screen and (max-width: 380px) {
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter { width: 80px; max-width: 80px; flex-basis: 80px; }
  body[data-workspace-view="journey"] .path-view-button { font-size: 0; padding-inline: 5px; }
  body[data-workspace-view="journey"] .path-view-button::after { content: attr(data-short-label); font-size: .75rem; }
  body[data-workspace-view="journey"] .path-search-toggle { width: 36px; flex-basis: 36px; }
}
@media screen and (max-width: 760px) and (max-height: 700px) and (orientation: portrait) {
  body[data-workspace-view="journey"] .path-filter-toggle { bottom: 120px; }
  body[data-workspace-view="journey"] .path-filters { bottom: 172px; max-height: calc(100dvh - 350px); overflow-y: auto; }
  body[data-workspace-view="journey"] .path-gesture-hint { display: none; }
}
@media screen and (max-height: 560px) and (min-width: 600px) {
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter { width: 100px; max-width: 100px; flex-basis: 100px; }
  body[data-workspace-view="journey"] .path-filter-toggle { position: fixed; right: 236px; bottom: 20px; }
  body[data-workspace-view="journey"] .path-filters { position: fixed; left: auto; top: auto; right: 18px; bottom: 76px; width: min(310px,calc(100vw - 220px)); }
  body[data-workspace-view="journey"] .path-toolbar > .path-search { top: 52px; }
  body[data-workspace-view="journey"] .path-age-markers { top: 184px; }
  /* Keep guidance accessible without consuming the short landscape fit area. */
  body[data-workspace-view="journey"] .path-tracker-intro,
  body[data-workspace-view="journey"] .path-gesture-hint { position: absolute; width: 0; height: 0; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media screen {
  body[data-workspace-view="journey"] #lesson-workspace-app .path-toolbar select,
  body[data-workspace-view="journey"] #lesson-workspace-app .path-toolbar input { background: #17191bed; color: #ced0d3; border-color: #bec0c338; }
  body[data-workspace-view="journey"] .app-shell :is(button,a,input,textarea,select,summary):focus-visible,
  body[data-workspace-view="journey"] .app-shell [tabindex="-1"]:focus { outline-color: #c9cbce; }
  body[data-workspace-view="journey"] .path-subject-label { background: transparent; backdrop-filter: none; min-height: 36px; font-size: .75rem; }
}
@media screen and (min-width: 761px) and (max-width: 1250px) and (min-height: 561px) {
  body[data-workspace-view="journey"] .path-browser-panel,
  body[data-workspace-view="journey"] .path-selected-detail { top: 300px; }
}
@media screen and (max-width: 760px) and (min-height: 561px) {
  body[data-workspace-view="journey"] .search-open .path-browser-panel { top: 336px; }
}
@media screen and (max-width: 760px) and (max-height: 700px) and (orientation: portrait) {
  body[data-workspace-view="journey"] .search-open .path-browser-panel { top: 298px; }
}

/* ---------------------------------------------------------------------
   One neutral portal. Every signed-in page shares the Path's navy ground,
   white-lavender selection and one periwinkle action colour; lime and teal
   leave the portal. The shared homepage tokens in design-tokens.css are
   untouched. Screen only: lesson and worksheet print rules are unchanged.
   --------------------------------------------------------------------- */
@media screen {
  body[data-workspace-view],
  body[data-workspace-view][data-pathweaver-account-theme="homepage"] {
    /* Earth-tone accents on a neutral night ground. The ground, text and
       lines carry no warm cast; color comes only from the accents, each with
       a job: wheat acts, sage shows where you are and what is growing, oak is
       for people, clay marks what is new or needs care.
       --page, the tone of the current area, is set per view in earth-theme.css
       and not here: this selector would outrank it on the Account page. */
    --pw-bg: #0e0f12; --pw-panel: #16181c; --pw-soft: #1d2025; --pw-raised: #262a30;
    --pw-ink: #edeff1; --pw-muted: #a5a9ae; --pw-faint: #8a8f95;
    --pw-line: rgba(222, 228, 238, .13); --pw-line-soft: rgba(222, 228, 238, .07); --pw-field: #70757b;
    --pw-wheat: #e6c47c; --pw-oak: #c9a074; --pw-sage: #a0bc84; --pw-clay: #d58d69;
    --pw-river: #70baae; --pw-dusk: #7faccb; --pw-heather: #c293b5; --pw-lichen: #a49d58; --pw-rose: #d6a59c;
    --pw-star: #c3cfe8; --pw-on-tone: #15171a;
    --pw-accent: var(--pw-wheat); --pw-button: var(--pw-wheat); --pw-button-hover: #f1d594; --pw-button-ink: var(--pw-on-tone);
    --pw-teal: var(--pw-sage); --pw-select: var(--page); --pw-select-ink: var(--pw-on-tone);
    --pw-gold: var(--pw-wheat); --pw-sky: var(--pw-sage); --pw-lilac: var(--pw-clay); --pw-danger: #f18384;
    --pw-ochre: var(--pw-wheat); --pw-ease: cubic-bezier(.22, .8, .24, 1);
    --pw-card: linear-gradient(180deg, rgba(232, 238, 248, .035), rgba(232, 238, 248, .01) 60%), #14161a;
    --pw-radius: 16px; --pw-control-radius: 999px;
    --ink: var(--pw-ink); --muted: var(--pw-muted); --white: var(--pw-ink);
    --cream: var(--pw-bg); --cream-deep: var(--pw-soft); --paper: var(--pw-panel);
    --navy-950: var(--pw-bg); --navy-900: var(--pw-panel); --navy-800: var(--pw-soft); --navy-700: var(--pw-raised);
    --line: var(--pw-line); --gold: var(--pw-accent); --cyan: var(--pw-teal); --violet: var(--pw-lilac);
    --green-700: var(--pw-teal); --green-600: #8fa57a; --green-100: rgba(160, 188, 132, .12);
    --copper-700: var(--pw-accent); --copper-500: var(--pw-oak); --copper-100: rgba(201, 160, 116, .12);
    --error: var(--pw-danger); --error-bg: rgba(241, 131, 132, .1);
    background: var(--pw-bg); color: var(--pw-ink); font-family: var(--pw-font);
  }
  body[data-workspace-view]::before {
    background-image:
      radial-gradient(circle at 15% 20%, rgba(229, 232, 234, .3) 0 1px, transparent 1.6px),
      radial-gradient(circle at 73% 12%, rgba(204, 206, 208, .28) 0 1px, transparent 1.5px),
      radial-gradient(circle at 82% 72%, rgba(188, 191, 193, .24) 0 1px, transparent 1.6px),
      radial-gradient(circle at 37% 81%, rgba(191, 193, 195, .2) 0 1px, transparent 1.5px);
  }
  body[data-workspace-view]::after {
    background-image: radial-gradient(circle at 78% 4%, rgba(60, 72, 98, .2), transparent 32rem), radial-gradient(circle at 8% 46%, rgba(48, 58, 80, .14), transparent 34rem);
  }
  body[data-workspace-view] .account-view::before { content: none; }
  body[data-workspace-view] .topbar .brand-woven-p { filter: drop-shadow(0 0 14px rgba(204, 206, 208, .16)); }

  /* Shell: the v3 Path treatment on every page. */
  body[data-workspace-view] .primary-nav .nav-item { background: #16181abf; border-color: #cdcfd11c; color: #babdc1; }
  body[data-workspace-view] .primary-nav .nav-item:hover { background: #282a2d; color: #eff1f3; border-color: #bdbfc166; }
  body[data-workspace-view] .primary-nav .nav-item.active,
  body[data-workspace-view] .primary-nav .nav-item.active:hover { background: var(--pw-select); border-color: var(--pw-select); color: var(--pw-select-ink); box-shadow: 0 4px 25px #c6c8cb10; }
  body[data-workspace-view] .learner-pill { background: #151719dd; border-color: #cdcfd12b; color: #c1c3c6; }
  body[data-workspace-view] .learner-pill:hover { background: #232528; color: #eff1f3; border-color: #cdcfd166; }
  body[data-workspace-view] .learner-pill.selected { background: var(--pw-select); border-color: var(--pw-select); color: var(--pw-select-ink); }
  body[data-workspace-view] .add-learner-pill { background: #0f1113e6; color: #bdbfc2; }
  body[data-workspace-view] .workspace-account-toggle { background: #16181add; border-color: #cdcfd12b; color: #bdbfc2; }
  body[data-workspace-view] .workspace-account-menu[open] .workspace-account-toggle { color: #eff1f3; border-color: #cdcfd177; }
  body[data-workspace-view] .workspace-account-menu.is-current .workspace-account-toggle { background: var(--pw-select); border-color: var(--pw-select); color: var(--pw-select-ink); }
  body[data-workspace-view] .workspace-account-panel { background: #141618; border-color: #343639; }
  body[data-workspace-view] .workspace-menu-item:hover,
  body[data-workspace-view] .workspace-menu-item[aria-current] { background: #222427; border-color: #ccced033; }
  body[data-workspace-view] .workspace-account-controls { border-color: #343639; }
  body[data-workspace-view] .workspace-skip-link { background: var(--pw-select); color: var(--pw-select-ink); }
  body[data-workspace-view] .vault-sync-status { color: var(--pw-faint); }

  /* One content column, centred in the space beside the navigation. */
  body[data-workspace-view]:not([data-workspace-view="journey"]) #workspace { max-width: 880px; margin-inline: auto; }
  body[data-workspace-view]:not([data-workspace-view="journey"]) .view-stack { gap: 28px; }

  /* Type: the serif for page titles and topic or learner names only. */
  body[data-workspace-view]:not([data-workspace-view="journey"]) #workspace h1 { margin: 0; font: 400 clamp(2.05rem, 2.6vw, 2.6rem)/1.1 var(--pw-serif); letter-spacing: -.02em; color: var(--pw-ink); }
  body[data-workspace-view]:not([data-workspace-view="journey"]) #workspace h2 { margin: 0; font: 400 1.2rem/1.35 var(--pw-font); letter-spacing: -.005em; color: var(--pw-ink); }
  body[data-workspace-view] #workspace .section-heading { margin: 0; font: 400 1.2rem/1.35 var(--pw-font); color: var(--pw-ink); }
  body[data-workspace-view]:not([data-workspace-view="journey"]) #workspace :is(.topic-picker-card, .saved-card, .record-row, .learner-card, .map-activity-topic) :is(h2, h3) { font: 400 1.2rem/1.3 var(--pw-serif); letter-spacing: 0; color: var(--pw-ink); }
  body[data-workspace-view] #workspace :is(p, li, label, .field-help, .muted-copy) { font-weight: 400; }
  body[data-workspace-view] #workspace :is(.field-help, .muted-copy) { color: var(--pw-muted); font-size: .875rem; line-height: 1.55; }
  body[data-workspace-view] #workspace :is(.eyebrow, .journey-hero-eyebrow) { color: var(--pw-faint); font-size: .75rem; letter-spacing: .1em; }
  body[data-workspace-view] .field-label, body[data-workspace-view] #workspace legend { color: var(--pw-muted); font-size: .875rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
  body[data-workspace-view] #workspace a:not(.button) { color: var(--pw-teal); }
  body[data-workspace-view] #workspace :is(h1, h2, h3)[tabindex="-1"]:focus { outline: none; }

  /* Page header: title equals the nav label, one line beneath, one action. */
  .page-header { display: grid; gap: 10px; margin: 0; }
  .page-header .page-lede { margin: 0; max-width: 62ch; color: var(--pw-muted); font-size: 1rem; line-height: 1.55; }
  .page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
  .page-tabs { display: inline-flex; align-self: flex-start; gap: 3px; width: fit-content; padding: 4px; border: 1px solid var(--pw-line); border-radius: 999px; background: #101214d9; }
  .page-tab { min-height: 40px; padding: 8px 20px; border: 0; border-radius: 999px; background: transparent; color: var(--pw-muted); font: 400 .875rem/1.2 var(--pw-font); cursor: pointer; }
  .page-tab:hover { color: var(--pw-ink); background: #222427; }
  .page-tab.active, .page-tab.active:hover { background: var(--pw-select); color: var(--pw-select-ink); }

  /* Buttons: pills in four kinds. Disabled buttons look disabled. */
  body[data-workspace-view] .button { min-height: 44px; padding: .62rem 1.2rem; border: 1px solid var(--pw-line); border-radius: 999px; background: var(--pw-soft); color: var(--pw-ink); font: 400 .875rem/1.3 var(--pw-font); letter-spacing: 0; box-shadow: none; transform: none; }
  body[data-workspace-view] .button:hover { background: var(--pw-raised); border-color: #55585c; transform: none; }
  body[data-workspace-view] .button.primary { background: var(--pw-button); border-color: var(--pw-button); color: var(--pw-button-ink); }
  body[data-workspace-view] .button.primary:hover { background: var(--pw-button-hover); border-color: var(--pw-button-hover); }
  body[data-workspace-view] .button.ghost { background: transparent; border-color: var(--pw-line-soft); color: var(--pw-ink); }
  body[data-workspace-view] .button.ghost:hover { background: var(--pw-soft); border-color: var(--pw-line); }
  body[data-workspace-view] .button.danger, body[data-workspace-view] .button.ghost.danger { background: transparent; border-color: #e9c0b84d; color: var(--pw-danger); }
  body[data-workspace-view] .button.danger:hover { background: #e9c0b812; border-color: #e9c0b888; }
  body[data-workspace-view] .button:disabled,
  body[data-workspace-view] .button[aria-disabled="true"],
  body[data-workspace-view] .button:disabled:hover { background: #17191b; border-color: #2b2d30; color: #787b7f; cursor: not-allowed; opacity: 1; }
  body[data-workspace-view] .compact-button { min-height: 36px; padding: .4rem .95rem; font-size: .875rem; }
  body[data-workspace-view] .large-button { min-height: 48px; padding-inline: 1.5rem; }
  body[data-workspace-view] .inline-actions { gap: 10px; }

  /* Fields. */
  body[data-workspace-view] .app-shell :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), textarea, select) { min-height: 46px; border: 1px solid var(--pw-field); border-radius: 10px; background: #17191c; color: var(--pw-ink); font: 400 1rem/1.4 var(--pw-font); }
  body[data-workspace-view] .app-shell :is(input, textarea, select):focus { border-color: #bb997d; box-shadow: 0 0 0 3px #bb997d26; }
  body[data-workspace-view] .app-shell :is(input, textarea)::placeholder { color: #878a8e; }
  body[data-workspace-view] .app-shell :is(button, a, input, textarea, select, summary):focus-visible { outline: 2px solid #d0d2d4; outline-offset: 3px; }
  body[data-workspace-view] input[type=checkbox], body[data-workspace-view] input[type=radio] { accent-color: var(--pw-button); }
  body[data-workspace-view] .choice-chip { border-color: var(--pw-line); border-radius: 999px; background: var(--pw-soft); color: var(--pw-ink); }
  body[data-workspace-view] .choice-chip:has(input:checked) { border-color: var(--pw-button); background: #25272a; }

  /* Surfaces: one card. Page-level wrappers are not cards. */
  body[data-workspace-view] .app-shell :is(.privacy-card, .plan-card, .empty-state, .lesson-preview, .builder-form, .draft-editor, .photo-review-panel, .access-code-panel, .journey-learner-panel, .learner-create-panel, .clone-panel, .intake-wizard, .schoolwork-request, .schoolwork-review, .library-controls, .library-documents, .preview-panel, .student-print-panel, .learning-progress-section, .map-activity-topic, .map-activity-controls) { border: 1px solid var(--pw-line-soft); border-radius: 16px; background: var(--pw-panel); box-shadow: none; }
  body[data-workspace-view] .app-shell :is(.all-topic-picker, .map-activity-builder, .learner-list-section, .parent-progress-summary, .account-view > section.learner-list-section) { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  body[data-workspace-view] .app-shell :is(.privacy-card, .plan-card, .learner-create-panel, .schoolwork-request, .library-controls, .library-documents, .map-activity-topic, .learning-progress-section) { padding: 24px; }
  body[data-workspace-view] .app-shell .account-view > section { border-color: var(--pw-line-soft); background: var(--pw-panel); box-shadow: none; }
  body[data-workspace-view] .app-shell :is(.journey-stat, .learner-card, .saved-card, .review-record-item, .topic-picker-card, .schoolwork-proposal, .parent-action-card, .library-document, .vault-selection, .vault-sharing-member, .vault-invite-notice) { border: 1px solid var(--pw-line-soft); border-radius: 16px; background: var(--pw-panel); box-shadow: none; }
  body[data-workspace-view] .app-shell :is(.learner-card:hover, .topic-picker-card:hover, .saved-card:hover) { border-color: #47494c; background: #181a1d; box-shadow: none; }
  body[data-workspace-view] .empty-state { display: grid; justify-items: start; gap: 6px; padding: 24px; text-align: left; }
  body[data-workspace-view] .empty-state :is(h2, h3) { margin: 0; font: 400 1rem/1.35 var(--pw-font) !important; color: var(--pw-ink); }
  body[data-workspace-view] .empty-state p { margin: 0 0 6px; color: var(--pw-muted); }
  body[data-workspace-view] details > summary { cursor: pointer; }
  body[data-workspace-view] :is(.backups-disclosure, .parent-map-details, .full-editor-disclosure, .review-record-details) { border: 1px solid var(--pw-line-soft); border-radius: 14px; background: #101214; padding: 0 18px; }
  body[data-workspace-view] :is(.backups-disclosure, .parent-map-details, .full-editor-disclosure, .review-record-details) > summary { padding: 14px 0; color: var(--pw-ink); font-size: .875rem; }
  body[data-workspace-view] :is(.backups-disclosure, .parent-map-details, .full-editor-disclosure, .review-record-details)[open] { padding-bottom: 18px; }
  .inline-disclosure > summary { width: fit-content; color: var(--pw-teal); font-size: .875rem; }
  .inline-disclosure[open] > summary { margin-bottom: 6px; }
  body[data-workspace-view] .error-copy { color: var(--pw-danger); }
  body[data-workspace-view] .workspace-status:not(:empty) { background: #1c1e21f5; border: 1px solid #46484b; color: var(--pw-ink); }

  /* Status marks match the Path key: shape as well as colour. */
  .status-mark { display: inline-block; box-sizing: border-box; width: 12px; height: 12px; flex: 0 0 12px; border-radius: 50%; }
  .status-mark.status-comfortable { background: var(--pw-gold); box-shadow: 0 0 10px #e6c47c59; }
  .status-mark.status-practicing { border: 1.5px solid var(--pw-sky); background: linear-gradient(90deg, var(--pw-sky) 50%, transparent 50%); }
  .status-mark.status-introduced { border: 1.5px solid var(--pw-lilac); background: radial-gradient(circle, var(--pw-lilac) 0 2px, transparent 2.6px); }

  /* Learning Record. */
  .record-section { display: grid; gap: 12px; }
  .record-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
  .record-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .record-stat { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px 6px 11px; border: 1px solid var(--pw-line-soft); border-radius: 999px; background: var(--pw-panel); color: var(--pw-muted); font-size: .875rem; }
  .record-stat strong { color: var(--pw-ink); font-weight: 400; font-variant-numeric: tabular-nums; }
  body[data-workspace-view] #workspace .record-note { margin: -2px 0 0; font-size: .75rem; color: var(--pw-faint); }
  .record-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--pw-line-soft); border-radius: 16px; background: var(--pw-panel); overflow: hidden; }
  body[data-workspace-view] .record-list .record-row.parent-note-card { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: start; gap: 4px 16px; margin: 0; padding: 18px 20px; border: 0; border-top: 1px solid var(--pw-line-soft); border-radius: 0; background: transparent; }
  body[data-workspace-view] .record-list .record-row.parent-note-card:first-child { border-top: 0; }
  .record-row > .status-mark { margin-top: 7px; }
  .record-body { min-width: 0; }
  body[data-workspace-view] #workspace .record-body h3 { margin: 0; }
  .record-meta { margin: 3px 0 0; color: var(--pw-faint); font-size: .75rem; }
  .record-text { margin: 6px 0 0; color: var(--pw-muted); font-size: .875rem; line-height: 1.55; white-space: pre-wrap; }
  .storage-note { margin: 0; }

  /* Lesson Plan. */
  body[data-workspace-view] .all-topic-picker { display: grid; gap: 24px; }
  .next-topics { display: grid; gap: 12px; }
  .next-topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  body[data-workspace-view] .app-shell .next-topic-card { border-color: #e6c47c38; background: linear-gradient(180deg, #e6c47c0d, transparent 60%), var(--pw-panel); }
  .topic-card-reason { margin: 0; color: var(--pw-muted); font-size: .875rem; line-height: 1.5; }
  body[data-workspace-view] .topic-picker-filters { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 10px; }
  body[data-workspace-view] .topic-picker-filters .editor-field { margin: 0; }
  body[data-workspace-view] .topic-picker-results { display: grid; gap: 12px; }
  body[data-workspace-view] .topic-count { margin: 0; color: var(--pw-faint); font-size: .875rem; }
  body[data-workspace-view] .all-topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
  body[data-workspace-view] .topic-picker-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; padding: 18px; }
  .topic-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .topic-card-subject { color: var(--pw-faint); font-size: .75rem; letter-spacing: .02em; }
  .topic-age-chip { padding: 2px 9px; border: 1px solid var(--pw-line); border-radius: 999px; color: var(--pw-muted); font-size: .75rem; white-space: nowrap; }
  body[data-workspace-view] #workspace .topic-picker-card :is(h2, h3) { margin: 0; }
  .topic-card-description { display: -webkit-box; margin: 0; overflow: hidden; color: var(--pw-muted); font-size: .875rem; line-height: 1.5; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
  body[data-workspace-view] .topic-picker-card .button { margin-top: auto; }
  body[data-workspace-view] .topic-picker-card .topic-card-description + .button { margin-top: 6px; }
  .topic-pager { align-items: center; justify-content: center; }
  .topic-pager .field-help { min-width: 7rem; text-align: center; }
  body[data-workspace-view] .map-activity-builder { display: grid; gap: 20px; }
  body[data-workspace-view] .map-activity-topic { display: grid; gap: 8px; }
  body[data-workspace-view] .map-activity-topic p { margin: 0; }
  body[data-workspace-view] .map-activity-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; padding: 24px; }
  body[data-workspace-view] .map-activity-controls .option-fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
  body[data-workspace-view] .map-activity-controls .option-fieldset legend { width: 100%; margin-bottom: 6px; }
  body[data-workspace-view] .source-row { margin: 0; font-size: .875rem; color: var(--pw-faint); }
  body[data-workspace-view] .consent-row { align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--pw-line-soft); border-radius: 12px; background: #101214; }

  /* Saved activities. */
  body[data-workspace-view] .saved-list { display: grid; gap: 12px; }
  body[data-workspace-view] .saved-card { padding: 20px; gap: 16px; }
  body[data-workspace-view] .saved-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  body[data-workspace-view] .work-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; }
  body[data-workspace-view] .work-filter-count { color: var(--pw-faint); font-size: .875rem; }
  .saved-more { margin-top: -8px; }

  /* Upload: three steps. */
  body[data-workspace-view] .library-controls { display: grid; gap: 14px; }
  body[data-workspace-view] .upload-drop { display: grid; justify-items: center; gap: 10px; margin: 0; padding: 30px 20px; border: 1.5px dashed #47494c; border-radius: 14px; background: #101214; text-align: center; }
  body[data-workspace-view] .upload-drop:hover, body[data-workspace-view] .upload-drop:focus-within { border-color: #ab896d; background: #17191b; }
  body[data-workspace-view] .upload-drop .field-label { color: var(--pw-ink); font-size: 1rem; }
  body[data-workspace-view] .upload-drop input[type=file] { max-width: 100%; color: var(--pw-muted); font: 400 .86rem var(--pw-font); }
  body[data-workspace-view] .upload-drop input[type=file]::file-selector-button { margin-right: 12px; min-height: 40px; padding: 8px 18px; border: 0; border-radius: 999px; background: var(--pw-button); color: var(--pw-button-ink); font: 400 .9rem var(--pw-font); cursor: pointer; }
  body[data-workspace-view] .library-documents, body[data-workspace-view] .schoolwork-request { display: grid; gap: 12px; }
  body[data-workspace-view] .library-document { padding: 0 18px; }
  body[data-workspace-view] .library-document > details > summary { padding: 14px 0; color: var(--pw-ink); }
  body[data-workspace-view] .journey-empty-note { margin: 0; color: var(--pw-muted); font-size: .875rem; }
  body[data-workspace-view] .toggle-row { display: flex; align-items: center; gap: 10px; color: var(--pw-ink); }

  /* Learners. */
  body[data-workspace-view] .learner-list { display: grid; gap: 12px; }
  body[data-workspace-view] .learner-card { display: grid; gap: 10px; padding: 20px 22px; }
  body[data-workspace-view] .learner-card-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
  body[data-workspace-view] #workspace .learner-card-title h2 { margin: 0; font-size: 1.5rem; }
  body[data-workspace-view] .learner-card-age { margin: 0; color: var(--pw-muted); font-size: .875rem; }
  body[data-workspace-view] .learner-active-badge { align-self: center; padding: 3px 11px; border: 0; border-radius: 999px; background: var(--pw-select); color: var(--pw-select-ink); font-size: .75rem; letter-spacing: 0; text-transform: none; }
  body[data-workspace-view] .learner-card-counts { margin: 0; color: var(--pw-faint); font-size: .875rem; }
  body[data-workspace-view] .learner-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 0; }
  .learner-more { position: relative; }
  .learner-more > summary { list-style: none; }
  .learner-more > summary::-webkit-details-marker { display: none; }
  .learner-more-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; display: grid; gap: 6px; min-width: 190px; padding: 8px; border: 1px solid var(--pw-line); border-radius: 14px; background: #181a1dfa; box-shadow: 0 16px 40px #00000099; }
  .learner-more-panel .button { justify-content: flex-start; width: 100%; }
  body[data-workspace-view] .archived-learners-section { display: grid; gap: 10px; }

  /* Account. */
  body[data-workspace-view] .privacy-callout { display: grid; gap: 8px; padding: 18px 22px; border: 1px solid var(--pw-line-soft); border-radius: 14px; background: #101214; }
  body[data-workspace-view] .privacy-callout strong { color: var(--pw-ink); font-weight: 400; font-size: 1rem; }
  .privacy-points { display: grid; gap: 4px; margin: 0; padding-left: 1.1rem; color: var(--pw-muted); font-size: .875rem; line-height: 1.55; }
  body[data-workspace-view] .plan-card, body[data-workspace-view] .data-panel, body[data-workspace-view] .remove-data-card { display: grid; gap: 12px; }
  body[data-workspace-view] .plan-card p, body[data-workspace-view] .data-panel p, body[data-workspace-view] .remove-data-card p { margin: 0; }
  body[data-workspace-view] .account-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 20px; }
  body[data-workspace-view] .account-row > .button { grid-row: 1 / span 2; grid-column: 2; }
  .data-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 14px 0; border-top: 1px solid var(--pw-line-soft); }
  .data-row-copy { display: grid; gap: 2px; min-width: 0; }
  body[data-workspace-view] .data-row .toggle-row { font-size: 1rem; }
  body[data-workspace-view] .data-state { padding: 3px 11px; border: 1px solid var(--pw-line); border-radius: 999px; color: var(--pw-muted); font-size: .75rem; white-space: nowrap; }
  body[data-workspace-view] .remove-data-card .inline-actions { gap: 8px; }
  .policy-links { display: flex; gap: 20px; padding: 4px 2px; font-size: .875rem; }

  /* Guide: neutral to match. */
}
@media screen and (max-width: 760px) {
  body[data-workspace-view]:not([data-workspace-view="journey"]) #workspace h1 { font-size: 1.95rem; }
  body[data-workspace-view]:not([data-workspace-view="journey"]) .view-stack { gap: 22px; }
  .page-tabs { width: 100%; }
  .page-tab { flex: 1 1 0; padding-inline: 10px; }
  body[data-workspace-view] .topic-picker-filters { grid-template-columns: 1fr; }
  body[data-workspace-view] .map-activity-controls { grid-template-columns: 1fr; padding: 18px; }
  body[data-workspace-view] .app-shell :is(.privacy-card, .plan-card, .learner-create-panel, .schoolwork-request, .library-controls, .library-documents, .map-activity-topic, .learning-progress-section) { padding: 18px; }
  body[data-workspace-view] .record-list .record-row.parent-note-card { grid-template-columns: 12px minmax(0, 1fr); padding: 16px; }
  body[data-workspace-view] .record-list .record-row > .button { grid-column: 2; justify-self: start; }
  body[data-workspace-view] .account-row { grid-template-columns: 1fr; }
  body[data-workspace-view] .account-row > .button { grid-row: auto; grid-column: auto; justify-self: start; }
  body[data-workspace-view] .compact-button { min-height: 40px; }
}
@media screen {
  body[data-workspace-view] .upload-drop input[type=file] { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  body[data-workspace-view] .path-map-loading { border-color: #ccced01c; background: radial-gradient(ellipse, #32343740, transparent 60%); }
  body[data-workspace-view] .path-map-loading p { color: var(--pw-muted); }
  body[data-workspace-view] .path-loading-orbit { border-color: #bcbfc166; box-shadow: 0 0 0 15px #bcbfc108, 0 0 40px #caa68714; }
  body[data-workspace-view] .path-loading-orbit::after { background: #e3e6e8; box-shadow: 0 0 24px #ccced066; }
  /* The mark's ribbon follows the portal's neutral palette (homepage unchanged). */
  body[data-workspace-view] .topbar .brand-woven-p { filter: hue-rotate(62deg) saturate(.55) drop-shadow(0 0 14px rgba(204, 206, 208, .16)); }
}
@media screen and (max-width: 760px) {
  /* On phones the guide opens from the "···" menu on content pages, so the
     floating robot never sits over a card. The Path keeps its launcher. */
  body[data-workspace-view]:not([data-workspace-view="journey"]) .parent-assistant-launcher { display: none; }
}
@media screen {
  #lesson-workspace-app .upload-drop input[type=file] { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
}
@media screen {
  body[data-workspace-view] #workspace legend { font: 400 .875rem/1.4 var(--pw-font); letter-spacing: 0; color: var(--pw-muted); }
}

/* ---------------------------------------------------------------------
   Living Path: the flight between Constellation and Progress tracker.
   One decorative canvas carries the stars; the live views fade under it.
   --------------------------------------------------------------------- */
@media screen {
  .path-flight-canvas { position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%; pointer-events: none; opacity: 1; transition: opacity .24s ease; }
  .path-flight-canvas.is-fading { opacity: 0; }
  /* Hidden means hidden: the display rule above would otherwise keep the last
     flight frame on screen over the live view. */
  .path-flight-canvas[hidden] { display: none; }
  .path-explorer.is-flying :is(.path-constellation-canvas, .path-tracker-canvas) { opacity: 0; pointer-events: none; }
  .path-explorer :is(.path-subject-labels, .path-age-markers, .path-tracker-intro, .path-tracker-key, .path-camera-controls, .path-gesture-hint) { transition: opacity .35s ease; }
  .path-explorer.is-flying :is(.path-subject-labels, .path-age-markers, .path-tracker-intro, .path-tracker-key, .path-camera-controls, .path-gesture-hint, .path-canvas-label, .path-scene-empty) { opacity: 0; pointer-events: none; transition: opacity .16s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .path-flight-canvas { display: none; }
}
@media screen {
  /* Key marks: the same shapes as the stars and the Learning Record. */
  body[data-workspace-view] .path-status-dot { box-sizing: border-box; border-radius: 50%; border: 1.5px solid #9ea2a6; background: transparent; }
  body[data-workspace-view] .path-status-dot.confirmed { border-color: var(--pw-wheat); background: var(--pw-wheat); box-shadow: 0 0 8px rgba(230, 196, 124, .33); }
  body[data-workspace-view] .path-status-dot.practising { border-color: var(--pw-sage); background: linear-gradient(90deg, var(--pw-sage) 50%, transparent 50%); }
  body[data-workspace-view] .path-status-dot.starting { border-color: var(--pw-clay); background: radial-gradient(circle, var(--pw-clay) 0 1.6px, transparent 2.1px); }
  body[data-workspace-view] .path-status-dot.proposed { border: 1.5px dashed var(--pw-clay); background: transparent; }
  body[data-workspace-view] .path-status-dot.unobserved { border: 0; background: radial-gradient(circle, #9ea2a6 0 1.6px, transparent 2px); }
  body[data-workspace-view="journey"] .path-status-dot { width: 9px; height: 9px; flex-basis: 9px; }
}

/* ---------------------------------------------------------------------
   Portal polish, 12 November 2026: fixes from the live checkout.
   --------------------------------------------------------------------- */
@media screen {
  /* Path toolbar: the subject filter uses the toolbar's own type size and
     pill shape, so "All subjects" fits instead of truncating. */
  body[data-workspace-view="journey"] #lesson-workspace-app .path-toolbar > .path-subject-filter select { font-size: .75rem; border-radius: 999px; }
  /* Account menu: the plan and the remaining actions read as one line. */
  .workspace-account-controls .account-summary { justify-content: flex-start; }
  .workspace-account-controls .account-usage { width: auto; flex: 1 1 60%; }
  .workspace-account-controls .account-usage::before { content: "· "; }
  .workspace-account-controls .account-summary .button { flex: 1 1 auto; }
  /* Account page: the plan's facts are rows split by a hairline, name on the left and value
     on the right, not boxes inside the plan card. Backups & import is a row too. */
  body[data-workspace-view] #workspace .plan-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  body[data-workspace-view] #workspace .plan-grid p { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; min-height: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--pw-line-soft); border-radius: 0; background: none; box-shadow: none; color: var(--pw-ink); font-size: .875rem; }
  body[data-workspace-view] #workspace .plan-grid p:last-child { border-bottom: 1px solid var(--pw-line-soft); }
  body[data-workspace-view] #workspace .plan-grid p > strong { margin: 0; color: var(--pw-muted); font-size: .875rem; }
  body[data-workspace-view] #workspace .backups-disclosure { padding: 0; border: 0; border-top: 1px solid var(--pw-line-soft); border-radius: 0; background: none; box-shadow: none; }
  body[data-workspace-view] #workspace .backups-disclosure[open] { padding-bottom: 6px; }
  /* The two Clear buttons are far enough apart that a thumb can't take the wrong one. */
  body[data-workspace-view] #workspace .remove-data-card .journey-data-actions { gap: 20px 16px; }
  /* Account page: the identifier takes a full row; only the value is monospace. */
  body[data-workspace-view] .plan-grid .account-identifier { grid-column: 1 / -1; min-height: 0; font-family: inherit; }
  body[data-workspace-view] #workspace .plan-grid .account-identifier { flex-direction: column; align-items: flex-start; }
  body[data-workspace-view] .account-identifier-value { display: block; font: .875rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; color: var(--pw-ink); user-select: all; }
  /* Account page: usage meters. One row per limit: name and figure on a line, the bar under them.
     The fill takes the page tone, wheat when almost full and the alert tone when full; the track is
     the same tone, dimmed. The words beside each bar say the same thing, so color is never alone. */
  body[data-workspace-view] .usage-group { display: grid; gap: 10px; }
  body[data-workspace-view] .usage-group + .usage-group { margin-top: 8px; }
  body[data-workspace-view] .app-shell .plan-card .usage-group-title { margin: 0; font-family: inherit; font-size: .75rem; font-weight: 400; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; color: var(--page, var(--pw-muted)); }
  body[data-workspace-view] .usage-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px 28px; margin: 0; padding: 0; list-style: none; }
  body[data-workspace-view] :is(.usage-meter, .usage-bar) { --meter: var(--page, var(--pw-dusk)); --meter-rgb: var(--page-rgb, 127, 172, 203); }
  body[data-workspace-view] .usage-meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
  body[data-workspace-view] :is(.usage-meter, .usage-bar)[data-state="near"] { --meter: var(--pw-wheat); --meter-rgb: 230, 196, 124; }
  body[data-workspace-view] :is(.usage-meter, .usage-bar)[data-state="full"] { --meter: var(--pw-danger); --meter-rgb: 241, 131, 132; }
  body[data-workspace-view] .usage-meter-label { font-size: .875rem; font-weight: 400; color: var(--pw-ink); }
  body[data-workspace-view] .usage-meter-figure { font-size: .875rem; font-variant-numeric: tabular-nums; color: var(--pw-muted); white-space: nowrap; }
  body[data-workspace-view] .usage-meter-track { grid-column: 1 / -1; display: block; height: 8px; border-radius: 999px; background: rgba(var(--meter-rgb), .18); overflow: hidden; }
  body[data-workspace-view] .usage-meter-fill { display: block; height: 100%; min-width: 0; border-radius: 999px; background: var(--meter); }
  body[data-workspace-view] .usage-meter-note { grid-column: 1 / -1; font-size: .75rem; line-height: 1.35; color: var(--pw-faint); }
  /* A bar on its own, under words that already state the figure: the account menu's allowance line. */
  body[data-workspace-view] .workspace-account-controls .usage-bar { flex: 0 0 100%; height: 4px; }
  /* In the Library the meters sit inside a panel of controls, without a group title. */
  body[data-workspace-view] :is(.library-controls, .schoolwork-request) .usage-group { margin: 2px 0 6px; }
  /* Admin console: a thin bar under a figure in the accounts table and in an account's details. */
  body[data-workspace-view] :is(.admin-table td, .admin-facts dd) > .usage-bar { height: 4px; margin-top: 5px; min-width: 3.5rem; max-width: 12rem; }
  /* Worksheet photo review: the allowance sits under the sentence that names the cost. */
  body[data-workspace-view] .photo-review-panel .usage-group { max-width: 26rem; }
  @media (forced-colors: active) {
    body[data-workspace-view] .usage-meter-track { border: 1px solid CanvasText; background: Canvas; }
    body[data-workspace-view] .usage-meter-fill { background: Highlight; }
  }
  body[data-workspace-view] .plan-offer { color: var(--pw-ink); }
  /* Learners: the Current badge sits on the name's line. */
  body[data-workspace-view] .learner-card-title { align-items: center; }
  /* Plan a lesson: both selects keep one height, with or without help text. */
  body[data-workspace-view] .map-activity-controls .editor-field { align-content: start; align-self: start; }
  /* A primary action in a row of buttons lines up with its neighbours. */
  body[data-workspace-view] .inline-actions > .large-button { margin-top: 0; }
  /* Upload: the file picker sits centred under its prompt. */
  #lesson-workspace-app .upload-drop input[type=file] { width: fit-content; max-width: 100%; margin-inline: auto; }
  /* Fewer lines under the Progress view: the age note stays for screen readers. */
  body[data-workspace-view="journey"] .path-tracker-intro .path-age-note { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* Sharing steps are instructions, not a card title. */
  body[data-workspace-view] .vault-sharing-panel h3 { font-family: var(--pw-font); font-weight: 400; font-size: 1rem; letter-spacing: 0; }
}
@media screen and (min-width: 761px) {
  /* Content pages scroll under a solid header band, so the learner pills and
     menu never sit on top of a card. The Path keeps its open sky. */
  body[data-workspace-view]:not([data-workspace-view="journey"]) .workspace-top-tools { z-index: 35; }
  body[data-workspace-view]:not([data-workspace-view="journey"]) .workspace-top-tools::before { content: ""; position: absolute; z-index: -1; top: -30px; bottom: -24px; left: -24px; right: -60px; background: linear-gradient(to bottom, var(--pw-bg) 0, var(--pw-bg) 72%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000000 24px); mask-image: linear-gradient(to right, transparent, #000000 24px); pointer-events: none; }
}
/* Mid widths: content pages keep a right gutter for the Guide launcher. */
@media screen and (min-width: 1101px) and (max-width: 1340px) {
  body[data-workspace-view]:not([data-workspace-view="journey"]) .main-content { width: calc(100% - 384px); margin-right: 104px; }
}
@media screen and (min-width: 761px) and (max-width: 1100px) {
  body[data-workspace-view]:not([data-workspace-view="journey"]) .main-content { width: calc(100% - 319px); margin-right: 104px; }
}
@media screen and (max-width: 1250px) and (min-width: 761px) {
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter { width: 140px; flex-basis: 140px; }
}
@media screen and (max-width: 760px) {
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter { width: 112px; max-width: 112px; flex-basis: 112px; }
  body[data-workspace-view="journey"] #lesson-workspace-app .path-toolbar > .path-subject-filter select { font-size: .75rem; padding-left: 11px; padding-right: 14px; }
  /* The filter button sits just left of the four 44px Progress camera buttons: 18 + 4 x 44 + 3 x 5 + 6. */
  body[data-workspace-view="journey"] .path-filter-toggle { right: 215px; }
}
@media screen and (max-width: 380px) {
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter { width: 106px; max-width: 106px; flex-basis: 106px; }
}
@media screen and (max-height: 560px) and (min-width: 600px) {
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter { width: 124px; max-width: 124px; flex-basis: 124px; }
  body[data-workspace-view="journey"] .path-filter-toggle { right: 304px; }
}
@media screen and (max-height: 560px) and (min-width: 600px) and (max-width: 760px) {
  body[data-workspace-view="journey"] .path-filter-toggle { right: 280px; }
}
@media screen and (max-width: 340px) {
  /* The smallest phones keep both view names whole; the filter may truncate. */
  body[data-workspace-view="journey"] .path-toolbar > .path-subject-filter { width: 88px; max-width: 88px; flex-basis: 88px; }
}

/* Next-step card (Path screen). One suggested next step: set up a learner,
   record how a recent activity went, or try the top locally ranked idea. */
@media screen {
  body[data-workspace-view] .next-step-card {
    max-width: 720px; margin: -6px 0 24px; padding: 22px 24px 20px;
    border: 1px solid var(--pw-line); border-radius: 20px;
    background: linear-gradient(160deg, var(--pw-raised), var(--pw-panel) 70%);
    box-shadow: 0 18px 50px #00000066;
  }
  body[data-workspace-view] .next-step-card > .eyebrow { display: block; margin: 0 0 8px; }
  body[data-workspace-view] .next-step-card h2 { margin: 0 0 6px; font: 400 clamp(1.45rem, 2.2vw, 1.9rem)/1.15 var(--pw-serif); letter-spacing: -.02em; color: var(--pw-ink); }
  body[data-workspace-view] .next-step-card h2:focus { outline: none; }
  body[data-workspace-view] .next-step-card h2:focus-visible { outline: 2px solid var(--pw-accent); outline-offset: 4px; border-radius: 6px; }
  .next-step-meta { margin: 0 0 8px; color: var(--pw-accent); font-size: .875rem; }
  .next-step-copy { margin: 0 0 14px; color: var(--pw-muted); font-size: .875rem; line-height: 1.5; max-width: 60ch; }
  .next-step-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
  .next-step-fields .field, .next-step-note { display: flex; flex-direction: column; gap: 6px; margin: 0; }
  .next-step-note { margin-bottom: 14px; }
  .next-step-note textarea { width: 100%; box-sizing: border-box; resize: vertical; }
  .next-step-statuses { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
  body[data-workspace-view] .next-step-status { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
  body[data-workspace-view] .next-step-status[aria-pressed="true"] { border-color: var(--pw-accent); background: var(--pw-soft); color: var(--pw-ink); box-shadow: inset 0 0 0 1px var(--pw-accent); }
  .next-step-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  body[data-workspace-view] .next-step-actions .button { min-height: 44px; }
  .next-step-alt-note { margin: 8px 0 0; color: var(--pw-muted); font-size: .75rem; line-height: 1.45; max-width: 60ch; }
  /* Quieter choices on a suggestion: one wrapping row of small ghost buttons. */
  /* Quieter choices fold behind "More": closed on a phone, open on a wider window. */
  .next-step-more { display: block; margin: 14px 0 0; padding-top: 4px; border-top: 1px solid var(--pw-line-soft); }
  .next-step-more > summary { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 2px; color: var(--pw-muted); font-size: .875rem; cursor: pointer; list-style: none; }
  .next-step-more > summary::-webkit-details-marker { display: none; }
  .next-step-more > summary::after { content: ''; width: 7px; height: 7px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .25s var(--pw-ease); }
  .next-step-more[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
  .next-step-more > summary:hover { color: var(--pw-ink); }
  .next-step-more > summary:focus-visible { outline: 2px solid var(--pw-accent); outline-offset: 3px; border-radius: 6px; }
  .next-step-more-row { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 4px 0 0; }
  body[data-workspace-view] .next-step-more-row .button { min-height: 44px; }
  .next-step-footnote { margin: 12px 0 0; color: var(--pw-faint); font-size: .75rem; }
  .next-step-prefilled { margin: -6px 0 14px; color: var(--pw-muted); font-size: .875rem; font-style: italic; }
  /* Step-by-step runner: one page of a saved activity at a time. */
  .next-step-runner-body { margin: 4px 0 16px; color: var(--pw-ink); font-size: 1rem; line-height: 1.6; max-width: 62ch; white-space: pre-line; }
  .next-step-runner-block { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--pw-line); border-radius: 14px; background: #ffffff08; }
  .next-step-runner-block strong { display: block; margin-bottom: 4px; color: var(--pw-accent); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
  .next-step-runner-block p { margin: 0; color: var(--pw-ink); line-height: 1.5; }
  .next-step-questions { margin: 0 0 16px; padding-left: 1.3em; color: var(--pw-ink); line-height: 1.55; }
  .next-step-questions li + li { margin-top: 6px; }
  .next-step-progress { display: flex; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
  .next-step-progress li { flex: 1 1 0; max-width: 48px; height: 4px; border-radius: 2px; background: var(--pw-line); }
  .next-step-progress li.is-done { background: var(--pw-muted); }
  .next-step-progress li.is-current { background: var(--pw-accent); }
}
@media screen and (max-width: 760px) {
  body[data-workspace-view] .next-step-card { margin: -4px 0 18px; padding: 18px 16px 16px; border-radius: 18px; }
  .next-step-fields { grid-template-columns: minmax(0, 1fr); }
  .next-step-actions { flex-direction: column; align-items: stretch; }
  body[data-workspace-view] .next-step-actions .button { width: 100%; }
  body[data-workspace-view] .next-step-status { flex: 1 1 calc(50% - 8px); justify-content: center; }
}
/* Record what you noticed: the note, how it went, the topic, then Save. */
@media screen {
  body[data-workspace-view] .parent-note-form { gap: 18px; }
  .parent-note-form [hidden] { display: none !important; }
  /* 16px fields: an iPhone zooms the page when a smaller field takes focus. */
  body[data-workspace-view] .app-shell .parent-note-form :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), textarea, select) { font-size: 1rem; }
  .parent-note-form textarea { min-height: 5.75rem; resize: vertical; }
  .note-child { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
  .note-child > .editor-field { flex: 1 1 100%; }
  .note-child-name { margin: 0; color: var(--pw-ink); font-size: 1rem; }
  .note-statuses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  body[data-workspace-view] .note-status { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding-inline: 10px; }
  /* A chosen answer wears the area's tone; wheat stays the primary action's alone. */
  body[data-workspace-view] .note-status { position: relative; }
  body[data-workspace-view] .note-status[aria-pressed="true"] { border-color: var(--page, var(--pw-sage)); background: rgba(var(--page-rgb, 160, 188, 132), .24); color: var(--pw-ink); box-shadow: inset 0 0 0 2px var(--page, var(--pw-sage)); }
  /* A tick as well as a tint, so the choice never rests on colour alone; the
     others step back once one is chosen. */
  body[data-workspace-view] .note-status[aria-pressed="true"]::after { content: ''; position: absolute; top: 8px; right: 10px; width: 10px; height: 5px; border-left: 2px solid var(--page, var(--pw-sage)); border-bottom: 2px solid var(--page, var(--pw-sage)); transform: rotate(-45deg); }
  body[data-workspace-view] .note-statuses:has([aria-pressed="true"]) .note-status[aria-pressed="false"] { color: var(--pw-muted); }
  body[data-workspace-view] #workspace .note-status-help { min-height: 1.55em; margin: 0; }
  /* Topic: a search field with its results as one plain list, ruled by
     hairlines rather than boxed, so the form stays a single surface. */
  .note-topic { display: grid; gap: 8px; min-width: 0; }
  body[data-workspace-view] #workspace .note-topic-status, body[data-workspace-view] #workspace .note-topic-note { margin: 0; }
  .note-topic-results { margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--pw-line); }
  .note-topic-results:empty { display: none; }
  .note-topic-results li + li { border-top: 1px solid var(--pw-line-soft); }
  .note-topic-option { display: grid; gap: 3px; width: 100%; min-height: 56px; padding: 12px 4px; border: 0; border-radius: 0; background: transparent; color: var(--pw-ink); font: inherit; text-align: left; cursor: pointer; transition: background .18s var(--pw-ease); }
  .note-topic-option:hover { background: rgba(232, 238, 248, .04); }
  .note-topic-option:active { background: var(--pw-soft); }
  .note-topic-option:disabled { cursor: default; opacity: .6; }
  .note-topic-title { font: 400 1rem/1.3 var(--pw-serif); color: var(--pw-ink); overflow-wrap: anywhere; }
  .note-topic-meta, .note-topic-reason, .note-topic-detail { font-size: .875rem; line-height: 1.45; overflow-wrap: anywhere; }
  .note-topic-meta, .note-topic-reason { color: var(--pw-muted); }
  .note-topic-subject { color: var(--subject, var(--pw-muted)); }
  .note-topic-detail { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; color: var(--pw-faint); }
  .note-topic-more { display: flex; flex-wrap: wrap; gap: 8px; }
  .note-topic-more:empty { display: none; }
  .note-topic-chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px 0; border-top: 1px solid var(--pw-line); }
  .note-topic-chosen:focus { outline: none; }
  .note-topic-chosen:focus-visible { outline: 2px solid var(--pw-accent); outline-offset: 3px; border-radius: 6px; }
  .note-topic-text { display: grid; gap: 3px; min-width: 0; }
  body[data-workspace-view] .note-topic-chosen .button { flex: 0 0 auto; min-height: 44px; }
  /* What is still missing is said beside Save, and the field is marked. */
  .note-save-bar { display: grid; gap: 10px; }
  .note-discard-ask { flex: 1 1 100%; grid-column: 1 / -1; margin: 0; color: var(--pw-ink); font-size: 1rem; line-height: 1.45; }
  .note-problems, .field-problem { margin: 0; color: var(--pw-danger); font-size: .875rem; line-height: 1.45; }
  /* How it went already carries a hint; when it is missing the hint says so. */
  body[data-workspace-view] #workspace .field-missing > .note-status-help { color: var(--pw-danger); }
  body[data-workspace-view] .parent-note-form .field-missing > .field-label, body[data-workspace-view] .parent-note-form .note-child.field-missing .field-label { color: var(--pw-danger); }
  body[data-workspace-view] .app-shell .parent-note-form .field-missing :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), textarea, select) { border-color: var(--pw-danger); }
  body[data-workspace-view] .parent-note-form .field-missing .note-status { border-color: #f1838480; }
  /* The note just saved, back on the Learning Record. */
  body[data-workspace-view] .record-list .record-row.parent-note-card.record-row-new { background: rgba(160, 188, 132, .09); }
  body[data-workspace-view] #workspace .record-row-new h3:focus { outline: none; }
  body[data-workspace-view] #workspace .record-row-new h3:focus-visible { outline: 2px solid var(--pw-accent); outline-offset: 4px; border-radius: 6px; }
}
@media screen and (max-width: 760px) {
  /* The top bar scrolls away on a phone, so nothing covers the top of this
     page; without this the browser pushes a field being typed in back down. */
  html:has(body[data-workspace-view="parent-note"]) { scroll-padding-top: 12px; }
  body[data-workspace-view] .note-save-bar .inline-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  body[data-workspace-view] .note-save-bar .inline-actions .button { width: 100%; min-height: 48px; }
  /* Room for the longest hint, so choosing how it went never moves the page. */
  body[data-workspace-view] #workspace .note-status-help { min-height: 3.1em; }
  /* Three across still fits a phone when the mark sits above the word. */
  body[data-workspace-view] .note-status { flex-direction: column; gap: 6px; min-height: 64px; padding: 10px 4px; border-radius: 18px; font-size: .875rem; line-height: 1.2; }
}
@media screen and (max-width: 350px) {
  /* The narrowest phones: one choice per row, mark beside the word. */
  .note-statuses { grid-template-columns: minmax(0, 1fr); }
  body[data-workspace-view] .note-status { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 48px; padding: 8px 16px; border-radius: 999px; font-size: 1rem; }
}
@media screen {
  /* The form's lede never leaves one word alone on its last line. */
  body[data-workspace-view="parent-note"] .page-lede { text-wrap: pretty; }
}
/* On the Path screen the map fills the window and the controls float over it,
   so the card floats too: below the toolbar on the left, scrolling if space is short. */
@media screen {
  body[data-workspace-view="journey"] .next-step-card {
    position: fixed; z-index: 24; top: 252px; left: 280px; width: min(440px, calc(100vw - 320px));
    max-height: calc(100dvh - 252px - 175px); overflow: auto; margin: 0; padding-top: 18px;
    background: linear-gradient(160deg, #242629f2, #141618f5 70%); backdrop-filter: blur(6px);
  }
  /* While running an activity the card is the main task, so it gets more room. */
  body[data-workspace-view="journey"] .next-step-card.is-running { width: min(560px, calc(100vw - 320px)); max-height: calc(100dvh - 252px - 40px); }
  body[data-workspace-view] .next-step-hide { float: right; margin: -6px -8px 0 8px; min-height: 36px; padding: 6px 12px; }
  body[data-workspace-view="journey"] .next-step-card.is-collapsed { width: auto; max-width: min(440px, calc(100vw - 320px)); padding: 0; border-radius: 999px; overflow: visible; box-shadow: 0 10px 30px #00000077; }
  body[data-workspace-view] .next-step-show { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%; padding: 8px 18px; border-radius: 999px; }
  body[data-workspace-view] .next-step-show::before { content: ''; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--pw-gold); box-shadow: 0 0 10px #e6c47c99; }
  .next-step-show-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media screen and (max-width: 1250px) and (min-width: 761px) {
  body[data-workspace-view="journey"] .next-step-card { left: 230px; top: 246px; width: min(420px, calc(100vw - 260px)); }
  body[data-workspace-view="journey"] .next-step-card.is-running { width: min(520px, calc(100vw - 260px)); max-height: calc(100dvh - 246px - 40px); }
}
@media screen and (max-width: 760px) {
  /* While expanded, the card is the main action: it may cover the map controls (Hide clears them). */
  body[data-workspace-view="journey"] .next-step-card { z-index: 44; top: 284px; left: 16px; right: 16px; width: auto; max-height: calc(100dvh - 284px - 96px); }
  body[data-workspace-view="journey"] .next-step-card.is-running { top: 148px; width: auto; max-height: calc(100dvh - 148px - 24px); }
  body[data-workspace-view="journey"] .next-step-card.is-collapsed { right: auto; max-width: calc(100vw - 32px); }
}
@media screen and (max-width: 760px) and (max-height: 700px) and (orientation: portrait) {
  body[data-workspace-view="journey"] .next-step-card { top: 260px; max-height: calc(100dvh - 260px - 90px); }
  /* A short phone can't show the whole card, so the next idea's and the first
     child's actions wait at its foot while the words above them scroll; a field
     that takes focus stops above them. The note form keeps its three buttons in
     the flow, where they don't crowd out the note. */
  body[data-workspace-view="journey"] .next-step-card:is(.next-step-suggest, .next-step-setup):not(.is-collapsed) { scroll-padding-bottom: 96px; }
  /* Before there is a child, the toolbar has nothing to show, so the first-child
     card starts under the title and covers it; the toolbar leaves the focus order. */
  body[data-workspace-view="journey"] .next-step-card.next-step-setup:not(.is-collapsed) { top: 204px; max-height: calc(100dvh - 204px - 90px); }
  body[data-workspace-view="journey"] .path-home:has(> .next-step-card.next-step-setup:not(.is-collapsed, [hidden])):not(:has(.path-topic-browser[open], .path-selected-detail:not([hidden]), .path-explorer.search-open, .path-search-tag:not([hidden]))) .path-toolbar { visibility: hidden; }
  body[data-workspace-view="journey"] .next-step-card:is(.next-step-suggest, .next-step-setup):not(.is-collapsed) > .next-step-actions { position: sticky; z-index: 1; bottom: 0; margin: 0 -16px; padding: 14px 16px 16px; background: linear-gradient(#14161800, #141618 14px); }
}
@media screen and (max-height: 560px) and (min-width: 600px) {
  body[data-workspace-view="journey"] .next-step-card { top: 176px; left: 202px; max-height: calc(100dvh - 176px - 100px); }
  body[data-workspace-view="journey"] .next-step-card.is-running { max-height: calc(100dvh - 176px - 24px); }
}

/* Account-managed storage panel: grouped actions, quiet secondary text, themed file picker. */
@media screen {
  #lesson-workspace-app .vault-panel { display: grid; gap: 12px; }
  #lesson-workspace-app .vault-panel > :is(p, label, details, section) { margin: 0; }
  #lesson-workspace-app .vault-panel .managed-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  #lesson-workspace-app .vault-panel .managed-actions .button { width: auto; min-height: 40px; padding: 8px 18px; }
  #lesson-workspace-app .vault-panel .managed-rare { padding-top: 12px; border-top: 1px solid rgba(174, 182, 204, .14); }
  #lesson-workspace-app .vault-panel .managed-cache { display: flex; align-items: center; gap: 10px; color: var(--pw-ink); }
  #lesson-workspace-app .vault-panel .managed-files { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid rgba(174, 182, 204, .16); border-radius: 14px; background: rgba(15, 20, 38, .6); }
  #lesson-workspace-app .vault-panel .managed-files h3 { margin: 0; font: 400 1rem/1.3 var(--pw-font); color: var(--pw-ink); }
  #lesson-workspace-app .vault-panel .managed-files input[type=file] { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; max-width: 100%; color: var(--pw-muted); font: 400 .86rem var(--pw-font); }
  #lesson-workspace-app .vault-panel .managed-files input[type=file]::file-selector-button { margin-right: 12px; min-height: 40px; padding: 8px 18px; border: 0; border-radius: 999px; background: var(--pw-button); color: var(--pw-button-ink); font: 400 .9rem var(--pw-font); cursor: pointer; }
  #lesson-workspace-app .vault-panel .managed-versions summary { cursor: pointer; color: var(--pw-ink); }
  #lesson-workspace-app :is(.access-code-panel, .admin-code-panel) :is(h2, h3) { font: 400 1.05rem/1.3 var(--pw-font); }
}

/* ---------------------------------------------------------------------
   Interaction and responsive guardrails from the signed-in checkout.
   The Path's main layer is deliberately click-through so the constellation
   can own the canvas. Floating controls must opt back into hit testing, and
   drawers must keep their own readable, scrollable layer at every viewport.
   --------------------------------------------------------------------- */
@media screen {
  /* The fixed top bar contains the account menu. Raise the ancestor stacking
     context as well as the panel; a child z-index cannot escape a lower
     fixed ancestor when the recommendation card is above it. */
  body[data-workspace-view] .topbar:has(.workspace-account-menu[open]) { z-index: 90; }
  body[data-workspace-view] .workspace-top-tools:has(.workspace-account-menu[open]) { z-index: 91; }
  body[data-workspace-view] .workspace-account-panel {
    z-index: 100;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  /* .main-content is click-through on the Journey so canvas gestures remain
     available. Restore the interactive surface for the recommendation card;
     this also makes its form controls and short-screen scroll reliable. */
  body[data-workspace-view="journey"] .next-step-card {
    pointer-events: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }
  body[data-workspace-view="journey"] .next-step-card :is(button, a, input, select, textarea) { pointer-events: auto; }

  /* Topic details are a narrow, fixed drawer rather than a page-width form.
     Keep each field on its own row and let long labels/buttons wrap instead
     of colliding with the neighbouring grid track. */
  body[data-workspace-view="journey"] .path-detail-content,
  body[data-workspace-view="journey"] .path-detail-content * { min-width: 0; overflow-wrap: anywhere; }
  body[data-workspace-view="journey"] .path-detail-content .learning-sky-observation-form {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
  }
  body[data-workspace-view="journey"] .path-detail-content .learning-sky-observation-form > * { width: 100%; }
  body[data-workspace-view="journey"] .path-detail-content .learning-sky-observation-form .button {
    min-height: 44px;
    white-space: normal;
  }
  body[data-workspace-view="journey"] .path-topic-option,
  body[data-workspace-view="journey"] .path-topic-option strong,
  body[data-workspace-view="journey"] .path-topic-meta { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
}

/* The card and the topic/search drawers compete for the same phone-sized
   area. Keep the card mounted (so a partially completed draft or running
   activity survives) but temporarily remove it from the visual and pointer
   layers while a drawer or search control is open. */
@media screen and (max-width: 760px) {
  body[data-workspace-view="journey"] .workspace-account-panel {
    top: 48px;
    max-height: min(28rem, calc(100dvh - 160px));
  }
  body[data-workspace-view="journey"] .path-home:has(.path-topic-browser[open]) .next-step-card,
  body[data-workspace-view="journey"] .path-home:has(.path-selected-detail:not([hidden])) .next-step-card,
  body[data-workspace-view="journey"] .path-home:has(.path-explorer.search-open) .next-step-card,
  body[data-workspace-view="journey"] .path-home:has(.path-search-tag:not([hidden])) .next-step-card {
    visibility: hidden;
    pointer-events: none;
  }
  /* The open card covers the map, so the map and its controls leave the screen
     and the focus order with it, and nothing peeks out under the card. Hide
     brings them back. */
  body[data-workspace-view="journey"] .path-home:has(> .next-step-card:not(.is-collapsed, [hidden])):not(:has(.path-topic-browser[open], .path-selected-detail:not([hidden]), .path-explorer.search-open, .path-search-tag:not([hidden]))) :is(.path-stage, .path-map-footer, .path-topic-browser) {
    visibility: hidden;
  }

  /* The filter toggle is only visible in Progress. Keep it one control-width
     plus a small gap to the left of the four camera buttons. */
  body[data-workspace-view="journey"]:has(.path-tracker:not([hidden])) .path-filter-toggle { right: 215px; }
}
@media screen and (max-width: 760px) and (max-height: 700px) and (orientation: portrait) {
  /* The stacked mobile nav places the menu lower than its desktop offset.
     Reserve the header stack explicitly, then let the panel scroll inside the
     remaining viewport instead of extending below the bottom edge. */
  body[data-workspace-view] .workspace-account-panel {
    max-height: min(28rem, max(11rem, calc(100dvh - 290px)));
  }
}

/* Short landscape uses the camera controls' 100px right gutter. Keep the
   filter button one control-width plus a small gap to their left. */
@media screen and (max-height: 560px) and (min-width: 600px) {
  body[data-workspace-view="journey"] .path-home:has(.path-topic-browser[open]) .next-step-card,
  body[data-workspace-view="journey"] .path-home:has(.path-selected-detail:not([hidden])) .next-step-card,
  body[data-workspace-view="journey"] .path-home:has(.path-explorer.search-open) .next-step-card,
  body[data-workspace-view="journey"] .path-home:has(.path-search-tag:not([hidden])) .next-step-card {
    visibility: hidden;
    pointer-events: none;
  }
  body[data-workspace-view="journey"]:has(.path-tracker:not([hidden])) .path-filter-toggle { right: 283px; }
}

/* The right-hand drawer and the left recommendation still intersect at
   tablet/small-desktop widths (the 971px checkout is representative). Keep
   every card state mounted, but remove the card from the visual and hit-test
   layers while a drawer or search surface is active so that the surface the
   user opened stays visible and focusable. */
@media screen and (min-width: 761px) and (max-width: 1250px) {
  body[data-workspace-view="journey"] .path-home:has(.path-topic-browser[open]) .next-step-card,
  body[data-workspace-view="journey"] .path-home:has(.path-selected-detail:not([hidden])) .next-step-card,
  body[data-workspace-view="journey"] .path-home:has(.path-explorer.search-open) .next-step-card,
  body[data-workspace-view="journey"] .path-home:has(.path-search-tag:not([hidden])) .next-step-card {
    visibility: hidden;
    pointer-events: none;
  }
}

/* A first-run vault choice is mounted directly in #workspace before the
   normal view. Give it the sidebar gutter on desktop and a scroll container
   below the stacked mobile navigation, so it cannot cover nav labels. */
@media screen and (min-width: 761px) {
  body[data-workspace-view="journey"] #workspace > :not(.path-home):not(.vault-sync-status):not(.parent-assistant).vault-panel {
    box-sizing: border-box;
    width: min(840px, calc(100% - 336px));
    max-width: 840px;
    max-height: calc(100dvh - 190px);
    margin: 155px 28px 48px 280px;
    overflow: auto;
    overscroll-behavior: contain;
  }
}
@media screen and (min-width: 761px) and (max-width: 1100px) {
  body[data-workspace-view="journey"] #workspace > :not(.path-home):not(.vault-sync-status):not(.parent-assistant).vault-panel {
    width: calc(100% - 255px);
    margin: 155px 20px 48px 215px;
  }
}
@media screen and (max-width: 760px) {
  body[data-workspace-view="journey"] #workspace > :not(.path-home):not(.vault-sync-status):not(.parent-assistant).vault-panel {
    box-sizing: border-box;
    width: calc(100% - 36px);
    max-width: none;
    max-height: calc(100dvh - 260px);
    margin: 260px 18px 110px;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}
@media screen and (max-width: 760px) and (max-height: 700px) and (orientation: portrait) {
  body[data-workspace-view="journey"] #workspace > :not(.path-home):not(.vault-sync-status):not(.parent-assistant).vault-panel {
    max-height: calc(100dvh - 245px);
    margin-top: 245px;
  }
}
/* Visual clean-up (UI review, Run D). Screen only: nothing here reaches print. */
@media screen {
  /* What a small label above a title used to say now sits in a line under it. */
  body[data-workspace-view] #workspace :is(.title-note, .step-note) { margin: 2px 0 0; color: var(--pw-muted); font-size: .875rem; line-height: 1.45; letter-spacing: 0; text-transform: none; }
  body[data-workspace-view] #workspace .intake-review-title { margin: 0; font: 400 1.2rem/1.3 var(--pw-serif); color: var(--pw-ink); }
  /* One meaning for a coloured edge: the band along the top of a topic card is
     its subject. Callouts are marked by their surface, never a left edge. */
  body[data-workspace-view] :is(.parent-guide, .learner-onboarding-empty, .intake-ai-review, .adaptive-activity-item, .first-use-included) { border-left: 0; }
  body[data-workspace-view] :is(.intake-ai-review, .adaptive-activity-item, .first-use-included, .learner-onboarding-empty) { border-radius: 10px; }
  body[data-workspace-view] .parent-guide { padding-left: 0; }
  /* While the workspace loads it shows the same bare mark as the header. */
  body .loading-mark { border: 0; border-radius: 12px; background: url("/workspace-assets/assets/woven-p-dark-3ed54228-180.png") center / contain no-repeat; box-shadow: none; color: transparent; font-size: 0; filter: contrast(1.35) hue-rotate(-48deg) saturate(.5); }
  /* Headings break into even lines; paragraphs never end on one word alone. */
  body[data-workspace-view] #workspace :is(h1, h2, h3, h4) { text-wrap: balance; }
  body[data-workspace-view] #workspace :is(p, li) { text-wrap: pretty; }
  /* Labels for a value read as words, not small capitals. */
  body[data-workspace-view] #workspace .plan-grid strong { text-transform: none; letter-spacing: 0; font-size: .75rem; }
  /* A topic card's subject line now sits under its title. */
  body[data-workspace-view] #workspace :is(.topic-picker-card, .map-activity-topic) > :is(h2, h3) + :is(.topic-card-meta, .topic-card-subject) { margin-top: 2px; }
  body[data-workspace-view] #workspace .printable-card > h3 + .printable-card-meta { margin-top: -4px; }
  /* The topic drawer's header holds only Close. */
  .path-drawer-header { justify-content: flex-end; }
  /* Six text sizes: .75rem, .875rem, 1rem, 1.2rem, 1.5rem, and each page's own title.
     These rules bring text styled by the older base sheet onto the same steps. */
  body[data-workspace-view] :is(.learning-sky-node-status, .learning-sky-node-subject, .learning-sky-node-reason, .learning-sky-node-links, .learning-sky-legend-item span, .learning-sky-count, .adaptive-strand-count, .adaptive-strand-signal, .adaptive-subject-signals, .adaptive-dashboard-coverage, .adaptive-recommendation-card p, .printable-card-meta, .parent-assistant-launcher-label) { font-size: .75rem; }
  body[data-workspace-view] :is(.learning-sky-topic strong, .topic-card-description, .topic-card-reason, .adaptive-dashboard-details > summary, .printable-filter > span) { font-size: .875rem; }
  body[data-workspace-view] :is(.adaptive-strand-card h3, .adaptive-subject-card h3, .adaptive-recommendations > h3, .adaptive-activities > h3) { font-size: 1rem; }
}
