/* Lock in stats + streaks (assets/lockin-stats.js, AI45_LOCKSTATS.render). Tokens only. */
.ls { --ls-ease: cubic-bezier(0.32, 0.72, 0, 1); color: var(--paper); font-variant-numeric: tabular-nums; }
.ls button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.ls svg { width: 18px; height: 18px; flex: none; }
.ls h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.ls small { font-size: .55em; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-left: 1px; }
.ls :focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 10px; }
.ls-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ls-muted { font-size: 14px; color: var(--muted); }
.ls-card { border-radius: var(--r, 26px); background: var(--card); box-shadow: 0 1px 0 var(--line); }

.ls-head { margin-bottom: 18px; }
.ls-head h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; letter-spacing: -0.03em; }
.ls-head p { margin-top: 4px; font-size: 15px; color: var(--muted); }

/* ---------- top: goal ring + streak ---------- */
.ls-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; }
.ls-goal { display: flex; align-items: center; gap: 24px; padding: 24px 26px; }
.ls-goal__ring { position: relative; flex: none; width: 148px; height: 148px; }
.ls-goal__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ls-ring__track { fill: none; stroke: var(--navy-2, var(--line)); stroke-width: 11; }
.ls-ring__fill { fill: none; stroke: var(--orange); stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ls-ease); }
.ls-goal__mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ls-goal__mid b { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.ls-goal__mid span { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ls-goal__tick { display: grid; place-items: center; width: 22px; height: 22px; margin-bottom: 4px; border-radius: 50%; background: var(--orange); color: var(--on-accent, #fff); }
.ls-goal__tick svg { width: 13px; height: 13px; stroke-width: 3; }
.ls-goal__txt { min-width: 0; }
.ls-goal__txt p { margin-top: 4px; font-size: 15px; color: var(--muted); }
.ls-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 6px 0; font-size: 13.5px !important; font-weight: 700 !important; color: var(--paper) !important; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.ls-link:hover { text-decoration-color: currentColor; }
.ls-link svg { width: 15px; height: 15px; }
.ls-goaled { margin-top: 12px; animation: ls-rise .35s var(--ls-ease); }
.ls-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-chips button, .ls-seg button { height: 34px; padding: 0 13px; border-radius: 12px; background: var(--card-2); font-size: 13px; font-weight: 600; transition: background-color .15s, color .15s; }
.ls-chips button:hover, .ls-seg button:hover { background: var(--navy-2, var(--line)); }
.ls-chips button[aria-pressed="true"], .ls-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
html[data-theme="dark"] .ls-chips button[aria-pressed="true"], html[data-theme="dark"] .ls-seg button[aria-pressed="true"] { background: var(--paper); color: var(--navy); }
.ls-goaled__c { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ls-goaled__c input { width: 84px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--paper); font: inherit; font-variant-numeric: tabular-nums; }
.ls-goaled__c button[type="submit"] { height: 34px; padding: 0 14px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 700; }
.ls-goaled__c .ls-link { margin: 0 0 0 4px; }

.ls-streak { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px 26px; border-radius: var(--r, 26px); background: var(--sun); }
.ls-streak__top { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.ls-streak__n { display: flex; align-items: baseline; gap: 10px; }
.ls-streak__n b { font-size: clamp(48px, 6vw, 64px); font-weight: 700; letter-spacing: -0.05em; line-height: .95; }
.ls-streak__n span { font-size: 16px; font-weight: 700; }
.ls-streak__ic { align-self: center; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: rgba(var(--fg-rgb), .07); color: var(--muted); }
.ls-streak__ic.is-on { background: var(--orange); color: var(--on-accent, #fff); }
.ls-streak__ic svg { width: 21px; height: 21px; }
.ls-streak__sub { margin-top: 6px; font-size: 14.5px; color: var(--paper); opacity: .78; }
.ls-streak__meta { display: flex; gap: 22px; margin: 0; }
.ls-streak__meta dt { font-size: 12px; font-weight: 700; color: var(--paper); opacity: .6; }
.ls-streak__meta dd { margin: 3px 0 0; font-size: 17px; font-weight: 700; }
.ls-frzs { display: inline-flex; gap: 5px; }
.ls-frz { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; background: rgba(var(--fg-rgb), .07); color: rgba(var(--fg-rgb), .3); transition: background-color .3s, color .3s; }
.ls-frz.is-on { background: var(--sky-2, var(--sky)); color: var(--paper); }
.ls-frz svg { width: 15px; height: 15px; }
.ls-week7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.ls-dot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ls-dot__c { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(var(--fg-rgb), .07); color: var(--paper); transition: transform .3s var(--ls-ease); }
.ls-dot__c svg { width: 16px; height: 16px; stroke-width: 2.6; }
.ls-dot__d { font-size: 11.5px; font-weight: 700; color: var(--paper); opacity: .6; }
.ls-dot.is-done .ls-dot__c { background: var(--orange); color: var(--on-accent, #fff); }
.ls-dot.is-frozen .ls-dot__c { background: var(--sky-2, var(--sky)); }
.ls-dot.is-missed .ls-dot__c { background: transparent; box-shadow: inset 0 0 0 2px rgba(var(--fg-rgb), .16); }
.ls-dot.is-none .ls-dot__c { background: rgba(var(--fg-rgb), .05); }
.ls-dot.is-today .ls-dot__c { background: transparent; box-shadow: inset 0 0 0 2px var(--orange); }
.ls-dot.is-today .ls-dot__d, .ls-dot:last-child .ls-dot__d { opacity: 1; }
.ls-streak__rule { font-size: 12.5px; line-height: 1.5; color: var(--paper); opacity: .66; }

/* ---------- totals strip ---------- */
.ls-totals { margin: 30px 0 26px; }
.ls-totals dl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; }
.ls-totals dl > div { display: flex; flex-direction: column; gap: 4px; padding: 2px 18px; border-left: 1px solid var(--line); }
.ls-totals dl > div:first-child { padding-left: 0; border-left: 0; }
.ls-totals dd { margin: 0; font-size: clamp(26px, 2.8vw, 34px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; white-space: nowrap; }
.ls-totals dt { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- chart ---------- */
.ls-chart { padding: 24px 26px 18px; }
.ls-chart__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ls-chart__sum { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ls-chart__sum b { font-size: 32px; font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.ls-chart__sum span { font-size: 13.5px; color: var(--muted); }
.ls-chart__sum em { font-style: normal; font-weight: 700; }
.ls-chart__sum em.is-up { color: var(--paper); } .ls-chart__sum em.is-down { color: var(--muted); }
.ls-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 15px; background: var(--card-2); }
.ls-seg button { background: transparent; }
.ls-plot { position: relative; margin-top: 16px; min-height: 180px; border-radius: 12px; }
.ls-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.ls-grid { stroke: var(--line); stroke-width: 1; }
.ls-base { stroke: var(--line); stroke-width: 1.5; }
.ls-goalline { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 5; opacity: .75; }
.ls-ax { fill: var(--muted); font-size: 11px; font-weight: 600; font-family: inherit; }
.ls-ax--goal { fill: var(--orange); font-weight: 700; }
.ls-bar__hit { fill: transparent; }
.ls-bar__r { fill: var(--paper); opacity: .82; transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .7s var(--ls-ease), opacity .2s, fill .2s; transition-delay: calc(var(--i) * 28ms), 0s, 0s; }
.ls-plot svg.is-in .ls-bar__r { transform: none; }
.ls-bar.is-now .ls-bar__r { fill: var(--orange); opacity: 1; }
.ls-bar.is-zero .ls-bar__r { fill: var(--line); opacity: 1; }
.ls-plot.has-sel .ls-bar:not(.is-sel) .ls-bar__r { opacity: .32; }
.ls-plot.has-sel .ls-bar.is-zero:not(.is-sel) .ls-bar__r { opacity: 1; }
.ls-bar.is-sel .ls-bar__r { opacity: 1; }
.ls-plot:focus-visible { outline-offset: 6px; }
.ls-tip { position: absolute; z-index: 2; pointer-events: none; padding: 8px 11px; border-radius: 12px; background: var(--ink); color: #fff; white-space: nowrap; box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .5); transition: left .18s var(--ls-ease), top .18s var(--ls-ease); }
.ls-tip b { display: block; font-size: 15px; font-weight: 700; }
.ls-tip span { font-size: 12px; opacity: .72; }
.ls-plot__read { min-height: 1.4em; margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ---------- subjects + heatmap ---------- */
.ls-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin-top: 34px; }
.ls-two h3 { margin-bottom: 14px; }
.ls-sbars { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ls-sbars__t { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ls-sbars__t span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ls-sbars__t b { flex: none; font-weight: 700; } .ls-sbars__t small { font-size: 12px; margin-left: 4px; }
.ls-sbars li > i { display: block; height: 10px; margin-top: 6px; border-radius: 999px; background: rgba(var(--fg-rgb), .06); overflow: hidden; }
.ls-sbars li > i > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width .9s var(--ls-ease); transition-delay: calc(var(--i) * 60ms); }
.ls-sbars.is-in li > i > i { width: var(--w); }

.ls-insight { margin: -6px 0 14px; font-size: 15px; font-weight: 600; }
.ls-heat { display: grid; gap: 5px; padding: 4px; border-radius: 14px; }
.ls-heat__row { display: grid; grid-template-columns: 40px repeat(6, minmax(0, 1fr)); gap: 5px; align-items: center; }
.ls-heat__hd span { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; }
.ls-heat__d { font-size: 12px; font-weight: 700; color: var(--muted); }
.ls-heat__c { position: relative; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--orange) var(--k), rgba(var(--fg-rgb), .05)); transition: transform .2s var(--ls-ease), box-shadow .2s; }
.ls-heat__c:hover, .ls-heat__c.is-sel { transform: scale(1.08); box-shadow: 0 0 0 2px var(--paper); z-index: 1; }

/* ---------- recent ---------- */
.ls-recent { margin-top: 38px; }
.ls-recent h3 { margin-bottom: 8px; }
.ls-rows { margin: 0; padding: 0; list-style: none; }
.ls-row { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.ls-row:first-child { border-top: 0; }
.ls-row__w b { display: block; font-size: 14px; font-weight: 700; }
.ls-row__w span, .ls-row__m span { display: block; font-size: 12.5px; color: var(--muted); }
.ls-row__m b { display: block; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-row__m span { margin-top: 2px; }
.ls-row__r { display: flex; align-items: center; gap: 12px; }
.ls-row__r > b { font-size: 16px; font-weight: 700; min-width: 54px; text-align: right; }
.ls-pill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--paper); }
.ls-pill svg { width: 13px; height: 13px; stroke-width: 2.6; }
.ls-pill.is-ok { background: var(--mint); } .ls-pill.is-bad { background: var(--rose); }
.ls-row.is-fail .ls-row__r > b { color: var(--muted); }

/* ---------- empty state ---------- */
.ls-empty { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; align-items: center; margin-top: 30px; }
.ls-empty__lead h3 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.025em; }
.ls-empty__lead > p { margin-top: 8px; max-width: 520px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.ls-empty__steps { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.ls-empty__steps li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; }
.ls-empty__steps b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 0 var(--line); font-size: 13px; }
.ls-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; height: 50px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: #fff !important; font-size: 15px; font-weight: 700; text-decoration: none; transition: transform .2s var(--ls-ease); }
.ls-cta:hover { transform: translateY(-2px); }
.ls-empty__peek { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--r, 26px); background: var(--card); box-shadow: 0 1px 0 var(--line); }
.ls-ghost--bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; }
.ls-ghost--bars i { flex: 1; height: calc(var(--h) * 100%); border-radius: 8px; background: rgba(var(--fg-rgb), .07); animation: ls-breathe 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * 120ms); }
.ls-ghost--dots { display: flex; justify-content: space-between; }
.ls-ghost--dots i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(var(--fg-rgb), .1); }
@keyframes ls-breathe { 50% { opacity: .45; } }
@keyframes ls-rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- the simple view (owner, 2026-10-24): today + this week, the 7-day chart, a link to the profile ---------- */
.ls-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.ls-num { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; }
.ls-num--today { background: var(--sky); } .ls-num--week { background: var(--sun); }
.ls-num > span { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ls-num > b { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.ls-num > em { font-style: normal; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.ls-chart h3 { margin: 0; }
.ls-more { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 18px 24px; color: var(--paper); text-decoration: none; transition: transform .25s var(--ls-ease); }
.ls-more:hover { transform: translateY(-2px); }
.ls-more > span { display: flex; flex-direction: column; gap: 2px; }
.ls-more b { font-size: 16px; font-weight: 800; }
.ls-more em { font-style: normal; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.ls .ls-more svg { width: 20px; height: 20px; }
.ls-start { padding: 28px; text-align: center; }
.ls-start h3 { font-size: 22px; }
.ls-start p { margin: 8px auto 0; max-width: 460px; color: var(--muted); font-size: 15px; line-height: 1.5; }
@media (max-width: 560px) { .ls-pair { grid-template-columns: minmax(0, 1fr); } .ls-num { padding: 18px 20px; } .ls-num > b { font-size: 34px; } .ls-more { padding: 16px 18px; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .ls-top, .ls-two, .ls-empty { grid-template-columns: minmax(0, 1fr); }
  .ls-two { gap: 34px; }
  .ls-totals dl { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .ls-totals dl > div:nth-child(4) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .ls-goal { padding: 20px; gap: 18px; }
  .ls-goal__ring { width: 116px; height: 116px; }
  .ls-goal__mid b { font-size: 32px; }
  .ls-streak, .ls-chart { padding: 20px 18px; }
  .ls-dot__c { width: 30px; height: 30px; }
  .ls-totals dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ls-totals dl > div { padding: 2px 0 2px 14px; }
  .ls-totals dl > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .ls-totals dl > div:nth-child(4) { padding-left: 14px; border-left: 1px solid var(--line); }
  .ls-seg { width: 100%; } .ls-seg button { flex: 1; padding: 0 8px; }
  .ls-heat__row { grid-template-columns: 34px repeat(6, minmax(0, 1fr)); gap: 4px; }
  .ls-heat__c { height: 26px; }
  .ls-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .ls-row__w { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
  .ls-row__w b { display: inline; font-size: 12.5px; } .ls-row__w span { display: inline; }
  .ls-row__r { flex-direction: column; align-items: flex-end; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .ls *, .ls *::before, .ls *::after { transition: none !important; animation: none !important; }
  .ls-bar__r { transform: none; }
  .ls-sbars li > i > i { width: var(--w); }
}
