/* Merme Radar: Merme Meet's app design, the way Merme Tour carries it (tour's docs/tdd/06 §6 and its
   styles/theme.css). Two themes, as tour ships them: the soft-paper day (the default, never white) and night; the
   sidebar and the phone tab bar are night in both. Every colour is a token below; nothing else holds a hex. */

/* ---------- fonts: self-hosted (SIL OFL, from @fontsource), Latin and Georgian only ---------- */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-display: swap; font-weight: 400 700; src: url(/static/fonts/instrument-sans-latin.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-display: swap; font-weight: 400 700; src: url(/static/fonts/instrument-sans-latin-ext.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/static/fonts/bricolage-grotesque-latin.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/static/fonts/bricolage-grotesque-latin-ext.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800; src: url(/static/fonts/jetbrains-mono-latin.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Georgian"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/static/fonts/noto-sans-georgian.woff2) format("woff2-variations"); unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31; }
@font-face { font-family: "Noto Serif Georgian"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/static/fonts/noto-serif-georgian.woff2) format("woff2-variations"); unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31; }
/* Google's sign-in button only (its branding rules name Google Sans Medium). */
@font-face { font-family: "Google Sans"; font-style: normal; font-display: swap; font-weight: 500; src: url(/static/fonts/google-sans-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

/* ---------- tokens: tour's theme.css, day first ---------- */
:root,
[data-theme="day"] {
  color-scheme: light;
  --ground: #e9e4ea;
  --panel: #f4f1f4;
  --panel-2: #ece8ed;
  --popover: #fbfafb;
  --chrome: #ece8ed;
  --ink: #1b1617;
  --ink-body: #2e2628;
  --ink-2: #605758;
  --line: rgb(27 22 23 / 0.09);
  --line-strong: rgb(27 22 23 / 0.16);
  --line-hover: rgb(27 22 23 / 0.3);
  --wash: rgb(27 22 23 / 0.05);
  --wash-2: rgb(27 22 23 / 0.08);
  --accent: #96334f;
  --accent-text: #96334f;
  --accent-soft: rgb(150 51 79 / 0.09);
  --accent-ring: rgb(150 51 79 / 0.45);
  --on-accent: #fbfafa;
  --warn: #9a4a12;
  --warn-soft: rgb(154 74 18 / 0.1);
  --ok: #1f6e46;
  --ok-soft: rgb(31 110 70 / 0.1);
  --danger: #b5302f;
  --danger-text: #a3262e;
  --danger-soft: rgb(163 38 46 / 0.08);
  --on-danger: #fbfafa;
  --lift: inset 0 1px 0 rgb(255 255 255 / 0.9), 0 1px 2px rgb(27 22 23 / 0.06), 0 18px 40px -26px rgb(27 22 23 / 0.28);
  --lift-sm: inset 0 1px 0 rgb(255 255 255 / 0.9);
  --pop-shadow: 0 1px 2px rgb(27 22 23 / 0.08), 0 24px 48px -16px rgb(27 22 23 / 0.3);
  --btn-hi: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 1px 2px rgb(27 22 23 / 0.25);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23605758' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
}

[data-theme="night"] {
  color-scheme: dark;
  --ground: #0f0c0d;
  --panel: #231d1e;
  --panel-2: #2e2628;
  --popover: #2e2628;
  --chrome: #151112;
  --ink: #f5f0f1;
  --ink-body: #ede7e8;
  --ink-2: #b6adae;
  --line: rgb(238 229 230 / 0.09);
  --line-strong: rgb(238 229 230 / 0.15);
  --line-hover: rgb(238 229 230 / 0.28);
  --wash: rgb(238 229 230 / 0.06);
  --wash-2: rgb(238 229 230 / 0.09);
  --accent: #96334f;
  --accent-text: #c4889a;
  --accent-soft: rgb(196 136 154 / 0.12);
  --accent-ring: rgb(150 51 79 / 0.55);
  --on-accent: #fbfafa;
  --warn: #eba06a;
  --warn-soft: rgb(235 160 106 / 0.12);
  --ok: #7fd3a2;
  --ok-soft: rgb(127 211 162 / 0.1);
  --danger: #b5302f;
  --danger-text: #f4958e;
  --danger-soft: rgb(244 149 142 / 0.1);
  --on-danger: #fbfafa;
  --lift: inset 0 1px 0 rgb(255 255 255 / 0.07), 0 1px 2px rgb(0 0 0 / 0.5), 0 32px 72px -28px rgb(0 0 0 / 0.9);
  --lift-sm: inset 0 1px 0 rgb(255 255 255 / 0.06);
  --pop-shadow: inset 0 1px 0 rgb(255 255 255 / 0.07), 0 30px 60px -20px rgb(0 0 0 / 0.85);
  --btn-hi: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 1px 2px rgb(0 0 0 / 0.45);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23b6adae' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
}

:root {
  /* Google's light sign-in button (its branding rules; the design system's .prov). */
  --prov-fill: #ffffff;
  --prov-stroke: #747775;
  --prov-ink: #1f1f1f;
  --prov-hover: #f0f1f1;
  /* Latin from the first family; Georgian falls through to the Noto Georgian faces (the Latin faces carry none). */
  --font-sans: "Instrument Sans", "Noto Sans Georgian", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Noto Serif Georgian", "Noto Sans Georgian", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Noto Sans Georgian", ui-monospace, monospace;
  --font-ka: "Noto Sans Georgian", "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --radius-control: 8px;
  --radius-panel: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sidebar: 15.5rem;
  --tabbar: 4rem;
  --appbar: 3.5rem;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  background-color: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
p, li, dd { text-wrap: pretty; }
p { margin: 0; }
a { color: inherit; }
:lang(ka) { font-family: var(--font-ka); letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
@media (forced-colors: active) { :focus-visible { outline-color: Highlight; } }
::selection { background-color: var(--accent-soft); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-2); }
.ico { width: 1rem; height: 1rem; flex: none; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.skip { position: fixed; left: 0.75rem; top: -4rem; z-index: 60; padding: 0.5rem 0.75rem; border-radius: var(--radius-control); background: var(--popover); color: var(--ink); box-shadow: var(--pop-shadow); font-weight: 500; text-decoration: none; }
.skip:focus { top: 0.75rem; }

/* ---------- the shell: tour's sidebar from 1024px, the app bar and the dark tab bar below ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.625rem; min-height: 2.5rem; color: var(--ink); text-decoration: none; }
.brand .mark { flex: none; }
.brand__name { font: 700 1.25rem/1 var(--font-sans); letter-spacing: -0.03em; white-space: nowrap; }

.sidebar { display: none; }
.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--appbar); padding: 0 0.5rem 0 1rem;
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar .brand__name { font-size: 1.125rem; }
.appbar__acct { position: relative; }
.appbar__acct > summary { list-style: none; }
.appbar__acct > summary::-webkit-details-marker { display: none; }
.avatar-btn { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius-control); cursor: pointer; }
.avatar-btn:hover { background: var(--wash); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--wash-2);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink);
}
.pop--acct { position: absolute; right: 0; top: calc(100% + 0.375rem); width: 16rem; padding: 0.75rem; color: var(--ink); }

.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 20;
  background: var(--chrome); color: var(--ink); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.tb-link {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
  height: var(--tabbar); color: var(--ink-2); text-decoration: none; font-size: 0.75rem; font-weight: 500;
}
.tb-link .ico { width: 1.25rem; height: 1.25rem; }
.tb-link:hover { color: var(--ink); }
.tb-link[aria-current="page"] { color: var(--ink); }
.tb-link[aria-current="page"] .ico { color: var(--accent-text); }
.tb-link__count {
  position: absolute; top: 0.4rem; left: calc(50% + 0.375rem); min-width: 1.125rem; height: 1.125rem; padding: 0 0.3rem;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 0.625rem; font-weight: 600; line-height: 1;
}

@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
  .appbar, .tabbar { display: none; }
  .sidebar {
    position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column;
    padding: 1.25rem 0.875rem 1rem; background: var(--chrome); color: var(--ink); border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .sidebar__brand { padding: 0 0.625rem 1.25rem; }
  .sidebar__foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
}
.sb-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.sb-link {
  position: relative; display: flex; align-items: center; gap: 0.75rem; height: 2.5rem; padding: 0 0.75rem;
  border-radius: var(--radius-control); color: var(--ink-2); text-decoration: none;
  font-size: 0.90625rem; font-weight: 500; transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.sb-link .ico { width: 1.125rem; height: 1.125rem; }
.sb-link:hover { background: var(--wash); color: var(--ink); }
.sb-link[aria-current="page"] { background: var(--wash-2); color: var(--ink); }
.sb-link[aria-current="page"] .ico { color: var(--accent-text); }
.sb-link[aria-current="page"]::before { content: ""; position: absolute; top: 0.5rem; bottom: 0.5rem; left: -0.875rem; width: 2px; border-radius: 0 999px 999px 0; background: var(--accent); }
.sb-link__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-link__count { font-size: 0.75rem; color: var(--ink-2); }
.sb-link[aria-current="page"] .sb-link__count { color: var(--ink); }

/* The account: tour's sidebar foot. */
.acct { display: flex; flex-direction: column; gap: 0.875rem; padding: 0 0.25rem; }
.acct__who { display: flex; align-items: center; gap: 0.625rem; min-width: 0; padding: 0 0.375rem; }
.acct__email { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; font-weight: 500; }
.acct__out { border-top: 1px solid var(--line); padding-top: 0.625rem; }
.acct form { margin: 0; }
.seg { display: flex; flex-direction: column; gap: 0.375rem; }
.seg__label { padding: 0 0.375rem; font-size: 0.75rem; font-weight: 500; color: var(--ink-2); }
.seg__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--wash); }
.seg__opt {
  display: flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: 0; height: 2rem; padding: 0 0.5rem;
  border: 0; border-radius: 6px; background: none; color: var(--ink-2); font: 400 0.8125rem/1 var(--font-sans); cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.seg__opt .ico { width: 0.875rem; height: 0.875rem; }
.seg__opt:hover { color: var(--ink); }
.seg__opt[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); font-weight: 500; box-shadow: var(--lift-sm); cursor: default; }
.signout {
  display: flex; align-items: center; gap: 0.625rem; width: 100%; height: 2.25rem; padding: 0 0.375rem;
  border: 0; border-radius: var(--radius-control); background: none; color: var(--ink-2);
  font: 500 0.8125rem/1 var(--font-sans); cursor: pointer; text-align: left;
}
.signout:hover { background: var(--wash); color: var(--ink); }

/* ---------- the page ---------- */
.page { display: block; padding: 1.25rem 1rem calc(var(--tabbar) + 2.5rem + env(safe-area-inset-bottom)); outline: none; min-width: 0; }
@media (min-width: 768px) { .page { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .page { padding: 2rem 2.5rem 4rem; } .page > * { max-width: 90rem; } }
.phead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 1.5rem; }
.title { font: 600 1.6875rem/1.12 var(--font-display); letter-spacing: -0.025em; color: var(--ink); }
@media (min-width: 1024px) { .phead { margin-bottom: 1.75rem; } .title { font-size: 2rem; } }
.phead__actions { display: flex; align-items: center; gap: 0.5rem; flex: 1 1 22rem; justify-content: flex-end; min-width: 0; }
.h2 { font: 600 1.0625rem/1.3 var(--font-display); letter-spacing: -0.01em; margin-bottom: 0.75rem; }
.lede { color: var(--ink-2); margin: 0 0 1rem; max-width: 72ch; font-size: 0.9375rem; line-height: 1.5; }
.page-sec { margin-top: 2rem; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--lift);
  padding: 1.25rem; margin: 0 0 1rem;
}
.card__text { color: var(--ink-2); margin-bottom: 1rem; max-width: 72ch; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 2.5rem 1.5rem; text-align: center; }
.empty p { max-width: 46ch; color: var(--ink-2); }

/* ---------- buttons: tour's sizes from 1024px (36, small 28), 44 / 36 for a finger below ---------- */
.btn {
  display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 1rem; border-radius: var(--radius-control); border: 1px solid transparent;
  font: 500 0.875rem/1 var(--font-sans); white-space: nowrap; text-decoration: none; cursor: pointer; user-select: none;
  background: transparent; color: var(--ink);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), filter 0.15s var(--ease), translate 0.15s var(--ease);
}
.btn--sm { min-height: 2.25rem; padding: 0 0.625rem; font-size: 0.8125rem; gap: 0.375rem; }
@media (min-width: 1024px) { .btn { min-height: 2.25rem; } .btn--sm { min-height: 1.75rem; } }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--btn-hi); }
.btn--primary:hover { filter: brightness(1.1); translate: 0 -1px; }
.btn--primary:active { filter: brightness(0.95); translate: 0 0; }
.btn--secondary { background: var(--panel); border-color: var(--line-strong); box-shadow: var(--lift-sm); }
.btn--secondary:hover { border-color: var(--line-hover); background: var(--popover); }
.btn--ghost { color: var(--ink-2); }
.btn--ghost:hover { background: var(--wash-2); color: var(--ink); }
.btn--danger { background: var(--danger); color: var(--on-danger); box-shadow: var(--btn-hi); }
.btn--danger:hover { filter: brightness(1.1); }
.btn--danger-ghost { color: var(--danger-text); }
.btn--danger-ghost:hover { background: var(--danger-soft); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.8; }
.link { color: var(--accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent); text-underline-offset: 3px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- form controls: tour's (32 from 1024px, popover fill, inset hairline) ---------- */
.input, .select {
  width: 100%; min-height: 2.75rem; padding: 0.5rem 0.75rem;
  background: var(--popover); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-control);
  box-shadow: inset 0 1px 1px var(--line); font: 400 1rem/1.4 var(--font-sans);
  transition: border-color 0.15s var(--ease);
}
@media (min-width: 1024px) { .input, .select { min-height: 2rem; padding: 0.3rem 0.625rem; font-size: 0.875rem; } }
.input::placeholder { color: var(--ink-2); }
.input:hover, .select:hover { border-color: var(--ink-2); }
.input:focus-visible, .select:focus-visible { border-color: var(--accent-text); outline-offset: 0; }
.input[aria-invalid="true"] { border-color: var(--danger-text); }
.select { appearance: none; padding-right: 2rem; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 0.625rem center; background-size: 0.875rem; }
.input--sm { min-height: 2.25rem; }
@media (min-width: 1024px) { .input--sm { min-height: 1.75rem; } }
.input--area { resize: vertical; line-height: 1.55; padding-block: 0.5rem; }
.input--code { font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.6; }
textarea[lang="ka"] { line-height: 1.7; }
.field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; margin-bottom: 0.875rem; }
.label { font-size: 0.8125rem; font-weight: 500; color: var(--ink); }
.hint { color: var(--ink-2); font-size: 0.8125rem; }
.field__err { display: flex; align-items: flex-start; gap: 0.375rem; color: var(--danger-text); font-size: 0.8125rem; }
.field__err .ico { width: 0.875rem; height: 0.875rem; margin-top: 0.1rem; }
.grid2, .grid3 { display: grid; gap: 0 1rem; }
@media (min-width: 768px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } }
.savebar {
  position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); z-index: 5;
  padding: 0.75rem 0 0.75rem; margin-bottom: 1rem;
  background: linear-gradient(transparent, var(--ground) 40%);
}
@media (min-width: 1024px) { .savebar { bottom: 0; } }
.notice { display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.75rem 1rem; margin-bottom: 1rem; border-radius: var(--radius-control); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); background: var(--warn-soft); color: var(--ink); max-width: 72ch; }
.notice .ico { color: var(--warn); margin-top: 0.1rem; }
.notice--ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.notice--ok .ico { color: var(--ok); }
.notice:focus { outline: none; }

.search { display: flex; gap: 0.5rem; width: 100%; max-width: 34rem; }
.search__field { position: relative; flex: 1; min-width: 0; }
.search__field > .ico { position: absolute; left: 0.75rem; top: 50%; translate: 0 -50%; color: var(--ink-2); pointer-events: none; }
.search .input { padding-left: 2.25rem; }
@media (min-width: 1024px) { .search .input { min-height: 2.25rem; } }

/* ---------- status: an icon and a word, never a filled pill ---------- */
.chip { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--ink-2); margin: 0; }
.chip .ico { color: var(--ink-2); }
.chip--accent, .chip--info, .chip--success, .chip--warn { color: var(--ink); }
.chip--accent .ico, .chip--info .ico { color: var(--accent-text); }
.chip--success .ico { color: var(--ok); }
.chip--warn .ico { color: var(--warn); }
.badge { display: inline-block; padding: 0.05rem 0.4rem; border: 1px solid var(--accent-ring); border-radius: 6px; color: var(--accent-text); font: 600 0.6875rem/1.4 var(--font-sans); vertical-align: 0.15em; letter-spacing: 0; }

/* The status is the menu that changes it: an outlined chip, its moves in a popover. */
.smenu { position: relative; display: inline-block; }
.smenu > summary { list-style: none; }
.smenu > summary::-webkit-details-marker { display: none; }
.smenu__trigger {
  cursor: pointer; min-height: 2.75rem; padding: 0 0.625rem; gap: 0.375rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-control); font-weight: 600;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
@media (min-width: 1024px) { .smenu__trigger { min-height: 1.875rem; } }
.smenu__trigger:hover { border-color: var(--line-hover); background: var(--wash); }
.smenu[open] > .smenu__trigger { background: var(--wash-2); border-color: var(--line-hover); }
.chip--accent.smenu__trigger { border-color: var(--accent-ring); }
.ico--caret { width: 0.875rem; height: 0.875rem; color: var(--ink-2); transition: rotate 0.15s var(--ease); }
.smenu[open] .ico--caret { rotate: 180deg; }
.pop { background: var(--popover); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-control); box-shadow: var(--pop-shadow); }
.smenu__list {
  position: absolute; z-index: 30; left: 0; top: calc(100% + 0.375rem); min-width: 13rem; max-width: calc(100vw - 2rem); padding: 0.25rem;
  display: grid; gap: 2px;
}
.lead__foot .smenu__list, .crow__merge .merge { left: auto; right: 0; }
.menu-item {
  display: flex; align-items: center; gap: 0.625rem; width: 100%; min-height: 2.75rem; padding: 0 0.625rem;
  border: 0; border-radius: 6px; background: none; color: var(--ink); font: 500 0.875rem/1 var(--font-sans); text-align: left; cursor: pointer;
}
@media (min-width: 1024px) { .menu-item { min-height: 2.25rem; } }
.menu-item .ico { color: var(--ink-2); }
.menu-item:hover, .menu-item:focus-visible { background: var(--wash-2); outline-offset: -2px; }

/* ---------- tabs with counts ---------- */
.tabs { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; scrollbar-width: none; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 0.375rem; flex: none;
  min-height: 2.75rem; padding: 0 0.75rem; color: var(--ink-2); text-decoration: none; font-weight: 500; white-space: nowrap;
  transition: color 0.15s var(--ease);
}
@media (min-width: 1024px) { .tab { min-height: 2.5rem; } }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"]::after { content: ""; position: absolute; left: 0.5rem; right: 0.5rem; bottom: -1px; height: 2px; border-radius: 999px; background: var(--accent); }
.tab__n { font-size: 0.75rem; color: var(--ink-2); }

/* ---------- leads: a card per lead on a phone, one panel with hairline rows from 768px ---------- */
.leads { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; min-width: 0; }
.list-day { padding: 0.5rem 0.25rem 0; color: var(--ink-2); font-size: 0.8125rem; }
.list-day b { color: var(--ink); font-weight: 600; }
.lead { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--lift); padding: 1rem; min-width: 0; }
.lead--new { border-color: var(--accent-ring); }
.lead__head { min-width: 0; }
.lead__name { font: 600 1rem/1.3 var(--font-display); letter-spacing: -0.01em; }
.lead__name a { text-decoration: none; }
.lead__name a:hover { text-decoration: underline; text-decoration-color: var(--line-hover); text-underline-offset: 3px; }
.lead__role { margin-top: 0.125rem; color: var(--ink-2); font-size: 0.8125rem; }
.lead__state { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.875rem; margin-top: 0.625rem; }
.lead__score { display: inline-flex; align-items: baseline; gap: 0.375rem; }
.lead__score b { font-size: 0.9375rem; font-weight: 500; }
.lead__score small { color: var(--ink-2); font-size: 0.75rem; }
.lead__extra { display: grid; gap: 0.375rem; }
.lead__extra--wide { display: none; margin-top: 0.625rem; }
.lead__by { color: var(--ink-2); font-size: 0.8125rem; }
.mark-line { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.8125rem; color: var(--ink); }
.mark-line .ico { color: var(--accent-text); margin-top: 0.1rem; }
.mark-line--warn .ico { color: var(--warn); }
.mark-line--muted { color: var(--ink-2); }
.mark-line--muted .ico { color: var(--ink-2); }
.lead__more { margin-top: 0.5rem; }
.lead__more > summary { list-style: none; }
.lead__more > summary::-webkit-details-marker { display: none; }
.lead__toggle { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: 0.8125rem; }
.lead__toggle .ico--caret { color: currentColor; }
.lead__more[open] > .lead__toggle .ico--caret { rotate: 180deg; }
.lead__body { display: grid; gap: 1rem; padding-top: 0.25rem; min-width: 0; }
.lead__facts, .lead__opener { min-width: 0; }
.lead__label { font-size: 0.75rem; font-weight: 500; color: var(--ink-2); margin-bottom: 0.375rem; }
/* The separator is each next item's ::before in a gutter the wrapper clips at every line start. */
.meta { display: flex; flex-wrap: wrap; color: var(--ink-2); font-size: 0.8125rem; clip-path: inset(0 0 0 1rem); margin-left: -1rem; }
.meta > * { position: relative; padding-left: 1rem; }
.meta > *::before { content: "·"; position: absolute; left: 0.35rem; color: var(--ink-2); }
.quote { margin: 0.625rem 0 0; padding-left: 0.75rem; border-left: 2px solid var(--line-strong); color: var(--ink-body); font-size: 0.875rem; line-height: 1.55; max-width: 68ch; }
.quote:lang(ka) { font-size: 0.9375rem; line-height: 1.75; }
.lead__why { margin-top: 0.625rem; font-size: 0.875rem; color: var(--ink-body); max-width: 68ch; }
.lead__why b { font-weight: 600; color: var(--ink); margin-right: 0.25rem; }
.lead__why small { color: var(--ink-2); font-size: 0.8125rem; }
.note { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.875rem; }
.note__label { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
.note .input { flex: 1; min-width: 0; }
/* The Georgian opener is the text read most: the Georgian face, a size up, a long line height. */
.opener {
  margin: 0; padding: 0.875rem 1rem; max-width: 68ch;
  background: var(--panel-2); border-radius: 10px; box-shadow: var(--lift-sm);
  white-space: pre-wrap; color: var(--ink-body); font-size: 0.9375rem; line-height: 1.6;
}
.opener:lang(ka) { font-size: 1rem; line-height: 1.8; }
.opener--empty { color: var(--ink-2); font-style: italic; }
.lead__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.625rem; }
.lead__actions form { margin: 0; }
.lead__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.lead__company { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; min-width: 0; color: var(--ink-2); font-size: 0.8125rem; }
.lead__company > .ico { color: var(--ink-2); }
.forget { position: relative; margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; }
.forget__confirm {
  margin-top: 0.5rem; padding: 0.75rem; border-radius: var(--radius-control); background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger-text) 25%, transparent);
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; max-width: 34rem; text-align: left;
}
.forget__confirm p { flex-basis: 100%; font-size: 0.8125rem; }
.forget__confirm form { margin: 0; }
.show-more { text-align: center; margin: 1rem 0 0; }

@media (min-width: 768px) {
  .leads { gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--lift); }
  .lead { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 1.125rem 1.25rem; }
  .lead + .lead, .list-day + .lead { border-top: 1px solid var(--line); }
  .lead--new { box-shadow: inset 2px 0 0 var(--accent); }
  .list-day { padding: 0.5rem 1.25rem; border-top: 1px solid var(--line); background: var(--wash); }
  .list-day:first-child { border-top: 0; border-radius: var(--radius-panel) var(--radius-panel) 0 0; }
  .lead__extra--wide { display: grid; }
  .lead__extra--narrow { display: none; }
  .lead__more[data-wide] > .lead__toggle { display: none; }
  .lead__more[data-wide] { margin-top: 0.875rem; }
  .lead__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0.875rem 2rem; padding-top: 0; }
  .lead__foot { grid-column: 1 / -1; }
}
@media (min-width: 1280px) {
  .lead { display: grid; grid-template-columns: minmax(14rem, 0.42fr) minmax(0, 1fr); column-gap: 2rem; }
  .lead__more[data-wide] { margin-top: 0; }
}

/* ---------- companies ---------- */
.companies { list-style: none; padding: 0; }
.crow { display: grid; gap: 0.5rem; padding: 1rem 1.25rem; }
.crow + .crow { border-top: 1px solid var(--line); }
.crow__name { font: 600 0.9375rem/1.3 var(--font-display); }
.crow__name a { text-decoration: none; }
.crow__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crow__state { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.375rem; }
.crow__state small { color: var(--ink-2); font-size: 0.75rem; }
.crow__contacts { list-style: none; margin: 0; padding: 0; font-size: 0.8125rem; display: grid; gap: 0.125rem; }
.crow__contacts small { color: var(--ink-2); }
.crow__others { color: var(--ink-2); font-size: 0.8125rem; }
.crow__merge { position: relative; justify-self: start; }
.crow__merge > summary { list-style: none; }
.crow__merge > summary::-webkit-details-marker { display: none; }
.merge { position: absolute; z-index: 30; top: calc(100% + 0.375rem); left: 0; width: min(22rem, calc(100vw - 2rem)); display: grid; gap: 0.5rem; padding: 0.875rem; }
@media (min-width: 1024px) {
  .crow { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 0.8fr) auto; align-items: start; }
  .crow__merge { justify-self: end; }
}

/* ---------- runs ---------- */
.runnow .meta { margin-bottom: 0.875rem; }
.runnow .chip { margin-bottom: 0.5rem; }
.runnow .mark-line { margin-bottom: 0.75rem; }
.runnow form { margin-top: 0.25rem; }
.log { margin: 0.5rem 0 0; padding: 0.75rem; max-height: 22rem; overflow: auto; background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius-control); font: 400 0.75rem/1.55 var(--font-mono); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.runs { list-style: none; padding: 0; }
.rrow { display: grid; gap: 0.375rem; padding: 0.875rem 1.25rem; }
.rrow + .rrow { border-top: 1px solid var(--line); }
.rrow__main b { font-weight: 600; }
.rrow__main .meta { margin-top: 0.125rem; }
.rrow__counts { font-size: 0.8125rem; color: var(--ink-2); }
.rrow__cost { font-size: 0.75rem; color: var(--ink-2); }
.rrow__err { display: flex; gap: 0.5rem; font-size: 0.8125rem; }
.rrow__err .ico { color: var(--warn); margin-top: 0.1rem; }
.rrow__log summary { font-size: 0.8125rem; width: fit-content; min-height: 2rem; display: inline-flex; align-items: center; }
@media (min-width: 1024px) {
  .rrow { grid-template-columns: minmax(0, 1.1fr) 8rem minmax(0, 1.6fr) minmax(0, 1.2fr); align-items: start; }
  .rrow__err, .rrow__log { grid-column: 1 / -1; }
}

/* ---------- the toast: tour's (bottom right, the popover surface), with Undo ---------- */
.toast {
  position: fixed; z-index: 50; inset-inline: 1rem; bottom: calc(var(--tabbar) + 0.75rem + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.5rem 0.625rem 0.875rem;
  background: var(--popover); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-control); box-shadow: var(--pop-shadow);
  font-size: 0.875rem; font-weight: 500;
}
@media (min-width: 1024px) { .toast { inset-inline: auto 1.25rem; bottom: 1.25rem; width: 22rem; } }
.toast > .ico { color: var(--ok); }
.toast--warn > .ico { color: var(--warn); }
.toast__text { flex: 1; min-width: 0; }
.toast__action { color: var(--accent-text); font: 600 0.875rem/1 var(--font-sans); background: none; border: 0; padding: 0 0.625rem; min-height: 2.25rem; cursor: pointer; border-radius: 6px; }
.toast__action:hover { background: var(--wash-2); }
.toast__close { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; }
.toast__close:hover { background: var(--wash-2); color: var(--ink); }

/* ---------- the frame: sign-in, no access, errors (night in both themes, as tour's) ---------- */
.frame-body { background: var(--chrome); color: var(--ink); }
.frame { min-height: 100dvh; display: grid; place-content: center; padding: 3rem 1rem; width: 100%; }
.frame > * { width: min(24rem, calc(100vw - 2rem)); }
.frame__brand { display: flex; justify-content: center; margin-bottom: 2rem; }
.frame__card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--lift); padding: 2rem; }
@media (max-width: 400px) { .frame__card { padding: 1.5rem; } }
.frame__title { font: 600 1.5rem/1.2 var(--font-display); letter-spacing: -0.02em; }
.frame__lead { margin: 0.375rem 0 1.5rem; color: var(--ink-2); font-size: 0.875rem; line-height: 1.5; }
.frame__lead b { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.frame__dev { margin-bottom: 1rem; color: var(--ink-2); font-size: 0.8125rem; line-height: 1.5; }
.frame__dev b { color: var(--ink); font-weight: 500; }
.auth-alert { margin-bottom: 1.25rem; font-size: 0.8125rem; }
/* Google's light-theme sign-in button: white, a 1px #747775 stroke, #1f1f1f Google Sans Medium 14/20, the colour G. */
.prov {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 2.75rem; padding: 0 12px;
  background: var(--prov-fill); color: var(--prov-ink); border: 1px solid var(--prov-stroke); border-radius: var(--radius-control);
  font: 500 14px/20px "Google Sans", var(--font-sans); letter-spacing: 0.0125em; text-decoration: none;
  transition: background-color 0.15s var(--ease);
}
.prov:hover { background: var(--prov-hover); }
.prov__g { flex: none; }
