/* Avante application layout */
:root {
  --app-edge:#3b394b;
  --app-surface:#201f2b;
  --app-lilac:#d7b2ff;
}
body { background: #171620; }
.shell .main { margin-block: 0; padding-top: max(20px, env(safe-area-inset-top)); }
.shell .top { margin-bottom: 24px; }
.shell .card {
  border-color: var(--app-edge);
  border-radius: 19px;
}
.shell .heading h1, .home-heading h1, .goals-hero h1 {
  font-family: 'Barlow Condensed', Barlow, sans-serif;
  font-size: clamp(2.5rem, 6vw, 3.65rem);
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.shell .heading p { margin-top: .45em; }
.shell :where(button,summary,a,input,select):focus-visible {
  outline: 2px solid var(--app-lilac);
  outline-offset: 3px;
}
.shell :where(.card,.plan-copy,.home-heading) h2 { overflow-wrap: anywhere; }
.shell .btn { min-height: 44px; }
#workout-storage-status:empty { display:none; }
.home-heading { margin:0 0 16px; }
.home-heading p { color:var(--muted); margin:0 0 5px; text-transform:capitalize; }
[data-screen="home"] .top .date { visibility:hidden; }
.home-lead, .home-insights { display:grid; gap:12px; }
.home-lead { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); }
.home-heading + .home-lead .today-card {
  position:relative;
  align-items:stretch;
  min-width:0;
  padding:22px;
  border:1px solid #546335;
  border-radius:20px;
  background: radial-gradient(ellipse at 80% 20%,#33402c,transparent 72%),#232a25;
}
.home-heading + .home-lead .today-card.has-media { grid-template-columns:minmax(0,1fr) minmax(76px,35%); }
.today-card .today-label {
  color:var(--lime);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.11em;
  font-size:.72rem;
  margin-block:0 6px;
}
.today-card .today-copy h2 { font-size:clamp(1.85rem,4vw,2.7rem); }
.today-card .today-media .thumb {
  height:100%;
  min-height:116px;
  max-height:180px;
  border:1px solid #56684b;
  background:#e9e7e2;
}
.today-card .today-media .thumb img { background:#e9e7e2; object-fit: contain; }
.home-frequency { align-content:center; }
.home-frequency .section-head { gap:8px; }
.frequency-count { font:700 1.9rem/1 'Barlow Condensed',sans-serif; color:var(--lime); white-space:nowrap; }
.frequency-count small { font:.85rem Barlow,sans-serif; color:var(--muted); }
.home-frequency .week { margin:13px 0; }
.home-frequency .day { border-radius:9px; }
.home-frequency .progress { height:5px; }
.home-shortcuts {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:12px 0;
}
.home-shortcuts .shortcut {
  display:grid;
  justify-items:center;
  gap:7px;
  padding:10px 3px;
  background:#242231;
  color:var(--ink);
  border:1px solid #3d384c;
  font-size:clamp(.72rem,2.9vw,.91rem);
}
.shortcut .ico {
  box-sizing:content-box;
  width:19px;
  height:19px;
  color:var(--app-lilac);
}
.home-shortcuts .shortcut-run { background:#322743; border-color:#59436c; }
.home-insights { margin-top:12px; }
.home-insights .listrow { flex-wrap:wrap; }
.home-insights .listrow .rowleft { min-width:0; }
.screen-actions { margin-bottom:16px; }
.plan-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:12px; }
.plan-card {
  display:grid;
  grid-template-rows: auto 1fr;
  overflow:hidden;
  background:var(--app-surface);
  border:1px solid var(--app-edge);
  border-radius:19px;
}
.plan-cover {
  display:grid;
  place-items:center;
  background: radial-gradient(ellipse at center,#4d3a69,transparent 82%),#30243e;
  color:var(--app-lilac);
}
.plan-cover .thumb { height:clamp(115px,20vw,180px); width:100%; background:#e9e7e2; }
.plan-cover .thumb img { object-fit:contain; background:#e9e7e2; }
.plan-cover > .ico { width:3rem; height:3rem; margin:34px; }
.plan-copy { display:flex; flex-direction:column; align-items:start; padding:16px; gap:5px; }
.plan-copy p { margin:0; color:var(--app-lilac); font-size:.83rem; font-weight:600; }
.plan-copy h2 { font-size:1.45rem; line-height:1.04; }
.plan-copy > span { font-size:.88rem; }
.plan-copy .actions { margin-top:auto; padding-top:10px; width:100%; }
.plan-copy .actions .btn { flex:1; }
.app-disclosure summary, .goal-editor summary {
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
  cursor:pointer;
  min-height:44px;
  gap:12px;
}
.app-disclosure summary::-webkit-details-marker, .goal-editor summary::-webkit-details-marker { display:none; }
.app-disclosure > summary::after, .goal-editor > summary::after {
  flex:none;
  width:8px;
  height:8px;
  margin-right:5px;
  transform:rotate(45deg);
  border:solid var(--app-lilac);
  border-width:0 2px 2px 0;
  content:"";
}
.app-disclosure[open] > summary::after, .goal-editor[open] > summary::after { transform:rotate(225deg); }
.app-disclosure summary h2 { margin:0; font-size:1.22rem; }
[data-screen="progress"] .metric .metric-head .ico, [data-screen="progress"] .metric .number { color:var(--app-lilac); }
[data-screen="progress"] .metric { background:#242131; }
[data-screen="progress"] .metric:first-child .number { color:var(--lime); }
.dossier-card { border-color:#4c4261; }
.dossier-card:has(details[open]) { border-color:#785c92; }
.profile-identity {
  display:flex;
  align-items:center;
  gap:14px;
  border-bottom:1px solid var(--app-edge);
  padding-bottom:14px;
  margin-bottom:14px;
}
.profile-identity .avatar { flex:none; width:56px; height:56px; }
.profile-identity h2 { font-size:1.45rem; margin-bottom:4px; }
.profile-identity p { margin:0; }
.library-toolbar { align-items:stretch; }
.library-search { position:relative; flex:1; min-width:0; color:var(--app-lilac); }
.library-search .ico { position:absolute; left:12px; top:50%; transform:translateY(-50%); pointer-events:none; }
.library-search input { width:100%; min-height:44px; padding-left:39px; }
.librarygrid .exercise { border-radius:16px; overflow:hidden; }
.librarygrid .exercise .thumb { height:clamp(124px,16vw,200px); }
.librarygrid .exercise .body { display:grid; gap:5px; }
.librarygrid .exercise strong { text-wrap:pretty; overflow-wrap:anywhere; }
.exercise-meta { display:flex; justify-content:space-between; flex-wrap:wrap; gap:5px; color:var(--muted); font-size:.83rem; }
.exercise-video { color:var(--app-lilac); display:inline-flex; align-items:center; gap:3px; }
.exercise-video .ico { width:13px; height:13px; }
.gym-search, .coach-invite { background:#29243a; border-color:#4d4162 !important; }
.coach-invite h2 { margin-bottom:12px; }
.coach-identity { display:flex; align-items:center; gap:10px; min-width:0; }
.coach-identity > span { display:grid; place-items:center; flex:none; width:42px; height:42px; border-radius:12px; background:#392b50; color:var(--app-lilac); font-weight:700; }
.coach-card .section-head { flex-wrap:wrap; }
.coach-sections .btn[aria-pressed="true"] { color:var(--lime); border-color:var(--lime); }
.goals-hero { padding:0; margin-bottom:15px; background:none; border:0; }
.goals-hero .goals-mark { display:none; }
.goals-collection-overview {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:18px;
  background:linear-gradient(105deg,#2c253d,#292f24);
  border:1px solid #524764;
  border-radius:19px;
}
.goals-collection-overview p { margin:5px 0 0; font-size:.9rem; max-width:42ch; }
.goals-collection-overview strong {
  color:var(--lime);
  font:700 clamp(2rem,7vw,3rem)/1 'Barlow Condensed',sans-serif;
  white-space:nowrap;
}
.goals-collection-overview small { color:var(--muted); font-size:.55em; }
.collection-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; margin:14px 0; }
.collection-nav .btn {
  padding:7px 4px;
  text-align:center;
  white-space:normal;
  line-height:1.1;
  font-size:clamp(.77rem,2.9vw,.96rem);
  color:var(--muted);
  background:#242231;
  border:1px solid #484154;
}
.collection-nav .btn[aria-pressed="true"] { color:var(--lime); background:#303526; border-color:#829b4c; }
.goal-editor { margin-bottom:14px; }
.goal-editor summary { font-weight:700; color:var(--lime); }
.goals-card { background:radial-gradient(ellipse at top,#342841,transparent 75%), var(--app-surface); }
.goals-card.goal-reached { background:radial-gradient(ellipse at top,#353e27,transparent 75%), var(--app-surface); }
@media (min-width:681px) {
  .shell .navbutton.active { background:#2e3823; color:var(--lime); box-shadow:inset 3px 0 var(--lime); }
}
@media (max-width:840px) {
  .home-lead { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:680px) {
  .shell .top { margin-bottom:14px; }
  .shell .bottom { background:#1b1a25f5; border-color:#423950; gap:0; }
  .shell .bottom button { flex:1; min-width:0; min-height:44px; padding-inline:2px; }
  .shell .bottom button.active .ico { background:#333d23; box-shadow:0 0 0 5px #333d23; }
  .home-lead .today-card.has-media { gap:12px; }
  .home-heading + .home-lead .today-card { padding:16px; }
  .today-card .today-media { display:grid; }
  .plan-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .plan-copy { padding:12px; }
  .plan-copy .actions { gap:6px; }
  .plan-copy .actions .btn { padding-inline:6px; font-size:.79rem; }
  .plan-copy .actions .ico { width:14px; height:14px; }
  .screen-actions .btn { flex:1; font-size:.85rem; padding-inline:8px; }
  .screen-actions .ico { width:15px; height:15px; }
  .goals-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:355px) {
  .home-heading + .home-lead .today-card.has-media { grid-template-columns:minmax(0,1fr); }
  .today-card .today-media { display:none; }
  .plan-copy .actions .btn { flex-basis:100%; }
}
.home-heading p { text-transform:none; }
.home-heading p::first-letter { text-transform:uppercase; }
[data-screen="progress"] .metrics { gap:7px; }
[data-screen="progress"] .metric { padding:12px 9px; border-radius:13px; min-width:0; }
[data-screen="progress"] .metric-head { align-items:start; min-height:2.4em; }
.goals-card .goals-card-foot { align-items:start; flex-wrap:wrap; gap:5px 8px; }
.goals-card .goals-card-foot strong { white-space:nowrap; }
.goals-card .goals-card-foot span { text-align:left; }
[data-screen="profile"] .profile-person { border-color:#554369; background:radial-gradient(ellipse at right top,#382b4a,transparent 52%),var(--app-surface); }
[data-screen="profile"] .profile-identity .avatar { color:var(--lime); background:#3b462b; border-color:#566643; }
[data-screen="profile"] .profile-settings { margin-bottom:14px; }
.workout-focus .focus-heading .eyebrow { color:var(--lime); }
.workout-focus .focus-navigation { border-radius:12px; padding:6px; background:#1b1925; }
.workout-focus .timer { border-color:#574068; background:#312641; }
.workout-focus .timer strong { color:var(--app-lilac); }
@media(max-width:450px) {
  [data-screen="progress"] .heading + .actions .btn { flex:1; padding-inline:7px; font-size:.85rem; }
  [data-screen="progress"] .heading + .actions .ico { width:15px; height:15px; }
}
.auth {
  background:radial-gradient(ellipse at 50% -3%,#3a3151,transparent 56%),#171620;
}
.auth .authcard {
  border:1px solid #51465e;
  border-top:3px solid var(--lime);
  border-radius:24px;
  box-shadow:0 16px 50px #0c091846;
}
.authcard h1 { font-family:'Barlow Condensed',Barlow,sans-serif; }
.auth-options .btn { min-height:44px; }
.shell .library-toolbar {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(92px,34%);
}
.shell .library-toolbar select { width:100%; max-width:none; min-width:0; }
.exercise-meta .exercise-video { width:auto; background:none; padding:0; min-height:0; }
@media(max-width:680px) {
  .auth .authcard { gap:16px; }
  .auth .authcard .brand img { height:125px; }
}
.profile-fields > summary { color:var(--lime); font-weight:700; }
.profile-fields[open] > summary { margin-bottom:12px; }
.coach-content [data-coach-status]:empty { display:none; }

/* Photography-led cards and shared surfaces */
:root {
  --avante-surface:#181821;
  --avante-raised:#20202c;
  --avante-line:#343441;
  --avante-acid:#c0fb36;
  --avante-orchid:#d3b4ff;
}
body { background:#101016; }
.shell { --panel:var(--avante-surface); --panel2:var(--avante-raised); --edge:var(--avante-line); --lime:var(--avante-acid); }
.shell .card { border-color:var(--avante-line); background-color:var(--avante-surface); }
.shell .side { background:#14141c; border-color:#292932; }
.shell .top { margin-bottom:19px; }
.shell .top .pill { background:#1b1b23; border-color:#363640; }
.shell .heading h1,.home-heading h1,.goals-hero h1 {
  font-size:clamp(2.85rem,7.6vw,4.4rem);
  letter-spacing:-.036em;
  line-height:.96;
}
.shell .navbutton.active { background:#252d1b; }
.home-heading { margin-bottom:15px; }
.home-heading p { font-size:.8rem; }
.home-heading h1 { margin-top:2px; }
.home-heading + .home-lead .today-card,
.home-heading + .home-lead .today-card.has-media {
  position:relative;
  isolation:isolate;
  display:flex;
  align-items:end;
  min-height:272px;
  padding:24px;
  background:#252332;
  border-color:#4b4757;
  border-radius:22px;
}
.home-heading + .home-lead .today-card.has-media::after {
  position:absolute;
  z-index:-1;
  inset:0;
  background:linear-gradient(0deg,#14131cf5 4%,#14131cd9 28%,transparent 83%),linear-gradient(90deg,#16151bc7 0%,transparent 85%);
  content:"";
}
.today-card .today-copy { position:relative; align-self:end; }
.today-card .today-copy h2 { font-size:clamp(2.55rem,6vw,4.2rem); letter-spacing:-.025em; }
.today-card .today-label { letter-spacing:.14em; font-size:.75rem; }
.today-card .today-copy>p:not(.today-label) { margin:7px 0 13px; color:#eee9f5; }
.today-card .today-media { display:block; position:absolute; inset:0; z-index:-2; }
.today-card .today-media .thumb {
  width:100%; height:100%; max-height:none; border:0; border-radius:0; background:transparent;
}
.today-card .today-media .thumb img {
  width:100%; height:100%; object-fit:cover; object-position:64% 43%;
  filter:saturate(.62) contrast(1.1) brightness(.98);
}
.home-frequency { border-radius:20px; border-top-color:#444b38 !important; }
.home-frequency .day { border-radius:8px; }
.home-shortcuts { gap:0; padding:8px 4px; border-block:1px solid #2d2c36; margin:12px 0; }
.home-shortcuts .shortcut { background:none; border:0; min-height:60px; border-radius:0; }
.home-shortcuts .shortcut + .shortcut { border-left:1px solid #2d2c36; }
.home-shortcuts .shortcut .ico { padding:7px; border-radius:10px; background:#282238; }
.home-shortcuts .shortcut-run .ico { color:var(--avante-acid); background:#252e1a; }
.shell #activity-period-summary {
  background: radial-gradient(ellipse at 100% 0,#2b223e 0%,transparent 64%),var(--avante-surface);
}
#activity-period-summary .period-metrics > div { font-variant-numeric:tabular-nums; }
.plan-grid { gap:14px; }
.plan-card {
  position:relative;
  isolation:isolate;
  display:flex;
  min-height:258px;
  align-items:end;
  border-radius:20px;
  background:#232030;
}
.plan-card::after {
  position:absolute;
  z-index:-1;
  inset:0;
  content:"";
  background:linear-gradient(0deg,#14131cfb 5%,#14131cea 28%,#16151c7d 60%,transparent 90%);
}
.plan-cover { position:absolute; inset:0; z-index:-2; background:#262231; }
.plan-cover .thumb { height:100%; background:#262231; }
.plan-cover .thumb img { height:100%; object-fit:cover; object-position:50% 34%; filter:saturate(.65) contrast(1.11); }
.plan-copy { position:relative; width:100%; gap:5px; }
.plan-copy h2 { font:700 clamp(1.6rem,4vw,2.55rem)/.99 'Barlow Condensed',sans-serif; }
.plan-copy p { color:#e5ccff; }
.plan-copy > span { color:#e3e0ec; }
.plan-copy .actions .secondary { background:#20202bac; }
.plan-copy .actions .btn { min-height:44px; }
.goals-collection-overview {
  background:linear-gradient(120deg,#241e30,#1b2219);
  border-color:#4b4058;
  padding:20px;
}
.goals-collection-overview strong { line-height:.9; font-size:clamp(2.9rem,9vw,5rem); }
.collection-nav { gap:0; margin:17px 0 10px; border-bottom:1px solid #3a3543; }
.collection-nav .btn { background:none; border:0; border-bottom:2px solid transparent; border-radius:0; }
.collection-nav .btn[aria-pressed="true"] { background:none; border-color:var(--avante-acid); }
.goals-grid .goals-card {
  background:radial-gradient(ellipse at 50% 5%,#362a45,transparent 72%),var(--avante-surface);
}
.goals-grid .goals-card.goal-reached {
  background:radial-gradient(ellipse at 50% 6%,#333e24,transparent 70%),var(--avante-surface);
  border-color:#535741;
}
.goals-grid .goals-badge { width:89px; height:89px; object-fit:contain; }
.profile-person .profile-identity { border-color:#3c394a; }
.auth { background:radial-gradient(ellipse at 50% 2%,#282236,transparent 54%),#101016; }
.auth .authcard { background:#1a1923; border-color:#403a4a; border-top-color:var(--avante-acid); }
.shell .librarygrid .exercise { border:1px solid #35333f; background:#1b1a24; }
.librarygrid .exercise .tag { letter-spacing:.06em; }
@media(max-width:680px) {
  .shell .top { margin-bottom:11px; }
  .shell .bottom { background:#14141cf5; border-color:#363642; }
  .shell .main { padding-inline:14px; }
  .home-heading + .home-lead .today-card { padding:17px; min-height:239px; }
  .home-frequency .section-head { margin-bottom:0; }
  .home-frequency .week { margin:9px 0 10px; }
  .home-shortcuts { margin:10px 0; padding-block:5px; }
  .plan-grid { gap:9px; }
  .plan-card { min-height:238px; }
  .plan-copy > span { font-size:.76rem; }
  .plan-copy .actions .ico { display:none; }
  .plan-copy .actions .btn { flex-basis:0; min-width:0; padding-inline:4px; }
  .screen-actions .btn { border-radius:10px; }
}
@media(max-width:355px) {
  .plan-copy .actions .btn { flex-basis:100%; }
}

/* Body measurements */
.measure-board-heading h2 { margin:0; }
.measure-board-heading p { color:var(--muted); margin:5px 0 0; font-size:.88rem; }
.measure-group { margin-top:18px; }
.measure-group h3 { margin:0 0 8px; font-size:.9rem; color:#d5b8f2; }
.measure-grid,.measure-bilateral { display:grid; gap:8px; }
.measure-grid,.measure-bilateral { grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr)); }
.measure-bilateral > h3 { grid-column:1/-1; margin:0; }
.measure-weight .measure-tile { max-width:16rem; }
.measure-pair {
  min-width:0;
  border:1px solid #494154;
  border-radius:14px;
  padding:9px;
  background:#201d2b;
}
.measure-pair h4 { margin:0 0 6px; padding-inline:3px; font-size:.92rem; }
.measure-pair-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,6rem),1fr)); gap:5px; }
.measure-tile {
  min-width:0;
  border:1px solid #47414f;
  border-radius:12px;
  background:linear-gradient(135deg,#2b2637,#201f2a 78%);
}
.measure-side { background:#282334; border-color:#3d354a; border-radius:9px; }
.measure-tile[open] { border-color:#aa83cc; }
.measure-tile summary {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:2px 5px;
  position:relative;
  padding:9px 10px;
  list-style:none;
  min-height:65px;
  cursor:pointer;
  color:var(--ink);
}
.measure-tile summary::-webkit-details-marker { display:none; }
.measure-tile summary:focus-visible { outline:2px solid #d3b4ff; outline-offset:3px; border-radius:inherit; }
.measure-label { color:#d4cddd; font-size:.83rem; grid-column:1; overflow-wrap:anywhere; }
.measure-value {
  grid-column:1/-1;
  display:flex;
  align-items:baseline;
  gap:4px;
  color:#c8fb51;
  font-variant-numeric:tabular-nums;
}
.measure-value strong { font:700 clamp(1.45rem,6vw,2.05rem)/1 'Barlow Condensed',Barlow,sans-serif; }
.measure-value small { font-size:.8rem; color:#d1c9dc; }
.measure-change { grid-column:1/-1; justify-self:start; margin-top:3px; padding:1px 6px; border-radius:6px; background:#3a2c4c; color:#e3c7ff; font-size:.75rem; white-space:nowrap; }
.measure-chevron {
  width:7px;
  height:7px;
  margin:4px 1px;
  grid-column:2;
  grid-row:1;
  border:solid #d3b4ff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}
.measure-tile[open] .measure-chevron { transform:rotate(225deg); margin-top:7px; }
.measure-readings { list-style:none; margin:0 8px; padding:5px 0; border-top:1px solid #4b4056; font-size:.75rem; }
.measure-readings li { display:flex; flex-wrap:wrap; gap:2px 6px; justify-content:space-between; padding:3px 0; color:var(--muted); }
.measure-readings strong { color:var(--ink); font-variant-numeric:tabular-nums; }
@media(max-width:680px) {
  .measure-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .measure-bilateral { grid-template-columns:minmax(0,1fr); }
}

/* Weekly workout schedule */
.plan-copy .plan-weekday {
  display:inline-flex;
  align-items:center;
  gap:5px;
  max-width:100%;
  padding:4px 7px;
  margin-bottom:3px;
  border-radius:8px;
  border:1px solid #6b587d;
  background:#262031;
  color:#e5d4ff;
  font-size:.78rem;
  font-weight:700;
  line-height:1.2;
}
.plan-weekday .ico { width:13px; height:13px; flex:none; }
.plan-copy .plan-weekday.is-today { border-color:#688041; background:#2b361b; color:#d0fb74; }
