/* Muscle Nerds app styles. Brand colours come from app/brand.py via CSS variables. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
       font-family: 'Manrope', system-ui, sans-serif; font-size: 15px; line-height: 1.5; }
a { color: inherit; }
.num { font-family: 'Space Grotesk', 'Manrope', sans-serif; font-variant-numeric: tabular-nums; }
.dim { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* hero */
.hero { background: linear-gradient(135deg, var(--hero) 0%, var(--hero-deep) 100%); color: var(--hero-ink);
        padding: 28px 20px 96px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px;
               border-radius: 50%; border: 60px solid rgba(255,255,255,.035); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.brandbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; text-decoration: none; }
.userbar { position: absolute; top: 0; right: 0; display: flex; gap: 14px; align-items: center;
           font-size: 13px; color: rgba(255,255,255,.72); }
.userbar a, .userbar button { color: var(--silver); font-weight: 700; text-decoration: none; background: none;
                              border: none; padding: 0; font-size: 13px; }
.userbar a:hover, .userbar button:hover { color: #fff; }
.auth { max-width: 420px; margin: 0 auto; }
.userbar .who { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.2); }
.mainnav { display: flex; gap: 4px; }
.mainnav a { padding: 5px 10px; border-radius: 99px; }
.mainnav a.on { background: rgba(255,255,255,.14); color: #fff; }
@media (max-width: 760px) {
  .userbar { position: static; justify-content: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
  .userbar .who { display: none; }
}
.brandbar img { width: 76px; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.wrap { max-width: 1080px; margin: 0 auto; }
.brand { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--silver); font-weight: 800; }
.hero h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(28px, 5vw, 42px);
           line-height: 1.1; margin: 10px 0 8px; font-weight: 600; }
.hero p { margin: 0; color: rgba(255,255,255,.72); max-width: 600px; }
.crumb { color: var(--silver); text-decoration: none; font-size: 13px; font-weight: 700; }
.crumb:hover { text-decoration: underline; }
.contact { color: rgba(255,255,255,.72); font-size: 14px; }
.tabs { display: flex; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.tabs a { color: var(--silver); text-decoration: none; font-weight: 700; font-size: 14px;
          padding: 8px 16px; border-radius: 99px; border: 1px solid rgba(255,255,255,.18); }
.tabs a:hover { color: #fff; border-color: rgba(255,255,255,.35); }
.tabs a.active { background: #fff; color: var(--navy); border-color: #fff; }

.content { margin-top: -64px; padding: 0 20px 48px; position: relative; z-index: 2; }

/* cards */
.card { background: var(--surface); border-radius: var(--radius); padding: 24px;
        margin-bottom: 20px; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.card .sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }

.flash { background: var(--surface); box-shadow: var(--shadow); border-radius: 12px;
         padding: 12px 16px; margin-bottom: 16px; font-weight: 600; border-left: 4px solid; }
.flash.ok { color: var(--good); }
.flash.error { color: var(--danger); }

/* stats */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 30px; font-weight: 600; margin-top: 4px; line-height: 1.1; }
.stat .value small { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.stat .note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat.highlight { background: var(--accent); color: #fff; }
.stat.highlight .label, .stat.highlight .note, .stat.highlight .value small { color: rgba(255,255,255,.82); }

/* progress bars */
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.progress-pct { font-size: 28px; font-weight: 600; color: var(--accent); }
.bar { height: 14px; background: #e6e9ee; border-radius: 99px; overflow: hidden; margin: 14px 0 10px; }
.bar > span { display: block; height: 100%; border-radius: 99px; transition: width .8s ease;
              background: linear-gradient(90deg, var(--navy), #2a5794); }
.bar.k-muscle-gain > span { background: linear-gradient(90deg, var(--blue), #8fb0dc); }
.bar-ends { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px;
         font-size: 13px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.on-track { color: var(--good); background: var(--good-soft); }
.badge.ahead    { color: var(--info); background: var(--info-soft); }
.badge.behind   { color: var(--warn); background: var(--warn-soft); }
.badge.pending  { color: var(--muted); background: #eef0f3; }
.badge.pending::before { background: var(--steel); }

.chart { width: 100%; height: 440px; }
.chart.short { height: 320px; }

/* tables */
.table-scroll { max-height: 520px; overflow: auto; position: relative; margin: 0 -24px; padding: 0 24px; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th { position: sticky; top: 0; background: var(--surface); z-index: 1;
     text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
     color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.current td { background: color-mix(in srgb, var(--accent) 6%, #fff); }
td.week { font-weight: 700; width: 64px; }
td.actions { text-align: right; width: 1%; white-space: nowrap; }
.delta { font-size: 12px; color: var(--muted); margin-left: 6px; }
.link-btn { background: none; border: none; color: var(--muted); padding: 4px 6px; font-size: 13px; font-weight: 600; }
.link-btn:hover { color: var(--danger); opacity: 1; }

.seg { display: inline-flex; background: #eef0f3; border-radius: 99px; padding: 3px; }
.seg button { background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 99px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* forms */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.measure { grid-template-columns: repeat(4, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 120px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
input, textarea, select { font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
                          background: #f8f9fb; color: var(--ink); width: 100%; }
input[type=file] { padding: 9px; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); background: #fff; }
button, .btn { font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
               background: var(--ink); color: #fff; border: none; padding: 11px 18px; border-radius: 10px;
               transition: transform .1s ease, opacity .2s ease; white-space: nowrap; }
button:hover, .btn:hover { opacity: .9; }
button:active, .btn:active { transform: translateY(1px); }
.primary { background: var(--accent); }
.card h2 { color: var(--navy); }
.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.danger { background: transparent; color: var(--danger); border: 1px solid rgba(200,68,58,.35); }
.form-section { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
                color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line); margin-top: 4px; }
.form-section:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.req { color: var(--danger); }

details summary { cursor: pointer; font-weight: 700; color: var(--muted); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: '+ '; }
details[open] summary::before { content: '– '; }
details[open] summary { margin-bottom: 16px; }

/* home: client cards */
.search { max-width: 260px; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.client-card { display: block; text-decoration: none; margin: 0; border: 1px solid var(--line);
               box-shadow: none; transition: transform .15s ease, box-shadow .15s ease; }
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cc-head { display: flex; gap: 12px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: var(--silver); border: 2px solid var(--silver);
          display: grid; place-items: center; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 18px; flex: none; }
.cc-name { font-weight: 700; font-size: 16px; }
.cc-meta { color: var(--muted); font-size: 13px; }
.mini { margin-top: 16px; }
.mini-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.mini .bar { height: 8px; margin: 6px 0; }
.mini-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

/* client overview */
.snap-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.snap-nums .label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.snap-nums .big { font-size: 22px; font-weight: 600; }
.snap-tag { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.details-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 28px; }
.details-list { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0; align-content: start; }
.details-list dt { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.details-list dd { margin: 0 0 14px; white-space: pre-line; overflow-wrap: anywhere; }
.notes-head { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
              margin: 8px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.notes { white-space: pre-line; }
.share-row input { font-family: ui-monospace, monospace; font-size: 13px; flex: 1; min-width: 220px; }

/* photos */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
figure { margin: 0; }
.photo { display: block; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #e6e9ee; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px;
             font-size: 13px; color: var(--muted); margin-top: 6px; }
.photo-date { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.compare { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-bottom: 26px; }
.compare-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 8px 0 32px; }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .form-grid.three { grid-template-columns: 1fr; }
  .details-cols { grid-template-columns: 1fr 1fr; }
  .form-grid.measure { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .card { padding: 18px; }
  .table-scroll { margin: 0 -18px; padding: 0 18px; }
  .stat .value { font-size: 24px; }
  .chart { height: 360px; }
  .form-grid { grid-template-columns: 1fr; }
  .details-cols { grid-template-columns: 1fr; }
  .search { max-width: none; width: 100%; }
}


/* ---------------------------------------------------------------- training */
.week-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.week-tabs a { text-decoration: none; font-weight: 700; font-size: 14px; padding: 7px 14px; border-radius: 99px;
               border: 1px solid var(--line); color: var(--muted); background: #fff; }
.week-tabs a:hover { color: var(--navy); border-color: var(--steel); }
.week-tabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.week-tabs a.now::after { content: ' •'; color: var(--good); }
.week-tabs form { display: inline; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar .row { align-items: center; }
.toolbar select, .toolbar input { width: auto; padding: 8px 12px; }
.btn-sm, button.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }

.day-card { border: 1px solid var(--line); border-radius: 14px; padding: 0; margin-bottom: 16px; overflow: hidden; background: #fff; }
.day-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
            padding: 14px 18px; background: #f6f7f9; border-bottom: 1px solid var(--line); }
.day-head h3 { margin: 0; font-size: 16px; color: var(--navy); }
.day-head .day-no { color: var(--muted); font-weight: 600; font-size: 13px; margin-right: 8px; }
.day-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.day-actions form { display: inline; }
.day-notes { padding: 10px 18px 0; color: var(--muted); font-size: 14px; white-space: pre-line; }
.day-empty { padding: 16px 18px; color: var(--muted); font-size: 14px; }
.rx { min-width: 640px; table-layout: fixed; }
.rx th:nth-child(1) { width: 52px; } .rx th:nth-child(2) { width: 30%; } .rx th:nth-child(3) { width: 60px; }
.rx th:nth-child(4) { width: 76px; } .rx th:nth-child(5) { width: 80px; } .rx th:nth-child(6) { width: 70px; }
.rx th:nth-child(7) { width: 78px; } .rx th:nth-child(8) { width: 52px; }
.rx td { overflow-wrap: anywhere; }
.rx-mobile { display: none; }
@media (max-width: 640px) {
  .rx { min-width: 0; table-layout: auto; }
  .rx thead { display: none; }
  .rx td:not(.lbl):not(.ex) { display: none; }
  .rx td.lbl { width: 40px; vertical-align: top; }
  .rx-mobile { display: block; font-weight: 500; color: var(--ink); font-size: 14px; margin-top: 3px; }
  .rx-mobile em { color: var(--muted); font-style: normal; }
}
.editor input::placeholder { color: #b9c0ca; }
.rx td, .rx th { padding: 10px 12px; }
.rx th { position: static; }
.rx td.lbl { font-weight: 800; color: var(--navy); width: 44px; font-family: 'Space Grotesk', sans-serif; }
.rx td.ex { font-weight: 600; }
.rx td.ex a { color: var(--navy); }
.rx .cues { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.rx tr.pair-start td { border-top: 2px solid var(--line); }
.day-scroll { overflow-x: auto; }
.video-dot { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--navy);
             border-radius: 4px; padding: 1px 5px; margin-left: 6px; text-decoration: none; vertical-align: 1px; }

/* day editor */
.editor { width: 100%; border-collapse: separate; border-spacing: 0 6px; min-width: 980px; }
.editor th { position: static; padding: 4px 6px; border: none; }
.editor td { padding: 0 3px; border: none; vertical-align: top; }
.editor input { padding: 9px 10px; border-radius: 8px; font-size: 14px; }
.editor .c-label { width: 58px; } .editor .c-ex { width: 26%; } .editor .c-s { width: 64px; }
.editor .c-reps { width: 84px; } .editor .c-load { width: 96px; } .editor .c-tempo { width: 74px; }
.editor .c-rest { width: 74px; } .editor .c-rir { width: 64px; } .editor .c-act { width: 104px; white-space: nowrap; }
.editor .row-btn { background: #eef0f3; color: var(--muted); padding: 8px 9px; border-radius: 8px; font-size: 13px; }
.editor .row-btn:hover { color: var(--navy); }
.editor .row-btn.del:hover { color: var(--danger); }
.editor-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0)); padding: 14px 0 4px; margin-top: 8px;
               display: flex; gap: 10px; flex-wrap: wrap; align-items: center; z-index: 3; }
.hint { color: var(--muted); font-size: 13px; }

.prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.prog-card { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 14px; padding: 18px;
             transition: transform .15s ease, box-shadow .15s ease; background: #fff; }
.prog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.prog-card h3 { margin: 0 0 4px; color: var(--navy); font-size: 16px; }
.prog-card .meta { color: var(--muted); font-size: 13px; }
.prog-card p { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
       background: #eef0f3; color: var(--muted); }
.tag.navy { background: var(--accent-soft); color: var(--navy); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .field { flex: 0 1 220px; }


/* ---------------------------------------------------------------- client portal & logged sessions */
.session-list { display: flex; flex-direction: column; gap: 8px; }
.session-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none;
               padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.session-row:hover { border-color: var(--steel); }
.session-row.unread { border-color: var(--navy); background: #f6f8fc; }
.s-name { font-weight: 700; color: var(--navy); }
.s-meta { color: var(--muted); font-size: 13px; }
.today-list { display: flex; flex-direction: column; gap: 10px; }
.today-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px;
             border: 1px solid var(--line); border-radius: 14px; }
.today-row.done { background: #f6f8f7; }
.today-row.done .s-name { color: var(--muted); }
.today-row .day-no { color: var(--muted); font-weight: 600; font-size: 13px; margin-right: 8px; }

.coach-note { background: #f6f7f9; border-left: 3px solid var(--navy); padding: 10px 14px; border-radius: 8px;
              margin: 0 0 14px; white-space: pre-line; }
.ex-card { padding: 18px 20px; }
.ex-head { display: flex; gap: 12px; align-items: flex-start; }
.ex-head h3 { margin: 0; font-size: 17px; color: var(--navy); }
.ex-label { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: #fff; background: var(--navy);
            border-radius: 8px; padding: 3px 8px; font-size: 14px; flex: none; margin-top: 1px; }
.ex-rx { font-weight: 600; margin-top: 2px; }
.last-time { margin: 10px 0 2px; font-size: 13px; color: var(--muted); background: #f6f7f9; border-radius: 8px; padding: 6px 10px; }
.sets { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.set-row { display: grid; grid-template-columns: 28px 1fr 1fr 78px; gap: 8px; align-items: center; }
.set-no { font-weight: 800; color: var(--muted); text-align: center; font-family: 'Space Grotesk', sans-serif; }
.set-field { position: relative; display: block; }
.set-field span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px;
                  color: var(--muted); pointer-events: none; font-weight: 600; }
.set-field input { padding: 12px 40px 12px 12px; font-size: 17px; font-family: 'Space Grotesk', sans-serif; }
.set-field.rir input { padding-right: 34px; }
.set-field input::placeholder { color: #b9c0ca; }
.logged td { vertical-align: top; }
.logged td.lbl { font-weight: 800; color: var(--navy); width: 44px; font-family: 'Space Grotesk', sans-serif; }
.logged td.ex { font-weight: 600; min-width: 160px; }
.set-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #eef0f3; border-radius: 8px; padding: 3px 8px; font-size: 14px; white-space: nowrap; }
.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { background: #f6f7f9; border-radius: 12px; padding: 10px 14px; max-width: 85%; }
.comment.mine { background: var(--accent-soft); align-self: flex-end; }
.c-who { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.c-body { white-space: pre-line; }
.invite-box { background: #f6f8fc; border: 1px solid var(--navy); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
@media (max-width: 520px) {
  .today-row { flex-direction: column; align-items: stretch; }
  .today-row .btn { text-align: center; }
  .ex-card { padding: 16px; }
  .set-row { grid-template-columns: 22px 1fr 1fr 64px; gap: 6px; }
  .logged { min-width: 0; }
  .logged thead { display: none; }
  .logged tr { display: grid; grid-template-columns: 40px 1fr; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .logged td { border: none; padding: 2px 6px; }
  .logged td.dim, .logged td:last-child { grid-column: 2; }
}

/* No up/down arrows on number boxes: they're easy to click by accident and silently change weights */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------------------------------------------------------------- lifts & PRs */
.pr { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #7a5200;
      background: #ffe9a8; border-radius: 6px; padding: 1px 6px; vertical-align: 1px; }
.lift-table td { white-space: nowrap; }
.lift-table td:first-child { white-space: normal; }
.up { color: var(--good); font-weight: 700; }
.down { color: var(--danger); font-weight: 700; }
.pr-banner { background: #fff7dd; border: 1px solid #f0d27a; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.pr-banner strong { color: #7a5200; }

/* ---------------------------------------------------------------- compliance */
.badge.off { color: var(--danger); background: rgba(200,68,58,.12); }
.attention { border-left: 4px solid var(--warn); }
.week-tabs a .wk-done { display: block; font-size: 11px; font-weight: 600; opacity: .75; text-align: center; margin-top: 1px; }
.week-tabs a.all-done { border-color: var(--good); }
.compliance-bar { display: flex; gap: 4px; margin: 4px 0 16px; }
.compliance-bar span { flex: 1; height: 8px; border-radius: 4px; background: #e6e9ee; }
.compliance-bar span.full { background: var(--good); }
.compliance-bar span.part { background: var(--warn); }
.compliance-bar span.none { background: rgba(200,68,58,.55); }
.compliance-bar span.future { background: #eef0f3; }

details.more { margin-top: 8px; }
details.more summary { font-size: 14px; margin-bottom: 8px; }

/* ---------------------------------------------------------------- logger extras */
.rest-timer { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20;
              display: flex; align-items: center; gap: 16px; background: var(--navy); color: #fff;
              padding: 10px 12px 10px 18px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,22,52,.35);
              width: min(92vw, 420px); justify-content: space-between; }
.rest-timer .rt-label { font-size: 13px; color: var(--silver); font-weight: 700; }
.rest-timer .rt-time { font-size: 28px; font-weight: 700; margin-left: 6px; }
.rest-timer button { background: rgba(255,255,255,.14); color: #fff; padding: 9px 12px; }
.rest-timer.done { background: var(--good); }
.rest-timer.done .rt-label { color: #fff; }
.swap { margin-top: 8px; }
.swapped { font-size: 13px; color: var(--warn); font-weight: 600; margin-top: 2px; }
.ex-head .swap-btn { flex: none; }
.session-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 14px; }
body.timer-on .content { padding-bottom: 96px; }
body.timer-on .sticky-save { bottom: 84px; }

/* ---------------------------------------------------------------- builder extras */
.copy-week { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.progression { width: 100%; max-width: 520px; }
.progression summary { text-align: right; }
.prog-grid-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.prog-grid-fields .field { min-width: 0; }
.prog-grid-fields span { font-size: 12px; font-weight: 600; color: var(--muted); }
.prog-grid-fields input { padding: 8px 10px; }
.block-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 14px 0 4px;
               padding: 12px 14px; background: #f6f7f9; border-radius: 12px; }
.block-tools .field { min-width: 180px; flex: 1; }
.block-tools select, .block-tools input { padding: 8px 10px; }
.when { font-size: 13px; font-weight: 600; color: var(--muted); }
.today-row.is-today { border-color: var(--navy); border-width: 2px; }
.today-tag { background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px;
             margin-left: 6px; vertical-align: 2px; letter-spacing: .03em; }
@media (max-width: 860px) { .prog-grid-fields { grid-template-columns: 1fr 1fr; } .copy-week { align-items: stretch; } }
