/* Shared by Next.js and the static public shell. See doks/site-design.md. */
:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #65676d;
  --line: #e3e4e7;
  --soft: #f4f4f5;
  --lavender: #ededf0;
  --brand: #f4b6c8;
  --brand-ink: #202124;
  --brand-soft: #fff4f7;
  --accent: #91445d;
  --accent-soft: #a14f69;
  --danger: #b42318;
  --success: #23734c;
  --white: #fff;
  --bg-page: #fff;
  --surface-warm: #fafafa;
  --surface-footer: #fafafa;
  --header-glass: rgb(255 255 255 / 96%);
  --overlay-glass: rgb(255 255 255 / 86%);
  --shadow-color: 24 24 28;
  --scrollbar-thumb: #bfc1c6;
  --logo-invert: 0;
  --on-ink: #fff;
  --radius-control: 12px;
  --radius-card: 20px;
  --radius-shell: 24px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --page-gutter: clamp(20px, 4.5vw, 64px);
  --motion-fast: 160ms;
  color: var(--ink);
  background: var(--bg-page);
}
html[data-theme='dark'] {
  color-scheme: dark;
  --ink: #f2f2f3;
  --muted: #afb1b8;
  --line: #393b40;
  --soft: #292b30;
  --lavender: #30333b;
  --brand-soft: #372b32;
  --accent: #f4b6c8;
  --accent-soft: #f8c9d6;
  --danger: #ffaca5;
  --success: #83d7ab;
  --white: #1e1f23;
  --bg-page: #141518;
  --surface-warm: #232429;
  --surface-footer: #24252a;
  --header-glass: rgb(30 31 35 / 96%);
  --overlay-glass: rgb(30 31 35 / 86%);
  --shadow-color: 0 0 0;
  --scrollbar-thumb: #62656e;
  --logo-invert: 1;
  --on-ink: #1e1f23;
  color: var(--ink);
  background: var(--bg-page);
}
body { font-family: var(--font-golos-text, 'Golos Text'), sans-serif; }
button, input, textarea, select { font: inherit; }
/* Full-page loading mark shared by Next.js and the static shell. */
.page-loader {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: none;
  place-items: center;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--white);
  color: var(--brand);
  opacity: 1;
  touch-action: none;
  transition: opacity .3s ease;
}
html.wm-js .page-loader { display: grid; }
html[data-theme='dark'] .page-loader { background: #17181b; color: var(--brand); }
html.wm-loaded .page-loader--initial,
.page-loader--exiting { opacity: 0; pointer-events: none; }
.page-loader__mark { position: relative; width: clamp(92px, 12vw, 124px); aspect-ratio: 1120 / 825; }
.page-loader__mark::before {
  position: absolute;
  inset: 8% -18% -12%;
  content: '';
  border-radius: 50%;
  background: currentcolor;
  filter: blur(34px);
  opacity: .045;
  animation: page-loader-breathe 1.8s ease-in-out infinite;
}
.page-loader__mark svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
.page-loader__smile-base,
.page-loader__smile,
.page-loader__glint {
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}
.page-loader__dot { fill: currentcolor; }
.page-loader__smile-base { opacity: .1; }
.page-loader__smile {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: page-loader-draw 1.8s cubic-bezier(.65, 0, .35, 1) infinite;
}
.page-loader__glint {
  stroke: #fff;
  stroke-dasharray: .11 .89;
  stroke-dashoffset: .12;
  stroke-width: 2;
  opacity: 0;
  animation: page-loader-glint 1.8s ease-in-out infinite;
}
@keyframes page-loader-draw {
  0% { stroke-dashoffset: 1; opacity: 0; }
  12% { opacity: 1; }
  48%, 68% { stroke-dashoffset: 0; opacity: 1; }
  88%, 100% { stroke-dashoffset: -1; opacity: 0; }
}
@keyframes page-loader-glint {
  0%, 42% { stroke-dashoffset: .12; opacity: 0; }
  52% { opacity: .75; }
  70% { stroke-dashoffset: -.88; opacity: 0; }
  100% { opacity: 0; }
}
@keyframes page-loader-breathe {
  0%, 100% { transform: scale(.82); opacity: .025; }
  50% { transform: scale(1); opacity: .06; }
}
.wm-shell {
  width: min(1380px, calc(100% - 40px));
  min-height: calc(100svh - 40px);
  margin: 20px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  background: var(--white);
  box-shadow: 0 8px 32px rgb(var(--shadow-color) / 3%);
  overflow: clip;
}
.wm-header {
  position: relative;
  z-index: 50;
  min-height: 88px;
  padding: 18px var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.wm-brand { display: flex; align-items: center; flex: 0 0 auto; width: 132px; min-height: 44px; }
.wm-brand img { display: block; width: 100%; height: auto; filter: invert(var(--logo-invert)); }
.wm-nav { flex: 1; display: flex; align-items: center; gap: 8px; margin-left: clamp(20px, 3vw, 48px); font-size: 14px; font-weight: 550; }
.wm-catalog, .wm-account, .wm-icon-button {
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius-control);
  color: inherit; background: transparent; cursor: pointer; text-decoration: none;
  transition: background var(--motion-fast) ease;
}
.wm-account { margin-left: auto; gap: 9px; background: var(--soft); }
.wm-account > span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-account img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.wm-catalog:hover, .wm-icon-button:hover, .wm-menu[open] > summary { background: var(--soft); }
.wm-account:hover { background: var(--line); }
.wm-icon-button { width: 44px; padding: 0; list-style: none; }
.wm-icon-button::-webkit-details-marker { display: none; }
.wm-menu { position: relative; margin-left: -2px; }
.wm-menu-close, .wm-menu[open] .wm-menu-open { display: none; }
.wm-menu[open] .wm-menu-close { display: block; }
.wm-menu-panel {
  position: absolute; right: 0; top: calc(100% + 14px); width: 300px;
  max-height: calc(100dvh - 130px); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--white); box-shadow: 0 16px 48px rgb(var(--shadow-color) / 14%);
}
.wm-menu-group + .wm-menu-group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.wm-menu-group p { margin: 0 0 6px; padding: 8px 12px; border-radius: 8px; background: var(--soft); color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.5; }
.wm-menu-group a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 9px; line-height: 1.4; }
.wm-menu-group a:hover { background: var(--soft); }
.wm-theme { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; margin-top: 12px; padding: 12px; border: 0; border-top: 1px solid var(--line); color: var(--ink); background: transparent; font-size: 14px; cursor: pointer; }
.wm-theme-light, .wm-theme-dark { align-items: center; gap: 10px; }
.wm-theme-light { display: flex; }
.wm-theme-dark { display: none; }
html[data-theme='dark'] .wm-theme-light { display: none; }
html[data-theme='dark'] .wm-theme-dark { display: flex; }
.wm-theme-switch { width: 32px; height: 20px; padding: 3px; border-radius: 10px; background: var(--muted); }
.wm-theme-switch::before { content: ''; display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--white); transition: transform var(--motion-fast) ease; }
html[data-theme='dark'] .wm-theme-switch::before { transform: translateX(12px); }
.wm-footer { padding: 52px var(--page-gutter) 32px; background: var(--surface-footer); color: var(--ink); }
.wm-footer-main { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: start; }
.wm-footer-about { max-width: 280px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.wm-footer-column { min-width: 0; font-size: 14px; line-height: 1.5; }
.wm-footer-column > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; cursor: default; }
.wm-footer-column > summary::-webkit-details-marker { display: none; }
.wm-footer-column > summary > svg { display: none; flex-shrink: 0; }
.wm-footer-column > nav { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.wm-footer-column h2 { margin: 0 0 12px; font-size: 14px; font-weight: 650; letter-spacing: 0; line-height: 1.5; }
.wm-footer-column a { display: flex; align-items: center; min-height: 32px; padding-block: 5px; color: var(--muted); }
.wm-footer-column a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.wm-footer-version { margin: 24px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.wm-footer-logo { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.wm-footer-logo img { display: block; width: 156px; max-width: 100%; height: auto; filter: invert(var(--logo-invert)); }
.wm-header :focus-visible, .wm-footer :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wm-empty-page { min-height: 52svh; display: grid; place-items: center; padding: 64px var(--page-gutter); text-align: center; }
.wm-empty-content { max-width: 520px; }
.wm-empty-code { margin: 0 0 20px; color: var(--muted); font-size: 14px; letter-spacing: .12em; }
.wm-empty-content h1 { margin: 0 0 16px; font-size: clamp(30px, 4vw, 48px); font-weight: 600; line-height: 1.1; letter-spacing: -.04em; }
.wm-empty-content > p:not(.wm-empty-code) { margin: 0 auto 28px; color: var(--muted); line-height: 1.65; }
.wm-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 900px) {
  .wm-footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .wm-footer-about { grid-column: 1 / -1; max-width: 340px; margin-bottom: 12px; }
}
@media (max-width: 760px) {
  .wm-shell { width: 100%; min-height: 100svh; margin: 0; border: 0; border-radius: 0; }
  .wm-header { min-height: 72px; padding: 14px 20px; gap: 12px; }
  .wm-brand { width: 108px; }
  .wm-nav { gap: 4px; }
  .wm-catalog { padding-inline: 12px; }
  .wm-account { width: 44px; padding: 0; }
  .wm-account > span { display: none; }
  .wm-menu-panel { width: min(320px, calc(100vw - 40px)); max-height: calc(100dvh - 100px); }
  .wm-footer { padding-top: 36px; padding-bottom: 24px; }
  .wm-footer-logo { margin-top: 40px; }
  .wm-footer-main { grid-template-columns: 1fr; gap: 0; }
  .wm-footer-about { margin-bottom: 24px; }
  .wm-footer-column { border-bottom: 1px solid var(--line); }
  .wm-footer-column > summary { min-height: 56px; cursor: pointer; }
  .wm-footer-column h2 { margin: 0; }
  .wm-footer-column > summary > svg { display: block; transition: transform var(--motion-fast); }
  .wm-footer-column[open] > summary > svg { transform: rotate(180deg); }
  .wm-footer-column > nav { align-items: stretch; padding-bottom: 16px; }
  .wm-footer-column a { min-height: 44px; }
}
@media (max-width: 480px) {
  .wm-header { padding-inline: 16px; gap: 8px; }
  .wm-brand { width: 96px; }
  .wm-catalog { padding-inline: 9px; }
  .wm-nav { gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .wm-header *, .wm-header *::before, .wm-footer * { transition: none; }
  .page-loader { transition: none; }
  .page-loader__mark::before,
  .page-loader__smile,
  .page-loader__glint { animation: none !important; }
  .page-loader__smile { stroke-dashoffset: 0; opacity: 1; }
  .page-loader__glint { display: none; }
}

.wm-watch, .wm-messages { white-space: nowrap; }
@media (max-width: 760px) {
  .wm-watch { width: auto; padding-inline: 8px; flex-shrink: 0; }
  .wm-messages { display: none; }
  .wm-brand { width: 100px; }
}
@media (max-width: 420px) {
  .wm-header { flex-wrap: nowrap; gap: 6px; padding-inline: 12px; }
  .wm-brand { width: 82px; }
  .wm-nav { min-width: 0; margin-left: 0; justify-content: flex-end; gap: 1px; font-size: 13px; }
  .wm-catalog { padding-inline: 7px; }
  .wm-account { margin-left: auto; }
  .wm-menu-panel { width: min(300px, calc(100vw - 32px)); }
}
@media (max-width: 360px) {
  .wm-watch { display: none; }
}
