:root {
  --bg0: #f3f6f4;
  --bg1: #e7eee9;
  --ink: #14201a;
  --muted: #5b6b62;
  --accent: #0f7a5f;
  --accent-ink: #f7fffb;
  --line: rgba(20, 32, 26, 0.12);
  --panel: rgba(255, 255, 255, 0.72);
  --shadow: 0 24px 60px rgba(20, 32, 26, 0.08);
  --radius: 18px;
  --font-sans: "DM Sans", sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d7ebe2 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #cfe0f2 0%, transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
}
main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; background: #0c6550; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: rgba(255,255,255,0.55); }
.btn-small { padding: 0.55rem 0.95rem; font-size: 0.95rem; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

.oauth-buttons {
  display: grid;
  gap: 0.6rem;
  margin: 1.1rem 0 0;
}
.oauth-btn {
  width: 100%;
  gap: 0.6rem;
  font-weight: 600;
}
.or-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 1rem 0 0;
}
.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.hero {
  min-height: calc(100dvh - 144px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 1.5rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  margin: 0 0 0.4rem;
  line-height: 0.95;
  letter-spacing: -0.03em;
  animation: rise 700ms ease both;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  margin: 0 0 1rem;
  line-height: 1.15;
  max-width: 16ch;
  animation: rise 800ms ease 80ms both;
}

.lede {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
  max-width: 38ch;
  margin: 0 0 1.6rem;
  animation: rise 850ms ease 140ms both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 900ms ease 200ms both;
}

.hero-visual {
  display: flex;
  justify-content: center;
  animation: fade 1s ease 250ms both;
}

.orbit {
  position: relative;
  width: min(420px, 90vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.orbit-ring {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(15, 122, 95, 0.25);
  border-radius: 50%;
  animation: spin 28s linear infinite;
}
.orbit-ring.delay {
  inset: 0;
  border-color: rgba(40, 80, 120, 0.18);
  animation-duration: 40s;
  animation-direction: reverse;
}
.orbit-ring::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
}

.chat-preview {
  width: min(280px, 70%);
  display: grid;
  gap: 0.7rem;
  z-index: 1;
}
.bubble {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 0.95rem;
  line-height: 1.4;
}
.bubble.user { justify-self: end; background: #dff3ea; }
.bubble.bot { justify-self: start; animation: pulse 2.8s ease-in-out infinite; }

.page-auth main {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.auth-panel {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.auth-panel h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.2rem;
  margin: 0 0 0.4rem;
}

.muted { color: var(--muted); }
.error {
  color: #8a1f1f;
  background: #fde8e8;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}

.stack-form {
  display: grid;
  gap: 0.9rem;
  margin: 1.2rem 0;
}
label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
  font-size: 0.95rem;
}
label.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
}
label.checkbox input {
  width: auto;
  flex: none;
  margin: 0;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
}
textarea { resize: vertical; min-height: 64px; }

.example summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.92rem;
}
.example[open] summary { margin-bottom: 0.6rem; }
.example pre {
  overflow: auto;
  background: #132019;
  color: #e8f2ec;
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.45;
}
.chat-main { padding: 0; }
.chat-spa {
  height: 100vh;
  height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 0;
}
.chat-root {
  height: 100%;
  min-height: 0;
}
html:has(body.page-chat) {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body.page-chat {
  min-height: 0;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
.page-chat .chat-spa {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}
.ok {
  color: #0f5a40;
  background: #e8f7f0;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.subsection-title {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.settings-section + .settings-section { margin-top: 2.4rem; }
.skill-card {
  width: min(720px, 100%);
}
.check-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.6rem 0;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
}
.check-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.admin-fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.2rem;
  margin: 0;
}
.admin-fieldset legend {
  font-weight: 600;
  padding: 0 0.35rem;
}
.admin-fieldset .muted {
  margin-top: 0;
}
.admin-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--line);
}
.admin-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.9rem;
  margin-bottom: -1px;
  font: inherit;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.admin-tab:hover {
  color: var(--ink);
  text-decoration: none;
}
.admin-tab--active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.2rem;
  align-items: start;
}
.admin-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.admin-section--wide { grid-column: 1 / -1; }
.admin-section .section-title { margin: 0 0 0.5rem; }
.section-settings {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}
.section-settings .cta-row { margin: 0; }
.check-collapse {
  margin-top: 0.6rem;
}
.check-collapse > summary {
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.check-collapse .check-list {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.service-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.service-name {
  font-weight: 500;
}
.service-reasons {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1 1 100%;
  color: var(--muted, #6b7280);
  font-size: 0.92em;
}
.service-reason {
  display: block;
}
.badge {
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.85em;
  white-space: nowrap;
}
.badge-ok {
  background: rgba(37, 165, 89, 0.14);
  color: #1f7a45;
}
.badge-bad {
  background: rgba(211, 100, 66, 0.16);
  color: #a13f1f;
}
/* Статистика использования в админке. */
.admin-stats .stats-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
  margin: 0.4rem 0 1.2rem;
}
.stats-tile {
  display: grid;
  gap: 0.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
  background: rgba(255, 255, 255, 0.55);
}
.stats-value {
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stats-label {
  color: var(--muted);
  font-size: 0.86em;
}
.stats-chart {
  margin: 0 0 1rem;
}
.stats-columns {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 110px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.stats-col {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.stats-bar {
  width: 100%;
  min-height: 1px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
}
.stats-bar--empty {
  background: transparent;
  min-height: 0;
}
.stats-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85em;
  margin-top: 0.2rem;
}
.stats-models {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.stats-models li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.stats-model-name {
  flex: 0 0 auto;
  min-width: 10ch;
  font-weight: 500;
}
.stats-model-track {
  flex: 1 1 160px;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 122, 95, 0.1);
  overflow: hidden;
}
.stats-model-bar {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.stats-model-meta {
  color: var(--muted);
  font-size: 0.9em;
}
.stats-notes {
  font-size: 0.9em;
  display: grid;
  gap: 0.2rem;
}
.stats-notes p { margin: 0; }
.skill-list li > div { display: grid; gap: 0.15rem; }
.catalog-body {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}
.catalog-body p { margin: 0.4rem 0; }
.catalog-body pre {
  overflow: auto;
  background: #132019;
  color: #e8f2ec;
  padding: 0.85rem;
  border-radius: 10px;
}
.stack {
  display: grid;
  gap: 0.9rem;
  margin: 1.2rem 0;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
.page-chat .site-footer { display: none; }

.cookie-consent {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem 1.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: cookie-consent-in 280ms ease;
}
.cookie-consent[hidden] { display: none; }
.cookie-consent-text {
  margin: 0;
  flex: 1 1 14rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}
.cookie-consent-accept {
  flex: 0 0 auto;
}
@keyframes cookie-consent-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.footer-nav a { font-size: 0.9rem; }
.footer-disclaimer {
  flex-basis: 100%;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
}
.about {
  margin: 0;
}
.about h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin: 0 0 1rem;
  line-height: 1.15;
}
.about .lede {
  max-width: none;
  margin: 0 0 2rem;
  animation: none;
  font-size: 1.12rem;
  color: var(--ink);
}
.about section {
  margin: 0 0 1.8rem;
}
.about h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.55rem;
  margin: 0 0 0.55rem;
}
.about p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
  color: var(--ink);
}
.about ul {
  margin: 0.2rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.6;
}
.about li {
  margin: 0.35rem 0;
}
.about-cta {
  margin-top: 2.2rem;
}
.page-catalog main,
.page-about main {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}
.page-about .site-footer,
.page-catalog .site-footer {
  margin-top: 0;
}

.catalog-grid {
  list-style: none;
  margin: 0 0 0.4rem;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.catalog-tile {
  display: grid;
  gap: 0.4rem;
  padding: 1.15rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: transform 180ms ease, border-color 180ms ease;
}
.catalog-tile:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(15, 122, 95, 0.35);
}
.catalog-tile h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
}
.catalog-tile:hover h2 { color: var(--accent); }
.catalog-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.catalog-badge {
  display: inline-block;
  width: fit-content;
  margin: 0 0 0.55rem;
  padding: 0.15rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--muted);
}
.catalog-date { margin: 0.35rem 0 0; font-size: 0.9rem; }
.catalog-prose {
  margin: 1.5rem 0 0;
  padding: 1.35rem 1.45rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.catalog-prose > :first-child { margin-top: 0; }
.catalog-prose > :last-child { margin-bottom: 0; }
.catalog-prose h1,
.catalog-prose h2,
.catalog-prose h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  margin: 1.2rem 0 0.5rem;
}
.catalog-prose h1 { font-size: 1.6rem; }
.catalog-prose h2 { font-size: 1.35rem; }
.catalog-prose h3 { font-size: 1.2rem; }
.catalog-prose p,
.catalog-prose li {
  margin: 0.45rem 0;
  line-height: 1.65;
}
.catalog-prose ul,
.catalog-prose ol {
  margin: 0.4rem 0;
  padding-left: 1.2rem;
}
.catalog-prose pre {
  overflow: auto;
  background: #132019;
  color: #e8f2ec;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.45;
}
.catalog-prose :not(pre) > code {
  font-size: 0.92em;
  background: rgba(20, 32, 26, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}
.catalog-prose blockquote {
  margin: 0.8rem 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 3px solid rgba(15, 122, 95, 0.45);
  color: var(--muted);
}
.cta-row form { margin: 0; }

.auth-panel .lede {
  animation: none;
  max-width: none;
  margin: 0 0 1.2rem;
}
.auth-panel.skill-card,
.skill-card {
  width: min(720px, 100%);
}

.legal h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.2rem 0 0.4rem;
}
.legal p { margin: 0.4rem 0; }
.legal ul { margin: 0.4rem 0; padding-left: 1.2rem; }
.back-link { margin: 0 0 0.75rem; font-size: 0.9rem; }
.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
}
.page-nav__current {
  font-weight: 600;
  color: var(--ink);
}
.page-nav__sep {
  color: var(--muted);
}
.profile-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.2rem 0;
}
.profile-list div {
  display: grid;
  gap: 0.2rem;
}
.profile-list dt {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--muted);
}
.profile-list dd {
  margin: 0;
  font-size: 1.05rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.chat-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 72px);
  max-width: 1200px;
  margin: 0 auto;
}
.chat-side {
  padding: 1.2rem;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  align-content: start;
  background: rgba(255,255,255,0.35);
}
.side-link { font-weight: 500; color: var(--ink); }
.chat-panel {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: calc(100vh - 72px);
}
.messages {
  padding: 1.2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.msg {
  max-width: min(720px, 92%);
  padding: 0.85rem 1rem;
  border-radius: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.user {
  align-self: flex-end;
  background: #dff3ea;
  border: 1px solid rgba(15,122,95,0.18);
}
.msg.assistant {
  align-self: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
}
.msg.error {
  align-self: center;
  background: #fde8e8;
  color: #8a1f1f;
}
.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 1rem 1.2rem 1.3rem;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}@keyframes fade {  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.2rem;
  }
  .hero-visual { order: -1; }
  .orbit { width: min(320px, 80vw); }
  .chat-shell { grid-template-columns: 1fr; }
  .chat-side {
    border-right: none;
    border-bottom: 1px solid var(--line);
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .side-link { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  /* Chat is a full-screen app on mobile: the document itself must not scroll. */
  .page-chat .chat-spa {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 1.25rem 1rem 2.5rem;
  }
  .lede {
    font-size: 1rem;
  }
  .auth-panel {
    padding: 1.2rem;
  }
  .auth-panel h1 {
    font-size: 1.8rem;
  }
  .example pre {
    padding: 0.85rem;
  }
  /* Prevent iOS Safari auto-zoom on focus */
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* === Share page (/s/<key>) === */
.share-main {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}
.share-wrap { display: grid; gap: 1.1rem; }
.share-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  margin: 0.2rem 0 0.5rem;
}
.share-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin: 0;
  width: fit-content;
}
.share-date { font-size: 0.85rem; margin: 0.4rem 0 0; }
.share-log { display: grid; gap: 0.8rem; }
.share-bubble { max-width: 100%; overflow-wrap: break-word; }
.share-bubble.bot { animation: none; }
/* До подключения share.js ответ виден как текст, с переносами строк. */
.share-text,
.share-md:not([data-mounted]) { white-space: pre-wrap; }
.share-name {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.share-missing {
  text-align: center;
  padding: 3rem 1rem;
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}
.share-missing h1 {
  font-family: var(--font-display);
  font-weight: 400;
}

/* --- Профиль (/profile): hero-шапка с инициалами и плитки статистики --- */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.9rem 0 1.2rem;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), #3f9ec0);
  box-shadow: 0 10px 24px rgba(15, 122, 95, 0.28);
  flex: 0 0 auto;
}
.profile-hero__text {
  display: grid;
  gap: 0.15rem;
  margin-right: auto;
  min-width: 0;
}
.profile-hero h1 {
  margin: 0;
}
.profile-email {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  word-break: break-all;
}
.profile-badge {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: rgba(15, 122, 95, 0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.3rem;
}
.profile-stat {
  display: grid;
  gap: 0.2rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}
.profile-stat:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}
.profile-stat__num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.05;
}
.profile-stat__label {
  color: var(--muted);
  font-size: 0.88rem;
}
.profile-card .profile-list {
  margin: 0 0 1.2rem;
}
.profile-card .profile-list div {
  grid-template-columns: 170px 1fr;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--line);
}
.profile-card .profile-list div:last-child {
  border-bottom: none;
}
.profile-chip {
  display: inline-block;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 122, 95, 0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}
@media (max-width: 620px) {
  .profile-card .profile-list div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .profile-hero {
    gap: 0.8rem;
  }
}
