/* r13-base.css — release 13 foundation: the design tokens and the base of the NEW LOOK (blueprint v2, "The gym day as one path").
   Everything here applies only under <html data-look="new"> and inside a new-look screen (.r13), so the classic look is exactly
   as before. The tokens are drawn from the live Lawha / KGYM tokens (lawha.css, kgym.css, look.css), so light and dark, the four
   palettes (themes.css: her rose accent and the others) and every later palette change carry over by themselves; only the few
   colours the classic look never had are new here. The STATUS colours never change with the palette or the account: green is
   always "target met" (themes.css never sets the --kgym-met / low / min / none / skin tokens).
   Right to left: logical properties only (inline-start / inline-end), so the path and the dock mirror with the page.
   Loaded before look.css (look.css, themes.css, her.css stay the last three); every rule here starts with
   :root[data-look='new'], which outweighs look.css's two-class rules. The lanes' own sheets: r13-workout.css (Lane 1),
   r13-body.css (Lane 2), r13-plan.css (Lane 3: Morning, History, Settings and every website layout). Foundation-owned. */

/* ── Tokens (light) ── */
:root[data-look='new'] .lawha-theme{
  --r13-paper:var(--lawha-paper);--r13-surface:var(--lawha-surface);--r13-raised:var(--kgym-raised);--r13-sunk:var(--kgym-sunk);
  --r13-ink:var(--lawha-ink);--r13-muted:var(--lawha-muted);--r13-line:var(--lawha-line);--r13-sage:var(--lawha-sage);
  --r13-accent:var(--lawha-accent);--r13-insight:var(--kgym-insight);
  /* the body's status colours: the map's own tokens, never palette-dependent */
  --r13-met:var(--kgym-met);--r13-low:var(--kgym-low);--r13-min:var(--kgym-min);--r13-none:var(--kgym-none);
  --r13-skin:var(--kgym-skin);--r13-skin-edge:var(--kgym-skin-edge);--r13-fibre:var(--kgym-fibre);--r13-stripe:var(--kgym-stripe);
  /* new in release 13: today's layer ("fill to green"), the quiet parts, the outline of today's muscles, the rest bar */
  --r13-todo:#dfe8d5;--r13-off:#e9ebe2;--r13-figline:var(--kgym-met);
  --r13-rest-bg:#263d34;--r13-rest-ink:#faf9f4;--r13-rest-ring:#8fd4a8;
  --r13-warn:var(--kgym-warn);--r13-warn-ink:var(--kgym-warn-ink);
  /* shape */
  --r13-card-radius:20px;--r13-gutter:16px;--r13-gap:10px;--r13-dock-pad:14px;
  --r13-big-number:400 46px/1 var(--lawha-display, Georgia, 'Times New Roman', serif);
}
/* ── Tokens (dark) ── */
:root[data-look='new'][data-theme='dark'] .lawha-theme{
  --r13-todo:#2f4339;--r13-off:#2b3831;--r13-figline:#8fd4a8;
  --r13-rest-bg:#e8e9e0;--r13-rest-ink:#17211c;--r13-rest-ring:#325c44;
}

/* ── The frame ── */
:root[data-look='new'] .r13-frame{display:flex;flex-direction:column;gap:var(--r13-gap);min-width:0}
:root[data-look='new'] .r13-main{display:flex;flex-direction:column;gap:var(--r13-gap);min-width:0}
:root[data-look='new'] .r13-head{display:flex;flex-direction:column;gap:8px}
/* the dock: the main button(s) at the thumb, above the floating tab bar on the phone */
:root[data-look='new'] .r13-frame[data-layout='phone'] .r13-dock{position:sticky;bottom:calc(86px + env(safe-area-inset-bottom));z-index:2;display:flex;flex-direction:column;gap:8px;
  padding:var(--r13-dock-pad) 0 4px;background:linear-gradient(to bottom,transparent,var(--r13-paper) 16px)}
:root[data-look='new'] .r13-frame[data-layout='phone'][data-workout] .r13-dock{bottom:calc(12px + env(safe-area-inset-bottom))}
:root[data-look='new'] .r13-frame[data-layout='web'] .r13-dock{display:flex;flex-wrap:wrap;gap:10px;padding-top:6px}
/* the website: up to three columns — the path list, the main column, the live body */
:root[data-look='new'] .r13-cols{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start}
:root[data-look='new'] .r13-cols.has-side{grid-template-columns:280px minmax(0,1fr)}
:root[data-look='new'] .r13-cols.has-aside{grid-template-columns:minmax(0,1fr) 340px}
:root[data-look='new'] .r13-cols.has-side.has-aside{grid-template-columns:280px minmax(0,1fr) 340px}
:root[data-look='new'] .r13-side,:root[data-look='new'] .r13-aside{display:flex;flex-direction:column;gap:12px;min-width:0}

/* ── The five-dot path ── */
:root[data-look='new'] .r13-path ol{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none}
:root[data-look='new'] .r13-stop{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:13px;color:var(--r13-muted)}
:root[data-look='new'] .r13-stop::before{content:'';position:absolute;top:9px;inset-inline-start:-50%;inset-inline-end:50%;height:2px;background:var(--r13-line)}
:root[data-look='new'] .r13-stop:first-child::before{display:none}
:root[data-look='new'] .r13-stop.is-done::before,:root[data-look='new'] .r13-stop.is-now::before{background:var(--r13-accent)}
:root[data-look='new'] .r13-dot{position:relative;z-index:1;display:grid;place-items:center;width:20px;height:20px;border:2px solid var(--r13-line);border-radius:50%;
  background:var(--r13-paper);color:var(--r13-surface)}
:root[data-look='new'] .r13-stop.is-done .r13-dot{border-color:var(--r13-accent);background:var(--r13-accent)}
:root[data-look='new'] .r13-stop.is-now .r13-dot{border-color:var(--r13-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--r13-accent) 22%,transparent)}
:root[data-look='new'] .r13-stop.is-now .r13-dot::after{content:'';width:8px;height:8px;border-radius:50%;background:var(--r13-accent)}
:root[data-look='new'] .r13-stop.is-now{color:var(--r13-ink);font-weight:700}
:root[data-look='new'] .r13-path.is-slim .r13-stop:not(.is-now) .r13-stop-name{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ── The corrective-action row ── */
:root[data-look='new'] .r13-fix{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 12px;border-radius:14px;background:var(--r13-surface);box-shadow:var(--sh1)}
:root[data-look='new'] .r13-fix-dot{flex:none;width:10px;height:10px;border-radius:50%;background:var(--r13-accent)}
:root[data-look='new'] .r13-fix.is-min .r13-fix-dot{background:var(--r13-min)}
:root[data-look='new'] .r13-fix.is-low .r13-fix-dot{background:var(--r13-low)}
:root[data-look='new'] .r13-fix-words{flex:1;min-width:0;display:flex;flex-direction:column;font-size:14px;line-height:1.3}
:root[data-look='new'] .r13-fix-sub{color:var(--r13-muted);font-size:13px}
:root[data-look='new'] .r13-fix-go{flex:none}
:root[data-look='new'] .r13-quiet{margin:0;font-size:13px;color:var(--r13-muted)}

/* ── The figure frame (Lane 2 draws inside it) ── */
:root[data-look='new'] .r13-figure{min-width:0}

/* ── The placeholder of a screen still being built (the builders' preview only) ── */
:root[data-look='new'] .r13-stub{padding:16px;color:var(--r13-muted)}

/* ── Settings › Look: the new-look switch (shown in BOTH looks — the way back is always there) ── */
.lawha-theme .look-screens{display:grid;gap:8px;margin-top:4px}
.lawha-theme .look-screens-label{margin:4px 0 0;font:600 var(--t-small)/1.3 var(--lawha-font);color:var(--lawha-muted)}
.lawha-theme .look-screens-note{margin:0}

@media (prefers-reduced-motion:reduce){:root[data-look='new'] .r13 *{animation:none!important;transition:none!important}}
/* LANE NEXT (owner YES ALL, 1 Nov 2026): "It's right" beside "Check this set" — both buttons on their own line under the words; the
   phone shares the width, the website keeps their own size on the right (the day card's column is narrow on both) */
:root[data-look='new'] .r13-fix.has-two{flex-wrap:wrap}
:root[data-look='new'] .r13-fix.has-two .r13-fix-words{flex:1 1 calc(100% - 30px)}
:root[data-look='new'] .r13-fix-acts{display:flex;gap:8px;flex:1 1 100%;padding-inline-start:20px;justify-content:flex-end}
@media (max-width:899px){:root[data-look='new'] .r13-fix-acts .btn{flex:1 1 0}}
:root[data-look='new'] .r13-kept{display:flex;align-items:center;gap:10px;margin:8px 0 0;padding:10px 12px;border-radius:14px;background:var(--r13-surface);box-shadow:var(--sh1);font-size:14px;line-height:1.3}
:root[data-look='new'] .r13-kept > span{display:flex;flex-direction:column}
:root[data-look='new'] .r13-kept-dot{flex:none;width:10px;height:10px;border-radius:50%;background:var(--r13-met)}
:root[data-look='new'] .r13-kept-sub{color:var(--r13-muted)}
