.space-home {
  --space-rail: 250px;
  --space-dock-height: 78px;
  --glass: color-mix(in srgb, var(--surface-2) 88%, transparent);
  color: var(--ink); background: var(--bg);
  height: 100dvh; display: flex; flex-direction: column;
}
:root[data-palette="house"] .space-home {
  color-scheme: dark;
  --bg: #101317; --surface: #181d23; --surface-2: #242b34;
  --ink: #f3f6fa; --muted: #afbac6; --rule: #414a55;
  --accent: var(--brand-blue); --accent-text: var(--brand-blue-light); --accent-ink: #0c1b30;
  --live: var(--accent-text); --tone-ink: var(--ink);
}
.space-home .top, .space-home [hidden] { display: none !important; }
.space-home #space-head, .space-home #space-menu, .space-home #space-more,
.space-home #space-player-toggle { color: var(--ink); }
.space-home svg:not(.mark-svg) { flex-shrink: 0; }
#space-head, #space-player, #space-panel, #space-drawer, #space-nav { font-family: var(--sans); }
#space-head svg, #space-player svg, #space-panel svg, #space-drawer svg, #space-nav svg { width: 21px; height: 21px; display: block; }
#space-head { z-index: 6; flex: none; min-height: 62px; padding: max(6px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 6px max(14px,env(safe-area-inset-left)); display: flex; align-items: center; gap: 12px; position: relative; background: var(--bg); border-bottom: 1px solid color-mix(in srgb,var(--rule) 55%,transparent); }
#space-menu, .space-head-actions, #space-options, #space-nav {
  background: var(--glass); border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb,var(--ink) 6%,transparent),0 4px 18px #0002; backdrop-filter: blur(18px);
}
#space-menu, .space-head-actions button, #space-drawer header button, .space-player-tools button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%;
}
#space-menu { border-radius: 50%; }
.space-title { min-width: 0; flex: 1; display: grid; gap: 2px; }
.space-title strong { font-size: 17px; line-height: 1.2; font-weight: 650; letter-spacing: -.025em; }
.space-title small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.space-title > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-head-actions { display: flex; border-radius: 32px; }
.space-head-actions button[aria-expanded="true"] { color: var(--accent-text) !important; }
#space-options { position: absolute; z-index: 8; right: 12px; top: calc(100% - 3px); padding: 5px; display: grid; border-radius: 14px; }
#space-options > * { display: flex; align-items: center; padding: 0 14px; min-height: 44px; text-align: left; color: var(--ink); text-decoration: none; border-radius: 9px; }
#space-options > *:hover, #space-drawer nav a:hover { background: var(--surface-2); }
.space-home .room-frame { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; padding: 0 0 calc(var(--space-dock-height) + env(safe-area-inset-bottom)); }
.space-home #app { height: 100%; min-height: 0; margin: 0 auto; }
#space-panel { min-height: 0; flex: 1; width: min(100%, 900px); padding: 28px 18px 32px; margin: 0 auto; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; overflow-wrap: anywhere; }
#space-panel h1 { font: 640 clamp(30px,5vw,46px)/1.1 var(--sans); letter-spacing: -.045em; margin-bottom: 22px; }
#space-panel h2 { font-size: 19px; line-height: 1.25; margin: 14px 0 8px; letter-spacing: -.02em; }
#space-panel .space-date, #space-panel .space-subhead, #space-panel .space-row-link small, #space-panel .space-event small, .space-treasury > small { font: 500 12px/1.45 var(--sans); color: var(--muted); }
#space-panel .space-date { margin: 22px 0 8px; font-weight: 650; color: var(--accent-text); }
.space-event { display: grid; grid-template-columns: 14px minmax(0,1fr); gap: 12px; padding: 12px 0; align-items: baseline; }
.event-pin { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.space-event p { font-size: 16px; }
.space-segments { display: flex; align-items: stretch; padding: 3px; gap: 4px; max-width: 520px; background: var(--surface); border-radius: 16px; margin: 12px 0 20px; }
.space-segments a { display: grid; place-items: center; min-height: 42px; flex: 1; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; border-radius: 13px; }
.space-segments [aria-current] { background: var(--surface-2); color: var(--ink); }
.space-segments + .space-segments { background: none; margin-top: -12px; max-width: 220px; border-radius: 0; }
.space-row-link { width: 100%; display: flex; text-decoration: none; color: var(--ink); gap: 14px; align-items: flex-start; padding: 16px 2px; text-align: left; min-height: 48px; border-bottom: 1px solid var(--rule); }
.space-row-link > svg { color: var(--accent-text); margin-top: 3px; }
.space-row-link > span:not(.space-check) { display: grid; flex: 1; gap: 4px; min-width: 0; }
.space-row-link strong { font: 600 17px/1.25 var(--sans); letter-spacing: -.016em; }
.space-row-link > svg:last-child { align-self: center; width: 16px !important; color: var(--muted); }
.space-desc { color: var(--muted); font: 400 15px/1.5 var(--sans); }
.space-action-row, #space-panel .discovery-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding-block: 12px; }
.space-action-row > *, .space-empty a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-text); font-size: 14px; }
.space-empty { min-height: 170px; display: grid; align-content: center; justify-items: start; color: var(--muted); }
.space-empty svg { color: var(--accent-text); }
.space-empty h2 { color: var(--ink); }
.space-treasury strong { display: block; font-size: clamp(34px,6vw,60px); font-weight: 550; letter-spacing: -.055em; line-height: 1.2; }
.space-treasury { margin: 26px 0; }
.space-treasury p { color: var(--muted); }
#space-panel #ticket, #space-panel #modes { max-width: 520px; }
#space-panel #ticket .primary { width: 100%; min-height: 46px; }
#space-panel .market-card { padding: 16px 0; border-bottom: 1px solid var(--rule); }
#space-panel .market-card small { color: var(--muted); }
#space-panel .market-card h3 { font-size: 22px; line-height: 1.18; margin: 7px 0; }
.space-build-card { position: relative; width: 100%; max-width: 560px; overflow: hidden; background: var(--surface); border-radius: 14px; }
.space-build-card img { width: 100%; max-height: 210px; object-fit: cover; }
.space-build-card span { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-weight: 600; }
#space-player { margin-inline: auto; width: min(100%,800px); height: clamp(105px, 29dvh, 330px); position: relative; min-height: 0; flex: none; display: flex; overflow: hidden; background: #101317; border-bottom: 1px solid var(--rule); }
#space-player iframe { flex: 1; width: 100%; height: 100%; min-width: 0; border: none; }
.space-player-tools { position: absolute; top: 4px; right: 8px; display: flex; align-items: center; border-radius: 25px; background: #20211de6; color: #fbfaf7; }
.space-player-tools strong { display: none; }
#space-player[data-size="mini"] { height: 56px; justify-content: flex-start; background: var(--surface); color: var(--ink); }
#space-player[data-size="mini"] iframe { position: absolute; left: 12px; top: 6px; flex: none; width: 80px; height: 44px; border-radius: 7px; pointer-events: none; }
#space-player[data-size="mini"] .space-player-tools { position: static; flex: 1; color: inherit; background: none; }
#space-player[data-size="mini"] strong { display: block; margin: 0; flex: 1; font-size: 14px; }
#space-drawer { inset: 0 auto 0 0; padding: max(18px,env(safe-area-inset-top)) 14px 22px; margin: 0; width: min(84vw,310px); min-height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0 22px 22px 0; background: var(--bg); color: var(--ink); overflow-y: auto; }
#space-drawer::backdrop { background: #050605aa; backdrop-filter: blur(3px); }
#space-drawer header { display:flex; justify-content:space-between; align-items:center; padding:0 6px 10px; }
#space-drawer header > strong { font-size: 23px; letter-spacing:-.035em; }
#space-drawer header button { color: var(--muted); }
#space-drawer a { text-decoration: none; color:var(--ink); }
#space-drawer nav a, .space-team-list a, .new-space, .space-utilities a { min-height:44px; display:flex; gap:12px; align-items:center; border-radius: 14px; padding:7px 12px; }
.space-avatar { display:grid; place-items:center; border-radius:11px; width:34px; height:34px; background:var(--surface-2); color:var(--accent-text); font:600 12px var(--mono); flex:none; }
.space-team-list strong { overflow-wrap:anywhere; }
.space-team-list a[aria-current], #space-drawer nav [aria-current] { background: var(--surface-2); }
#space-drawer .new-space { color: var(--accent-text); }
#space-drawer:focus { outline:none; }
#space-drawer .drawer-browse > :is(nav,.space-utilities) { margin-top:16px; }
#space-drawer .space-utilities a { font-size:14px; color:var(--muted); }
.space-home #space-nav { position: fixed !important; z-index: 8; left: max(10px,env(safe-area-inset-left)); right: max(10px,env(safe-area-inset-right)); bottom: max(8px,env(safe-area-inset-bottom)); display: flex !important; gap:1px; width:auto; max-width: 510px; margin-inline:auto !important; min-height: 58px; padding:4px; border-radius:32px; }
.space-home #space-nav a { display: grid; place-content:center; justify-items:center; flex:1; min-width:0; min-height:48px; gap:3px; border-radius:25px; color:var(--muted); text-decoration:none; font:550 10px/1.25 var(--sans); }
.space-home #space-nav [aria-current] { background: color-mix(in srgb,var(--ink) 10%,transparent); color:var(--accent-text); }
.space-home.studio-open #space-nav {display:none !important;}
@media (min-width:1000px) {
  .space-home { --space-dock-height:0px; }
  .space-home.space-sidebar { padding-left:var(--space-rail); }
  #space-head { min-height:72px; padding-inline:clamp(24px,4vw,72px); }
  #space-panel { padding:40px 34px; }
  .space-home #space-drawer { position:fixed; z-index:7; width:var(--space-rail); border-radius:0; box-shadow:none; background:color-mix(in srgb,var(--bg) 90%,var(--ink)); }
  #space-head { border-bottom:0; }
  .space-home #space-nav {
    position:relative !important; inset:auto; z-index:4; flex:0 0 auto;
    justify-content:flex-start; gap:3px; width:100%; max-width:none;
    min-height:46px; margin:0 !important; padding:0 clamp(24px,4vw,72px);
    background:var(--bg); border:0; border-bottom:1px solid color-mix(in srgb,var(--rule) 62%,transparent);
    border-radius:0; backdrop-filter:none; box-shadow:none;
  }
  .space-home #space-nav a {
    display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto;
    position:relative; min-height:45px; gap:8px; padding-inline:13px; border-radius:6px 6px 0 0;
    font:550 14px/1.2 var(--sans); letter-spacing:-.015em;
  }
  .space-home #space-nav svg { width:17px; height:17px; stroke-width:1.7; }
  .space-home #space-nav a[aria-current] { background:transparent; color:var(--accent-text); }
  .space-home #space-nav a[aria-current]::after {
    position:absolute; content:""; inset:auto 10px -1px; height:2px; border-radius:2px; background:var(--accent);
  }
  .space-home #space-nav a:focus-visible { outline-offset:-3px; }
  .space-home #space-nav a:hover { background:var(--surface); color:var(--ink); }
  #space-player { border-radius:0 0 13px 13px; }
}
@media(prefers-reduced-transparency:reduce){ #space-nav,#space-options,.space-head-actions,#space-menu {background:var(--surface-2);backdrop-filter:none;} }
.space-vote { min-height: 44px; padding: 0 14px; margin: 4px 0 12px; border: 1px solid var(--rule); border-radius: 22px; color: var(--accent-text); background: var(--surface); }

#space-presence {
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center;
  min-height: 44px;
  text-decoration: none;
  color: inherit;
}
#space-presence .team-heading-line { display:flex; align-items:baseline; gap:8px; max-width:100%; }
#space-name, #space-context { max-width:100%; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
#space-presence .space-online {
  flex:none;
  color: var(--accent-text);
  font: 600 11px/1.3 var(--sans);
}
.space-online::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; display:inline-block; vertical-align:2px; margin-right:4px; }
.space-section-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.space-section-heading a, .event-task { display:inline-flex; align-items:center; min-height:44px; gap:6px; color:var(--accent-text); font:600 14px/1.35 var(--sans); text-decoration:none; }
#space-panel .space-explore svg, #space-panel .event-task svg { width:14px; height:14px; }
#space-panel .library-links { max-width:none; border:0; border-bottom:1px solid var(--rule); padding:0; border-radius:0; margin:2px 0 20px; background:none; justify-content:flex-start; gap:20px; }
#space-panel .library-links a { flex:0 1 auto; border-radius:0; background:none; color:var(--muted); padding-inline:2px; border-bottom:2px solid transparent; }
#space-panel .library-links [aria-current] { color:var(--ink); border-bottom-color:var(--accent); }
.library-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:22px 30px; align-items:start; }
.library-feature { min-width:0; }
#space-panel .library-layout h2, #space-panel .funding-history h2 { margin:0 0 10px; font:600 16px/1.3 var(--sans); }
.library-build {
  isolation:isolate; position:relative; display:grid; align-items:end; justify-content:start; text-align:left;
  width:100%; min-height:155px; aspect-ratio:2.6; overflow:hidden; padding:18px; border:1px solid var(--rule);
  border-radius:16px; color:white; background:#262923;
}
.library-build img, .library-build::after { position:absolute; inset:0; width:100%; height:100%; z-index:-1; object-fit:cover; }
.library-build::after { content:""; background:linear-gradient(0deg,rgba(13,14,12,.94),rgba(13,14,12,.34) 55%,transparent); }
.library-build img { object-position:50% 54%; }
.library-build-label { display:grid; gap:2px; }
.library-build-label strong { font-size:22px; font-weight:650; letter-spacing:-.025em; }
.library-build-label small { font-size:12px; color:#f4e4da; }
.library-play { display:grid; place-items:center; position:absolute; right:15px; bottom:17px; width:42px; height:42px; border-radius:50%; color:var(--accent-ink); background:var(--accent); }
.library-play svg { fill:currentColor; }
.library-files { min-width:0; }
.library-doc, .library-delivery { width:100%; border-bottom:1px solid var(--rule); }
.library-doc summary, .library-delivery { display:flex; min-height:58px; gap:12px; align-items:center; color:inherit; text-align:left; padding:7px 0; background:transparent; cursor:pointer; }
.library-doc summary::-webkit-details-marker, .sample-flow summary::-webkit-details-marker { display:none; }
.library-symbol { display:grid; place-items:center; width:36px; height:40px; border-radius:9px; background:var(--surface-2); color:var(--accent-text); }
.library-files strong, .library-files small { display:block; }
.library-files strong { font:600 15px/1.35 var(--sans); }
.library-files small { font-size:12px; color:var(--muted); margin-top:2px; }
.library-doc summary > svg:last-child, .library-delivery > svg:last-child { margin-left:auto; width:15px !important; color:var(--muted); }
.library-doc[open] summary > svg:last-child { transform:rotate(180deg); }
.library-doc p { padding:4px 6px 16px 48px; white-space:pre-line; color:var(--muted); line-height:1.5; }
.funding-layout { display:grid; align-items:start; gap:16px 30px; }
.funding-layout .space-treasury { margin:0; border-radius:15px; border:1px solid var(--rule); background:var(--surface); padding:17px; }
.space-treasury dl { margin:14px 0; }
.space-treasury dl > div { display:flex; justify-content:space-between; align-items:baseline; gap:12px; }
.space-treasury dt, .funding-unit { color:var(--muted); font-size:13px; }
.space-treasury dd { margin:0; font-size:14px; font-variant-numeric:tabular-nums; }
.funding-unit { display:block; padding-top:10px; border-top:1px solid var(--rule); }
.funding-ticket { min-width:0; }
.funding-ticket .segments button, .funding-ticket .wallet-line button { min-height:44px; }
.funding-ticket .field :is(input,select) { min-height:44px; font-size:16px; }
.funding-history { margin-top:28px; }
.funding-history ul { list-style:none; padding:0; }
.funding-history li { padding:9px 0; border-bottom:1px solid var(--rule); }
.funding-history time { display:block; font-size:12px; color:var(--muted); }
.sample-flow { margin-top:24px; border-top:1px solid var(--rule); }
.sample-flow summary { min-height:48px; display:flex; align-items:center; gap:10px; font-size:15px; font-weight:600; cursor:pointer; }
.sample-flow summary small { color:var(--muted); font-size:12px; font-weight:400; }
#space-panel .sample-flow summary svg { margin-left:auto; width:16px; }
.sample-flow[open] summary svg { transform:rotate(180deg); }
.sample-flow ol { list-style:decimal; padding:0 0 0 25px; color:var(--muted); }
.sample-flow li { padding:4px 0 10px; }
.sample-flow li strong, .sample-flow li span { display:block; }
.sample-flow li strong { color:var(--ink); }
@media (min-width:720px) {
  .library-layout.with-build, .funding-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .library-build { aspect-ratio:1.85; }
  .funding-layout .space-treasury { padding:22px; }
}
@media (max-width:370px) {
  #space-head { padding-inline:8px; gap:7px; }
  #space-presence { column-gap:5px; }
  #space-presence .space-online { font-size:10px; }
}

.drawer-search { display:flex; align-items:center; gap:8px; padding-inline:10px; background:var(--surface-2); border:1px solid var(--rule); border-radius:12px; margin-bottom:14px; }
#space-drawer .drawer-search svg { width:17px; height:17px; color:var(--muted); }
.drawer-search input { border:0; padding:8px 0; min-height:44px; min-width:0; width:100%; border-radius:0; background:transparent; color:var(--ink); font:400 16px/1.3 var(--sans); }
.drawer-search:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.drawer-search input:focus-visible { outline:none; }
#space-search-results :is(h3,p) { color:var(--muted); font-size:12px; margin:12px 3px 4px; }
#space-search-results :is(button,a) { width:100%; display:grid; align-content:center; gap:2px; min-height:44px; color:inherit; padding:5px 8px; text-align:left; border-radius:8px; overflow-wrap:anywhere; }
#space-search-results :is(button,a):hover { background:var(--surface-2); }
#space-search-results strong { font-size:14px; }
#space-search-results small { color:var(--muted); font-size:12px; }
#space-panel .explore-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr)); gap:8px; margin:16px 0 25px; }
.explore-tile { display:grid; grid-template-columns:1fr auto; gap:4px; align-content:start; text-decoration:none; padding:13px; border:1px solid var(--rule); background:var(--surface); border-radius:14px; color:var(--ink); }
.explore-icon, .explore-tile > strong, .explore-tile > small { grid-column:1; }
.explore-icon { color:var(--accent-text); padding-bottom:6px; }
.explore-tile > small { color:var(--muted); line-height:1.4; }
#space-panel .explore-tile > svg { grid-column:2; grid-row:1; width:15px; color:var(--muted); }
#space-panel .feed-discovery h2 { margin:14px 0 0; }
.space-home .event-actions { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; margin-top:7px; }
.space-home .event-actions [data-context-action] { min-height:36px; min-width:46px; padding:5px 12px; border:1px solid var(--rule); border-radius:20px; color:var(--ink); background:var(--surface); font:600 13px/1.3 var(--sans); }
.space-home .event-actions [data-context-action]:first-child { color:var(--accent-text); }
@media(pointer:coarse) { .space-home .event-actions [data-context-action] { min-height:44px; } }
.week-section { margin:22px 0 32px; }
.week-section header { display:flex; align-items:baseline; justify-content:space-between; gap:6px 16px; flex-wrap:wrap; }
.week-section h2 { margin:0; font-weight:550; letter-spacing:-.025em; }
.week-section small,.week-section p { color:var(--muted); }
.week-section header small { font:11px var(--mono, monospace); }
.week-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:16px 0; margin:10px 0 4px; border-block:1px solid var(--rule); }
.week-stats strong,.week-stats span,.week-worker small { display:block; }
.week-stats strong { font-variant-numeric:tabular-nums; font-size:clamp(19px,3vw,32px); font-weight:500; letter-spacing:-.045em; overflow-wrap:anywhere; }
.week-stats span,.week-worker small,.week-worker p { font-size:13px; }
.week-worker { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:3px 12px; padding:12px 0; border-bottom:1px solid var(--rule); }
.week-worker p { margin:0; }
#space-drawer header .new-space { flex:none; margin-left:auto; padding:2px 8px; min-height:44px; gap:4px; font:600 14px/1.2 var(--sans); }
#space-drawer header .new-space svg { width:16px; height:16px; }
#space-drawer header .new-space:hover { background:var(--surface-2); }

.resources-overview { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
.resources-overview section { min-width:0; border:1px solid var(--rule); border-radius:16px; background:var(--surface); padding:18px; }
.resources-overview section > header { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:0 8px; }
#space-panel .resources-overview h2 { margin:0; font:600 16px/1.35 var(--sans); letter-spacing:-.02em; }
.resources-overview section > strong { display:block; margin-top:10px; font:600 clamp(24px,4vw,40px)/1.15 var(--sans); letter-spacing:-.045em; }
.resources-overview .resource-token { background:linear-gradient(125deg,color-mix(in srgb,var(--surface) 93%,var(--accent)),var(--surface)); }
.resources-overview .resource-token > strong { font-size:clamp(38px,6vw,60px); }
.resource-token strong span { font:500 15px var(--sans); letter-spacing:0; color:var(--muted); }
.resources-overview small, .resources-overview dt, .resources-overview p { color:var(--muted); font:400 13px/1.45 var(--sans); }
.resources-overview p { margin:10px 0 0; }
.resources-overview dl { margin:14px 0 0; }
.resources-overview dd { margin:0; font:600 15px/1.4 var(--sans); }
.resource-capital dl > div { display:flex; justify-content:space-between; gap:8px; padding:3px 0; }
.resources-overview header a { display:inline-flex; align-items:center; min-height:44px; margin-block:-4px; color:var(--accent-text); font-size:13px; }
#space-panel .resource-allocation { width:100%; height:6px; border-radius:6px; margin:16px 0 0; overflow:hidden; }
.allocation-0 { fill:var(--accent); } .allocation-1 { fill:var(--ink); } .allocation-2 { fill:var(--muted); }
.resource-supply { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.resources-overview table { width:100%; border-collapse:collapse; margin-top:10px; font-size:13px; font-variant-numeric:tabular-nums; }
.resources-overview :is(th,td) { text-align:right; padding:8px 2px; border-bottom:1px solid var(--rule); }
.resources-overview tr > :first-child { text-align:left; }
.resources-overview th { font-weight:500; }
.resources-overview thead th { color:var(--muted); font-size:12px; vertical-align:bottom; }
@media(min-width:720px) {
  .resources-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .resource-wide { grid-column:1/-1; }
}
@media(max-width:370px) {
  #space-panel .library-links { gap:12px; }
  .resources-overview section { padding:14px; }
}
.resource-credit { display:grid; gap:8px 16px; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); padding-top:12px; border-top:1px solid var(--rule); }
.space-section-heading.resource-heading { align-items:center; padding-bottom:10px; gap:2px 10px; }
#space-panel .resource-heading h1 { margin:0; }
.resource-heading a { color:var(--muted); font-size:13px; }

#space-panel .space-task-entry {
  margin:10px 0; padding:12px 15px 5px; border-radius:16px;
  background:var(--surface); border:1px solid color-mix(in srgb,var(--rule) 65%,transparent);
}
#space-panel .task-open.space-row-link { display:grid; gap:6px; min-height:44px; border:0; padding:0; }
#space-panel .task-open > .task-meta, #space-panel .task-open > .task-title {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.task-status { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font:550 12px/1.35 var(--sans); }
.task-status i { width:7px; height:7px; border-radius:50%; background:var(--accent); }
.space-task-entry[data-closed="true"] .task-status i { background:var(--muted); }
.task-reward { flex:none; color:var(--ink); font:620 14px/1.35 var(--sans); font-variant-numeric:tabular-nums; }
.task-reward span { color:var(--muted); font-weight:450; font-size:12px; }
.task-open .task-title strong { font-size:clamp(17px,2vw,21px); letter-spacing:-.02em; }
#space-panel .task-title svg { width:15px; height:15px; color:var(--muted); }
.space-task-entry .space-desc { font:400 14px/1.45 var(--sans); }
.task-outcome, .task-empty { color:var(--muted); font:400 13px/1.45 var(--sans); }
.task-outcome { display:flex; align-items:baseline; gap:6px; margin:9px 0 2px; }
#space-panel .task-outcome svg { width:14px; height:14px; align-self:flex-start; margin-top:2px; }
.space-home .space-task-entry .row-actions { margin:2px -6px 0; }
@media (hover:hover) {
  .task-open:hover .task-title { color:var(--accent-text); }
}
.task-goals summary { display:flex; align-items:center; min-height:44px; gap:5px; color:var(--accent-text); }
.task-goals { padding-block:8px; border-bottom:1px solid var(--rule); }

#weekly-stage { position:relative; z-index:3; width:min(100%,800px); margin-inline:auto; flex:none; }
#weekly-stage[hidden] {display:none}
.work-strip {display:flex; align-items:baseline; gap:14px; padding:8px 15px; border-bottom:1px solid var(--rule); background:var(--bg)}
.work-strip details {min-width:0} .work-strip details:first-child {flex:1}
.work-strip summary {cursor:pointer;list-style:none;font-size:13px;color:var(--accent-text);padding:5px 0}
.work-strip summary strong {display:block;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:550}
.work-strip summary small {font:11px monospace;color:var(--muted)} .work-strip details[open] {max-height:42dvh;overflow:auto;overscroll-behavior:contain}
.work-strip details[open]:first-child summary strong {white-space:normal}
.work-strip:has([data-week-panel="recap"][open]) details:first-child {display:none}
.work-strip h3,.week-note h3 {font-size:15px;margin:14px 0 4px}
.work-strip p,.work-strip li,.week-note p,.week-note li {font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.work-strip pre {white-space:pre-wrap;font:12px/1.4 monospace;max-height:22dvh;overflow:auto;overflow-wrap:anywhere}
.work-strip button,.work-strip a,.statement-weeks a,.week-note a {color:var(--accent-text)}
.work-strip button {border:0;background:transparent;text-decoration:underline;cursor:pointer;padding:8px 0}
.week-note {max-width:700px;margin:12px auto 32px;padding:16px;border-top:1px solid var(--rule)}
.week-note h2 {font:normal clamp(28px,5vw,42px)/1.1 Georgia,serif;margin:8px 0 22px}
.week-note ul,.work-strip ul {padding-inline-start:20px}.statement-weeks {padding:12px 16px}

#space-player[data-preview-kind="work"] {background:var(--surface);color:var(--ink)}
#space-player[data-preview-kind="work"] article {width:100%;overflow:auto;padding:22px 18px 10px}
#space-player[data-preview-kind="work"] pre {font:12px/1.5 monospace;white-space:pre-wrap;overflow-wrap:anywhere}

@media (max-width: 700px) {
  /* The review includes these balances. Keep its terms and confirmation together. */
  .funding-layout:has(.funding-review) > .space-treasury,
  .funding-ticket:has(.funding-review) #modes { display:none; }
}
