/* Uses the existing palette in all four portal themes. */
.pw-icon{width:1.1em;height:1.1em;display:inline-block;vertical-align:-.16em;margin-right:.45em;flex:none;pointer-events:none}
html[data-portal-theme] aside nav .nav{display:flex;align-items:center;gap:.15rem;min-height:44px;border-radius:9px;margin:3px 0}
html[data-portal-theme] aside .nav-group-title{font-size:.7rem;letter-spacing:.08em;margin:22px 10px 7px}
html[data-portal-theme] .charter-workspace{width:calc(100vw - 36px);max-width:1500px;height:calc(100dvh - 36px);max-height:calc(100dvh - 36px);padding:24px;border:1px solid var(--pt-border);border-radius:16px;box-sizing:border-box}
.charter-workspace>header{display:flex;justify-content:space-between;align-items:center;gap:16px}
.charter-workspace .pw-tabs{display:flex;gap:8px;flex-wrap:wrap;padding:12px 0 20px;border-bottom:1px solid var(--pt-border);margin-bottom:20px}
html[data-portal-theme] .pw-tabs .active{background:var(--pt-accent);color:var(--pt-accent-text);border-color:var(--pt-accent)}
.pw-pane[hidden]{display:none!important}.pw-pane{max-width:1180px;margin:auto;min-height:260px}.pw-pane>h3{margin-top:24px}
.pw-pane form .biz-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px}.pw-pane label{display:block;margin:10px 0}.pw-pane input,.pw-pane textarea,.pw-pane select{box-sizing:border-box;max-width:100%}
.pw-order-title{font-size:1rem;font-weight:500;color:var(--pt-muted)}.pw-order-footer{border-top:1px solid var(--pt-border);margin-top:24px;padding-top:14px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.pw-order-footer [data-status]{flex:1;min-width:240px}
.pw-timeline{overflow:auto;padding:12px 18px 12px 0}.pw-time-head,.pw-resource{display:grid;grid-template-columns:240px minmax(620px,1fr);gap:16px;padding:14px 0;border-bottom:1px solid var(--pt-border)}.pw-time-head>div{position:relative;height:24px;margin-right:26px}.pw-time-head span span{font-size:.8rem}.pw-time-head>div>span{position:absolute;font-size:.8rem}.pw-track{min-height:52px;padding:4px 0;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(25% - 1px),var(--pt-border) 25%)}.pw-duty{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;box-sizing:border-box;min-width:110px}html[data-portal-theme] .pw-duty.pw-conflict{background:var(--pt-warn-bg);color:var(--pt-warn);border-color:var(--pt-warn)}
@media(max-width:720px){html[data-portal-theme] .charter-workspace{width:100vw;height:100dvh;max-height:100dvh;padding:14px;border-radius:0}.pw-pane form .biz-grid{grid-template-columns:1fr}.pw-tabs button{flex:1 1 42%}.pw-icon{margin-right:.35em}}
.pw-track{background:none}.pw-duty{min-width:8px}.pw-time-head>div>span{white-space:nowrap}
.charter-workspace[open]{display:flex;flex-direction:column;overflow:hidden}.charter-workspace>header{flex:none}.charter-workspace>[data-body]{flex:1;min-height:0;overflow:auto;padding-right:8px}.charter-workspace .pw-tabs{position:sticky;top:0;background:var(--pt-panel);z-index:2}.charter-workspace .pw-order-footer{position:sticky;bottom:0;background:var(--pt-panel);z-index:2;padding-bottom:10px}
/* The route planner has a direct form, not the order workspace's scrolling data-body. */
.charter-workspace[open]:has(>form){display:block;overflow:auto;overscroll-behavior:contain}
html[data-portal-theme] .pw-order-list{width:calc(100vw - 48px);max-width:1450px;height:calc(100dvh - 48px);max-height:calc(100dvh - 48px);box-sizing:border-box;border-radius:16px;padding:24px}.pw-order-tools{display:flex;align-items:end;gap:16px;margin:20px 0;flex-wrap:wrap}.pw-order-tools label{flex:1;min-width:220px}.pw-order-tools :is(input,select){width:100%;box-sizing:border-box}.pw-order-list table{width:100%;border-collapse:collapse}.pw-order-list th,.pw-order-list td{padding:14px;text-align:left;border-bottom:1px solid var(--pt-border)}
.pw-quick .webbtn{margin:0 10px 8px 0}.pw-attention-summary{border-left:4px solid var(--pt-accent)}.pw-attention-summary .ops-attention{display:inline-block;vertical-align:top;min-width:240px;width:min(100%,360px);box-sizing:border-box;padding:12px}.pw-record-search{display:block;margin:12px 0}.pw-record-search input{display:block;width:min(100%,520px);box-sizing:border-box}
.pw-status-message{padding:12px;border:1px solid var(--pt-border);background:var(--pt-panel);color:var(--pt-text);white-space:pre-wrap}
/* Two-level navigation; reuses the original authorized navigation buttons. */
html[data-portal-theme] .app.portal-category-layout{grid-template-columns:220px minmax(0,1fr);grid-template-rows:auto 1fr}
.portal-categories{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:12px 20px;background:var(--pt-sidebar);color:var(--pt-side-text);border-bottom:1px solid var(--pt-border);position:sticky;top:0;z-index:20;flex-wrap:wrap}
.portal-category-brand{width:190px;margin-right:20px;background:transparent;padding:4px 8px;box-sizing:border-box}.portal-category-brand img{display:block;width:100%;height:42px;object-fit:contain}
html[data-portal-theme] .portal-categories .active{background:var(--pt-accent);color:var(--pt-accent-text);border-color:var(--pt-accent)}
.portal-category-layout>aside{top:var(--category-height,68px);height:calc(100vh - var(--category-height,68px));grid-column:1;grid-row:2}.portal-category-layout>aside>.brand{display:none}
.portal-category-layout>aside [data-category-title]{font-size:18px;padding:15px 10px 8px;margin:0;color:var(--pt-side-text)}
.portal-category-layout>main{grid-column:2;grid-row:2}.portal-category-layout aside .nav[hidden]{display:none!important}
@media(max-width:850px){html[data-portal-theme] .app.portal-category-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto 1fr}.portal-categories{position:static;padding:10px;gap:6px}.portal-category-brand{width:100%;margin:0}.portal-category-brand img{height:36px}.portal-category-layout>aside{grid-column:1;grid-row:2;position:static;height:auto;padding:8px}.portal-category-layout>main{grid-column:1;grid-row:3}.portal-category-layout>aside [data-category-title]{display:none}.portal-category-layout aside nav{display:flex;overflow:auto}.portal-categories .webbtn{flex:1 1 auto}}

.pw-unavailable,.pw-price-warning{border-left:4px solid #b54708;padding:10px;background:var(--pt-panel);color:var(--pt-text);font-weight:600}
html[data-portal-theme] .portal-categories .webbtn{background:transparent;color:var(--pt-side-text);border-color:transparent}
html[data-portal-theme] .portal-categories .webbtn:hover{background:#ffffff22}
html[data-portal-theme] .portal-categories .webbtn.active{background:var(--pt-side-active);color:#fff;border-color:transparent}
html[data-portal-theme=dark] .portal-category-brand img,html[data-portal-theme=classic] .portal-category-brand img{filter:brightness(0) invert(1)}
html[data-portal-theme] dialog.portal-context-help{background:var(--pt-panel)!important;color:var(--pt-text)!important;border-color:var(--pt-border)!important}
.portal-context-help>h2{margin-right:100px}.portal-context-help>[data-close]{position:sticky;top:0;float:right}.portal-context-help details{color:inherit}
.portal-context-help::backdrop{background:#07141b88;backdrop-filter:blur(5px)}/* Header controls keep their original event handlers and accessible names. */
html[data-portal-theme] .portal-categories{flex-wrap:wrap}
html[data-portal-theme] .portal-categories .portal-tools{margin-left:auto;padding:0;background:transparent;border:0;box-shadow:none;min-width:0}
.portal-tools>div:first-child{display:none}.portal-tools .actions{display:flex;gap:6px;align-items:center;flex-wrap:nowrap}
html[data-portal-theme] .portal-tools .portal-icon{position:relative;width:40px;height:40px;padding:8px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;color:var(--pt-side-text)}
.portal-icon>.pw-icon{display:none}.portal-icon svg{flex-shrink:0}.portal-badge{position:absolute;right:-2px;top:-5px;border-radius:20px;padding:1px 4px;background:#b42318;color:white;font-size:11px}
.portal-icon-theme{width:40px;height:40px;position:relative;display:inline-flex;align-items:center;justify-content:center;color:var(--pt-side-text);margin:0!important}.portal-icon-theme select{position:absolute;inset:0;opacity:0;width:40px!important;cursor:pointer}.portal-icon-theme:focus-within{outline:2px solid currentColor;border-radius:8px}
.profile-avatar img{width:32px;height:32px;border-radius:50%;object-fit:cover}.profile-heading{display:flex;align-items:center;gap:18px}.profile-heading img{width:80px;height:80px;border-radius:50%;object-fit:cover}.profile-heading svg{width:60px;height:60px}
.journey-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.journey-cards button{min-height:90px;text-align:left;padding:18px}.context-instructions{font-size:17px;line-height:1.7;max-width:65ch}
@media(max-width:850px){.portal-categories .portal-tools{width:100%;margin:0!important}.portal-tools .actions{justify-content:flex-end}.journey-cards{grid-template-columns:1fr}}
.context-instructions li{margin:0 0 14px;padding-left:8px}.help-example{padding:16px;border-left:4px solid var(--pt-accent,#087d89);background:var(--pt-soft,#eef4f5);border-radius:8px}.help-example p{margin-bottom:0}

@media(max-width:850px){.portal-tools .actions{justify-content:flex-end}}
.portal-context-help .context-instructions{width:100%;overflow-wrap:anywhere}.portal-context-help details{margin:18px 0;border:1px solid var(--pt-border,#b8cbc7);padding:12px;border-radius:10px}.portal-context-help summary{cursor:pointer;font-weight:650}.portal-context-help dd{margin:4px 0 15px;line-height:1.5}.portal-context-help img{display:block;margin:12px 0}.portal-context-help .context-instructions ol{padding-left:1.5em}@media(max-width:600px){.portal-context-help .context-instructions{font-size:16px}.portal-context-help{padding:14px!important}}
.portal-context-help .context-instructions{max-width:none}
.help-interactive{margin:0}.help-image-hint{font-size:15px;margin:8px 0 12px}.help-image-stage{position:relative;isolation:isolate;line-height:0}
.portal-context-help .help-image-stage img{display:block;width:100%;height:auto;margin:0;border-radius:10px}
.help-image-stage .help-hotspot{position:absolute;z-index:1;display:block;margin:0;padding:0;min-width:0;min-height:0;border:2px solid #087d8980;border-radius:5px;background:#087d8909;box-shadow:none;cursor:help;line-height:1;transition:background .1s,border-color .1s}
.help-image-stage .help-hotspot:hover,.help-image-stage .help-hotspot.active,.help-image-stage .help-hotspot:focus-visible{border-color:#075d66;background:#0f9ba62b;outline:3px solid #fff;outline-offset:1px}
.help-hotspot>span{position:absolute;right:0;top:0;display:grid;place-items:center;width:20px;height:20px;background:#075d66;color:#fff;border-radius:0 2px 0 7px;font:600 12px/1 system-ui}
.help-interactive .help-bubble{position:fixed;z-index:1000;box-sizing:border-box;width:min(340px,calc(100vw - 60px));padding:16px 35px 13px 16px;background:#fff;color:#183d38;border:2px solid #087d89;border-radius:14px;box-shadow:0 6px 28px #0004;font:16px/1.45 system-ui;max-height:65vh;overflow:auto;line-height:1.45}
.help-interactive .help-bubble[hidden]{display:none}.help-bubble>p{margin:7px 0 0}.help-bubble>button{position:absolute;right:4px;top:4px;width:28px;height:28px;min-width:0;padding:0;border:0;border-radius:50%;background:#e8f1ef;color:#183d38;font:24px/1 system-ui;cursor:pointer}
.help-interactive figcaption{font-size:13px;line-height:1.5;margin-top:10px;color:var(--pt-muted,#49635e)}
.help-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.portal-context-help .help-written,.portal-context-help .help-image-list{max-width:72ch}.help-image-list dt{font-weight:650}
@media(max-width:600px){.help-hotspot>span{width:16px;height:16px;font-size:10px}.help-image-stage .help-hotspot{border-width:1px}.help-image-hint{font-size:14px}.help-interactive .help-bubble{font-size:15px}}
.portal-icon-theme{width:80px}.portal-icon-theme>button{position:absolute;left:42px;top:0;width:36px;height:40px;padding:4px}
html[data-portal-theme=custom] .portal-categories .webbtn.active{color:var(--pt-accent-text)}
html[data-portal-theme=custom] a:not(.btn):not(.webbtn):not(.leaflet-container a){text-decoration:underline}

html[data-portal-theme] .portal-icon-theme>span{color:var(--pt-side-text)}html[data-portal-theme] .portal-tools .portal-icon-theme>button{position:absolute;left:42px;top:0;width:36px;height:40px;padding:4px}
