:root {
  --product-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  --product-bg: #07111f;
  --product-sidebar: #081321;
  --product-surface: #0d1929;
  --product-surface-raised: #111f31;
  --product-surface-soft: #142237;
  --product-line: rgba(148, 163, 184, 0.17);
  --product-line-strong: rgba(96, 165, 250, 0.42);
  --product-text: #f8fafc;
  --product-muted: #a8b5c7;
  --product-blue: #3b82f6;
  --product-blue-soft: rgba(59, 130, 246, 0.14);
  --product-green: #35d07f;
  --product-red: #ff6174;
  --product-shadow: 0 22px 54px rgba(0, 0, 0, 0.24);
}

:root[data-theme="light"] {
  --product-bg: #eef3f9;
  --product-sidebar: #f7f9fc;
  --product-surface: #ffffff;
  --product-surface-raised: #f8fafc;
  --product-surface-soft: #eef4fb;
  --product-line: rgba(71, 85, 105, 0.16);
  --product-line-strong: rgba(37, 99, 235, 0.38);
  --product-text: #0f172a;
  --product-muted: #64748b;
  --product-blue: #2563eb;
  --product-blue-soft: rgba(37, 99, 235, 0.1);
  --product-shadow: 0 22px 54px rgba(15, 23, 42, 0.1);
}

html,
body,
body *,
button,
input,
select,
textarea {
  font-family: var(--product-font-family);
  font-variant-numeric: tabular-nums;
}

body {
  font-kerning: normal;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  background: var(--product-bg);
}

.bi,
.bi::before {
  line-height: 1;
}

.bi::before {
  display: block;
}

.product-back-to-top {
  position: fixed;
  right: max(20px, calc(env(safe-area-inset-right) + 20px));
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 20px));
  z-index: 170;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 50% !important;
  background: color-mix(in srgb, var(--product-blue) 88%, #0b1324);
  color: #eff6ff;
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.92);
  pointer-events: none;
  cursor: pointer;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease,
    background-color 0.18s ease;
}

.product-back-to-top i {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  font-size: 19px;
  line-height: 1;
}

.product-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.product-back-to-top:hover {
  background: color-mix(in srgb, var(--product-blue) 96%, white);
  transform: translateY(-2px) scale(1);
}

.product-back-to-top:focus-visible {
  outline: 3px solid rgba(112, 167, 255, 0.32);
  outline-offset: 3px;
}

/* Shared direct-page application shell */
body.tool-hub-page.product-shell-direct {
  min-height: 100vh;
  color: var(--product-text);
  background:
    radial-gradient(circle at 76% -14%, rgba(59, 130, 246, 0.13), transparent 28rem),
    var(--product-bg);
}

body.tool-hub-page.product-shell-direct *,
body.tool-hub-page.product-shell-direct *::before,
body.tool-hub-page.product-shell-direct *::after {
  box-sizing: border-box;
}

body.tool-hub-page.product-shell-direct:not(.tool-position-page) .wrap {
  width: calc(100% - 178px);
  max-width: none;
  min-height: 100vh;
  margin: 0 0 0 178px;
  padding: 0 22px 56px;
}

.product-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 110;
  display: flex;
  width: 178px;
  flex-direction: column;
  padding: 24px 14px 18px;
  border-right: 1px solid var(--product-line);
  background: color-mix(in srgb, var(--product-sidebar) 96%, transparent);
  color: var(--product-text);
}

.product-rail-brand {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  color: var(--product-text);
  text-decoration: none;
}

.product-rail-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--product-blue);
  color: #eff6ff;
  font-size: 15px;
}

.product-rail-wordmark {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.product-rail-wordmark strong {
  color: #70a7ff;
}

.product-rail-wordmark small {
  display: block;
  margin-top: 4px;
  color: var(--product-muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.product-rail-nav {
  display: grid;
  gap: 5px;
  margin-top: 28px;
}

.product-rail-label {
  margin: 0 10px 6px;
  color: var(--product-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-rail-label-spaced {
  margin-top: 16px;
}

.product-rail-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--product-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: 150ms ease;
}

.product-rail-link i {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  font-size: 16px;
}

.product-rail-link:hover,
.product-rail-link:focus-visible {
  border-color: var(--product-line);
  background: rgba(148, 163, 184, 0.08);
  color: var(--product-text);
}

.product-rail-link.active {
  border-color: rgba(96, 165, 250, 0.14);
  background: var(--product-blue-soft);
  color: #70a7ff;
}

.product-rail-link:focus-visible {
  outline: 2px solid #70a7ff;
  outline-offset: 2px;
}

.product-rail-admin {
  margin-top: auto;
}

body.tool-hub-page.product-shell-direct .product-utility-bar {
  position: sticky;
  top: 0;
  z-index: 95;
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--product-line);
  background: color-mix(in srgb, var(--product-bg) 94%, transparent);
  backdrop-filter: blur(18px);
}

body.tool-hub-page.product-shell-direct .product-utility-bar .tool-utility-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--product-line);
  border-radius: 10px;
  background: var(--product-surface);
  color: var(--product-muted);
  font-size: 12px;
}

body.tool-hub-page.product-shell-direct .product-utility-bar .tool-utility-link.primary {
  border-color: var(--product-line-strong);
  background: var(--product-blue-soft);
  color: #70a7ff;
}

.product-utility-context {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--product-muted);
  font-size: 12px;
  font-weight: 850;
}

/* Shared Position Manager page logic */
body.product-workbench-aligned .product-page-header {
  position: sticky;
  top: 0;
  z-index: 96;
  display: flex;
  min-height: 108px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--product-line);
  background: color-mix(in srgb, var(--product-bg) 96%, transparent);
  backdrop-filter: blur(18px);
}

.product-page-heading {
  min-width: 0;
}

.product-page-heading > p {
  margin: 0 0 3px;
  color: #6ea8ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body.tool-hub-page.product-workbench-aligned .product-page-heading > h1 {
  margin: 0;
  color: var(--product-text);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.product-page-heading > span {
  display: block;
  margin-top: 5px;
  color: var(--product-muted);
  font-size: 12px;
}

.product-page-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

body.tool-hub-page.product-workbench-aligned .product-page-primary {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  padding: 0 17px;
  border: 1px solid #4c8dff;
  border-radius: 11px;
  background: var(--product-blue);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

body.tool-hub-page.product-workbench-aligned .product-page-primary:hover {
  background: #4b8cf7;
}

body.tool-hub-page.product-workbench-aligned .product-page-primary:focus-visible {
  outline: 2px solid #70a7ff;
  outline-offset: 2px;
}

body.tool-hub-page.tool-networth-page.product-workbench-aligned
  #recordSnapshotBtn.product-page-primary {
  border-color: #4c8dff !important;
  background: var(--product-blue) !important;
  color: #fff !important;
}

body.tool-hub-page.tool-networth-page.product-workbench-aligned
  #recordSnapshotBtn.product-page-primary
  span {
  color: inherit;
}

body.tool-hub-page.product-workbench-aligned .product-header-utilities {
  position: static;
  display: flex;
  min-height: 0;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

body.tool-hub-page.product-workbench-aligned
  .product-header-utilities
  .tool-utility-link {
  display: inline-grid;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  flex: 0 0 42px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--product-line);
  border-radius: 10px;
  background: var(--product-surface);
  color: var(--product-muted);
  line-height: 0;
}

body.tool-hub-page.product-workbench-aligned
  .product-header-utilities
  .tool-utility-link
  span:not(.privacy-toggle-icon):not(.theme-toggle-icon) {
  display: none;
}

body.tool-hub-page.product-workbench-aligned
  .product-header-utilities
  .tool-utility-link
  i {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  line-height: 1;
}

body.tool-hub-page.product-workbench-aligned
  .product-header-utilities
  .tool-utility-link.primary {
  border-color: var(--product-line) !important;
  background: var(--product-surface) !important;
  color: var(--product-muted) !important;
}

body.tool-hub-page.product-workbench-aligned
  .product-header-utilities
  .privacy-toggle-icon,
body.tool-hub-page.product-workbench-aligned
  .product-header-utilities
  .theme-toggle-icon {
  display: block !important;
  flex: 0 0 auto;
}

body.tool-hub-page.product-workbench-aligned
  .product-header-utilities
  .product-utility-context {
  display: none;
}

.product-page-source {
  display: none !important;
}

body.product-workbench-aligned .layout,
body.product-workbench-aligned .networth-app {
  gap: 16px;
  margin-top: 16px;
}

body.product-workbench-aligned .site-mini-footer {
  display: none;
}

body.tool-hub-page.product-workbench-aligned .card,
body.tool-hub-page.product-workbench-aligned .networth-card {
  border-color: var(--product-line);
  border-radius: 14px;
  background: var(--product-surface);
  box-shadow: none;
}

body.tool-hub-page.product-workbench-aligned .panel-heading {
  min-height: 64px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--product-line);
}

body.tool-hub-page.product-workbench-aligned .panel-heading .kicker {
  margin: 0 0 5px;
  color: #6ea8ff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

body.tool-hub-page.product-workbench-aligned .panel-heading h2,
body.tool-hub-page.product-workbench-aligned .panel-heading h3 {
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

body.tool-hub-page.product-workbench-aligned .panel-heading p {
  margin-top: 5px;
  color: var(--product-muted);
  font-size: 11px;
}

body.tool-hub-page.product-workbench-aligned .panel-chip {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--product-line);
  border-radius: 999px;
  background: var(--product-surface-soft);
  color: var(--product-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.tool-hub-page.product-workbench-aligned .panel-chip-live {
  color: var(--product-green);
}

body.tool-hub-page.product-workbench-aligned label {
  color: var(--product-muted);
  font-size: 12px;
}

body.tool-hub-page.product-workbench-aligned input,
body.tool-hub-page.product-workbench-aligned select {
  min-height: 44px;
  padding-block: 10px;
}

body.tool-hub-page.product-workbench-aligned textarea {
  padding-block: 10px;
}

body.tool-hub-page.product-workbench-aligned details {
  border-color: var(--product-line);
  border-radius: 10px;
  background: var(--product-surface-raised);
}

body.tool-hub-page.product-workbench-aligned .tabs,
body.tool-hub-page.product-workbench-aligned .mode-tabs,
body.tool-hub-page.product-workbench-aligned .detail-tabs {
  border-color: var(--product-line);
  border-radius: 10px;
  background: var(--product-surface-raised);
}

body.tool-hub-page.product-workbench-aligned .tab,
body.tool-hub-page.product-workbench-aligned .detail-tab {
  border-radius: 8px;
}

html[data-theme]
  body.tool-hub-page.product-workbench-aligned
  .tabs
  .tab.active,
html[data-theme]
  body.tool-hub-page.product-workbench-aligned
  .detail-tabs
  .detail-tab.active,
html[data-theme]
  body.tool-hub-page.product-workbench-aligned
  .mini-btn.active {
  border-color: var(--product-line-strong) !important;
  background: var(--product-blue-soft) !important;
  color: #70a7ff !important;
}

html[data-theme]
  body.tool-hub-page.product-workbench-aligned
  .btn.primary {
  border-color: #4c8dff !important;
  background: var(--product-blue) !important;
  color: #fff !important;
}

html[data-theme]
  body.tool-hub-page.product-workbench-aligned
  .layout
  button.primary {
  border-color: #4c8dff !important;
  background: var(--product-blue) !important;
  color: #fff !important;
}

html[data-theme]
  body.tool-hub-page.product-workbench-aligned
  .btn.primary
  span {
  color: inherit;
}

body.tool-hub-page.product-workbench-aligned .metric,
body.tool-hub-page.product-workbench-aligned .mini,
body.tool-hub-page.product-workbench-aligned .kpi,
body.tool-hub-page.product-workbench-aligned .summary-box,
body.tool-hub-page.product-workbench-aligned .range-card,
body.tool-hub-page.product-workbench-aligned .chart,
body.tool-hub-page.product-workbench-aligned .slider-shell,
body.tool-hub-page.product-workbench-aligned .result-card,
body.tool-hub-page.product-workbench-aligned .result-target {
  border-color: var(--product-line);
  border-radius: 10px;
  background: var(--product-surface-raised);
  box-shadow: none;
}

body.tool-percent-page.product-workbench-aligned .result-card {
  align-content: start;
  padding: 20px;
  border: 1px solid var(--product-line);
  border-radius: 14px;
  background: var(--product-surface);
}

body.tool-percent-page.product-workbench-aligned .result-head {
  min-height: 64px;
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--product-line);
}

body.tool-percent-page.product-workbench-aligned .result-head .kicker {
  margin: 0 0 5px;
  color: #6ea8ff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

body.tool-percent-page.product-workbench-aligned .result-head h2 {
  color: var(--product-text);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

body.tool-percent-page.product-workbench-aligned .result-head p {
  margin-top: 5px;
  color: var(--product-muted);
  font-size: 11px;
}

body.tool-hub-page.product-workbench-aligned .metric,
body.tool-hub-page.product-workbench-aligned .kpi {
  min-height: 96px;
  padding: 15px 16px;
}

body.tool-hub-page.product-workbench-aligned .metric .name,
body.tool-hub-page.product-workbench-aligned .kpi .name,
body.tool-hub-page.product-workbench-aligned .mini,
body.tool-hub-page.product-workbench-aligned .mini-label {
  color: var(--product-muted);
  font-size: 11px;
}

body.tool-hub-page.product-workbench-aligned .metric .value,
body.tool-hub-page.product-workbench-aligned .kpi .value {
  font-size: clamp(22px, 2.5vw, 30px);
}

body.tool-hub-page.product-workbench-aligned .mini {
  min-height: 72px;
  padding: 12px 14px;
}

body.tool-hub-page.product-workbench-aligned .mini b {
  margin-top: 6px;
  color: var(--product-text);
  font-size: 15px;
}

@media (min-width: 1080px) {
  body.product-workbench-aligned.tool-batch-page .layout,
  body.product-workbench-aligned.tool-risk-page .layout,
  body.product-workbench-aligned.tool-journal-page .layout {
    grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.62fr);
    align-items: start;
  }

  body.product-workbench-aligned.tool-percent-page .layout {
    grid-template-columns: minmax(390px, 0.86fr) minmax(0, 1.14fr);
    align-items: start;
  }

  body.product-workbench-aligned:not(.tool-networth-page):not(.tool-position-page)
    .layout
    > :first-child {
    position: sticky;
    top: 124px;
    max-height: calc(100vh - 142px);
    overflow: auto;
    scrollbar-width: thin;
  }

  body.product-workbench-aligned:not(.tool-networth-page):not(.tool-position-page)
    .layout
    > :last-child {
    min-height: calc(100vh - 142px);
  }
}

/* Net Worth follows the same summary + work area hierarchy. */
body.tool-networth-page.product-workbench-aligned .networth-app {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.88fr);
  align-items: start;
}

body.tool-networth-page.product-workbench-aligned .networth-header-card {
  display: none !important;
}

body.tool-networth-page.product-workbench-aligned .networth-balance-card {
  grid-column: 1;
  padding: 0;
  overflow: hidden;
}

body.tool-networth-page.product-workbench-aligned .balance-main {
  padding: 20px;
  border-bottom: 1px solid var(--product-line);
}

body.tool-networth-page.product-workbench-aligned .balance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

body.tool-networth-page.product-workbench-aligned .summary-tile {
  min-height: 132px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
}

body.tool-networth-page.product-workbench-aligned .summary-tile:last-child {
  border-right: 0;
}

body.tool-networth-page.product-workbench-aligned .summary-tile.liability {
  background: rgba(255, 97, 116, 0.045);
}

body.tool-networth-page.product-workbench-aligned .summary-tile.ptcg {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--product-line);
  border-right: 0;
  background:
    linear-gradient(110deg, rgba(124, 58, 237, 0.16), rgba(76, 29, 149, 0.07)),
    var(--product-surface);
}

body.tool-networth-page.product-workbench-aligned
  .summary-tile.ptcg
  .summary-copy {
  margin-top: 0;
}

body.tool-networth-page.product-workbench-aligned
  .summary-value
  .money-amount {
  font-size: clamp(20px, 2.2vw, 28px);
}

body.tool-networth-page.product-workbench-aligned .summary-copy {
  min-height: 0;
  margin-top: auto;
  font-size: 11px;
}

body.tool-networth-page.product-workbench-aligned .allocation-card,
body.tool-networth-page.product-workbench-aligned .entry-card {
  grid-column: 2;
}

body.tool-networth-page.product-workbench-aligned .curve-card {
  grid-column: 1;
  min-height: 360px;
}

body.tool-networth-page.product-workbench-aligned .detail-shell {
  grid-column: 1 / -1;
}

body.tool-networth-page.product-workbench-aligned .entry-row {
  min-height: 58px;
  border-color: var(--product-line);
  border-radius: 10px;
  background: var(--product-surface-raised);
}

body.tool-networth-page.product-workbench-aligned .detail-card {
  border-color: var(--product-line);
  border-radius: 10px;
  background: var(--product-surface-raised);
}

@media (max-width: 720px) {
  body.product-workbench-aligned .product-page-header {
    position: relative;
    min-height: 82px;
    gap: 12px;
    padding: 14px 0 12px;
  }

  body.tool-hub-page.product-workbench-aligned .product-page-heading > h1 {
    max-width: 190px;
    font-size: clamp(22px, 7vw, 28px);
  }

  .product-page-heading > p,
  .product-page-heading > span {
    display: none;
  }

  .product-page-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  body.tool-hub-page.product-workbench-aligned .product-page-primary {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    padding: 0;
  }

  body.tool-hub-page.product-workbench-aligned .product-page-primary span,
  body.tool-hub-page.product-workbench-aligned
    .product-header-utilities
    > a {
    display: none !important;
  }

  body.tool-hub-page.product-workbench-aligned
    .product-header-utilities
    .tool-utility-link {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    flex-basis: 40px;
  }

  body.tool-networth-page.product-workbench-aligned .networth-app {
    grid-template-columns: 1fr;
  }

  body.tool-networth-page.product-workbench-aligned .networth-balance-card,
  body.tool-networth-page.product-workbench-aligned .allocation-card,
  body.tool-networth-page.product-workbench-aligned .entry-card,
  body.tool-networth-page.product-workbench-aligned .curve-card,
  body.tool-networth-page.product-workbench-aligned .detail-shell {
    grid-column: 1;
  }

  body.tool-networth-page.product-workbench-aligned .balance-grid {
    grid-template-columns: 1fr;
  }

  body.tool-networth-page.product-workbench-aligned .summary-tile {
    min-height: 108px;
    border-right: 0;
    border-bottom: 1px solid var(--product-line);
  }

  body.tool-networth-page.product-workbench-aligned .summary-tile:last-child {
    border-bottom: 0;
  }

  body.tool-networth-page.product-workbench-aligned .summary-tile.ptcg {
    grid-column: 1;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body[data-product-id="admin-access"].product-workbench-aligned .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  body[data-product-id="admin-access"].product-workbench-aligned .kpi {
    min-height: 92px;
  }
}

/* Readability and interaction pass */
body.product-home-page {
  overflow-x: clip;
}

body.product-home-page .topbar,
body.product-home-page .shell {
  width: calc(100% - var(--home-rail-width)) !important;
  max-width: calc(100% - var(--home-rail-width)) !important;
}

body.product-home-page .dashboard-summary-shell,
body.product-home-page .dashboard-allocation-grid,
body.product-home-page .dashboard-summary-shell > *,
body.product-home-page .dashboard-allocation-grid > * {
  min-width: 0;
}

body.product-home-page .dashboard-donut-ring::after {
  inset: 22px;
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(7, 17, 31, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

body.product-home-page .dashboard-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  isolation: isolate;
  display: flex;
  width: 120px;
  height: 120px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

body.product-home-page .dashboard-donut-center::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: inherit;
  background: rgba(7, 17, 31, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
  content: "";
}

body.product-home-page .dashboard-donut-center span {
  color: #bac6d8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

body.product-home-page .dashboard-donut-center strong {
  width: max-content;
  max-width: none;
  flex: 0 0 auto;
  align-self: center;
  color: #fff;
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 850;
  line-height: 1.08;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.stock-identity-mark {
  position: relative;
  display: grid;
  overflow: hidden;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, hsl(var(--stock-icon-hue) 78% 60%) 38%, var(--product-line));
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.13), transparent 42%),
    color-mix(in srgb, hsl(var(--stock-icon-hue) 54% 28%) 62%, var(--product-surface-soft));
  color: #f8fafc;
}

.stock-identity-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 0.72em;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.stock-identity-mark.has-logo .stock-identity-fallback {
  opacity: 0;
}

.stock-identity-mark img {
  position: absolute;
  inset: 50% auto auto 50%;
  display: block;
  max-width: 76%;
  max-height: 76%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.stock-identity-mark.stock-icon-fit-wide img {
  width: auto;
  height: auto;
  max-width: 88%;
  max-height: 62%;
}

.stock-identity-mark.stock-icon-surface-light.has-logo {
  border-color: rgba(226, 232, 240, 0.78);
  background: #f8fafc;
}

body.product-home-page .dashboard-stock-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 12px;
}

body.product-home-page .dashboard-donut-ring.compact .dashboard-donut-center {
  width: 94px;
  height: 94px;
  padding: 8px;
}

body.product-home-page
  .dashboard-donut-ring.compact
  .dashboard-donut-center
  strong {
  font-size: 15px;
}

body.tool-hub-page.product-workbench-aligned .product-page-heading > span,
body.tool-hub-page.product-workbench-aligned .sub,
body.tool-hub-page.product-workbench-aligned .section-copy,
body.tool-hub-page.product-workbench-aligned .balance-copy,
body.tool-hub-page.product-workbench-aligned .summary-copy,
body.tool-hub-page.product-workbench-aligned .timeline-meta {
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.5;
}

body.tool-hub-page.product-workbench-aligned .panel-heading p,
body.tool-hub-page.product-workbench-aligned .metric .name,
body.tool-hub-page.product-workbench-aligned .kpi .name,
body.tool-hub-page.product-workbench-aligned .mini,
body.tool-hub-page.product-workbench-aligned .mini-label {
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.45;
}

body.tool-hub-page.product-workbench-aligned label {
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.35;
}

body.tool-hub-page.product-workbench-aligned input,
body.tool-hub-page.product-workbench-aligned select {
  min-height: 46px;
  font-size: 15px;
}

body.tool-hub-page.product-workbench-aligned textarea {
  min-height: 86px;
  font-size: 15px;
  line-height: 1.5;
}

body.tool-hub-page.product-workbench-aligned input::placeholder,
body.tool-hub-page.product-workbench-aligned textarea::placeholder {
  color: #7f8ea4;
  opacity: 1;
}

body.tool-hub-page.product-shell-direct
  :is(a, button, input, select, textarea, summary):focus-visible,
body.product-home-page
  :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid #70a7ff !important;
  outline-offset: 2px;
}

body.tool-hub-page.product-workbench-aligned .empty,
body.tool-hub-page.product-workbench-aligned .chart-empty {
  min-height: 132px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.035);
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

body.tool-networth-page.product-workbench-aligned .curve-card {
  min-height: 0;
}

body.tool-networth-page.product-workbench-aligned
  #snapshotChart.chart-empty {
  display: grid;
  min-height: 190px;
}

.snapshot-empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--product-line-strong);
  border-radius: 12px;
  background: var(--product-blue-soft);
  color: #70a7ff;
  font-size: 18px;
}

.snapshot-empty-title {
  color: var(--product-text);
  font-size: 15px;
  font-weight: 850;
}

.snapshot-empty-action {
  min-height: 40px;
  margin-top: 4px;
  padding: 0 14px;
  border: 1px solid var(--product-line-strong);
  border-radius: 10px;
  background: var(--product-blue-soft);
  color: #8db8ff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

body.tool-position-page.product-shell-direct .donut-shell,
body.tool-position-page.product-shell-direct .donut-chart {
  width: 164px;
  height: 164px;
}

body.tool-position-page.product-shell-direct .donut-center {
  isolation: isolate;
  inset: 18px;
  padding: 10px;
  border-radius: 50%;
}

body.tool-position-page.product-shell-direct .donut-center::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid var(--workbench-line);
  border-radius: inherit;
  background: rgba(7, 17, 31, 0.82);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  content: "";
}

body.tool-position-page.product-shell-direct .donut-center .label,
body.tool-position-page.product-shell-direct .donut-center .subvalue {
  color: #b8c4d5;
}

body.tool-position-page.product-shell-direct .donut-center .value {
  color: #fff;
  font-size: 16px !important;
  overflow-wrap: normal !important;
  white-space: nowrap !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.82);
}

body.tool-position-page[data-workbench-view="cashflow"]
  #cashFlowDetails
  .actions {
  grid-template-columns: 1fr;
}

html[data-theme]
  body.tool-position-page.product-shell-direct[data-workbench-view="cashflow"]
  #cashFlowDetails
  .btn.primary {
  width: 100%;
  min-height: 44px;
  border-color: #4c8dff !important;
  background: var(--workbench-blue) !important;
  color: #fff !important;
}

body.tool-position-page[data-workbench-view="cashflow"]
  #cashFlowDetails
  .table-shell {
  margin-top: 18px;
}

@media (min-width: 1080px) {
  body.tool-hub-page.product-workbench-aligned.tool-journal-page .layout {
    grid-template-columns: minmax(460px, 0.94fr) minmax(0, 1.46fr);
  }

  body.tool-hub-page.product-workbench-aligned.tool-journal-page
    .layout
    > :first-child,
  body.tool-hub-page.product-workbench-aligned.tool-percent-page
    .layout
    > :first-child,
  body[data-product-id="admin-access"].product-workbench-aligned
    .layout
    > :first-child {
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.tool-hub-page.product-workbench-aligned.tool-journal-page
    .layout
    > :last-child,
  body.tool-hub-page.product-workbench-aligned.tool-percent-page
    .layout
    > :last-child,
  body[data-product-id="admin-access"].product-workbench-aligned
    .layout
    > :last-child {
    min-height: 0 !important;
  }
}

.journal-progressive {
  margin-top: 14px !important;
  padding: 0 !important;
  overflow: hidden;
  border-color: var(--product-line) !important;
  background: var(--product-surface-raised) !important;
}

.journal-progressive > summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--product-text) !important;
  list-style: none;
}

.journal-progressive > summary::-webkit-details-marker {
  display: none;
}

.journal-progressive > summary::after {
  margin-left: auto;
  color: #70a7ff;
  font-size: 18px;
  content: "+";
}

.journal-progressive[open] > summary::after {
  content: "−";
}

.journal-progressive > summary span,
.journal-progressive > summary small {
  display: block;
}

.journal-progressive > summary span {
  font-size: 13px;
  font-weight: 850;
}

.journal-progressive > summary small {
  margin-top: 2px;
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 650;
}

.journal-progressive-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--product-line);
}

@media (max-width: 720px) {
  body.product-home-page .topbar,
  body.product-home-page .shell {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.product-home-page .dashboard-donut-center {
    width: 120px;
    height: 120px;
    padding: 8px;
  }

  body.tool-hub-page.product-workbench-aligned .product-page-heading > h1 {
    line-height: 1.14;
  }
}

/* Authenticated homepage: the same full-page workspace as Position Manager */
body.product-home-page {
  --home-rail-width: 176px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 0%, rgba(59, 130, 246, 0.07), transparent 28%),
    var(--product-bg);
  color: var(--product-text);
}

body.product-home-page .topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--home-rail-width);
  z-index: 210;
  display: flex;
  width: auto;
  min-height: 108px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 18px 28px 14px 24px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--product-line);
  border-radius: 0 !important;
  background: color-mix(in srgb, var(--product-bg) 96%, transparent);
  box-shadow: none;
  backdrop-filter: blur(18px);
  transform: none !important;
}

body.product-home-page .topbar-brand-group {
  min-width: 0;
}

body.product-home-page .sidebar-toggle-button {
  display: none !important;
}

body.product-home-page .homepage-heading {
  min-width: 0;
}

body.product-home-page .homepage-heading p,
body.product-home-page .homepage-heading h1,
body.product-home-page .homepage-heading span {
  margin: 0;
}

body.product-home-page .homepage-heading p {
  color: #6ea8ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body.product-home-page .homepage-heading h1 {
  margin-top: 2px;
  color: var(--product-text);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 850;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

body.product-home-page .homepage-heading span {
  display: block;
  margin-top: 4px;
  color: var(--product-muted);
  font-size: 12px;
}

body.product-home-page .topbar-side {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

body.product-home-page .home-date-chip {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid var(--product-line);
  border-radius: 10px;
  background: var(--product-surface);
  color: var(--product-muted);
  font-size: 12px;
  font-weight: 850;
}

body.product-home-page .topbar-side > .privacy-toggle,
body.product-home-page .topbar-side > .theme-toggle {
  display: inline-grid !important;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  flex: 0 0 42px;
  place-items: center;
  margin: 0;
  padding: 0 !important;
  border: 1px solid var(--product-line);
  border-radius: 10px;
  background: var(--product-surface) !important;
  color: var(--product-muted) !important;
  line-height: 0;
}

body.product-home-page .topbar-side .privacy-toggle-icon,
body.product-home-page .topbar-side .theme-toggle-icon {
  display: block;
  margin: 0;
}

body.product-home-page .auth-inlinebar {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.product-home-page .auth-account-chip {
  min-height: 42px;
  padding: 0 12px 0 7px;
  border-color: var(--product-line);
  border-radius: 10px;
  background: var(--product-surface);
}

body.product-home-page .auth-account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

body.product-home-page .auth-inlinebar .button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0 13px;
  border-radius: 10px;
}

body.product-home-page .shell {
  width: auto;
  max-width: none;
  margin: 0 0 0 var(--home-rail-width);
  padding: 124px 24px 48px;
  overflow: visible;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
}

body.product-home-page .home-view,
body.product-home-page .dashboard-main,
body.product-home-page #dashboardHomeContent {
  min-width: 0;
}

body.product-home-page .dashboard-shell {
  display: block;
  padding: 0;
}

body.product-home-page .dashboard-sidebar {
  position: fixed !important;
  top: 0 !important;
  bottom: 0;
  left: 0;
  z-index: 220;
  display: flex;
  width: var(--home-rail-width);
  max-height: none !important;
  min-height: 100vh !important;
  justify-content: flex-start;
  gap: 0;
  overflow-y: auto;
  padding: 18px 14px 16px;
  border: 0;
  border-right: 1px solid var(--product-line);
  border-radius: 0 !important;
  background: var(--product-sidebar) !important;
  box-shadow: none !important;
  scrollbar-width: thin;
}

body.product-home-page .dashboard-sidebar-brand {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 0 7px;
  color: var(--product-text);
  text-decoration: none;
}

body.product-home-page .dashboard-sidebar-brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(112, 167, 255, 0.3);
  border-radius: 10px;
  background: linear-gradient(145deg, #407eef, #5c8cf4);
  color: #fff;
}

body.product-home-page .dashboard-sidebar-brand-copy {
  min-width: 0;
}

body.product-home-page .dashboard-sidebar-brand-copy > span {
  display: block;
  color: var(--product-text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.035em;
}

body.product-home-page .dashboard-sidebar-brand-copy strong {
  color: #70a7ff;
}

body.product-home-page .dashboard-sidebar-brand-copy small {
  display: block;
  margin-top: 4px;
  color: var(--product-muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

body.product-home-page .dashboard-sidebar-top,
body.product-home-page .dashboard-sidebar-bottom {
  display: grid;
  gap: 3px;
}

body.product-home-page .dashboard-sidebar-top {
  flex: 0 0 auto;
}

body.product-home-page .dashboard-sidebar-bottom {
  width: 100%;
  margin-top: auto;
}

body.product-home-page .dashboard-sidebar-label {
  margin: 9px 8px 5px;
  color: #607089;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.product-home-page .dashboard-sidebar-label-spaced {
  margin-top: 17px;
}

body.product-home-page .sidebar-link {
  min-height: 44px;
  gap: 9px;
  padding: 0 8px;
  border-radius: 9px;
  color: var(--product-muted);
  font-size: 12px;
  font-weight: 800;
}

body.product-home-page .sidebar-link:hover,
body.product-home-page .sidebar-link.active {
  background: var(--product-blue-soft) !important;
  color: #70a7ff !important;
}

body.product-home-page .sidebar-link-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 0 !important;
  border-radius: 8px;
  background: transparent !important;
  color: currentColor;
}

body.product-home-page .sidebar-link-icon i {
  font-size: 15px;
}

body.product-home-page .sidebar-sync-card {
  margin-top: 9px;
  padding: 11px 12px;
  border-color: var(--product-line);
  border-radius: 10px;
  background: var(--product-surface);
}

body.product-home-page .sidebar-sync-card p {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.product-home-page .sidebar-sync-card strong {
  margin-top: 5px;
  font-size: 11px;
}

body.product-home-page .dashboard-main,
body.product-home-page #dashboardHomeContent {
  display: grid;
  gap: 16px;
}

body.product-home-page .dashboard-overview-panel {
  padding: 0 !important;
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.product-home-page
  .dashboard-overview-panel
  > .dashboard-section-head {
  display: none;
}

body.product-home-page .dashboard-summary-shell {
  display: grid;
  grid-template-columns: minmax(360px, 1.45fr) repeat(4, minmax(140px, 0.72fr));
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 14px;
  background: var(--product-surface);
}

body.product-home-page .dashboard-delta-grid {
  display: contents;
}

body.product-home-page .dashboard-total-card,
body.product-home-page .dashboard-delta-grid .snapshot-mini {
  min-height: 174px;
  padding: 18px;
  border: 0 !important;
  border-right: 1px solid var(--product-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.product-home-page .dashboard-delta-grid .snapshot-mini:last-child {
  border-right: 0 !important;
}

body.product-home-page .dashboard-total-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

body.product-home-page .dashboard-total-card > span,
body.product-home-page .snapshot-mini > span {
  color: var(--product-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

body.product-home-page .dashboard-total-card > .snapshot-value {
  margin-top: 2px;
}

body.product-home-page
  .dashboard-total-card
  > .snapshot-value
  .snapshot-money-amount {
  font-size: clamp(30px, 2.8vw, 42px) !important;
  line-height: 1;
}

body.product-home-page
  .dashboard-total-card
  > .snapshot-value
  .snapshot-money-currency {
  font-size: 9px;
}

body.product-home-page .dashboard-total-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 5px;
  padding-top: 11px;
  border-top: 1px solid var(--product-line);
}

body.product-home-page .dashboard-inline-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 62px;
  padding: 0 12px 0 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.product-home-page
  .dashboard-inline-stat
  .snapshot-money-amount {
  display: none;
}

body.product-home-page
  .dashboard-inline-stat
  .snapshot-money-currency {
  display: none;
}

body.product-home-page
  .dashboard-inline-stat
  .snapshot-money-detail {
  margin-top: 1px;
  color: var(--product-text);
  font-size: clamp(15px, 1.12vw, 18px) !important;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

body.product-home-page .dashboard-inline-stat p {
  margin: 2px 0 0;
  min-height: 0 !important;
  font-size: 9px;
  line-height: 1.25;
}

body.product-home-page
  .dashboard-delta-grid
  .snapshot-value.has-detail
  .snapshot-money-amount {
  display: none;
}

body.product-home-page
  .dashboard-delta-grid
  .snapshot-value.has-detail
  .snapshot-money-detail {
  display: block;
  color: var(--product-text);
  font-size: clamp(17px, 1.35vw, 23px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

body.product-home-page .dashboard-delta-grid .snapshot-value {
  min-height: 0;
  font-size: 23px;
  line-height: 1.05;
}

body.product-home-page .dashboard-delta-grid .snapshot-mini p {
  min-height: 0 !important;
  font-size: 10px;
  line-height: 1.35;
}

body.product-home-page .dashboard-inline-stat + .dashboard-inline-stat {
  padding-right: 0;
  padding-left: 12px;
  border-left: 1px solid var(--product-line) !important;
}

body.product-home-page .dashboard-overview-meta {
  margin-top: 10px;
  color: var(--product-muted);
  font-size: 10px;
}

body.product-home-page .dashboard-allocation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

body.product-home-page .dashboard-donut-card,
body.product-home-page .dashboard-status-card,
body.product-home-page .dashboard-curve-panel {
  border: 1px solid var(--product-line) !important;
  border-radius: 14px !important;
  background: var(--product-surface) !important;
  box-shadow: none !important;
}

body.product-home-page .dashboard-donut-card,
body.product-home-page .dashboard-status-card {
  min-height: 330px;
  padding: 18px;
}

body.product-home-page .dashboard-card-head {
  margin-bottom: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--product-line);
}

body.product-home-page .dashboard-card-head h2 {
  color: var(--product-text);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

body.product-home-page .dashboard-card-head p {
  margin-top: 5px;
  color: var(--product-muted);
  font-size: 11px;
}

body.product-home-page .dashboard-status-row {
  min-height: 48px;
  border-color: var(--product-line);
}

body.product-home-page .dashboard-curve-panel {
  padding: 20px;
}

body.product-home-page .snapshot-curve-shell,
body.product-home-page .snapshot-curve-day-panel {
  border-color: var(--product-line);
  border-radius: 10px;
  background: var(--product-surface-raised);
  box-shadow: none;
}

body.product-home-page .range-tab,
body.product-home-page .snapshot-benchmark-control select {
  min-height: 40px;
  border-color: var(--product-line);
  border-radius: 9px;
  background: var(--product-surface-raised);
}

body.product-home-page .range-tab.active {
  border-color: var(--product-line-strong);
  background: var(--product-blue-soft);
  color: #70a7ff;
}

body.product-home-page .site-footer {
  display: none;
}

body.product-home-page .home-mobile-more,
body.product-home-page .home-mobile-backdrop {
  display: none;
}

@media (max-width: 1180px) and (min-width: 980px) {
  body.product-home-page .home-date-chip,
  body.product-home-page .homepage-heading span {
    display: none;
  }

  body.product-home-page .dashboard-summary-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.product-home-page .dashboard-total-card {
    grid-column: 1 / -1;
    border-right: 0 !important;
    border-bottom: 1px solid var(--product-line) !important;
  }

  body.product-home-page .dashboard-delta-grid .snapshot-mini:nth-child(2n) {
    border-right: 0 !important;
  }
}

@media (max-width: 979px) {
  body.product-home-page {
    --home-rail-width: 0px;
  }

  body.product-home-page .topbar {
    left: 0;
    flex-direction: row;
    align-items: center;
    min-height: 82px;
    gap: 12px;
    padding: 12px;
  }

  body.product-home-page .homepage-heading p,
  body.product-home-page .homepage-heading span,
  body.product-home-page .home-date-chip,
  body.product-home-page .auth-account-chip,
  body.product-home-page .status-badge {
    display: none !important;
  }

  body.product-home-page .homepage-heading h1 {
    max-width: 150px;
    font-size: 24px;
  }

  body.product-home-page .topbar-side {
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
  }

  body.product-home-page .auth-inlinebar {
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
  }

  body.product-home-page .auth-inlinebar .button {
    min-width: 40px;
    min-height: 40px;
    padding: 0 10px;
  }

  body.product-home-page #logoutButton {
    width: 40px;
    padding: 0;
  }

  body.product-home-page #logoutButton span {
    display: none;
  }

  body.product-home-page .topbar-side > .privacy-toggle,
  body.product-home-page .topbar-side > .theme-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    flex-basis: 40px;
  }

  body.product-home-page .shell {
    margin-left: 0;
    padding: 98px 12px 104px;
  }

  body.product-home-page .dashboard-sidebar {
    display: none;
  }

  body.product-home-page .dashboard-summary-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.product-home-page .dashboard-total-card {
    grid-column: 1 / -1;
    border-right: 0 !important;
    border-bottom: 1px solid var(--product-line) !important;
  }

  body.product-home-page .dashboard-total-card,
  body.product-home-page .dashboard-delta-grid .snapshot-mini {
    min-height: 132px;
    padding: 15px;
  }

  body.product-home-page .dashboard-delta-grid .snapshot-mini:nth-child(2n) {
    border-right: 0 !important;
  }

  body.product-home-page .dashboard-allocation-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
  }

  body.product-home-page .dashboard-donut-card,
  body.product-home-page .dashboard-status-card {
    min-height: 0;
  }

  body.product-home-page .dashboard-curve-panel {
    padding: 16px;
  }

  body.product-home-page .mobile-dock {
    position: fixed;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 300;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    padding: 7px;
    border: 1px solid var(--product-line);
    border-radius: 16px;
    background: var(--product-sidebar);
    box-shadow: var(--product-shadow);
  }

  body.product-home-page .mobile-dock-item {
    min-height: 50px;
    padding: 4px;
    border-radius: 10px;
    color: var(--product-muted);
    font-size: 9px;
  }

  body.product-home-page .mobile-dock-item.active {
    background: var(--product-blue-soft);
    color: #70a7ff;
  }

  body.product-home-page .home-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 280;
    display: block;
    border: 0;
    background: rgba(2, 6, 13, 0.66);
    backdrop-filter: blur(4px);
  }

  body.product-home-page .home-mobile-more {
    position: fixed;
    right: 12px;
    bottom: 82px;
    left: 12px;
    z-index: 290;
    display: block;
    padding: 16px;
    border: 1px solid var(--product-line);
    border-radius: 16px;
    background: var(--product-sidebar);
    box-shadow: var(--product-shadow);
  }

  body.product-home-page .home-mobile-more[hidden],
  body.product-home-page .home-mobile-backdrop[hidden] {
    display: none !important;
  }

  body.product-home-page .home-mobile-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
  }

  body.product-home-page .home-mobile-more-head small,
  body.product-home-page .home-mobile-more-head strong {
    display: block;
  }

  body.product-home-page .home-mobile-more-head small {
    color: #70a7ff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  body.product-home-page .home-mobile-more-head strong {
    margin-top: 3px;
    color: var(--product-text);
    font-size: 17px;
  }

  body.product-home-page .home-mobile-more-close {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--product-line);
    border-radius: 10px;
    background: var(--product-surface);
    color: var(--product-muted);
  }

  body.product-home-page .home-mobile-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.product-home-page .home-mobile-more-grid button {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--product-line);
    border-radius: 10px;
    background: var(--product-surface);
    color: var(--product-muted);
    font-size: 12px;
    font-weight: 850;
    text-align: left;
  }

  body.product-home-page .home-mobile-more-grid button i {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
  }
}

/* One surface language across calculators, net worth, journal, and admin */
body.tool-hub-page.product-shell-direct .tool-hero,
body.tool-hub-page.product-shell-direct .card,
body.tool-hub-page.product-shell-direct .networth-card,
body.tool-hub-page.product-shell-direct .kpi,
body.tool-hub-page.product-shell-direct .tool-stat,
body.tool-hub-page.product-shell-direct .summary-box,
body.tool-hub-page.product-shell-direct .panel-card,
body.tool-hub-page.product-shell-direct .viz-card {
  border-color: var(--product-line);
  border-radius: 14px;
  background: var(--product-surface);
  box-shadow: none;
}

body.tool-hub-page.product-shell-direct .tool-hero {
  margin-top: 18px;
  padding: 24px;
}

body.tool-hub-page.product-shell-direct .tool-hero::after {
  background: rgba(59, 130, 246, 0.14);
}

body.tool-hub-page.product-shell-direct h1,
body.tool-hub-page.product-shell-direct h2,
body.tool-hub-page.product-shell-direct h3 {
  color: var(--product-text);
}

body.tool-hub-page.product-shell-direct .sub,
body.tool-hub-page.product-shell-direct .small,
body.tool-hub-page.product-shell-direct .section-copy,
body.tool-hub-page.product-shell-direct .balance-copy,
body.tool-hub-page.product-shell-direct .summary-copy,
body.tool-hub-page.product-shell-direct .timeline-meta {
  color: var(--product-muted);
}

body.tool-hub-page.product-shell-direct .tool-eyebrow,
body.tool-hub-page.product-shell-direct .section-kicker,
body.tool-hub-page.product-shell-direct .card-title .eyebrow {
  color: #70a7ff;
}

body.tool-hub-page.product-shell-direct .tool-pills span,
body.tool-hub-page.product-shell-direct .step-chip,
body.tool-hub-page.product-shell-direct .pill {
  border-color: var(--product-line);
  background: var(--product-surface-soft);
  color: var(--product-muted);
}

body.tool-hub-page.product-shell-direct input,
body.tool-hub-page.product-shell-direct select,
body.tool-hub-page.product-shell-direct textarea {
  border-color: var(--product-line);
  border-radius: 10px;
  background: var(--product-surface-raised);
  color: var(--product-text);
}

body.tool-hub-page.product-shell-direct input:focus,
body.tool-hub-page.product-shell-direct select:focus,
body.tool-hub-page.product-shell-direct textarea:focus {
  border-color: var(--product-line-strong);
  box-shadow: 0 0 0 3px var(--product-blue-soft);
}

body.tool-hub-page.product-shell-direct .btn,
body.tool-hub-page.product-shell-direct .mini-btn,
body.tool-hub-page.product-shell-direct .remove,
body.tool-hub-page.product-shell-direct button {
  border-radius: 10px;
}

body.tool-hub-page.product-shell-direct .btn.primary {
  border-color: #4c8dff;
  background: var(--product-blue);
  color: #fff;
}

body.tool-hub-page.product-shell-direct table {
  border: 1px solid var(--product-line);
  border-radius: 12px;
  background: var(--product-surface);
}

body.tool-hub-page.product-shell-direct th {
  background: var(--product-surface-raised);
  color: var(--product-muted);
}

body.tool-hub-page.product-shell-direct th,
body.tool-hub-page.product-shell-direct td {
  border-color: var(--product-line);
}

/* Position Manager: explicit route home plus aligned navigation */
.workbench-home-shortcut {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 0 11px;
  border: 1px solid var(--workbench-line);
  border-radius: 10px;
  background: var(--workbench-surface);
  color: var(--workbench-text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}

.workbench-home-shortcut .bi-arrow-right-short {
  margin-left: auto;
  color: var(--workbench-muted);
  font-size: 18px;
}

.workbench-nav-label {
  margin: 24px 12px 0;
  color: var(--workbench-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workbench-sidebar .workbench-sidebar-nav {
  margin-top: 8px;
}

body.tool-position-page .workbench-sidebar-nav button,
body.tool-position-page .workbench-mobile-nav button {
  font-size: 14px;
  font-weight: 800;
}

.workbench-sidebar .workbench-sync-card {
  margin-top: 10px;
}

.workbench-mobile-home {
  display: none;
}

.workbench-header .tool-utility-nav {
  min-height: 44px;
  align-items: center;
  margin: 0 !important;
}

.workbench-header .tool-utility-link,
.workbench-header .tool-utility-nav button {
  display: inline-grid !important;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0 !important;
  line-height: 0 !important;
}

.workbench-header .tool-utility-link i,
.workbench-header .tool-utility-nav button i {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  line-height: 1;
}

.workbench-sidebar-nav button i,
.workbench-mobile-nav button i,
.workbench-brand-mark i,
.sidebar-link-icon i,
.chrome-icon-button i {
  display: grid;
  place-items: center;
  line-height: 1;
}

/* Homepage visual alignment */
body:not(.tool-hub-page) .topbar,
body:not(.tool-hub-page) .shell,
body:not(.tool-hub-page) .dashboard-sidebar,
body:not(.tool-hub-page) .dashboard-panel,
body:not(.tool-hub-page) .app-panel {
  border-radius: 16px;
}

body:not(.tool-hub-page) .sidebar-link {
  min-height: 48px;
  border-radius: 10px;
  padding-inline: 10px;
}

body:not(.tool-hub-page) .sidebar-link-icon,
body:not(.tool-hub-page) .chrome-icon-button {
  display: inline-grid;
  border-radius: 10px;
  place-items: center;
  padding: 0;
  line-height: 0;
}

body:not(.tool-hub-page) .topbar-side .theme-toggle,
body:not(.tool-hub-page) .topbar-side .privacy-toggle {
  display: inline-grid;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0 !important;
  line-height: 0;
}

body:not(.tool-hub-page) .topbar-side .theme-toggle > *,
body:not(.tool-hub-page) .topbar-side .privacy-toggle > * {
  margin: 0;
}

body:not(.tool-hub-page) .dashboard-chip,
body:not(.tool-hub-page) .button,
body:not(.tool-hub-page) input,
body:not(.tool-hub-page) select {
  border-radius: 10px;
}

body:not(.tool-hub-page) .mobile-dock-item {
  display: grid;
  min-width: 0;
  min-height: 52px;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 10px;
  line-height: 1;
}

body:not(.tool-hub-page) .mobile-dock-item i {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  font-size: 16px;
}

body:not(.tool-hub-page) .mobile-dock-item span {
  font-size: 10px;
}

/* Shared mobile page switcher */
.product-mobile-shell {
  display: none;
}

@media (max-width: 1240px) and (min-width: 981px) {
  body.tool-hub-page.product-shell-direct:not(.tool-position-page) .wrap {
    width: calc(100% - 152px);
    margin-left: 152px;
    padding-inline: 18px;
  }

  .product-rail {
    width: 152px;
    padding-inline: 10px;
  }

  .product-rail-link {
    padding-inline: 9px;
    font-size: 12px;
  }
}

@media (max-width: 980px) {
  body.tool-hub-page.product-shell-direct:not(.tool-position-page) .wrap {
    width: 100%;
    margin-left: 0;
    padding: 0 16px 112px;
  }

  body.tool-position-page.product-shell-direct .wrap {
    padding-bottom: 112px;
  }

  .product-rail {
    display: none;
  }

  .product-mobile-shell {
    display: block;
  }

  .product-mobile-dock {
    position: fixed;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 180;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 7px;
    border: 1px solid var(--product-line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--product-sidebar) 96%, transparent);
    box-shadow: var(--product-shadow);
    backdrop-filter: blur(20px);
  }

  .product-mobile-link,
  .product-mobile-more-button {
    display: grid;
    min-width: 0;
    min-height: 52px;
    place-items: center;
    align-content: center;
    gap: 5px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--product-muted);
    text-decoration: none;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
  }

  .product-mobile-link i,
  .product-mobile-more-button i {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    font-size: 16px;
  }

  .product-mobile-link.active,
  .product-mobile-more-button.active,
  .product-mobile-more-button[aria-expanded="true"] {
    background: var(--product-blue-soft);
    color: #70a7ff;
  }

  .product-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 181;
    border: 0;
    border-radius: 0 !important;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(4px);
  }

  .product-mobile-more {
    position: fixed;
    right: 12px;
    bottom: 88px;
    left: 12px;
    z-index: 182;
    padding: 16px;
    border: 1px solid var(--product-line);
    border-radius: 16px;
    background: var(--product-sidebar);
    box-shadow: var(--product-shadow);
  }

  .product-mobile-more[hidden],
  .product-mobile-backdrop[hidden] {
    display: none;
  }

  .product-mobile-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
  }

  .product-mobile-more-head small,
  .product-mobile-more-head strong {
    display: block;
  }

  .product-mobile-more-head small {
    color: #70a7ff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .product-mobile-more-head strong {
    margin-top: 3px;
    color: var(--product-text);
    font-size: 17px;
  }

  .product-mobile-close {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--product-line);
    background: var(--product-surface);
    color: var(--product-muted);
  }

  .product-mobile-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .product-mobile-more-link {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--product-line);
    border-radius: 10px;
    background: var(--product-surface);
    color: var(--product-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 850;
  }

  .product-mobile-more-link.active {
    border-color: var(--product-line-strong);
    background: var(--product-blue-soft);
    color: #70a7ff;
  }

  .product-back-to-top {
    right: max(14px, calc(env(safe-area-inset-right) + 14px));
    bottom: max(88px, calc(env(safe-area-inset-bottom) + 88px));
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 720px) {
  body.tool-hub-page.product-shell-direct:not(.tool-position-page) .wrap {
    padding-inline: 12px;
  }

  body.tool-hub-page.product-shell-direct .product-utility-bar {
    min-height: 58px;
    overflow-x: auto;
    padding-block: 9px;
    scrollbar-width: none;
  }

  body.tool-hub-page.product-shell-direct .product-utility-bar::-webkit-scrollbar {
    display: none;
  }

  body.tool-hub-page.product-shell-direct .product-utility-bar .tool-utility-link {
    min-height: 38px;
    white-space: nowrap;
  }

  .product-utility-context {
    display: none;
  }

  .workbench-mobile-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    color: #70a7ff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 850;
  }

  .workbench-heading .workbench-mobile-home span {
    display: inline;
  }

  .workbench-search,
  .workbench-secondary-button {
    top: 96px;
  }

  .workbench-mobile-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow-x: hidden;
  }

  .workbench-mobile-nav button {
    padding-inline: 4px;
    font-size: 9px;
  }

  body.tool-hub-page.product-shell-direct .product-utility-bar {
    flex-wrap: nowrap;
  }

  body.tool-hub-page.product-shell-direct .product-utility-bar > a:first-child {
    flex: 1 1 auto;
  }

  body.tool-hub-page.product-shell-direct .product-utility-bar > a:nth-of-type(2),
  body.tool-hub-page.product-shell-direct .product-utility-bar .privacy-toggle,
  body.tool-hub-page.product-shell-direct .product-utility-bar .theme-toggle {
    display: inline-grid;
    width: 40px;
    min-width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    padding: 0;
    line-height: 0;
  }

  body.tool-hub-page.product-shell-direct .product-utility-bar > a:nth-of-type(2) span {
    display: none;
  }

  body.tool-hub-page.product-shell-direct .product-utility-bar .privacy-toggle i,
  body.tool-hub-page.product-shell-direct .product-utility-bar .theme-toggle i,
  body.tool-hub-page.product-shell-direct .product-utility-bar > a:nth-of-type(2) i {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
  }

  body:not(.tool-hub-page) .mobile-dock {
    position: fixed;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 180;
    margin: 0;
    border-radius: 16px;
  }
}

/* One desktop navigation and page-header system across every workspace route. */
:root {
  --product-sidebar-width: 178px;
  --product-content-gutter: 22px;
  --product-header-height: 114px;
}

@media (max-width: 1240px) and (min-width: 981px) {
  :root {
    --product-sidebar-width: 152px;
    --product-content-gutter: 18px;
  }
}

@media (min-width: 981px) {
  body.product-home-page {
    --home-rail-width: var(--product-sidebar-width);
  }

  body.tool-hub-page.product-shell-direct:not(.tool-position-page) .wrap,
  body.tool-position-page .wrap {
    width: calc(100% - var(--product-sidebar-width));
    margin-left: var(--product-sidebar-width);
    padding-right: var(--product-content-gutter);
    padding-left: var(--product-content-gutter);
  }

  body.product-home-page .shell {
    padding-right: var(--product-content-gutter);
    padding-left: var(--product-content-gutter);
  }

  .product-sidebar-shell {
    width: var(--product-sidebar-width) !important;
    padding: 24px 14px 18px !important;
    border: 0 !important;
    border-right: 1px solid var(--product-line) !important;
    border-radius: 0 !important;
    background: color-mix(in srgb, var(--product-sidebar) 96%, transparent) !important;
    box-shadow: none !important;
    scrollbar-width: none;
  }

  .product-sidebar-shell::-webkit-scrollbar {
    display: none;
  }

  .product-sidebar-shell .product-sidebar-brand {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0 8px;
    color: var(--product-text);
    text-decoration: none;
  }

  .product-sidebar-shell .product-sidebar-mark {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: var(--product-blue);
    color: #eff6ff;
    font-size: 15px;
  }

  .product-sidebar-shell .product-sidebar-wordmark {
    min-width: 0;
    color: var(--product-text);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
  }

  .product-sidebar-shell .product-sidebar-wordmark > span {
    display: block;
  }

  .product-sidebar-shell .product-sidebar-wordmark strong {
    color: #70a7ff;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
  }

  .product-sidebar-shell .product-sidebar-wordmark small {
    display: block;
    margin-top: 4px;
    color: var(--product-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  .product-sidebar-shell .product-sidebar-nav {
    display: grid;
    gap: 5px;
    margin-top: 28px;
  }

  .product-sidebar-shell .product-sidebar-label {
    margin: 0 10px 6px;
    color: var(--product-muted);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .product-sidebar-shell .product-sidebar-label-spaced {
    margin-top: 16px;
  }

  body.product-home-page .product-sidebar-shell .product-sidebar-link,
  body.tool-position-page .product-sidebar-shell .product-sidebar-link,
  body.tool-hub-page .product-sidebar-shell .product-sidebar-link {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    gap: 11px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--product-muted);
    text-align: left;
    text-decoration: none;
    font-family: var(--product-font-family);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
  }

  .product-sidebar-shell .product-sidebar-link-long {
    min-height: 52px;
  }

  .product-sidebar-shell .product-sidebar-link-long > span:last-child {
    overflow-wrap: anywhere;
  }

  .product-sidebar-shell .product-sidebar-link > i,
  .product-sidebar-shell .product-sidebar-link .sidebar-link-icon {
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    border: 0;
    background: transparent;
    color: currentColor;
    font-size: 16px;
  }

  .product-sidebar-shell .product-sidebar-link:hover,
  .product-sidebar-shell .product-sidebar-link:focus-visible {
    border-color: var(--product-line);
    background: rgba(148, 163, 184, 0.08);
    color: var(--product-text);
  }

  .product-sidebar-shell .product-sidebar-link.active,
  .product-sidebar-shell .product-sidebar-link[aria-current="page"] {
    border-color: rgba(96, 165, 250, 0.14);
    background: var(--product-blue-soft) !important;
    color: #70a7ff !important;
  }

  .product-sidebar-shell .workbench-home-shortcut {
    margin-top: 0;
  }

  .product-sidebar-shell .workbench-nav-label {
    margin-top: 16px;
  }

  .product-sidebar-shell .workbench-sidebar-nav.product-sidebar-nav {
    margin-top: 0;
  }

  body.product-home-page .product-page-header-shell,
  body.tool-position-page .product-page-header-shell,
  body.product-workbench-aligned .product-page-header-shell {
    min-height: var(--product-header-height);
    border: 0;
    border-bottom: 1px solid var(--product-line);
    border-radius: 0 !important;
    background: color-mix(in srgb, var(--product-bg) 96%, transparent);
    box-shadow: none;
    backdrop-filter: blur(18px);
  }

  body.product-home-page .product-sidebar-shell {
    background: color-mix(in srgb, var(--product-sidebar) 96%, transparent) !important;
    scrollbar-width: none;
  }

  body.product-home-page .product-sidebar-shell::-webkit-scrollbar {
    display: none;
  }

  body.product-home-page .product-sidebar-shell .product-sidebar-brand {
    width: 100%;
    min-height: 44px;
    gap: 10px;
    margin-bottom: 0;
    padding: 0 8px;
  }

  body.product-home-page .product-sidebar-shell .product-sidebar-nav {
    gap: 5px;
  }

  body.product-home-page .product-sidebar-shell .product-sidebar-label {
    margin: 0 10px 6px;
  }

  body.product-home-page .product-page-header-shell {
    padding-right: var(--product-content-gutter) !important;
    padding-left: var(--product-content-gutter) !important;
    background: color-mix(in srgb, var(--product-bg) 96%, transparent) !important;
  }

  body.tool-position-page .workbench-header.product-page-header-shell,
  body.product-workbench-aligned .product-page-header.product-page-header-shell {
    width: calc(100% + (var(--product-content-gutter) * 2));
    margin-right: calc(var(--product-content-gutter) * -1);
    margin-left: calc(var(--product-content-gutter) * -1);
    padding: 18px var(--product-content-gutter) 14px;
  }

  body.tool-position-page .workbench-heading.product-page-heading-shell {
    padding-left: 12px;
  }

  body.tool-position-page .workbench-header-actions > * {
    align-self: center;
    margin: 0 !important;
  }

  body.tool-position-page .workbench-search,
  body.tool-position-page .workbench-primary-button,
  body.tool-position-page .workbench-secondary-button,
  body.tool-position-page .workbench-header .tool-utility-nav {
    height: 44px;
    min-height: 44px;
  }

  body.tool-position-page .workbench-section-tabs {
    position: sticky;
    top: var(--product-header-height);
    z-index: 84;
    display: flex;
    width: 100%;
    align-items: center;
    gap: 5px;
    margin: 0 0 16px;
    padding: 9px 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--product-line);
    background: color-mix(in srgb, var(--product-bg) 94%, transparent);
    backdrop-filter: blur(18px);
    scrollbar-width: none;
  }

  body.tool-position-page .workbench-section-tabs::-webkit-scrollbar {
    display: none;
  }

  body.tool-position-page .workbench-section-tabs button {
    min-width: 0;
    min-height: 36px;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 12px;
    white-space: nowrap;
  }

  body.tool-position-page .workbench-section-tabs button.active,
  body.tool-position-page .workbench-section-tabs button[aria-current="page"] {
    border-color: rgba(96, 165, 250, 0.16);
    background: var(--product-blue-soft);
    color: #70a7ff;
  }

  body .product-page-heading-shell > p {
    margin: 0 0 3px;
    color: #6ea8ff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  body .product-page-heading-shell > h1 {
    margin: 0;
    color: var(--product-text);
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -0.045em;
  }

  body .product-page-heading-shell > span {
    display: block;
    margin-top: 5px;
    color: var(--product-muted);
    font-size: 12px;
    line-height: 1.5;
  }

  .product-page-actions-shell {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-back-to-top {
    transition: none;
  }
}
