/* PROJECT PRIME — "Calm" style (the 45 Days look, applied to every section). Active when <html data-style="calm">. */
html[data-style="calm"] {
  --bg-top: #1c1d21; --bg-mid: #08080a; --bg-bot: #000;
  --card: #17181b; --card-2: #1f2024; --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .14);
  --dim: #8e8e93; --faint: #5c5c61;
  --green: #30d158; --yellow: #ffd60a; --red: #ff453a; --blue: #2f8cff; --slate: #a1a1a6;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Figtree', system-ui, sans-serif;
  --num: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Figtree', system-ui, sans-serif;
  --cs-d: var(--num);
  --g-bg: transparent; --g-card: #17181b; --g-card2: #1f2024; --g-row: #111214; --g-field: #1f2024; --g-ctl: #2a2b30; --g-ctl2: #333439;
  --g-line: rgba(255, 255, 255, .07); --g-blue: #2f8cff;
  --c-radius: 20px;
}
html[data-style="calm"] body { background: linear-gradient(180deg, var(--bg-top) 0, var(--bg-mid) 420px, var(--bg-bot) 900px) no-repeat, var(--bg-bot); }

/* one voice: no tracked caps anywhere except the wordmark */
html[data-style="calm"] body :not(.wordmark):not(.wordmark *):not(.side-brand):not(.side-brand *) { text-transform: none !important; letter-spacing: normal !important; }

/* surfaces */
html[data-style="calm"] :is(.card, .area, .lb-card, .lb-day, .cs-box, .hm-today) {
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); box-shadow: none; border-radius: var(--c-radius);
}
html[data-style="calm"] .area::before { display: none; }
html[data-style="calm"] :is(.lb-cal, .hm-day) { background: rgba(255, 255, 255, .045); border-radius: 14px; }
html[data-style="calm"] .hm-day.sel { background: rgba(255, 255, 255, .12); }

/* type */
html[data-style="calm"] .sect-h h2 { font: 700 18px/1.2 var(--sans); }
html[data-style="calm"] :is(.sect-h .aside, .hm-nav) { font: 500 13px var(--sans); }
html[data-style="calm"] .toptitle { font: 600 15px var(--sans); }
html[data-style="calm"] :is(.lb-label, .hm-today small, .hm-day span) { font-weight: 500; }
html[data-style="calm"] .wordmark { font-weight: 300; }

/* controls: pills */
html[data-style="calm"] .btn { border-radius: 999px; font: 600 14px var(--sans); background: var(--card-2); border: 1px solid var(--line-2); }
html[data-style="calm"] .btn.solid { background: var(--ink); color: #000; border-color: transparent; }
html[data-style="calm"] .btn.warn { background: rgba(255, 69, 58, .14); border-color: transparent; }
html[data-style="calm"] .link { font: 600 13.5px var(--sans); color: var(--ink); }
html[data-style="calm"] .link.dim { color: var(--dim); }
html[data-style="calm"] .seg { border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); }
html[data-style="calm"] .seg button { border-radius: 999px; font: 600 13px var(--sans); }
html[data-style="calm"] .seg.mini button { font-size: 12px; }
html[data-style="calm"] :is(.mark, .back) { background: var(--card-2); border: 1px solid var(--line-2); }
html[data-style="calm"] :is(input, textarea, select):not([type=checkbox]):not([type=radio]) { border-radius: 12px; }
html[data-style="calm"] :focus-visible { outline-color: var(--ink); }

/* bottom bar: floating pill on phones */
@media (max-width: 1023px) {
  html[data-style="calm"] .tabs { left: 50%; right: auto; bottom: calc(var(--safe-b) + 10px); transform: translateX(-50%); width: min(calc(100% - 24px), 480px); padding: 4px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(28, 29, 32, .82); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); }
  html[data-style="calm"] .tabs nav { max-width: none; }
  html[data-style="calm"] .tabs button { height: 52px; border-radius: 999px; color: var(--ink); font: 500 10px var(--sans); gap: 2px; }
  html[data-style="calm"] .tabs button .ti { font-size: 19px; }
  html[data-style="calm"] .tabs button:not(.on) { opacity: .62; }
  html[data-style="calm"] .tabs button.on { background: rgba(255, 255, 255, .12); }
  html[data-style="calm"] .shell { padding-bottom: calc(var(--safe-b) + 110px); }
}
@media (min-width: 1024px) {
  html[data-style="calm"] .tabs { background: #0b0b0d; border-right: 1px solid var(--line); }
  html[data-style="calm"] .tabs button { border-radius: 12px; font: 500 14px var(--sans); }
  html[data-style="calm"] .tabs button.on { background: rgba(255, 255, 255, .1); }
}

/* style picker (Home) */
.stylepick { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 2px; }
.stylepick > span { color: var(--dim); font: 500 13px var(--sans); }
.stylepick .seg { margin: 0; }
html[data-style="calm"] .lb-tabs { border-radius: 999px; } html[data-style="calm"] .lb-tabs button { border-radius: 999px; }

/* full conversion (Chry: font, emoji, sizes, boxes, structure, colors) */
html[data-style="calm"] body :not(.ti):not(.wordmark):not(.wordmark *):not(.side-brand):not(.side-brand *) { font-family: var(--sans) !important; }
html[data-style="calm"] body { font-size: 15px; }
/* colors: one white accent like 45 Days; semantic red stays */
html[data-style="calm"] { --g-blue: #f5f5f7; --g-blue-tx: #f5f5f7; --g-blue-bg: #2a2b30; --g-blue-ln: rgba(255, 255, 255, .35); --g-green: #f5f5f7; --g-green-tx: #f5f5f7; --g-green-bg: #2a2b30; }
html[data-style="calm"] .lb-finish, html[data-style="calm"] .scale button.on { color: #000; }
html[data-style="calm"] :is(.cell .bar b, .mbar b) { background: var(--ink); }
html[data-style="calm"] .ecl li.on .box { background: var(--ink); border-color: var(--ink); }
html[data-style="calm"] .ecl .box { width: 30px; height: 30px; border: 2px solid var(--ink); }
html[data-style="calm"] .ecl .box .ti { color: #000; }
html[data-style="calm"] .ecl-done { color: var(--ink); }
html[data-style="calm"] .hm-day.today { box-shadow: inset 0 0 0 1.5px var(--ink); }
html[data-style="calm"] ::selection { background: var(--ink); color: #000; }
/* structure: big page title, emoji headings, rows as their own cards */
.calm-title { display: none; }
html[data-style="calm"] .calm-title { display: block; font: 800 clamp(26px, 7vw, 30px)/1.1 var(--sans); letter-spacing: -.02em !important; margin: 6px 2px 14px; }
html[data-style="calm"] .wordmark:not(.small) { display: none; }
html[data-style="calm"] .emo { margin-right: 8px; font-size: .95em; }
html[data-style="calm"] :is(.card, .area, .lb-card, .lb-day, .cs-box, .hm-today) { padding: 16px; margin-top: 12px; }
html[data-style="calm"] .lb-ex { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--c-radius); }
html[data-style="calm"] .hm-row { background: rgba(255, 255, 255, .045); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-top: 8px; }
html[data-style="calm"] .ecl li + li { border-top: 0; }
html[data-style="calm"] .ecl li { background: rgba(255, 255, 255, .045); border: 1px solid var(--line); border-radius: 16px; margin-top: 8px; }
html[data-style="calm"] .ecl button.row { padding: 12px 14px; align-items: center; }
html[data-style="calm"] :is(.mealh h2, .sect-h h2) { font: 700 18px/1.2 var(--sans); }
html[data-style="calm"] :is(.hm-kcal b, .hm-stats b) { font-weight: 700; }
html[data-style="calm"] .lb-label { font-size: 13px; color: var(--dim); }
html[data-style="calm"] { --purple: #d1d1d6; --cs-o: #d1d1d6; --orange: #ff9f0a; }

/* review pass: leftover accents + header */
html[data-style="calm"] :is(.lb-pbtn.go, .lb-pbtn.on, .pk-chips button.on, .gx-chips button.on, .td-add button) { background: var(--ink); color: #000; }
html[data-style="calm"] .gx-chips button.on small { color: rgba(0, 0, 0, .6); }
html[data-style="calm"] :is(.pk-row > .ti, .td-lst) { color: var(--ink); }
html[data-style="calm"] .ga-colb .dn { background: var(--ink); }
html[data-style="calm"] #progEditor.flash { box-shadow: inset 0 0 0 2px var(--ink); }
html[data-style="calm"] .pk-q:focus { outline-color: var(--ink); }
html[data-style="calm"] .fbanner { border-color: var(--line-2); background: var(--card-2); border-radius: 16px; }
html[data-style="calm"] .fbanner > span { background: var(--ink); color: #000; }
html[data-style="calm"] .fbanner p { color: var(--dim); }
html[data-style="calm"] .m2add { color: var(--ink); background: rgba(255, 255, 255, .08); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; }
html[data-style="calm"] .m2h > b { font: 700 17px var(--sans); }
html[data-style="calm"] .top { grid-template-columns: 52px minmax(0, 1fr) 52px; }
html[data-style="calm"] .daypill { background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; height: 40px; }
html[data-style="calm"] .daypill button { height: 36px; border-radius: 999px; }
html[data-style="calm"] .daypill .lbl { padding: 0 12px; font: 600 14px var(--sans); }
html[data-style="calm"] .sync { font-size: 10.5px; }
@media (max-width: 420px) { html[data-style="calm"] .sync { font-size: 0; gap: 0; } }
html[data-style="calm"] .nuts { gap: 6px; background: none; border-radius: 0; overflow: visible; }
html[data-style="calm"] .nuts > div { background: rgba(255, 255, 255, .045); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
html[data-style="calm"] .nuts span { font: 500 12px var(--sans); color: var(--dim); }
html[data-style="calm"] .nuts b { font-size: 18px; }
html[data-style="calm"] .lb-label { font: 700 16px var(--sans); color: var(--ink); margin: 20px 2px 10px; }
html[data-style="calm"] .lb-card > .lb-label:first-child { font-size: 15px; margin: 0 0 10px; }
@media (min-width: 1024px) { html[data-style="calm"] .calm-title { font-size: 32px; margin: 4px 0 18px; } html[data-style="calm"] .shell { padding-top: 18px; } }
@media (min-width: 1024px) { html[data-style="calm"] .shell { padding-left: max(44px, calc((100vw - 240px - 1240px) / 2)); padding-right: max(44px, calc((100vw - 240px - 1240px) / 2)); } }
html[data-style="calm"] .m2h > b { word-spacing: 6px; }
