/* ArtIScope prototype — design system.
 *
 * Tokens and component rules follow the Artiscope design code v1.0
 * (design_code_01-09-2026/tbank/project/design-code.md). Structure borrows the
 * principle of tbank.ru — big type, tiles of different widths, yellow as the
 * only call to action — not its brand elements.
 *
 * Rules worth remembering when editing:
 *   - yellow means action; at most one yellow tile per screen;
 *   - text on yellow is always graphite, never white;
 *   - no gradients, no coloured left borders, shadows no heavier than --shadow-2.
 */

/* ── fonts ──────────────────────────────────────────────────────────────── */
/* Self-hosted Manrope, the same subsets as the landing: Cyrillic is a must
   for the Ukrainian interface, and nothing is fetched from Google. */
@font-face{
  font-family:"Manrope"; font-style:normal; font-weight:400 800; font-display:swap;
  src:url("../../fonts/manrope-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
                U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,
                U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:"Manrope"; font-style:normal; font-weight:400 800; font-display:swap;
  src:url("../../fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,
                U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,
                U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face{
  font-family:"Manrope"; font-style:normal; font-weight:400 800; font-display:swap;
  src:url("../../fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* JetBrains Mono — the second font of the design code (numbers, code, the
   Web3 page). Variable 400–700, self-hosted for the same reasons as Manrope;
   browsers fetch it only on pages that actually use it. */
@font-face{
  font-family:"JetBrains Mono"; font-style:normal; font-weight:400 700; font-display:swap;
  src:url("../../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
                U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,
                U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:"JetBrains Mono"; font-style:normal; font-weight:400 700; font-display:swap;
  src:url("../../fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root{
  --brand-500:#FFC300; --brand-600:#E8B000; --brand-700:#CC9B00;
  --brand-100:#FFF3CC; --brand-050:#FFFAEB;

  --ink-900:#1C1C1C; --ink-800:#2B2B2B; --ink-600:#5C5C58; --ink-400:#9A9A94;
  --ink-200:#DCDCD8; --ink-100:#EFEFEC; --ink-050:#F7F7F5; --white:#FFFFFF;

  --success:#1FA85D; --success-bg:#E8F6EE;
  --warning:#F58220; --warning-bg:#FEF1E6;
  --danger:#E02B2B;  --danger-bg:#FCEAEA;
  --info:#2B6BE0;    --info-bg:#EAF0FC;

  --bg-page:var(--ink-050);
  --bg-surface:var(--white);
  --bg-surface-alt:var(--ink-050);
  --bg-muted:var(--ink-100);
  --text-primary:var(--ink-900);
  --text-secondary:var(--ink-600);
  --text-tertiary:var(--ink-400);
  --border:var(--ink-200);
  --separator:var(--ink-100);
  --surface-border:transparent;          /* on light the shadow carries the tile */
  --header-bg:rgba(255,255,255,.85);

  /* The graphite carrier of the brand: footer, promo tiles, dark sections. */
  --dark-bg:var(--ink-900);
  --dark-card:var(--ink-800);
  --on-dark:#FFFFFF;
  --on-dark-2:rgba(255,255,255,.65);
  --on-dark-line:rgba(255,255,255,.12);

  --font-sans:"Manrope",-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;

  --space-1:4px;  --space-2:8px;  --space-3:12px; --space-4:16px;
  --space-5:24px; --space-6:32px; --space-7:48px; --space-8:64px;
  --space-9:96px; --space-10:128px;

  --radius-sm:8px; --radius-md:12px; --radius-lg:20px; --radius-xl:28px; --radius-full:999px;

  --shadow-1:0 1px 2px rgba(28,28,28,.06), 0 2px 8px rgba(28,28,28,.04);
  --shadow-2:0 4px 12px rgba(28,28,28,.08), 0 12px 32px rgba(28,28,28,.06);
  --shadow-focus:0 0 0 3px rgba(255,195,0,.45);

  --ease:cubic-bezier(.2,.6,.2,1);
  --dur-fast:120ms; --dur-base:200ms; --dur-slow:320ms;

  --container:1280px;
  --gutter:16px;
  --header-h:56px;
  --tabbar-h:0px;
  --section-y:56px;
}
@media (min-width:768px){ :root{ --gutter:24px; --section-y:72px; } }
@media (min-width:1024px){ :root{ --gutter:40px; --header-h:72px; --section-y:96px; } }

/* Dark theme of section 2 — only on an explicit choice, like the landing. */
:root[data-theme="dark"]{
  --brand-500:#FFC93D; --brand-600:#F0B92A; --brand-100:rgba(255,201,61,.16); --brand-050:rgba(255,201,61,.08);
  --bg-page:#141414; --bg-surface:#1C1C1C; --bg-surface-alt:#232323; --bg-muted:#2A2A28;
  --text-primary:#F5F5F3; --text-secondary:#A8A8A2; --text-tertiary:#7C7C77;
  --border:#333330; --separator:#2A2A28;
  --surface-border:#2C2C2A;              /* shadows do not read on dark */
  --header-bg:rgba(20,20,20,.85);
  --dark-bg:#0D0D0D; --dark-card:#1F1F1E;
  --success-bg:rgba(31,168,93,.16); --warning-bg:rgba(245,130,32,.16);
  --danger-bg:rgba(224,43,43,.16);  --info-bg:rgba(43,107,224,.18);
  --shadow-1:none;
  --shadow-2:0 8px 28px rgba(0,0,0,.45);
}

/* ── base ───────────────────────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%; scroll-padding-top:calc(var(--header-h) + 16px)}
body{
  margin:0; min-height:100vh;
  background:var(--bg-page); color:var(--text-primary);
  font-family:var(--font-sans); font-size:16px; line-height:1.55;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  padding-bottom:var(--tabbar-h);
}
/* The English copy is swapped in by core.js; hide the page until then so it
   does not flash in Ukrainian first. */
html.i18n-pending body{visibility:hidden}

img,svg{display:block;max-width:100%}
a{color:inherit}
button,input,select,textarea{font:inherit;color:inherit}
h1,h2,h3,h4,p{margin:0}
h1,h2,h3,h4{text-wrap:balance}
p{text-wrap:pretty}
ul,ol{margin:0;padding:0}
:focus-visible{outline:none;box-shadow:var(--shadow-focus);border-radius:var(--radius-sm)}
::selection{background:var(--brand-100)}

.container{width:100%;max-width:var(--container);margin:0 auto;padding:0 var(--gutter)}
.section{padding:var(--section-y) 0}
.section--tight{padding:calc(var(--section-y) * .5) 0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.mono{font-family:var(--font-mono);font-variant-numeric:tabular-nums}
.muted{color:var(--text-secondary)}
.nums{font-variant-numeric:tabular-nums}
[hidden]{display:none !important}

.skip{position:absolute;left:16px;top:-60px;z-index:100;padding:12px 16px;border-radius:var(--radius-md);
  background:var(--brand-500);color:var(--ink-900);font-weight:600;text-decoration:none}
.skip:focus{top:12px}

/* ── typography ─────────────────────────────────────────────────────────── */
.display{font-size:36px;font-weight:800;line-height:1.05;letter-spacing:-.02em}
.h1{font-size:32px;font-weight:800;line-height:1.1;letter-spacing:-.02em}
.h2{font-size:26px;font-weight:700;line-height:1.15;letter-spacing:-.01em}
.h3{font-size:20px;font-weight:700;line-height:1.25;letter-spacing:-.01em}
.lead{font-size:18px;line-height:1.5;color:var(--text-secondary);max-width:60ch}
.body{font-size:16px;line-height:1.55}
.caption{font-size:14px;font-weight:500;line-height:1.4;color:var(--text-secondary)}
.overline{font-size:12px;font-weight:600;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--text-tertiary)}
.metric{font-size:32px;font-weight:800;line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
@media (min-width:1024px){
  .display{font-size:64px}
  .h1{font-size:48px}
  .h2{font-size:36px}
  .h3{font-size:24px}
  .lead{font-size:20px}
  .metric{font-size:56px}
}
.prose{max-width:68ch}
.prose p+p{margin-top:var(--space-4)}

.sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--space-5);margin-bottom:var(--space-6);flex-wrap:wrap}
.sec-head__text{display:flex;flex-direction:column;gap:var(--space-3);max-width:720px}
.link-more{display:inline-flex;align-items:center;gap:6px;font-weight:600;text-decoration:none;white-space:nowrap}
.link-more svg{width:18px;height:18px;transition:transform var(--dur-base) var(--ease)}
@media (hover:hover){ .link-more:hover svg{transform:translateX(3px)} .link-more:hover{color:var(--brand-700)} }
:root[data-theme="dark"] .link-more:hover{color:var(--brand-500)}

/* ── icons ──────────────────────────────────────────────────────────────── */
.i{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.i--16{width:16px;height:16px}
.i--24{width:24px;height:24px}
.i--28{width:28px;height:28px}

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn{
  --h:44px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:var(--h);padding:0 calc(var(--h) * .45);
  border:0;border-radius:var(--radius-md);
  font-size:15px;font-weight:600;line-height:1;white-space:nowrap;text-decoration:none;
  cursor:pointer;user-select:none;
  transition:background var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease),
             transform 160ms var(--ease),box-shadow var(--dur-fast) var(--ease);
}
.btn--sm{--h:36px;font-size:14px;border-radius:10px}
.btn--lg{--h:52px;font-size:16px}
.btn--xl{--h:60px;font-size:18px;border-radius:14px}
.btn--block{width:100%}
.btn--primary{background:var(--brand-500);color:var(--ink-900)}
.btn--secondary{background:var(--ink-900);color:#fff}
.btn--tertiary{background:var(--bg-muted);color:var(--text-primary)}
.btn--ghost{background:transparent;color:var(--text-primary)}
.btn--outline{background:transparent;color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}
:root[data-theme="dark"] .btn--secondary{background:#F5F5F3;color:var(--ink-900)}
@media (hover:hover){
  .btn--primary:hover{background:var(--brand-600);transform:translateY(-1px)}
  .btn--secondary:hover{background:var(--ink-800);transform:translateY(-1px)}
  :root[data-theme="dark"] .btn--secondary:hover{background:#fff}
  .btn--tertiary:hover{background:var(--border)}
  .btn--ghost:hover{background:var(--bg-surface-alt)}
  .btn--outline:hover{background:rgba(255,255,255,.08)}
}
.btn--primary:active{background:var(--brand-700)}
.btn:disabled,.btn[aria-disabled="true"]{background:var(--bg-muted);color:var(--text-tertiary);cursor:not-allowed;transform:none}

.icon-btn{
  display:inline-grid;place-items:center;width:44px;height:44px;flex:none;
  border:0;border-radius:var(--radius-md);background:transparent;color:var(--text-primary);
  cursor:pointer;transition:background var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease);
}
@media (hover:hover){ .icon-btn:hover{background:var(--bg-surface-alt)} }
.icon-btn[aria-pressed="true"]{color:var(--danger)}
.icon-btn[aria-pressed="true"] .i{fill:currentColor}

/* ── form controls ──────────────────────────────────────────────────────── */
.field{display:flex;flex-direction:column;gap:8px;min-width:0}
.field__label{font-size:14px;font-weight:500;color:var(--text-secondary)}
.field__hint{font-size:13px;color:var(--text-tertiary)}
.field__error{font-size:13px;color:var(--danger)}
.input,.select,.textarea{
  width:100%;height:52px;padding:0 16px;
  border:1px solid var(--border);border-radius:var(--radius-sm);
  background:var(--bg-surface);color:var(--text-primary);font-size:16px;
  outline:none;transition:border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease);
  -webkit-appearance:none;appearance:none;
}
.textarea{height:auto;min-height:120px;padding:14px 16px;line-height:1.5;resize:vertical}
.select{padding-right:44px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A9A94' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;background-size:20px}
.input::placeholder,.textarea::placeholder{color:var(--text-tertiary)}
.input:focus,.select:focus,.textarea:focus{border-color:var(--text-primary);box-shadow:var(--shadow-focus)}
.input[aria-invalid="true"],.textarea[aria-invalid="true"],.select[aria-invalid="true"]{border-color:var(--danger)}
.input--sm,.select--sm{height:44px;font-size:15px}

.check{display:flex;align-items:flex-start;gap:12px;cursor:pointer;font-size:15px;line-height:1.4}
.check input{appearance:none;-webkit-appearance:none;flex:none;width:22px;height:22px;margin:0;
  border:1.5px solid var(--border);border-radius:6px;background:var(--bg-surface);cursor:pointer;
  display:grid;place-items:center;transition:background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease)}
.check input:checked{background:var(--brand-500);border-color:var(--brand-500)}
.check input:checked::after{content:"";width:6px;height:11px;border:solid var(--ink-900);border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg)}
.check input:focus-visible{box-shadow:var(--shadow-focus)}

/* Toggle switch */
.switch{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;font-size:15px}
.switch input{appearance:none;-webkit-appearance:none;position:relative;flex:none;width:44px;height:26px;margin:0;
  border-radius:var(--radius-full);background:var(--border);cursor:pointer;transition:background var(--dur-base) var(--ease)}
.switch input::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform var(--dur-base) var(--ease)}
.switch input:checked{background:var(--brand-500)}
.switch input:checked::after{transform:translateX(18px)}
.switch input:focus-visible{box-shadow:var(--shadow-focus)}

/* ── chips & badges ─────────────────────────────────────────────────────── */
.badge{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px;border-radius:var(--radius-full);
  background:var(--brand-100);color:var(--text-primary);font-size:13px;font-weight:600;line-height:1;white-space:nowrap}
.badge--sm{height:24px;padding:0 10px;font-size:12px}
.badge--ok{background:var(--success-bg);color:var(--success)}
.badge--warn{background:var(--warning-bg);color:var(--warning)}
.badge--danger{background:var(--danger-bg);color:var(--danger)}
.badge--info{background:var(--info-bg);color:var(--info)}
.badge--muted{background:var(--bg-muted);color:var(--text-secondary)}
.badge--dark{background:var(--ink-900);color:#fff}
:root[data-theme="dark"] .badge--dark{background:#F5F5F3;color:var(--ink-900)}
.badge .i{width:14px;height:14px}
.dot{width:8px;height:8px;border-radius:50%;background:var(--text-tertiary);flex:none}
.dot--ok{background:var(--success)} .dot--warn{background:var(--warning)} .dot--err{background:var(--danger)}
.dot--live{animation:pulse 2s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}

.chips{display:flex;flex-wrap:wrap;gap:8px}
.chips--scroll{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 calc(var(--gutter) * -1);padding:2px var(--gutter)}
.chips--scroll::-webkit-scrollbar{display:none}
.chip{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;flex:none;
  border:1px solid var(--border);border-radius:var(--radius-full);background:var(--bg-surface);
  color:var(--text-primary);font-size:14px;font-weight:600;line-height:1;cursor:pointer;text-decoration:none;white-space:nowrap;
  transition:background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease)}
.chip .count{color:var(--text-tertiary);font-weight:500;font-variant-numeric:tabular-nums}
@media (hover:hover){ .chip:hover{border-color:var(--text-primary)} }
.chip[aria-pressed="true"],.chip.is-active{background:var(--ink-900);border-color:var(--ink-900);color:#fff}
.chip[aria-pressed="true"] .count,.chip.is-active .count{color:rgba(255,255,255,.6)}
:root[data-theme="dark"] .chip[aria-pressed="true"],:root[data-theme="dark"] .chip.is-active{background:#F5F5F3;border-color:#F5F5F3;color:var(--ink-900)}
:root[data-theme="dark"] .chip[aria-pressed="true"] .count{color:rgba(28,28,28,.55)}

/* ── tiles & cards ──────────────────────────────────────────────────────── */
.card{position:relative;display:flex;flex-direction:column;gap:12px;
  background:var(--bg-surface);border:1px solid var(--surface-border);border-radius:var(--radius-lg);
  padding:24px;box-shadow:var(--shadow-1);min-width:0}
@media (min-width:1024px){ .card{padding:32px} }
.card--hover{transition:box-shadow var(--dur-base) var(--ease),transform var(--dur-base) var(--ease);text-decoration:none;color:inherit}
@media (hover:hover){ .card--hover:hover{box-shadow:var(--shadow-2);transform:translateY(-2px)} }
:root[data-theme="dark"] .card--hover:hover{border-color:#3A3A37}
.card--flat{box-shadow:none;background:var(--bg-surface-alt)}
.card--pad-sm{padding:20px}

.tile{position:relative;display:flex;flex-direction:column;gap:12px;overflow:hidden;
  border-radius:var(--radius-xl);padding:32px 24px;min-width:0;text-decoration:none;color:inherit}
@media (min-width:1024px){ .tile{padding:40px} }
.tile--light{background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1)}
.tile--dark{background:var(--dark-bg);color:var(--on-dark)}
.tile--dark .lead,.tile--dark .muted,.tile--dark p{color:var(--on-dark-2)}
.tile--dark .overline{color:var(--brand-500)}
.tile--brand{background:var(--brand-500);color:var(--ink-900)}
.tile--brand .overline{color:rgba(28,28,28,.6)}
.tile--brand p,.tile--brand .lead{color:rgba(28,28,28,.75)}
a.tile{transition:transform var(--dur-base) var(--ease),box-shadow var(--dur-base) var(--ease)}
@media (hover:hover){ a.tile:hover{transform:translateY(-2px)} a.tile--light:hover{box-shadow:var(--shadow-2)} }

/* Bento grid: 12 columns on desktop, 4 on mobile. */
.grid{display:grid;gap:16px;grid-template-columns:repeat(4,minmax(0,1fr))}
@media (min-width:768px){ .grid{gap:24px;grid-template-columns:repeat(12,minmax(0,1fr))} }
.grid > *{grid-column:span 4}
@media (min-width:768px){
  .span-4{grid-column:span 6} .span-6{grid-column:span 6} .span-8{grid-column:span 12} .span-12{grid-column:span 12}
  .span-3{grid-column:span 6}
}
@media (min-width:1024px){
  .span-3{grid-column:span 3} .span-4{grid-column:span 4} .span-5{grid-column:span 5}
  .span-7{grid-column:span 7} .span-8{grid-column:span 8}
}
.cards{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
@media (min-width:768px){ .cards{gap:24px} }
.cards--sm{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}

/* Horizontal rail, like the product carousels of the reference. */
.rail{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(260px,82%);gap:16px;overflow-x:auto;
  scroll-snap-type:x mandatory;scrollbar-width:none;margin:0 calc(var(--gutter) * -1);padding:4px var(--gutter) 16px}
.rail::-webkit-scrollbar{display:none}
.rail > *{scroll-snap-align:start}
@media (min-width:768px){ .rail{grid-auto-columns:minmax(280px,calc((100% - 48px) / 3));gap:24px} }
@media (min-width:1280px){ .rail{grid-auto-columns:calc((100% - 72px) / 4)} }
.rail-nav{display:none;gap:8px}
@media (min-width:1024px){ .rail-nav{display:flex} }
.rail-nav .icon-btn{background:var(--bg-surface);border:1px solid var(--border)}

/* ── header ─────────────────────────────────────────────────────────────── */
.topbar{display:none;background:var(--bg-page);font-size:14px;font-weight:600}
@media (min-width:1024px){ .topbar{display:block} }
.topbar__in{display:flex;align-items:center;justify-content:space-between;height:44px}
.segments{display:flex;gap:4px}
.seg{display:inline-flex;align-items:center;height:32px;padding:0 12px;border-radius:var(--radius-full);
  color:var(--text-secondary);text-decoration:none;transition:color var(--dur-fast) var(--ease),background var(--dur-fast) var(--ease)}
.seg.is-active{background:var(--bg-surface);color:var(--text-primary);box-shadow:var(--shadow-1)}
:root[data-theme="dark"] .seg.is-active{box-shadow:inset 0 0 0 1px var(--border)}
@media (hover:hover){ .seg:not(.is-active):hover{color:var(--text-primary)} }
.topbar__right{display:flex;align-items:center;gap:8px}
.topbar__link{color:var(--text-secondary);text-decoration:none;padding:0 8px}
@media (hover:hover){ .topbar__link:hover{color:var(--text-primary)} }
.topbar .icon-btn{width:36px;height:36px}

.header{position:sticky;top:0;z-index:40;height:var(--header-h);
  background:var(--bg-surface);transition:box-shadow var(--dur-base) var(--ease),background var(--dur-base) var(--ease)}
.header.is-stuck{background:var(--header-bg);box-shadow:var(--shadow-1);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
:root[data-theme="dark"] .header.is-stuck{box-shadow:0 1px 0 var(--border)}
.header__in{display:flex;align-items:center;gap:24px;height:100%}
.brand{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:var(--text-primary);flex:none}
.brand img{height:26px;width:auto}
.brand__word{font-size:20px;font-weight:800;letter-spacing:-.02em;line-height:1}
.brand__word b{color:var(--brand-600);font-weight:800}
:root[data-theme="dark"] .brand__word b{color:var(--brand-500)}
@media (min-width:1024px){ .brand img{height:28px} .brand__word{font-size:22px} }

.nav{display:none;align-items:center;gap:4px;margin-left:8px}
@media (min-width:1024px){ .nav{display:flex} }
.nav a{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 12px;border-radius:var(--radius-md);
  color:var(--text-secondary);font-size:16px;font-weight:600;text-decoration:none;white-space:nowrap;
  transition:color var(--dur-fast) var(--ease),background var(--dur-fast) var(--ease)}
@media (hover:hover){ .nav a:hover{color:var(--text-primary);background:var(--bg-surface-alt)} }
.nav a[aria-current="page"]{color:var(--text-primary)}
.nav a[aria-current="page"]::after{content:"";width:6px;height:6px;border-radius:50%;background:var(--brand-500)}
.nav__web3{font-family:var(--font-mono);letter-spacing:-.02em}
.header__actions{display:flex;align-items:center;gap:8px;margin-left:auto}
.header__cta{display:none}
@media (min-width:1180px){ .header__cta{display:inline-flex} }
.header__mobile-only{display:inline-grid}
@media (min-width:1024px){ .header__mobile-only{display:none} }

/* Language switch: EN/UA pill, the yellow thumb marks the active half. */
.lang{position:relative;display:inline-flex;height:36px;border:1px solid var(--border);border-radius:var(--radius-full);background:var(--bg-surface);flex:none}
.lang__thumb{position:absolute;top:3px;bottom:3px;left:3px;width:calc(50% - 3px);border-radius:var(--radius-full);
  background:var(--brand-500);transition:transform var(--dur-base) var(--ease)}
:root[data-lang="en"] .lang__thumb{transform:translateX(100%)}
.lang__opt{position:relative;z-index:1;min-width:44px;height:100%;padding:0 10px;border:0;border-radius:var(--radius-full);
  background:transparent;color:var(--text-secondary);font-size:13px;font-weight:700;line-height:1;cursor:pointer}
.lang__opt[aria-pressed="true"]{color:var(--ink-900);cursor:default}
.theme-btn .i-sun{display:none}
:root[data-theme="dark"] .theme-btn .i-sun{display:block}
:root[data-theme="dark"] .theme-btn .i-moon{display:none}

/* Mobile drawer: full screen, slides in from the right in 240ms. */
.drawer{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;background:var(--bg-surface);
  transform:translateX(100%);visibility:hidden;transition:transform 240ms var(--ease),visibility 0s linear 240ms;
  padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}
.drawer.is-open{transform:none;visibility:visible;transition:transform 240ms var(--ease)}
.drawer__head{display:flex;align-items:center;justify-content:space-between;height:56px;padding:0 var(--gutter);border-bottom:1px solid var(--separator)}
.drawer__body{flex:1;overflow-y:auto;padding:16px var(--gutter) 24px;display:flex;flex-direction:column;gap:24px}
.drawer__nav{display:flex;flex-direction:column}
.drawer__nav a{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;
  font-size:22px;font-weight:700;letter-spacing:-.01em;text-decoration:none;border-bottom:1px solid var(--separator)}
.drawer__nav a[aria-current="page"]{color:var(--brand-700)}
:root[data-theme="dark"] .drawer__nav a[aria-current="page"]{color:var(--brand-500)}
.drawer__row{display:flex;align-items:center;justify-content:space-between;gap:12px}
body.no-scroll{overflow:hidden}

/* PWA-style bottom tab bar on phones: graphite icon + yellow dot for active. */
.tabbar{display:none}
@media (max-width:767px){
  :root{--tabbar-h:calc(56px + env(safe-area-inset-bottom))}
  .tabbar{position:fixed;left:0;right:0;bottom:0;z-index:45;display:grid;grid-template-columns:repeat(5,1fr);
    height:var(--tabbar-h);padding-bottom:env(safe-area-inset-bottom);
    background:var(--header-bg);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-top:1px solid var(--separator)}
  .tabbar a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    min-height:44px;color:var(--text-tertiary);font-size:11px;font-weight:600;text-decoration:none}
  .tabbar a[aria-current="page"]{color:var(--text-primary)}
  .tabbar a[aria-current="page"]::after{content:"";position:absolute;bottom:4px;width:4px;height:4px;border-radius:50%;background:var(--brand-500)}
  .tabbar a[aria-current="page"] span{display:none}
}

/* ── footer ─────────────────────────────────────────────────────────────── */
.footer{background:var(--dark-bg);color:var(--on-dark);padding:56px 0 32px;margin-top:var(--section-y)}
@media (min-width:1024px){ .footer{padding:72px 0 40px} }
.footer__top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:24px;padding-bottom:40px;border-bottom:1px solid var(--on-dark-line)}
.footer__brand{display:flex;flex-direction:column;gap:12px;max-width:440px}
.footer__brand .brand{color:#fff}
.footer__brand p{color:var(--on-dark-2)}
.footer__cols{display:grid;gap:32px;grid-template-columns:repeat(2,minmax(0,1fr));padding:40px 0;font-size:15px}
@media (min-width:768px){ .footer__cols{grid-template-columns:repeat(4,minmax(0,1fr))} }
.footer__col{display:flex;flex-direction:column;gap:12px}
.footer__col h3{font-size:15px;font-weight:700;color:#fff}
.footer__col a{color:var(--on-dark-2);text-decoration:none}
@media (hover:hover){ .footer__col a:hover{color:#fff} }
.footer__bottom{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;
  padding-top:24px;border-top:1px solid var(--on-dark-line);font-size:13px;color:var(--on-dark-2)}
.social{display:flex;gap:8px;list-style:none}
.social a{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.2);color:#fff;transition:background var(--dur-fast) var(--ease)}
.social svg{width:18px;height:18px;fill:currentColor}
@media (hover:hover){ .social a:hover{background:rgba(255,255,255,.08)} }

/* ── page head & breadcrumbs ────────────────────────────────────────────── */
.page-head{padding:32px 0 8px}
@media (min-width:1024px){ .page-head{padding:56px 0 16px} }
.page-head__in{display:flex;flex-direction:column;gap:16px;max-width:820px}
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:14px;font-weight:500;color:var(--text-tertiary)}
.crumbs a{color:var(--text-secondary);text-decoration:none}
@media (hover:hover){ .crumbs a:hover{color:var(--text-primary)} }
.crumbs .i{width:14px;height:14px}

.demo-note{display:flex;align-items:flex-start;gap:10px;padding:12px 16px;border-radius:var(--radius-md);
  background:var(--brand-050);color:var(--text-secondary);font-size:14px;line-height:1.45}
:root[data-theme="dark"] .demo-note{background:var(--bg-surface-alt)}
.demo-note .i{width:18px;height:18px;margin-top:1px;color:var(--brand-700)}
:root[data-theme="dark"] .demo-note .i{color:var(--brand-500)}

/* ── search bar ─────────────────────────────────────────────────────────── */
.searchbar{display:flex;flex-direction:column;gap:8px;padding:8px;border-radius:var(--radius-lg);
  background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-2)}
@media (min-width:768px){ .searchbar{flex-direction:row;align-items:center} }
.searchbar__field{position:relative;flex:1;min-width:0}
.searchbar__field .i{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:var(--text-tertiary);pointer-events:none}
.searchbar .input,.searchbar .select{border-color:transparent;background:var(--bg-surface-alt);height:52px}
.searchbar__field .input{padding-left:48px}
.searchbar .select{width:100%}
@media (min-width:768px){ .searchbar .select{width:220px} }

/* ── metrics ────────────────────────────────────────────────────────────── */
.metrics{display:grid;gap:24px;grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:1024px){ .metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:32px} }
.metrics__item{display:flex;flex-direction:column;gap:6px}
.metrics__item .caption{max-width:22ch}

/* ── steps ──────────────────────────────────────────────────────────────── */
.steps{display:grid;gap:16px;grid-template-columns:1fr;counter-reset:step}
@media (min-width:768px){ .steps{grid-template-columns:repeat(2,1fr);gap:24px} }
@media (min-width:1024px){ .steps{grid-template-columns:repeat(4,1fr)} }
.step{display:flex;flex-direction:column;gap:12px;padding:24px;border-radius:var(--radius-lg);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1)}
.step__num{font-size:12px;font-weight:600;letter-spacing:.08em;color:var(--text-tertiary)}
.step__icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--bg-surface-alt)}
.step h3{font-size:20px;font-weight:700;line-height:1.25}
.step p{color:var(--text-secondary);font-size:15px}

/* ── accordion ──────────────────────────────────────────────────────────── */
.faq{display:flex;flex-direction:column;background:var(--bg-surface);border-radius:var(--radius-lg);
  border:1px solid var(--surface-border);box-shadow:var(--shadow-1);padding:8px 24px}
@media (min-width:1024px){ .faq{padding:8px 32px} }
.faq details{border-bottom:1px solid var(--separator)}
.faq details:last-child{border-bottom:0}
.faq summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:16px 0;
  font-size:18px;font-weight:700;line-height:1.3;cursor:pointer;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary .pm{position:relative;width:20px;height:20px;flex:none}
.faq summary .pm::before,.faq summary .pm::after{content:"";position:absolute;left:3px;right:3px;top:9px;height:2px;border-radius:2px;background:currentColor;transition:transform var(--dur-base) var(--ease)}
.faq summary .pm::after{transform:rotate(90deg)}
.faq details[open] summary .pm::after{transform:rotate(0)}
.faq .faq__a{padding:0 0 20px;color:var(--text-secondary);max-width:72ch}
.faq details[open] .faq__a{animation:fadeDown var(--dur-base) var(--ease)}
@keyframes fadeDown{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

/* ── tabs ───────────────────────────────────────────────────────────────── */
.tabs{display:flex;gap:24px;border-bottom:1px solid var(--separator);overflow-x:auto;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{position:relative;display:inline-flex;align-items:center;gap:8px;height:52px;padding:0;border:0;background:none;
  color:var(--text-secondary);font-size:17px;font-weight:700;cursor:pointer;white-space:nowrap}
.tab[aria-selected="true"]{color:var(--text-primary)}
.tab[aria-selected="true"]::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--brand-500)}
.tab .count{font-size:13px;font-weight:600;color:var(--text-tertiary)}

/* ── table ──────────────────────────────────────────────────────────────── */
.table-wrap{overflow-x:auto;border-radius:var(--radius-lg);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1)}
.table{width:100%;border-collapse:collapse;font-size:15px}
.table th{height:48px;padding:0 20px;text-align:left;font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text-tertiary);border-bottom:1px solid var(--separator);white-space:nowrap}
.table td{height:56px;padding:12px 20px;border-bottom:1px solid var(--separator);vertical-align:middle}
.table tr:last-child td{border-bottom:0}
@media (hover:hover){ .table tbody tr:hover{background:var(--bg-surface-alt)} }
.table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}

/* ── modal / bottom sheet ───────────────────────────────────────────────── */
.modal{position:fixed;inset:0;z-index:80;display:flex;align-items:flex-end;justify-content:center;
  background:rgba(20,20,20,.48);opacity:0;visibility:hidden;transition:opacity var(--dur-base) var(--ease),visibility 0s linear var(--dur-base)}
.modal.is-open{opacity:1;visibility:visible;transition:opacity var(--dur-base) var(--ease)}
.modal__box{position:relative;width:100%;max-height:92vh;overflow-y:auto;overscroll-behavior:contain;
  background:var(--bg-surface);border-radius:var(--radius-xl) var(--radius-xl) 0 0;
  padding:12px 20px calc(24px + env(safe-area-inset-bottom));
  transform:translateY(24px);transition:transform var(--dur-slow) var(--ease)}
.modal.is-open .modal__box{transform:none}
.modal__grab{width:40px;height:4px;border-radius:4px;background:var(--border);margin:0 auto 12px}
.modal__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.modal__close{margin:-6px -8px 0 0}
@media (min-width:768px){
  .modal{align-items:center;padding:24px}
  .modal__box{width:560px;max-height:88vh;border-radius:var(--radius-xl);padding:32px}
  .modal__box--wide{width:760px}
  .modal__grab{display:none}
}

/* ── toast ──────────────────────────────────────────────────────────────── */
.toasts{position:fixed;z-index:90;left:16px;right:16px;bottom:calc(var(--tabbar-h) + 16px);display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}
@media (min-width:768px){ .toasts{left:auto;right:24px;bottom:24px;align-items:flex-end} }
.toast{display:flex;align-items:center;gap:10px;max-width:420px;padding:14px 18px;border-radius:var(--radius-md);
  background:var(--ink-900);color:#fff;font-size:15px;font-weight:500;box-shadow:var(--shadow-2);pointer-events:auto;
  animation:toastIn var(--dur-slow) var(--ease)}
:root[data-theme="dark"] .toast{background:#F5F5F3;color:var(--ink-900)}
.toast .i{color:var(--brand-500)}
:root[data-theme="dark"] .toast .i{color:var(--brand-700)}
.toast.is-out{opacity:0;transform:translateY(8px);transition:all var(--dur-base) var(--ease)}
@keyframes toastIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* ── skeleton ───────────────────────────────────────────────────────────── */
.skeleton{position:relative;overflow:hidden;background:var(--bg-muted);border-radius:var(--radius-sm)}
.skeleton::after{content:"";position:absolute;inset:0;transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.5),transparent);animation:shimmer 1.2s infinite}
@keyframes shimmer{to{transform:translateX(100%)}}

/* ── reveal ─────────────────────────────────────────────────────────────── */
.js .reveal{opacity:0;transform:translateY(12px);transition:opacity var(--dur-slow) var(--ease),transform var(--dur-slow) var(--ease)}
.js .reveal.is-in{opacity:1;transform:none}

/* ── flags & illustrations ──────────────────────────────────────────────── */
.flag{display:block;flex:none;width:32px;height:22px;border-radius:5px;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.flag svg{width:100%;height:100%}
.flag--lg{width:56px;height:38px;border-radius:8px}
.flag--sm{width:22px;height:15px;border-radius:3px}
.illo{position:relative;display:block;width:100%;aspect-ratio:4/3;border-radius:var(--radius-lg);overflow:hidden;background:var(--bg-surface-alt)}
.illo svg{width:100%;height:100%}
.illo .ill-ink{fill:var(--ink-900)}
.illo .ill-ink-s{stroke:var(--ink-900)}
.illo .ill-brand{fill:var(--brand-500)}
.illo .ill-soft{fill:var(--bg-muted)}
:root[data-theme="dark"] .illo .ill-ink{fill:#F5F5F3}
:root[data-theme="dark"] .illo .ill-ink-s{stroke:#F5F5F3}

/* ── listing card (Можливості) ──────────────────────────────────────────── */
.lcard{display:flex;flex-direction:column;background:var(--bg-surface);border:1px solid var(--surface-border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-1);overflow:hidden;cursor:pointer;text-align:left;padding:0;color:inherit;
  transition:box-shadow var(--dur-base) var(--ease),transform var(--dur-base) var(--ease)}
@media (hover:hover){ .lcard:hover{box-shadow:var(--shadow-2);transform:translateY(-2px)} }
.lcard .illo{border-radius:0}
.lcard__badges{position:absolute;left:12px;top:12px;display:flex;flex-wrap:wrap;gap:6px}
.lcard__fav{position:absolute;right:8px;top:8px;background:var(--bg-surface)}
:root[data-theme="dark"] .lcard__fav{background:var(--bg-surface-alt)}
.lcard__body{display:flex;flex-direction:column;gap:6px;padding:16px 20px 20px;flex:1}
.lcard__price{font-size:20px;font-weight:800;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.lcard__price small{font-size:14px;font-weight:600;color:var(--text-secondary)}
.lcard__title{font-size:16px;font-weight:600;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.lcard__meta{display:flex;align-items:center;gap:6px;margin-top:auto;padding-top:8px;font-size:13px;color:var(--text-tertiary)}
.lcard__meta .flag{width:18px;height:12px;border-radius:2px}
.lcard__top{position:relative}
.lcard--list{flex-direction:row}
.lcard--list .lcard__top{width:220px;flex:none}
.lcard--list .illo{height:100%;aspect-ratio:auto;min-height:150px}
@media (max-width:599px){ .lcard--list{flex-direction:column} .lcard--list .lcard__top{width:auto} .lcard--list .illo{aspect-ratio:4/3} }

/* ── catalogue layout: filters + results ────────────────────────────────── */
.catalog{display:grid;gap:24px;grid-template-columns:1fr;align-items:start}
@media (min-width:1024px){ .catalog{grid-template-columns:300px minmax(0,1fr);gap:32px} }
.filters{display:none}
@media (min-width:1024px){
  .filters{display:flex;flex-direction:column;gap:24px;position:sticky;top:calc(var(--header-h) + 24px);
    max-height:calc(100vh - var(--header-h) - 48px);overflow-y:auto;scrollbar-width:thin;
    padding:24px;background:var(--bg-surface);border:1px solid var(--surface-border);border-radius:var(--radius-lg);box-shadow:var(--shadow-1)}
}
.filters__group{display:flex;flex-direction:column;gap:12px}
.filters__group + .filters__group{padding-top:24px;border-top:1px solid var(--separator)}
.filters__title{font-size:15px;font-weight:700}
.filters__range{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.radio-list{display:flex;flex-direction:column;gap:2px}
.radio-list button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:40px;padding:0 12px;
  border:0;border-radius:var(--radius-sm);background:transparent;font-size:15px;font-weight:500;text-align:left;cursor:pointer;color:var(--text-primary)}
.radio-list button .count{color:var(--text-tertiary);font-size:13px;font-variant-numeric:tabular-nums}
.radio-list button[aria-pressed="true"]{background:var(--brand-100);font-weight:700}
@media (hover:hover){ .radio-list button:not([aria-pressed="true"]):hover{background:var(--bg-surface-alt)} }
.results__bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
.results__count{font-size:15px;color:var(--text-secondary)}
.results__count b{color:var(--text-primary)}
.results__tools{display:flex;align-items:center;gap:8px}
.results__tools .select{width:auto;min-width:190px}
.view-toggle{display:none;border:1px solid var(--border);border-radius:var(--radius-md);padding:3px;background:var(--bg-surface)}
@media (min-width:600px){ .view-toggle{display:inline-flex} }
.view-toggle button{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:9px;background:transparent;color:var(--text-tertiary);cursor:pointer}
.view-toggle button[aria-pressed="true"]{background:var(--bg-muted);color:var(--text-primary)}
.filters-btn{display:inline-flex}
@media (min-width:1024px){ .filters-btn{display:none} }
.empty{display:flex;flex-direction:column;align-items:center;gap:12px;padding:56px 24px;text-align:center;
  border-radius:var(--radius-lg);background:var(--bg-surface);border:1px dashed var(--border)}
.empty .i{width:32px;height:32px;color:var(--text-tertiary)}
.more-wrap{display:flex;justify-content:center;margin-top:32px}

/* Category tiles row */
.cats{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:600px){ .cats{grid-template-columns:repeat(4,minmax(0,1fr))} }
@media (min-width:1024px){ .cats{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px} }
@media (min-width:1180px){ .cats{grid-template-columns:repeat(8,minmax(0,1fr))} }
.cat{display:flex;flex-direction:column;align-items:flex-start;gap:16px;padding:20px;border:1px solid var(--surface-border);border-radius:var(--radius-lg);
  background:var(--bg-surface);box-shadow:var(--shadow-1);text-align:left;cursor:pointer;color:inherit;
  transition:transform var(--dur-base) var(--ease),box-shadow var(--dur-base) var(--ease),background var(--dur-base) var(--ease)}
.cat__icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--bg-surface-alt)}
.cat__name{font-size:15px;font-weight:700;line-height:1.25}
.cat__count{font-size:13px;color:var(--text-tertiary);font-variant-numeric:tabular-nums}
@media (hover:hover){ .cat:hover{transform:translateY(-2px);box-shadow:var(--shadow-2)} }
.cat[aria-pressed="true"]{background:var(--ink-900);color:#fff}
.cat[aria-pressed="true"] .cat__icon{background:var(--brand-500);color:var(--ink-900)}
.cat[aria-pressed="true"] .cat__count{color:rgba(255,255,255,.6)}
:root[data-theme="dark"] .cat[aria-pressed="true"]{background:#F5F5F3;color:var(--ink-900)}
:root[data-theme="dark"] .cat[aria-pressed="true"] .cat__count{color:rgba(28,28,28,.55)}

/* ── detail list (key/value) ────────────────────────────────────────────── */
.kv{display:grid;grid-template-columns:minmax(120px,40%) 1fr;gap:0;font-size:15px}
.kv dt,.kv dd{margin:0;padding:12px 0;border-bottom:1px solid var(--separator)}
.kv dt{color:var(--text-secondary)}
.kv dd{font-weight:600}

/* ── reusable media row ─────────────────────────────────────────────────── */
.seller{display:flex;align-items:center;gap:12px}
.avatar{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:14px;background:var(--ink-900);color:var(--brand-500);font-weight:800;font-size:18px;letter-spacing:-.02em}
:root[data-theme="dark"] .avatar{background:#2B2B2B}
.avatar--sm{width:40px;height:40px;border-radius:12px;font-size:15px}
.rating{display:inline-flex;align-items:center;gap:4px;font-weight:700;font-variant-numeric:tabular-nums}
.rating .i{width:16px;height:16px;color:var(--brand-600);fill:var(--brand-500);stroke:var(--brand-600)}

/* ── reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important;transition:none !important;scroll-behavior:auto !important}
  .js .reveal{opacity:1;transform:none}
}

/* ══ page components ═══════════════════════════════════════════════════════ */

/* ── hero (home) ────────────────────────────────────────────────────────── */
.hero{padding:16px 0 0}
@media (min-width:1024px){ .hero{padding:24px 0 0} }
.hero__tile{display:grid;gap:32px;align-items:center;padding:32px 20px;border-radius:var(--radius-xl);
  background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1);overflow:hidden}
@media (min-width:1024px){ .hero__tile{grid-template-columns:1.1fr .9fr;gap:48px;padding:64px 56px} }
.hero__copy{display:flex;flex-direction:column;align-items:flex-start;gap:20px;min-width:0}
.hero__copy .display{max-width:12ch}
.hero__chips{margin-top:-4px}
.hero__chips .chip{height:36px;font-size:13px;background:var(--bg-surface-alt);border-color:transparent}
@media (hover:hover){ .hero__chips .chip:hover{border-color:var(--text-primary)} }

.ask-bar{display:flex;align-items:center;gap:8px;width:100%;max-width:640px;padding:6px 6px 6px 16px;
  border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg-surface);
  transition:border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease)}
.ask-bar:focus-within{border-color:var(--text-primary);box-shadow:var(--shadow-focus)}
.ask-bar__icon{display:grid;place-items:center;color:var(--brand-700)}
:root[data-theme="dark"] .ask-bar__icon{color:var(--brand-500)}
.ask-bar__icon .i{fill:var(--brand-500);stroke:var(--brand-700)}
.ask-bar__input{flex:1;min-width:0;height:52px;border:0;background:transparent;font-size:16px;outline:none}
.ask-bar__input::placeholder{color:var(--text-tertiary)}
@media (max-width:599px){
  .ask-bar{flex-wrap:wrap;padding:8px}
  .ask-bar__icon{display:none}
  .ask-bar__input{flex-basis:100%;padding:0 8px}
  .ask-bar .btn{width:100%}
}

/* Product visual: three flat cards stacked with small overlaps on desktop.
   Normal flow (not absolute) so a longer translation never runs under a card. */
.hero__visual{display:none}
@media (min-width:768px){ .hero__visual{display:block} }
.hv{display:flex;flex-direction:column}
.hv__chat{position:relative;z-index:1;width:90%;padding:20px 20px 28px;border-radius:var(--radius-lg);background:var(--bg-surface-alt);display:flex;flex-direction:column;gap:14px}
.hv__q{align-self:flex-end;max-width:85%;padding:12px 16px;border-radius:18px 18px 4px 18px;background:var(--ink-900);color:#fff;font-size:15px;font-weight:500}
:root[data-theme="dark"] .hv__q{background:#F5F5F3;color:var(--ink-900)}
.hv__a{display:flex;gap:10px;align-items:flex-start}
.hv__ai{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:10px;background:var(--brand-500);color:var(--ink-900);font-size:12px;font-weight:800}
.hv__text{padding:12px 16px;border-radius:4px 18px 18px 18px;background:var(--bg-surface);font-size:14px;line-height:1.5;box-shadow:var(--shadow-1)}
.hv__text ul{margin:6px 0 0 18px}
.hv__passport{position:relative;z-index:2;align-self:flex-end;width:64%;margin-top:-12px}
.hv__listing{position:relative;z-index:3;width:60%;margin:-16px 0 0 4%}
.hv__card{display:flex;flex-direction:column;gap:14px;padding:18px;border-radius:var(--radius-lg);background:var(--bg-surface);box-shadow:var(--shadow-2);border:1px solid var(--surface-border)}
.hv__card--row{flex-direction:row;align-items:center;gap:14px}
.hv__card--row .illo{width:72px;flex:none;border-radius:14px}
.hv__m{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.hv__m div{display:flex;flex-direction:column;gap:2px;padding:10px;border-radius:12px;background:var(--bg-surface-alt)}
.hv__m span{font-size:12px;color:var(--text-tertiary);font-weight:600}
.hv__m b{font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap}

/* ── bento (home) ───────────────────────────────────────────────────────── */
.bento .tile{min-height:280px}
.bento .h2{font-size:26px}
@media (min-width:1024px){ .bento .h2{font-size:32px} }
.tile__icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--bg-surface-alt);margin-bottom:8px}
.flag-row{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.flag-row__item .flag{width:40px;height:28px;border-radius:7px}
.ai-tile__status{display:flex;align-items:center;gap:8px;color:var(--on-dark-2)}
.tile--web3 .overline{color:var(--text-secondary);letter-spacing:.02em;text-transform:none;font-size:13px}
.tile__hex{position:absolute;right:-18px;top:-12px;width:150px;height:auto;color:var(--brand-500);opacity:.9}

/* ── promo (yellow) & cta (dark) ────────────────────────────────────────── */
.promo{display:grid;gap:32px;align-items:center}
@media (min-width:1024px){ .promo{grid-template-columns:1.2fr .8fr;gap:56px;padding:56px} }
.promo__copy{display:flex;flex-direction:column;gap:16px;align-items:flex-start}
.promo__ghost{background:rgba(28,28,28,.08);color:var(--ink-900)}
@media (hover:hover){ .promo__ghost:hover{background:rgba(28,28,28,.14)} }
.promo__countries{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.promo__country{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 14px;border-radius:var(--radius-md);
  background:rgba(255,255,255,.55);color:var(--ink-900);text-decoration:none;font-weight:600;font-size:15px;transition:background var(--dur-fast) var(--ease)}
.promo__country b{margin-left:auto;font-weight:800}
@media (hover:hover){ .promo__country:hover{background:#fff} }

.cta{display:grid;gap:32px}
@media (min-width:1024px){ .cta{grid-template-columns:1.3fr .7fr;gap:64px;padding:64px 56px;align-items:center} }
.cta__copy{display:flex;flex-direction:column;gap:16px}
.cta__price{display:flex;flex-direction:column;gap:20px;padding:28px;border-radius:var(--radius-lg);background:var(--dark-card)}
.cta__per{display:block;margin-top:6px;color:var(--on-dark-2);font-size:15px}
.cta__list{list-style:none;display:flex;flex-direction:column;gap:10px;color:var(--on-dark-2);font-size:15px}
.cta__list li{display:flex;gap:10px}
.cta__list li::before{content:"";flex:none;width:6px;height:6px;margin-top:9px;border-radius:50%;background:var(--brand-500)}

.faq-wrap{display:grid;gap:32px}
@media (min-width:1024px){ .faq-wrap{grid-template-columns:.8fr 1.2fr;gap:64px;align-items:start} }

/* ── passport card ──────────────────────────────────────────────────────── */
.passport{gap:16px}
.passport__sum{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;min-height:4.2em}
.passport__m{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}
.passport__m div{display:flex;flex-direction:column;gap:2px;padding:12px;border-radius:12px;background:var(--bg-surface-alt)}
.passport__m dt{font-size:12px;font-weight:600;color:var(--text-tertiary)}
.passport__m dd{margin:0;font-size:16px;font-weight:800;font-variant-numeric:tabular-nums}

/* ── article card ───────────────────────────────────────────────────────── */
.acard .illo{border-radius:0}
.acard--big{display:grid}
@media (min-width:1024px){
  .acard--big{grid-template-columns:1.1fr 1fr}
  .acard--big .illo{aspect-ratio:auto !important;height:100%;min-height:340px}
  .acard--big > div{padding:40px !important;justify-content:center}
}

/* ── tariffs ────────────────────────────────────────────────────────────── */
.tariffs{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(118px,1fr))}
.tariff{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:14px;border:1.5px solid var(--border);border-radius:var(--radius-md);
  background:var(--bg-surface);text-align:left;cursor:pointer;transition:border-color var(--dur-fast) var(--ease),background var(--dur-fast) var(--ease)}
.tariff__n{font-size:13px;font-weight:600;color:var(--text-secondary)}
.tariff__p{font-size:24px;font-weight:800;letter-spacing:-.02em}
.tariff[aria-checked="true"]{border-color:var(--text-primary);background:var(--brand-050)}
:root[data-theme="dark"] .tariff[aria-checked="true"]{background:var(--bg-surface-alt)}
.tariff__best{position:absolute;top:-11px;right:8px}
@media (hover:hover){ .tariff:hover{border-color:var(--text-secondary)} }

/* ── hub ────────────────────────────────────────────────────────────────── */
.hub-search{max-width:820px}
.th-sort{display:inline-flex;align-items:center;gap:6px;padding:0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;cursor:pointer}
.th-sort::after{content:"";width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid currentColor;opacity:.35}
.th-sort[aria-sort="ascending"]::after{opacity:1;border-top:0;border-bottom:5px solid currentColor}
.th-sort[aria-sort="descending"]::after{opacity:1}
.compare td:first-child a{color:var(--text-primary)}
.hub-cta{display:grid;gap:24px;align-items:end}
@media (min-width:1024px){ .hub-cta{grid-template-columns:1fr auto;gap:48px;padding:56px} }
.hub-cta .h2{color:#fff}
.hub-cta__form{display:flex;flex-wrap:wrap;gap:8px}
.hub-cta__form .input{width:260px;flex:1;background:var(--dark-card);border-color:var(--on-dark-line);color:#fff}
.hub-cta__form .input::placeholder{color:rgba(255,255,255,.45)}

/* ── country / article documents ────────────────────────────────────────── */
.country-head{display:flex;align-items:center;gap:20px;margin-top:20px}
.country-head .flag--lg{width:72px;height:48px;border-radius:10px}
.country-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:24px}

.kpis{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:768px){ .kpis{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (min-width:1024px){ .kpis{grid-template-columns:repeat(5,minmax(0,1fr));gap:16px} }
.kpi{display:flex;flex-direction:column;gap:8px;padding:20px;border-radius:var(--radius-lg);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1)}
.kpi__label{font-size:13px;font-weight:600;color:var(--text-tertiary)}
.kpi__value{font-size:24px;font-weight:800;letter-spacing:-.02em;line-height:1.15;font-variant-numeric:tabular-nums}
@media (min-width:1024px){ .kpi__value{font-size:28px} }

.doc{display:grid;gap:32px;align-items:start}
@media (min-width:1024px){ .doc{grid-template-columns:260px minmax(0,1fr);gap:56px} }
.doc__toc{display:none}
@media (min-width:1024px){
  .doc__toc{display:flex;flex-direction:column;position:sticky;top:calc(var(--header-h) + 24px)}
}
.doc__toc nav{display:flex;flex-direction:column;border-left:2px solid var(--separator)}
.doc__toc nav a{margin-left:-2px;padding:8px 0 8px 16px;border-left:2px solid transparent;color:var(--text-secondary);font-size:15px;font-weight:600;text-decoration:none;
  transition:color var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease)}
@media (hover:hover){ .doc__toc nav a:hover{color:var(--text-primary)} }
.doc__toc nav a.is-active{color:var(--text-primary);border-left-color:var(--brand-500)}
.doc__toc-cta{display:flex;flex-direction:column;gap:10px;margin-top:24px;padding:20px;border-radius:var(--radius-lg);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1)}
.doc__body{display:flex;flex-direction:column;gap:48px;min-width:0}
.doc__sec{display:flex;flex-direction:column;gap:16px;scroll-margin-top:calc(var(--header-h) + 24px)}
.doc__h{display:flex;align-items:center;gap:12px;font-size:24px;font-weight:700;letter-spacing:-.01em;line-height:1.25}
@media (min-width:1024px){ .doc__h{font-size:28px} }
.doc__ico{display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:12px;background:var(--brand-100)}
.doc__body .prose{font-size:17px;line-height:1.65}

.doc-steps{list-style:none;display:flex;flex-direction:column;gap:0;counter-reset:s}
.doc-steps li{position:relative;display:flex;gap:16px;padding:0 0 20px}
.doc-steps li:not(:last-child)::before{content:"";position:absolute;left:17px;top:36px;bottom:0;width:2px;background:var(--separator)}
.doc-steps__n{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:50%;background:var(--ink-900);color:#fff;font-weight:800;font-size:15px}
:root[data-theme="dark"] .doc-steps__n{background:#F5F5F3;color:var(--ink-900)}
.doc-steps li > span:last-child{padding-top:6px;font-size:16px}
.kv--doc{padding:4px 24px;border-radius:var(--radius-lg);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1)}
.kv--doc dt,.kv--doc dd{padding:16px 0}
.kv--doc dt:nth-last-of-type(1),.kv--doc dd:last-of-type{border-bottom:0}
@media (max-width:599px){ .kv--doc{grid-template-columns:1fr} .kv--doc dt{border-bottom:0;padding-bottom:0} }
.risk-list{list-style:none;display:flex;flex-direction:column;gap:8px}
.risk-list li{display:flex;gap:12px;padding:16px;border-radius:var(--radius-md);background:var(--warning-bg)}
.risk-list .i{color:var(--warning);margin-top:2px}
.source-list{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.source{display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:var(--radius-md);background:var(--bg-surface);border:1px solid var(--border);text-decoration:none;transition:border-color var(--dur-fast) var(--ease)}
.source > span{display:flex;flex-direction:column;gap:2px;min-width:0}
.source .caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (hover:hover){ .source:hover{border-color:var(--text-primary)} }
.ask-list{display:flex;flex-direction:column;gap:8px}
.ask-item{display:flex;align-items:center;gap:12px;padding:16px 18px;border-radius:var(--radius-md);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1);
  text-decoration:none;font-weight:600;transition:transform var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease)}
.ask-item > span{flex:1}
.ask-item .i:first-child{color:var(--brand-700)}
:root[data-theme="dark"] .ask-item .i:first-child{color:var(--brand-500)}
@media (hover:hover){ .ask-item:hover{transform:translateY(-1px);box-shadow:var(--shadow-2)} }
.planned{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));margin-bottom:24px}
.planned__item{display:flex;align-items:center;gap:12px;padding:16px;border-radius:var(--radius-md);border:1px dashed var(--border);color:var(--text-secondary);font-weight:600}
.planned__item .badge{margin-left:auto}
.notify{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin-bottom:48px}
.article-end{display:flex;flex-direction:column;gap:24px}

/* ── opportunities ──────────────────────────────────────────────────────── */
.opps-head{display:grid;gap:24px;align-items:end}
@media (min-width:1024px){ .opps-head{grid-template-columns:1fr 320px;gap:48px} }
.opps-post{display:flex;flex-direction:column;gap:10px;padding:24px;border-radius:var(--radius-lg);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1)}
.list-view{display:flex;flex-direction:column;gap:16px}
.results{min-width:0}
.price-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:768px){ .price-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:16px} }
.price{position:relative;display:flex;flex-direction:column;gap:8px;padding:24px 20px;border-radius:var(--radius-lg);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1)}
.price .btn{margin-top:auto}
.price--best{box-shadow:0 0 0 2px var(--text-primary),var(--shadow-2)}
.price--best .badge{position:absolute;top:-12px;left:20px}
@media (max-width:767px){ .price-grid > :last-child{grid-column:span 2} }

/* ── e-UA ───────────────────────────────────────────────────────────────── */
.eua-hero{display:grid;gap:32px;align-items:end;padding:32px 20px;border-radius:var(--radius-xl);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1)}
@media (min-width:1024px){ .eua-hero{grid-template-columns:1.25fr .75fr;gap:56px;padding:56px} }
.eua-hero__copy{display:flex;flex-direction:column;align-items:flex-start;gap:20px;min-width:0}
.eua-hero__copy .display{max-width:13ch}
.eua-hero__stats{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.eua-stat{display:flex;flex-direction:column;gap:6px;padding:20px;border-radius:var(--radius-lg);background:var(--bg-surface-alt)}
.eua-stat .metric{font-size:40px}
.eua-stat__note{grid-column:1 / -1;font-size:13px;color:var(--text-tertiary)}
.bcards{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.bcard .avatar{background:var(--brand-100);color:var(--ink-900)}
:root[data-theme="dark"] .bcard .avatar{background:var(--bg-muted);color:var(--brand-500)}
.seg-ctl{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;padding:4px;border-radius:var(--radius-md);background:var(--bg-surface-alt)}
.seg-ctl button{height:38px;border:0;border-radius:9px;background:transparent;font-size:14px;font-weight:600;color:var(--text-secondary);cursor:pointer}
.seg-ctl button[aria-pressed="true"]{background:var(--bg-surface);color:var(--text-primary);box-shadow:var(--shadow-1)}
:root[data-theme="dark"] .seg-ctl button[aria-pressed="true"]{background:var(--bg-muted)}
.add-biz{display:grid;gap:32px;align-items:start}
@media (min-width:1024px){ .add-biz{grid-template-columns:.9fr 1.1fr;gap:64px} }
.add-biz__copy{display:flex;flex-direction:column;gap:16px;align-items:flex-start}
@media (min-width:1024px){ .add-biz__copy{position:sticky;top:calc(var(--header-h) + 32px)} }
.add-biz__list{color:var(--text-secondary);font-size:16px}
.add-biz__form{gap:20px}
.form-grid{display:grid;gap:16px;grid-template-columns:1fr}
@media (min-width:600px){ .form-grid{grid-template-columns:1fr 1fr} .form-grid__full{grid-column:1 / -1} }

/* ── ArtI-AI chat ───────────────────────────────────────────────────────── */
/* An app screen, not a document: the page itself never scrolls, the thread does. */
body[data-page="ai"]{display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:hidden}
body[data-page="ai"] #app-header{flex:none}
.ai{flex:1;min-height:0}
.ai__wrap{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;height:100%;padding-top:0;padding-bottom:0}
@media (min-width:1024px){ .ai__wrap{grid-template-columns:300px minmax(0,1fr);padding-top:20px;padding-bottom:20px} }
.ai__side{display:none}
@media (min-width:1024px){ .ai__side{display:flex;flex-direction:column;gap:16px;min-height:0;overflow-y:auto;scrollbar-width:thin} }
.ai-card{display:flex;flex-direction:column;gap:14px;padding:20px;border-radius:var(--radius-lg);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-1)}
.ai-card--note{background:var(--bg-surface-alt);box-shadow:none;gap:8px}
.ai-status{display:flex;align-items:center;gap:10px;font-weight:700}
.ai-status--sm{font-size:14px;gap:8px}
.ai-model{font-size:12px;color:var(--text-tertiary);word-break:break-word}
.quota{display:flex;flex-direction:column;gap:8px}
.quota__top{display:flex;justify-content:space-between;gap:8px;font-size:14px;color:var(--text-secondary)}
.quota__top b{color:var(--text-primary)}
.quota__bar{height:8px;border-radius:8px;background:var(--bg-muted);overflow:hidden}
.quota__bar span{display:block;height:100%;border-radius:8px;background:var(--brand-500);transition:width var(--dur-slow) var(--ease)}
.quota__bar span.is-low{background:var(--warning)}
.ai-quick{display:flex;flex-direction:column;gap:4px}
.ai-quick__item{display:flex;align-items:flex-start;gap:10px;padding:10px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--text-primary);
  font-size:14px;font-weight:500;line-height:1.4;text-align:left;cursor:pointer}
.ai-quick__item .i{width:18px;height:18px;margin-top:1px;color:var(--text-tertiary)}
@media (hover:hover){ .ai-quick__item:hover{background:var(--bg-surface-alt)} }

.ai__chat{display:flex;flex-direction:column;min-height:0;min-width:0;background:var(--bg-surface)}
@media (min-width:1024px){ .ai__chat{border-radius:var(--radius-xl);border:1px solid var(--surface-border);box-shadow:var(--shadow-1);overflow:hidden} }
@media (max-width:1023px){ .ai__wrap{padding:0} }
.ai__mobile-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:0 8px 0 var(--gutter);border-bottom:1px solid var(--separator)}
.ai__mobile-bar .caption{margin-left:auto}
@media (min-width:1024px){ .ai__mobile-bar{display:none} }
.ai__thread{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:24px var(--gutter)}
@media (min-width:1024px){ .ai__thread{padding:32px 40px} }
.ai-msgs{display:flex;flex-direction:column;gap:24px;max-width:820px;margin:0 auto}

.ai-empty{display:flex;flex-direction:column;align-items:center;gap:16px;max-width:760px;margin:0 auto;padding:24px 0;text-align:center}
@media (min-width:1024px){ .ai-empty{padding:56px 0} }
.ai-empty__mark{display:grid;place-items:center;width:64px;height:64px;border-radius:20px;background:var(--ink-900)}
:root[data-theme="dark"] .ai-empty__mark{background:var(--bg-muted)}
.ai-empty__mark img{width:36px;height:auto}
.ai-empty .lead{max-width:52ch}
.ai-presets{display:grid;gap:12px;width:100%;margin-top:12px;grid-template-columns:1fr}
@media (min-width:600px){ .ai-presets{grid-template-columns:1fr 1fr} }
.ai-preset{display:flex;align-items:flex-start;gap:12px;padding:16px 18px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg-surface);
  color:var(--text-primary);font-size:15px;font-weight:600;line-height:1.4;text-align:left;cursor:pointer;
  transition:border-color var(--dur-fast) var(--ease),transform var(--dur-fast) var(--ease)}
.ai-preset .i{color:var(--brand-700);margin-top:1px}
:root[data-theme="dark"] .ai-preset .i{color:var(--brand-500)}
@media (hover:hover){ .ai-preset:hover{border-color:var(--text-primary);transform:translateY(-1px)} }

.msg{display:flex;gap:12px;align-items:flex-start}
.msg--me{justify-content:flex-end}
.msg__ava{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:11px;background:var(--ink-900)}
:root[data-theme="dark"] .msg__ava{background:var(--bg-muted)}
.msg__ava img{width:20px;height:auto}
.msg__col{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}
.bubble{max-width:100%;font-size:16px;line-height:1.6;overflow-wrap:anywhere}
.bubble--me{max-width:min(85%,640px);padding:12px 16px;border-radius:20px 20px 6px 20px;background:var(--ink-900);color:#fff}
:root[data-theme="dark"] .bubble--me{background:#F5F5F3;color:var(--ink-900)}
.bubble--ai{padding:2px 0}
.bubble--ai p + p,.bubble--ai p + ul,.bubble--ai p + ol,.bubble--ai ul + p,.bubble--ai ol + p,.bubble--ai h4 + p{margin-top:10px}
.bubble--ai ul,.bubble--ai ol{margin:8px 0 0 22px;display:flex;flex-direction:column;gap:4px}
.bubble--ai h4{margin:14px 0 4px;font-size:17px;font-weight:700}
.bubble--ai h4:first-child{margin-top:0}
.bubble--ai code{padding:1px 6px;border-radius:6px;background:var(--bg-muted);font-family:var(--font-mono);font-size:.88em}
.bubble--ai pre{margin:10px 0;padding:14px;border-radius:var(--radius-md);background:var(--bg-surface-alt);overflow-x:auto}
.bubble--ai pre code{padding:0;background:none}
.bubble--ai a{color:var(--info)}
.bubble--ai hr{border:0;border-top:1px solid var(--separator);margin:12px 0}
.caret{display:inline-block;width:8px;height:1.1em;margin-left:2px;vertical-align:-3px;background:var(--brand-500);animation:caret 1s steps(1) infinite}
@keyframes caret{50%{opacity:0}}
.typing{display:inline-flex;gap:4px;padding:10px 0}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--text-tertiary);animation:typing 1.2s infinite ease-in-out}
.typing i:nth-child(2){animation-delay:.15s} .typing i:nth-child(3){animation-delay:.3s}
@keyframes typing{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.ai-wait{margin-left:10px}
.msg__meta{display:flex;flex-wrap:wrap;align-items:center;gap:12px;font-size:13px;color:var(--text-tertiary)}
.ai-who{display:inline-flex;align-items:center;gap:6px}
.ai-who::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--warning)}
.ai-who--gpu::before{background:var(--success)}
.msg__copy{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 8px;border:0;border-radius:8px;background:transparent;color:inherit;font-size:13px;cursor:pointer}
@media (hover:hover){ .msg__copy:hover{background:var(--bg-surface-alt);color:var(--text-primary)} }
.ai-error{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 14px;border-radius:var(--radius-md);background:var(--danger-bg);color:var(--text-primary);font-size:15px}
.ai-error .i{color:var(--danger)}
.ai-error span{flex:1;min-width:180px}

.ai__composer{flex:none;padding:12px var(--gutter) 12px;border-top:1px solid var(--separator);background:var(--bg-surface)}
@media (min-width:1024px){ .ai__composer{padding:16px 40px 20px} }
.composer{display:flex;align-items:flex-end;gap:8px;max-width:820px;margin:0 auto;padding:8px 8px 8px 16px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg-surface);
  transition:border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease)}
.composer:focus-within{border-color:var(--text-primary);box-shadow:var(--shadow-focus)}
.composer textarea{flex:1;min-width:0;min-height:40px;max-height:200px;padding:9px 0;border:0;background:transparent;resize:none;outline:none;font-size:16px;line-height:1.4}
.composer textarea::placeholder{color:var(--text-tertiary)}
.composer__send{display:grid;place-items:center;flex:none;width:44px;height:44px;border:0;border-radius:12px;background:var(--brand-500);color:var(--ink-900);cursor:pointer;
  transition:background var(--dur-fast) var(--ease)}
.composer__send:disabled{background:var(--bg-muted);color:var(--text-tertiary);cursor:not-allowed}
@media (hover:hover){ .composer__send:not(:disabled):hover{background:var(--brand-600)} }
.composer__send .i--stop{display:none}
.composer__send.is-stop{background:var(--ink-900);color:#fff}
:root[data-theme="dark"] .composer__send.is-stop{background:#F5F5F3;color:var(--ink-900)}
.composer__send.is-stop .i--stop{display:block;fill:currentColor}
.composer__send.is-stop .i--send{display:none}
.composer__hint{display:flex;justify-content:space-between;gap:12px;max-width:820px;margin:8px auto 0;font-size:12px;color:var(--text-tertiary)}
@media (max-width:599px){ .composer__hint span:first-child{display:none} .composer__hint{justify-content:flex-end} }

/* ── contacts ───────────────────────────────────────────────────────────── */
.contact-card{flex-direction:row;align-items:flex-start;gap:16px}
.contact-card__icon{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:14px;background:var(--brand-100)}
.contact-card a{font-weight:700;text-decoration:none}
@media (hover:hover){ .contact-card a:hover{text-decoration:underline} }
.legal{display:grid;gap:16px}
@media (min-width:768px){ .legal{grid-template-columns:repeat(3,minmax(0,1fr))} }

/* ── PWA ────────────────────────────────────────────────────────────────── */
/* Installed from the placeholder, iOS keeps its translucent status bar, so the
   sticky header makes room for it. env() is 0 everywhere else. */
.header{height:calc(var(--header-h) + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)}
.install{position:fixed;z-index:70;left:12px;right:12px;bottom:calc(var(--tabbar-h) + 12px);display:flex;align-items:center;gap:12px;
  padding:12px 8px 12px 12px;border-radius:var(--radius-lg);background:var(--bg-surface);border:1px solid var(--surface-border);box-shadow:var(--shadow-2);
  animation:toastIn var(--dur-slow) var(--ease)}
@media (min-width:768px){ .install{left:auto;right:24px;bottom:24px;width:440px} }
.install__icon{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:12px;background:var(--ink-900)}
.install__icon img{width:24px;height:auto}
.install__text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;font-size:15px}
.install__text .caption{font-size:13px}
.ios-steps{display:flex;flex-direction:column;gap:12px;margin:0 0 8px 20px;font-size:16px}
