/* CM Youth Association news: a phone-first news page.
   Colours come from the logo: CM red, YOUTH navy, and the four hand tones (used only for comment avatars).
   Type: Anek Telugu throughout; headlines use its narrow width for a news-desk feel. */
:root {
  color-scheme: light;
  --red: #E31E24;
  --navy: #262C6E;
  --navy-deep: #161A47;
  --ink: #14172F;
  --muted: #5B6077;
  --bg: #EEF0F5;
  --paper: #FFFFFF;
  --line: #E1E3EC;
  --field: #F5F6FA;
  --font: 'Anek Telugu', 'Noto Sans Telugu', 'Nirmala UI', system-ui, sans-serif;
  --narrow: 82%;
  --appw: 480px;
  --tabs-h: 62px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-tap-highlight-color: transparent;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: var(--navy); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.i { width: 22px; height: 22px; flex: none; fill: none; }

/* The page is a phone-width column; on a computer it sits in the middle of a navy screen. */
.app { max-width: var(--appw); margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
@media (min-width: 520px) {
  body { background: var(--navy-deep); }
  .app { box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
}

/* ---- masthead + headline ticker ---- */
.top { position: sticky; top: 0; z-index: 5; background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.top__bar { height: 60px; padding: 0 10px; display: flex; align-items: center; gap: 6px; }
.brand { flex: none; display: block; line-height: 0; margin-right: auto; } /* the logo keeps its shape; the row shrinks around it */
.brand__logo { height: 44px; width: auto; }
/* the Manifesto button, like a "LIVE" sign: red, its dot blinking and a soft red pulse around it; as tall as the logo */
.live {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px 0 12px; border-radius: 999px;
  background: var(--red); color: #fff; font-weight: 800; font-stretch: var(--narrow); font-size: 1.08rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap; animation: live-pulse 1.6s ease-out infinite;
}
.live i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: live-blink 1s steps(1) infinite; }
@keyframes live-blink { 50% { opacity: 0; } }
@keyframes live-pulse { from { box-shadow: 0 0 0 0 rgba(227, 30, 36, .55); } to { box-shadow: 0 0 0 10px rgba(227, 30, 36, 0); } }
.temple { flex: none; line-height: 0; } /* the temple picture left of the button (the temple promises), also opens the manifesto */
.temple img { height: 44px; width: auto; }
.lang {
  flex: none; display: flex; padding: 3px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--paper); cursor: pointer; font-size: .85rem; line-height: 1;
}
.lang span { padding: 6px 10px; border-radius: 999px; color: var(--muted); }
html[lang="te"] .lang [lang="te"], html[lang="en"] .lang [lang="en"] { background: var(--navy); color: #fff; font-weight: 700; }
/* phones: everything a little smaller, and the language switch shows only the language it switches to */
@media (max-width: 439px) {
  .brand__logo, .live, .temple img { height: 38px; }
  .live { padding: 0 10px 0 9px; font-size: .95rem; gap: 6px; }
  html[lang="te"] .lang [lang="te"], html[lang="en"] .lang [lang="en"] { display: none; }
  .lang span { padding: 7px 8px; background: var(--navy); color: #fff; font-weight: 700; }
}
@media (max-width: 374px) {
  .top__bar { gap: 4px; padding: 0 8px; }
  .brand__logo, .live, .temple img { height: 31px; }
  .live { padding: 0 8px 0 7px; font-size: .8rem; gap: 4px; }
  .live i { width: 8px; height: 8px; }
}

.ticker { display: flex; height: 36px; background: var(--navy); color: #fff; }
.ticker__label {
  position: relative; z-index: 1; flex: none; display: flex; align-items: center; padding: 0 10px 0 12px;
  background: var(--red); font-weight: 800; font-stretch: var(--narrow); font-size: .95rem;
}
.ticker__label::after { /* arrow tip */
  content: ''; position: absolute; left: 100%; top: 0;
  border-left: 10px solid var(--red); border-top: 18px solid transparent; border-bottom: 18px solid transparent;
}
.ticker__win { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; padding-left: 16px; }
.ticker__track { display: flex; white-space: nowrap; animation: tick var(--dur, 40s) linear infinite; }
.ticker__track a { color: #fff; text-decoration: none; font-size: .95rem; padding-right: 30px; }
.ticker__track a::before { content: '●'; color: var(--red); font-size: .6em; vertical-align: middle; margin-right: 10px; }
.ticker__win:hover .ticker__track, .ticker__win:focus-within .ticker__track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }

main { padding-bottom: calc(var(--tabs-h) + 24px + env(safe-area-inset-bottom)); overflow-x: clip; }
/* a swipe (or a tap on the tab bar) between Home, Posts, Jobs and Membership: the new one slides in from that side */
@keyframes slide-from-right { from { transform: translateX(35%); opacity: 0; } }
@keyframes slide-from-left { from { transform: translateX(-35%); opacity: 0; } }
.view.slide-l { animation: slide-from-right .22s ease-out; }
.view.slide-r { animation: slide-from-left .22s ease-out; }

/* ---- top-story banner: TV lower-third over the photo ---- */
.banner { position: relative; background: var(--navy-deep); }
.banner__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.banner__track::-webkit-scrollbar { display: none; }
.slide {
  position: relative; flex: 0 0 100%; aspect-ratio: 16 / 11; scroll-snap-align: start; overflow: hidden;
  color: #fff; text-decoration: none; background: var(--navy);
}
.slide > img, .slide > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide--text, .ig__card { background: linear-gradient(135deg, var(--navy) 0 62%, var(--red) 62% 64%, var(--navy-deep) 64%); }
.slide__plate {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 0 30px;
  background: linear-gradient(to top, rgba(14, 17, 52, .94) 0, rgba(14, 17, 52, .7) 55%, rgba(14, 17, 52, 0));
}
.slide__tag { display: inline-block; margin-left: 14px; padding: 1px 10px; background: var(--red); font-weight: 700; font-size: .85rem; line-height: 1.7; }
.slide__title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  margin: 6px 14px 0; padding-left: 10px; border-left: 4px solid var(--red);
  font-weight: 800; font-stretch: var(--narrow); font-size: 1.5rem; line-height: 1.38;
}
.banner__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.banner__dots span { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .45); transition: width .2s; }
.banner__dots span.on { width: 20px; background: var(--red); }

/* ---- feed: a lead story, then compact headline rows ---- */
.section-h {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 16px 16px 8px;
  font-weight: 800; font-stretch: var(--narrow); font-size: 1.2rem; line-height: 1.3; color: var(--navy);
}
.section-h::before { content: ''; width: 5px; height: 1.1em; background: var(--red); }
.feed { background: var(--paper); }
.item { padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item--lead .media img, .item--lead .media video, .item--lead .yt { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.item--lead .media img { background: var(--field); }
.item__link { display: block; padding: 12px 16px 0; color: inherit; text-decoration: none; }
.item__title { margin: 0; font-weight: 800; font-stretch: var(--narrow); font-size: 1.5rem; line-height: 1.35; }
.item__text {
  margin: 4px 0 0; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.row { display: grid; grid-template-columns: 1fr 112px; gap: 12px; padding: 14px 16px 0; color: inherit; text-decoration: none; }
.row__title {
  margin: 0; font-weight: 700; font-size: 1.08rem; line-height: 1.5;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.row__text {
  margin: 2px 0 0; color: var(--muted); font-size: .95rem; line-height: 1.55;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.row__thumb { width: 112px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--field); }
.row__thumb--play { display: grid; place-items: center; background: var(--navy); color: #fff; }
.item__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 8px 0 16px; }
.item__foot time { font-size: .85rem; color: var(--muted); }
.more { display: block; margin: 16px auto 0; }
.note { padding: 28px 20px; text-align: center; color: var(--muted); }
.note p { margin: 0 0 12px; }

/* ---- like / comment / share ---- */
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; } /* wraps on a narrow phone: Add to story drops to its own line */
.act {
  display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 10px;
  border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: .9rem; text-decoration: none; cursor: pointer;
}
.act:active { background: var(--field); }
.act--like[aria-pressed="true"] { color: var(--red); }
.act--like[aria-pressed="true"] .i { fill: currentColor; }
.post > .acts { padding: 4px 8px 8px; border-bottom: 1px solid var(--line); }
.act[disabled] { opacity: .6; cursor: progress; }
.act__n:empty { display: none; }
/* Add to story: WhatsApp's green, at the end of the row */
.act.act--story { margin-left: auto; gap: 5px; padding: 0 10px; min-height: 36px; background: #E7F8EE; color: #0B6B3A; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.act.act--story .i { width: 18px; height: 18px; color: #25D366; }
.ig .act.act--share, .ig .act.act--down { padding: 0 6px; }

/* ---- media ---- */
.media video { width: 100%; background: #000; }
.yt { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.yt img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.yt__play {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .4);
}
.yt__play .i { width: 30px; height: 30px; margin-left: 3px; }
.media--yt iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }

/* ---- one post ---- */
.back {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: 6px 4px; padding: 0 12px 0 6px;
  border: 0; border-radius: 999px; background: none; color: var(--navy); font-weight: 600; cursor: pointer;
}
.post { background: var(--paper); }
.post .media img, .post .media video { width: 100%; max-height: 72vh; object-fit: contain; }
.post .media img { background: var(--field); }
.post .media video { background: #000; }
.post__head { padding: 14px 16px 0; }
.post__title { margin: 0; font-weight: 800; font-stretch: var(--narrow); font-size: 1.75rem; line-height: 1.35; }
.post__head time { font-size: .85rem; color: var(--muted); }
.post__body { margin: 0; padding: 10px 16px 6px; white-space: pre-line; font-size: 1.1rem; line-height: 1.85; overflow-wrap: anywhere; }
.post__cmts { padding-bottom: 8px; }
.cform { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; padding: 4px 16px 10px; }
.cform textarea, .jform input, .jform textarea {
  width: 100%; font: inherit; color: inherit; background: var(--field);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.cform textarea { resize: vertical; min-height: 48px; }
.cform textarea:focus, .jform input:focus, .jform textarea:focus { outline: none; border-color: var(--navy); }
.cmts { list-style: none; margin: 0; padding: 0 16px; }
.cmt { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.cmt.note { display: block; }
.cmt p { margin: 0; }
.cmt__who time { font-size: .8rem; color: var(--muted); margin-left: 4px; }
.cmt__text { white-space: pre-line; overflow-wrap: anywhere; }
/* Avatars take the four hand colours of the logo. */
.ava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1rem; line-height: 1; }
.ava[data-tone="0"] { background: #8A4B22; color: #fff; }
.ava[data-tone="1"] { background: #F0C48D; color: #4A2A10; }
.ava[data-tone="2"] { background: #F5D05A; color: #4A3A05; }
.ava[data-tone="3"] { background: #E27B31; color: #fff; }
.gate { margin: 4px 16px 12px; padding: 14px 16px; border-radius: 10px; background: var(--field); border-left: 4px solid var(--red); }
.gate p { margin: 0 0 10px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  border: 1.5px solid var(--navy); border-radius: 10px; background: var(--navy); color: #fff;
  font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }

/* ---- join ---- */
.join { padding: 20px 18px; }
.join__title { margin: 0 0 6px; font-weight: 800; font-stretch: var(--narrow); font-size: 1.75rem; line-height: 1.35; color: var(--navy); }
.join > p { margin: 0 0 12px; }
.jform { display: grid; gap: 6px; margin: 18px 0 10px; padding: 16px; border-radius: 12px; background: var(--paper); border-top: 4px solid var(--red); }
.jform label { font-weight: 600; margin-top: 6px; }
.jform input { min-height: 50px; font-size: 1.1rem; }
.jform .btn { margin-top: 10px; }
.join__small { font-size: .88rem; color: var(--muted); margin: 0; }
.join__err:empty { display: none; }
.join__err { margin: 6px 0 0; color: var(--red); font-weight: 600; }
.join__phone { font: 700 1.3rem/1.4 var(--font); letter-spacing: .04em; }
.join .btn { width: 100%; margin-top: 10px; }

/* ---- bottom tabs ---- */
.tabs {
  position: fixed; z-index: 6; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, var(--appw));
  display: grid; grid-template-columns: repeat(3, 1fr); height: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 600; position: relative;
}
.tab[aria-current] { color: var(--navy); }
.tab[aria-current]::before { content: ''; position: absolute; top: 0; width: 40px; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
/* Posts is the main door: its icon sits in a red circle that rises above the bar, whichever tab is open. */
.tab--posts { color: var(--navy); font-weight: 800; }
.tab--posts .i { width: 46px; height: 46px; padding: 11px; margin-top: -20px; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 0 0 4px var(--paper), 0 4px 10px rgba(0, 0, 0, .22); }
.tab--posts[aria-current]::before { display: none; }

/* ---- toast ---- */
.toast {
  position: fixed; z-index: 7; left: 50%; bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px); width: max-content; max-width: min(90vw, 420px); margin: 0; padding: 10px 16px;
  border-radius: 10px; background: var(--navy-deep); color: #fff; font-size: .95rem; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .ticker__track, .live, .live i { animation: none; }
  .ticker__win { overflow-x: auto; scrollbar-width: none; }
}

/* ======================= village platform pages ======================= */

/* ---- home: the message, three big doors, quick links, mission ---- */
.hero { position: relative; padding: 20px 18px 22px; background: var(--navy); color: #fff; }
.hero::after { /* the logo's four hand colours as a thin strip */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: linear-gradient(90deg, #8A4B22 0 25%, #F0C48D 25% 50%, #F5D05A 50% 75%, #E27B31 75%);
}
.hero__title { margin: 0; font-weight: 800; font-stretch: var(--narrow); font-size: 2.25rem; line-height: 1.25; }
.hero__lead { margin: 8px 0 0; line-height: 1.65; color: rgba(255, 255, 255, .9); }

.tiles { display: grid; gap: 10px; padding: 14px 12px 4px; }
.tile {
  display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 12px 16px; border-radius: 14px;
  color: #fff; text-decoration: none;
}
.tile .i { width: 40px; height: 40px; }
.tile b { display: block; font-weight: 800; font-stretch: var(--narrow); font-size: 1.6rem; line-height: 1.25; }
.tile small { display: block; font-size: 1rem; opacity: .92; }
.tile--posts { background: var(--navy); }
.tile--jobs { background: var(--red); }
.tile--join { background: var(--paper); color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.tile--join .i { color: var(--red); }
.tile:active { transform: scale(.99); }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px 16px; }
.quick a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px;
  border-radius: 12px; background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; text-align: center; font-size: .88rem; font-weight: 600; line-height: 1.35;
}
.quick .i { width: 26px; height: 26px; color: var(--red); }
.quick--inset { grid-template-columns: 1fr 1fr; padding: 12px 0 4px; }

.mission { margin: 20px 12px 8px; padding: 18px 16px; border-radius: 14px; background: var(--paper); border-top: 4px solid var(--red); }
.mission h2 { margin: 0 0 6px; font-weight: 800; font-stretch: var(--narrow); font-size: 1.4rem; line-height: 1.4; color: var(--navy); }
.mission p { margin: 0 0 10px; }
.mission__cta { font-weight: 700; color: var(--red); }
.mission .btn { width: 100%; }

/* ---- page heads ---- */
.page-head { padding: 18px 16px 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; font-weight: 800; font-stretch: var(--narrow); font-size: 1.9rem; line-height: 1.3; color: var(--navy); }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .page-head__sub { margin: 0 0 6px; font-weight: 700; color: var(--red); }

/* ---- posts: an Instagram-style feed ---- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* for screen readers only */
.ig { background: var(--paper); }
.ig__post { padding-bottom: 18px; }
.ig__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; line-height: 1.3; }
.ig__head b { display: block; font-size: .98rem; }
.ig__head small { display: block; font-size: .8rem; color: var(--muted); }
.ig__ava { /* the round badge inside a story ring in the logo's colours */
  flex: none; width: 42px; height: 42px; padding: 2px; border: 2px solid transparent; border-radius: 50%;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(45deg, #F5D05A, #E27B31, var(--red), var(--navy)) border-box;
}
.ig__shot { position: relative; background: var(--field); touch-action: manipulation; -webkit-user-select: none; user-select: none; }
/* Pictures keep their own shape, at most 4:5 tall like Instagram; a taller poster is shown whole. */
.ig__shot img, .ig__shot video, .ig .media video { width: 100%; max-height: calc(min(100vw, var(--appw)) * 1.25); object-fit: contain; }
/* Home: a tap on the picture opens the post in Posts; a video waits there as a still with a play button */
#feed .ig__shot { cursor: pointer; }
.ig__shot--play { background: #000; }
.ig__shot--play video { display: block; background: #000; }
.ig__card { /* a post without a picture: its headline on the brand card */
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1; margin: 0; padding: 28px 24px;
  color: #fff; text-align: center; overflow-wrap: anywhere;
  font-weight: 800; font-stretch: var(--narrow); font-size: 1.85rem; line-height: 1.35;
}
.ig__burst { position: absolute; inset: 0; width: 100px; height: 100px; margin: auto; color: #fff; pointer-events: none; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .35)); }
.ig__burst .i { width: 100%; height: 100%; fill: currentColor; }
.ig .acts { padding: 2px 4px 0; }
.ig .act { padding: 0 8px; color: var(--ink); font-size: .95rem; font-weight: 600; }
.ig .act--like[aria-pressed="true"] { color: var(--red); }
.ig .act .i { width: 26px; height: 26px; }
.ig__cap { padding: 0 14px; }
.ig__title { display: block; color: inherit; text-decoration: none; font-weight: 700; line-height: 1.5; }
.ig__body { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.ig__body--cut { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ig__more { min-height: 32px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.ig__time { display: block; padding: 2px 14px 0; font-size: .8rem; color: var(--muted); }

/* ---- status pills (problems) and labelled blocks (job interview details) ---- */
.status { flex: none; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; line-height: 1.8; background: var(--field); color: var(--muted); white-space: nowrap; }
.status[data-status="seen"] { background: #FFF1DD; color: #8A4500; }
.status[data-status="done"] { background: #E2F4E7; color: #1E6B34; }
.status[data-status="new"] { background: #FDE3E4; color: #B0151B; }
.block { margin-top: 10px; padding: 8px 12px; border-left: 4px solid var(--red); background: var(--field); border-radius: 0 8px 8px 0; }
.block--plan { border-left-color: var(--navy); }
.block__label { margin: 0; font-size: .85rem; font-weight: 700; color: var(--red); }
.block--plan .block__label { color: var(--navy); }
.block__text { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.inset { margin: 0 16px 10px; }
.wide { display: flex; gap: 6px; width: calc(100% - 24px); margin: 14px 12px 0; }

/* ---- jobs portal ---- */
.callout { display: flex; gap: 12px; align-items: flex-start; margin: 12px; padding: 14px; border-radius: 12px; background: var(--paper); border: 2px dashed var(--red); color: var(--ink); text-decoration: none; }
.callout .i { width: 28px; height: 28px; color: var(--red); }
.callout b { display: block; font-size: 1.08rem; color: var(--navy); }
.callout p { margin: 2px 0 0; font-size: .92rem; color: var(--muted); }
.callout--ok { border: 1px solid var(--line); }
.callout--ok .i { color: #1E6B34; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 10px; }
.filters select, .jform select {
  width: 100%; min-height: 46px; padding: 0 10px; font: inherit; color: inherit;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
}
.jform select { min-height: 50px; background: var(--field); }
.jobs { display: grid; gap: 10px; padding: 0 12px; }
.job { background: var(--paper); border-radius: 12px; border-left: 4px solid var(--navy); }
.job--closed { border-left-color: var(--line); }
.job--closed .job__main { opacity: .7; }
.job__main { display: block; padding: 12px 14px 4px; color: inherit; text-decoration: none; }
.job__title { margin: 0; font-weight: 800; font-size: 1.15rem; line-height: 1.45; }
.job__org { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.job__org .i, .job__date .i { width: 17px; height: 17px; }
.job__org span + .i { margin-left: 6px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.facts li { padding: 2px 10px; border-radius: 8px; background: var(--field); font-size: .88rem; }
.facts li span { margin-right: 4px; color: var(--muted); }
.job__date { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: .9rem; font-weight: 600; color: var(--red); }
.job__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; padding: 6px 8px 10px 14px; }
.badge, .job__applied, .job__closed, .btn--sm { white-space: nowrap; }
.job__acts { display: flex; align-items: center; gap: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700; color: #1E6B34; }
.badge .i { width: 16px; height: 16px; }
.job__applied { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #1E6B34; }
.job__applied .i { width: 18px; height: 18px; }
.job__closed { font-size: .88rem; font-weight: 700; color: var(--muted); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.post__job { padding: 0 16px 6px; }
.post__job .job__foot { padding: 10px 0 0; }

/* ---- problems ---- */
.plist { display: grid; gap: 10px; }
.pitem { padding: 12px 14px; border-radius: 12px; background: var(--paper); }
.pitem__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pitem__loc { display: flex; align-items: center; gap: 4px; margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.pitem__loc .i { width: 16px; height: 16px; }
.pitem__body { margin: 6px 0 2px; white-space: pre-line; overflow-wrap: anywhere; }
.pitem time { font-size: .8rem; color: var(--muted); }
.pitem__note { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #E9ECF8; white-space: pre-line; overflow-wrap: anywhere; }
/* manifesto: promises grouped by subject */
.mlist { display: grid; gap: 10px; padding: 12px 12px 0; }
.mgroup__h { margin: 10px 0 0; font-weight: 800; font-stretch: var(--narrow); font-size: 1.25rem; color: var(--navy); }
.mtext { padding: 16px; border-radius: 14px; background: var(--paper); border-top: 4px solid var(--red); }
.mtext--end { border-top-color: var(--navy); margin-bottom: 12px; }
.mtext__h { margin: 0 0 10px; font-weight: 800; font-stretch: var(--narrow); font-size: 1.35rem; line-height: 1.45; color: var(--navy); }
.mtext p { margin: 0 0 10px; overflow-wrap: anywhere; }
.mtext p:last-child { margin-bottom: 0; }
.mitem__t { display: flex; gap: 6px; }
.mitem__n { flex: none; color: var(--red); }
.status[data-status="plan"] { background: #E9ECF8; color: #2B3A8C; }
.status[data-status="progress"] { background: #FFF1DD; color: #8A4500; }
.section-h.flush { padding: 18px 0 8px; }

/* ---- membership + ID card ---- */
.perks { list-style: none; display: grid; gap: 4px; margin: 10px 0 0; padding: 0; }
.perks li { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.perks .i { width: 20px; height: 20px; color: var(--red); }
.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; font-size: .92rem; line-height: 1.55; }
.jform .check { font-weight: 400; }
.check input { flex: none; width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--navy); }
.memno { margin: 0 0 4px; font-weight: 800; color: var(--red); font-size: 1.1rem; }
.idcard { width: 100%; height: auto; aspect-ratio: 1012 / 638; border-radius: 14px; background: var(--field); box-shadow: 0 6px 24px rgba(22, 26, 71, .25); }
.cardbtns { display: flex; gap: 8px; }
.cardbtns .btn { flex: 1; gap: 6px; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 4px; padding: 14px; border-radius: 12px; background: var(--paper); }
.details dt { color: var(--muted); font-size: .92rem; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.join .btn--ghost { width: 100%; }

/* four bottom tabs */
.tabs { grid-template-columns: repeat(4, 1fr); }

/* home poster: full width of the column, right under the main message */
.hero__poster { position: relative; overflow: hidden; margin: 6px -18px 4px; padding-top: 50px; } /* the top 50px: the ambulance's road */
.hero__poster::before { /* the road: dark tarmac with white dashes, right on the poster's top edge */
  content: ''; position: absolute; left: 0; right: 0; top: 44px; height: 6px; background:
    repeating-linear-gradient(90deg, #fff 0 14px, transparent 14px 28px) center / 100% 2px no-repeat, #3a3f4b;
}
.hero__img { display: block; width: 100%; max-width: none; height: auto; }
/* the toy ambulance on the road above the poster, pulling the slogan as a ribbon; app.js moves it frame by frame (driving,
   dragging, flicks), turns the wheels, tilts and bobs the body, waves the ribbon and flashes the siren */
.amb {
  position: absolute; z-index: 1; top: 0; left: 0; height: 48px; display: flex; align-items: center; transform: translateX(-100vw);
  will-change: transform; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: grab;
}
.amb.is-grab { cursor: grabbing; }
.amb__car { flex: none; width: 90px; line-height: 0; transform-origin: 22% 92%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); outline-offset: 2px; }
.amb__car svg { display: block; width: 100%; height: auto; overflow: visible; }
.amb.is-grab .amb__car { filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4)); } /* lifted a little while held */
.amb__ribbon {
  display: flex; align-items: center; margin-top: 2px; color: #fff; text-decoration: none; white-space: nowrap; transform-origin: 100% 50%;
  font-weight: 800; font-stretch: var(--narrow); font-size: 1.08rem; line-height: 1.2; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4));
  -webkit-user-drag: none;
}
.amb__ribbon span { /* one word: the ribbon waves word by word */
  display: block; padding: 8px 4px; background: var(--red); box-shadow: inset 0 3px 0 #ffd34d, inset 0 -3px 0 #ffd34d; will-change: transform;
}
.amb__ribbon span:first-child { padding-left: 20px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12px 50%); } /* the notched tail */
.amb__ribbon span:last-child { padding-right: 10px; }
.amb__rope { flex: none; width: 12px; height: 2px; margin-top: 6px; background: #e8e8e8; }
.amb--b .amb__red, .amb:not(.amb--b) .amb__blue { opacity: .2; } /* red and blue take turns */
.amb--b .amb__red.amb__halo, .amb:not(.amb--b) .amb__blue.amb__halo { opacity: 0; }
/* S/o · D/o · W/o picker + name */
.relrow { display: grid; grid-template-columns: 88px 1fr; gap: 8px; }

/* the profile's "verify your number" card (a .callout): code box + Verify on one row */
.callout > div { flex: 1; min-width: 0; }
.join .callout { margin: 14px 0 4px; }
.callout .join__err { color: var(--red); }
.vrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 8px 0 0; }
.vrow input {
  width: 100%; min-height: 44px; padding: 0 12px; font: inherit; font-size: 1.15rem; letter-spacing: .25em; color: inherit;
  background: var(--field); border: 1.5px solid var(--line); border-radius: 10px;
}
.vrow input:focus { outline: none; border-color: var(--navy); }
.join .vrow .btn { width: auto; margin-top: 0; }

/* ---- Posts tab: full screen, one post per screen, like Instagram Reels (html.reel is set while Posts is open) ----
   The masthead is hidden and the page itself does not scroll: the posts scroll in their own black box above the bottom tabs, so
   the phone's address bar stays put and every post is exactly that box tall. A swipe stops on the next post. */
html.reel .app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; background: #000; }
html.reel .top { display: none; }
html.reel main { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
html.reel #view-posts {
  flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; position: relative;
  scroll-snap-type: y mandatory; container-type: size; background: #000; scrollbar-width: none;
}
html.reel #view-posts::-webkit-scrollbar { display: none; }
html.reel #more-posts { scroll-snap-align: end; margin: 16px auto; color: #fff; border-color: rgba(255, 255, 255, .35); }
.ig--reel { background: #000; color: #fff; }
.ig--reel .note { color: rgba(255, 255, 255, .75); }

/* One post: the picture fills it, whole (never cut), on black; the rest lies over it. */
.ig--reel .ig__post {
  position: relative; overflow: hidden; padding: 0; background: #000;
  scroll-snap-align: start; scroll-snap-stop: always;
  height: calc(100dvh - var(--tabs-h) - env(safe-area-inset-bottom)); /* browsers without container units */
  height: 100cqh;
}
.ig--reel .ig__shot, .ig--reel .media--yt { position: absolute; inset: 0; background: #000; }
.ig--reel .ig__shot img, .ig--reel .ig__shot video { width: 100%; height: 100%; max-height: none; object-fit: contain; background: #000; }
.ig--reel .ig__card { position: absolute; inset: 0; aspect-ratio: auto; padding: 84px 76px 170px; font-size: 2rem; }
.ig--reel .media--yt { display: flex; align-items: center; }
.ig--reel .media--yt .yt, .ig--reel .media--yt iframe { width: 100%; }
.ig--reel .ig__shot--video .yt__play { display: none; pointer-events: none; }
.ig--reel .ig__shot--video.is-paused .yt__play { display: grid; } /* the play sign while a video is paused */
/* a soft shade at the bottom so the caption reads on any picture; the whole picture darkens while the caption is open */
.ig--reel .ig__post::after {
  content: ''; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 45%; pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6)); transition: height .2s, background-color .2s;
}
.ig--reel .ig__post--open::after { height: 100%; background-color: rgba(0, 0, 0, .55); }

/* who posted: over the top of the picture (taps go through to it) */
.ig--reel .ig__head {
  position: absolute; z-index: 2; top: 0; left: 0; right: 0; padding: max(12px, env(safe-area-inset-top)) 64px 30px 12px;
  background: linear-gradient(rgba(0, 0, 0, .5), transparent); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); pointer-events: none;
}
.ig--reel .ig__head small { color: rgba(255, 255, 255, .85); }
.ig--reel .ig__ava { width: 38px; height: 38px; }
.ig__sound {
  position: absolute; z-index: 3; top: max(12px, env(safe-area-inset-top)); right: 10px; width: 40px; height: 40px;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25);
}
.ig__sound .i { width: 24px; height: 24px; }

/* like · comment · share · download · add to story: down the right side, white */
.ig--reel .acts {
  position: absolute; z-index: 2; right: 4px; bottom: 34px; width: 66px; padding: 0;
  flex-direction: column; flex-wrap: nowrap; align-items: center; gap: 4px;
}
.ig--reel .act, .ig--reel .act.act--share, .ig--reel .act.act--down, .ig--reel .act.act--story {
  flex-direction: column; gap: 0; min-height: 0; margin: 0; padding: 5px 4px; border-radius: 12px; background: none;
  color: #fff; font-size: .85rem; font-weight: 700; line-height: 1.25; text-align: center; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}
.ig--reel .act .i { width: 30px; height: 30px; }
.ig--reel .act--like[aria-pressed="true"] { color: var(--red); }
.ig--reel .act:active { background: rgba(255, 255, 255, .15); }
.ig--reel .act.act--story { max-width: 66px; gap: 3px; font-size: .68rem; white-space: normal; }
.ig--reel .act.act--story .i { color: #25D366; }

/* the caption: title, one line of text and "more"; open, all of it over the picture (scrolls when very long) */
.ig--reel .ig__cap {
  position: absolute; z-index: 2; left: 0; right: 70px; bottom: 0; max-height: 72%; overflow: hidden;
  padding: 0 4px 34px 14px; /* clear of the red Posts button that rises above the tab bar */
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6); cursor: pointer;
}
.ig--reel .ig__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 1.05rem; }
.ig__line { display: flex; align-items: baseline; gap: 6px; }
.ig--reel .ig__body { flex: 1; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig--reel .ig__more { display: none; flex: none; min-height: 28px; color: rgba(255, 255, 255, .8); font-weight: 700; }
.ig--reel .ig__post--more .ig__more { display: block; }
.ig--reel .ig__time { padding: 2px 0 0; color: rgba(255, 255, 255, .75); }
.ig--reel .ig__post--open .ig__cap { overflow-y: auto; }
.ig--reel .ig__post--open .ig__title { display: block; }
.ig--reel .ig__post--open .ig__body { white-space: pre-line; overflow: visible; }
.ig--reel .ig__post--open .ig__more { display: none; }

/* the video's progress line along the bottom, as on Instagram: thin while it plays; pressed or dragged, thicker with a dot and the time */
.ig__bar {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 22px; display: flex; align-items: flex-end;
  touch-action: none; cursor: pointer;
}
.ig__bar span { position: relative; flex: 1; height: 4px; background: rgba(255, 255, 255, .3); transition: height .15s; }
.ig__bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--red); }
.ig__bar i::after {
  content: ''; position: absolute; right: -8px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
  background: var(--red); transform: scale(0); transition: transform .15s;
}
.ig__bar.is-drag span { height: 8px; }
.ig__bar.is-drag i::after { transform: scale(1); }
.ig__bar b {
  position: absolute; left: 0; right: 0; bottom: 64px; text-align: center; font-size: 1.7rem; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .7); opacity: 0; transition: opacity .15s; pointer-events: none;
}
.ig__bar.is-drag b { opacity: 1; }
.ig__post:has(.ig__bar.is-drag) :is(.ig__cap, .acts, .ig__head, .ig__sound, .yt__play) { opacity: 0; transition: opacity .15s; }
