@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Sora:wght@300;400;500;600;700&display=swap");

:root{
  --bg: #f4f5fb;
  --bg-2: #eceffd;
  --ink: #15162a;
  --muted: #59607a;
  --brand: #5b4bdb;
  --brand-2: #7c6df0;
  --accent: #2f7bdc;
  --card: #ffffff;
  --soft: #eef1ff;
  --border: #dee2f2;
  --shadow: 0 18px 38px rgba(18,22,44,.12);
  --shadow-soft: 0 10px 22px rgba(18,22,44,.08);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --ring: rgba(91,75,219,.18);
}

*,
*::before,
*::after{
  box-sizing: border-box;
}

html, body{
  margin: 0;
  padding: 0;
}

body.app{
  font-family: "Sora", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 10% -10%, #f1efff 0, rgba(241,239,255,0) 55%),
              radial-gradient(900px 600px at 90% 0%, #e8f2ff 0, rgba(232,242,255,0) 60%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
  line-height: 1.55;
  letter-spacing: .01em;
}

body.app::before{
  content: "";
  position: fixed;
  inset: -40% -20% auto -20%;
  height: 60%;
  background: radial-gradient(60% 60% at 20% 30%, rgba(124,109,240,.18) 0, rgba(124,109,240,0) 70%),
              radial-gradient(50% 60% at 75% 20%, rgba(47,123,220,.16) 0, rgba(47,123,220,0) 70%);
  pointer-events: none;
  z-index: 0;
}

a{
  color: inherit;
  text-decoration: none;
}

img{
  max-width: 100%;
  display: block;
}

h1, h2, h3, .logo-text{
  font-family: "Space Grotesk", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .015em;
}

h1{
  font-size: 2.2rem;
  line-height: 1.15;
  margin: 0 0 .6rem 0;
}

h2{
  font-size: 1.7rem;
  line-height: 1.2;
  margin: 0 0 .5rem 0;
}

h3{
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0 0 .4rem 0;
}

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

.shell{
  padding: 2.25rem 0 5rem;
}

.appbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(244,245,251,.86);
  border-bottom: 1px solid rgba(222,226,242,.85);
}

.appbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
}

.logo{
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

.logo-copy{
  display: grid;
  line-height: 1.1;
}

.logo-tagline{
  font-size: .95rem;
  color: var(--muted);
  font-weight: 500;
}

.logo-mark{
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(91,75,219,.25);
}

.logo-dot{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--brand), var(--brand-2), var(--accent), var(--brand));
  box-shadow: 0 10px 22px rgba(91,75,219,.28);
}

.logo-text{
  font-size: 1.45rem;
  font-weight: 700;
}

.logo-tagline{
  line-height: 1.15;
}

.nav{
  display: flex;
  gap: .5rem;
  align-items: center;
}

.nav-mobile{
  display: none;
  gap: .5rem;
  align-items: center;
}

.pill-link{
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.7);
  color: var(--ink);
  font-weight: 600;
  font-size: .9rem;
}

.points-pill{
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--ink);
  font-weight: 600;
  font-size: .9rem;
}

.timer-pill{
  padding: .4rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.7);
  color: var(--muted);
  font-size: .9rem;
  display: inline-flex;
  gap: .35rem;
  align-items: center;
}

.pill-link:hover{
  background: var(--soft);
}

.nav a{
  padding: .5rem .9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  transition: all .2s ease;
}

.nav a:hover{
  border-color: var(--border);
  background: rgba(255,255,255,.7);
  color: var(--ink);
}

.nav a.active{
  background: var(--ink);
  color: #fff;
}

.page-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-actions{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.table-wrap{
  overflow-x: auto;
}

.coach-compact{
  padding-bottom: 1rem;
}

.coach-actions{
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

.coach-import{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.coach-remove{
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

.client-list{
  display: grid;
  gap: .9rem;
}

.client-card{
  padding: 1rem 1.1rem;
}

.client-head{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.client-actions{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .75rem;
  align-items: center;
}

.branding-logo-thumb{
  max-width: 140px;
  height: auto;
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.coach-trend{
  background: var(--soft);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  margin: .5rem 0 .25rem;
}

.coach-trend-bar{
  height: 100%;
  width: var(--bar);
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.grid2{
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-io{
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.plan-top{
  margin-bottom: 1.25rem;
  margin-top: 1.25rem;
}

.plan-io-card form{
  display: grid;
  gap: .6rem;
}

.plan-io-card input[type="file"]{
  width: 100%;
}

.plan-io-card select{
  width: 100%;
}

.plan-io-action{
  font-size: 1rem;
  padding: .6rem 1.1rem;
  width: 100%;
  text-align: center;
  display: inline-block;
}

.card,
article,
.daycard,
.plan-day,
.banner,
.flash{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card,
article{
  padding: 1rem 1.2rem;
}

.card header,
article header{
  font-weight: 600;
  margin-bottom: .75rem;
}

.muted{
  color: var(--muted);
}

.flash-wrap{
  display: grid;
  gap: .5rem;
  margin-bottom: 1rem;
}

.flash{
  padding: .7rem .9rem;
  border-left: 4px solid var(--accent);
}

label{
  display: grid;
  gap: .35rem;
  font-weight: 500;
}

form{
  display: grid;
  gap: .8rem;
}

form .grid2{
  gap: .8rem;
}

input,
textarea,
select{
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .6rem .7rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

input:focus,
textarea:focus,
select:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}

input[type="checkbox"]{
  accent-color: var(--brand);
}

.theme-toggle{
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem .55rem;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--border);
}

.theme-toggle input[type="checkbox"]{
  width: 22px;
  height: 22px;
}

button,
a[role="button"]{
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: .6rem 1.1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(91,75,219,.24);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}

button:hover,
a[role="button"]:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(91,75,219,.3);
  background: linear-gradient(135deg, #5243d4, #6d5fee);
}

button.secondary,
a[role="button"].secondary{
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: none;
}

button.secondary:hover,
a[role="button"].secondary:hover{
  background: var(--soft);
  transform: translateY(-1px);
}

button.small,
select.small{
  padding: .35rem .7rem;
  font-size: .85rem;
}

a[role="button"].small{
  padding: .35rem .7rem;
  font-size: .85rem;
}

.weeklist{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.daycard{
  padding: 1rem;
  transition: transform .2s ease, box-shadow .2s ease;
  background: linear-gradient(180deg, #fff, #f8f9ff);
}

.daycard:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(27,32,29,.12);
}

.daycard.today{
  border-color: rgba(31,111,92,.4);
  box-shadow: 0 0 0 2px rgba(31,111,92,.2);
}

.daycard-top{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.daytitle{
  display: grid;
  gap: .2rem;
}

.pillcount{
  padding: .35rem .7rem;
  border-radius: 999px;
  background: var(--soft);
  font-size: .85rem;
  border: 1px solid rgba(91,75,219,.12);
}

.mini-list{
  list-style: none;
  padding: 0;
  margin: .65rem 0 0;
  display: grid;
  gap: .35rem;
}

.plan-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.plan-day{
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.plan-day-head{
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #f9f7f2);
}

.plan-day-link{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  color: inherit;
}

.plan-day-link:hover{
  background: linear-gradient(180deg, rgba(91,75,219,.08), rgba(91,75,219,.02));
}

.plan-day-summary{
  min-height: 180px;
}

.plan-day-body{
  padding: 1rem;
  display: grid;
  gap: .75rem;
  align-items: start;
  justify-items: center;
  flex: 1;
}

.plan-day-preview{
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: grid;
  gap: .35rem;
}

.plan-day-preview li{
  padding: .45rem .6rem;
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--border);
  font-size: .92rem;
  box-shadow: var(--shadow-soft);
}

.plan-list{
  list-style: none;
  padding: .25rem 0;
  margin: 0;
  display: grid;
  gap: .35rem;
  flex: 1;
}

.plan-item{
  display: grid;
  gap: .6rem;
  padding: .7rem 1rem;
  border-bottom: 1px dashed var(--border);
  background: rgba(255,255,255,.6);
}

.plan-item-add{
  border-bottom: none;
}

.plan-item-main{
  display: grid;
  gap: .35rem;
}

.plan-item-title{
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}

.plan-link{
  font-weight: 600;
}

.plan-add-form{
  width: 100%;
}

.plan-inline{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .4rem;
  align-items: center;
}

.plan-fields{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
}

.plan-fields .plan-field{
  min-width: 0;
}

.plan-field{
  width: 100%;
}

.plan-actions{
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.plan-day-select{
  min-width: 110px;
}

.plan-add{
  padding: .65rem 1rem 1rem;
  border-top: 1px dashed var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.6));
  margin-top: auto;
}

.history-layout{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 1.25rem;
}

.day-stats{
  width: 100%;
  max-width: none;
}

.day-workouts{
  width: 100%;
}

.history-cal-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .85rem;
}

.calendar-weekdays{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .35rem;
  margin-bottom: .5rem;
  color: var(--muted);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.calendar-weekday{
  text-align: center;
}

.calendar-grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .45rem;
}

.calendar-day{
  position: relative;
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 10px 20px rgba(91,75,219,.08);
  color: var(--ink);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.calendar-day:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(91,75,219,.15);
  border-color: rgba(91,75,219,.35);
}

.calendar-day.inactive{
  opacity: .45;
  background: #f4f5fb;
}

.calendar-day.selected{
  border-color: transparent;
  background: linear-gradient(140deg, rgba(91,75,219,.12), rgba(124,109,240,.2));
  box-shadow: 0 0 0 2px rgba(91,75,219,.25);
}

.calendar-date{
  font-weight: 600;
}

.calendar-dot{
  position: absolute;
  bottom: 9px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(91,75,219,.45);
}

.calendar-dot.complete{
  background: var(--brand);
}

.history-detail header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.history-metrics{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .6rem;
  margin-bottom: 1rem;
}

.history-metrics > div{
  background: var(--soft);
  border-radius: 12px;
  padding: .6rem .75rem;
  display: flex;
  gap: .35rem;
  align-items: baseline;
  justify-content: center;
}

.history-workout{
  border-top: 1px dashed var(--border);
  padding-top: .75rem;
  margin-top: .75rem;
}

.history-workout-title{
  margin-bottom: .5rem;
}

.history-exercises{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .35rem;
}

.summary-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.chart{
  display: grid;
  gap: .6rem;
}

.chart-row{
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: .6rem;
  align-items: center;
}

.chart-label{
  font-weight: 600;
}

.chart-bars{
  display: grid;
  gap: .35rem;
}

.chart-bar{
  background: var(--soft);
  border-radius: 999px;
  padding: .3rem .5rem;
  font-size: .85rem;
  color: var(--ink);
}

.chart-bar.load{
  background: linear-gradient(90deg, rgba(91,75,219,.18), rgba(91,75,219,.4));
}

.chart-bar.reps{
  background: linear-gradient(90deg, rgba(47,123,220,.18), rgba(47,123,220,.35));
}

.filters{
  display: flex;
  gap: .5rem;
  margin: 1rem 0;
}

.filters a{
  padding: .45rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.filters a.active{
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.workout-stack{
  display: grid;
  gap: .9rem;
}

.workout-card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: .9rem 1rem;
  box-shadow: var(--shadow-soft);
}

.workout-head{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .7rem;
}

.workout-title{
  display: grid;
  gap: .25rem;
  min-width: 0;
}

.block-card{
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .7rem .7rem;
  background: rgba(0,0,0,.02);
  margin-top: .7rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.block-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

.exercise-list{
  display: grid;
  gap: .6rem;
}

.exercise-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem .7rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.checklabel{
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  min-width: 0;
}

.checktext{
  display: grid;
  gap: .2rem;
  min-width: 0;
  word-break: break-word;
}

.checktext .muted{
  display: block;
  font-size: .9rem;
}

.exercise-actuals .actuals-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .4rem;
}

.exercise-actuals .actuals-grid input{
  width: 100%;
}

.actuals-actions{
  display: flex;
  justify-content: flex-end;
  margin-top: .5rem;
}

input.mini,
textarea.mini,
select.mini{
  font-size: .9rem;
  padding: .45rem .55rem;
  border-radius: 12px;
}

textarea.mini{
  min-height: 70px;
  resize: vertical;
}

.mini-check{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--border);
  padding: .3rem .6rem;
  border-radius: 999px;
  background: var(--soft);
  font-size: .85rem;
  word-break: break-all;
}

.workout-builder{
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.block-builder{
  display: grid;
  gap: .85rem;
}

.block-builder-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.item-list{
  display: grid;
  gap: .8rem;
}

.item-row{
  display: grid;
  gap: .5rem;
  padding: .75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.item-grid{
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr));
  gap: .5rem;
}

.item-actions{
  display: flex;
  justify-content: flex-end;
  gap: .35rem;
  flex-wrap: wrap;
}

.item-add{
  display: grid;
  gap: .5rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--border);
}

.tabs{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 12;
  background: rgba(247,243,238,.95);
  border-top: 1px solid rgba(227,221,212,.8);
  display: none;
}

.site-footer{
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.5);
  padding: 1.25rem 0 2rem;
}

.footer-inner{
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  font-size: .9rem;
  color: var(--muted);
}

.footer-links{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a{
  color: inherit;
}

.footer-links a:hover{
  color: var(--ink);
}

.cookie-banner{
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1000;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(12,15,29,.15), rgba(12,15,29,.35));
  backdrop-filter: blur(6px);
}

.cookie-banner[hidden]{
  display: none;
}

html[data-cookie-consent="none"] #cookie-banner{
  display: grid;
}

html[data-cookie-consent="set"] #cookie-banner{
  display: none;
}

.cookie-card{
  max-width: 880px;
  width: min(100%, 880px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
  display: grid;
  gap: .75rem;
}

.cookie-card p{
  margin: .35rem 0 0 0;
}

.cookie-actions{
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(12,15,29,.35);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 1500;
  padding: 1.25rem;
}

.modal-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem;
  max-width: 420px;
  width: min(100%, 420px);
  display: grid;
  gap: .75rem;
}

.modal-actions{
  display: flex;
  justify-content: flex-end;
}

.pb-badge{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .5rem;
  border-radius: 999px;
  background: rgba(255,215,0,.15);
  border: 1px solid rgba(255,215,0,.4);
  font-size: .75rem;
  font-weight: 600;
  color: #8a6a00;
}

.pb-icon{
  position: absolute;
  top: 6px;
  right: 6px;
  padding: .15rem .35rem;
  border-radius: 999px;
  background: rgba(255,215,0,.18);
  border: 1px solid rgba(255,215,0,.4);
  font-size: .65rem;
  font-weight: 700;
  color: #8a6a00;
}

.pb-toast{
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  z-index: 1200;
  max-width: 320px;
  width: calc(100% - 2.5rem);
}

.pb-toast-inner{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .9rem 1rem;
  display: grid;
  gap: .5rem;
}

.pb-toast-title{
  font-weight: 700;
}

.pb-toast-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .25rem;
}

.pb-toast-points{
  font-weight: 600;
  color: var(--brand);
}

.pb-summary{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .5rem;
}

.twofa-grid{
  align-items: start;
}

.twofa-qr{
  max-width: 220px;
  width: 100%;
}

.twofa-secret{
  width: 100%;
  font-family: "Sora", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.backup-code-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .6rem;
}

.policy-content{
  display: grid;
  gap: .75rem;
}

.policy-content p{
  margin: .1rem 0;
}

.policy-content ul{
  margin: .1rem 0;
  padding-left: 1.1rem;
}

.policy-content li{
  margin: .15rem 0;
}

.tab{
  flex: 1;
  text-align: center;
  padding: .7rem .5rem;
  border-right: 1px solid rgba(227,221,212,.6);
  color: var(--muted);
}

.tab:last-child{
  border-right: none;
}

.tab.active{
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 980px){
  .grid2{
    grid-template-columns: 1fr;
  }
  .history-layout{
    grid-template-columns: 1fr;
  }
  .day-layout{
    display: flex;
    flex-direction: column-reverse;
    gap: 1.25rem;
  }
}

@media (max-width: 820px){
  .nav-desktop{
    display: none;
  }
  .nav-mobile{
    display: flex;
  }
  .appbar-inner{
    padding-left: .35rem;
    padding-right: .35rem;
  }
  .logo{
    gap: .45rem;
  }
  .logo-mark{
    width: 42px;
    height: 42px;
  }
  .logo-text{
    font-size: 1.2rem;
  }
  .logo-tagline{
    font-size: .82rem;
  }
  .pill-link{
    font-size: .82rem;
    padding: .35rem .6rem;
  }
  .points-pill{
    font-size: .82rem;
  }
  .timer-pill{
    font-size: .82rem;
  }
  .tabs{
    display: flex;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .shell{
    padding-bottom: 6rem;
  }
  .site-footer{
    padding-bottom: 5rem;
  }
  .cookie-banner{
    inset: auto 0 4.75rem 0;
  }
  .item-grid{
    grid-template-columns: 1fr 1fr;
  }
  .plan-io{
    grid-template-columns: 1fr;
  }
  .plan-io-card a[role="button"],
  .plan-io-card button{
    width: 100%;
    text-align: center;
  }
  .plan-inline{
    grid-template-columns: 1fr;
  }
  .plan-fields{
    grid-template-columns: 1fr;
  }
  .exercise-actuals .actuals-grid{
    grid-template-columns: 1fr 1fr;
  }
  .twofa-grid{
    grid-template-columns: 1fr;
  }
  .pb-toast{
    right: 1rem;
    bottom: 6.75rem;
    width: calc(100% - 2rem);
  }
}

@media (max-width: 640px){
  .item-grid{
    grid-template-columns: 1fr;
  }
  .item-row,
  .item-add,
  .block-builder{
    width: 100%;
  }
}

@media (min-width: 720px){
  .exercise-row{
    grid-template-columns: 1.15fr .85fr;
  }
}

@media (min-width: 980px){
  .day-layout{
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

@media (prefers-reduced-motion: no-preference){
  .card,
  article,
  .daycard,
  .workout-card{
    animation: rise .5s ease both;
  }
}

@keyframes rise{
  from{
    opacity: 0;
    transform: translateY(8px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode */
html[data-theme="dark"]{
  --bg: #0c0f1d;
  --bg-2: #0c1224;
  --ink: #eef0ff;
  --muted: #a7acc7;
  --card: #14182d;
  --soft: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.12);
  --shadow: none;
  --ring: rgba(124,109,240,.3);
}

html[data-theme="dark"] .appbar{
  background: rgba(12,15,29,.86);
  border-bottom-color: rgba(255,255,255,.08);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] article,
html[data-theme="dark"] .daycard,
html[data-theme="dark"] .plan-day,
html[data-theme="dark"] .banner,
html[data-theme="dark"] .flash{
  background: #151a2f;
  border-color: rgba(255,255,255,.12);
}

html[data-theme="dark"] .nav a.active{
  background: #eef0ff;
  color: #0c1224;
}

html[data-theme="dark"] .nav a{
  color: #c6cbe6;
}

html[data-theme="dark"] .nav a:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
  color: #f1f3ff;
}

html[data-theme="dark"] .daycard{
  background: linear-gradient(180deg, #161b33, #111526);
}

html[data-theme="dark"] .daycard a,
html[data-theme="dark"] .daycard .muted,
html[data-theme="dark"] .daycard strong{
  color: #eef0ff;
}

html[data-theme="dark"] .tabs{
  background: rgba(12,15,29,.95);
  border-top-color: rgba(255,255,255,.08);
}

html[data-theme="dark"] .site-footer{
  background: rgba(12,15,29,.6);
  border-top-color: rgba(255,255,255,.1);
}

html[data-theme="dark"] .cookie-card{
  background: #151a2f;
  border-color: rgba(255,255,255,.14);
}

html[data-theme="dark"] .tab{
  color: #c6cbe6;
}

html[data-theme="dark"] button.secondary,
html[data-theme="dark"] a[role="button"].secondary{
  color: #e7eceb;
  background: transparent;
  border-color: rgba(255,255,255,.18);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.18);
  color: #e7eceb;
}

html[data-theme="dark"] ::placeholder{
  color: rgba(231,236,255,.6);
}

html[data-theme="dark"] .workout-card,
html[data-theme="dark"] .exercise-row,
html[data-theme="dark"] .block-card{
  background: #141c22;
  border-color: rgba(255,255,255,.12);
}

html[data-theme="dark"] .history-layout{
  color: #e9ecff;
}

html[data-theme="dark"] .calendar-weekdays{
  color: #b5bad6;
}

html[data-theme="dark"] .calendar-day{
  background: #12182c;
  border-color: rgba(255,255,255,.14);
  color: #e9ecff;
  box-shadow: none;
}

html[data-theme="dark"] .calendar-day.inactive{
  background: #0f1426;
  color: rgba(233,236,255,.5);
}

html[data-theme="dark"] .calendar-day.selected{
  background: linear-gradient(140deg, rgba(124,109,240,.25), rgba(47,123,220,.2));
  box-shadow: 0 0 0 2px rgba(124,109,240,.35);
}

html[data-theme="dark"] .calendar-dot{
  background: rgba(124,109,240,.45);
}

html[data-theme="dark"] .calendar-dot.complete{
  background: #7c6df0;
}

html[data-theme="dark"] .plan-day-preview li,
html[data-theme="dark"] .plan-item{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.14);
}

html[data-theme="dark"] .timer-pill{
  color: #e9ecff;
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.06);
}

html[data-theme="dark"] .plan-day-head strong,
html[data-theme="dark"] .plan-day-head .muted{
  color: #eef0ff;
}

html[data-theme="dark"] .plan-day-head{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}

html[data-theme="dark"] .pillcount,
html[data-theme="dark"] .mini-check{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
  color: #d9ddf4;
}

html[data-theme="dark"] .mini-check{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
}

html[data-theme="dark"] .item-row{
  background: #141c22;
  border-color: rgba(255,255,255,.12);
}
