/* Mosaic Mobile — built on assets/mosaic-tokens.css
   Two purpose-built phone directions: "Reader" (airy, editorial) and
   "Pulse" (dense, data-forward). Shared chrome + bottom sheet. */

.mob, .mob * { box-sizing: border-box; }
.mob {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- shared atoms ---------- */
.m-kicker {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--text-muted); white-space: nowrap;
}
.m-micro { font-size: 11.5px; color: var(--text-muted); letter-spacing: -0.01em; white-space: nowrap; }
.m-hair { height: 1px; background: var(--border-hairline); border: none; }

/* favicon row */
.m-favrow { display: inline-flex; align-items: center; }
.m-favrow .fav {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; color: #fff; border-radius: 6px; flex-shrink: 0;
}

/* moodline — proportional stacked sentiment bar */
.m-mood { display: flex; width: 100%; overflow: hidden; }
.m-mood i { display: block; height: 100%; }
.m-mood.round { border-radius: 99px; }

/* mini moodline inside the frames chip */
.m-minimood { display: inline-flex; gap: 2px; align-items: center; }
.m-minimood i { display: inline-block; width: 4px; border-radius: 1.5px; }

/* frames affordance */
.m-frames {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; font: inherit; cursor: pointer; padding: 0;
  color: var(--text-secondary);
}
.m-frames .lbl { font-size: 12px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.m-frames .chev { color: var(--text-muted); font-size: 13px; line-height: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.m-head {
  flex-shrink: 0;
  padding: 54px 18px 12px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-hairline);
  position: relative; z-index: 4;
}
.m-head img { height: 22px; display: block; }
.m-head .h-right { display: flex; align-items: center; gap: 6px; }
.m-iconbtn {
  width: 34px; height: 34px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--button-default); color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
[data-theme="dark"] .m-iconbtn { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

/* segmented filter under header (Reader uses chips, both share) */
.m-filters {
  flex-shrink: 0;
  display: flex; gap: 7px; padding: 11px 18px 12px; overflow-x: auto;
  background: var(--bg-primary);
  -ms-overflow-style: none; scrollbar-width: none;
  border-bottom: 1px solid var(--border-hairline);
}
.m-filters::-webkit-scrollbar { display: none; }
.m-chip {
  flex-shrink: 0; border: none; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 500; letter-spacing: -0.01em;
  padding: 6px 13px; border-radius: 999px;
  background: var(--button-default); color: var(--text-secondary); white-space: nowrap;
}
.m-chip.on { background: var(--button-selected); color: #3d362a; }
[data-theme="dark"] .m-chip { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75); }
[data-theme="dark"] .m-chip.on { background: rgba(255,255,255,0.2); color: #fff; }

/* ============================================================
   FEED SCROLL
   ============================================================ */
.m-feed { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.m-feed::-webkit-scrollbar { width: 0; }

.m-feedtop {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 16px 18px 6px;
}

/* collage banner wrapper (rounds corners, clips) */
.m-banner { position: relative; width: 100%; overflow: hidden; display: block; background: #EDE7DC; }
[data-theme="dark"] .m-banner { background: #1D1F22; }
.m-banner .collage { position: absolute; inset: 0; }
.m-banner .collage i { position: absolute; display: block; }

/* ---------- Direction A: READER (airy, boxed cards) ---------- */
.r-card {
  margin: 0 16px 16px; border-radius: 18px; overflow: hidden;
  background: var(--bg-surface); border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-card); cursor: pointer;
  transition: transform 0.12s ease;
}
.r-card:active { transform: scale(0.992); }
.r-card .m-banner { height: 150px; }
.r-body { padding: 14px 16px 15px; }
.r-eyebrow { display: flex; gap: 7px; align-items: center; margin-bottom: 9px; }
.r-card h3 {
  font-weight: 700; font-size: 19px; line-height: 23px; letter-spacing: -0.035em;
  margin: 0; color: var(--text-primary); text-wrap: pretty;
}
.r-sum {
  font-size: 13.5px; line-height: 19px; color: var(--text-secondary);
  margin: 7px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.r-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border-hairline);
}

/* ---------- Direction B: PULSE (dense, edge-to-edge, data-forward) ---------- */
.p-card {
  position: relative; cursor: pointer;
  padding: 16px 18px 16px 18px;
  border-bottom: 1px solid var(--border-hairline);
  transition: background 0.12s ease;
}
.p-card:active { background: var(--bg-surface); }
.p-card .m-banner { height: 112px; border-radius: 10px; margin-bottom: 12px; }
.p-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.p-dot { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.p-card h3 {
  font-weight: 700; font-size: 17.5px; line-height: 21px; letter-spacing: -0.035em;
  margin: 0; color: var(--text-primary); text-wrap: pretty;
}
.p-mood { display: flex; align-items: center; gap: 10px; margin: 11px 0 11px; }
.p-mood .m-mood { flex: 1; min-width: 0; height: 7px; }
.p-moodlabel { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.p-sum {
  font-size: 13px; line-height: 18px; color: var(--text-secondary); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }

/* ============================================================
   TAB BAR
   ============================================================ */
.m-tabs {
  flex-shrink: 0; display: flex; align-items: flex-start; justify-content: space-around;
  padding: 9px 8px 26px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-hairline);
  position: relative; z-index: 4;
}
[data-theme="light"] .m-tabs { background: rgba(254,249,239,0.92); backdrop-filter: blur(12px); }
[data-theme="dark"] .m-tabs { background: rgba(39,41,45,0.92); backdrop-filter: blur(12px); }
.m-tab {
  background: none; border: none; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); flex: 1; padding: 2px 0;
}
.m-tab i { font-size: 23px; line-height: 1; }
.m-tab .t-lbl { font-size: 10px; font-weight: 500; letter-spacing: 0.01em; }
.m-tab.on { color: var(--text-primary); }
.m-tab.on .t-lbl { font-weight: 600; }

/* ============================================================
   SOURCES screen
   ============================================================ */
.s-head { padding: 18px 18px 6px; }
.s-head h2 { font-weight: 700; font-size: 26px; letter-spacing: -0.04em; margin: 6px 0 8px; }
.s-head p { font-size: 13px; line-height: 19px; color: var(--text-secondary); margin: 0; }
.s-filter { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 18px 6px; }
.s-chip {
  font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--border-subtle); background: transparent; color: var(--text-secondary); white-space: nowrap;
}
.s-chip.on { background: var(--text-primary); color: var(--bg-primary); border-color: var(--text-primary); }
.s-group { padding: 14px 0 4px; }
.s-group .g-lbl { padding: 0 18px 8px; }
.s-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 18px;
  border-top: 1px solid var(--border-hairline);
}
.s-row .s-name { font-weight: 600; font-size: 14px; color: var(--text-primary); letter-spacing: -0.02em; }
.s-row .s-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.s-row .s-country { margin-left: auto; font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; }

/* ============================================================
   BOTTOM SHEET — the narrative comparison
   ============================================================ */
.m-sheet-wrap {
  position: absolute; inset: 0; z-index: 40;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.m-scrim {
  position: absolute; inset: 0; background: rgba(20,18,14,0.42);
  opacity: 0; transition: opacity 0.28s ease;
}
.m-sheet-wrap.open .m-scrim { opacity: 1; }
.m-sheet {
  position: relative; max-height: 90%; display: flex; flex-direction: column;
  background: var(--bg-primary); border-radius: 26px 26px 0 0;
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 -18px 50px rgba(20,18,14,0.22);
  overflow: hidden;
}
.m-sheet-wrap.open .m-sheet { transform: translateY(0); }
.m-grab { width: 38px; height: 4.5px; border-radius: 99px; background: var(--border-subtle); margin: 9px auto 4px; flex-shrink: 0; }

.sh-head { padding: 6px 20px 14px; border-bottom: 1px solid var(--border-hairline); flex-shrink: 0; }
.sh-head .sh-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sh-head h2 { font-weight: 700; font-size: 21px; line-height: 25px; letter-spacing: -0.04em; margin: 8px 0 0; text-wrap: pretty; }
.sh-close {
  width: 30px; height: 30px; border-radius: 999px; border: none; cursor: pointer; flex-shrink: 0;
  background: var(--button-default); color: var(--text-secondary); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .sh-close { background: rgba(255,255,255,0.1); }
.sh-moodrow { display: flex; align-items: center; gap: 11px; margin-top: 14px; }
.sh-moodrow .m-mood { flex: 1; min-width: 0; height: 10px; }
.sh-moodlabel { font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

/* cover image at the top of the sheet (modern bottom-sheet hero) */
.sh-cover { position: relative; height: 196px; flex-shrink: 0; overflow: hidden; background: var(--bg-surface); }
/* bottom of the cover dissolves into the sheet background — no hard seam */
.sh-cover-scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0) 24%, rgba(0,0,0,0) 42%, var(--bg-primary) 100%); }
.sh-cover .m-grab.on-cover { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); margin: 0; background: rgba(255,255,255,0.72); z-index: 3; }
/* close stays pinned while the whole sheet scrolls */
.sh-close.pinned { position: absolute; top: 12px; right: 14px; z-index: 12; width: 30px; height: 30px; border-radius: 999px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; background: rgba(0,0,0,0.45); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1px rgba(255,255,255,0.16); }
.sh-cover-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 20px 15px; z-index: 2; }
.sh-cover-kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.86); }
.sh-cover-title { font-weight: 700; font-size: 22px; line-height: 26px; letter-spacing: -0.04em; margin: 8px 0 0; color: #fff; text-shadow: 0 2px 22px rgba(0,0,0,0.45); text-wrap: pretty; }
.sh-moodbar { display: flex; align-items: center; gap: 11px; padding: 12px 20px; border-bottom: 1px solid var(--border-hairline); flex-shrink: 0; }
.sh-moodbar .ticks { display: inline-flex; align-items: center; }
.sh-moodbar .ticks i { border-radius: 2px; display: block; }

.sh-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0; -webkit-overflow-scrolling: touch; }
.sh-scroll::-webkit-scrollbar { width: 0; }
.sh-body { padding: 0 20px 28px; }

.sh-section-label { padding: 18px 0 4px; }
.sh-section-label, .s-head .m-kicker, .s-group .g-lbl { white-space: normal; }
.sh-fault { font-size: 15px; line-height: 21px; font-style: italic; color: var(--text-primary); letter-spacing: -0.02em; }

/* framing block */
.sh-frames-box { background: var(--bg-surface); border-radius: 12px; overflow: hidden; margin-top: 10px; }
.sh-frame { padding: 16px; }
.sh-frame + .sh-frame { border-top: 1px solid var(--border-hairline); }
.sh-frame .f-rule { height: 3px; width: 40px; border-radius: 99px; margin-bottom: 10px; }
.sh-frame h4 { font-weight: 700; font-size: 16px; line-height: 20px; letter-spacing: -0.03em; margin: 0 0 7px; color: var(--text-primary); }
.sh-frame p { font-size: 13.5px; line-height: 19px; color: var(--text-secondary); margin: 0 0 11px; }
.sh-frame blockquote { border-left: 2px solid var(--border-subtle); margin: 0 0 11px; padding: 1px 0 1px 11px; }
.sh-frame blockquote .q { font-size: 12.5px; font-style: italic; line-height: 18px; color: var(--text-secondary); }
.sh-frame .f-srcs { display: flex; align-items: center; gap: 9px; }

/* facts */
.sh-facts { display: flex; flex-direction: column; gap: 9px; }
.sh-fact { display: flex; gap: 9px; font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.sh-fact b { color: var(--mosaic-green); font-weight: 700; }
/* flexible markdown body (mobile) — same styling language as the web story page */
.mdbody .md-h { padding: 18px 0 4px; }
.mdbody .md-h:first-child { padding-top: 4px; }
.mdbody .md-p { font-size: 14px; line-height: 21px; color: var(--text-secondary); margin: 0 0 11px; }
.mdbody .md-p strong { color: var(--text-primary); font-weight: 600; }
.mdbody .md-q { border-left: 2px solid var(--border-subtle); margin: 3px 0 12px; padding: 1px 0 1px 11px; font-style: italic; color: var(--text-secondary); font-size: 13px; }
.mdbody .md-ul { margin: 0 0 11px; padding-left: 18px; }
.mdbody .md-ul li { font-size: 13.5px; line-height: 20px; color: var(--text-secondary); margin: 0 0 5px; }

/* per-source pills (STicks) inside the sheet */
.sh-moodrow .ticks { display: inline-flex; align-items: center; }
.sh-moodrow .ticks i { border-radius: 2px; display: block; }
/* full record grouped by framing */
.sh-recgroup { padding: 12px 0; border-top: 1px solid var(--border-hairline); }
.sh-recgroup:first-of-type { border-top: none; }
.sh-rec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sh-rec-head .f-rule { height: 3px; border-radius: 99px; flex-shrink: 0; }
.sh-rec-title { font-weight: 700; font-size: 13px; letter-spacing: -0.02em; color: var(--text-primary); line-height: 16px; }
.sh-rec-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.sh-rec-h { font-size: 12.5px; line-height: 16px; color: var(--text-secondary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   STAGE (two phones side by side)
   ============================================================ */
.stage {
  min-height: 100vh; width: 100%;
  display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; justify-content: center;
  padding: 56px 40px 80px;
  background:
    radial-gradient(1100px 540px at 18% -8%, rgba(0,170,71,0.05), transparent 60%),
    radial-gradient(1000px 520px at 92% 4%, rgba(255,194,0,0.06), transparent 60%),
    #F3EEE5;
}
.phone-col { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.phone-cap { text-align: center; max-width: 360px; }
.phone-cap .pc-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: #B06A2C;
}
.phone-cap h2 { font-family: var(--font-heading); font-weight: 700; font-size: 23px; letter-spacing: -0.04em; margin: 7px 0 5px; color: #27292D; }
.phone-cap p { font-size: 13px; line-height: 18px; color: #6A6D72; margin: 0; }
