/* shulah.app - built from the app's own parts, taken from its screens: the #F7F7F7 page, flat white cards,
   one orange hero card with white tiles, list rows with a tinted icon square and a chevron, orange pill
   buttons, Montserrat titles over Open Sans in #6C7278, Tajawal for Arabic, Material Community Icons.
   The fonts and icons are the app's own files, served from here. */
@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url(/assets/fonts/montserrat-medium.e0638c0328.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 600; font-display: swap; src: url(/assets/fonts/montserrat-semibold.e6b115927c.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(/assets/fonts/montserrat-bold.0ea4e6a070.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 800; font-display: swap; src: url(/assets/fonts/montserrat-extrabold.ac0484c1a7.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 400; font-display: swap; src: url(/assets/fonts/opensans-regular.09fb9c9fc8.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 600; font-display: swap; src: url(/assets/fonts/opensans-semibold.25cc799adb.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 700; font-display: swap; src: url(/assets/fonts/opensans-bold.7dbf95b1bc.woff2) format('woff2'); }
@font-face { font-family: Tajawal; font-weight: 400; font-display: swap; src: url(/assets/fonts/tajawal-regular.49634a6611.woff2) format('woff2'); }
@font-face { font-family: Tajawal; font-weight: 500; font-display: swap; src: url(/assets/fonts/tajawal-medium.a232f7a97e.woff2) format('woff2'); }
@font-face { font-family: Tajawal; font-weight: 700; font-display: swap; src: url(/assets/fonts/tajawal-bold.6bd44c0f4b.woff2) format('woff2'); }
@font-face { font-family: Tajawal; font-weight: 800; font-display: swap; src: url(/assets/fonts/tajawal-extrabold.8fd71266cb.woff2) format('woff2'); }
@font-face { font-family: mdi; font-display: block; src: url(/assets/fonts/icons.139112c54b.woff2) format('woff2'); }

:root {
  --page: #f7f7f7; --card: #fff; --raised: #f3eee7; --line: #ececec;
  --text: #000; --muted: #6c7278; --faint: #b0b0b0;
  --primary: #ed6514; --home: #ffefe5; --wash: #fdeee4; --ring: #ffc796;
  --t-peach: #fde8dc; --t-amber: #fdf1dc; --t-lav: #ece8fb; --t-blue: #e3f0fd; --t-green: #e3f1e8;
  --i-amber: #e09508; --i-lav: #7a60d8; --i-blue: #2f80ed; --i-green: #2e8b57;
  --r: 28px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) {
  --page: #0f0f10; --card: #1a1a1b; --raised: #252527; --line: #333335; --text: #f4f4f5; --muted: #9b9b9e; --faint: #55555a;
  --primary: #ff7a2f; --home: #2f231c; --wash: rgba(255,122,47,.16); --ring: #6b3a1c;
  --t-peach: rgba(255,122,47,.16); --t-amber: rgba(224,149,8,.18); --t-lav: rgba(122,96,216,.22); --t-blue: rgba(47,128,237,.2); --t-green: rgba(46,139,87,.22);
  --i-amber: #f0b43c; --i-lav: #a894f0; --i-blue: #6aa8f5; --i-green: #5cc28a; color-scheme: dark; } }
:root[data-theme='dark'] {
  --page: #0f0f10; --card: #1a1a1b; --raised: #252527; --line: #333335; --text: #f4f4f5; --muted: #9b9b9e; --faint: #55555a;
  --primary: #ff7a2f; --home: #2f231c; --wash: rgba(255,122,47,.16); --ring: #6b3a1c;
  --t-peach: rgba(255,122,47,.16); --t-amber: rgba(224,149,8,.18); --t-lav: rgba(122,96,216,.22); --t-blue: rgba(47,128,237,.2); --t-green: rgba(46,139,87,.22);
  --i-amber: #f0b43c; --i-lav: #a894f0; --i-blue: #6aa8f5; --i-green: #5cc28a; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 16px/1.55 'Open Sans', sans-serif; -webkit-font-smoothing: antialiased; }
[dir='rtl'] body { font-family: Tajawal, 'Open Sans', sans-serif; }
h1, h2, h3, .t { font-family: Montserrat, Tajawal, sans-serif; font-weight: 700; margin: 0; }
[dir='rtl'] h1, [dir='rtl'] h2, [dir='rtl'] h3, [dir='rtl'] .t { font-family: Tajawal, sans-serif; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mi { font-family: mdi; font-style: normal; font-weight: normal; line-height: 1; display: inline-block; speak: never; -webkit-font-smoothing: antialiased; }
[dir='rtl'] .flip { transform: scaleX(-1); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; inset-inline-start: 8px; width: auto; height: auto; clip: auto; background: var(--card); padding: 8px 14px; border-radius: 12px; z-index: 99; }

/* one language on screen at a time */
[data-l='ar'] { display: none !important; }
[lang='ar'] [data-l='en'] { display: none !important; }
[lang='ar'] [data-l='ar'] { display: revert !important; }
[lang='ar'] span[data-l='ar'] { display: inline !important; }

/* ---------- top bar: like the app's screen header ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--page); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font: 700 20px Montserrat, Tajawal, sans-serif; }
.brand img { width: auto; height: 28px; }
.links { display: flex; gap: 4px; margin-inline-start: auto; }
.links a { font: 600 15px Montserrat, Tajawal, sans-serif; color: var(--muted); padding: 8px 12px; border-radius: 999px; }
.links a:hover { color: var(--text); }
.links a[aria-current='page'] { color: var(--primary); background: var(--wash); }
.round { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--card); color: var(--text); display: inline-grid; place-items: center; cursor: pointer; font-size: 20px; flex-shrink: 0; }
.lang { border: none; background: var(--card); color: var(--text); height: 40px; border-radius: 999px; padding: 0 14px; font: 700 14px Tajawal, Montserrat, sans-serif; cursor: pointer; }
.menu { display: none; }
@media (max-width: 820px) {
  .links { display: none; position: absolute; top: 64px; inset-inline: 0; flex-direction: column; background: var(--page); padding: 8px 16px 16px; border-bottom: 1px solid var(--line); margin: 0; }
  .bar.open .links { display: flex; }
  .links a { padding: 14px 12px; font-size: 16px; }
  .menu { display: inline-grid; }
  .end { margin-inline-start: auto; }
}
.end { display: flex; gap: 8px; align-items: center; }

/* ---------- the app's parts ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 24px; }
.label { font: 700 13px Montserrat, Tajawal, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
[dir='rtl'] .label { letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border-radius: 999px; border: 1.5px solid var(--primary); background: var(--primary); color: #fff; font: 700 17px Montserrat, Tajawal, sans-serif; cursor: pointer; }
.btn.line { background: transparent; color: var(--primary); }
.btn.white { background: #fff; border-color: #fff; color: #ed6514; }
.btn .mi { font-size: 20px; }
.hero-card { background: var(--primary); color: #fff; border-radius: var(--r); padding: clamp(24px, 3.2vw, 36px); }
.hero-card .label { color: rgba(255,255,255,.85); }
.hero-card h2, .hero-card .big { color: #fff; }
.hero-card p { color: rgba(255,255,255,.92); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.tiles > div { background: rgba(255,255,255,.16); border-radius: 18px; padding: 14px 16px; min-width: 0; }
.tiles b { display: block; font: 700 22px Montserrat, sans-serif; }
.tiles span { font-size: 14px; color: rgba(255,255,255,.92); }
.sq { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; flex-shrink: 0; background: var(--t-peach); color: var(--primary); }
.sq.amber { background: var(--t-amber); color: var(--i-amber); } .sq.lav { background: var(--t-lav); color: var(--i-lav); }
.sq.blue { background: var(--t-blue); color: var(--i-blue); } .sq.green { background: var(--t-green); color: var(--i-green); }
.rows { background: var(--card); border-radius: var(--r); padding: 8px 24px; }
.row { display: flex; align-items: center; gap: 18px; padding: 16px 0; }
.row + .row { margin-top: 2px; }
.row h3 { font-size: 18px; }
.row p { color: var(--muted); font-size: 15px; margin-top: 2px; }
.row .go { margin-inline-start: auto; color: var(--muted); font-size: 24px; }
.head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.head h2 { font-size: clamp(22px, 2.6vw, 28px); }
.see { color: var(--primary); font: 600 16px Montserrat, Tajawal, sans-serif; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--wash); color: var(--primary); border-radius: 999px; padding: 8px 16px; font: 600 15px Montserrat, Tajawal, sans-serif; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.tile { background: var(--card); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.tile h3 { font-size: 19px; }
.tile p { color: var(--muted); font-size: 15px; margin-top: -8px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: none; background: transparent; color: var(--muted); border-radius: 999px; padding: 10px 18px; font: 600 15px Montserrat, Tajawal, sans-serif; cursor: pointer; }
.seg button[aria-selected='true'], .seg button[aria-pressed='true'] { background: var(--wash); color: var(--primary); }
section { padding: clamp(44px, 6vw, 80px) 0 0; }
.stack { display: grid; gap: 14px; }
.h1 { font-size: clamp(36px, 5.6vw, 60px); line-height: 1.1; font-weight: 700; }
[dir='rtl'] .h1 { line-height: 1.3; }
.lead { font-size: clamp(17px, 1.7vw, 19px); color: var(--muted); max-width: 54ch; }

/* ---------- home ---------- */
.intro { background: var(--home); padding: clamp(36px, 6vw, 72px) 0; border-radius: 0 0 40px 40px; }
.intro .wrap { display: grid; grid-template-columns: 1fr auto; gap: clamp(28px, 5vw, 64px); align-items: center; }
.intro .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 860px) { .intro .wrap { grid-template-columns: 1fr; } }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; color: var(--muted); font-size: 15px; }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts .mi { color: var(--primary); font-size: 18px; }

/* ---------- calculators: inputs in a white card, the answer in the orange hero card ---------- */
.calc { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; margin-top: 18px; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.calc-tabs { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: none; }
.calc-tabs::-webkit-scrollbar { display: none; }
.calc-tabs button { flex-shrink: 0; }
.field { padding: 16px 0; }
.field + .field { border-top: 1px solid var(--line); }
.field .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; color: var(--muted); font-size: 15px; }
.field output { font: 700 20px Montserrat, sans-serif; color: var(--text); }
.field output small { font-size: 13px; color: var(--muted); font-weight: 500; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 9px; background: var(--raised); outline: none; margin: 0; direction: ltr; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); border: 4px solid var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--primary); border: 4px solid var(--card); cursor: pointer; }
select { width: 100%; height: 50px; border-radius: 16px; border: none; background: var(--page); color: var(--text); padding: 0 14px; font: 600 15px 'Open Sans', Tajawal, sans-serif; }
.more { width: 100%; display: flex; align-items: center; justify-content: space-between; border: none; background: none; cursor: pointer; padding: 16px 0 0; margin-top: 6px; border-top: 1px solid var(--line); color: var(--text); font: 700 16px Montserrat, Tajawal, sans-serif; }
.more span:last-child { color: var(--primary); font-size: 14px; }
.big { font: 700 clamp(56px, 7vw, 76px)/1 Montserrat, sans-serif; margin-top: 8px; }
.big small { font-size: 22px; font-weight: 600; opacity: .9; margin-inline-start: 6px; }
.meter { position: relative; height: 8px; border-radius: 9px; background: rgba(255,255,255,.25); margin: 22px 0 6px; direction: ltr; }
.meter i { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: #fff; transform: translate(-50%,-50%); transition: left .35s ease; }
.meter-ticks { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,.85); direction: ltr; }
.list > div { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.list > div + div { border-top: 1px solid var(--line); }
.list .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.list .grow { flex: 1; }
.list b { font: 700 17px Montserrat, sans-serif; }
.list .bar { flex: 1; height: 8px; border-radius: 9px; background: var(--raised); overflow: hidden; }
.list .bar i { display: block; height: 100%; border-radius: 9px; background: var(--faint); }
.list .bar i.me { background: var(--primary); }
.cups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; color: var(--i-blue); font-size: 26px; }

/* ---------- pages ---------- */
.page-top { background: var(--home); padding: clamp(34px, 5vw, 60px) 0 clamp(30px, 4vw, 48px); border-radius: 0 0 40px 40px; }
.page-top .h1 { font-size: clamp(32px, 4.6vw, 48px); margin-top: 8px; white-space: pre-line; }
.page-top .lead { margin-top: 12px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font: 600 15px Montserrat, Tajawal, sans-serif; }
.prose { max-width: 760px; }
.prose .card + .card, .prose .summary + .card { margin-top: 14px; }
.prose h2 { font-size: 20px; margin-bottom: 8px; }
.prose p, .prose li { color: var(--muted); }
.prose p + p { margin-top: 10px; }
.prose ul, .prose ol { padding-inline-start: 22px; margin: 8px 0 0; }
.prose li { margin: 6px 0; }
.prose a { color: var(--primary); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.prose th, .prose td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font: 600 13px Montserrat, Tajawal, sans-serif; color: var(--text); }
.table-scroll { overflow-x: auto; }
.summary { background: var(--primary); color: #fff; border-radius: var(--r); padding: 20px 24px; font-weight: 600; }
.qa .row { cursor: pointer; }
details.row { display: block; }
details.row summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; font: 700 17px Montserrat, Tajawal, sans-serif; }
details.row summary::-webkit-details-marker { display: none; }
details.row summary .mi { margin-inline-start: auto; color: var(--muted); font-size: 24px; transition: transform .2s; }
details[open].row summary .mi { transform: rotate(90deg); }
[dir='rtl'] details[open].row summary .mi { transform: rotate(-90deg); }
details.row p { color: var(--muted); margin-top: 10px; }
.post-img { aspect-ratio: 16/10; border-radius: 20px; background: var(--home) center/cover no-repeat; }
.article { max-width: 700px; }
.article .post-img { aspect-ratio: 16/8; margin-bottom: 26px; }
.article h2 { font-size: 22px; margin: 28px 0 8px; }
.article p { color: var(--muted); font-size: 17px; line-height: 1.75; }
.article p + p { margin-top: 14px; }
.article blockquote { margin: 24px 0; background: var(--primary); color: #fff; border-radius: 22px; padding: 20px 24px; font: 700 19px/1.5 Montserrat, Tajawal, sans-serif; }
.form label { display: block; font: 600 15px Montserrat, Tajawal, sans-serif; margin: 16px 0 8px; }
.form label:first-of-type { margin-top: 0; }
.form input, .form textarea, .form select { width: 100%; border: none; background: var(--page); color: var(--text); border-radius: 16px; padding: 14px 16px; font: 16px 'Open Sans', Tajawal, sans-serif; }
.form textarea { min-height: 150px; resize: vertical; }
.form .err { color: #d80027; font-size: 14px; margin-top: 6px; min-height: 1em; }
.form .btn { width: 100%; margin-top: 18px; }
.form .btn:disabled { opacity: .7; cursor: progress; }
.form .field-help { margin-top: 6px; }
.form label .muted { font-weight: 400; }
/* the field only bots fill in: out of sight and out of reach, without moving off the page (no stray scroll in RTL) */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form-done { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 28px 8px; }
.form-done:focus { outline: none; }

/* ---------- footer ---------- */
footer { margin-top: clamp(56px, 7vw, 96px); background: var(--card); padding: 36px 0 28px; }
footer .cols { display: flex; flex-wrap: wrap; gap: 28px 56px; }
footer .cols > div:first-child { flex: 1 1 260px; }
footer h4 { font: 700 13px Montserrat, Tajawal, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
[dir='rtl'] footer h4 { letter-spacing: 0; }
footer .col a { display: block; padding: 5px 0; font-size: 15px; }
footer .col a:hover { color: var(--primary); }
footer .base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ---------- motion: quiet, like the app's own; nothing moves for people who ask their phone for less ---------- */
:root { --ease: cubic-bezier(.2, .7, .2, 1); }
.btn, .round, .lang, .seg button, .row, .tile { transition: transform .18s var(--ease), background-color .2s, color .2s, box-shadow .2s; }
.btn:active, .round:active, .lang:active, .seg button:active { transform: scale(.96); }
a.row:hover .go { transform: translateX(3px); }
[dir='rtl'] a.row:hover .go { transform: scaleX(-1) translateX(3px); }
.row .go { transition: transform .2s var(--ease); }
a.tile:hover { transform: translateY(-3px); }
.btn:hover { filter: brightness(1.06); }
.bar { transition: box-shadow .25s; }
.bar.scrolled { box-shadow: 0 6px 20px -14px rgba(0,0,0,.35); }
details.row summary .mi { transition: transform .25s var(--ease); }

@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(22px); }
  .js .rise.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
  .js .device.rise { transform: translateY(40px) scale(.97); }
  .js .device.rise.in { transform: none; transition-duration: 1.1s; }


  .result.swap > * { animation: up .45s var(--ease) both; }
  .result.swap > * + * { animation-delay: .08s; }
  .meter i { transition: left .45s var(--ease); }
  .story, .story * { transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease); }
  .story.bump { animation: bump .5s var(--ease); }
}
@keyframes paneIn { from { opacity: 0; transform: translateX(28px); } }
@keyframes paneInRtl { from { opacity: 0; transform: translateX(-28px); } }
@keyframes draw { from { stroke-dashoffset: 345.6; } }
@keyframes grow { from { width: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }
@keyframes bump { 40% { transform: scale(.97) rotate(-1deg); } }


/* ---------- the weekly story card, as the app draws it ---------- */
.story-wrap { display: grid; grid-template-columns: 1fr auto; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .story-wrap { grid-template-columns: 1fr; } }
.story { width: 300px; max-width: 100%; aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 28px; padding: 26px 24px; display: flex; flex-direction: column; background: #ed6514; color: #fff; box-shadow: 0 30px 60px -30px rgba(237, 101, 20, .7); }
.story[data-theme='light'] { background: #fff; color: #191a1d; box-shadow: 0 30px 60px -30px rgba(0,0,0,.35); }
.story[data-theme='dark'] { background: #111; color: #fff; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.story .top { display: flex; justify-content: space-between; align-items: baseline; }
.story .word { font: 800 24px Montserrat, Tajawal, sans-serif; letter-spacing: -.02em; }
.story[data-theme='light'] .word, .story[data-theme='dark'] .word { color: #ed6514; }
.story .date { font-size: 12px; opacity: .8; }
.story .lbl { font: 700 11px Montserrat, Tajawal, sans-serif; letter-spacing: .14em; opacity: .85; margin-top: 34px; }
[dir='rtl'] .story .lbl { letter-spacing: 0; }
.story .num { font: 800 120px/1 Montserrat, sans-serif; margin-top: 8px; }
.story .unit { font: 700 24px Montserrat, Tajawal, sans-serif; }
.story .days { display: flex; justify-content: space-between; margin-top: 26px; text-align: center; font-size: 10px; }
.story .days i { display: block; width: 22px; height: 22px; border-radius: 50%; margin: 5px auto 0; background: rgba(255,255,255,.28); }
.story .days i.y { background: #fff; }
.story[data-theme='light'] .days i { background: #eee; } .story[data-theme='light'] .days i.y { background: #ed6514; }
.story[data-theme='dark'] .days i { background: #2a2a2a; } .story[data-theme='dark'] .days i.y { background: #ed6514; }
.story .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font: 700 14px Montserrat, Tajawal, sans-serif; }
.story .flame { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: #ed6514; display: grid; place-items: center; font-size: 22px; }
.story[data-theme='light'] .flame, .story[data-theme='dark'] .flame { background: #ed6514; color: #fff; }
.swatch { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1.5px solid var(--line); }
[data-theme-toggle] .sun { display: none; }
:root[data-theme='dark'] [data-theme-toggle] .sun { display: inline-block; }
:root[data-theme='dark'] [data-theme-toggle] .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) [data-theme-toggle] .sun { display: inline-block; }
  :root:not([data-theme='light']) [data-theme-toggle] .moon { display: none; }
}
.story[data-theme='light'] .flame img, .story[data-theme='dark'] .flame img { filter: brightness(0) invert(1); }

/* ---------- calculator parts (classes instead of inline styles: the security policy forbids style="") ---------- */
.hero-card .sub { font-size: 18px; margin-top: 6px; }
.gap-top { margin-top: 14px; }
.gap-sm { margin-top: 10px; }
.stack-bar { display: flex; height: 10px; border-radius: 9px; overflow: hidden; gap: 3px; margin-bottom: 8px; }
.stack-bar i { display: block; height: 100%; }
.c-green { background: #00c853; } .c-blue { background: #2f80ed; } .c-amber { background: #e09508; }
.c-primary { background: var(--primary); } .c-faint { background: var(--faint); }
.w-reps { width: 78px; flex-shrink: 0; }
.w-kg { width: 74px; text-align: end; flex-shrink: 0; }

/* ---------- page parts that used to be inline styles ---------- */
.lead-gap { margin-top: 14px; }
.h2-lg { font-size: clamp(26px, 3.4vw, 38px); }
.mission { max-width: 26ch; }
.narrow { max-width: 58ch; }
.gap-lg { margin-top: 36px; }
.gap-cta { margin-top: 22px; }
section.tight { padding-top: 24px; }
.group-h { margin: 0 0 10px 4px; }
.groups { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.posts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.two-col { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); align-items: start; }
.story-wrap.card { padding: clamp(24px, 4vw, 48px); }
.story-seg { margin-top: 22px; }
.sw-orange { background: #ed6514; } .sw-light { background: #fff; } .sw-dark { background: #111; }
.tile .cat { color: var(--primary); font-size: 12px; }
.tile-h { font-size: 19px; }
.byline { margin-top: 12px; }
.form-h { font-size: 22px; margin-bottom: 6px; }
.form-note { margin-bottom: 18px; }
footer .foot-h { font: 700 13px Montserrat, Tajawal, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
[dir='rtl'] footer .foot-h { letter-spacing: 0; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; }
.page-404 { min-height: 55vh; }
.page-404 .cta { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.lang { display: inline-flex; align-items: center; justify-content: center; }
img.post-img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; }
.article img.post-img { aspect-ratio: 16/8; margin-bottom: 26px; }
.tint-orange { background: linear-gradient(150deg, #ff7a00, #ed6514); }
.tint-ink { background: #191a1d; }
.tint-peach { background: var(--home); }
details.row summary h3 { font-size: 17px; margin: 0; }
.calc-tabs a { flex-shrink: 0; color: var(--muted); border-radius: 999px; padding: 10px 18px; font: 600 15px Montserrat, Tajawal, sans-serif; }
.calc-tabs a[aria-current='page'] { background: var(--wash); color: var(--primary); }
.calc-tabs a:hover { color: var(--text); }
.story .flame img { display: block; }
/* the result card is updated in place: bars and the meter dot glide to their new size */
@media (prefers-reduced-motion: no-preference) {
  .list .bar i, .stack-bar i { transition: width .45s var(--ease); }
}
.prose a.row { color: inherit; font-weight: inherit; }

/* article covers without a photo: the article's icon on one of the app's colours */
.post-img[class*='cover-'] { display: grid; place-items: center; }
.post-img[class*='cover-'] .mi { font-size: clamp(56px, 8vw, 88px); }
.cover-orange { background: linear-gradient(150deg, #ff7a00, #ed6514); color: #fff; }
.cover-ink { background: #191a1d; color: #ff7a2f; }
.cover-peach { background: var(--home); color: var(--primary); }
.cover-blue { background: var(--t-blue); color: var(--i-blue); }
.cover-green { background: var(--t-green); color: var(--i-green); }
.cover-lavender { background: var(--t-lav); color: var(--i-lav); }

/* ---- What's in the app: the tour (tabs + the second phone on that group's screen), then everything, by group */
.tour { display: grid; grid-template-columns: 1fr auto; gap: clamp(24px, 5vw, 64px); align-items: center; background: var(--card); border-radius: var(--r); padding: clamp(18px, 3vw, 36px); }
.tour-tabs { margin-bottom: 22px; }
.tour-panel h3 { font-size: clamp(22px, 2.4vw, 30px); margin: 16px 0 8px; }
.tour-panel .small { margin-top: 12px; }
.sq.big { width: 60px; height: 60px; font-size: 30px; border-radius: 18px; }
.device.tour-phone { width: 290px; }
@media (max-width: 860px) { .tour { grid-template-columns: 1fr; } .device.tour-phone { width: 270px; } }
.all-h { font-size: clamp(20px, 2.2vw, 24px); margin: clamp(32px, 5vw, 52px) 0 16px; }
/* each group folds to one row and a tap opens its features. Rows, one under the other: side by side, an open group
   left holes beside it. Open, its features sit in columns where there is room */
.feat-grid { display: grid; gap: 10px; }
.feat-cat { background: var(--card); border-radius: 22px; padding: 0 20px; }
.feat-head { display: flex; align-items: center; gap: 14px; padding: 14px 0; cursor: pointer; list-style: none; border-radius: 14px; }
.feat-head::-webkit-details-marker { display: none; }
.feat-head:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.feat-head h4 { margin: 0; }
.feat-chev { width: 28px; height: 28px; display: grid; place-items: center; flex-shrink: 0; color: var(--muted); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.feat-chev::before { content: ''; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; border-radius: 1px; transform: translateY(-2px) rotate(45deg); }
.feat-cat[open] .feat-chev { transform: rotate(180deg); }
.feat-cat[open] .feat-list { padding-bottom: 10px; border-top: 1px solid var(--line); }
@media (min-width: 760px) {
  .feat-list { columns: 2; column-gap: 32px; }
  .feat-cat .feat-list li { break-inside: avoid; border-top: 0; padding: 9px 0; }
  .feat-cat[open] .feat-list { padding-top: 6px; }
}
@media (min-width: 1080px) { .feat-list { columns: 3; } }
@media (hover: hover) { .feat-head:hover .feat-chev { color: var(--primary); } }
@media (prefers-reduced-motion: no-preference) {
  .feat-cat { interpolate-size: allow-keywords; }
  .feat-cat::details-content { block-size: 0; overflow: hidden; transition: block-size .3s cubic-bezier(.2, .8, .2, 1), content-visibility .3s allow-discrete; }
  .feat-cat[open]::details-content { block-size: auto; }
}
.feat-head .sq { width: 42px; height: 42px; font-size: 22px; border-radius: 13px; }
.feat-head h4 { font-size: 17px; flex: 1; }
.feat-head .count { font: 700 13px Montserrat, Tajawal, sans-serif; color: var(--primary); background: var(--wash); border-radius: 999px; padding: 3px 10px; }
.feat-list { list-style: none; margin: 0; padding: 0; }
.feat-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.feat-list li:first-child { border-top: 0; }
.feat-list .fi { font-size: 20px; color: var(--primary); margin-top: 1px; }
.feat-cat.amber .fi { color: var(--i-amber); } .feat-cat.blue .fi { color: var(--i-blue); } .feat-cat.green .fi { color: var(--i-green); } .feat-cat.lav .fi { color: var(--i-lav); }
.feat-list b { display: block; font: 600 15px Montserrat, Tajawal, sans-serif; }
.feat-list span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; line-height: 1.45; }
/* the second phone's screen buttons, under each group's text */
.deep-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.deep-btns button { border: 1px solid var(--line); background: var(--page); color: var(--text); border-radius: 999px; padding: 9px 15px; font: 600 13px Montserrat, Tajawal, sans-serif; cursor: pointer; }
.deep-btns button[aria-pressed='true'] { border-color: var(--primary); color: var(--primary); background: var(--wash); }

/* ================= the phone: the app's real screens, in its light and dark palettes =================
   Every colour is a variable: light is the app's Light theme, dark its Dark scale (the app's
   src/utils/theme.tsx: page #0F0F10, card #1A1A1B, raised #252527, line #333335, text #F4F4F5, muted #9B9B9E,
   primary #FF7A2F, peach header #2F231C). The phone follows the site's theme.
   (Joined onto site.css by the build.) */
.device { width: 320px; max-width: 100%; margin: 0 auto; }
.frame { border-radius: 44px; padding: 10px; background: #111; box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.scr {
  --s-page: #f7f7f7; --s-card: #fff; --s-raised: #f3eee7; --s-line: #f1f1f1; --s-text: #000; --s-muted: #6c7278;
  --s-primary: #ed6514; --s-peach: #ffefe5; --s-wash: #fdeee4; --s-ring: #ffc796; --s-track: #efefef; --s-dot: #d0d0d0;
  --s-t-peach: #fde8dc; --s-t-amber: #fdf1dc; --s-t-lav: #ece8fb; --s-t-blue: #e3f0fd; --s-t-green: #e3f1e8;
  --s-i-orange: #ed6514; --s-i-amber: #e09508; --s-i-lav: #7a60d8; --s-i-blue: #2f80ed; --s-i-green: #2e8b57; --s-ok: #2e9e5b;
  --s-shadow: 0 8px 16px -10px rgba(0,0,0,.2);
  position: relative; height: 640px; border-radius: 35px; overflow: hidden; background: var(--s-page); color: var(--s-text);
  font-family: 'Open Sans', Tajawal, sans-serif;
}
:root[data-theme='dark'] .scr {
  --s-page: #0f0f10; --s-card: #1a1a1b; --s-raised: #252527; --s-line: #333335; --s-text: #f4f4f5; --s-muted: #9b9b9e;
  --s-primary: #ff7a2f; --s-peach: #2f231c; --s-wash: rgba(255,122,47,.16); --s-ring: rgba(255,122,47,.28); --s-track: #333335; --s-dot: #3a3a3d;
  --s-t-peach: rgba(255,122,47,.16); --s-t-amber: rgba(224,149,8,.18); --s-t-lav: rgba(122,96,216,.24); --s-t-blue: rgba(47,128,237,.22); --s-t-green: rgba(46,139,87,.24);
  --s-i-orange: #ff7a2f; --s-i-amber: #f0b43c; --s-i-lav: #a894f0; --s-i-blue: #6aa8f5; --s-i-green: #5cc28a; --s-shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .scr {
    --s-page: #0f0f10; --s-card: #1a1a1b; --s-raised: #252527; --s-line: #333335; --s-text: #f4f4f5; --s-muted: #9b9b9e;
    --s-primary: #ff7a2f; --s-peach: #2f231c; --s-wash: rgba(255,122,47,.16); --s-ring: rgba(255,122,47,.28); --s-track: #333335; --s-dot: #3a3a3d;
    --s-t-peach: rgba(255,122,47,.16); --s-t-amber: rgba(224,149,8,.18); --s-t-lav: rgba(122,96,216,.24); --s-t-blue: rgba(47,128,237,.22); --s-t-green: rgba(46,139,87,.24);
    --s-i-orange: #ff7a2f; --s-i-amber: #f0b43c; --s-i-lav: #a894f0; --s-i-blue: #6aa8f5; --s-i-green: #5cc28a; --s-shadow: none;
  }
}
/* switching the theme recolours the phone smoothly */
.scr, .scr .pane, .scr .s-card, .scr .s-peach, .scr .s-macros, .scr .s-tabbar, .scr .s-btn, .scr .s-search, .scr .s-tiles > button,
.scr .s-post, .scr .s-intake, .scr .s-actions button, .scr .s-week, .scr .s-goal, .scr .s-ex, .scr .s-grid > div {
  transition: background-color .4s ease, color .4s ease;
}
[dir='rtl'] .scr, [dir='rtl'] .scr b, [dir='rtl'] .scr .f { font-family: Tajawal, sans-serif; letter-spacing: 0; }
.scr .f { font-family: Montserrat, Tajawal, sans-serif; }
.scr button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.scr button:focus-visible { outline: 2px solid var(--s-primary); outline-offset: 2px; border-radius: 12px; }
.scr .pane { position: absolute; inset: 0 0 76px; overflow: hidden; display: none; background: var(--s-page); }
.scr .pane.full { bottom: 0; }
.scr .pane.on { display: block; }
.device .seg { justify-content: center; width: 100%; margin-top: 14px; }
.device .hint { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* tints for the icon circles and squares */
.ti-peach { background: var(--s-t-peach); color: var(--s-i-orange); }
.ti-amber { background: var(--s-t-amber); color: var(--s-i-amber); }
.ti-lav { background: var(--s-t-lav); color: var(--s-i-lav); }
.ti-blue { background: var(--s-t-blue); color: var(--s-i-blue); }
.ti-green { background: var(--s-t-green); color: var(--s-i-green); }

/* headers */
.s-top { display: flex; align-items: center; gap: 10px; padding: 26px 18px 0; }
.s-av { width: 38px; height: 38px; border-radius: 50%; background: #2e9e5b; border: 2px solid var(--s-primary); color: #fff; display: grid; place-items: center; font: 700 16px Montserrat, Tajawal, sans-serif; flex-shrink: 0; }
.s-hi { font-size: 12px; }
.s-name { font-weight: 700; font-size: 16px; }
.s-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--s-card); display: grid; place-items: center; font-size: 19px; margin-inline-start: auto; flex-shrink: 0; }
.s-btn + .s-btn { margin-inline-start: 6px; }
.s-title { display: flex; align-items: center; gap: 12px; padding: 22px 16px 0; font-weight: 700; font-size: 21px; }
.scr .s-title .x { width: 34px; height: 34px; border-radius: 50%; background: var(--s-card); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.s-title small { margin-inline-start: auto; font-weight: 400; font-size: 11px; color: var(--s-muted); }
.s-sub { padding: 2px 16px 0; font-size: 11.5px; color: var(--s-muted); }

/* home */
.s-peach { background: var(--s-peach); border-radius: 0 0 30px 30px; padding-bottom: 56px; }
.s-ring { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.s-ring .n { width: 62px; text-align: center; font: 700 22px Montserrat, sans-serif; }
.s-ring .n small, .s-ring .ring small { display: block; font-weight: 400; font-size: 10px; color: var(--s-muted); letter-spacing: .04em; margin-top: 2px; }
.s-ring .ring { position: relative; width: 132px; height: 132px; }
.s-ring svg { transform: rotate(-90deg); }
.s-ring .track { stroke: var(--s-ring); }
.s-ring .arc { stroke: var(--s-primary); transition: stroke-dashoffset .8s cubic-bezier(.2, .7, .2, 1); }
.s-ring .ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font: 700 25px Montserrat, sans-serif; }
.scr .s-stats { display: block; margin: 10px auto 0; color: var(--s-primary); font-weight: 600; font-size: 11px; letter-spacing: .06em; }
.s-macros { position: relative; margin: -40px 16px 0; background: var(--s-card); border-radius: 20px; padding: 12px 10px; display: flex; box-shadow: var(--s-shadow); }
.s-macros > div { flex: 1; text-align: center; font-size: 12px; font-weight: 500; }
.s-bar { display: block; height: 5px; margin: 7px 12px; border-radius: 9px; background: var(--s-track); overflow: hidden; }
.s-bar b { display: block; height: 100%; border-radius: 9px; transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.s-macros span { font-size: 11px; }
.c-carb { background: #2f80ed; } .c-prot { background: #00c853; } .c-fat { background: #e09508; } .c-kcal { background: var(--s-primary); }
.s-date { text-align: center; font-weight: 600; font-size: 13px; color: var(--s-muted); margin: 14px 0 6px; }
.s-date .mi { color: var(--s-primary); }
.s-h { font-weight: 700; font-size: 17px; margin: 10px 18px; }

/* cards and rows */
.s-card { background: var(--s-card); border-radius: 22px; margin: 0 16px; padding: 4px 14px; }
.s-card.gap { margin-top: 12px; }
.scr .s-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; width: 100%; }
.s-row + .s-row { border-top: 1px solid var(--s-line); }
.s-row .ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.s-row .ic.sq { border-radius: 12px; }
.s-row b { display: block; font-size: 13px; }
.s-row .tx { min-width: 0; }
.s-row .tx > span { display: block; font-size: 11px; color: var(--s-muted); }
.scr .s-row .add { margin-inline-start: auto; width: 28px; height: 28px; border-radius: 50%; background: var(--s-wash); color: var(--s-primary); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.s-row .chev { margin-inline-start: auto; color: var(--s-muted); font-size: 18px; }
.s-row .kc { margin-inline-start: auto; font: 700 13px Montserrat, sans-serif; }

/* the app's floating button and bottom bar */
.scr .s-fab { position: absolute; inset-inline-end: 16px; bottom: 90px; width: 54px; height: 54px; border-radius: 50%; background: var(--s-primary); color: #fff; display: grid; place-items: center; font-size: 30px; z-index: 3; box-shadow: 0 10px 18px -8px rgba(237, 101, 20, .7); }
.scr .s-fab[hidden] { display: none; }
.s-tabbar { position: absolute; inset: auto 0 0; height: 76px; background: var(--s-card); border-radius: 22px 22px 0 0; display: flex; justify-content: space-around; align-items: center; box-shadow: 0 -4px 14px rgba(0, 0, 0, .04); z-index: 2; }
.s-tabbar[hidden] { display: none; }
.scr .s-tabbar button { display: grid; justify-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--s-muted); padding: 6px 4px; }
.s-tabbar .mi { font-size: 24px; }
.scr .s-tabbar [aria-current='page'] { color: var(--s-primary); }

/* workouts */
.s-search { margin: 16px 16px 0; background: var(--s-card); border-radius: 22px; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--s-muted); font-size: 13px; }
.s-search .mi { color: var(--s-text); font-size: 20px; }
.s-search .tune { margin-inline-start: auto; color: var(--s-primary); }
.s-hero { margin: 14px 16px 0; background: var(--s-primary); color: #fff; border-radius: 24px; padding: 18px; }
.s-hero .l { font-weight: 700; font-size: 10px; letter-spacing: .12em; opacity: .9; }
[dir='rtl'] .s-hero .l { letter-spacing: 0; }
.s-hero .h { font-weight: 700; font-size: 22px; line-height: 1.15; margin: 6px 0; }
.s-hero .h.big { font-size: 26px; }
.s-hero .p { font-size: 11.5px; opacity: .95; }
.scr .s-hero .b { width: 100%; background: #fff; color: #ed6514; border-radius: 999px; height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 14px; margin-top: 12px; }
.s-tl { display: flex; gap: 8px; margin-top: 12px; }
.s-tl > div { flex: 1; background: rgba(255, 255, 255, .16); border-radius: 14px; padding: 9px 10px; }
.s-tl b { display: block; font: 700 16px Montserrat, sans-serif; }
.s-tl span { font-size: 10.5px; }
.s-tiles { display: flex; gap: 8px; margin: 10px 16px 0; }
.scr .s-tiles > button { flex: 1; background: var(--s-card); border-radius: 20px; padding: 12px; }
.s-tiles .q { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; margin-bottom: 8px; }
.s-tiles b { display: block; font-size: 13px; }
.s-tiles .sub { display: block; font-size: 11px; color: var(--s-muted); }

/* the workout in progress */
.s-ex { margin: 12px 16px 0; background: var(--s-card); border-radius: 22px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.s-ex .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex-shrink: 0; }
.s-ex b { display: block; font-size: 15px; }
.s-ex .sub { display: block; font-size: 11px; color: var(--s-muted); }
.s-clock { margin-inline-start: auto; font: 700 13px Montserrat, sans-serif; color: var(--s-primary); }
.scr .s-set { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; }
.s-set + .s-set { border-top: 1px solid var(--s-line); }
.s-set .k { width: 26px; height: 26px; border-radius: 8px; background: var(--s-raised); display: grid; place-items: center; font: 700 12px Montserrat, sans-serif; flex-shrink: 0; transition: background-color .25s, color .25s; }
.s-set .w { font: 700 13px Montserrat, sans-serif; }
.s-set .r { font-size: 11px; color: var(--s-muted); }
.s-set .tick { margin-inline-start: auto; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--s-dot); display: grid; place-items: center; color: transparent; font-size: 17px; transition: background-color .25s, border-color .25s, color .25s; }
.s-set.done .tick { background: var(--s-ok); border-color: var(--s-ok); color: #fff; }
.s-set.done .k { background: var(--s-primary); color: #fff; }
.s-rest { margin: 12px 16px 0; background: var(--s-primary); color: #fff; border-radius: 18px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; }
.s-rest[hidden] { display: none; }
.s-rest .t { margin-inline-start: auto; font: 700 20px Montserrat, sans-serif; }

/* nutrition */
.s-intake { margin: 12px 16px 0; background: var(--s-card); border-radius: 22px; padding: 14px; }
.s-intake .top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 13px; }
.s-intake .top b { font: 700 18px Montserrat, sans-serif; }
.s-intake .top small { font-size: 11px; color: var(--s-muted); font-weight: 400; }
.s-intake > .s-bar { margin: 10px 0; height: 8px; }
.s-intake .mac { display: flex; gap: 10px; font-size: 10.5px; color: var(--s-muted); }
.s-intake .mac > span { flex: 1; }
.s-intake .mac .s-bar { margin: 4px 0 0; height: 5px; }
.s-actions { display: flex; gap: 8px; margin: 10px 16px 0; }
.s-actions .act { flex: 1; background: var(--s-card); border-radius: 18px; padding: 12px; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; }
.s-actions .mi { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }

/* community */
.s-chips { display: flex; gap: 6px; padding: 12px 16px 0; }
.s-chips span { border-radius: 999px; padding: 6px 12px; font-size: 11px; font-weight: 600; color: var(--s-muted); background: var(--s-card); }
.s-chips span.on { background: var(--s-wash); color: var(--s-primary); }
.s-post { margin: 10px 16px 0; background: var(--s-card); border-radius: 22px; padding: 14px; }
.s-post .who { display: flex; align-items: center; gap: 10px; }
.s-post .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.s-post .av.a1 { background: #2f80ed; } .s-post .av.a2 { background: #7a60d8; }
.s-post .who b { display: block; font-size: 13px; }
.s-post .who .when { display: block; font-size: 10.5px; color: var(--s-muted); }
.s-post .kind { margin-inline-start: auto; font-size: 10px; font-weight: 700; color: var(--s-primary); background: var(--s-wash); border-radius: 999px; padding: 4px 9px; }
.s-post .what { font-weight: 700; font-size: 15px; margin: 10px 0 8px; }
.s-post .st { display: flex; gap: 8px; }
.s-post .st > div { flex: 1; background: var(--s-page); border-radius: 12px; padding: 8px; text-align: center; }
.s-post .st b { display: block; font: 700 13px Montserrat, sans-serif; }
.s-post .st span { font-size: 9.5px; color: var(--s-muted); }
.scr .s-cheer { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; border-radius: 999px; padding: 6px 12px; background: var(--s-page); font-size: 12px; font-weight: 700; color: var(--s-muted); }
.scr .s-cheer.on { background: var(--s-wash); color: var(--s-primary); }
.s-cheer .mi { font-size: 16px; }

/* weekly report, progress, a finished workout */
.s-week, .s-goal { background: var(--s-card); border-radius: 20px; margin: 10px 16px 0; padding: 14px; }
.s-week .top, .s-goal .top { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
.s-week .top span { font-weight: 400; font-size: 11px; color: var(--s-muted); }
.s-dots { display: flex; justify-content: space-between; margin-top: 10px; font-size: 10px; color: var(--s-muted); text-align: center; }
.s-dots i { display: block; width: 17px; height: 17px; border-radius: 50%; background: var(--s-dot); margin: 4px auto 0; }
.s-dots i.y { background: var(--s-primary); }
.s-goal .top span { color: var(--s-primary); font-weight: 600; font-size: 11px; }
.s-goal .s-bar { margin: 10px 0 6px; height: 8px; background: var(--s-raised); }
.s-goal .s-bar b { background: var(--s-primary); }
.s-goal p { font-size: 11px; color: var(--s-muted); }
.s-btns { position: absolute; inset: auto 16px 16px; display: flex; gap: 8px; }
.scr .s-btns button { flex: 1; height: 42px; border-radius: 999px; border: 1.5px solid var(--s-primary); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: var(--s-primary); text-align: center; }
.scr .s-btns button.fill { background: var(--s-primary); color: #fff; }
.s-done { text-align: center; padding: 34px 20px 0; }
.s-done .medal { width: 74px; height: 74px; margin: 0 auto; border-radius: 50%; background: var(--s-wash); color: var(--s-primary); display: grid; place-items: center; font-size: 38px; }
.s-done .ttl { margin: 14px 0 4px; font-weight: 700; font-size: 21px; }
.s-done p { font-size: 12px; color: var(--s-muted); }
.s-done .rec { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; background: var(--s-t-amber); color: var(--s-i-amber); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 12px; }
.s-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 16px 0; }
.s-grid > div { background: var(--s-card); border-radius: 16px; padding: 12px; }
.s-grid b { display: block; font: 700 17px Montserrat, sans-serif; }
.s-grid span { font-size: 11px; color: var(--s-muted); }

/* movement inside the phone */
@media (prefers-reduced-motion: no-preference) {
  .scr button:active { transform: scale(.97); }
  .scr .pane.on { animation: paneIn .45s var(--ease) both; }
  [dir='rtl'] .scr .pane.on { animation-name: paneInRtl; }
  .scr .pane.on.back { animation-name: paneBack; }
  [dir='rtl'] .scr .pane.on.back { animation-name: paneBackRtl; }
  .pane.play .arc { animation: draw 1.4s var(--ease) .15s both; }
  .pane.play .s-bar b { animation: grow 1s var(--ease) .45s both; }
  .pane.play .s-row, .pane.play .s-tiles > button, .pane.play .s-week, .pane.play .s-goal, .pane.play .s-btns, .pane.play .s-hero,
  .pane.play .s-post, .pane.play .s-intake, .pane.play .s-actions, .pane.play .s-ex, .pane.play .s-set, .pane.play .s-grid > div {
    animation: up .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 100ms);
  }
  .pane.play .s-dots i { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i, 0) * 80ms + 350ms); }
  .pane.play .s-done .medal { animation: pop .6s cubic-bezier(.3, 1.6, .5, 1) .1s both; }
  .s-set.done .tick, .s-cheer.on .mi { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
  .scr .s-fab { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) .9s both; }
}
@keyframes paneBack { from { opacity: 0; transform: translateX(-28px); } }
@keyframes paneBackRtl { from { opacity: 0; transform: translateX(28px); } }

/* the tabs under the phone double as a story-style timer while it plays by itself */
.device .seg button { position: relative; overflow: hidden; }
.device.auto .seg button[aria-selected='true']::after { content: ''; position: absolute; inset-inline-start: 14px; bottom: 5px; height: 2px; width: calc(100% - 28px); background: currentColor; opacity: .35; transform-origin: left; animation: timer var(--dwell, 5s) linear both; border-radius: 2px; }
[dir='rtl'] .device.auto .seg button[aria-selected='true']::after { transform-origin: right; }
@keyframes timer { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .device.auto .seg button::after { display: none; } }

/* ---- the second phone's screens (What's in the app): rest and effort, a lift over time, a scan, a recipe,
   water, weight, the league, who sees what */
.c-water { background: #2f80ed; }
.d-ring { width: 150px; height: 150px; margin: 18px auto 6px; border-radius: 50%; background: conic-gradient(var(--s-primary) 0 62%, var(--s-track) 0); display: grid; place-items: center; }
.d-ring-in { width: 120px; height: 120px; border-radius: 50%; background: var(--s-page); display: grid; place-content: center; text-align: center; }
.d-ring-in span { font-weight: 700; font-size: 30px; }
.d-ring-in small { font-size: 11px; color: var(--s-muted); }
.d-q { text-align: center; font-weight: 700; font-size: 13px; margin: 6px 16px 8px; }
.d-effort { display: flex; justify-content: center; gap: 4px; margin: 0 10px; }
.d-effort span { white-space: nowrap; padding: 6px 7px; border-radius: 999px; background: var(--s-card); font-size: 10.5px; font-weight: 600; }
.d-effort span.on { background: var(--s-primary); color: #fff; }
.d-best { display: flex; justify-content: space-between; padding: 12px 14px; }
.d-best small { display: block; font-size: 10.5px; color: var(--s-muted); }
.d-best b { font-size: 17px; }
.d-bars { display: flex; align-items: flex-end; gap: 6px; height: 92px; padding: 12px 0 4px; }
.d-bars i { flex: 1; height: var(--h); background: var(--s-wash); border-radius: 6px 6px 3px 3px; }
.d-bars i.last { background: var(--s-primary); }
.d-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--s-muted); padding-bottom: 8px; }
.d-scan { position: relative; margin: 18px 16px 0; height: 130px; border: 2px dashed var(--s-primary); border-radius: 20px; display: grid; place-items: center; font-size: 56px; color: var(--s-primary); }
.d-scan span { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: var(--s-primary); opacity: .55; }
.d-mac { display: flex; justify-content: space-between; padding: 2px 0 12px; font-size: 11px; color: var(--s-muted); }
.d-mac b { color: var(--s-text, inherit); }
.d-big { margin: 16px 16px 0; background: var(--s-card); border-radius: 22px; padding: 16px 14px 12px; }
.d-big b { display: block; font-size: 28px; }
.d-big > span { display: block; font-size: 11.5px; color: var(--s-muted); }
.d-big .s-bar { margin: 10px 0 5px; }
.d-big .d-ends { display: flex; justify-content: space-between; font-size: 10.5px; }
.d-drinks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 16px 0; }
.d-drinks span { background: var(--s-card); border-radius: 16px; padding: 10px 4px; display: grid; justify-items: center; gap: 2px; text-align: center; font-size: 18px; }
.d-drinks .mi { color: var(--s-i-blue); }
.d-drinks b { font-size: 11px; } .d-drinks small { font-size: 10px; color: var(--s-muted); }
.s-hero > span { display: block; font-size: 11.5px; opacity: .92; text-wrap: pretty; }
.scr .nw { white-space: nowrap; }
.d-league > div { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.d-league > div + div { border-top: 1px solid var(--s-line); }
.d-league .r { width: 20px; font-weight: 700; font-size: 13px; color: var(--s-muted); }
.d-league .nm { flex: 1; font-size: 13px; }
.d-league b { font-size: 13px; }
.d-league .me { background: var(--s-wash); margin: 0 -14px; padding: 10px 14px; border-radius: 12px; }
.d-league .me .r, .d-league .me .nm { color: var(--s-primary); font-weight: 700; }
.d-who { margin-inline-start: auto; font-size: 10.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--s-t-green); color: var(--s-i-green); white-space: nowrap; }
.d-who.me { background: var(--s-t-lav); color: var(--s-i-lav); }

/* moved out of the markup by the build */
.z0:not(#_){--d:80ms}
.z1:not(#_){--d:160ms}
.z2:not(#_){--d:240ms}
.z3:not(#_){--d:180ms}
.z4:not(#_){width:48%}
.z5:not(#_){width:62%}
.z6:not(#_){width:40%}
.z7:not(#_){--i:0}
.z8:not(#_){--i:1}
.z9:not(#_){--i:2}
.za:not(#_){--i:3}
.zb:not(#_){--i:4}
.zc:not(#_){width:41%}
.zd:not(#_){--i:5}
.ze:not(#_){--i:6}
.zf:not(#_){--h:40%}
.zg:not(#_){--h:50%}
.zh:not(#_){--h:60%}
.zi:not(#_){--h:67%}
.zj:not(#_){--h:73%}
.zk:not(#_){--h:83%}
.zl:not(#_){width:50%}
.zm:not(#_){width:63%}
.zn:not(#_){--d:120ms}
.zo:not(#_){--d:60ms}
