/* core/workspace/workspace.css
   The Workspace drawer. One size for the drawer whether the compass button
   or a "Dashboard" link opened it. Colors come from the site tokens in
   /styles.css; the fallbacks cover pages that do not load it (SafeHarbor). */

.ss-dashbar { width: min(420px, 92vw); }

/* Standalone drawer (pages without the site header) */
.ss-ws-standalone {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
  background: var(--bg-2, #141a24); color: var(--text, #EDE9E1);
  border-left: 1px solid var(--frame, rgba(255,255,255,.14));
  z-index: 10001; display: flex; flex-direction: column; padding: 20px;
  transform: translateX(100%); transition: transform 220ms cubic-bezier(.4,0,.2,1);
  overflow-y: auto; box-shadow: -10px 0 30px rgba(2,6,23,.5);
  font-family: inherit; box-sizing: border-box;
}
.ss-ws-standalone.is-open { transform: translateX(0); }
.ss-ws-overlay { display: none; position: fixed; inset: 0; background: rgba(2,6,23,.55); z-index: 10000; }
body.ss-ws-standalone-open .ss-ws-overlay { display: block; }
.ss-ws-standalone .ss-dashbar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ss-ws-standalone .ss-dashbar-brand { font-family: Georgia, serif; font-size: 1.1rem; font-weight: 700; }
.ss-ws-standalone .ss-dashbar-close { background: none; border: 0; color: inherit; font-size: 24px; width: 44px; height: 44px; cursor: pointer; opacity: .7; }
.ss-ws-standalone .ss-dashbar-link { display: flex; align-items: center; min-height: 40px; padding: 6px 10px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 600; font-size: 14px; opacity: .85; }
.ss-ws-standalone .ss-dashbar-link:hover { background: rgba(255,255,255,.05); opacity: 1; }
.ss-ws-links { margin-top: 10px; border-top: 1px solid var(--line, rgba(255,255,255,.08)); padding-top: 10px; }

/* With the Workspace mounted, the header drawer's Messages / Documents /
   Account links repeat what the Workspace already shows at the top. */
.ss-dashbar.has-ws #ssDashbarMessages,
.ss-dashbar.has-ws a.ss-dashbar-link[href="/app/dashboard-page.html"] { display: none; }
.ss-dashbar.has-ws .ss-dashbar-brand[data-ws-label] { font-size: 0; }
.ss-dashbar.has-ws .ss-dashbar-brand[data-ws-label] > * { display: none; }
.ss-dashbar.has-ws .ss-dashbar-brand[data-ws-label]::after { content: attr(data-ws-label); font-size: 1.1rem; }

/* Workspace content */
.ss-ws-body { margin-bottom: 8px; }
.ws { display: flex; flex-direction: column; gap: 12px; }
.ws-dash-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 46px; padding: 10px 14px; border-radius: 12px; text-decoration: none;
  font-weight: 700; font-size: 15px;
  background: var(--tide, #60A5FA); color: var(--route-ink, #141311);
}
.ws-dash-btn:hover { filter: brightness(1.06); }
.ws-guest p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--text-2, rgba(237,233,225,.75)); }
.ws-sec { border: 1px solid var(--frame, rgba(255,255,255,.12)); border-radius: 12px; padding: 12px 14px; background: var(--panel, rgba(255,255,255,.03)); }
.ws-sec--messages { border-left: 3px solid var(--acc-clay, #E8956B); }
.ws-h { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted, rgba(237,233,225,.55)); }
.ws-muted { display: block; margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted, rgba(237,233,225,.55)); }
.ws-links { display: flex; flex-direction: column; gap: 2px; }
.ws-links a { display: block; padding: 7px 0; font-size: 14px; font-weight: 600; color: var(--text, #EDE9E1); text-decoration: none; }
.ws-links a::after { content: " →"; opacity: .5; }
.ws-links a:hover { color: var(--tide, #60A5FA); }

.ws-msg { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.ws-msg-n { font-family: Georgia, serif; font-size: 26px; font-weight: 700; color: var(--acc-clay, #E8956B); line-height: 1; }
.ws-msg-t { font-size: 14px; font-weight: 600; line-height: 1.35; }

.ws-date { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.06)); }
.ws-date:last-child { border-bottom: 0; }
.ws-date-l { font-size: 14px; font-weight: 600; }
.ws-date.is-court .ws-date-l { color: var(--sunlit, #F2C14E); }

.ws-fold { border: 1px solid var(--frame, rgba(255,255,255,.12)); border-radius: 12px; padding: 0 14px; background: transparent; }
.ws-fold > summary { cursor: pointer; list-style: none; min-height: 42px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--text-2, rgba(237,233,225,.75)); }
.ws-fold > summary::-webkit-details-marker { display: none; }
.ws-fold > summary::after { content: "+"; font-size: 16px; opacity: .6; }
.ws-fold[open] > summary::after { content: "–"; }
.ws-fold[open] { padding-bottom: 8px; }

/* Progress rows: a meter like a usage bar, in the form's route color */
.ws-prog { --route: var(--tide, #60A5FA); display: block; padding: 8px 0; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line, rgba(255,255,255,.06)); }
.ws-prog:last-child { border-bottom: 0; }
.ws-prog.route-tide   { --route: var(--tide, #60A5FA); }
.ws-prog.route-sunlit { --route: var(--sunlit, #F2C14E); }
.ws-prog.route-river  { --route: var(--river, #22D3EE); }
.ws-prog.route-dusk   { --route: var(--dusk, #B59DFB); }
.ws-prog.route-pine   { --route: var(--pine, #4ADE80); }
.ws-prog.route-harbor { --route: var(--harbor, #F27C97); }
.ws-prog.route-orchid { --route: var(--orchid, #E879F9); }
.ws-prog-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ws-prog-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.ws-prog-pct { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--route); white-space: nowrap; }
.ws-prog-bar { display: block; height: 6px; margin: 6px 0 4px; border-radius: 999px; background: var(--line, rgba(255,255,255,.08)); overflow: hidden; }
.ws-prog-fill { display: block; height: 100%; border-radius: 999px; background: var(--route); transition: width .4s ease; }
.ws-prog-fill.is-unknown { opacity: .45; }
.ws-prog-sub { display: block; font-size: 12px; color: var(--muted, rgba(237,233,225,.55)); }
.ws-prog:hover .ws-prog-name { color: var(--route); }

/* SafeHarbor's way back (its own stylesheet is cached a year; this file is versioned) */
.sh-back {
  font-size: 13px; font-weight: 600; color: rgba(210, 225, 215, 0.75); text-decoration: none;
  padding: 6px 10px; border: 1px solid rgba(160, 200, 180, 0.18); border-radius: 6px; white-space: nowrap;
}
.sh-back:hover { color: #f0f4f8; border-color: rgba(160, 200, 180, 0.3); }
@media (max-width: 640px) { .sh-back { padding: 6px 8px; } .sh-party { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .ss-ws-standalone, .ws-prog-fill { transition: none; }
}
