/* Calm, Notion-like base: light surfaces, hairline borders, compact type, one accent.
   Tokens live on :root so a dark theme can be added later by redefining them. */
:root {
  --bg: #ffffff;
  --sidebar: #f7f7f5;
  --hover: #efefed;
  --border: #e9e9e7;
  --text: #37352f;
  --muted: #787774;
  --accent: #2383e2;
  --accent-soft: #e7f3fc;
  --danger: #eb5757;
  --warn-bg: #fbf3db;
  --warn-border: #f1e2b3;
  --info-bg: #f1f1ef;
  --ok-bg: #edf3ec;
  --role-work: #dbeddb;
  --role-test: #fbecc8;
  --role-review: #e8deee;
  --radius: 6px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 24px; line-height: 1.25; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.h2 { font-size: 20px; } .h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
p { margin: 6px 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden;
           clip: rect(0 0 0 0); white-space: nowrap; }

/* Focus: always visible for keyboard users */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- shell & sidebar ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .15s ease; }
.main { padding: 28px 40px 16px; max-width: 1040px; width: 100%; }
.public { max-width: 760px; margin: 0 auto; padding: 32px 16px; }
.mobilebar { display: none; }
.mobile-only, .tabs.mobile-only { display: none; }  /* desktop navigates by the sidebar */
.brand { font-weight: 600; }
.brand.big { font-size: 15px; margin-bottom: 14px; }

.sidebar { --sb-active: #ebebea; --sb-text: #2f2e2b;
           background: var(--sidebar); border-right: 1px solid var(--border); padding: 12px 10px 10px;
           display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; min-width: 0; }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 10px 6px; }
.sb-brand { display: flex; align-items: center; gap: 8px; color: var(--sb-text); min-width: 0; }
.sb-brand:hover { text-decoration: none; }
.sb-logo { flex: none; }
.sb-brand-text { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; white-space: nowrap; }
.sb-collapse { flex: none; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
               border: 1px solid var(--border); border-radius: 5px; background: var(--bg); color: var(--muted); cursor: pointer; padding: 0; }
.sb-collapse:hover { color: var(--text); }
.sb-scroll { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 0 -2px; padding: 0 2px; }

.sb-group { display: flex; flex-direction: column; gap: 1px; }
.sb-item { position: relative; display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px;
           border-radius: 6px; color: var(--sb-text); font-size: 13.5px; white-space: nowrap; }
.sb-item:hover { background: var(--hover); text-decoration: none; }
.sb-item.is-active, .sb-item.is-current { background: var(--sb-active); font-weight: 500; }
.sb-icon { width: 16px; height: 16px; flex: none; color: #5f5e5b; }
.sb-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-count, .sb-meta { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sb-quiet { color: var(--muted); }

.sb-section { display: flex; flex-direction: column; gap: 1px; margin-top: 8px; }
.sb-section-btn { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 2px 8px; margin-bottom: 2px;
                  border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; border-radius: 4px; }
.sb-section-btn:hover { color: var(--text); }
.sb-chev { transition: transform .12s ease; }
.sb-section-btn[aria-expanded="false"] .sb-chev { transform: rotate(-90deg); }
.sb-section-body { display: flex; flex-direction: column; gap: 1px; }
.sb-section-body[hidden] { display: none; }

/* Tree lines for sub-items, like nested navigation */
.sb-tree { margin-left: 15px; padding-left: 10px; border-left: 1px solid #dcdcd9; }
.sb-tree .sb-item::before { content: ""; position: absolute; left: -11px; top: 50%; width: 8px; border-top: 1px solid #dcdcd9; }

/* Account icons: role colour, initial letter */
.acct-icon { width: 18px; height: 18px; flex: none; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center;
             color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1; }
.acct-icon.small { width: 16px; height: 16px; font-size: 9.5px; border-radius: 4px; }
.acct-work { background: #2f9e57; }
.acct-test { background: #e8890c; }
.acct-reviewer { background: #7a5af0; }
.sb-acct-name { flex: 0 1 auto; }
.sb-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); flex: none; margin-left: 2px; }

.sb-bottom { padding-top: 6px; }
.sb-user { display: flex; align-items: center; gap: 9px; padding: 8px; margin-top: 6px; background: var(--bg);
           border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 2px rgba(15,15,15,.04); min-width: 0; }
.sb-avatar { width: 28px; height: 28px; flex: none; border-radius: 6px; background: #e3e2de; color: var(--text);
             display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.sb-user-text { display: flex; flex-direction: column; line-height: 1.25; flex: 1 1 auto; }
.sb-user-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.sb-user-sub { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.sb-logout { flex: none; }
.icon-btn.small { padding: 4px; color: var(--muted); }

/* Collapsed rail (desktop): icons only, labels in tooltips */
.shell.is-collapsed { grid-template-columns: 60px minmax(0, 1fr); }
.is-collapsed .sidebar { padding-left: 8px; padding-right: 8px; }
.is-collapsed .sb-label, .is-collapsed .sb-count, .is-collapsed .sb-meta, .is-collapsed .sb-chev,
.is-collapsed .sb-section-btn .sb-label { display: none; }
.is-collapsed .sb-head { flex-direction: column; padding: 0 0 8px; gap: 10px; }
.is-collapsed .sb-collapse svg { transform: rotate(180deg); }
.is-collapsed .sb-item { justify-content: center; padding: 0; }
.is-collapsed .sb-section { margin-top: 4px; }
.is-collapsed .sb-section-btn { width: 100%; height: 1px; padding: 0; margin: 4px 0 6px; background: var(--border); }
.is-collapsed .sb-section-body[hidden] { display: flex; }  /* the rail always shows every icon */
.is-collapsed .sb-tree { margin-left: 0; padding-left: 0; border-left: 0; }
.is-collapsed .sb-tree .sb-item::before { display: none; }
.is-collapsed .sb-dot { position: absolute; top: 4px; right: 8px; }
.is-collapsed .sb-user { justify-content: center; padding: 6px; flex-direction: column; gap: 6px; }

/* ---------- page parts ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.page-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; font-size: 13px; }
.page-sub strong { font-weight: 600; }
/* overflow-y hidden: the active tab's -1px margin otherwise makes a 1px vertical scroll with a visible bar */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 14px; overflow-x: auto; overflow-y: hidden;
        scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 10px; color: var(--muted); white-space: nowrap; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); font-weight: 500; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); padding: 2px; }
.seg { padding: 3px 10px; border-radius: 4px; color: var(--muted); font-size: 13px; }
.seg:hover { color: var(--text); text-decoration: none; background: var(--hover); }
.seg.is-active { background: var(--hover); color: var(--text); font-weight: 500; }

.card { border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 14px; background: var(--bg); }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 360px; margin: 48px auto; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.card > .h3 { margin-bottom: 10px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.cards .card { margin: 0; }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat-value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 2px 0; }
.stat-hint { color: var(--muted); font-size: 12px; line-height: 1.4; }

.chart { position: relative; height: 220px; }
.chart.small { height: 150px; }

.badge { display: inline-block; font-size: 11.5px; font-weight: 500; line-height: 1.6; padding: 0 7px; border-radius: 4px;
         color: var(--text); white-space: nowrap; flex: none; }
.badge-work { background: var(--role-work); }
.badge-test { background: var(--role-test); }
.badge-reviewer { background: var(--role-review); }
.tag { display: inline-block; font-size: 11px; line-height: 1.5; padding: 0 5px; border-radius: 3px;
       background: var(--info-bg); color: var(--muted); border: 1px solid var(--border); }

/* banners, toasts, states */
.sync-status:empty { display: none; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px;
          border-radius: var(--radius); margin-bottom: 14px; font-size: 13.5px; }  /* same rhythm as cards */
.banner-info { background: var(--info-bg); justify-content: flex-start; gap: 8px; }
.banner-warn { background: var(--warn-bg); border: 1px solid var(--warn-border); }
.banner form { flex: none; }
.connection-note { margin: 4px 0 0; padding: 6px 10px; border-radius: var(--radius); font-size: 12.5px;
                   color: #7a5a14; background: var(--warn-bg); border: 1px solid var(--warn-border); }
.toast { padding: 8px 12px; border-radius: var(--radius); margin-bottom: 12px; background: var(--ok-bg); font-size: 13.5px; }
.toast-error { background: var(--warn-bg); border: 1px solid var(--warn-border); }
.toast-info { background: var(--info-bg); }
.state { border: 1px dashed var(--border); border-radius: 8px; padding: 28px 20px; text-align: center; margin-bottom: 14px; }
.state-title { font-weight: 600; }
.state-text { color: var(--muted); max-width: 460px; margin: 4px auto 12px; }
.state .btn { margin-top: 4px; }
/* Inside a card the card is already the frame: a soft fill instead of a second dashed box. */
.card .state { border: 0; background: var(--sidebar); border-radius: var(--radius); padding: 22px 16px; margin: 0; }
.card .state .state-text { margin-bottom: 0; }
.period-note { margin: 0 0 14px; }
.spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border);
           border-top-color: var(--muted); animation: spin .9s linear infinite; vertical-align: -2px; }
.state .spinner { width: 20px; height: 20px; margin-bottom: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* lists and tables */
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.card:not(.flush) .list-row { padding: 10px 0; }
.list-row:last-child { border-bottom: 0; }
.list-main { min-width: 0; flex: 1 1 auto; }
.list-metrics { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px;
                font-variant-numeric: tabular-nums; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.clamp-2.is-open { display: block; -webkit-line-clamp: unset; }
/* position: relative keeps absolutely positioned children (.sr-only) inside the scroll box —
   otherwise they escape it and widen the page on phones. */
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 12px;
            border-bottom: 1px solid var(--border); background: var(--sidebar); white-space: nowrap; }
.table td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: top; }
.table tbody:first-of-type tr:first-child td { border-top: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.text-cell { min-width: 240px; max-width: 520px; }
.row-actions { display: flex; gap: 12px; margin-top: 4px; }
.details-row td { border-top: 0; padding-top: 0; }
.details { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; margin: 0;
           background: var(--sidebar); border-radius: var(--radius); padding: 10px 12px; }
.details dt { color: var(--muted); font-size: 12px; }
.details dd { margin: 0; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0 0 14px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0; }
.bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 20px; }
.bar-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.bar-value { font-variant-numeric: tabular-nums; color: var(--muted); }

/* key-value (settings) */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 20px; margin: 0 0 12px; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* forms and buttons */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > .card { margin: 0; }  /* the stack's gap is the only spacing between its items */
.wide-form { max-width: 640px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.field.inline { flex: 1 1 260px; }
.field-error { color: var(--danger); }
input:not([type=radio]):not([type=checkbox]) { font: inherit; color: var(--text); padding: 6px 10px; border: 1px solid var(--border);
        border-radius: var(--radius); background: var(--bg); width: 100%; }
input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.btn, .btn-secondary, .btn-quiet, .btn-danger { font: inherit; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px;
        padding: 6px 12px; border-radius: var(--radius); cursor: pointer; border: 1px solid transparent; line-height: 1.3; }
.btn { background: var(--text); color: #fff; }
.btn:hover { background: #2a2925; text-decoration: none; }
.btn.wide { justify-content: center; }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--hover); text-decoration: none; }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.btn-danger { background: var(--bg); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #fdebeb; }
.small.btn, .small.btn-secondary, .small.btn-quiet, .small.btn-danger { padding: 4px 9px; font-size: 12.5px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.btn-link.small { font-size: 12.5px; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: var(--radius); color: var(--text); cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: var(--hover); }

.choices { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.choices legend { margin-bottom: 2px; padding: 0; }  /* default legend padding indents it 2px */
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 8px; padding: 12px; cursor: pointer; }
.choice:hover { background: var(--sidebar); }
.choice:has(input:checked) { border-color: var(--text); }
.choice input { margin-top: 3px; }
.choice-body { display: flex; flex-direction: column; gap: 2px; }
.choice-title { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.checklist { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

.danger-zone { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-size: 13px; width: fit-content; }
/* Open zone runs to the card's edges (incl. bottom) so it reads as one tinted footer, not a band. */
.danger-zone[open] { background: #fffafa; margin: 12px -16px -16px; padding: 10px 16px 16px; border-radius: 0 0 8px 8px; }
.danger-zone p { margin: 8px 0 10px; }
/* Button sits on the input's baseline row and matches its height. */
.danger-form { align-items: flex-end; }
.danger-form .btn-danger { height: 34px; padding: 0 14px; }

/* Text pages (privacy, data deletion) use the same page header rhythm as the app screens. */
.prose { max-width: 680px; }
.prose h1 { margin-bottom: 14px; } .prose h2 { font-size: 16px; margin: 22px 0 6px; }
.prose ul, .prose ol { padding-left: 20px; } .prose li { margin: 4px 0; }

.footer { display: flex; gap: 8px; justify-content: center; padding: 28px 0 8px; font-size: 12.5px; color: var(--muted); }
.footer a { color: var(--muted); }

/* ---------- narrow screens ---------- */
@media (max-width: 1100px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .shell { display: block; }
  .mobilebar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border);
               position: sticky; top: 0; background: var(--bg); z-index: 30; }
  /* Closed menu is visibility:hidden, not just off-screen: hidden links leave the Tab order and the
     accessibility tree. visibility switches after the slide-out so the animation still shows. */
  .sidebar { position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(280px, 85vw); height: auto;
             transform: translateX(-100%); visibility: hidden; box-shadow: 0 0 24px rgba(15,15,15,.12);
             transition: transform .15s ease, visibility 0s linear .15s; }
  .sidebar.is-open { transform: none; visibility: visible; transition: transform .15s ease, visibility 0s; }
  .mobile-only, .tabs.mobile-only { display: flex; }
  .danger-form .field.inline { flex-basis: 100%; }
  .danger-form .btn-danger { width: 100%; justify-content: center; }  /* full width under the input */
  .main { padding: 16px; }
  .page-head { flex-direction: column; }
  .banner { flex-direction: column; align-items: flex-start; }
  .banner-info { flex-direction: row; align-items: center; }
  .list-row { flex-direction: column; gap: 6px; }
  .list-metrics { flex-direction: row; gap: 12px; align-items: baseline; }
  .text-cell { min-width: 180px; }
}
/* Two stat cards per row still fit on a 375-390px phone; one column only on very narrow screens. */
@media (max-width: 340px) { .cards { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* ---------- discover: search & profiles ---------- */
.search-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-bottom: 8px; }
.search-input { position: relative; flex: 1 1 280px; display: flex; align-items: center; }
.search-input svg, .search-prefix { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search-prefix { font-size: 14px; }
/* Same specificity as the global input rule and later in the file, so the icon padding wins. */
.search-input input.search-field { height: 36px; padding-left: 32px; }
.search-form select, .search-form .btn { height: 36px; }
select { font: inherit; font-size: 13.5px; color: var(--text); padding: 0 28px 0 10px; border: 1px solid var(--border);
         border-radius: var(--radius); background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2.5 4l2.5 2.5L7.5 4' fill='none' stroke='%23787774' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 10px center;
         appearance: none; -webkit-appearance: none; cursor: pointer; }
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.results-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; margin: 0 0 14px; }
.results-meta p { margin: 0; }
.results-meta-end { margin-left: auto; }
.loaded-at { display: inline-flex; align-items: center; gap: 8px; }
.quick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.quota-inline { margin-left: 4px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border: 1px solid var(--border); border-radius: 999px;
        font-size: 12.5px; color: var(--text); background: var(--bg); }
.chip:hover { background: var(--hover); text-decoration: none; }
.card-head.padded { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--border); }

.found-post { justify-content: flex-start; gap: 12px; }
.found-avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; background: #e3e2de; color: var(--text);
                display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12.5px; }
.found-avatar.big { width: 48px; height: 48px; font-size: 19px; }
.found-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; margin-bottom: 2px; }
.found-author { font-weight: 600; color: var(--text); }
.found-post .row-actions { margin-top: 4px; }

.profile-top { display: flex; align-items: center; gap: 14px; }
.profile-id .h2 { display: flex; align-items: center; gap: 6px; }
.verified { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%;
            background: var(--accent); color: #fff; font-size: 11px; }
.profile-bio { margin: 12px 0 0; white-space: pre-line; }
.profile-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 14px 0 8px; }
.profile-stats div { background: var(--sidebar); border-radius: var(--radius); padding: 8px 10px; }
.profile-stats dt { color: var(--muted); font-size: 12px; }
.profile-stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .list-row.found-post { flex-direction: row; gap: 10px; }  /* avatar stays beside the text */
  .search-form .btn { flex: 1 1 100%; justify-content: center; }
  .search-form select { flex: 1 1 calc(50% - 4px); }
}

/* ---------- login: split screen ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); gap: 24px; min-height: 100vh; padding: 20px; }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
               min-height: calc(100vh - 40px); padding: 40px 44px 44px; border-radius: 22px; overflow: hidden; color: #fff;
               background: linear-gradient(180deg, #5b586c 0%, #8d86a8 26%, #aaa1c9 50%, #9d93bd 66%, #3a3743 92%, #2b2a31 100%); }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.auth-brand:hover { text-decoration: none; }
.auth-art { width: 100%; max-width: 560px; height: auto; margin: 0 auto; display: block; }
.auth-tagline { margin: 0; font-size: 17px; line-height: 1.6; max-width: 540px; text-shadow: 0 1px 2px rgba(0,0,0,.15); }

.auth-panel { display: flex; flex-direction: column; min-height: calc(100vh - 40px); padding: 6px 4px 0; }
.auth-top { display: flex; justify-content: flex-end; }
.auth-top .btn-secondary { padding: 9px 18px; border-radius: 8px; background: #f3f4f6; border-color: #e5e7eb; }
.auth-form-wrap { margin: auto; width: 100%; max-width: 420px; text-align: center; padding: 24px 0; }
.auth-form-wrap h1 { font-size: 32px; letter-spacing: -0.02em; justify-content: center; color: #1b1a22; }
.auth-sub { color: var(--muted); margin: 8px 0 28px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-field { position: relative; }
.auth-field input { height: 54px; padding: 0 48px 0 18px; border: 1px solid #e3e3e8; border-radius: 10px; font-size: 15px; background: #fff; }
.auth-field input::placeholder { color: #8b8a93; }
.auth-field input[aria-invalid="true"] { border-color: var(--danger); }
.auth-field-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #8b8a93; pointer-events: none; }
.auth-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: inline-flex;
            align-items: center; justify-content: center; border: 0; background: none; color: #3c3b44; border-radius: 8px; cursor: pointer; }
.auth-eye:hover { background: #f3f3f5; }
.auth-eye .eye-closed, .auth-eye[aria-pressed="true"] .eye-open { display: none; }
.auth-eye[aria-pressed="true"] .eye-closed { display: inline; }
.btn-mint { height: 54px; margin-top: 18px; border: 0; border-radius: 10px; background: #a7ecc9; color: #17241d;
            font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn-mint:hover { background: #93e3ba; }
.btn-mint:active { background: #84d9ad; }
.auth-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: #fdecec; color: #a12d2d; font-size: 13.5px; text-align: left; }
.auth-help { margin-top: 22px; color: var(--muted); font-size: 13px; }
.auth-legal { display: flex; justify-content: center; gap: 8px; font-size: 12.5px; padding: 16px 0 4px; }
.auth-legal a { color: var(--muted); }
.auth-brand-mobile { display: none; }
.auth-legal-privacy { display: none; }  /* on desktop the privacy link is the top-right button */

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .auth-visual { display: none; }
  .auth-panel { min-height: calc(100vh - 32px); }
  .auth-top { display: none; }
  .auth-legal-privacy { display: inline; }
  .auth-brand-mobile { display: inline-flex; color: var(--text); font-size: 18px; margin-bottom: 28px; }
  .auth-form-wrap h1 { font-size: 26px; }
}
