/* Верхняя панель вкладок (решение владельца 2026-09-27). Все значения — из tokens.css. Рабочая копия из прототипа claude/design/prototypes/shared/topnav.css. */
.tnav { position: relative; z-index: 100; display: flex; align-items: center; gap: var(--sp-4); height: var(--nav-h); padding: 0 var(--gutter);
  background: var(--bg-deep); border-bottom: 1px solid var(--line-soft); flex: none; }
@media (min-width: 700px) { .tnav { padding: 0 var(--sp-6); } }
.tn-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--head); text-decoration: none; font: 600 var(--fs-18)/1 var(--font-ui);
  padding: 6px 10px 6px 4px; border-radius: var(--r-pill); }
.tn-logo:hover { background: var(--surface); }
.tn-tabs { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tn-tabs::-webkit-scrollbar { display: none; }
.tn-sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; flex: none; }
a.tn-b { text-decoration: none; }
.tn-b[hidden] { display: none; }            /* колокольчик гостю не показывается: display у .tn-b иначе перебивает hidden */
.tn-b { display: inline-flex; align-items: center; flex: none; height: 40px; min-width: 40px; padding: 0 11px; border: 1px solid transparent; border-radius: var(--r-pill);
  background: none; color: var(--muted); cursor: pointer; font: 500 var(--fs-14)/1 var(--font-ui); white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.tn-b svg { width: 18px; height: 18px; flex: none; stroke: currentColor; }
.tn-t { max-width: 0; overflow: hidden; opacity: 0; transition: max-width var(--t-mid) var(--ease), opacity var(--t-mid) var(--ease), margin var(--t-mid) var(--ease); }
.tn-t small { font-size: var(--fs-12); font-weight: 400; opacity: .8; margin-left: 4px; }
/* наведение, фокус, открытый поиск: подпись раскрывается, кнопка заливается латунью */
.tn-b:hover, .tn-b:focus-visible, .tn-b.tn-open { background: var(--accent); color: var(--on-accent); }
.tn-b:hover .tn-t, .tn-b:focus-visible .tn-t, .tn-b.tn-open .tn-t { max-width: 180px; opacity: 1; margin-left: 8px; }
.tn-b:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* текущая вкладка — латунный значок и рамка */
.tn-b.tn-cur { color: var(--accent); border-color: var(--accent-a35); background: var(--accent-a10); }
.tn-b.tn-cur:hover, .tn-b.tn-cur.tn-open, .tn-b.tn-cur:focus-visible { color: var(--on-accent); background: var(--accent); }

/* поиск токена под кнопкой Reckoning / Canopy / Rings */
.tn-pop { position: absolute; z-index: 101; top: calc(var(--nav-h) - 2px); width: 340px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-3); box-shadow: var(--shadow-2); padding: 10px; display: grid; gap: 8px; }
.tn-pop[hidden] { display: none; }
.tn-pop .tn-h { font-size: var(--fs-12); color: var(--muted); padding: 2px 4px; }
.tn-pop .tn-h b { color: var(--head); font-weight: 600; }
.tn-q { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-pill); padding: 0 12px; min-height: 38px; }
.tn-q:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.tn-q input { border: 0; background: none; outline: none; color: var(--head); font: var(--fs-14) var(--font-ui); width: 100%; }
.tn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 320px; overflow: auto; }
.tn-tok { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border-radius: var(--r-2); color: var(--text); text-decoration: none; }
.tn-tok b { color: var(--head); font: 600 var(--fs-14)/1.2 var(--font-ui); }
.tn-tok .ad { font: var(--fs-12)/1.2 var(--font-mono); color: var(--muted); text-align: right; }
.tn-tok .mt { grid-column: 1 / -1; font-size: var(--fs-12); color: var(--muted); }
.tn-tok.tn-coin { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.tn-tok.tn-coin .mt { grid-column: 2 / -1; }
a.tn-tok.tn-rebuild { animation: tn-rebuild 1.8s ease-in-out infinite; }
a.tn-tok.tn-rebuild:not(:hover):not(.act):not(:focus-visible) .mt { color: var(--accent-hi); }
@keyframes tn-rebuild { 50% { opacity: .58; } }
@media (prefers-reduced-motion: reduce) { a.tn-tok.tn-rebuild { animation: none; } }
a.tn-tok:hover, a.tn-tok.act, a.tn-tok:focus-visible { background: var(--accent); color: var(--on-accent); outline: none; }
a.tn-tok:hover b, a.tn-tok.act b, a.tn-tok:focus-visible b, a.tn-tok:hover .ad, a.tn-tok.act .ad, a.tn-tok:focus-visible .ad, a.tn-tok:hover .mt, a.tn-tok.act .mt, a.tn-tok:focus-visible .mt { color: var(--on-accent); }
.tn-tok .tn-s { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }   /* лёгкий токен: символ и сеть (17.10) */
.tn-tok .tn-net { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-12); color: var(--muted); white-space: nowrap; }
.tn-tok .tn-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 25%, transparent); }
a.tn-tok:is(:hover, .act, :focus-visible) .tn-net { color: var(--on-accent); }
.tn-tok.off { cursor: not-allowed; }
.tn-tok.off b { color: var(--muted); }
.tn-empty { font-size: var(--fs-13); color: var(--muted); padding: 8px 10px; }
.tn-err { color: var(--warn); font-weight: 400; }
/* поиск под «Reckoning · адрес» (RE7, 30.09): группы результатов; строка адреса — имя, метка, где встречается */
.tn-pop.tn-srch { width: 420px; }   /* поиск: имя, метка и «где встречается» — шире списка токенов (ПРЕДЛОЖЕНИЕ) */
.tn-pop.tn-srch .tn-list { max-height: min(440px, 60vh); }
.tn-gh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; padding: 10px 10px 4px; font-size: var(--fs-12); color: var(--muted); }
.tn-gh:first-child { padding-top: 2px; }
.tn-gh b { color: var(--head); font-weight: 600; }
.tn-gb { display: inline-flex; align-items: center; gap: 6px; }
.tn-tok.tn-r { grid-template-columns: minmax(0, 1fr) auto; }
.tn-tok.tn-r > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-tok .mt b { font: 600 var(--fs-12)/1.3 var(--font-ui); color: var(--text); }   /* символ токена в строке «где встречается» */
.tn-tok .none { color: var(--muted); font-weight: 400; }
a.tn-tok:not(:hover):not(.act):not(:focus-visible) :is(b, .ad).lbh { color: var(--cn-label); }   /* адрес с меткой (кроме ENS и мультисига): имя и адрес цветом метки; под курсором — как все */
.tn-tok .tn-nt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* заметка — одной строкой */
a.tn-tok:is(:hover, .act, :focus-visible) :is(.none, .badge) { color: var(--on-accent); }
a.tn-tok:is(:hover, .act, :focus-visible) .badge { background: transparent; border-color: currentColor; }
.tn-empty a { color: var(--head); }

/* гостю: вход (Logto; регистрации нет — доступ выдаёт владелец) */
.tn-sb { margin-left: auto; }   /* поиск — справа, перед колокольчиком и входом */
.tn-sb ~ .tn-bell, .tn-sb ~ .tn-auth { margin-left: 0; }
.tn-auth { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: none; }
.tn-lc { margin-left: 5px; font: 700 var(--fs-12)/1 var(--font-ui); letter-spacing: .06em; }   /* язык RU / EN (16.10): код виден всегда, название — при наведении */
.tn-sb ~ .tn-lang { margin-left: 0; }
.tn-sb ~ .tn-legal { margin-left: 0; }   /* документы (10.11) — рядом с языком */
.tn-auth[hidden] { display: none; }
.tn-auth a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--r-pill); font: 600 var(--fs-13)/1 var(--font-ui); text-decoration: none; white-space: nowrap; }
.tn-in { background: var(--accent); color: var(--on-accent); }
.tn-in:hover { background: var(--accent-hi); }
.tn-auth a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 760px) { .tn-auth a { height: 32px; padding: 0 10px; } }
/* узкий экран (аудит 27.10, 10.1): вместо полосы значков — кнопка «≡» и список разделов с подписями под панелью */
.tn-mb { display: none; }
@media (max-width: 520px) {
  .tn-mb { display: inline-flex; }
  .tn-tabs { display: none; }
  .tnav.tn-mopen .tn-tabs { display: grid; position: absolute; z-index: 102; top: calc(var(--nav-h) - 2px); left: 8px; width: min(300px, calc(100vw - 16px)); gap: 2px; padding: 8px;
    overflow: visible; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--shadow-2); }
  .tnav.tn-mopen .tn-tabs .tn-b { width: 100%; height: 44px; padding: 0 12px; justify-content: flex-start; }
  .tnav.tn-mopen .tn-tabs .tn-t { max-width: none; opacity: 1; margin-left: 12px; }
  .tnav.tn-mopen .tn-sep { width: auto; height: 1px; margin: 4px 6px; }
  .tn-mb[aria-expanded="true"] { background: var(--accent); color: var(--on-accent); }
}
@media (max-width: 760px) { .tn-logo span.w { display: none; } .tnav { gap: var(--sp-2); } .tn-tabs { gap: 2px; } .tn-b { height: 34px; min-width: 32px; padding: 0 7px; } .tn-b svg { width: 16px; height: 16px; } .tn-sep { margin: 0 2px; } }
