/* ============================================================
   TUBLO — Stainless Steel Pipes
   Palette: Clean Light / Professional / Furnace Orange
   Type: Saira (display) + Inter (body)
   ============================================================ */
:root {
  --ink: #FFFFFF;
  --steel-900: #F8FAFB;
  --steel-800: #F0F3F7;
  --steel-700: #E8EDF3;
  --line: #D1D9E3;
  --text: #1A202B;
  --muted: #6B7280;
  --accent: #FF6B2C;
  --accent-soft: rgba(255, 107, 44, .08);
  --chrome-a: #1A202B;
  --chrome-b: #2D3748;
  --chrome-c: #4A5568;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .08);
  --font-d: "Saira", system-ui, sans-serif;
  --font-b: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, 92%); margin-inline: auto; }
.ic { vertical-align: -0.18em; }

h1, h2, h3, h4 { font-family: var(--font-d); line-height: 1.12; letter-spacing: .2px; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.22rem; font-weight: 600; }
p  { color: var(--muted); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: .6rem 1rem; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Chrome text — signature headline treatment */
.chrome {
  background: linear-gradient(178deg, #1A202B 12%, #2D3748 42%, #4A5568 55%, #1A202B 82%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-d); font-size: .8rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .55rem 0; }
.brand { display: inline-flex; align-items: center; overflow: hidden; }
.brand img { width: 92px; height: auto; display: block; object-fit: contain; object-position: center; clip-path: inset(8px 0 0 0); }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a {
  font-size: .93rem; font-weight: 500; color: var(--muted);
  padding: .35rem 0; position: relative; transition: color .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-cta {
  background: var(--accent); color: #fff !important; font-weight: 600;
  padding: .55rem 1.1rem !important; border-radius: 999px;
  display: inline-flex; align-items: center; gap: .4rem;
  transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255, 107, 44, .35); }
.nav-cta.active::after { display: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: .4rem; }

/* Language Switcher */
.header-actions {
  display: flex; align-items: center; gap: 1rem;
}
.lang-switcher {
  position: relative;
}
.lang-button {
  background: none; border: 1px solid var(--line);
  color: var(--text); cursor: pointer;
  padding: .4rem .8rem; border-radius: 6px;
  font-size: .9rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: all .2s;
}
.lang-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lang-current {
  min-width: 70px; text-align: left;
}
.lang-menu {
  position: absolute; top: 100%; right: 0; margin-top: .5rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 140px;
  box-shadow: var(--shadow);
  z-index: 1000;
}
.lang-menu[hidden] {
  display: none;
}
.lang-option {
  display: block;
  padding: .6rem 1rem;
  color: var(--text);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  border-radius: 6px;
}
.lang-option:first-child {
  border-radius: 7px 7px 0 0;
}
.lang-option:last-child {
  border-radius: 0 0 7px 7px;
}
.lang-option:hover {
  background: var(--steel-800);
  color: var(--accent);
}
.lang-option.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* Responsive: hide language switcher on mobile initially, show in menu */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(4rem, 8vw, 6.5rem);
  background:
    radial-gradient(900px 480px at 82% -10%, rgba(255, 107, 44, .06), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(66, 153, 225, .05), transparent 60%),
    var(--ink);
}
.pipe-field { position: absolute; inset: -12%; z-index: 0; transform: rotate(-14deg); pointer-events: none; }
.pipe {
  position: absolute; left: -30%; width: 160%; border-radius: 999px;
  background: linear-gradient(180deg,
    #D0D5DB 0%, #E5E8EE 16%, #F5F7FA 30%, #DFE5EC 45%,
    #B8C1CC 62%, #D0D5DB 80%, #C7CED8 100%);
  box-shadow: 0 24px 44px rgba(0, 0, 0, .08);
  opacity: .24;
  animation: pipe-drift 26s linear infinite;
}
.pipe::after { /* subtle brushed lines */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: repeating-linear-gradient(90deg, transparent 0 26px, rgba(0,0,0,.03) 26px 27px);
}
.pipe:nth-child(1) { top: 6%;  height: 74px; animation-duration: 34s; opacity: .2; }
.pipe:nth-child(2) { top: 24%; height: 46px; animation-duration: 27s; animation-delay: -9s; }
.pipe:nth-child(3) { top: 41%; height: 96px; animation-duration: 40s; animation-delay: -17s; opacity: .28; }
.pipe:nth-child(4) { top: 62%; height: 56px; animation-duration: 24s; animation-delay: -5s; }
.pipe:nth-child(5) { top: 78%; height: 82px; animation-duration: 37s; animation-delay: -22s; opacity: .22; }
.pipe:nth-child(6) { top: 92%; height: 40px; animation-duration: 21s; animation-delay: -12s; }
@keyframes pipe-drift {
  from { transform: translateX(-6%); }
  to   { transform: translateX(6%); }
}
.hero::after { /* keeps text readable over pipes */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.90) 52%, rgba(255,255,255,.50) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero-kicker { margin-bottom: 1rem; }
.hero h1 { max-width: 13ch; margin: .4rem 0 1.1rem; }
.hero-sub { max-width: 54ch; font-size: 1.06rem; margin-bottom: 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .9rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-d); font-weight: 600; font-size: .98rem;
  padding: .8rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 107, 44, .38); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(26, 32, 43, .04); }
.btn-ghost:hover { border-color: #FF6B2C; transform: translateY(-2px); background: rgba(255, 107, 44, .06); }
.hero-grades { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.4rem; }
.grade-chip {
  font-family: var(--font-d); font-size: .82rem; font-weight: 600; letter-spacing: .08em;
  border: 1px solid var(--line); border-radius: 999px; padding: .4rem 1rem;
  color: var(--text); background: rgba(255, 107, 44, .06);
}

/* ---------------- Sections ---------------- */
.section { padding: clamp(3.6rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--steel-900); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 2.6rem; }
.section-head h2 { margin: .5rem 0 .7rem; }
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Cards */
.card {
  background: var(--steel-800); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .28s, border-color .28s, box-shadow .28s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); border-color: #3a4453; box-shadow: var(--shadow); }
.card-body { padding: 1.25rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card-body p { font-size: .93rem; flex: 1; }
.card-link { color: var(--accent); font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: .35rem; }
.card-link:hover { gap: .6rem; }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.05); }

/* CSS steel placeholder art (no broken images, ever) */
.ph-steel {
  width: 100%; height: 100%; min-height: 100%; position: relative; overflow: hidden;
  background:
    radial-gradient(420px 200px at 85% 8%, var(--accent-soft), transparent 65%),
    linear-gradient(160deg, #E8EDF3, #F8FAFB);
  display: block;
}
.card-media .ph-steel { aspect-ratio: 4 / 3; }
.ph-pipe {
  position: absolute; left: -12%; width: 124%; height: 17%;
  border-radius: 999px; transform: rotate(-14deg);
  background: linear-gradient(180deg, #C7CED8 0%, #DFE5EC 18%, #F5F7FA 32%, #D0D5DB 48%, #B8C1CC 66%, #C7CED8 86%);
  box-shadow: 0 14px 26px rgba(0,0,0,.08);
}
.ph-pipe:nth-child(1) { top: 20%; }
.ph-pipe:nth-child(2) { top: 44%; height: 22%; }
.ph-pipe:nth-child(3) { top: 72%; height: 13%; opacity: .8; }
.ph-grade {
  position: absolute; right: 12px; bottom: 10px;
  font-family: var(--font-d); font-weight: 700; font-size: .85rem; letter-spacing: .1em;
  color: var(--text); background: rgba(255,255,255,.85);
  border: 1px solid var(--line); border-radius: 8px; padding: .2rem .6rem;
}

/* Service cards */
.svc { padding: 1.6rem 1.5rem; gap: .8rem; }
.svc-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: grid; place-items: center; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(255,107,44,.25);
}

/* Meta rows on product cards */
.meta-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-size: .74rem; font-weight: 600; letter-spacing: .05em;
  border: 1px solid var(--line); color: var(--muted);
  border-radius: 6px; padding: .12rem .55rem;
}
.tag-accent { color: var(--accent); border-color: rgba(255,107,44,.4); }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.stat b { font-family: var(--font-d); font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; display: block; }
.stat span { color: var(--muted); font-size: .9rem; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(120deg, #F8FAFB, #F0F3F7);
  border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(2.6rem, 6vw, 4rem) 1.5rem;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(560px 260px at 50% -30%, var(--accent-soft), transparent 70%);
}
.cta-band > * { position: relative; }
.cta-band h2 { margin-bottom: .7rem; }
.cta-band p { max-width: 52ch; margin: 0 auto 1.6rem; }

/* ---------------- Product detail ---------------- */
.detail-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.6rem; align-items: start; }
.detail-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 1.1rem; font-size: .95rem; }
.spec-table th, .spec-table td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); }
.spec-table th { color: var(--muted); font-weight: 500; width: 38%; }
.size-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.size-pill {
  font-family: var(--font-d); font-size: .85rem; font-weight: 600;
  border: 1px solid var(--line); border-radius: 8px; padding: .35rem .75rem;
  background: var(--steel-800); color: var(--text);
}
.prose { max-width: 70ch; }
.prose p { margin-bottom: 1.1rem; }
.breadcrumb { font-size: .87rem; color: var(--muted); margin-bottom: 1.4rem; }
.breadcrumb a:hover { color: var(--text); }

/* ---------------- Blog ---------------- */
.blog-meta { font-size: .84rem; color: var(--muted); display: flex; gap: .9rem; }
.article { max-width: 760px; margin-inline: auto; }
.article h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: .8rem; }
.article .prose { font-size: 1.05rem; margin-top: 2rem; }
.article .prose p { color: var(--muted); }

/* ---------------- FAQ ---------------- */
.faq-list { max-width: 800px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: var(--steel-800); margin-bottom: .9rem; overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.05rem 1.3rem;
  font-family: var(--font-d); font-weight: 600; font-size: 1.02rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); transition: transform .25s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 1.3rem 1.2rem; color: var(--muted); }

/* ---------------- Contact ---------------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2.4rem; align-items: start; }
.contact-card { background: var(--steel-800); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; display: grid; gap: 1.1rem; }
.contact-line { display: flex; align-items: center; gap: .8rem; color: var(--text); }
.contact-line .ic { color: var(--accent); flex: none; }
.form { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { font-size: .88rem; font-weight: 600; display: block; margin-bottom: .35rem; }
input, textarea, select {
  width: 100%; background: var(--steel-900); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font: inherit; padding: .75rem .9rem;
  transition: border-color .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 140px; resize: vertical; }
.notice { border-radius: 10px; padding: .85rem 1.1rem; font-size: .95rem; }
.notice-ok { background: rgba(46, 196, 116, .12); border: 1px solid rgba(46,196,116,.4); color: #7ee2ae; }
.notice-err { background: rgba(255, 92, 92, .1); border: 1px solid rgba(255,92,92,.4); color: #ff9d9d; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--steel-900); border-top: 1px solid var(--line); margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2rem; padding: 3.2rem 0 2.4rem; }
.footer-brand img { width: 120px; height: auto; margin-bottom: 1rem; display: block; object-fit: contain; object-position: left center; clip-path: inset(8px 0 0 0); }
.footer-brand p { font-size: .92rem; max-width: 30ch; }
.footer-social { display: flex; gap: .7rem; margin-top: 1.1rem; }
.footer-social a {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--muted); transition: all .2s;
}
.footer-social a:hover { color: #fff; border-color: var(--accent); background: var(--accent-soft); transform: translateY(-3px); }
.footer-h { font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; color: var(--chrome-c); margin-bottom: 1rem; font-weight: 600; }
.footer-col { display: grid; gap: .6rem; align-content: start; }
.footer-col a, .footer-col span { color: var(--muted); font-size: .94rem; display: inline-flex; align-items: center; gap: .5rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line); padding: 1.1rem 0; font-size: .85rem; }
.footer-bottom p { text-align: center; }

/* WhatsApp float */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(37, 211, 102, .4);
  animation: wa-pulse 2.6s infinite;
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-tip {
  position: absolute; right: 70px; white-space: nowrap;
  background: var(--steel-800); border: 1px solid var(--line);
  color: var(--text); font-size: .82rem; font-weight: 600;
  padding: .4rem .8rem; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.wa-float:hover .wa-tip { opacity: 1; }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(37,211,102,.4), 0 0 0 0 rgba(37,211,102,.35); }
  50%      { box-shadow: 0 12px 30px rgba(37,211,102,.4), 0 0 0 14px rgba(37,211,102,0); }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 0; top: 64px; z-index: 99;
    background: rgba(255,255,255,.98); flex-direction: column; justify-content: flex-start;
    padding: 2rem 8%; gap: .4rem; display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { font-size: 1.2rem; padding: .8rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .main-nav a.active::after { display: none; }
  .nav-cta { justify-content: center; margin-top: 1rem; border-radius: 12px; }
  .header-actions { position: absolute; top: 50%; right: 4rem; transform: translateY(-50%); gap: 0; }
  .lang-switcher { position: relative; }
  .lang-menu { right: -10px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .wa-float { right: 16px; bottom: 16px; }
}

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

/* ============================================================
   Tublo Bot — chat widget
   ============================================================ */
.tb-root { position: fixed; left: 22px; bottom: 22px; z-index: 95; font-family: var(--font-b); }
.tb-launcher {
  position: relative; width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid var(--line); cursor: pointer;
  background: linear-gradient(150deg, var(--steel-700), var(--steel-900));
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
  transition: transform .2s, box-shadow .2s;
}
.tb-launcher:hover { transform: scale(1.08); box-shadow: 0 14px 34px rgba(255,107,44,.3); }
.tb-launcher img { border-radius: 50%; }
.tb-badge {
  position: absolute; top: -3px; right: -3px; width: 20px; height: 20px;
  background: var(--accent); color: #fff; border-radius: 50%;
  font-size: .7rem; font-weight: 700; display: grid; place-items: center;
  animation: wa-pulse 2.6s infinite;
}
.tb-panel {
  position: absolute; left: 0; bottom: 72px;
  width: min(370px, calc(100vw - 32px));
  height: min(540px, calc(100vh - 120px));
  background: var(--steel-900); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(14px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
}
.tb-panel.tb-open { opacity: 1; transform: none; }
.tb-head {
  display: flex; align-items: center; gap: .7rem;
  padding: .85rem 1rem; border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, var(--steel-800), var(--steel-900));
}
.tb-head img { border-radius: 50%; border: 1px solid var(--line); }
.tb-head strong { font-family: var(--font-d); font-size: 1rem; display: block; line-height: 1.2; }
.tb-status { font-size: .75rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; }
.tb-status i { width: 7px; height: 7px; border-radius: 50%; background: #2EC474; display: inline-block; }
.tb-close {
  margin-left: auto; background: none; border: 0; color: var(--muted);
  font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .2rem .4rem;
}
.tb-close:hover { color: var(--text); }
.tb-msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .55rem; }
.tb-msg { display: flex; }
.tb-bot { justify-content: flex-start; }
.tb-user { justify-content: flex-end; }
.tb-bubble {
  max-width: 84%; padding: .6rem .85rem; border-radius: 14px;
  font-size: .9rem; line-height: 1.5; word-break: break-word;
  animation: tb-in .25s ease;
}
.tb-bot .tb-bubble { background: var(--steel-800); border: 1px solid var(--line); color: var(--text); border-bottom-left-radius: 4px; }
.tb-user .tb-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
@keyframes tb-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tb-typing { display: flex; gap: 5px; align-items: center; padding: .8rem 1rem; }
.tb-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: tb-dot 1.2s infinite; }
.tb-typing i:nth-child(2) { animation-delay: .18s; }
.tb-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes tb-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.tb-cards { display: grid; gap: .5rem; padding-left: .2rem; }
.tb-card {
  display: grid; gap: .15rem; background: var(--steel-800); border: 1px solid var(--line);
  border-radius: 12px; padding: .65rem .85rem; max-width: 88%;
  transition: border-color .2s, transform .2s;
}
.tb-card:hover { border-color: var(--accent); transform: translateX(3px); }
.tb-card-grade { font-family: var(--font-d); font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.tb-card strong { font-family: var(--font-d); font-size: .92rem; }
.tb-card-desc { font-size: .78rem; color: var(--muted); }
.tb-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .3rem 1rem .6rem; }
.tb-chip {
  background: var(--steel-800); border: 1px solid var(--line); color: var(--chrome-b);
  font-size: .78rem; font-weight: 600; border-radius: 999px; padding: .35rem .8rem;
  cursor: pointer; transition: all .18s; font-family: var(--font-b);
}
.tb-chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.tb-input { display: flex; gap: .5rem; padding: .7rem .8rem; border-top: 1px solid var(--line); }
.tb-input input {
  flex: 1; background: var(--steel-800); border: 1px solid var(--line);
  border-radius: 999px; color: var(--text); font: inherit; font-size: .9rem;
  padding: .6rem 1rem;
}
.tb-input input:focus { border-color: var(--accent); outline: none; }
.tb-input button {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  transition: transform .18s, filter .18s; flex: none;
}
.tb-input button:hover { transform: scale(1.08); filter: brightness(1.1); }
@media (max-width: 720px) {
  .tb-root { left: 14px; bottom: 16px; }
  .tb-panel { bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .tb-panel { transition: none; }
}

/* ============ Cookie Consent Banner ============ */
.tublo-cookie-banner {
  position: fixed; bottom: 20px; right: 20px; left: 20px; max-width: 500px;
  background: var(--steel-800); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.4rem; box-shadow: 0 16px 48px rgba(0,0,0,.12);
  z-index: 999; animation: cookie-slide-in .4s ease;
}
@keyframes cookie-slide-in {
  from { transform: translateY(400px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-content { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-text { flex: 1; min-width: 200px; }
.cookie-title { font-family: var(--font-d); font-size: .95rem; font-weight: 600; margin-bottom: .4rem; }
.cookie-desc { font-size: .85rem; color: var(--muted); line-height: 1.5; margin: 0; }
.cookie-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.cookie-btn {
  font-family: var(--font-d); font-weight: 600; font-size: .88rem;
  padding: .55rem 1.1rem; border-radius: 999px; border: none; cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.cookie-accept {
  background: var(--accent); color: #fff;
}
.cookie-accept:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,107,44,.3); }
.cookie-decline {
  background: transparent; color: var(--text); border: 1px solid var(--line);
}
.cookie-decline:hover { border-color: var(--accent); background: var(--accent-soft); }
.cookie-link { color: var(--accent); font-weight: 600; font-size: .85rem; cursor: pointer; }
.cookie-link:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .tublo-cookie-banner { left: 12px; right: 12px; bottom: 16px; max-width: calc(100vw - 24px); }
  .cookie-content { flex-direction: column; align-items: flex-start; }
  .cookie-actions { width: 100%; justify-content: flex-start; }
  .cookie-btn { flex: 1; min-width: 100px; }
}
