/* ============================================================
   FINNS — Core styles
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--gold); color: #0B0C0F; }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold);
  opacity: 0.7;
}
.eyebrow--center::before { display: none; }

.lead { font-size: var(--fs-lead); color: var(--text-muted); line-height: 1.6; }
.muted { color: var(--text-muted); }

.gold-text { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              border-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }

.btn--gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1A1405;
  border-color: var(--gold-deep);
}
.btn--gold:hover { background: var(--gold-bright); transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

.btn--dark {
  background: var(--ink);
  color: #fff;
}
.btn--lg { padding: 17px 34px; font-size: 1.02rem; }
.btn--sm { padding: 10px 18px; font-size: 0.875rem; }

/* ============================================================
   HEADER + NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(11, 12, 15, 0.72);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.site-header.is-solid { background: rgba(11, 12, 15, 0.96); }

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 26px;
}

/* Brand / logo */
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold-deep));
  display: grid; place-items: center;
  color: #14110A;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.04em;
  box-shadow: var(--shadow-gold);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.brand__name span { color: var(--gold); }
.brand__sub {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 3px;
}

/* Primary nav (desktop) */
.nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link.is-open { color: var(--gold-bright); background: var(--gold-soft); }
.nav__link .caret {
  width: 14px; height: 14px;
  transition: transform 0.25s var(--ease);
  opacity: 0.7;
}
.nav__link.is-open .caret { transform: rotate(180deg); }
.nav__link.is-bizcore { color: var(--gold); font-weight: 600; }
.nav__link.is-bizcore:hover { color: var(--gold-bright); }

.nav__spacer { flex: 1; }

/* right cluster */
.nav__right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* language toggle */
.lang {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.lang button {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  padding: 7px 12px;
  transition: color 0.2s, background 0.2s;
}
.lang button.is-active { background: var(--gold); color: #1A1405; }

/* hamburger */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: transparent;
  position: relative;
  flex-shrink: 0;
}
.hamburger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.hamburger span:nth-child(1) { top: 15px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 27px; }

/* ============================================================
   MEGA MENU
   ============================================================ */
.mega {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: var(--bg-elev);
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  z-index: 190;
}
.mega.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

.mega__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 0.9fr;
  gap: 0;
}
.mega__col { padding: 38px 34px; border-right: 1px solid var(--line); }
.mega__col:last-child { border-right: 0; }

.mega__title {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 18px;
}
.mega__item {
  display: flex;
  gap: 14px;
  padding: 11px 12px;
  border-radius: 11px;
  transition: background 0.18s var(--ease);
}
.mega__item:hover { background: var(--bg-elev-2); }
.mega__ico {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--gold-bright);
}
.mega__ico svg { width: 19px; height: 19px; }
.mega__item h4 { font-size: 0.98rem; font-weight: 600; font-family: var(--font-body); letter-spacing: 0; }
.mega__item p { font-size: 0.82rem; color: var(--text-dim); line-height: 1.45; margin-top: 2px; }

/* featured promo column (BizCore) */
.mega__promo {
  padding: 34px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(201,162,74,0.16), transparent 60%),
    var(--bg-elev-2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}
.mega__promo .badge {
  align-self: flex-start;
  font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-bright);
  border: 1px solid var(--gold-line);
  border-radius: 999px; padding: 5px 12px;
}
.mega__promo h3 { font-size: 1.5rem; }
.mega__promo p { font-size: 0.9rem; color: var(--text-muted); }

/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.scrim {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
  z-index: 290;
}
.scrim.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(86vw, 360px);
  background: var(--bg-elev);
  border-right: 1px solid var(--gold-line);
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.34s var(--ease);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg-elev); z-index: 2;
}
.drawer__close {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  font-size: 1.4rem; line-height: 1;
}
.drawer__body { padding: 12px 14px 28px; }
.drawer__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 14px;
  border-radius: 11px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.drawer__link:hover { background: var(--bg-elev-2); }
.drawer__sub {
  padding: 4px 14px 10px;
}
.drawer__sub a {
  display: block;
  padding: 11px 14px 11px 28px;
  font-size: 0.94rem;
  color: var(--text-muted);
  border-radius: 9px;
}
.drawer__sub a:hover { color: var(--gold-bright); }
.drawer__group { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.drawer__grouptitle {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; padding: 16px 14px 6px;
}
.drawer__foot { padding: 18px; border-top: 1px solid var(--line); margin-top: auto; display: grid; gap: 10px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #08090B;
  border-top: 1px solid var(--line);
  padding-top: clamp(56px, 7vw, 90px);
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
}
.footer__brand p { color: var(--text-dim); font-size: 0.92rem; margin-top: 16px; max-width: 30ch; }
.footer__col h5 {
  font-family: var(--font-body);
  font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 16px;
}
.footer__col a { display: block; color: var(--text-muted); font-size: 0.93rem; padding: 6px 0; }
.footer__col a:hover { color: var(--gold-bright); }
.footer__contact li { display: flex; gap: 11px; color: var(--text-muted); font-size: 0.92rem; padding: 6px 0; }
.footer__contact svg { width: 17px; height: 17px; color: var(--gold); flex-shrink: 0; margin-top: 3px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.socials a:hover { color: var(--gold-bright); border-color: var(--gold-line); background: var(--gold-soft); }
.socials svg { width: 18px; height: 18px; }
.footer__bottom {
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
  padding-block: 26px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  color: var(--text-dim); font-size: 0.84rem;
}
.footer__bottom a { color: var(--text-dim); }
.footer__bottom a:hover { color: var(--gold); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.footer__legal a { color: var(--text-dim); }
.footer__legal a:hover { color: var(--gold); }
.footer__legal span { color: var(--text-dim); }

/* language dropdown (multi-language ready) */
.lang-dd { position: relative; }
.lang-dd__btn { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--line-2); color: var(--text-muted); border-radius: 999px; padding: 8px 10px 8px 12px; font-family: var(--font-body); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.03em; transition: border-color 0.2s, color 0.2s; }
.lang-dd__btn:hover { border-color: var(--gold-line); color: var(--text); }
.lang-dd__btn > svg:first-child { width: 16px; height: 16px; }
.lang-dd__btn .caret { width: 13px; height: 13px; opacity: 0.7; transition: transform 0.2s; }
.lang-dd.is-open .lang-dd__btn .caret { transform: rotate(180deg); }
.lang-dd__menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; background: var(--bg-elev); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s; z-index: 210; }
.lang-dd.is-open .lang-dd__menu { opacity: 1; visibility: visible; transform: none; }
.lang-dd__opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: transparent; border-radius: 8px; color: var(--text); font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; text-align: left; }
.lang-dd__opt:hover:not(:disabled) { background: var(--bg-elev-2); color: var(--gold-bright); }
.lang-dd__opt.is-active { color: var(--gold); font-weight: 700; }
.lang-dd__opt:disabled { color: var(--text-dim); cursor: not-allowed; }
.lang-soon { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
@media (max-width: 560px) { .lang-dd { display: inline-flex; } }
.trust-badges { margin-top: clamp(36px, 5vw, 56px); padding-top: 30px; border-top: 1px solid var(--line); }
.trust-badges__lbl { display: block; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 18px; }
.trust-badges__row { display: flex; flex-wrap: wrap; gap: 14px; }
.tbadge { display: inline-flex; align-items: center; gap: 12px; padding: 13px 18px 13px 14px; border: 1px solid var(--gold-line); border-radius: 12px; background: linear-gradient(180deg, rgba(201,162,74,0.06), transparent); }
.tbadge__ico { width: 38px; height: 38px; border-radius: 9px; background: var(--gold-soft); border: 1px solid var(--gold-line); display: grid; place-items: center; color: var(--gold-bright); flex-shrink: 0; }
.tbadge__ico svg { width: 20px; height: 20px; }
.tbadge__txt { display: flex; flex-direction: column; line-height: 1.25; }
.tbadge__txt b { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; letter-spacing: 0.01em; }
.tbadge__txt span { font-size: 0.74rem; color: var(--text-dim); }
@media (max-width: 560px) { .tbadge { flex: 1 1 100%; } }

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.wa-float {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 250;
  display: flex; align-items: center; gap: 0;
  background: #1FAA53;
  color: #fff;
  border-radius: 999px;
  padding: 14px;
  box-shadow: 0 14px 34px -10px rgba(31,170,83,0.7);
  transition: padding 0.3s var(--ease), transform 0.25s var(--ease);
  overflow: hidden;
}
.wa-float svg { width: 26px; height: 26px; flex-shrink: 0; }
.wa-float span {
  max-width: 0;
  white-space: nowrap;
  font-weight: 600; font-size: 0.95rem;
  overflow: hidden;
  transition: max-width 0.35s var(--ease), margin 0.35s var(--ease);
}
.wa-float:hover { transform: translateY(-2px); padding-inline: 18px 20px; }
.wa-float:hover span { max-width: 180px; margin-left: 10px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .nav__menu { display: none; }
  .hamburger { display: block; }
  .nav__right .btn--cta { display: none; }
}
@media (max-width: 860px) {
  .mega__inner { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .brand__sub { display: none; }
  .footer__top { grid-template-columns: 1fr; }
  .lang { display: none; }
}

/* ============================================================
   NAV ICON BUTTON
   ============================================================ */
.icon-btn {
  width: 42px; height: 42px; border-radius: 11px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text-muted);
  display: grid; place-items: center; flex-shrink: 0;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.icon-btn:hover { color: var(--gold-bright); border-color: var(--gold-line); background: var(--gold-soft); }
.icon-btn svg { width: 19px; height: 19px; }

/* ============================================================
   FLOATING STACK — AI assistant + WhatsApp
   ============================================================ */
.float-stack {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 250;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.float-stack .wa-float { position: static; right: auto; bottom: auto; }

.ai-float {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1A1405; border: 1px solid var(--gold-deep);
  border-radius: 999px; padding: 13px 20px 13px 16px; cursor: pointer;
  box-shadow: var(--shadow-gold); overflow: hidden;
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.ai-float svg { width: 24px; height: 24px; flex-shrink: 0; }
.ai-float span { white-space: nowrap; }
.ai-float:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -16px rgba(201,162,74,0.7); }
.ai-float.is-hidden { display: none; }

/* ============================================================
   AI ASSISTANT PANEL
   ============================================================ */
.ai-panel {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  width: min(392px, calc(100vw - 32px));
  height: min(584px, calc(100vh - 96px));
  background: var(--bg-elev);
  border: 1px solid var(--gold-line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  z-index: 260;
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; visibility: hidden;
  transform: translateY(16px) scale(0.98); transform-origin: bottom right;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0.26s;
}
.ai-panel.is-open { opacity: 1; visibility: visible; transform: none; }

.ai-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 130% at 0% 0%, rgba(201,162,74,0.16), transparent 60%), var(--bg-elev-2);
}
.ai-panel__id { display: flex; align-items: center; gap: 12px; }
.ai-panel__avatar {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold-deep));
  display: grid; place-items: center; color: #14110A; flex-shrink: 0;
}
.ai-panel__avatar svg { width: 22px; height: 22px; }
.ai-panel__name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.ai-panel__status { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }
.dotlive { width: 7px; height: 7px; border-radius: 50%; background: #1FAA53; box-shadow: 0 0 0 3px rgba(31,170,83,0.18); }
.ai-panel__close { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-size: 1.4rem; line-height: 1; }
.ai-panel__close:hover { color: var(--gold-bright); border-color: var(--gold-line); }

.ai-panel__body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ai-msg { display: flex; gap: 9px; max-width: 100%; }
.ai-msg--user { justify-content: flex-end; }
.ai-msg__av { width: 28px; height: 28px; border-radius: 8px; background: var(--gold-soft); border: 1px solid var(--gold-line); display: grid; place-items: center; color: var(--gold-bright); flex-shrink: 0; }
.ai-msg__av svg { width: 15px; height: 15px; }
.ai-bubble { padding: 12px 15px; border-radius: 14px; font-size: 0.94rem; line-height: 1.6; max-width: 80%; }
.ai-msg--ai .ai-bubble { background: var(--bg-elev-2); border: 1px solid var(--line); border-top-left-radius: 5px; color: var(--text); }
.ai-msg--user .ai-bubble { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1A1405; border-top-right-radius: 5px; font-weight: 500; }
.ai-msg.is-err .ai-bubble { border-color: var(--gold-line); color: var(--text-muted); }

.ai-typing { display: inline-flex; gap: 4px; padding: 2px 0; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); animation: aiblink 1.2s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: 0.18s; }
.ai-typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes aiblink { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ai-typing i { animation: none; } }

.ai-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.ai-chip { border: 1px solid var(--line-2); background: transparent; color: var(--text-muted); border-radius: 999px; padding: 8px 13px; font-size: 0.82rem; font-weight: 500; text-align: left; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.ai-chip:hover { color: var(--gold-bright); border-color: var(--gold-line); background: var(--gold-soft); }

/* composer (Claude/ChatGPT-style) */
.ai-composer { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-attachments { display: none; flex-wrap: wrap; gap: 8px; }
.ai-attachments.has-items { display: flex; }
.ai-chip-file { display: inline-flex; align-items: center; gap: 7px; background: var(--bg-elev-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 6px 8px 6px 10px; font-size: 0.8rem; color: var(--text); max-width: 220px; }
.ai-chip-file svg { width: 14px; height: 14px; color: var(--gold); flex-shrink: 0; }
.ai-chip-file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-chip-file button { border: 0; background: transparent; color: var(--text-dim); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.ai-chip-file button:hover { color: var(--gold-bright); }

/* unified input box — textarea + tools + send share one border */
.ai-box { border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg); padding: 6px 6px 6px 0; transition: border-color 0.2s, box-shadow 0.2s; }
.ai-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.ai-box textarea {
  width: 100%; resize: none; background: transparent; border: 0; color: var(--text);
  padding: 12px 14px 4px; font-family: inherit; font-size: 0.94rem; line-height: 1.5;
  max-height: none; overflow-y: hidden; display: block;
}
.ai-box textarea:focus { outline: none; }
.ai-box__bar { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 0 10px; }
.ai-composer__tools { display: flex; align-items: center; gap: 2px; }
.ai-tool {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent;
  color: var(--text-dim); display: grid; place-items: center; cursor: pointer; transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.ai-tool svg { width: 18px; height: 18px; }
.ai-tool:hover { color: var(--gold-bright); background: var(--gold-soft); }
.ai-tool.is-off { opacity: 0.4; cursor: not-allowed; }
.ai-tool.is-rec { color: #E5484D; background: rgba(229,72,77,0.12); animation: aimic 1.3s infinite; }
@keyframes aimic { 0%,100% { box-shadow: 0 0 0 0 rgba(229,72,77,0.4); } 50% { box-shadow: 0 0 0 5px rgba(229,72,77,0); } }
@media (prefers-reduced-motion: reduce) { .ai-tool.is-rec { animation: none; } }
.ai-send { width: 36px; height: 36px; border-radius: 10px; border: 0; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1A1405; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; transition: opacity 0.2s, transform 0.1s; }
.ai-send:hover:not(:disabled) { filter: brightness(1.05); }
.ai-send:active:not(:disabled) { transform: scale(0.94); }
.ai-send:disabled { background: var(--bg-elev-3); color: var(--text-dim); cursor: not-allowed; }
.ai-send svg { width: 18px; height: 18px; }
.ai-foot { text-align: center; font-size: 0.72rem; color: var(--text-dim); padding: 0 14px 12px; }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: fixed; inset: 0; z-index: 310;
  background: rgba(6,7,9,0.86);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity 0.24s var(--ease), visibility 0.24s;
  padding-top: 14vh;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-overlay__inner { width: 100%; max-width: 680px; margin-inline: auto; padding-inline: var(--gutter); }
.search-box { display: flex; align-items: center; gap: 12px; background: var(--bg-elev); border: 1px solid var(--gold-line); border-radius: 16px; padding: 6px 6px 6px 20px; box-shadow: var(--shadow); }
.search-box__ico { color: var(--gold); display: grid; place-items: center; }
.search-box__ico svg { width: 22px; height: 22px; }
.search-box input { flex: 1; background: transparent; border: 0; color: var(--text); font-family: inherit; font-size: 1.15rem; padding: 16px 0; }
.search-box input:focus { outline: none; }
.search-box__close { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.search-box__close:hover { color: var(--gold-bright); border-color: var(--gold-line); }
.search-hint { text-align: center; color: var(--text-dim); font-size: 0.86rem; margin-top: 18px; }

@media (max-width: 560px) {
  .ai-float span { display: none; }
  .ai-float { padding: 14px; }
  .ai-panel { height: min(72vh, calc(100vh - 90px)); }
}
