/* ==========================================================================
   Adept Monitoring — interface styles
   Palette lifted from adeptmoving.com: navy #162a39, gold #f4bf42,
   sky #dbf1fa (the colour of the logo mark).
   Committed to a single light theme with navy chrome — this is an operations
   console, and one well-tuned surface beats two half-tuned ones.

   TYPE: one reading ladder of three steps, plus two systems that stand apart
   from it. The ladder is what a page is read down:
     --t-title    24px  the page title
     --t-heading  18px  subheadings — card titles, the deck under the title,
                        empty-state headlines
     --t-body     14px  the content itself
   Each step is a third larger than the one below, so the level is legible
   before a word is read. Weight and colour then separate roles *within* a
   step (600/--ink, 400/--ink, 400/--ink-2, 400/--muted) — they are not a
   substitute for the step itself, which is how the card titles once collapsed
   into the body text.

   Outside the ladder:
     --t-metric   30px  dashboard figures. The loudest thing on the screen,
                        because reading them from across the room is the job.
     --t-nav      14px  sidebar navigation — chrome, not content
     --t-caption  11px  system captions: column heads, badges, metric labels.
                        Uppercase for fixed wording; left alone when it carries
                        data (ids, URLs, counts) — caps mangle those.
   Monospace shares these sizes and separates itself by family and colour.
   Six values, each with a reason. Every size that lacks one is how the first
   version of this file ended up with eighteen.
   ========================================================================== */

@font-face {
  font-family: 'InterVar';
  src: url('/static/fonts/Inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

:root {
  --navy: #162a39;
  --navy-soft: #22394a;
  --navy-line: #2c4457;
  --gold: #f4bf42;
  /* 3.25:1 на белом было мало для звёзд рейтинга — теперь 4.53:1. */
  --gold-deep: #996f09;
  --sky: #dbf1fa;

  --paper: #f6f8fa;
  --surface: #ffffff;
  --ink: #16232e;
  --ink-2: #46586a;
  /* Измерено, а не подобрано: прежний #7a8b9a давал 3.51:1 на белом, 3.29 на
     --paper и 3.12 на --line-soft — ниже 4.5:1, которые WCAG требует для
     обычного текста. А этим цветом набрано всё второстепенное: даты, подписи
     под строками, пояснения — и набрано на 11px. Тон тот же, светлота ниже:
     5.10 / 4.79 / 4.53 на тех же трёх фонах. */
  --muted: #60707e;
  --line: #e2e8ee;
  --line-soft: #eef2f6;

  --ok: #17795e;
  --ok-bg: #e4f4ee;
  --warn: #8a6008;
  --warn-bg: #fbf1dc;
  --bad: #b8321f;
  --bad-bg: #fbe9e6;
  --info: #1c6a8e;
  --info-bg: #e3f1f8;

  --sidebar-w: 15rem;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(22, 42, 57, .06);
  --shadow: 0 1px 3px rgba(22, 42, 57, .08), 0 8px 24px -18px rgba(22, 42, 57, .5);

  --sans: 'InterVar', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;

  /* Reading ladder — heading, subheading, content. */
  --t-title: 1.5rem;
  --t-heading: 1.125rem;
  --t-body: 0.875rem;

  /* Systems that sit outside the reading ladder. */
  --t-metric: 1.875rem;
  --t-nav: 0.875rem;
  --t-caption: 0.6875rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }

/* ---------- shell ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--navy);
  color: #cfdae3;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.75rem 1rem;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 0.625rem; padding: 0 0.5rem; }
.brand img { width: 30px; height: auto; display: block; }
.brand-name { color: #fff; font-weight: 600; font-size: var(--t-nav); line-height: 1.15; }
.brand-sub {
  color: #7f97a9; font-size: var(--t-caption); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; line-height: 1.4;
}

.nav-group { display: flex; flex-direction: column; gap: 0.125rem; }
.nav-label {
  color: #6d8598; font-size: var(--t-caption); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0 0.75rem; margin-bottom: 0.375rem;
}
.nav-item {
  display: block; padding: 0.44rem 0.75rem; border-radius: 6px;
  color: #cfdae3; font-size: var(--t-nav); text-decoration: none;
}
.nav-item:hover { background: var(--navy-soft); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--navy-soft); color: #fff; font-weight: 550; box-shadow: inset 2px 0 0 var(--gold); }

.nav-spacer { flex: 1; }
.nav-foot { border-top: 1px solid var(--navy-line); padding-top: 0.75rem; }

/* ---------- main ---------- */

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 1rem 2rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.topbar h1 {
  margin: 0; font-size: var(--t-title); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.2;
}
.topbar .sub {
  color: var(--muted); font-size: var(--t-heading); font-weight: 400;
  line-height: 1.35; margin-top: 0.15rem;
}
.topbar .spacer { flex: 1; }

.content {
  padding: 1.5rem 2rem 3rem;
  max-width: 72rem;
  width: 100%;
  display: flex; flex-direction: column; gap: 1.25rem;
}

/* ---------- tabs ---------- */

/* Plain links, not scripted panels: the sign-in form re-renders the page when
   Telegram asks for a password, and a tab that forgets where it was mid-login
   is worse than no tabs at all. */
.tabs {
  display: flex; flex-wrap: wrap; gap: 0.15rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.25rem;
}
.tab {
  padding: 0.5rem 0.9rem;
  color: var(--muted); text-decoration: none; font-weight: 550;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.active { color: var(--ink); border-bottom-color: var(--gold); }
.tab:focus-visible { border-radius: 4px 4px 0 0; }

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.4rem;
}
.card > h2 {
  margin: 0 0 1rem; font-size: var(--t-heading); font-weight: 600;
  line-height: 1.3; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 0.5rem;
}
.card > h2 .count { color: var(--muted); font-weight: 400; font-size: var(--t-body); }
.card-tight { padding: 0; overflow: hidden; }
.card-tight > h2 { padding: 1.15rem 1.4rem 0; }

/* ---------- metrics ---------- */

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.875rem; }
.metric {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.9rem 1rem;
}
.metric-value {
  font-size: var(--t-metric); font-weight: 600; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
/* Every figure in the row sits on one step. A tile whose value is a time keeps
   the clock here and moves the date into its caption — bending the content to
   the size, not the size to the content, which is what made the row step. */
.metric-label {
  font-size: var(--t-caption); font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.25rem;
}
.metric.is-ok .metric-value { color: var(--ok); }
.metric.is-warn .metric-value { color: var(--warn); }
.metric.is-bad .metric-value { color: var(--bad); }
.metric.is-info .metric-value { color: var(--info); }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-body); }
th, td { text-align: left; padding: 0.6rem 1.4rem; border-bottom: 1px solid var(--line-soft); }
thead th {
  font-size: var(--t-caption); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 600; background: #fafcfd;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fbfdfe; }
td.num { font-variant-numeric: tabular-nums; }
td.id { font-family: var(--mono); font-size: var(--t-body); color: var(--ink-2); white-space: nowrap; }

/* Second line inside a cell: a count, a check type, a repeat tally. Label tier,
   but left in sentence case — it carries data, and caps would slow it down. */
.cell-note {
  font-size: var(--t-caption); color: var(--muted); line-height: 1.5; margin-top: 0.15rem;
}

/* ---------- badges ---------- */

.badge {
  display: inline-block; font-size: var(--t-caption); font-weight: 600;
  padding: 0.2rem 0.45rem; border-radius: 4px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.3;
}
.badge-ok, .badge-passed, .badge-online, .badge-complete, .badge-baseline, .badge-resolved,
.badge-uploaded, .badge-approved { background: var(--ok-bg); color: var(--ok); }
.badge-warn, .badge-warning, .badge-suspected, .badge-incomplete { background: var(--warn-bg); color: var(--warn); }
.badge-bad, .badge-failed, .badge-missing, .badge-open { background: var(--bad-bg); color: var(--bad); }
.badge-info, .badge-running, .badge-returned, .badge-pending,
.badge-uploading { background: var(--info-bg); color: var(--info); }
.badge-added, .badge-edited { background: var(--sky); color: #1a5570; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; padding: 0.45rem 0.9rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-family: inherit; font-size: var(--t-body); font-weight: 550;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: #f3f6f9; text-decoration: none; }
.btn-danger {
  border-color: #e7bdb5; color: var(--bad);
}
.btn-danger:hover { background: var(--bad-bg); }

.btn-primary { background: var(--gold); border-color: #e0ac2c; color: #3d2f06; }
.btn-primary:hover { background: #f6c95f; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- notices ---------- */

.notice {
  padding: 0.75rem 1rem; border-radius: 6px; font-size: var(--t-body);
  border: 1px solid transparent;
}
.notice-ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe3d5; }
.notice-info { background: var(--info-bg); color: var(--info); border-color: #c3ddea; }
.notice-warn { background: var(--warn-bg); color: var(--warn); border-color: #eddcb4; }
.notice-bad { background: var(--bad-bg); color: var(--bad); border-color: #f0cec8; }

/* ---------- presence strip (the signature element) ---------- */

.strip { display: inline-flex; gap: 2px; align-items: center; }
.strip i {
  width: 9px; height: 18px; border-radius: 2px; display: inline-block;
  background: var(--line); flex: 0 0 auto; position: relative;
}
.strip i.on { background: #2f8f6d; }
.strip i.off { background: #d0452e; }

/* Hover label. It sits *below* the cell on purpose: the strip lives inside a
   horizontally scrolling container, which clips anything above it. The wrapper
   reserves room underneath so nothing gets cut off. */
.strip i[data-label]::after {
  content: attr(data-label);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  font-size: var(--t-caption);
  font-family: var(--mono);
  line-height: 1.35;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.1s ease;
  z-index: 5;
}
/* Near the ends the centred label would run past the container edge and get
   clipped, so the first and last cells anchor their label inward instead.
   Order matters: a short strip makes a cell both first and last, and aligning
   left is the safe answer — there is always room to the right. */
.strip i[data-label]:nth-last-child(-n+7)::after { left: auto; right: 0; transform: none; }
.strip i[data-label]:nth-child(-n+7)::after { left: 0; right: auto; transform: none; }

.strip i[data-label]:hover::after { opacity: 1; visibility: visible; }
.strip i[data-label]:hover { outline: 2px solid var(--navy); outline-offset: 1px; }

/* Room for the hover label to render inside the scrolling box. */
.strip-hoverable { overflow-x: auto; padding-bottom: 2.4rem; }
/* Same reason, for tables whose rows carry strips: the last row needs clearance. */
.table-wrap.strip-rows { padding-bottom: 2.2rem; }
.strip-legend {
  display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap;
  font-size: var(--t-body); color: var(--muted); margin-top: 0.9rem;
}
.strip-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.swatch { width: 9px; height: 14px; border-radius: 2px; display: inline-block; background: var(--line); }
.swatch.on { background: #2f8f6d; }
.swatch.off { background: #d0452e; }

/* ---------- misc ---------- */

.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: var(--t-body); color: var(--ink-2); }
.empty { padding: 2.5rem 1.4rem; text-align: center; color: var(--muted); }
.empty strong {
  display: block; color: var(--ink-2); margin-bottom: 0.35rem;
  font-size: var(--t-heading); font-weight: 600; line-height: 1.3;
}
.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.stars { color: var(--gold-deep); letter-spacing: 0.05em; }
.review-text { color: var(--ink-2); font-size: var(--t-body); margin-top: 0.2rem; }
/* A message as it was typed. The line breaks are the author's and are the whole
   difference between a note and a wall of words, so they are kept rather than
   collapsed; the width is held back because a message read on a phone was never
   written to run the width of a desktop table. */
.msg-body {
  color: var(--ink-2); font-size: var(--t-body);
  white-space: pre-wrap; overflow-wrap: anywhere; max-width: 44rem;
}
.pager { display: flex; gap: 0.9rem; align-items: center; padding: 0.9rem 1.4rem; border-top: 1px solid var(--line-soft); font-size: var(--t-body); }

dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.25rem; margin: 0; font-size: var(--t-body); }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

/* ---------- form controls outside the sign-in card ---------- */

.field-label {
  display: block; font-size: var(--t-caption); font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem;
}
.input, .textarea {
  padding: 0.45rem 0.65rem; border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit; font-size: var(--t-body); color: var(--ink); background: var(--surface);
}
.textarea { color: var(--ink-2); width: 100%; max-width: 36rem; }
/* .input sets font-family:inherit and is declared after .mono, so a field that
   wants monospace needs the higher-specificity rule to win it back. */
.input.mono, .textarea, .textarea.mono { font-family: var(--mono); }
.input:focus, .textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(244, 191, 66, .25);
}

/* ---------- login ---------- */

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--navy); padding: 1.5rem;
}
.login-card {
  background: var(--surface); border-radius: 10px; padding: 1.75rem;
  width: 100%; max-width: 21rem; box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .5);
}
.login-card .brand { padding: 0; margin-bottom: 1.25rem; }
.login-card label {
  display: block; font-size: var(--t-caption); color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem;
}
.login-card input {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--line);
  border-radius: 6px; font-size: var(--t-body); font-family: inherit; margin-bottom: 0.9rem;
  background: #fcfdfe; color: var(--ink);
}
.login-card input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(244, 191, 66, .25); }
.login-card .btn { width: 100%; text-align: center; padding: 0.6rem; }

/* ---------- responsive ---------- */

@media (max-width: 56rem) {
  /* Same step, smaller screen: at two cards per row a 30px figure wraps, and a
     wrapped figure is exactly the stepping this row was flattened to avoid. */
  :root { --t-metric: 1.5rem; }

  .shell { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: static;
    flex-direction: row; align-items: center; flex-wrap: wrap;
    gap: 0.75rem; padding: 0.75rem 1rem;
  }
  .nav-group { flex-direction: row; flex-wrap: wrap; align-items: center; }
  /* Подпись группы остаётся видимой. Скрытая, она давала три пункта
     «Overview» подряд — от мониторинга, отзывов и видео, — которые на узком
     экране отличить нечем. */
  .nav-label {
    margin: 0 0.15rem 0 0; padding: 0; align-self: center;
    border-right: 1px solid var(--navy-line); padding-right: 0.6rem;
  }
  .nav-spacer { display: none; }
  .nav-foot { border-top: none; padding-top: 0; }
  .topbar, .content { padding-left: 1rem; padding-right: 1rem; }
  th, td { padding-left: 1rem; padding-right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- jobs by city ----------
   The reading half of the photo archive. Everything here is sized around one
   question — can somebody describe what is in the frame — so the grid stays on
   320px previews for speed and the full copy is fetched for one frame at a
   time, in the overlay. */

.crumb { font-size: var(--t-body); color: var(--muted); margin-bottom: 0.75rem; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--ink); }

.place-title {
  font-size: var(--t-heading); font-weight: 600; color: var(--ink);
  line-height: 1.3; letter-spacing: -0.01em;
}

.job { padding: 1rem 1.15rem; margin-bottom: 0.875rem; }
.job-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem;
}
.job-title { font-size: var(--t-body); font-weight: 600; color: var(--ink); }

.thumb-strip { display: flex; gap: 0.4rem; align-items: center; text-decoration: none; }
.thumb-strip:hover { text-decoration: none; }
.thumb-strip img, .thumb-blank {
  width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 6px;
  background: var(--line-soft); display: block; flex: 0 0 auto;
}
.thumb-more {
  font-size: var(--t-caption); font-weight: 600; color: var(--muted);
  padding-left: 0.25rem;
}

.frame-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.875rem;
}
.frame {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.frame-open {
  display: block; width: 100%; padding: 0; border: 0; background: var(--line-soft);
  cursor: zoom-in; position: relative; line-height: 0;
}
.frame-open img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.frame-missing {
  cursor: default; aspect-ratio: 1; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 1rem; line-height: 1.4;
  font-size: var(--t-caption); color: var(--muted);
}
/* Said on the picture, not beside it: a thumbnail that reaches a page looking
   like a photograph is a mistake nobody catches until it is live. */
.frame-flag {
  position: absolute; left: 0.4rem; bottom: 0.4rem;
  background: var(--warn-bg); color: var(--warn);
  font-size: var(--t-caption); font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.15rem 0.35rem; border-radius: 4px;
  line-height: 1.3;
}
.frame figcaption { padding: 0.6rem 0.7rem; font-size: var(--t-body); }

/* The class sets display, so it has to take the attribute back: a bare [hidden]
   loses to any class rule, and an invisible overlay pinned across the viewport
   swallows every click on the page behind it. */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 40; background: rgba(22, 42, 57, 0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem; gap: 0.75rem; cursor: zoom-out;
}
.lightbox img {
  max-width: min(100%, 1400px); max-height: calc(100vh - 7rem);
  object-fit: contain; border-radius: 6px; cursor: default;
}
.lightbox-caption { color: #dbe6ee; font-size: var(--t-body); }
.lightbox-close {
  position: absolute; top: 1rem; right: 1.25rem; border: 0; background: none;
  color: #dbe6ee; font-size: 2rem; line-height: 1; cursor: pointer; padding: 0.25rem;
}

/* ---------- accounts and permissions ----------
   The permission list is read far more often than it is changed, so it is laid
   out to be scanned: one line per section, the tick where the eye already is. */


.perm-form { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; align-items: center; }
.perm {
  display: inline-flex; align-items: flex-start; gap: 0.35rem;
  font-size: var(--t-body); color: var(--ink-2); cursor: pointer; line-height: 1.35;
}
.perm input { margin-top: 0.15rem; flex: 0 0 auto; }
.perm:hover { color: var(--ink); }

.perm-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.6rem 1.2rem; margin-top: 0.4rem;
}
.perm-block { align-items: flex-start; }
.perm-block strong { display: block; color: var(--ink); font-weight: 600; }
.perm-block .cell-note { margin-top: 0.1rem; }

/* An account that is off, and one this page cannot edit, should read as
   different states rather than as the same grey. */
tr.is-off td { opacity: 0.55; }
tr.is-env td { background: var(--line-soft); }

/* ---------- the account button ----------
   Top right, where a person looks to check whose session this is. Initials
   rather than a silhouette: a generic avatar on every account says nothing,
   and there is nowhere here to upload a photograph. */

.account { position: relative; }

.avatar {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  border: 1px solid hsl(var(--avatar-hue, 210) 35% 72%);
  background: hsl(var(--avatar-hue, 210) 45% 93%);
  color: hsl(var(--avatar-hue, 210) 45% 28%);
  font-family: inherit; font-size: var(--t-caption); font-weight: 700;
  letter-spacing: 0.04em; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.avatar:hover { filter: brightness(0.97); }
.avatar:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* The class sets display, so it has to take the attribute back — a bare
   [hidden] loses to any class rule. */
.account-menu[hidden] { display: none; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 30;
  min-width: 12rem; padding: 0.35rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 0.15rem;
}
.account-name {
  padding: 0.45rem 0.6rem 0.5rem; border-bottom: 1px solid var(--line-soft);
  margin-bottom: 0.15rem;
}
.account-name strong {
  display: block; font-size: var(--t-body); font-weight: 600; color: var(--ink);
  word-break: break-all;
}
.account-action {
  display: block; padding: 0.45rem 0.6rem; border-radius: 6px;
  font-size: var(--t-body); color: var(--ink-2); text-decoration: none;
}
.account-action:hover { background: var(--line-soft); color: var(--ink); text-decoration: none; }
