:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17211b;
  background: #f3f5ef;
  --ink: #17211b;
  --muted: #5a685f;
  --line: #d7ded4;
  --paper: #fffef8;
  --accent: #315e40;
  --accent-soft: #e4efe1;
  --warm: #c96845;
  --focus: #165dff;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 18rem; min-height: 100vh; background: radial-gradient(circle at 82% 8%, rgba(177, 201, 154, .28), transparent 30rem), #f3f5ef; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: #1f462d; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: .2rem solid var(--focus); outline-offset: .2rem; border-radius: .25rem; }
.skip-link { position: fixed; z-index: 20; top: .5rem; left: .5rem; padding: .7rem 1rem; transform: translateY(-160%); background: var(--ink); color: white; }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid rgba(215, 222, 212, .9); background: rgba(255, 254, 248, .86); backdrop-filter: blur(.8rem); }
.app-shell > .site-header { position: sticky; z-index: 30; top: 0; }
.header-inner { width: min(100% - 2rem, 72rem); min-height: 4.5rem; margin: 0 auto; display: flex; align-items: center; gap: 1.25rem; }
.work-header-inner { width: 100%; padding: 0 1rem 0 .75rem; }
.work-header-actions { margin-left: auto; display: flex; align-items: center; gap: .65rem; }
/* Locale controls only: preserve the existing content typography/density. */
.work-language { display: flex; align-items: center; flex-shrink: 0; }
.work-language button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; min-height: 44px; padding: .2rem; white-space: nowrap; }
.work-language button[aria-pressed=true] { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 600px) {
  .work-header-actions, .public-global-actions { flex-wrap: wrap; justify-content: flex-end; }
  .work-header-actions .work-language { flex-basis: 100%; justify-content: flex-end; }
}
.brand-link { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; }
.brand-link small { display: block; color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: .65rem; background: var(--accent); color: white; font-family: Georgia, serif; font-size: 1.15rem; }
.auth-actions { min-width: 5.5rem; display: flex; justify-content: flex-end; }
.user-sign-out-action { min-width: 5.5rem; display: flex; justify-content: flex-end; }

/* SPA route changes focus these non-interactive landmarks for assistive
   technology. Do not paint the browser focus ring around the whole canvas. */
main[tabindex="-1"]:focus { outline: none; }

.shell { width: 100%; max-width: 112rem; margin: 0; padding: 1.1rem 1.5rem 3rem; justify-self: start; }
.breadcrumbs { min-height: 1.25rem; margin-bottom: .45rem; color: var(--muted); font-size: .78rem; }
.breadcrumbs ol { min-width: 0; display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { min-width: 0; max-width: min(24rem, 42vw); }
.breadcrumbs li + li::before { margin-right: .45rem; content: "/"; color: #92a097; }
.breadcrumbs a, .breadcrumbs span { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.back-action { min-height: 2rem; margin-bottom: .3rem; font-size: .78rem; }
.back-action:empty { display: none; }
.back-link { max-width: 100%; min-height: 2rem; display: inline-flex; align-items: center; padding: .34rem .68rem; border: 1px solid #cbd6ca; border-radius: .45rem; background: rgba(228, 239, 225, .48); color: #2d5639; font-size: .78rem; font-weight: 650; line-height: 1.2; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.back-link:hover { border-color: #acbdaa; background: rgba(228, 239, 225, .82); color: #1f462d; }
.back-link:active { background: #dce9d9; transform: translateY(.03rem); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; padding: .35rem 0 .8rem; }
.eyebrow { margin: 0; color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { max-width: 22ch; margin: .45rem 0 .65rem; font-size: clamp(2rem, 5vw, 4.25rem); line-height: 1; letter-spacing: -.045em; overflow-wrap: anywhere; }
/* Only the inactive app shell uses the quieter reauthentication hero. */
.reauth-work-route .page-heading h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
.lede { max-width: 44rem; margin: 0; color: var(--muted); line-height: 1.6; }
.page-actions { flex: none; }
.route-tabs { display: flex; gap: .3rem; margin: 0 0 1.5rem; padding: .3rem; border: 1px solid var(--line); border-radius: .8rem; background: rgba(255, 254, 248, .66); }
.route-tabs a { padding: .6rem .9rem; border-radius: .55rem; color: var(--muted); font-size: .9rem; font-weight: 700; text-decoration: none; }
.route-tabs a.active { background: var(--paper); color: var(--ink); box-shadow: 0 .15rem .65rem rgba(40, 58, 45, .09); }
.status { min-height: 1.35rem; margin-bottom: .6rem; color: var(--muted); font-size: .82rem; }
.content { display: grid; gap: .75rem; }

/* Every authenticated Work route uses one operational, non-hero scale. */
.authenticated-work-route .shell { padding-top: .8rem; }
.authenticated-work-route .breadcrumbs { min-height: 1rem; margin-bottom: .25rem; font-size: .74rem; }
.authenticated-work-route .page-heading { align-items: center; padding: 0 0 .5rem; border-bottom: 1px solid var(--line); }
.authenticated-work-route .page-heading h1 { max-width: none; margin: .12rem 0 .14rem; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.2; letter-spacing: -.015em; }
.authenticated-work-route .page-heading .lede { font-size: .8rem; line-height: 1.35; }
.authenticated-work-route .page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.authenticated-work-route .page-actions .button,
.authenticated-work-route .people-actions .button,
.authenticated-work-route .people-find .button { min-height: 2rem; padding: .35rem .65rem; border-radius: .45rem; font-size: .78rem; }
.authenticated-work-route .route-tabs { margin-bottom: .65rem; padding: .18rem; border-radius: .5rem; }
.authenticated-work-route .route-tabs a { padding: .36rem .62rem; border-radius: .36rem; font-size: .8rem; }
.authenticated-work-route .status { min-height: 0; margin-bottom: .35rem; font-size: .76rem; }
.authenticated-work-route .status:empty { display: none; }
.authenticated-work-route .content { gap: .45rem; }
.work-home-section { min-width: 0; padding-top: .15rem; }
.work-home-section + .work-home-section { margin-top: .15rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.work-home-section > h2, .section-label { margin: 0 0 .45rem; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.session-table { min-width: 0; overflow-x: auto; border-top: 1px solid var(--line); }
.session-table-header, .session-row { min-width: 68rem; display: grid; grid-template-columns: minmax(16rem, 1fr) 17rem 5rem 8rem 7rem 9rem 4.5rem; align-items: center; gap: .5rem; }
.session-table-header { padding: .38rem .4rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.session-list { display: grid; }
.session-row { padding: .35rem .4rem; border-bottom: 1px solid var(--line); background: transparent; }
.session-row:hover { background: rgba(255, 254, 248, .62); }
.session-row-details { min-width: 0; }
.session-row h2, .session-row h3 { margin: 0; font-size: .85rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-row h2 a, .session-row h3 a { color: var(--ink); text-decoration-thickness: .08em; }
.session-cell { min-width: 0; }
.session-lifecycle, .session-members, .session-subscription, .session-created, .session-updated { min-width: 0; color: var(--muted); font-size: .8rem; }
.session-lifecycle, .activity-status { display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap; gap: .25rem; }
.session-title-link { display: flex; align-items: center; gap: .3rem; min-width: 0; max-width: 100%; }
.session-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-lock-icon { flex: 0 0 auto; font-size: .8rem; line-height: 1; }
.badge.session-quota { white-space: nowrap; overflow-wrap: normal; letter-spacing: 0; flex-shrink: 0; }
.badge.session-quota-locked { background: #f8e2df; color: #8c302c; }
.badge.session-quota-selected { background: #e3f2e8; color: #1d603b; }
.badge.session-quota-pending_reconciliation { background: #f7e8c6; color: #6c4813; }
.session-lifecycle .badge, .activity-status .badge, .shared-session-access .badge { white-space: nowrap; flex-shrink: 0; font-size: .68rem; line-height: 1.2; padding: .15rem .35rem; }
.session-members, .session-created, .session-updated { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-subscription { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-mobile-label { display: none; }
.shared-session-table { min-width: 0; overflow-x: auto; border-top: 1px solid var(--line); }
.shared-session-header, .shared-session-row { min-width: 60rem; display: grid; grid-template-columns: minmax(16rem,1fr) 7rem 8rem 10rem 6rem 11rem; align-items: center; gap: .5rem; }
.shared-session-header { padding: .38rem .4rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.shared-session-row { padding: .35rem .4rem; border-bottom: 1px solid var(--line); font-size: .8rem; }
.shared-session-row:hover { background: rgba(255,254,248,.62); }
.shared-session-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-profile-trigger { min-height: 0; justify-content: flex-start; padding: 0; border: 0; background: transparent; color: var(--accent); font-size: .8rem; text-align: left; text-decoration: underline; text-underline-offset: .2em; }
.owner-profile-trigger:hover { background: transparent; color: #1f462d; }
.shared-session-access { min-width: 0; }
.shared-session-period { color: var(--muted); }
.owner-profile-dialog { width: min(100% - 2rem, 34rem); max-height: min(85vh, 42rem); padding: 0; border: 1px solid var(--line); border-radius: .8rem; background: var(--paper); color: var(--ink); box-shadow: 0 1rem 3rem rgba(23,33,27,.22); }
.owner-profile-dialog::backdrop { background: rgba(23,33,27,.44); }
.owner-profile-panel { display: grid; gap: .8rem; padding: 1rem; }
.owner-profile-header h2 { margin: 0; font-size: 1.1rem; }
.owner-profile-header p, .owner-profile-section p { margin: .2rem 0 0; line-height: 1.45; overflow-wrap: anywhere; }
.owner-profile-section { padding-top: .65rem; border-top: 1px solid var(--line); }
.owner-profile-section h3 { margin: 0; color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.owner-profile-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .55rem; padding-top: .3rem; }
.owner-profile-error { margin: 0; color: var(--muted); }
.owner-profile-empty { margin: 0; color: var(--muted); font-size: .82rem; }
.leave-work-dialog h2 { margin: 0; font-size: 1.1rem; }
.leave-work-dialog p { margin: 0; line-height: 1.5; }
.leave-work-error:empty { display: none; }
.leave-work-error { color: #8e3427; font-size: .82rem; }
.work-members-table { min-width: 0; border-top: 1px solid var(--line); }
.work-members-header, .work-members-row { display: grid; grid-template-columns: minmax(8rem,1.4fr) minmax(8rem,1fr) minmax(9rem,1.2fr) 5rem 5rem minmax(9rem,1fr); gap: .7rem; align-items: center; padding: .45rem .4rem; }
.work-members-header { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.work-members-row { font-size: .8rem; border-bottom: 1px solid var(--line); }
.work-members-row > * { min-width: 0; overflow-wrap: anywhere; }
.work-subscribers-table { min-width: 0; border-top: 1px solid var(--line); }
.work-subscribers-header, .work-subscribers-row { display: grid; grid-template-columns: minmax(9rem,1.3fr) minmax(7rem,.9fr) minmax(6rem,.7fr) minmax(8rem,.9fr) minmax(7rem,.7fr) auto; gap: .7rem; align-items: center; padding: .45rem .4rem; }
.work-subscribers-header.with-subject, .work-subscribers-row.with-subject { grid-template-columns: minmax(9rem,1.2fr) minmax(7rem,.8fr) minmax(10rem,1.2fr) minmax(6rem,.65fr) minmax(8rem,.85fr) minmax(7rem,.65fr) auto; }
.work-subscribers-header { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.work-subscribers-row { font-size: .8rem; border-bottom: 1px solid var(--line); }
.work-subscribers-row > * { min-width: 0; overflow-wrap: anywhere; }
.work-offer-table { min-width: 0; border-top: 1px solid var(--line); }
.work-offer-header, .work-offer-row { display: grid; grid-template-columns: minmax(11rem,1.5fr) minmax(7rem,.7fr) minmax(7rem,.7fr) auto; gap: .7rem; align-items: center; padding: .45rem .4rem; }
.work-offer-header { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.work-offer-row { font-size: .8rem; border-bottom: 1px solid var(--line); }
.work-offer-row > * { min-width: 0; overflow-wrap: anywhere; }
.work-offer-row .subscription-price, .subscription-confirm-price { white-space: nowrap; }
.subscription-offer-terms { display: grid; grid-template-columns: minmax(7rem,.65fr) minmax(0,1fr); gap: .45rem .8rem; margin: 0; }
.subscription-offer-terms dt { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.subscription-offer-terms dd { margin: 0; overflow-wrap: anywhere; }
.subscription-confirm-summary { display: grid; gap: .45rem; }
.subscription-confirm-summary p { margin: 0; line-height: 1.45; }
.subscription-payment-notice { padding: .6rem .7rem; border-radius: .45rem; background: var(--wash); font-weight: 700; }
.work-subscriptions-table { min-width: 0; border-top: 1px solid var(--line); }
.work-subscriptions-header, .work-subscriptions-row { display: grid; grid-template-columns: minmax(11rem,1.4fr) minmax(9rem,1fr) minmax(7rem,.7fr) minmax(6rem,.65fr) minmax(9rem,.9fr) minmax(9rem,.9fr); gap: .7rem; align-items: center; padding: .45rem .4rem; }
.work-subscriptions-header { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.work-subscriptions-row { font-size: .8rem; border-bottom: 1px solid var(--line); }
.work-subscriptions-row > * { min-width: 0; overflow-wrap: anywhere; }
.work-subscriptions-row .subscription-price { white-space: nowrap; }
.dashboard-route .shell { max-width: 86rem; }
.dashboard-summary { min-width:0; }
.dashboard-section { min-width: 0; padding: .2rem 0 .4rem; }
.dashboard-section + .dashboard-section { border-top: 1px solid var(--line); padding-top: .45rem; }
.dashboard-section > h2 { margin: 0 0 .4rem; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.45rem; }
.dashboard-metric { min-width: 0; min-height:2.5rem; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .35rem; padding: .3rem .5rem; border:1px solid var(--line); border-radius:.55rem; background:rgba(255,254,248,.7); color: var(--ink); text-decoration: none; }
.dashboard-metric:hover { border-color:#acbdaa; background: rgba(255, 254, 248, .96); }
.dashboard-metric-label { min-width:0; font-size: .8rem; font-weight: 750; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-metric-value { justify-self: end; font-size: 1rem; line-height: 1; color: var(--accent); }
.activity-table { min-width: 0; overflow-x: auto; }
.activity-header, .activity-row { min-width: 51rem; display: grid; grid-template-columns: 5.5rem minmax(16rem,1fr) 17rem 8rem 7rem; gap: .5rem; align-items: center; }
.activity-row > * { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.activity-header { padding: .45rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.activity-row { padding: .35rem .45rem; border-bottom: 1px solid var(--line); font-size: .8rem; }
.activity-row:hover { background: rgba(255, 254, 248, .62); }
.activity-lifecycle { justify-self:start; }
.badge.activity-lifecycle-active { background:#E3F2E8; color:#237448; }
.badge.activity-lifecycle-closed { background:#F8E2DF; color:#AD4842; }
.compact-empty { margin: 0; padding: .32rem 0; color: var(--muted); font-size: .8rem; }
.dashboard-upcoming { display:flex; align-items:baseline; flex-wrap:wrap; gap:.35rem .9rem; }
.dashboard-upcoming > h2 { margin:0; }
.my-work-empty { min-width: 0; padding: .7rem 0; border-top: 1px solid var(--line); }
.my-work-empty h2 { margin: 0 0 .3rem; font-size: .95rem; line-height: 1.35; }
.my-work-empty > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.empty-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .65rem; font-size: .82rem; }
.compact-empty-block { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .65rem; padding: .48rem 0; border-top: 1px solid var(--line); }
.compact-empty-block h2 { margin: 0; font-size: .88rem; }
.compact-empty-block p { margin: 0; font-size: .8rem; }
.compact-empty-block a { font-size: .8rem; }

.monitor-section { min-width: 0; padding: .2rem 0 .55rem; }
.monitor-section + .monitor-section { padding-top: .6rem; border-top: 1px solid var(--line); }
.monitor-section > h2, .monitor-section-heading h2 { margin: 0 0 .4rem; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.monitor-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.compact-link { font-size: .78rem; }
.monitor-metadata { max-width: 40rem; margin: 0; border-top: 1px solid var(--line); }
.monitor-metadata-row { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; padding: .42rem .4rem; border-bottom: 1px solid var(--line); font-size: .8rem; }
.monitor-metadata-row dt { color: var(--muted); }
.monitor-metadata-row dd { margin: 0; font-weight: 650; }
.context-table { min-width: 0; border-top: 1px solid var(--line); }
.context-table-header, .context-row { min-width: 0; display: grid; grid-template-columns: minmax(8rem, .75fr) minmax(14rem, 2fr) minmax(8rem, .7fr) 4rem; align-items: center; gap: 1rem; }
.context-table-header { padding: .38rem .4rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.context-row { padding: .5rem .4rem; border-bottom: 1px solid var(--line); font-size: .8rem; }
.context-row:hover { background: rgba(255, 254, 248, .62); }
.context-type, .context-updated { color: var(--muted); font-size: .76rem; }
.context-item { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.context-summary { min-width: 0; padding: .1rem 0 .45rem; }
.context-summary-metadata { max-width: 44rem; margin: 0; border-top: 1px solid var(--line); }
.context-summary-row, .revision-monitor-row { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; padding: .38rem .4rem; border-bottom: 1px solid var(--line); font-size: .78rem; }
.context-summary-row dt, .revision-monitor-row dt { color: var(--muted); }
.context-summary-row dd, .revision-monitor-row dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.context-revision-section { min-width: 0; padding: .55rem 0 .65rem; border-top: 1px solid var(--line); }
.context-revision-section > h2 { margin: 0 0 .38rem; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.revision-monitor-metadata { max-width: 44rem; margin: 0; }
.revision-monitor-content { max-width: 64rem; margin: .55rem 0 0; color: #29352d; font-size: .86rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.scheduled-next-none { margin: 0; padding: .48rem .4rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.stack-list, .revision-list { display: grid; gap: .8rem; }
.work-card, .detail-card, .state-card, .projection-card, .revision-card { min-width: 0; padding: 1.35rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(255, 254, 248, .9); box-shadow: 0 .7rem 2rem rgba(40, 58, 45, .05); }
.work-card h2, .detail-card h2, .state-card h2, .projection-card h2, .revision-card h3 { margin: 0 0 .7rem; overflow-wrap: anywhere; }
.work-card h2 { font-size: 1.2rem; }
.work-card h2 a { color: var(--ink); }
.detail-card { padding: clamp(1.4rem, 4vw, 2.25rem); }
.detail-card .button { margin-top: 1.25rem; }
.state-card { min-height: 13rem; display: grid; align-content: center; justify-items: start; }
.state-card p { max-width: 42rem; margin: 0 0 1.25rem; color: var(--muted); line-height: 1.6; }
.loading-card { grid-template-columns: auto 1fr; align-items: center; gap: .8rem; min-height: 8rem; }
.loading-card p { margin: 0; }
.spinner { width: 1.15rem; height: 1.15rem; border: .16rem solid #c8d2c7; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-color: var(--accent); } }

.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .65rem; color: var(--muted); font-size: .8rem; }
.badge { display: inline-flex; align-items: center; max-width: 100%; padding: .28rem .55rem; border-radius: 999px; background: #edf0eb; color: #435148; font-size: .72rem; font-weight: 800; letter-spacing: .03em; overflow-wrap: anywhere; }
.badge-role { background: var(--accent-soft); color: #275034; }
.badge-effective { background: #f7e8c6; color: #6c4813; }
.notice { margin: 1.25rem 0 0; padding: .9rem 1rem; border-left: .25rem solid var(--warm); background: #fff3eb; color: #67402e; }
.muted, .effective-at { color: var(--muted); }
.projection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.projection-card { padding: 1rem; }
.projection-card > h2 { font-size: .8rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.revision-card { box-shadow: none; }
.projection-card .revision-card { padding: 0; border: 0; background: transparent; }
.revision-card h3 { font-size: 1.05rem; }
.revision-content { margin: 1rem 0 0; color: #29352d; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.effective-at { margin: .75rem 0 0; font-size: .82rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.65rem; padding: .65rem 1rem; border: 1px solid var(--accent); border-radius: .65rem; background: var(--accent); color: white; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 750; text-decoration: none; }
.button:hover { background: #244c32; color: white; }
.button-secondary { border-color: var(--line); background: var(--paper); color: var(--ink); }
.button-secondary:hover { background: #edf2e9; color: var(--ink); }
.button-small { min-height: 2.25rem; padding: .45rem .8rem; font-size: .82rem; }
.pager { display: flex; justify-content: center; padding-top: 1.25rem; }
.my-work-pagination { justify-content: flex-end; align-items: center; gap: 12px; max-width: 100%; flex-wrap: wrap; }
.my-work-pagination button { min-height: 36px; flex-shrink: 0; }
.my-work-page-info { padding: 0 8px; white-space: nowrap; }
@media (max-width: 600px) { .my-work-pagination { justify-content: flex-start; } }
.noscript { margin: 1rem; padding: 1rem; border: 1px solid #a84a34; background: #fff3eb; }

@media (max-width: 1100px) {
  .work-members-header { display: none; }
  .work-members-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .3rem .7rem; }
  .work-members-row > *::before { display: block; color: var(--muted); font-size: .64rem; font-weight: 800; text-transform: uppercase; }
  .work-members-row > :nth-child(1)::before { content: "Name"; }
  .work-members-row > :nth-child(2)::before { content: "User"; }
  .work-members-row > :nth-child(3)::before { content: "Email"; }
  .work-members-row > :nth-child(4)::before { content: "Role"; }
  .work-members-row > :nth-child(5)::before { content: "Status"; }
  .work-members-row > :nth-child(6)::before { content: "Joined"; }
  .work-subscribers-header { display: none; }
  .work-subscribers-row, .work-subscribers-row.with-subject { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .3rem .7rem; }
  .work-offer-header { display: none; }
  .work-offer-row { grid-template-columns: 1fr; }
  .work-subscriptions-header { display: none; }
  .work-subscriptions-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .3rem .7rem; }
  .header-inner { flex-wrap: wrap; gap: .65rem 1rem; padding: .7rem 0; }
  .work-header-inner { width: min(100% - 1.2rem, 72rem); flex-wrap: nowrap; }
  .work-header-actions { gap: .45rem; }
  .auth-actions { margin-left: auto; }
  .page-heading { align-items: start; flex-direction: column; gap: 1rem; }
  .card-grid, .projection-grid { grid-template-columns: 1fr; }
  .route-tabs { overflow-x: auto; }
  .my-work-route .page-actions { width: 100%; justify-content: flex-start; }
  .shell { width: 100%; padding: 1.25rem 1rem 3rem; }
  .dashboard-metric { grid-template-columns: minmax(8rem, 1fr) auto; gap: .2rem .75rem; }
  .dashboard-metric-value { grid-column: 2; }
}
@media (max-width: 1100px) and (min-width: 601px) {
  .dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-metric { grid-template-columns:minmax(0,1fr) auto; }
}
@media (max-width: 420px) {
  .header-inner { width: min(100% - 1.2rem, 72rem); }
  .work-card, .detail-card, .state-card, .projection-card, .revision-card { padding: 1rem; }
  h1 { font-size: 2.15rem; }
  .session-row > .button { align-self: start; }
}

/* Canonical Work global navigation: one persistent LNB, promoted to a drawer
   without duplicating navigation markup on compact viewports. */
body { overflow-x: hidden; }
.nav-toggle { display: none; margin-left: auto; }
.work-layout { min-height: calc(100vh - 4.5rem); display: grid; grid-template-columns: 15rem minmax(0, 1fr); }
.lnb { position: sticky; top: 4.5rem; height: calc(100vh - 4.5rem); display: flex; flex-direction: column; padding: 1rem .75rem; border-right: 1px solid var(--line); background: rgba(255, 254, 248, .74); }
.lnb nav { display: grid; gap: .25rem; }
.lnb a, .lnb .auth-actions button { width: 100%; min-height: 2.7rem; display: flex; align-items: center; justify-content: space-between; padding: .65rem .75rem; border-radius: .6rem; color: var(--ink); font-weight: 700; text-decoration: none; }
.lnb a:hover, .lnb a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
/* Preserve the green reauthentication CTA without inheriting dark nav ink. */
.reauth-work-route .lnb .auth-actions a.button { color: var(--paper); white-space: normal; overflow-wrap: anywhere; }
.reauth-work-route .lnb .auth-actions a.button:hover { background: #244c32; color: var(--paper); }
.lnb a[aria-current="page"] { box-shadow: inset .22rem 0 var(--accent); }
.lnb-user { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.nav-badge { min-width: 1.35rem; padding: .1rem .35rem; border-radius: 999px; background: var(--warm); color: white; font-size: .7rem; text-align: center; }
.lnb #people-link { justify-content: flex-start; gap: 7px; }
.nav-backdrop { display: none; }

/* Public Work mini-homepage is a distinct landing shell. It never inherits
   the authenticated app grid or its LNB. */
.public-shell { min-height: 100vh; }
.landing-shell[hidden], .public-shell[hidden], .app-shell[hidden] { display: none !important; }
.landing-shell { min-height: 100vh; }
.landing-canvas { width: min(100% - 2rem, 58rem); margin: 0 auto; padding: clamp(4rem, 12vw, 9rem) 0 6rem; }
.landing-heading { max-width: 52rem; }
.landing-heading h1 { max-width: 18ch; font-size: clamp(2.8rem, 8vw, 5.8rem); }
.landing-content { margin-top: 2rem; }
.public-header-inner { justify-content: space-between; }
.public-global-actions { margin-left: auto; display: flex; align-items: center; gap: .55rem; }
.public-auth-actions { margin-left: auto; }
.public-canvas { width: min(100% - 2rem, 44rem); margin: 0 auto; padding: clamp(1.6rem, 4vw, 3.2rem) 0 4rem; }
.public-heading { max-width: 40rem; }
.public-heading h1 { max-width: 20ch; margin: .3rem 0 .4rem; font-size: clamp(1.8rem, 4.8vw, 3.25rem); line-height: .98; }
.public-heading .lede { line-height: 1.45; }
.public-content { margin-top: clamp(.8rem, 2vw, 1.2rem); }
.mini-homepage { max-width: 40rem; display: grid; }
.mini-home-profile { padding: .55rem 0 1.1rem; }
.mini-home-profile h3 { margin: 0 0 .45rem; font-size: clamp(1.5rem, 3vw, 1.75rem); line-height: 1.2; overflow-wrap: anywhere; }
.mini-home-section { min-width: 0; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.mini-home-section h2 { margin: 0 0 .55rem; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.mini-home-copy { max-width: 40rem; margin: 0; color: var(--muted); font-size: clamp(1.125rem, 2.2vw, 1.25rem); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.mini-home-collaboration { min-width: 0; padding-top: .85rem; border-top: 1px solid var(--line); }
.mini-home-collaboration h2 { margin: 0 0 .35rem; font-size: 1rem; line-height: 1.3; }
.mini-home-collaboration p { margin: 0; line-height: 1.5; }
.mini-home-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .75rem; padding-top: .75rem; }
.mini-home-actions .button { min-height: 2.4rem; padding: .55rem .85rem; font-size: .85rem; }
.public-handle { margin: 0; color: var(--accent); font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; }

.people-find-section, .people-section { min-width: 0; padding: .2rem 0 .45rem; }
.people-tabs { display: flex; gap: .3rem; overflow-x: auto; max-width: 100%; margin: .65rem 0 .5rem; border-bottom: 1px solid var(--line); }
.people-tabs a { flex-shrink: 0; padding: .45rem .65rem; font-size: .85rem; font-weight: 700; white-space: nowrap; text-decoration: none; border-bottom: 2px solid transparent; }
.people-tabs a[aria-current=page] { color: var(--accent); border-bottom-color: var(--accent); }
.people-tabs a { display: inline-flex; align-items: center; gap: 7px; }
.tab-count-badge { flex-shrink: 0; line-height: 1; }
.people-tab-panel { min-width: 0; padding: 0; }
.people-find-section + .people-section, .people-section + .people-section, .people-search-host:not(:empty) + .people-section { padding-top: .55rem; border-top: 1px solid var(--line); }
.people-find-section > h2, .people-section > h2 { margin: 0 0 .32rem; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.people-list { display: grid; margin: 0; padding: 0; list-style: none; }
.people-table-header, .people-row { min-width: 0; display: grid; grid-template-columns: minmax(10rem, 1.1fr) minmax(7rem, .8fr) minmax(13rem, 1.7fr) minmax(5rem, .55fr) auto; align-items: center; gap: 1rem; }
.people-table-header.people-contact-grid, .people-row.people-contact-grid { grid-template-columns: minmax(9rem, 1fr) minmax(7rem, .7fr) minmax(11rem, 1.15fr) minmax(11rem, 1.25fr) minmax(5rem, .5fr) auto; }
.people-table-header { padding: .45rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.people-row { padding: .48rem .4rem; border-bottom: 1px solid var(--line); font-size: .8rem; }
.people-row:hover { background: rgba(255, 254, 248, .62); }
.person-primary, .person-about { min-width: 0; display: grid; gap: .16rem; }
.person-name { font-weight: 750; overflow-wrap: anywhere; }
.person-handle, .person-state, .person-bio, .person-email { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
.person-email { font-size: .75rem; }
.people-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.people-action-feedback { flex-basis: 100%; margin: .15rem 0 0; color: #963b2b; font-size: .78rem; line-height: 1.35; }
.people-find { display: flex; align-items: end; gap: .4rem; flex-wrap: wrap; }
.people-find label { display: grid; gap: .16rem; color: var(--muted); font-size: .72rem; }
.people-find input { width: min(24rem, 72vw); min-height: 2rem; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--paper); color: var(--ink); font: inherit; font-size: .8rem; }
.people-search-host:empty { display: none; }
.people-search-results { margin-top: .5rem; border-top: 1px solid var(--line); }
.people-search-row .button { min-height: 2rem; padding: .35rem .65rem; font-size: .76rem; }

/* Crew's six-column table must fit beside the sidebar at medium widths.
   Keep the profile action at its intrinsic width; let text columns shrink. */
@media (min-width: 821px) and (max-width: 1199px) {
  .people-tabs:has(> a[href="/people?tab=crew"][aria-current="page"]) + .people-tab-panel .people-contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) minmax(0, 1.15fr) minmax(0, 1.25fr) max-content max-content;
  }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .work-layout { display: block; }
  .lnb { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(18rem, 86vw); height: 100vh; transform: translateX(-105%); transition: transform .18s ease; box-shadow: 1rem 0 3rem rgba(23, 33, 27, .2); }
  body.nav-open .lnb { transform: translateX(0); }
  .nav-backdrop { position: fixed; z-index: 35; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(23, 33, 27, .45); }
  body.nav-open .nav-backdrop { display: block; }
  .people-table-header { display: none; }
  .people-row, .people-row.people-contact-grid { grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .75rem; align-items: start; }
  .person-handle, .person-email, .person-about, .person-state { grid-column: 1; }
  .people-actions { grid-column: 2; grid-row: 1 / span 5; justify-content: flex-end; }
  .context-table-header { display: none; }
  .context-row { grid-template-columns: minmax(0, 1fr) auto; gap: .22rem .7rem; align-items: start; }
  .context-type, .context-item, .context-updated { grid-column: 1; }
  .context-row > .button { grid-column: 2; grid-row: 1 / span 3; }
  .monitor-metadata-row { grid-template-columns: 7rem minmax(0, 1fr); }
  .context-summary-row, .revision-monitor-row { grid-template-columns: 6.5rem minmax(0, 1fr); gap: .6rem; }
  .breadcrumbs { overflow: hidden; }
  .breadcrumbs li { max-width: min(12rem, 58vw); }
  .back-action { min-height: 2rem; }
  .back-link { max-width: min(100%, 18rem); }
  .public-canvas { width: min(100% - 1.2rem, 44rem); padding-top: 1.25rem; }
  .public-header-inner { width: min(100% - 1.2rem, 72rem); gap: .65rem; }
  .public-global-actions { flex-wrap: wrap; justify-content: flex-end; }
  .landing-canvas { width: min(100% - 1.2rem, 58rem); padding-top: 3rem; }
  .landing-content .button { width: 100%; }
  .mini-home-section .button { width: 100%; }
}

/* Session History stays scoped to Work's read-only monitor. */
.work-history-search{display:flex;align-items:end;flex-wrap:wrap;gap:16px;margin:.65rem 0 .25rem}
.work-history-search label{display:grid;gap:.35rem;width:min(100%,22rem);min-width:0;font-weight:700}
.work-history-search input{width:100%;min-width:0;font:inherit}
.work-history-table{min-width:0;border-top:1px solid var(--line)}
.work-history-header,.work-history-row{display:grid;grid-template-columns:minmax(9rem,.9fr) minmax(7rem,.9fr) minmax(7rem,.8fr) minmax(11rem,1.5fr) minmax(11rem,1.2fr) minmax(4rem,.45fr);align-items:center;gap:.8rem;padding:.5rem .4rem;border-bottom:1px solid var(--line)}
.work-history-header{color:var(--muted);font-size:.7rem;font-weight:800;text-transform:uppercase}
.work-history-row>*{min-width:0;overflow-wrap:anywhere}
.work-history-request{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;word-break:break-all}
.work-history-event{width:max-content;max-width:100%;padding:.18rem .48rem;border:1px solid;border-radius:.4rem;font-size:.75rem;font-weight:700;line-height:1.35}
.work-history-blue{color:#174776;background:#eaf2fc;border-color:#91b5dc}
.work-history-green{color:#205432;background:#eaf5eb;border-color:#9fc6a7}
.work-history-teal{color:#105961;background:#e8f5f5;border-color:#90bdc0}
.work-history-red{color:#852b30;background:#fbecee;border-color:#daa4a7}
.work-history-gray{color:#48505a;background:#f0f2f3;border-color:#bdc4ca}
.work-history-neutral{color:#44524d;background:#f2f5f1;border-color:#c2ccc4}
.work-history-view{justify-self:start}
.work-history-detail{padding:.7rem .8rem;border-bottom:1px solid var(--line);border-left:2px solid var(--line);overflow-wrap:anywhere}
.work-history-detail[hidden]{display:none}
.work-history-detail h3{margin:0;font-size:.95rem}
.work-history-detail-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem 1rem;margin:.6rem 0}
.work-history-detail-pair{min-width:0}
.work-history-detail-pair dt{font-size:.72rem;color:var(--muted)}
.work-history-detail-pair dd{margin:0;overflow-wrap:anywhere}
.work-history-detail-error{color:#852b30}
@media(max-width:1100px){.work-history-header{display:none}.work-history-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.work-history-search label{width:100%}.work-history-header{display:none}.work-history-row{grid-template-columns:minmax(0,1fr);gap:.28rem}.work-history-row>*{max-width:100%}.work-history-detail-fields{grid-template-columns:1fr}}
.context-type-change { margin: .6rem 0 1rem; padding: .8rem; border: 1px solid var(--line); max-width: 44rem; }
.context-type-change h3 { margin: 0 0 .5rem; }
.context-type-change p { margin: .35rem 0; overflow-wrap: anywhere; }
.context-type-change label { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: .65rem 0; }
.context-type-change select { max-width: 100%; }
.context-type-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .7rem; }
.context-type-error { color: #922; }
.context-type-history { max-width: 44rem; border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .5rem; }
.context-type-history p { overflow-wrap: anywhere; }
