
/* SR-084-N2: shared desktop and mobile Suite navigation */
header.suite-bar,header.topbar.suite-bar{box-sizing:border-box;position:sticky;top:0;z-index:900;display:flex;align-items:center;flex-direction:row;justify-content:flex-start;gap:22px;background:#071a30;color:#fff;font:600 15px/1.25 Arial,sans-serif;padding:0 3vw;height:64px;margin:0;border:0}
.suite-bar .suite-word{display:inline-flex;align-items:center;white-space:nowrap;font:bold 21px/1 Arial,sans-serif;letter-spacing:-.7px;color:#fff;text-decoration:none}
.suite-word b,.suite-word i{color:#00caff;font-style:normal}.suite-word em{color:#ff850a;font-style:normal}.suite-word i{font-size:29px;margin-right:6px}
header.suite-bar nav.suite-nav{position:static;display:flex;align-items:stretch;gap:0;flex:auto;width:auto;margin:0;padding:0;background:none;border:0}
header.suite-bar nav.suite-nav>*{display:inline-flex;align-items:center;justify-content:center;font:bold 15px Arial,sans-serif;min-height:44px;width:auto;margin:0;padding:0 12px;border:0;border-bottom:3px solid transparent;border-radius:0;color:white;background:transparent;text-decoration:none}
header.suite-bar nav.suite-nav>[aria-current=page]{border-bottom-color:#00caff;color:#00caff}
header.suite-bar .topbar-right{margin-left:auto}.suite-bar .primary-nav svg{display:none}
body:has(#app>.suite-bar){padding-top:0}body #app>.suite-bar{width:100vw;margin-left:calc(50% - 50vw);margin-bottom:18px}
.sync-choices{padding:16px}.sync-choices fieldset{border:0;margin:16px 0;padding:0;display:flex;gap:16px;flex-wrap:wrap}.sync-choices legend{font-weight:bold;margin-bottom:8px}.sync-choices label{display:inline-flex;align-items:center;gap:6px}.sync-choices input{width:auto;min-height:0;accent-color:#008cc7}
.activity-tabs button[aria-pressed=true]{background:#00caff;color:#071a30}
@media(max-width:760px){header.suite-bar,header.topbar.suite-bar{height:auto;min-height:86px;display:flex;flex-wrap:wrap;gap:0 8px;padding:6px 12px 0}header.suite-bar nav.suite-nav{order:3;flex:0 0 100%;justify-content:space-around}header.suite-bar .suite-word{font-size:17px}header.suite-bar .topbar-right{display:flex}.suite-bar .app-version,.suite-bar .local-badge{display:none}}
/* The two Merge workspaces share the light desktop surface. */
@media(min-width:761px){
body:is([data-page="activities"],[data-page="settings"]){background:#fff;color:#101b2c;--line:#d1dbe5;--muted:#465b70}
body:is([data-page="activities"],[data-page="settings"]) #app{box-sizing:border-box;width:100%;max-width:none;margin:0;padding:0 clamp(16px,2.5vw,44px) 30px;background:#fff;color:#101b2c;border:0;border-radius:0;box-shadow:none}
body:is([data-page="activities"],[data-page="settings"]) #app>.suite-bar{width:auto;margin:0 clamp(-44px,-2.5vw,-16px) 18px}
body:is([data-page="activities"],[data-page="settings"]) .view-heading{font:bold clamp(26px,3vw,38px)/1.2 Arial,sans-serif;color:#101b2c;margin:18px 0}
.suite-settings{margin-left:auto;background:transparent;color:white;font-weight:700}
body[data-page=activities] .activity-tabs{display:flex;gap:8px;background:none;margin:16px 0;padding:0}
body[data-page=activities] .activity-tabs button{background:#f4f6f9;border:1px solid #cbd5e1;color:#101b2c;border-radius:8px;min-height:46px;width:min(220px,48%);font-weight:bold}
body[data-page=activities] .activity-tabs button[aria-pressed=true]{background:#00caff}
.activity-feed .feed-entry,.activity-feed .feed-labels{display:grid;grid-template-columns:2fr 1fr .8fr 1fr;gap:12px;width:100%;align-items:center;text-align:left;padding:12px 18px;color:#101b2c}
.activity-feed .feed-entry{background:white;border:1px solid #d6dfe8;border-radius:0}.feed-labels{background:#eef2f6;font-weight:bold}.feed-success{background:#dcf7e7;color:#175a37;border-radius:6px;padding:4px 8px;justify-self:start}
body[data-page=settings] .settings-list{display:flex;flex-wrap:wrap;gap:10px;background:white;border:0}
body[data-page=settings] .settings-list>.settings-row{width:auto;min-width:180px}
body[data-page=settings] .settings-row,body[data-page=settings] .sync-choices{background:#f7f9fb;color:#12243a;border:1px solid #d3dce7;border-radius:8px}
body[data-page=settings] .settings-name,body[data-page=settings] .settings-copy{color:#12243a}
body[data-page=settings] .settings-description.success{color:#206440}
body[data-page=settings] .sync-choices{width:100%;background:white}
body[data-page=settings] .sync-choices fieldset{position:relative;display:grid;grid-template-columns:1fr 1.4fr;margin:8px 0;padding:12px 12px 12px 25%;border:1px solid #d3dce7;border-radius:6px}
body[data-page=settings] .sync-choices legend{position:absolute;left:12px;top:12px}
body[data-page=settings] .sync-choices button{display:block;width:auto;margin-left:auto;background:#00caff;color:#071a30;padding:10px 18px}
@media(max-width:640px){.activity-feed .feed-labels{display:none}.activity-feed .feed-entry{grid-template-columns:1fr 1fr}.sync-choices label{min-height:40px}body[data-page=settings] .sync-choices fieldset{display:flex;flex-direction:column;padding:8px 12px}body[data-page=settings] .sync-choices legend{position:static}}

}
body:has(suite-masthead){padding-top:0}
#app>suite-masthead{position:sticky;top:0;z-index:900;display:block;width:100vw;margin:0 0 18px calc(50% - 50vw)}
body:has(#app>suite-masthead) #app{padding-top:0;margin-top:0}
body:has(suite-masthead[current="Account"]) #app{border-top:0}

:host{display:block;font:16px/1.5 "DM Sans",Arial,sans-serif;color:#fff}.app{min-height:0;font:16px/1.5 "DM Sans",Arial,sans-serif}
:host .brand-art{background-image:url("/assets/suite-family.png?v=ea97f6fb0484405e0764c8ecb7971a5f50a0a39b371bb396d3323b9e8342f136")}

/* Match Studio's action buttons while preserving list rows and icon controls. */
#app :is(button.primary,button.secondary,.check-garmin,.activity-tabs button,.sync-choices button),
#app:has(#suite-overview) :is(section,form,details) button {
 box-sizing:border-box; width:fit-content; max-width:100%; min-height:46px;
 padding:13px 20px; border:1px solid #d0dae0; border-radius:10px;
 background:#fff; color:#092a3e; font:650 14px/1.3 "DM Sans",Arial,sans-serif;
 box-shadow:0 2px 3px #082a3b08;
}
#app button.primary,
#app .sync-choices button,#app:has(#suite-overview) :is(#login,#add,form button) {
 background:#075267; border-color:#075267; color:#fff;
}
#app :is(button.primary,.sync-choices button):hover:not(:disabled),
#app:has(#suite-overview) :is(#login,#add,form button):hover:not(:disabled){background:#09667b}
#app :is(button.primary,button.secondary,.sync-choices button):disabled,
#app:has(#suite-overview) button:disabled{opacity:.4;cursor:not-allowed}
body[data-shared]:has(#app[aria-busy=true]):not([data-page]),
body[data-shared][data-page=loading]{background:#fff;color:#092a3e}
body[data-shared][data-page=loading] #app{background:white;border:0;box-shadow:none}

.activity-feed .beta-mobile{display:none}
@media(max-width:760px){
 body[data-page=activities],body[data-page=settings],body[data-page=loading],body[data-shared][data-page=loading] #app{background:#111;color:#eee}
 #app .activity-feed .beta-mobile{display:block}
 #app .activity-feed .feed-entry,#app .feed-labels{display:none}
 #app .activity-tabs{display:flex;gap:12px;border-bottom:1px solid #333}
 #app .activity-tabs button,#app .activity-tabs button[aria-pressed=true],#app .check-garmin{width:auto;border:0;border-radius:0;background:transparent;box-shadow:none;color:#bbb;padding:10px 4px}
 #app .activity-tabs button[aria-pressed=true]{border-bottom:2px solid #75c7e1;color:#fff}
 #app .sync-choices fieldset{display:grid;border-bottom:1px solid #333;padding-bottom:12px}
 #app .sync-choices label{min-height:40px}
 #app .view-heading{color:#fff}
}
:host .merge-info{display:inline-grid;place-items:center;min-width:44px;min-height:44px;color:white;font:24px/1 Arial,sans-serif;text-decoration:none}

@media(max-width:760px){
 :host(:is([current="Merge"],[current="Studio"],[current="Account"])) .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0}
 :host(:is([current="Merge"],[current="Studio"],[current="Account"])) .brand{grid-area:1/1;min-width:0}
 :host(:is([current="Merge"],[current="Studio"],[current="Account"])) .brand-wordmark{font-size:clamp(14px,4vw,21px)}
 :host(:is([current="Merge"],[current="Studio"],[current="Account"])) .topbar-right{grid-area:1/2;display:flex;gap:0;margin:0 6px 0 0}
 :host(:is([current="Merge"],[current="Studio"],[current="Account"])) .topbar-right :is(.app-version,.local-badge){display:none}
 :host(:is([current="Merge"],[current="Studio"],[current="Account"])) .studio-settings{width:44px;height:44px;justify-content:center;gap:0;padding:0;font-size:0}
 :host(:is([current="Merge"],[current="Studio"],[current="Account"])) .primary-nav{grid-area:2/1/3/-1;width:100%}
}

.topbar .primary-nav.suite-nav [aria-current=page] {
 background:transparent;
 text-decoration:underline;
 text-decoration-color:#18d1ff;
 text-decoration-thickness:2px;
 text-underline-offset:0.45em;
}
@media(max-width:900px){:host([synthetic]) .topbar-right .local-badge{display:inline-block;border:0;background:none;padding:0;font-size:10px;line-height:1.15;max-width:48px;white-space:normal}:host([synthetic]) .topbar-right .live-dot{display:none}:host([synthetic]) .topbar-right .app-version{display:inline;font-size:10px}}

@media (max-width: 760px) {
  .topbar .primary-nav.suite-nav {
    justify-content: flex-start;
    gap: 0;
  }
  .topbar .primary-nav.suite-nav > * + * {
    position: relative;
  }
  .topbar .primary-nav.suite-nav > * + *::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 1em;
    border-left: 1px solid #ff702d;
  }
}

/* SR-110: visible separators and a non-navigating Analyze placeholder. */
.topbar .primary-nav.suite-nav{justify-content:flex-start;gap:0}
.topbar .primary-nav.suite-nav>*+*{position:relative;margin-left:10px;padding-left:22px}
.topbar .primary-nav.suite-nav>*+*::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);height:1em;border-left:1px solid #ff702d}
.topbar .primary-nav .nav-placeholder{display:inline-flex;align-items:center;min-height:44px;color:#b4c6cd;font-size:14px;white-space:nowrap;cursor:default}
@media(max-width:760px){.topbar .primary-nav.suite-nav>*+*{margin-left:6px;padding-left:16px}}

/* BEGIN SR-101-UX SHARED THEME */
/* SR-101-UX-S1: same inherited typography inside the existing Shadow DOM. */
:host, :host .app, :host .primary-nav, :host .topbar-right {
  font-family: var(--suite-font, system-ui, "Segoe UI", Arial, sans-serif);
}
:host .topbar { background: var(--suite-navy, #002232); }
:host .app-version { white-space: normal; }
/* SR-101-UX-S2: stable compact hierarchy; keep environment and UI build visible. */
:host .frontend-version { min-width: 0; }
:host .suite-ui-build { flex-shrink: 0; }
@media(max-width:760px) {
  :host([current]) .topbar {
    display: grid; grid-template-columns: minmax(0,1fr) 44px;
    gap: 0; padding: 12px 16px 8px;
  }
  :host([current]) .brand {
    grid-column: 1; grid-row: 1; margin: 0; min-height: 44px;
    min-width: 0; gap: 8px;
  }
  :host([current]) .brand-art {
    width: 44px; height: 44px; background-size: 229.88px 153.25px;
    background-position: -173.31px -91.29px; border-radius: 10px;
  }
  :host([current]) .brand-wordmark { font-size: clamp(15px,4vw,19px); }
  :host([current]) .brand small { font-size: 7px; letter-spacing: 2px; }
  :host([current]) .topbar-right { display: contents; margin: 0; }
  :host([current]) .studio-settings {
    grid-column: 2; grid-row: 1; width: 44px; min-height: 44px;
    margin: 0; padding: 0; gap: 0; font-size: 0; justify-content: center;
  }
  :host([current]) .studio-settings svg { width: 20px; height: 20px; }
  :host([current]) .merge-info { display: none; }
  :host([current]) .primary-nav.suite-nav {
    grid-column: 1/-1; grid-row: 2; width: 100%; margin: 8px 0 0;
    padding: 0; gap: 0; flex-wrap: nowrap; justify-content: space-between;
  }
  :host([current]) .primary-nav.suite-nav > * {
    min-width: 0; min-height: 44px; margin: 0; padding: 8px 4px;
    gap: 6px; font-size: 13px; white-space: nowrap;
  }
  :host([current]) .primary-nav.suite-nav > *::before { display: none; }
  :host([current]) .primary-nav svg { width: 20px; height: 20px; }
  :host([current]) .topbar-right .local-badge {
    display: inline-flex; grid-column: 1/-1; grid-row: 3; justify-self: start;
    max-width: none; border: 0; background: none; padding: 0;
    font-size: 10px; line-height: 16px; white-space: nowrap;
  }
  :host([current]) .topbar-right .app-version {
    display: inline-flex; grid-column: 1/-1; grid-row: 3; justify-self: end;
    min-width: 0; max-width: calc(100% - 100px); gap: 4px;
    font-size: 10px; line-height: 16px; white-space: nowrap;
  }
  :host([current=Analyze]) .topbar-right .app-version { max-width: 100%; }
  :host([current]) .frontend-version { overflow: hidden; text-overflow: ellipsis; }
}

/* SR-101-UX-A2: navigation retry only repeats the product read. */
:host .nav-placeholder > button { min-width:44px; min-height:44px; border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; }
:host .nav-placeholder > button:focus-visible { outline:3px solid #70d7ed; outline-offset:-3px; }
:host .studio-settings[aria-current=page]{color:#70d7ed;background:#153c4b;border-radius:8px}

/* SR-101-LOAD-F2: same geometry before permission reads and stylesheet arrival. */
suite-masthead { min-height:84px; background:var(--suite-navy,#002232); }
@media(max-width:760px){ suite-masthead { min-height:132px; } }
:host .primary-nav.suite-nav > .nav-placeholder { gap:10px; padding:8px 12px 8px 22px; font-weight:600; }
:host .primary-nav.suite-nav > .nav-placeholder svg { flex-shrink:0; }
:host .local-badge[hidden] { display:none; }
@media(max-width:760px){ :host .primary-nav.suite-nav > .nav-placeholder { gap:6px; padding:8px 4px; } }

/* SR-155: official Total Distance store link; current workspace stays in this tab. */
:host .total-distance-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:4px 8px;box-sizing:border-box;color:#fff;text-decoration:none;white-space:nowrap;border-radius:9px;font-size:13px;line-height:1.25}
:host .total-distance-link img{display:block;width:32px;height:32px;border-radius:7px;flex-shrink:0}
:host .total-distance-link:hover{background:#153c4b}
:host .total-distance-link:focus-visible{outline:2px solid #70d7ed;outline-offset:2px}
@media(max-width:1100px){:host .total-distance-link>span{display:none}}
@media(max-width:760px){
 :host([current]) .topbar{grid-template-columns:minmax(0,1fr) 44px 44px}
 :host([current]) .total-distance-link{grid-column:2;grid-row:1;width:44px;height:44px;padding:6px}
 :host([current]) .studio-settings{grid-column:3}
}
@media(max-width:380px){:host([current]) .brand-wordmark{font-size:12px}}
