/* მოწმე — ინტერფეისის სტილები.
   Tokens first, then layout, components, pages. Colours: cool mist paper, pine green
   for anything the reader can act on, amber for "more than one source says this". */

:root {
  --bg: #F5F1E8;            /* Main Background */
  --surface: #FFFFFF;       /* News Cards */
  --surface-2: #E5DED2;     /* Category Labels */
  --ink: #252525;
  --ink-2: #4F493F;
  --ink-3: #645D51;
  --line: #DDD5C7;
  --line-soft: #E9E3D8;
  --accent: #252525;        /* Buttons / CTA */
  --accent-strong: #A83232; /* Hover / Active */
  --accent-ink: #FFFFFF;
  --accent-soft: #F4E4E1;
  --signal: #8A6100;
  --signal-soft: #F6EBCB;
  --danger: #A83232;        /* Breaking News, გაფრთხილებები */
  --danger-soft: #F4E4E1;
  --pine: #252525;
  --side: #EDE8DF;          /* Sidebar */
  --overlay: rgba(37, 37, 37, .5);
  --shadow: 0 18px 50px rgba(37, 37, 37, .16);
  --sans: "Noto Sans Georgian", "Noto Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Noto Serif Georgian", "Noto Serif", Georgia, "Times New Roman", serif;
  --top: 60px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #111827;            /* მთავარი ფონი */
  --surface: #1F2937;       /* ბარათები */
  --surface-2: #273244;
  --ink: #F8FAFC;           /* ძირითადი ტექსტი */
  --ink-2: #9CA3AF;         /* მეორეული ტექსტი */
  --ink-3: #949EAC;
  --line: #374151;
  --line-soft: #2A3443;
  --accent: #38BDF8;        /* მთავარი აქცენტი */
  --accent-strong: #7DD3FC;
  --accent-ink: #0B1220;
  --accent-soft: #0E2E43;
  --signal: #FBBF24;
  --signal-soft: #3A2F12;
  --danger: #EF4444;        /* მნიშვნელოვანი გაფრთხილება */
  --danger-soft: #3B1E24;
  --pine: #0B1220;
  --overlay: rgba(3, 7, 18, .7);
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, p, ul, ol, blockquote, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.icon { display: inline-flex; flex: none; }
.muted { color: var(--ink-3); font-size: 14px; }
.noscript { padding: 40px; text-align: center; }
.only-mobile { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 6px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 500; line-height: 1.3; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--surface); font-weight: 600; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); padding: 6px 10px; min-height: 34px; }
.btn-quiet:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn-block { width: 100%; min-height: 44px; font-size: 15px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); position: relative; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:disabled { opacity: .4; }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"],
input[type="date"], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
textarea { resize: vertical; line-height: 1.5; }
input:disabled { background: var(--surface-2); color: var(--ink-3); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 13px; color: var(--ink-3); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.field-row .btn { margin-bottom: 0; }
.field-row:has(.field-hint) .btn { margin-bottom: 26px; }
.stack { display: grid; gap: 16px; }
.stack > .btn { justify-self: start; }
.form-error { color: var(--danger); font-size: 14px; font-weight: 500; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.check small { display: block; color: var(--ink-3); font-size: 13px; }
.checks { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.checks-col { display: grid; gap: 12px; }

.segmented { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; }
.segmented button { border: 0; background: transparent; border-radius: 8px; padding: 5px 12px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.segmented button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(12, 32, 25, .12); }
.segmented-lg button { padding: 7px 16px; font-size: 15px; }

.switch { position: relative; display: inline-flex; flex: none; }
.switch input { position: absolute; inset: 0; z-index: 1; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.switch-track { pointer-events: none; position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1.5; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.chip-why { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.chip-plain { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.chip-warn { background: var(--signal-soft); color: var(--signal); }
.chip-count b { font-weight: 600; color: var(--ink-3); font-size: 12px; }
a.chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }

.status { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.status-pending { background: var(--signal-soft); color: var(--signal); }
.status-approved { background: var(--accent-soft); color: var(--accent-strong); }
.status-rejected { background: var(--danger-soft); color: var(--danger); }

.spinner { width: 26px; height: 26px; margin: 28px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 56px 20px; display: grid; gap: 10px; justify-items: center; }
.empty h3 { font: 600 20px/1.4 var(--serif); }
.empty p { color: var(--ink-2); max-width: 46ch; }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--accent); }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; width: min(92vw, 460px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14.5px; box-shadow: var(--shadow); transition: opacity .3s; }
.toast-error { background: var(--danger); color: #fff; }
.toast.leaving { opacity: 0; }

.backdrop { position: fixed; inset: 0; z-index: 100; background: var(--overlay); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; width: min(100%, 500px); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal-wide { width: min(100%, 780px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 22px; }
.modal-head h2 { font: 600 19px/1.4 var(--serif); }
.modal-body { padding: 4px 22px 18px; overflow: auto; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-soft); }
fieldset legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.modal fieldset { display: grid; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: var(--top) 1fr; min-height: 100vh; }
.shell.with-aside { grid-template-columns: 236px minmax(0, 1fr) 328px; }
.topbar {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: 30; height: var(--top);
  display: grid; grid-template-columns: 236px minmax(0, 1fr) auto; align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); padding-right: 20px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; padding-left: 24px; text-decoration: none; font: 700 23px/1 var(--serif); letter-spacing: -.01em; }
.logo-mark { display: inline-flex; color: var(--accent); }
.topsearch { position: relative; max-width: 520px; width: 100%; color: var(--ink-3); }
.topsearch .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.topsearch input { padding-left: 40px; border-radius: 999px; background: var(--surface); }
.top-actions { display: flex; align-items: center; gap: 4px; padding-left: 16px; }
.avatar { width: 36px; height: 36px; margin-left: 6px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; }
.badge { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
[data-theme="dark"] .badge { color: #1b0706; }

.popover { position: absolute; right: 16px; top: calc(var(--top) - 4px); width: min(360px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; z-index: 40; }
.pop-title { font-weight: 600; padding: 8px 10px; }
.pop-empty { padding: 8px 10px 14px; color: var(--ink-3); font-size: 14.5px; }
.pop-user { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.pop-user span { color: var(--ink-3); font-size: 13.5px; overflow-wrap: anywhere; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; text-decoration: none; font-size: 15px; text-align: left; }
.pop-item:hover { background: var(--surface-2); }
.notif-list a { display: grid; gap: 2px; padding: 9px 10px; border-radius: 8px; text-decoration: none; font-size: 14.5px; line-height: 1.45; }
.notif-list a:hover { background: var(--surface-2); }
.notif-list .unread a { box-shadow: inset 3px 0 0 var(--accent); }
.notif-list time, .notif-note { color: var(--ink-3); font-size: 13px; }

.sidenav { position: sticky; top: var(--top); height: calc(100vh - var(--top)); padding: 20px 14px; display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: 15px; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.on { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.nav-admin { margin-top: 14px; }
.tabbar { display: none; }
.view { width: 100%; max-width: 780px; margin: 0 auto; padding: 28px 28px 96px; outline: none; }
.shell.wide .view { max-width: 1180px; }
.aside { display: none; }
.shell.with-aside .aside { display: block; position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow: auto; padding: 28px 24px 40px 20px; border-left: 1px solid var(--line); }

/* ---------- page furniture ---------- */
.page { display: grid; gap: 24px; align-content: start; }
.page > * { min-width: 0; }
.page-head { display: grid; gap: 6px; }
.page-head h1, .feed-head h1 { font: 700 28px/1.3 var(--serif); letter-spacing: -.01em; }
.page-head p { color: var(--ink-2); max-width: 64ch; }
.page section > h2, .panel > h2, .side h2 { font: 600 17px/1.4 var(--sans); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: grid; gap: 14px; align-content: start; }
.panel h3 { font-size: 15px; font-weight: 600; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs > * { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; background: none; text-decoration: none; font-size: 15px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs > .on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.tabs > :disabled { color: var(--ink-3); cursor: not-allowed; }

/* ---------- feed: a time rail with one entry per story ---------- */
.feed-head { display: grid; gap: 16px; }
.feed-head > .segmented { justify-self: start; }
.feed-head h1::first-letter { text-transform: uppercase; }
.feed-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: space-between; }
.new-pill { justify-self: center; position: sticky; top: calc(var(--top) + 12px); z-index: 10; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); }
.day { font: 600 13.5px/1.4 var(--sans); color: var(--ink-2); padding: 8px 0 12px 78px; }
.day:not(:first-child) { padding-top: 22px; }
.entry { position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr); column-gap: 16px; padding-bottom: 14px; }
.entry::before { content: ""; position: absolute; left: 69.5px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.entry::after { content: ""; position: absolute; left: 66px; top: 25px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.entry-time { padding-top: 19px; text-align: right; font-size: 13.5px; line-height: 1.4; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.entry-plain { grid-template-columns: minmax(0, 1fr); }
.entry-plain::before, .entry-plain::after { display: none; }
.entry:not(.entry-plain) .card-time { display: none; }
.feed-more { display: grid; justify-items: center; min-height: 20px; }
.results { display: grid; gap: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px 10px; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 18px; }
.card.has-thumb { grid-template-columns: minmax(0, 1fr) 128px; }
.card-main { min-width: 0; display: grid; gap: 8px; align-content: start; }
.card-thumb { grid-column: 2; grid-row: 1; width: 128px; height: 96px; object-fit: cover; border-radius: 8px; margin-top: 4px; background: var(--surface-2); }
.card-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: 13.5px; color: var(--ink-3); }
.card-source { font-weight: 600; color: var(--accent-strong); }
.card h3 { font: inherit; }
.card-title { display: inline; padding: 0; border: 0; background: none; text-align: left; text-decoration: none; color: var(--ink); font: 600 20px/1.42 var(--serif); letter-spacing: -.005em; }
.card-title:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card-original { color: var(--ink-3); font-size: 14px; line-height: 1.45; }
.lang-switch { margin: 4px 0 2px; }
.lang-switch:empty { display: none; }
.lang-switch .segmented { padding: 2px; }
.lang-switch .segmented button { padding: 3px 11px; font-size: 12.5px; }
.card-desc { color: var(--ink-2); font-size: 15.5px; }
.card-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 8px 12px; }
.card-note .icon { margin-top: 3px; }
.summary { border-left: 2px solid var(--accent); padding-left: 14px; display: grid; gap: 6px; }
.summary p { font-size: 15.5px; }
.summary-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent-strong); }
.summary-label.pending { color: var(--ink-3); }
.summary-note { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.skeleton { display: grid; gap: 9px; padding: 4px 0; }
.skeleton i { height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line-soft) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton i:last-child { width: 62%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.card-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.card-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.save-btn.on { color: var(--accent); }
.save-btn.on svg { fill: currentColor; }
.also { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 2px 4px; font-size: 13px; color: var(--ink-2); text-align: left; }
.also:hover { color: var(--ink); text-decoration: underline; }
.also-dots { display: inline-flex; padding-left: 4px; }
.also-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); border: 2px solid var(--surface); margin-left: -4px; }

.onboard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: grid; gap: 18px; }
.onboard > h2 { font: 700 24px/1.35 var(--serif); }
.onboard > p { color: var(--ink-2); max-width: 60ch; }
.picker { display: grid; gap: 28px; }
.picker section { display: grid; gap: 10px; }
.topic-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; }
.topic:hover { border-color: var(--ink-3); }
.topic.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.topic-check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.topic.on .topic-check { background: rgba(255, 255, 255, .22); color: inherit; }
.kw-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; max-width: 520px; }
.kw-list { display: grid; gap: 6px; max-width: 520px; }
.kw { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.kw-label { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.kw-edit { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; width: 100%; padding: 4px 0; }

/* ---------- right panel ---------- */
.aside-toggle { display: none; }
.side { display: grid; gap: 30px; }
.side section { display: grid; gap: 12px; }
.side-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.side-popular { counter-reset: n; display: grid; gap: 12px; }
.side-popular li { counter-increment: n; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; }
.side-popular li::before { content: counter(n); font: 700 17px/1.5 var(--serif); color: var(--accent); grid-row: span 2; }
.side-popular button { border: 0; background: none; padding: 0; text-align: left; font: 600 15px/1.45 var(--serif); }
.side-popular button:hover { text-decoration: underline; text-underline-offset: 3px; }
.side-popular span { font-size: 13px; color: var(--ink-3); }
.side-interests { display: grid; }
.side-interests li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.side-interests a { text-decoration: none; overflow-wrap: anywhere; }
.side-interests a:hover { text-decoration: underline; }
.side-interests span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.side-link { font-size: 14px; color: var(--accent); font-weight: 600; }

/* ---------- reader ---------- */
.backdrop-reader { place-items: stretch end; padding: 0; }
.reader { width: min(100%, 720px); height: 100%; background: var(--surface); box-shadow: var(--shadow); animation: slide-in .22s ease-out; overflow: hidden; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.reader-content { height: 100%; display: flex; flex-direction: column; }
.reader-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 12px 28px; border-bottom: 1px solid var(--line-soft); }
.reader-source { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; font-size: 14px; color: var(--ink-3); }
.reader-source strong { color: var(--accent-strong); }
.reader-head-actions { display: flex; gap: 2px; }
.reader-scroll { flex: 1; overflow: auto; padding: 24px 28px 48px; display: grid; gap: 16px; align-content: start; }
.reader-title { font: 700 27px/1.35 var(--serif); letter-spacing: -.01em; }
.reader-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.reader-body { display: grid; gap: 16px; }
.reader-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.reader-summary { display: grid; gap: 10px; }
.prose { display: grid; gap: 14px; font-size: 17px; line-height: 1.72; max-width: 66ch; }
.prose-article { font-family: var(--serif); font-weight: 500; }
.prose h2, .prose h3, .prose h4 { font: 700 20px/1.4 var(--serif); margin-top: 8px; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 6px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose blockquote { border-left: 3px solid var(--line); padding-left: 16px; color: var(--ink-2); }
.prose img { border-radius: 8px; height: auto; }
.prose figure { margin: 0; }
.prose figcaption { font: 400 13.5px/1.5 var(--sans); color: var(--ink-3); }
.prose pre { overflow: auto; background: var(--surface-2); padding: 12px; border-radius: 8px; font-size: 14px; }
.attribution { font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 8px 12px; }
.attribution a { color: var(--accent); }
.related { display: grid; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.related h2 { font: 600 15px/1.4 var(--sans); display: flex; align-items: center; gap: 8px; }
.related h2::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); }
.related ul { display: grid; gap: 10px; }
.related li { display: grid; gap: 1px; }
.related a { font: 600 15.5px/1.45 var(--serif); text-decoration: none; }
.related a:hover { text-decoration: underline; }
.related span { font-size: 13px; color: var(--ink-3); }
.reader-keywords { display: flex; flex-wrap: wrap; gap: 6px; }
.reader-cta { justify-self: start; margin-top: 6px; min-height: 44px; white-space: normal; text-align: left; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-intro { background: var(--pine); color: #EAF3EE; padding: clamp(32px, 6vw, 80px); display: grid; align-content: center; gap: 22px; }
.auth-intro .logo { padding: 0; color: #fff; }
.auth-intro .logo-mark { color: #7AD8B6; }
.logo-big { font-size: 28px; }
.auth-intro h1 { font: 700 clamp(34px, 4.4vw, 54px)/1.18 var(--serif); letter-spacing: -.015em; max-width: 17ch; margin-top: 22px; }
.auth-intro > p { font-size: 18px; line-height: 1.6; max-width: 46ch; color: #C9DDD3; }
.auth-points { display: grid; gap: 16px; margin-top: 12px; max-width: 48ch; }
.auth-points li { display: grid; gap: 2px; padding-left: 18px; border-left: 2px solid #2F7A61; }
.auth-points strong { font-size: 16px; }
.auth-points span { color: #B5CDC1; font-size: 15px; }
.auth-panel { display: grid; place-items: center; padding: 32px 24px; }
.auth-form { width: min(100%, 380px); display: grid; gap: 20px; }
.auth-form h2 { font: 700 26px/1.3 var(--serif); }
.auth-form form { display: grid; gap: 16px; }
.auth-switch { color: var(--ink-2); font-size: 15px; }

/* ---------- sources, settings, search ---------- */
.source-list { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-top: 12px; }
.source { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.source:last-child { border-bottom: 0; }
.source-main { display: grid; gap: 3px; min-width: 0; }
.source-main p { font-size: 14px; color: var(--ink-2); }
.source-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.source-name a { font-weight: 600; text-decoration: none; }
.source-name a:hover { text-decoration: underline; }
.source.off .source-main { opacity: .55; }
.source-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px !important; color: var(--ink-3) !important; }
.source-facts .yes { color: var(--accent-strong); font-weight: 600; }
.req-form { display: grid; gap: 14px; max-width: 520px; }
.req-form .btn { justify-self: start; }
.req-list { display: grid; gap: 10px; }
.req-list:empty { display: none; }
.req-list h3 { margin-top: 8px; }
.req-list ul { display: grid; gap: 0; }
.req-list li { padding: 12px 0; border-top: 1px solid var(--line-soft); display: grid; gap: 2px; }
.req-list li > div { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.req-note { font-size: 14px; color: var(--ink-2); }
.choices { display: grid; gap: 8px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice-body { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.choice-body > .icon { margin-top: 2px; color: var(--ink-3); }
.choice-body small { display: block; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.choice-body strong { font-weight: 600; }
.choice input:checked + .choice-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:checked + .choice-body > .icon { color: var(--accent-strong); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-form { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.search-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.search-form > .link { justify-self: start; font-size: 14px; }

/* ---------- admin ---------- */
.admin-body { display: grid; gap: 22px; }
.admin-body > section { display: grid; gap: 12px; min-width: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar-filters { justify-content: flex-start; }
.toolbar-filters input[type="search"] { width: min(100%, 300px); }
.toolbar-filters select { width: auto; max-width: 220px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; }
a.tile:hover { border-color: var(--ink-3); }
.tile span { font-size: 14px; color: var(--ink-2); }
.tile strong { font: 700 30px/1.25 var(--serif); font-variant-numeric: tabular-nums; }
.tile small { font-size: 13px; color: var(--ink-3); }
.tile.warn { border-color: var(--signal); }
.tile.warn small { color: var(--signal); font-weight: 600; }
.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--ink-2); }
.chart-head strong { font: 700 20px/1 var(--serif); color: var(--ink); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 76px; }
.bars i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 3px; }
.bars i.zero { background: var(--line); }
.chart-foot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); }
.rank { display: grid; }
.rank li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.rank li:last-child { border-bottom: 0; }
.rank span { min-width: 0; overflow-wrap: anywhere; }
.rank small { display: block; color: var(--ink-3); font-size: 13px; }
.rank b { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table small { display: block; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.table small.err, small.err { color: var(--danger); }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table tr.dim td:not(.actions) { opacity: .55; }
.table .numcell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th:last-child { width: 1%; }
.table .actions { white-space: nowrap; text-align: right; }
.table-articles td:nth-child(2) { min-width: 320px; }
.table-articles td:nth-child(2) > a { font: 600 15.5px/1.45 var(--serif); }
.table-log { font-size: 13.5px; }
.table-log th:last-child { width: auto; }
.cell-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rights { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.rights span { font-size: 12px; padding: 1px 7px; border-radius: 6px; }
.rights .yes { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.rights .no { color: var(--ink-3); text-decoration: line-through; box-shadow: inset 0 0 0 1px var(--line); }
.req-admin { display: grid; gap: 12px; }
.req-admin li { gap: 8px; }
.req-admin a { color: var(--accent); overflow-wrap: anywhere; }
.req-admin blockquote { border-left: 3px solid var(--line); padding-left: 12px; color: var(--ink-2); }
.req-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.req-head > div { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.pager { display: flex; gap: 10px; justify-content: center; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.fact { display: grid; }
.fact span { font-size: 13.5px; color: var(--ink-3); }
.fact strong { font-size: 17px; overflow-wrap: anywhere; }
.panel > .btn { justify-self: start; }
.auto-panel h2 { font: 700 20px/1.3 var(--serif); }
.facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fact a { color: var(--accent); font-size: 14.5px; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.fact a:hover { text-decoration: underline; }
.note-error { background: var(--danger-soft); color: var(--danger); }
.auto-details summary { cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--ink-2); padding: 4px 0; }
.auto-details[open] summary { margin-bottom: 10px; }
.auto-details .table-wrap { border-radius: 10px; }
.chip-inline { margin-left: 8px; vertical-align: 2px; }
.found { display: grid; gap: 8px; }
.found:empty { display: none; }
.found-item { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.found-item:hover { border-color: var(--accent); }
.found-item span, .found-item small { font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .shell.with-aside { grid-template-columns: 236px minmax(0, 1fr); }
  .shell.with-aside .aside { position: static; height: auto; grid-column: 2; grid-row: 2; border-left: 0; padding: 20px 28px 0; max-width: 780px; width: 100%; margin: 0 auto; overflow: visible; }
  .shell.with-aside .view { grid-column: 2; grid-row: 3; padding-top: 20px; }
  .shell.with-aside { grid-template-rows: var(--top) auto 1fr; }
  .sidenav { grid-row: 2 / span 2; }
  .aside-toggle { display: inline-flex; }
  .aside .side { display: none; margin-top: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
  .aside.open .side { display: grid; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  :root { --top: 56px; }
  .only-mobile { display: inline-grid !important; }
  .shell, .shell.with-aside { grid-template-columns: minmax(0, 1fr); }
  .topbar { grid-template-columns: auto minmax(0, 1fr); padding-right: 10px; }
  .logo { padding-left: 16px; font-size: 21px; }
  .topsearch { display: none; }
  .top-actions { justify-content: flex-end; }
  .sidenav { display: none; }
  .shell.with-aside .aside, .shell.with-aside .view { grid-column: 1; }
  .shell.with-aside .aside { padding: 16px 16px 0; }
  .view, .shell.with-aside .view { padding: 18px 16px 110px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tab-item { display: grid; justify-items: center; gap: 1px; padding: 6px 2px 4px; border-radius: 10px; text-decoration: none; color: var(--ink-3); font-size: 11px; line-height: 1.3; text-align: center; }
  .tab-item.on { color: var(--accent-strong); font-weight: 600; }
  .toasts { bottom: 84px; }
  .page-head h1, .feed-head h1 { font-size: 24px; }
  .day { padding-left: 2px; }
  .entry { grid-template-columns: minmax(0, 1fr); padding-bottom: 12px; }
  .entry::before, .entry::after, .entry-time { display: none; }
  .entry:not(.entry-plain) .card-time { display: inline; }
  .card { padding: 14px 16px 8px; }
  .card.has-thumb { grid-template-columns: minmax(0, 1fr) 72px; column-gap: 12px; }
  .card-thumb { width: 72px; height: 72px; }
  .card-title { font-size: 17.5px; }
  .feed-head > .segmented-lg { display: flex; justify-self: stretch; }
  .segmented-lg button { flex: 1; padding: 7px 8px; }
  .grid-2, .grid-3, .charts, .filters, .facts-3 { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-intro { padding: 32px 24px; gap: 14px; }
  .auth-intro h1 { margin-top: 8px; }
  .auth-points { display: none; }
  .reader-scroll { padding: 18px 18px 40px; }
  .reader-head { padding-left: 18px; }
  .reader-title { font-size: 23px; }
  .onboard { padding: 20px 16px; }
  .panel { padding: 16px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .field-row .btn, .field-row:has(.field-hint) .btn { margin-bottom: 0; justify-self: start; }
  .modal-foot { flex-wrap: wrap; }
  .kw-edit { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 460px) {
  .filters, .tiles { grid-template-columns: minmax(0, 1fr); }
  .card-foot { flex-wrap: wrap; }
  .feed-filters .segmented { width: 100%; }
  .feed-filters .segmented button { flex: 1; padding: 6px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- home: interests step and the latest list in the right panel ---------- */
.feed-date { color: var(--ink-2); font-size: 15px; margin-top: -10px; }
.feed-date::first-letter { text-transform: uppercase; }
.side-latest li { grid-template-columns: minmax(0, 1fr); }
.side-latest li::before { content: none; }
.welcome { min-height: 100vh; display: grid; align-content: start; justify-items: center; gap: 24px; padding: clamp(24px, 6vh, 64px) 16px 48px; }
.welcome > .logo { padding: 0; }
.welcome > .onboard { width: min(100%, 760px); }
.onboard > h1 { font: 700 26px/1.35 var(--serif); }
.onboard-action { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* motsme-colors:start */
.auth-intro { color: #F8FAFC; }
.auth-intro .logo-mark { color: #38BDF8; }
.auth-intro > p { color: #CBD5E1; }
.auth-points li { border-left-color: rgba(56, 189, 248, .55); }
.auth-points span { color: #9CA3AF; }
.segmented button.on { box-shadow: 0 1px 2px rgba(17, 24, 39, .12); }
/* motsme-colors:end */

/* motsme-light:start */
/* Header / Navigation: #252525 */
[data-theme="light"] .topbar { background: #252525; border-bottom-color: #252525; backdrop-filter: none; color: #F5F1E8; }
[data-theme="light"] .topbar .logo { color: #FFFFFF; }
[data-theme="light"] .topbar .logo-mark { color: #E07070; }
[data-theme="light"] .topbar .icon-btn { color: #E5DED2; }
[data-theme="light"] .topbar .icon-btn:hover { background: #3A3A3A; color: #FFFFFF; }
[data-theme="light"] .topsearch { color: #B8B2A7; }
[data-theme="light"] .topsearch input { background: #333333; border-color: #444444; color: #FFFFFF; }
[data-theme="light"] .topsearch input::placeholder { color: #B8B2A7; }
[data-theme="light"] .avatar { background: #A83232; color: #FFFFFF; }
[data-theme="light"] .popover { color: var(--ink); }
/* mobile bottom menu = navigation */
[data-theme="light"] .tabbar { background: #252525; border-top-color: #252525; }
[data-theme="light"] .tab-item { color: #CFC8BC; }
[data-theme="light"] .tab-item.on { color: #FFFFFF; box-shadow: inset 0 2px 0 #E07070; }
/* Sidebar: #EDE8DF (left menu and the right-hand panel) */
[data-theme="light"] .sidenav { background: var(--side); border-right: 1px solid var(--line); }
@media (min-width: 1181px) {
  [data-theme="light"] .shell.with-aside .aside { background: var(--side); }
}
[data-theme="light"] .nav-item:hover { background: #E5DED2; }
/* Hover / Active: #A83232 for highlighted links */
[data-theme="light"] .link, [data-theme="light"] .side-link, [data-theme="light"] .prose a,
[data-theme="light"] .attribution a, [data-theme="light"] .fact a, [data-theme="light"] .req-admin a,
[data-theme="light"] .side-popular li::before { color: #A83232; }
[data-theme="light"] .card-title:hover, [data-theme="light"] .side-popular button:hover { color: #A83232; }
/* login page panel */
[data-theme="light"] .auth-intro { color: #F5F1E8; }
[data-theme="light"] .auth-intro .logo-mark { color: #E07070; }
[data-theme="light"] .auth-intro > p { color: #D9D2C5; }
[data-theme="light"] .auth-points li { border-left-color: #A83232; }
[data-theme="light"] .auth-points span { color: #B8B2A7; }
/* motsme-light:end */

/* motsme-title-caps:start */
/* the old first-letter rule turns the first Mtavruli letter back into Mkhedruli in Chrome */
.feed-head h1::first-letter { text-transform: none; }
/* motsme-title-caps:end */

/* motsme-origin:start */
.feed-filters:empty { display: none; }
.switch-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line-soft); }
.switch-line > span { display: grid; gap: 2px; }
.switch-line small { color: var(--ink-2); font-size: 14px; }
/* motsme-origin:end */

/* motsme-filter:start */
/* password field with a show/hide button (registration) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 46px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; }
.pw-toggle:hover { color: var(--ink); background: var(--surface-2); }
/* "Interests" filter on the home page */
.ifilter { position: relative; }
.ifilter-btn.on { border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }
.ifilter-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.ifilter-panel { position: absolute; left: 0; top: calc(100% + 6px); z-index: 25; width: min(320px, calc(100vw - 32px)); display: grid; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.ifilter-hint { font-size: 13.5px; color: var(--ink-2); }
.ifilter-list { display: grid; gap: 10px; max-height: 50vh; overflow: auto; }
.ifilter-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
/* motsme-filter:end */

/* motsme-toggle:start */
/* "Selected interests" group with on/off switches */
.igroup { display: grid; gap: 10px; }
.igroup-list { display: grid; gap: 8px; max-width: 620px; }
.igroup-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.igroup-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.igroup-label { font-weight: 600; overflow-wrap: anywhere; }
.igroup-kind { font-size: 13px; color: var(--ink-3); }
.igroup-item.off { background: var(--surface-2); border-style: dashed; }
.igroup-item.off .igroup-label { color: var(--ink-3); }
/* motsme-toggle:end */

/* motsme-group:start */
.igroup-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.igroup-spacer { width: 36px; height: 36px; flex: none; }
.igroup-actions .switch { margin: 0 4px; }
.igroup-item.editing { padding: 6px 8px; }
.igroup-new { animation: igroup-flash 1.8s ease-out; }
@keyframes igroup-flash {
  0%, 30% { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
/* motsme-group:end */

/* motsme-messages:start */
.table .selcell { width: 40px; }
.table .selcell input, .table th input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.msg-target { display: grid; gap: 10px; margin: 6px 0 14px; }
.msg-target .dim { opacity: .5; }
.msg-counter { display: block; text-align: right; color: var(--ink-3); margin-top: 4px; }
.notif-msg { color: var(--ink); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
/* motsme-messages:end */

/* motsme-avatar:start */
.avatar { overflow: hidden; padding: 0; display: inline-grid; place-items: center; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.profile-card { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.profile-photo { width: 120px; height: 120px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 700 46px/1 var(--serif); }
.profile-info { display: grid; gap: 4px; min-width: 0; flex: 1; }
.profile-name { font: 700 22px/1.3 var(--serif); overflow-wrap: anywhere; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 2px; }
/* motsme-avatar:end */

/* motsme-photo:start */
.photo-editor { display: grid; gap: 14px; justify-items: center; }
.photo-editor > p { justify-self: stretch; }
.photo-stage { width: min(300px, 72vw); aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #1a1a1a; touch-action: none; cursor: grab; user-select: none; }
.photo-stage.dragging { cursor: grabbing; }
.photo-stage canvas { width: 100%; height: 100%; display: block; }
.photo-tools { display: flex; align-items: center; gap: 8px; width: min(300px, 72vw); }
.photo-tools input[type="range"] { flex: 1; accent-color: var(--accent); }
.photo-tools-center { justify-content: center; }
.photo-view { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .85); cursor: zoom-out; }
.photo-view img { width: min(82vmin, 512px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.photo-view .photo-view-close { position: absolute; top: 16px; right: 16px; color: #fff; }
.photo-view .photo-view-close:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.pop-photo { display: block; width: 140px; height: 140px; margin: 8px auto 2px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; cursor: zoom-in; background: none; }
.pop-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-photo-btn { width: 100%; height: 100%; padding: 0; border: 0; background: none; border-radius: 50%; cursor: zoom-in; display: block; }
/* motsme-photo:end */

/* motsme-feedback:start */
.fb { gap: 16px; }
.fb-form { display: grid; gap: 12px; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-kinds .topic { padding: 7px 14px; }
.fb-rating { display: flex; align-items: center; gap: 2px; }
.fb-rating-label { font-size: 14px; color: var(--ink-2); margin-right: 6px; }
.fb-star { border: 0; background: none; padding: 2px 3px; font-size: 26px; line-height: 1; color: var(--line); cursor: pointer; transition: transform .1s; }
.fb-star.on { color: #E8A317; }
.fb-star:hover { transform: scale(1.12); }
.fb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fb-counter { color: var(--ink-3); }
.fb-mine { display: grid; gap: 10px; }
.fb-mine:empty { display: none; }
.fb-list { display: grid; gap: 10px; }
.fb-item { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.fb-text { white-space: pre-line; overflow-wrap: anywhere; }
.fb-reply { display: grid; gap: 4px; padding: 8px 12px; border-left: 3px solid var(--accent-strong); border-radius: 0 8px 8px 0; background: var(--surface-2); }
.fb-reply p { white-space: pre-line; overflow-wrap: anywhere; }
.fb-reply time { font-size: 12.5px; color: var(--ink-3); }
.fb-stars { letter-spacing: 1px; font-size: 15px; }
.fb-stars .on { color: #E8A317; }
.fb-stars span:not(.on) { color: var(--line); }
.fb-quote { white-space: pre-line; overflow-wrap: anywhere; color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 12px; margin: 0 0 12px; }
/* motsme-feedback:end */

/* motsme-security:start */
.auth-forgot { justify-self: end; font-size: 14px; margin-top: -6px; }
.form-ok { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.danger-zone { border-color: var(--danger); }
.danger-zone h2 { color: var(--danger); }
.btn-danger-outline { border-color: var(--danger); color: var(--danger); background: var(--surface); }
.btn-danger-outline:hover { background: var(--danger-soft); border-color: var(--danger); }
/* motsme-security:end */

/* motsme-seo:start */
.js .prerender { display: none; }
.prerender .auth-form p { line-height: 1.6; }
.prerender .auth-form .btn { margin-right: 8px; }
/* motsme-seo:end */
