/* CONE SUPREME — final app layout pass.
   Presentation-only rules: no route logic, data behavior, or GameLab internals. */

/* Desktop: a steady navigation rail and a calm, centered work surface. */
@media (min-width: 821px) {
  .shell {
    grid-template-columns: 256px minmax(0, 1fr);
    min-height: 100dvh;
    align-items: stretch;
  }
  .shell > .side {
    position: sticky;
    top: 0;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    display: flex;
    flex-direction: column;
  }
  .shell > :not(.side):not(.os-tabbar) {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100dvh;
  }
  .shell > :not(.side):not(.os-tabbar) > .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 68px;
    padding-inline: clamp(18px, 2.2vw, 34px);
    background: rgba(9, 9, 11, .88);
    border-bottom: 1px solid var(--ds-line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .shell main.view {
    flex: 1 0 auto;
    width: min(100%, 1480px);
    max-width: 1480px;
    margin-inline: auto;
    padding: clamp(24px, 2.5vw, 40px) clamp(22px, 3vw, 48px) 48px;
  }
  .shell .view-head {
    margin-bottom: clamp(18px, 2vw, 28px);
  }
}

/* Mid-size laptops: reclaim space without compressing the page content. */
@media (min-width: 821px) and (max-width: 1100px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .shell main.view { padding-inline: 22px; }
}

/* Phones: keep the established five-destination tab bar and full-width routed pages. */
@media (max-width: 820px) {
  .shell { min-height: 100dvh; }
  .shell > .side { display: none; }
  .shell > :not(.side):not(.os-tabbar) { min-width: 0; min-height: 100dvh; }
  .shell > :not(.side):not(.os-tabbar) > .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    padding-top: max(7px, env(safe-area-inset-top));
    background: rgba(9, 9, 11, .94);
    border-bottom: 1px solid var(--ds-line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .shell main.view {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 18px 16px calc(112px + env(safe-area-inset-bottom));
  }
}

/* Narrow phones: avoid cramped gutters while preserving the existing two-column quick actions. */
@media (max-width: 380px) {
  .shell main.view { padding-inline: 12px; }
  .shell .topbar { padding-inline: 8px; }
}

/* Home dashboard finish: keep the command center balanced at tablet widths and make
   its six quick actions readable on small phones. This scope is Home-only. */
#view[data-section="home"] .hm-layout {
  align-items: start;
  gap: clamp(14px, 1.8vw, 22px);
}
#view[data-section="home"] .hm-main,
#view[data-section="home"] .hm-rail,
#view[data-section="home"] .hm-main > *,
#view[data-section="home"] .hm-rail > * {
  min-width: 0;
}
#view[data-section="home"] .hm-qa6:focus-visible {
  outline: 2px solid var(--ds-accent, #ff8a2a);
  outline-offset: 3px;
  border-color: var(--ds-accent, #ff8a2a);
}
@media (max-width: 820px) {
  #view[data-section="home"] .hm-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  #view[data-section="home"] .hm-main,
  #view[data-section="home"] .hm-rail {
    width: 100%;
  }
}
@media (max-width: 600px) {
  #view[data-section="home"] .hm-layout .hm-quick.hm-quick6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  #view[data-section="home"] .hm-qa6 {
    min-height: 72px;
    padding: 10px 6px;
  }
}
@media (max-width: 380px) {
  #view[data-section="home"] .hm-quick-card {
    padding: 10px;
  }
  #view[data-section="home"] .hm-layout .hm-quick.hm-quick6 {
    gap: 7px;
  }
  #view[data-section="home"] .hm-qa6 {
    font-size: .82rem;
  }
}

/* Tools & Labs: keep the desktop browse panel below the sticky app top bar.
   The original 18px sticky offset allowed the panel to slide behind that bar. */
@media (min-width: 821px) {
  #view[data-section="labs"] .lp-panel {
    top: 84px;
    max-height: calc(100dvh - 104px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  #view[data-section="labs"] .lp-list-row {
    min-height: 48px;
  }
}
#view[data-section="labs"] .lp-list-row:focus-visible {
  outline: 2px solid var(--ds-accent, #ff8a2a);
  outline-offset: 2px;
}

/* Responsive shell guard (2026-11-17).
   The shell has three direct children: sidebar, routed content, and the phone tab bar.
   Keep the tab bar out of desktop grid auto-placement, and treat narrow tablet/zoomed
   mobile viewports as the compact navigation layout as well. */
.shell {
  grid-template-rows: minmax(0, 1fr);
}
.shell > .os-tabbar {
  display: none !important;
}
@media (max-width: 900px) {
  .shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    width: 100%;
    min-height: 100dvh;
  }
  .shell > .side {
    display: none !important;
  }
  .shell > :not(.side):not(.os-tabbar) {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    min-height: 100dvh;
  }
  .shell > .os-tabbar {
    position: fixed !important;
    inset: auto 0 0 !important;
    z-index: 100 !important;
    display: grid !important;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-height: 64px;
    padding: 5px max(8px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(8, 8, 10, .97);
    border-top: 1px solid var(--ds-line, rgba(255,255,255,.12));
    box-shadow: 0 -10px 28px rgba(0,0,0,.38);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .shell > .os-tabbar > a,
  .shell > .os-tabbar > button {
    min-width: 0;
    min-height: 50px;
    align-self: center;
  }
}
@media (min-width: 901px) {
  .shell {
    grid-template-columns: 256px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .shell > .side {
    grid-column: 1;
    grid-row: 1;
  }
  .shell > :not(.side):not(.os-tabbar) {
    grid-column: 2;
    grid-row: 1;
  }
}


/* Workspace destination finish.
   renderShell relocates the Workspace strip underneath the page heading inside #view.
   Reset its former outer-shell margins so the strip aligns with the content and cards. */
#view[data-section="projects"] > .ws-tabs.v2-tabs {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 12px 0 18px;
  justify-content: flex-start;
}
#view[data-section="projects"] .dest-section,
#view[data-section="projects"] .dest-projects {
  min-width: 0;
  max-width: 100%;
}
#view[data-section="projects"] .dest-section > div:first-child {
  display: grid;
  gap: 4px;
}
#view[data-section="projects"] .dest-section > div:first-child > .sec-title {
  margin: 0;
}
#view[data-section="projects"] .dest-section > div:first-child > .fine {
  margin: 0;
  max-width: 68ch;
  line-height: 1.5;
}
#view[data-section="projects"] .dest-section .os-tool-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 12px;
}
#view[data-section="projects"] .dest-tile {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 174px;
  padding: 16px;
  border-color: var(--ds-line-2);
  background: linear-gradient(155deg, var(--ds-surface-2), var(--ds-surface));
}
#view[data-section="projects"] .dest-tile .os-tool-top {
  min-height: 38px;
}
#view[data-section="projects"] .dest-tile h3 {
  margin: 0;
  line-height: 1.25;
}
#view[data-section="projects"] .dest-tile .os-tile-sub {
  margin: 0;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
#view[data-section="projects"] .dest-tile .os-tool-tags {
  margin-top: auto;
}
#view[data-section="projects"] .dest-tile:focus-within,
#view[data-section="projects"] .dest-tile:hover {
  border-color: var(--ds-accent-line);
  box-shadow: var(--ds-shadow-2);
}
@media (max-width: 820px) {
  #view[data-section="projects"] > .ws-tabs.v2-tabs {
    margin: 10px 0 16px;
    padding: 4px;
  }
  #view[data-section="projects"] .dest-section .os-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  #view[data-section="projects"] .dest-tile {
    min-height: 164px;
    padding: 13px;
    gap: 8px;
  }
}
@media (max-width: 480px) {
  #view[data-section="projects"] .dest-section .os-tool-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  #view[data-section="projects"] .dest-tile {
    min-height: 0;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 11px;
    row-gap: 5px;
    align-items: start;
  }
  #view[data-section="projects"] .dest-tile .os-tool-top {
    grid-row: 1 / span 2;
    grid-column: 1;
  }
  #view[data-section="projects"] .dest-tile h3,
  #view[data-section="projects"] .dest-tile .os-tile-sub,
  #view[data-section="projects"] .dest-tile .os-tool-tags {
    grid-column: 2;
  }
  #view[data-section="projects"] .dest-tile .os-tool-tags {
    margin-top: 2px;
  }
}


/* Tools & Labs catalog finish.
   Keep the capability registry and lab links as the source of truth; this only improves
   hierarchy, card consistency, preview framing and keyboard access. */
#view[data-section="labs"] .lp-main {
  min-width: 0;
  gap: 18px;
}
#view[data-section="labs"] .lp-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 2px;
}
#view[data-section="labs"] .lp-overview-head .sec-title {
  margin: 0;
}
#view[data-section="labs"] .lp-main .lab-group {
  padding-top: 14px;
  border-top: 1px solid var(--ds-line);
}
#view[data-section="labs"] .lp-main .lab-group > .sec-title {
  margin: 0 0 2px;
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ds-text-2);
}
#view[data-section="labs"] .lp-main .os-tool {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 184px;
  padding: 15px;
  border-radius: 16px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
#view[data-section="labs"] .lp-main .os-tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
}
#view[data-section="labs"] .lp-main .os-tool h3 {
  margin: 2px 0 0;
  line-height: 1.25;
}
#view[data-section="labs"] .lp-main .os-tile-sub {
  margin: 0;
  min-height: 2.8em;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}
#view[data-section="labs"] .lp-main .os-tool-tags {
  margin-top: auto;
  padding-top: 8px;
}
#view[data-section="labs"] .lp-main .lab-featured .lab-preview {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-position: center;
}
#view[data-section="labs"] .lp-panel .os-search {
  min-width: 0;
  min-height: 48px;
}
#view[data-section="labs"] .lp-panel .os-search input {
  min-width: 0;
  width: 100%;
  font-size: 16px;
}
#view[data-section="labs"] .lp-panel .chips .chip {
  min-height: 34px;
}
#view[data-section="labs"] .lp-panel .chips .chip:focus-visible {
  outline: 2px solid var(--ds-accent-2);
  outline-offset: 2px;
}
#view[data-section="labs"] .lp-list-row:focus-visible {
  outline: 2px solid var(--ds-accent-2);
  outline-offset: 2px;
}
@media (hover: hover) {
  #view[data-section="labs"] .lp-main .os-tool:not(.off):hover {
    transform: translateY(-2px);
    border-color: var(--ds-accent-line);
    box-shadow: var(--ds-shadow-2), 0 0 20px rgba(255,122,26,.08);
  }
}
@media (max-width: 820px) {
  #view[data-section="labs"] .lp-main {
    gap: 14px;
  }
  #view[data-section="labs"] .lp-main .os-tool {
    min-height: 176px;
    padding: 12px;
  }
  #view[data-section="labs"] .lp-main .lab-group {
    padding-top: 11px;
  }
  #view[data-section="labs"] .lp-main .lab-featured .lab-preview {
    aspect-ratio: 16 / 9;
  }
}
@media (max-width: 480px) {
  #view[data-section="labs"] .lp-main .os-tool {
    min-height: 0;
  }
  #view[data-section="labs"] .lp-main .os-tile-sub {
    min-height: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #view[data-section="labs"] .lp-main .os-tool {
    transition: none;
  }
}


/* My Space destination finish.
   Keep every existing account, community and workspace destination in its current route;
   give the profile and its link groups one consistent, responsive hierarchy. */
#view[data-section="me"] {
  display: grid;
  align-content: start;
  gap: 14px;
}
#view[data-section="me"] .me-head {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: clamp(15px, 2vw, 22px);
  border-color: rgba(255, 132, 38, .32);
  background:
    radial-gradient(ellipse 42% 125% at 100% 0%, rgba(255, 122, 26, .17), transparent 74%),
    linear-gradient(125deg, rgba(24, 15, 10, .98), rgba(11, 10, 11, .98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 14px 34px rgba(0,0,0,.2);
}
#view[data-section="me"] .me-avatar-ring {
  width: clamp(70px, 7vw, 88px);
  height: clamp(70px, 7vw, 88px);
  box-shadow: 0 0 0 5px rgba(255, 122, 26, .07), 0 0 24px rgba(255, 110, 20, .22);
}
#view[data-section="me"] .me-avatar-ring img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: 50% 8%;
}
#view[data-section="me"] .me-id {
  gap: 5px;
}
#view[data-section="me"] .me-name-row {
  min-width: 0;
  gap: 9px;
}
#view[data-section="me"] .me-name-row h1 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}
#view[data-section="me"] #me-handle,
#view[data-section="me"] .me-since {
  color: var(--ds-text-2);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#view[data-section="me"] .me-edit {
  min-width: 0;
  min-height: 44px; /* 44 px tap target (consolidation §4) */
  margin-top: 5px;
}
#view[data-section="me"] .me-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 13px;
}
#view[data-section="me"] .me-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--ds-line);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(24, 19, 16, .92), rgba(12, 11, 12, .94));
  box-shadow: 0 10px 26px rgba(0,0,0,.13);
}
#view[data-section="me"] .me-group > .sec-title {
  margin: 0 0 9px;
  font-size: .72rem;
  line-height: 1.3;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ds-text-2);
}
#view[data-section="me"] .me-group > .hub-list {
  gap: 6px;
}
#view[data-section="me"] .me-group .hub-row {
  min-height: 62px;
  padding: 9px 10px;
  gap: 10px;
  border-color: transparent;
  background: rgba(255,255,255,.018);
}
#view[data-section="me"] .me-group .hub-row:hover,
#view[data-section="me"] .me-group .hub-row:focus-visible {
  border-color: var(--ds-accent-line);
  background: var(--ds-accent-soft);
}
#view[data-section="me"] .me-group .hub-ico {
  width: 34px;
  height: 34px;
}
#view[data-section="me"] .me-group .hub-text {
  gap: 3px;
}
#view[data-section="me"] .me-group .hub-text b {
  font-size: .88rem;
  line-height: 1.3;
}
#view[data-section="me"] .me-group .hub-text .fine {
  display: block;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: .75rem;
  line-height: 1.4;
}
#view[data-section="me"] .me-group .hub-chev {
  flex: 0 0 auto;
  color: var(--ds-accent-2);
}
#view[data-section="me"] .me-group .hub-row:focus-visible {
  outline: 2px solid var(--ds-accent-2);
  outline-offset: 2px;
}
@media (max-width: 820px) {
  #view[data-section="me"] {
    gap: 12px;
  }
  #view[data-section="me"] .me-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  #view[data-section="me"] .me-group {
    padding: 12px;
    border-radius: 14px;
  }
  #view[data-section="me"] .me-group .hub-row {
    min-height: 60px;
  }
}
@media (max-width: 380px) {
  #view[data-section="me"] .me-head {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }
  #view[data-section="me"] .me-avatar-ring {
    width: 58px;
    height: 58px;
  }
  #view[data-section="me"] .me-plan {
    padding-inline: 7px;
    font-size: .66rem;
  }
}


/* Agents command center finish.
   The renderer outputs five status metrics; give all five a deliberate desktop row,
   then step down to three and two columns as space narrows. */
#view[data-section="agents"] .os-agents {
  display: grid;
  gap: 13px;
  min-width: 0;
}
#view[data-section="agents"] .os-agents-bar {
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#view[data-section="agents"] .os-agents-bar .os-seg {
  min-width: 0;
  gap: 5px;
}
#view[data-section="agents"] .os-cc-summary {
  gap: 9px;
  margin: 0;
}
#view[data-section="agents"] .os-cc-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}
#view[data-section="agents"] .os-cc-stat {
  min-height: 78px;
  align-content: center;
  padding: 12px 13px;
  border-color: var(--ds-line);
  border-radius: 14px;
  background: linear-gradient(150deg, var(--ds-surface-2), var(--ds-surface));
}
#view[data-section="agents"] .os-cc-stat b {
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
#view[data-section="agents"] .os-cc-stat span {
  line-height: 1.35;
  overflow-wrap: anywhere;
}
#view[data-section="agents"] .os-cc-runner {
  padding: 10px 12px;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
  line-height: 1.5;
}
#view[data-section="agents"] .os-legend {
  gap: 8px 13px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
}
#view[data-section="agents"] .os-detail {
  min-width: 0;
  margin-top: 0;
  padding: 16px;
  border-color: var(--ds-line);
  border-radius: 16px;
}
#view[data-section="agents"] .os-world-stage,
#view[data-section="agents"] .os-world-grid,
#view[data-section="agents"] .os-world-main,
#view[data-section="agents"] .os-world-side {
  min-width: 0;
}
#view[data-section="agents"] .os-task-card,
#view[data-section="agents"] .os-agent-card {
  min-width: 0;
  border-color: var(--ds-line);
  border-radius: 14px;
  background: linear-gradient(150deg, var(--ds-surface-2), var(--ds-surface));
}
#view[data-section="agents"] .os-task-title,
#view[data-section="agents"] .os-agent-card b {
  line-height: 1.35;
}
#view[data-section="agents"] .os-agents-bar button:focus-visible,
#view[data-section="agents"] .os-agents-bar a:focus-visible,
#view[data-section="agents"] .os-cc-stat:focus-visible {
  outline: 2px solid var(--ds-accent-2);
  outline-offset: 2px;
}
@media (max-width: 1100px) {
  #view[data-section="agents"] .os-cc-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  #view[data-section="agents"] .os-cc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  #view[data-section="agents"] .os-cc-stat {
    min-height: 68px;
    padding: 10px;
  }
  #view[data-section="agents"] .os-agents-bar {
    align-items: stretch;
  }
  #view[data-section="agents"] .os-agents-bar .os-seg {
    display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }
  #view[data-section="agents"] .os-legend {
    gap: 7px 10px;
    padding: 9px;
    font-size: 12px;
  }
}


/* Money command center finish.
   Preserve every existing Money form, calculation and API action; this is presentation-only. */
#view[data-section="money"] {
  min-width: 0;
}
#view[data-section="money"] .money-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  align-items: start;
  gap: 14px;
  min-width: 0;
}
#view[data-section="money"] .money-overview > .v2-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  align-items: stretch;
  gap: 12px;
  min-width: 0;
}
#view[data-section="money"] .money-overview > .v2-top > *,
#view[data-section="money"] .money-overview > * {
  min-width: 0;
}
#view[data-section="money"] .money-hero {
  min-height: 100%;
  padding: clamp(16px, 2vw, 22px);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 16px 36px rgba(0,0,0,.2);
}
#view[data-section="money"] .money-hero .money-big,
#view[data-section="money"] .money-hero .v2-hero-value {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
#view[data-section="money"] .money-tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
#view[data-section="money"] .money-tile {
  min-width: 0;
  min-height: 104px;
  border: 1px solid var(--ds-line);
  border-radius: 14px;
  background: linear-gradient(150deg, var(--ds-surface-2), var(--ds-surface));
}
#view[data-section="money"] .money-tile:focus-visible,
#view[data-section="money"] .money-tile:focus-within {
  outline: 2px solid var(--ds-accent-2);
  outline-offset: 2px;
}
#view[data-section="money"] .money-overview .card {
  min-width: 0;
  border-color: var(--ds-line);
  border-radius: 16px;
}
#view[data-section="money"] .money-overview .v2-card,
#view[data-section="money"] .money-overview .v2-panel {
  min-width: 0;
  height: 100%;
}
#view[data-section="money"] .money-overview .money-table-scroll,
#view[data-section="money"] .money-overview .money-table {
  max-width: 100%;
}
#view[data-section="money"] .money-overview .donut-wrap {
  align-items: center;
  gap: 12px;
}
#view[data-section="money"] .money-overview .donut-legend {
  min-width: min(100%, 180px);
}
#view[data-section="money"] .money-overview .donut-legend td {
  overflow-wrap: anywhere;
}
#view[data-section="money"] .money-alerts {
  margin-bottom: 0;
}
@media (max-width: 1100px) {
  #view[data-section="money"] .money-overview {
    grid-template-columns: minmax(0, 1fr);
  }
  #view[data-section="money"] .money-overview > .v2-top {
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  }
}
@media (max-width: 700px) {
  #view[data-section="money"] .money-overview {
    gap: 10px;
  }
  #view[data-section="money"] .money-overview > .v2-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  #view[data-section="money"] .money-hero {
    min-height: 0;
  }
  #view[data-section="money"] .money-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #view[data-section="money"] .money-tile {
    min-height: 88px;
    padding: 10px;
  }
  #view[data-section="money"] .money-overview .donut-wrap {
    justify-content: center;
  }
  #view[data-section="money"] .money-overview .donut-legend {
    flex-basis: 100%;
  }
}
@media (max-width: 360px) {
  #view[data-section="money"] .money-tiles {
    gap: 7px;
  }
  #view[data-section="money"] .money-tile {
    padding: 9px;
  }
}

/* Compact app shell and command center. */
@media (min-width: 1181px) {
  .shell {
    grid-template-columns: 172px minmax(0, 1fr);
  }
  .shell > .side {
    padding: 10px 8px;
    gap: 7px;
    background: linear-gradient(170deg, #161416, #0b0a0c 64%);
  }
  .shell > .side .brand {
    gap: 5px;
    padding: 0 1px;
  }
  .shell > .side .brand-name {
    font-size: 13px;
  }
  .shell > .side .brand-tag,
  .shell > .side .os-nav-text small {
    display: none;
  }
  .shell > .side .os-nav {
    gap: 2px;
  }
  .shell > .side .os-nav-sec > a {
    min-height: 37px;
    padding: 4px 7px;
    gap: 7px;
  }
  .shell > .side .os-nav-sec > a .ico {
    width: 24px;
    height: 24px;
  }
  .shell > :not(.side):not(.os-tabbar) > .topbar {
    min-height: 54px;
  }
  .shell main.view[data-section="home"],
  .shell main.view[data-section="labs"] {
    padding: 10px 12px 28px;
  }
  #view[data-section="home"] .hm-layout:not(.no-rail) {
    grid-template-columns: minmax(0, 1fr) clamp(228px, 20vw, 290px);
    gap: 10px;
  }
  #view[data-section="home"] .hm-rail {
    top: 65px;
    max-height: calc(100dvh - 78px);
  }
  #view[data-section="home"] .hm-stats.hm-stats5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  #view[data-section="home"] .hm-stats.hm-stats5 > .hm-stat {
    grid-column: auto;
  }
  #view[data-section="home"] .hm-main > [data-widget="today"]:has(+ .hm-quick-card) {
    grid-column: 1 / 3;
  }
  #view[data-section="home"] .hm-main > [data-widget="today"] + .hm-quick-card {
    grid-column: 3;
  }
  #view[data-section="home"] .hm-main > [data-widget="today"] .hm-progress-body {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
  }
  #view[data-section="home"] .hm-main > [data-widget="today"] .hm-ring {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
  }
}
.shell > .side .os-nav-sec > a[aria-current="page"],
.shell > .os-tabbar > a[aria-current="page"] {
  color: #fff4e3;
  border: 1px solid #d88031;
  background: linear-gradient(145deg, #642b06, #9a430c);
  box-shadow: inset 0 0 12px #ff9b2d35, 0 0 14px #ff7a1a28;
}
#view[data-section="home"] .hm-main,
#view[data-section="home"] .hm-rail {
  gap: 9px;
}
#view[data-section="home"] .hm-hero {
  isolation: isolate;
  margin: 0;
  border: 1px solid var(--ds-accent-line);
  padding: clamp(12px, 1.4vw, 18px);
  border-radius: 13px;
}
#view[data-section="home"] .hm-hero .hm-ask {
  background: linear-gradient(180deg, #21160f, #100e0d);
  padding: 5px 7px;
  border-radius: 999px;
  border-color: #b9601d;
  box-shadow: 0 0 15px #ff7a1a32, inset 0 0 12px #ff7a1a18;
}
#view[data-section="home"] .hm-hero .hm-ask:focus-within {
  border-color: #ffb463;
}
#view[data-section="home"] .hm-hero .hm-ask > button {
  border-radius: 999px;
}
#view[data-section="home"] .hm-main > .card,
#view[data-section="home"] .hm-grid > .card,
#view[data-section="home"] .hm-rail > .card {
  padding: 12px;
  border-radius: 12px;
  border-color: #514136;
  background: linear-gradient(155deg, #231e1d, #121214 68%);
}
#view[data-section="home"] .hm-main > [data-widget="today"] {
  min-width: 0;
  gap: 8px;
}
#view[data-section="home"] .hm-stats,
#view[data-section="home"] .hm-grid {
  margin-bottom: 0;
}
#view[data-section="home"] .hm-stat {
  min-width: 0;
  padding: 9px;
}
#view[data-section="home"] .hm-stat-value,
#view[data-section="home"] .hm-stat small {
  white-space: normal;
  overflow-wrap: anywhere;
}
#view[data-section="home"] .hm-layout .hm-quick.hm-quick6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}
#view[data-section="home"] .hm-qa6 {
  min-height: 54px;
  padding: 6px 4px;
  font-size: .76rem;
}
#view[data-section="home"] .hm-labs-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
#view[data-section="home"] .hm-lab,
#view[data-section="labs"] .os-tool[class*="tone-"] {
  border-color: color-mix(in srgb, var(--tone, #ff912c) 55%, #242124);
  background: linear-gradient(150deg, color-mix(in srgb, var(--tone, #ff912c) 17%, #171519), #141316 76%);
}
#view[data-section="home"] .hm-lab b,
#view[data-section="home"] .hm-lab small {
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (min-width: 1181px) and (max-width: 1370px) {
  #view[data-section="home"] .hm-main > [data-widget="today"] + .hm-quick-card .hm-quick.hm-quick6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1320px) {
  #view[data-section="home"] .hm-labs-row {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .shell .topbar .brand-v2 .brand-sup {
    display: inline;
  }
  .shell .topbar .brand-v2 .brand-name {
    font-size: clamp(.7rem, 3.5vw, .88rem);
  }
  .shell main.view[data-section="home"],
  .shell main.view[data-section="labs"] {
    padding: 10px 10px calc(88px + env(safe-area-inset-bottom));
  }
  #view[data-section="home"] .hm-hero {
    background-position: 0 0, 67% top;
    background-size: auto, auto 180px;
  }
  #view[data-section="home"] .hm-hero .hm-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 4px;
  }
  #view[data-section="home"] .hm-hero-text {
    min-height: 84px;
  }
  #view[data-section="home"] .hm-hero .hm-chip {
    flex-direction: row;
    min-height: 32px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .72rem;
  }
  #view[data-section="home"] .hm-hero .hm-chip svg {
    width: 14px;
    height: 14px;
  }
  #view[data-section="home"] #home-stat-income {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, max-content);
    align-items: center;
    gap: 4px 8px;
  }
  #view[data-section="home"] #home-stat-income small {
    grid-column: 2 / -1;
  }
  #view[data-section="home"] .hm-labs-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #view[data-section="home"] .hm-main > [data-widget="today"] {
    gap: 0;
  }
  #view[data-section="home"] #home-today {
    border-radius: 12px 12px 0 0;
  }
  #view[data-section="home"] #home-today + .hm-progress {
    border-top: 0;
    border-radius: 0 0 12px 12px;
  }
  #view[data-section="home"] .hm-progress-body {
    gap: 8px;
  }
  #view[data-section="home"] .hm-ring {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
  }
}
@media (min-width: 370px) and (max-width: 600px) {
  #view[data-section="home"] .hm-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  #view[data-section="home"] .hm-stat:not(#home-stat-income) {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    align-content: start;
    gap: 3px;
    padding: 6px;
  }
  #view[data-section="home"] .hm-stat:not(#home-stat-income) .hm-stat-ico {
    grid-row: auto;
    width: 23px;
    height: 23px;
  }
  #view[data-section="home"] .hm-stat:not(#home-stat-income) .hm-stat-ico svg {
    width: 15px;
    height: 15px;
  }
  #view[data-section="home"] .hm-stat:not(#home-stat-income) .hm-stat-label,
  #view[data-section="home"] .hm-stat:not(#home-stat-income) small {
    font-size: .63rem;
    line-height: 1.2;
  }
  #view[data-section="home"] .hm-stat:not(#home-stat-income) .hm-stat-value {
    font-size: .91rem;
  }
  #view[data-section="home"] .hm-stat .v2-ring {
    display: none;
  }
}
#view[data-section="labs"] .lp-assistant {
  min-width: 0;
  grid-column: 1 / -1;
}
#view[data-section="labs"] .lp-assistant .cc-hero {
  margin: 0;
  min-width: 0;
  padding: 12px;
  border: 1px solid #87501f;
  border-radius: 12px;
  background: linear-gradient(145deg, #2a1b13, #161418 58%);
}
#view[data-section="labs"] .lp-panel {
  border-radius: 12px;
}
@media (min-width: 1440px) {
  #view[data-section="labs"] .lp-layout {
    grid-template-columns: 220px minmax(0, 1fr) 230px;
    gap: 12px;
    align-items: start;
  }
  #view[data-section="labs"] .lp-assistant {
    grid-column: auto;
  }
  #view[data-section="labs"] .lp-assistant .cc-ask {
    min-width: 0;
  }
  #view[data-section="labs"] .lp-assistant textarea {
    min-width: 0;
  }
  #view[data-section="labs"] .lp-assistant .cc-pick {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  #view[data-section="labs"] .lp-main .os-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  #view[data-section="labs"] .lp-main .os-tool {
    overflow-wrap: anywhere;
    padding: 8px;
    border-radius: 10px;
  }
  #view[data-section="labs"] .lp-panel .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 5px;
  }
  #view[data-section="labs"] .lp-panel .chip {
    flex: 0 0 auto;
  }
}

/* Home artwork, action tiles and project progress. */
#view[data-section="home"] .hm-hero {
  border-color: #7e502f;
  background:
    linear-gradient(90deg, #100c10 0%, #100c10ec 23%, #140d1166 56%, transparent 83%),
    linear-gradient(0deg, #120d11 0%, #120d1100 53%),
    url("/art/cone-creator-room.webp") right top / auto 100% no-repeat,
    #100c10;
  box-shadow: 0 10px 26px #0006, inset 0 1px #ffb57029;
}
#view[data-section="home"] .hm-hero-text {
  padding-right: min(32%, 245px);
}
#view[data-section="home"] .hm-crown {
  display: inline-flex;
  color: #ffad52;
  vertical-align: .04em;
  filter: drop-shadow(0 0 6px #f7874b68);
}
#view[data-section="home"] .hm-hero-ask {
  gap: 6px;
  padding: 7px;
  border: 1px solid #a05a22;
  border-radius: 13px;
  background: linear-gradient(155deg, #27170fe8, #131014f2 65%);
  box-shadow: 0 0 14px #ff821a24, inset 0 1px #ffaf6c4d;
}
#view[data-section="home"] .hm-hero .hm-ask {
  margin: 0;
  border-color: #68452e;
  box-shadow: inset 0 1px #fff1;
}
#view[data-section="home"] .hm-hero .hm-ask:focus-within {
  border-color: #ffad5f;
  box-shadow: 0 0 0 2px #ff952a4d;
}
#view[data-section="home"] .hm-hero .hm-chips {
  margin: 0;
  gap: 5px;
}
#view[data-section="home"] .hm-heading-ico {
  display: inline-flex;
  margin-right: 7px;
  color: #ffac54;
  vertical-align: -.19em;
}
#view[data-section="home"] #home-stat-projects { --hm-tone: #ffad54; }
#view[data-section="home"] #home-stat-tasks { --hm-tone: #ffce68; }
#view[data-section="home"] #home-stat-agents { --hm-tone: #70d9bd; }
#view[data-section="home"] #home-stat-missions { --hm-tone: #b9a1ff; }
#view[data-section="home"] #home-stat-income { --hm-tone: #8be59c; }
#view[data-section="home"] .hm-stat {
  border-color: color-mix(in srgb, var(--hm-tone) 26%, #312825);
  background: linear-gradient(155deg, color-mix(in srgb, var(--hm-tone) 13%, #171419), #111014 74%);
}
#view[data-section="home"] .hm-stat .hm-stat-ico {
  color: var(--hm-tone);
  background: color-mix(in srgb, var(--hm-tone) 13%, transparent);
}
#view[data-section="home"] .hm-qa6:nth-child(1) { --hm-action: #ffac54; }
#view[data-section="home"] .hm-qa6:nth-child(2) { --hm-action: #71cdf7; }
#view[data-section="home"] .hm-qa6:nth-child(3) { --hm-action: #dc9aff; }
#view[data-section="home"] .hm-qa6:nth-child(4) { --hm-action: #64ddc2; }
#view[data-section="home"] .hm-qa6:nth-child(5) { --hm-action: #c1abff; }
#view[data-section="home"] .hm-qa6:nth-child(6) { --hm-action: #9fe38a; }
#view[data-section="home"] .hm-qa6 {
  border-color: color-mix(in srgb, var(--hm-action) 32%, #312825);
  background: linear-gradient(150deg, color-mix(in srgb, var(--hm-action) 15%, #19161a), #121115 76%);
}
#view[data-section="home"] .hm-qa6 > span {
  color: var(--hm-action);
}
#view[data-section="home"] .hm-qa6:hover,
#view[data-section="home"] .hm-qa6:focus-visible {
  border-color: var(--hm-action);
}
#view[data-section="home"] .hm-intel-tabs button {
  word-break: normal;
  overflow-wrap: normal;
  font-size: .72rem;
  padding-inline: 3px;
}
#view[data-section="home"] .hm-project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 0;
  margin: 0;
  list-style: none;
}
#view[data-section="home"] .hm-project-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 8px;
  border: 1px solid #4b3730;
  border-radius: 9px;
  background: linear-gradient(140deg, #261c18, #161418 76%);
  color: inherit;
  text-decoration: none;
}
#view[data-section="home"] .hm-project-link:hover,
#view[data-section="home"] .hm-project-link:focus-visible {
  border-color: #ffad63;
}
#view[data-section="home"] .hm-project-icon,
#view[data-section="home"] .hm-project-pct {
  color: #ffb462;
}
#view[data-section="home"] .hm-project-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}
#view[data-section="home"] .hm-project-copy b { font-size: .82rem; }
#view[data-section="home"] .hm-project-copy small { font-size: .72rem; color: var(--ds-text-2); }
#view[data-section="home"] .hm-project-pct { font-size: .72rem; font-variant-numeric: tabular-nums; }
#view[data-section="home"] .hm-project-progress {
  grid-column: 2 / -1;
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: #383039;
  accent-color: #ff9e46;
}
#view[data-section="home"] .hm-project-progress::-webkit-progress-bar { background: #383039; border-radius: 999px; }
#view[data-section="home"] .hm-project-progress::-webkit-progress-value { background: #ff9e46; border-radius: 999px; }
#view[data-section="home"] .hm-project-progress::-moz-progress-bar { background: #ff9e46; border-radius: 999px; }
@media (max-width: 600px) {
  #view[data-section="home"] .hm-hero {
    background-position: 0 0, 0 0, 63% top, 0 0;
    background-size: auto, auto, auto 188px, auto;
  }
  #view[data-section="home"] .hm-hero-text { padding-right: 22%; }
  #view[data-section="home"] #home-today .os-section-head { align-items: center; margin-bottom: 5px; }
  #view[data-section="home"] .hm-project-list { grid-template-columns: minmax(0, 1fr); }
}
