/* Layout: one reading column on a cool "register paper" ground; ink-blue header like a society
   letterhead, marigold used only for numbers, seals and the active state. */
:root {
  --ink: #16233b;          /* letterhead / hero band */
  --ink-2: #22355a;
  --on-ink: #f4f6fb;
  --on-ink-muted: #b4c0d6;
  --paper: #eef1f5;        /* page ground, cool grey with a blue bias */
  --surface: #ffffff;
  --text: #17202f;
  --muted: #5a6478;
  --line: #dce1e9;
  --marigold: #c98512;     /* accent: numbers, seals, active */
  --marigold-hi: #f0b23f;  /* accent on the ink band */
  --marigold-soft: #fbf0d9;
  --link: #1f5aa0;
  --mark: #ffe08a;
  --ok: #217a52;
  --ok-soft: #e0f2e9;
  --warn: #a35d00;
  --warn-soft: #fdebd0;
  --info: #2b5b9c;
  --info-soft: #e3ecf8;
  --shadow: 0 1px 2px rgba(22, 35, 59, .06), 0 4px 14px rgba(22, 35, 59, .06);

  --display: "Tiro Devanagari Marathi", "Tiro Devanagari Hindi", "Noto Serif Devanagari", Georgia, serif;
  --body: "Mukta", "Noto Sans Devanagari", "Nirmala UI", system-ui, sans-serif;
  --legal: "Tiro Devanagari Marathi", Georgia, "Times New Roman", serif;

  --fs: 17px;
  --radius: 14px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #0b1222; --ink-2: #172440; --on-ink: #eef2f9; --on-ink-muted: #9fb0cc;
    --paper: #0f1522; --surface: #172033; --text: #e6ebf3; --muted: #9ba6ba; --line: #27324a;
    --marigold: #f0b23f; --marigold-hi: #f5c060; --marigold-soft: #33290f;
    --link: #8db9f2; --mark: #6b5414;
    --ok: #6fd3a2; --ok-soft: #173327; --warn: #f2b25c; --warn-soft: #3a2a12; --info: #8db9f2; --info-soft: #1b2a45;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #0b1222; --ink-2: #172440; --on-ink: #eef2f9; --on-ink-muted: #9fb0cc;
  --paper: #0f1522; --surface: #172033; --text: #e6ebf3; --muted: #9ba6ba; --line: #27324a;
  --marigold: #f0b23f; --marigold-hi: #f5c060; --marigold-soft: #33290f;
  --link: #8db9f2; --mark: #6b5414;
  --ok: #6fd3a2; --ok-soft: #173327; --warn: #f2b25c; --warn-soft: #3a2a12; --info: #8db9f2; --info-soft: #1b2a45;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
html[lang="hi"] { --display: "Tiro Devanagari Hindi", "Tiro Devanagari Marathi", "Noto Serif Devanagari", Georgia, serif; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--text);
  font: 400 var(--fs)/1.6 var(--body);
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--ink);
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--marigold); outline-offset: 2px; border-radius: 6px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 8;
  background: var(--ink); color: var(--on-ink);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 10px 12px;
}
.top-row { display: flex; align-items: center; gap: 10px; max-width: 820px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-ink); text-decoration: none; flex: 1; min-width: 0; }
.brand-mark { width: 30px; height: 30px; flex: none; stroke: none; }
.brand-mark rect { fill: var(--on-ink); }
.brand-mark .win { fill: var(--ink); }
.brand-mark .book { fill: var(--marigold-hi); }
.brand-text { font: 400 1.18em/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 3px; }
.icon-btn {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .08); border: 0; border-radius: 10px; color: var(--on-ink);
  transition: background .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn svg { width: 22px; height: 22px; }
.seg { display: flex; background: rgba(255, 255, 255, .08); border-radius: 10px; padding: 3px; flex: none; }
.seg button {
  border: 0; background: transparent; color: var(--on-ink-muted); cursor: pointer;
  min-width: 34px; height: 30px; border-radius: 8px; font-weight: 600; font-size: .82em; padding: 0 6px;
  transition: background .25s var(--ease), color .25s;
}
.seg button[aria-pressed="true"] { background: var(--marigold-hi); color: var(--ink); }
.search {
  position: relative; max-width: 820px; margin: 10px auto 0;
}
.search > svg { position: absolute; left: 13px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; border: 0; border-radius: 12px; padding: 12px 42px 12px 42px;
  font: 400 1em/1.3 var(--body); background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .2s;
}
.search input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--marigold-hi); }
.search input::-webkit-search-cancel-button { display: none; }
.clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.clear svg { width: 18px; height: 18px; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 100%; background: var(--marigold-hi); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- main column ---------- */
main {
  max-width: 820px; margin: 0 auto; outline: none; overflow-wrap: anywhere;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 18px 28px;
}
h1, h2, h3 { text-wrap: balance; }
h1 { font: 400 1.55em/1.3 var(--display); margin: 0 0 .35em; }
.sec-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font: 600 .78em/1.2 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  margin: 28px 0 10px;
}
.meta { color: var(--muted); font-size: .9em; margin: 0; }
.stack { display: grid; gap: 10px; }

/* page enter animation: content is visible at rest, it only rises slightly */
.enter > * { animation: rise .42s var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: .04s; }
.enter > *:nth-child(3) { animation-delay: .08s; }
.enter > *:nth-child(4) { animation-delay: .12s; }
.enter > *:nth-child(n+5) { animation-delay: .16s; }
.stagger > * { animation: rise .4s var(--ease) both; animation-delay: calc(min(var(--i, 0), 12) * 28ms); }
@keyframes rise { from { opacity: .001; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; color: var(--on-ink);
  background:
    radial-gradient(120% 90% at 100% 0%, var(--ink-2) 0%, transparent 60%),
    var(--ink);
  padding: 22px 20px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center;
}
.hero::after { /* fine guilloche lines, like a share certificate border */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
  background: repeating-radial-gradient(circle at 100% 0, var(--on-ink) 0 1px, transparent 1px 9px);
}
.kicker { font: 600 .74em/1.4 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--marigold-hi); margin: 0 0 6px; }
.hero h1 { font-size: clamp(1.45em, 4.6vw, 2.05em); line-height: 1.22; margin: 0 0 8px; color: var(--on-ink); }
.hero p { margin: 0; color: var(--on-ink-muted); font-size: .95em; max-width: 46ch; }
.seal { width: 118px; height: 118px; position: relative; z-index: 1; }
.seal .ring { animation: spin 48s linear infinite; transform-origin: 60px 60px; }
.seal text { font: 600 8.4px/1 "Mukta", system-ui, sans-serif; letter-spacing: .4px; fill: var(--marigold-hi); stroke: none; }
.seal circle { stroke: var(--marigold-hi); }
.seal .core { fill: var(--marigold-hi); stroke: none; }
.seal .core-win { fill: var(--ink); stroke: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.stat { border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 8px; }
.stat b { display: block; font: 400 1.7em/1.1 var(--display); color: var(--on-ink); font-variant-numeric: tabular-nums; }
.stat span { font-size: .74em; color: var(--on-ink-muted); line-height: 1.3; display: block; }

/* ---------- topic tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; text-decoration: none; color: var(--text); display: grid; gap: 2px;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--marigold); }
.tile:active { transform: scale(.98); }
.tile b { font-weight: 600; line-height: 1.3; }
.tile small { color: var(--marigold); font-weight: 600; font-size: .78em; font-variant-numeric: tabular-nums; }

/* ---------- list panels (bye-laws, chapters, forms) ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) 18px; gap: 12px; align-items: start;
  padding: 14px 14px 14px 10px; text-decoration: none; color: var(--text);
  border-top: 1px solid var(--line); position: relative; transition: background .2s;
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--marigold-soft); }
.row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--marigold); transform: scaleY(0); transition: transform .25s var(--ease); }
.row:hover::before { transform: scaleY(1); }
.num { font: 400 1.45em/1.1 var(--display); color: var(--marigold); text-align: center; font-variant-numeric: tabular-nums; padding-top: 2px; }
.num small { display: block; font: 600 .42em/1.4 var(--body); letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.row-t { font-weight: 600; line-height: 1.35; display: block; }
.row-s { color: var(--muted); font-size: .9em; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.chev { width: 18px; height: 18px; color: var(--muted); margin-top: 4px; transition: transform .25s var(--ease); }
.row:hover .chev { transform: translateX(3px); color: var(--marigold); }
.roman {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto;
  border: 1.5px solid var(--marigold); color: var(--marigold); font: 400 .82em/1 var(--display);
}
.bar { height: 4px; border-radius: 4px; background: var(--line); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--marigold); border-radius: 4px; transform-origin: 0 50%; animation: grow .7s var(--ease) both .15s; }
@keyframes grow { from { transform: scaleX(.02); } }

/* ---------- bye-law detail ---------- */
.crumb { font-size: .88em; margin: 0 0 14px; }
.law-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: end; margin-bottom: 16px; }
.big-no { font: 400 3.4em/0.9 var(--display); color: var(--marigold); font-variant-numeric: tabular-nums; position: relative; padding-bottom: 8px; }
.big-no::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--marigold); border-radius: 3px; transform-origin: 0 50%; animation: grow .6s var(--ease) both .2s; }
.law-head .eyebrow { font: 600 .74em/1.3 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.law-head h1 { margin: 2px 0 0; font-size: 1.45em; }
.law-head .sub { grid-column: 1 / -1; margin-top: 8px; }
.summary {
  background: var(--marigold-soft); border-radius: var(--radius); padding: 16px 18px; position: relative;
}
.summary .label { font: 600 .74em/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--marigold); margin-bottom: 6px; display: block; }
.summary p { margin: 0; font-size: 1.04em; line-height: 1.7; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-size: .9em; font-weight: 500;
  transition: border-color .2s, background .2s, transform .15s;
}
.btn:hover { border-color: var(--marigold); }
.btn:active { transform: scale(.96); }
.btn svg { width: 17px; height: 17px; }
.btn.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.on svg { fill: var(--marigold-hi); stroke: var(--marigold-hi); }
.fb-link { margin: 18px 0 0; font-size: .92em; }
.fb-link a { display: inline-flex; align-items: center; gap: 7px; }
.fb-link svg { width: 17px; height: 17px; }
.fb-card select, .fb-card textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px;
}
.fb-card textarea { resize: vertical; min-height: 130px; }
.fb-card input[type=text], .fb-card input[type=number] {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px;
}
.fb-card label { display: block; font-weight: 600; font-size: .9em; margin-bottom: 4px; }
.fb-card .phone-row input { margin-bottom: 0; flex: 1; min-width: 0; }
.fb-card .phone-row .btn { flex: none; white-space: nowrap; }
.fb-card .phone-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.visits { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .9em; margin: 12px 0 0; }
.visits svg { width: 18px; height: 18px; fill: none; stroke: var(--marigold); stroke-width: 1.8; }
.admin-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.astat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; }
.astat b { font: 600 1.7em/1.1 var(--display, inherit); color: var(--marigold); }
.astat span { color: var(--muted); font-size: .85em; }
.days { display: grid; gap: 6px; }
.day { display: grid; grid-template-columns: 48px minmax(0, 1fr) 56px; align-items: center; gap: 8px; font-size: .85em; }
.day i { display: block; height: 10px; border-radius: 6px; background: var(--marigold); }
.day b { text-align: right; }
.admin-list { display: grid; gap: 10px; }
.sugg .event-top { flex-wrap: wrap; gap: 8px; }
.sugg-text { white-space: pre-wrap; margin: 8px 0 4px; }
.sugg.done { opacity: .55; }
.sugg .actions { margin: 8px 0 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.admin-table { border-collapse: collapse; width: 100%; font-size: .82em; }
.admin-table th, .admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.admin-table th { color: var(--muted); font-weight: 600; }
.fb-card select:focus, .fb-card textarea:focus { outline: 2px solid var(--marigold); outline-offset: 1px; }
.pop svg { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.45) rotate(-12deg); } }
details.legal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.legal summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; font-weight: 600;
}
details.legal summary::-webkit-details-marker { display: none; }
details.legal summary svg { width: 18px; height: 18px; transition: transform .3s var(--ease); flex: none; }
details.legal[open] summary svg { transform: rotate(180deg); }
.legal-body { padding: 0 18px 16px; font: 400 .97em/1.7 var(--legal); border-top: 1px solid var(--line); }
.legal-body p { margin: .7em 0 0; max-width: 70ch; }
.legal-body h4 { font: 600 .95em/1.4 var(--body); margin: 1.2em 0 0; color: var(--muted); }
.legal-body .item { padding-left: 1.6em; text-indent: -1.6em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none;
  border-radius: 999px; padding: 6px 14px; font-size: .9em; transition: border-color .2s, transform .15s;
}
.chip:hover { border-color: var(--marigold); }
.chip:active { transform: scale(.96); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.pager a {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; text-decoration: none; color: var(--text); min-width: 0; transition: border-color .2s, transform .2s var(--ease);
}
.pager a:hover { border-color: var(--marigold); }
.pager a.next { text-align: right; }
.pager a.prev:hover { transform: translateX(-2px); }
.pager a.next:hover { transform: translateX(2px); }
.pager small { display: block; color: var(--marigold); font-weight: 600; font-size: .78em; }
.pager span { display: block; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- timeline (updates) ---------- */
.note { background: var(--info-soft); color: var(--text); border-radius: var(--radius); padding: 12px 16px; font-size: .92em; margin: 0 0 18px; }
.timeline { position: relative; display: grid; gap: 16px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.event { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.event::before {
  content: ""; position: absolute; left: -24px; top: 18px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--marigold);
}
.event:first-child::before { background: var(--marigold); box-shadow: 0 0 0 0 var(--marigold); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201, 133, 18, .45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(201, 133, 18, 0); } }
.event-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.date { font: 400 1.1em/1 var(--display); color: var(--marigold); }
.pill { font-size: .72em; font-weight: 600; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--info); }
.event h3 { font: 600 1.02em/1.4 var(--body); margin: 0 0 6px; }
.event .body { white-space: pre-line; margin: 0; font-size: .95em; }
.event .src { margin-top: 10px; font-size: .82em; color: var(--muted); }

/* ---------- forms, about, misc ---------- */
.badge { display: inline-block; font: 600 .74em/1 var(--body); color: var(--marigold); border: 1px solid var(--marigold); border-radius: 6px; padding: 5px 7px; white-space: nowrap; }
.form-row { grid-template-columns: 92px minmax(0, 1fr); }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.empty svg { width: 54px; height: 54px; color: var(--marigold); margin-bottom: 8px; }
.about-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.about-block p { margin: 0 0 .7em; }
.about-block p:last-child { margin-bottom: 0; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.setting + .setting { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.seg.light { background: var(--paper); }
.seg.light button { color: var(--muted); height: 34px; min-width: 64px; font-size: .9em; }
.seg.light button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.disclaimer { border-left: 3px solid var(--warn); background: var(--warn-soft); border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 16px; font-size: .92em; }

/* ---------- translated text, forms, complaint guide, owner ---------- */
.num .ico { width: 26px; height: 26px; color: var(--marigold); margin: 0 auto; display: block; }
.btn.ghost { margin-top: 14px; border-style: dashed; }
.tr-note { font: 400 .82em/1.5 var(--body); color: var(--muted); background: var(--info-soft); border-radius: 10px; padding: 8px 12px; margin-top: 12px !important; }
.legal-body:lang(mr), .legal-body:lang(hi) { font-family: var(--display); }
.en-original { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-family: var(--legal); }
.en-original .eyebrow { font: 600 .72em/1.3 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sheet-wrap { overflow-x: auto; padding: 6px 2px 18px; margin: 0 -2px; }
.sheet-wrap .a4 { animation: rise .5s var(--ease) both .1s; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: st; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 12px 58px; position: relative; }
.step::before {
  counter-increment: st; content: counter(st); position: absolute; left: 14px; top: 14px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--marigold-hi); font: 400 1em/1 var(--display);
}
.step h3 { font: 600 1.02em/1.4 var(--body); margin: 2px 0 8px; }
.step ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: .95em; }
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.contact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; min-width: 0; }
.c-line { font-size: .9em; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; }
.c-line > span { color: var(--muted); }
.c-src { font-size: .74em; color: var(--muted); margin-top: 2px; }
.sel { user-select: all; font-weight: 600; }
.owner-line { text-align: center; color: var(--muted); font-size: .8em; margin: 26px 0 0; }
.owner-name { font: 400 1.35em/1.2 var(--display); color: var(--marigold); margin-bottom: 4px !important; }

/* ---------- login ---------- */
body.locked .search, body.locked .tabs { display: none; }
body.locked { padding-bottom: env(safe-area-inset-bottom, 0px); }
.login { display: grid; justify-items: center; text-align: center; gap: 6px; padding-top: 10px; }
.login h1 { margin-top: 10px; }
.login-card {
  width: 100%; max-width: 380px; text-align: left; display: grid; gap: 8px; margin-top: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.login-card label { font-weight: 600; font-size: .9em; }
.phone-row { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.phone-row:focus-within, .otp:focus { border-color: var(--marigold); }
.phone-row span { display: grid; place-items: center; padding: 0 12px; white-space: nowrap; flex: none; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); }
.phone-row input, .otp {
  border: 0; outline: none; background: transparent; color: var(--text); font: 600 1.15em/1 var(--body);
  padding: 13px 12px; width: 100%; letter-spacing: .06em; min-width: 0;
}
.otp { border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); text-align: center; letter-spacing: .5em; font-size: 1.4em; }
.btn.wide { width: 100%; justify-content: center; padding: 12px; font-size: 1em; }
.btn:disabled { opacity: .6; cursor: default; }
.login-err { color: #c0392b; min-height: 1.2em; margin: 0; font-size: .88em; }
.login-links { display: flex; justify-content: space-between; gap: 8px; }
.link-btn { background: none; border: 0; color: var(--link); cursor: pointer; padding: 6px 0; font-size: .9em; }
.link-btn:disabled { color: var(--muted); cursor: default; }
.login-note { max-width: 380px; font-size: .8em; margin-top: 6px; }
.g-btn { background: var(--surface); border: 1.5px solid var(--line); color: var(--text); font-weight: 600; }
.g-btn svg { width: 20px; height: 20px; }
.g-btn:hover { border-color: var(--marigold); }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85em; margin: 4px 0; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- language splash ---------- */
.splash { text-align: center; padding-top: 18px; display: grid; justify-items: center; gap: 6px; }
.splash .seal { width: 150px; height: 150px; }
.splash-logo { width: 168px; height: 168px; max-width: 100%; border-radius: 36px; box-shadow: var(--shadow); animation: rise .5s var(--ease) both; }
.splash .seal circle { stroke: var(--marigold); }
.splash .seal text, .splash .seal .core { fill: var(--marigold); }
.splash .seal .core-win { fill: var(--paper); }
.splash h1 { font-size: 1.35em; margin-top: 10px; }
.lang-list { display: grid; gap: 12px; width: 100%; max-width: 340px; margin-top: 12px; }
.lang-choice {
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; font-size: 1.12em; color: var(--text); transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.lang-choice:hover { border-color: var(--marigold); transform: translateY(-2px); box-shadow: var(--shadow); }
.lang-choice small { color: var(--muted); font-size: .72em; }

/* ---------- bottom tabs ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.tabs a {
  display: grid; justify-items: center; gap: 2px; padding: 9px 2px 8px; text-decoration: none;
  color: var(--muted); font-size: .7em; font-weight: 500; position: relative; z-index: 1; transition: color .25s;
}
.tabs a svg { width: 23px; height: 23px; transition: transform .3s var(--ease); }
.tabs a.active { color: var(--ink); }
.tabs a.active svg { transform: translateY(-1px); stroke: var(--marigold); }
:root[data-theme="dark"] .tabs a.active { color: var(--on-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs a.active { color: var(--on-ink); } }
.tab-ind {
  position: absolute; top: 0; left: env(safe-area-inset-left, 0px); height: 3px; border-radius: 0 0 3px 3px;
  width: calc((100% - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) / 5);
  background: var(--marigold); transition: transform .4s var(--ease), opacity .3s;
}

.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 9;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--on-ink); padding: 9px 18px; border-radius: 999px; font-size: .88em;
  box-shadow: var(--shadow); transition: transform .3s var(--ease), opacity .3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 640px) {
  .hero { padding: 30px 30px 26px; }
  .seal { width: 150px; height: 150px; }
  .big-no { font-size: 4.2em; }
}
@media (max-width: 380px) {
  .seal { width: 92px; height: 92px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg button { min-width: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
