/* A shared workspace: daily decisions first, deeper history a step away. */
.shell { display: block; min-height: 100vh; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.app-header { position: relative; z-index: 60; background: var(--nav-bg); color: #f7f6f0; }
.app-header-inner { display: flex; align-items: center; gap: 28px; max-width: 1480px; min-height: 82px; margin: auto; padding: 14px 36px; }
.app-brand { display: flex; align-items: center; gap: 12px; flex: none; text-decoration: none; }
.app-brand .brand-name { font-size: 23px; font-weight: 750; letter-spacing: -.045em; }
.app-brand img { width: 64px; height: auto; transform: rotate(-3deg); }
.primary-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.primary-nav a { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 13px; border-radius: 5px; color: #c1d1db; text-decoration: none; font-weight: 550; white-space: nowrap; }
.primary-nav a:hover { background: #ffffff0b; color: #fff; }
.primary-nav a.active { background: #ffffff12; color: #fff; box-shadow: inset 0 -3px var(--accent); }
.primary-nav .icon { width: 18px; height: 18px; }
.app-header .site-search { flex: 0 1 250px; width: 250px; }
.app-header .site-search-form { background: #ffffff0a; border-color: #ffffff30; color: #fff; border-radius: 5px; }
.app-header .site-search-form input { color: #fff; }
.app-header .site-search-form input::placeholder, .app-header .site-search-submit { color: #c1d1db; }
.app-header .site-search-shortcut { color: #c1d1db; border-color: #ffffff30; }
.app-header :focus-visible { outline-color: var(--accent); }
.app-account { display: flex; align-items: center; justify-content: center; gap: 7px; color: #d8e2e8; text-decoration: none; font-size: 14px; white-space: nowrap; }
.app-account:hover, .app-account.active { color: #fff; }
.workspace-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; max-width: 1408px; margin: auto; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 62px; }
.workspace-views { display: flex; align-items: center; gap: 4px; min-width: 0; }
.workspace-label { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; margin-right: 16px; white-space: nowrap; }
.workspace-views > a, .analytics-nav > summary { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 4px; color: var(--ink-2); font-size: 14px; text-decoration: none; white-space: nowrap; }
.workspace-views > a:hover, .analytics-nav > summary:hover { background: var(--surface-2); color: var(--ink); }
.workspace-views > a.active { color: var(--ink); background: var(--surface); box-shadow: inset 0 -2px var(--ink); }
.analytics-nav { position: relative; }
.analytics-nav > summary { cursor: pointer; list-style: none; }
.analytics-nav > summary::-webkit-details-marker { display: none; }
.analytics-nav > summary .icon { width: 13px; height: 13px; transform: rotate(90deg); }
.analytics-nav[open] > summary .icon { transform: rotate(-90deg); }
.analytics-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 65; display: grid; width: 240px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px #0002; }
.analytics-menu a { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 10px; color: var(--ink); text-decoration: none; font-size: 14px; border-radius: 4px; }
.analytics-menu a:hover, .analytics-menu a[aria-current] { background: var(--surface-2); }
.analytics-menu a span { color: var(--muted); font-size: 12px; }
.workspace-toolbar .sync { padding: 0; max-width: 300px; }
.workspace-toolbar .sync-live { display: flex; align-items: center; gap: 12px; position: relative; }
.workspace-toolbar .sync-indicator { gap: 4px; font-size: 12px; white-space: nowrap; }
.workspace-toolbar .sync-label { display: inline; }
.workspace-toolbar .sync-status { font-size: 12px; max-width: 190px; }
.workspace-toolbar .sync-progress { position: absolute; left: 0; bottom: -7px; width: 100%; height: 2px; }
.workspace-toolbar .sync-count { padding-left: 0; font-size: 11px; }
.workspace-demo { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.shell > .main { width: 100%; max-width: 1480px; padding: 32px 36px 40px; margin: 0 auto; min-height: calc(100vh - 144px); }
.display { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 42px); font-weight: 650; letter-spacing: -.035em; line-height: 1.15; }
.display-md { font-size: clamp(26px, 2.8vw, 36px); }
.page-head { margin-bottom: 26px; }
.page-sub { font-size: 16px; line-height: 1.55; }
.panel { box-shadow: none; border: 1px solid var(--line); }
.panel h2 { font-size: 19px; }
.hero-figure, .kpi-value, .tile-value, .card-stats dd, .pb-time, .record-list dd, .age-value, .age-factor-value { font-family: var(--font); }
.btn { border-radius: 5px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: #e7bd37; color: var(--accent-ink); border-color: #e7bd37; }
.preview-banner { border-radius: var(--r); border-color: var(--line); background: var(--surface); }
.preview-banner h1 { font-family: var(--font-display); font-weight: 650; letter-spacing: -.03em; }
.preview-feature { border-radius: var(--r); box-shadow: none; }
.preview-feature h3 { font-family: var(--font); font-weight: 650; }
.site-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; margin-top: 44px; padding-top: 20px; }
.footer-note { margin-right: auto; font-size: 13px; color: var(--muted); }
.site-footer .display-controls { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0; margin: 0; border: 0; order: 0; }
.site-footer .distance-toggle { align-self: auto; }
.site-footer .seg-btn { font-size: 12px; padding: 3px 8px; }
.site-footer nav { font-size: 12px; }
.grid { gap: 20px; }
@media (max-width: 1480px) { .workspace-toolbar { margin-inline: 36px; } }
@media (max-width: 1180px) {
  .app-header-inner { gap: 20px; padding-inline: 24px; }
  .app-brand img { display: none; }
  .app-header .site-search { flex-basis: 200px; width: 200px; }
  .primary-nav a { padding-inline: 10px; }
  .workspace-toolbar { margin-inline: 24px; }
  .shell > .main { padding-inline: 24px; }
  .workspace-label { display: none; }
}
@media (max-width: 900px) {
  .app-header-inner { flex-wrap: wrap; gap: 10px 16px; min-height: 0; padding: 16px 20px 0; }
  .app-brand { margin-right: auto; }
  .app-brand img { display: block; width: 54px; }
  .primary-nav { order: 3; flex: 1 0 100%; margin: 0 -4px; gap: 0; padding-top: 3px; }
  .primary-nav a { flex: 1; border-radius: 0; padding: 13px 6px; font-size: 15px; }
  .app-header .site-search { order: 1; flex: 0 1 220px; width: 220px; }
  .search-enhanced .app-header .site-search { flex: 0 0 36px; width: 36px; }
  .app-account { order: 2; }
  .app-header .site-search.is-open, .search-enhanced .app-header .site-search.is-open { order: 2; flex-basis: 100%; width: 100%; }
  .app-header .site-search.is-open + .app-account { order: 1; }
  .workspace-toolbar { margin-inline: 20px; min-height: 54px; }
  .workspace-toolbar .sync-status { display: none; }
  .shell > .main { padding: 26px 20px 28px; }
}
@media (max-width: 600px) {
  .app-header-inner { padding-inline: 16px; }
  .app-brand .brand-name { font-size: 21px; }
  .app-brand img { width: 50px; }
  .app-header .site-search { order: 2; flex: 1 0 100%; width: 100%; }
  .search-enhanced .app-header .site-search { order: 1; flex: 0 0 36px; width: 36px; }
  .app-header .site-search.is-open, .search-enhanced .app-header .site-search.is-open { flex: 1 0 100%; width: 100%; }
  .search-enhanced .app-header .site-search:not(.is-open) input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .app-header .site-search-shortcut { display: none; }
  .app-account span { display: none; }
  .app-account { order: 1; min-width: 28px; min-height: 36px; }
  .search-enhanced .app-account { order: 2; }
  .primary-nav a { gap: 5px; font-size: 14px; }
  .primary-nav .icon { width: 16px; height: 16px; }
  .workspace-toolbar { margin-inline: 16px; gap: 6px; }
  .workspace-views { gap: 0; }
  .workspace-views > a, .analytics-nav > summary { padding-inline: 7px; font-size: 13px; }
  .analytics-nav > summary { font-size: 0; gap: 0; }
  .analytics-nav > summary::before { content: 'More'; font-size: 13px; }
  .analytics-nav > summary .icon { margin-left: 4px; }
  .workspace-toolbar .sync-label, .workspace-demo { display: none; }
  .workspace-toolbar .sync-indicator { padding: 0; }
  .analytics-menu { right: auto; left: -100px; }
  .shell > .main { padding: 22px 16px 24px; }
  .site-footer { gap: 14px; }
  .footer-note { flex-basis: 100%; }
  .page-head { gap: 14px; }
}
