/* AI Trade Remedy Platform — light blue, navy and gold */
:root {
  --ink: #0B1F3F; --navy: #0A2A6B; --navy-2: #12409A; --blue: #1A4FBF; --blue-2: #6A8CFF; --sky: #EAF2FF; --tint: #EEF4FF;
  --gold: #E3A52A; --gold-2: #F6CF6A; --gold-ink: #6E4500; --muted: #46566E; --text-2: #22345A;
  --line: #DCE6F5; --line-strong: #C9D7EE; --ground: #F3F7FE; --focus: #F2B33D;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 10px 30px rgba(10,42,107,.09); --shadow-lg: 0 22px 54px rgba(10,42,107,.16);
  --gold-grad: linear-gradient(180deg, #FFDE85 0%, #F2BF4B 55%, #E2A12A 100%);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, sans-serif; font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--ground); overflow-x: hidden; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--blue); }
img, svg { max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: #fff; color: var(--navy); padding: 10px 16px; border-radius: 8px; font-weight: 600; z-index: 100; }
.skip:focus { top: 8px; }
.nw { white-space: nowrap; }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); transition: box-shadow .3s ease; }
.hdr.scrolled { box-shadow: 0 8px 26px rgba(10,42,107,.10); }
.hdr-in { max-width: 1340px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand .logo { width: 58px; height: auto; display: block; }
.brand .dvd { width: 1px; height: 40px; background: var(--line-strong); }
.brand .pmark { flex: none; }
.ptext { display: flex; flex-direction: column; line-height: 1.25; }
.ptext b { font-size: 19px; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.ptext small { font-size: 12.5px; color: var(--text-2); }

.nav { margin-left: auto; }
.menu { display: flex; align-items: center; gap: 4px; }
.menu > li { position: relative; }
.mi { display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ink); font-size: 15.5px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .2s ease, color .2s ease; }
.mi:hover { background: var(--tint); color: var(--navy); }
.mi.active { background: var(--gold-grad); color: var(--ink); font-weight: 700; padding: 0 20px; box-shadow: 0 6px 16px rgba(227,165,42,.35), inset 0 1px 0 rgba(255,255,255,.6); }
.mi svg { transition: transform .25s ease; }
.mi[aria-expanded="true"] svg { transform: rotate(180deg); }
.sub { position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; padding: 8px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s ease, transform .25s var(--ease), visibility 0s linear .25s; }
.has-sub.open .sub { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .25s var(--ease), visibility 0s; }
.sub a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15px; }
.sub a:hover { background: var(--tint); color: var(--navy); }
.nav-login { display: none; }

.tools { display: flex; align-items: center; gap: 6px; flex: none; }
.ic-btn { position: relative; width: 42px; height: 42px; border: 0; border-radius: 50%; background: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; transition: background-color .2s ease; }
.ic-btn:hover { background: var(--tint); }
.ic-btn .dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #D92D20; border: 2px solid #fff; }
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--ink); font-weight: 600; cursor: pointer; }
.lang-btn:hover { background: var(--tint); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: none; }
.lang-menu.open { display: block; }
.lang-menu a, .lang-menu span { display: block; padding: 9px 12px; border-radius: 10px; font-size: 15px; color: var(--ink); text-decoration: none; }
.lang-menu a { background: var(--tint); font-weight: 600; }
.lang-menu span { color: var(--muted); }
.login { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; margin-left: 6px; border-radius: 999px; background: linear-gradient(180deg, #14408F, var(--navy)); color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 8px 18px rgba(10,42,107,.28); transition: transform .2s ease, box-shadow .2s ease; }
.login:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 24px rgba(10,42,107,.34); }
.burger { display: none; }
.burger .c { display: none; }
.burger[aria-expanded="true"] .o { display: none; }
.burger[aria-expanded="true"] .c { display: block; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 44px 0 120px; background:
  radial-gradient(60% 70% at 85% 30%, rgba(124,180,255,.45), transparent 70%),
  radial-gradient(40% 50% at 10% 10%, rgba(255,255,255,.95), transparent 70%),
  linear-gradient(180deg, #F7FAFF 0%, #E6F0FF 55%, #CFE1FB 100%); }
.hero-glow { position: absolute; inset: auto -10% -30% 30%; height: 60%; background: radial-gradient(closest-side, rgba(246,207,106,.28), transparent); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px 7px 12px; border-radius: 999px; background: linear-gradient(180deg, #14408F, var(--navy)); color: #fff; font-size: 14.5px; font-weight: 500; box-shadow: 0 8px 20px rgba(10,42,107,.22); }
.pill svg { color: var(--gold-2); }
.hero h1 { margin-top: 22px; padding-left: 20px; border-left: 5px solid; border-image: linear-gradient(180deg, #F6CF6A, #C98A16) 1; font-size: clamp(28px, 2.95vw, 38px); line-height: 1.3; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.hero h1 .l1 { display: block; }
.ai-word { position: relative; display: inline-block; padding-right: .5em; font-style: italic; font-size: 1.3em; line-height: 1; background: linear-gradient(180deg, #E9AE36 0%, #B9770E 70%, #9A6100 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-word .swoosh { position: absolute; left: -.1em; bottom: -.18em; width: 1.9em; height: .62em; }
.lead { margin-top: 18px; max-width: 600px; font-size: clamp(16px, 1.45vw, 18.5px); line-height: 1.7; color: var(--text-2); }
.ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 26px; border-radius: 999px; font-size: 16.5px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s ease, background-color .2s ease; }
.btn-gold { background: var(--gold-grad); color: var(--ink); border: 0; box-shadow: 0 12px 26px rgba(227,165,42,.42), inset 0 1px 0 rgba(255,255,255,.7); }
.btn-gold:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 16px 32px rgba(227,165,42,.5), inset 0 1px 0 rgba(255,255,255,.7); }
.btn-gold svg:last-child { transition: transform .25s var(--ease); }
.btn-gold:hover svg:last-child { transform: translateX(4px); }
.btn-line { background: rgba(255,255,255,.75); color: var(--navy); border: 2px solid var(--navy); }
.btn-line:hover { background: #fff; transform: translateY(-2px); }
.hero-art { position: relative; margin-right: -40px; }
.scene { display: block; width: 100%; height: auto; overflow: visible; }
.hero-swoosh { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 130px; pointer-events: none; }

/* scene motion */
.float { animation: float 6s ease-in-out infinite; }
.f2 { animation-delay: -1.2s; animation-duration: 6.8s; }
.f3 { animation-delay: -2.4s; animation-duration: 5.6s; }
.f4 { animation-delay: -3.1s; animation-duration: 7.2s; }
.f5 { animation-delay: -.6s; animation-duration: 6.4s; }
.f6 { animation-duration: 5s; }
@keyframes float { 50% { transform: translateY(-9px); } }
.chip-glow { animation: glow 3.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.ship { animation: sail 16s ease-in-out infinite alternate; }
@keyframes sail { from { transform: translateX(-26px); } to { transform: translateX(14px); } }
.ping .ring { transform-box: fill-box; transform-origin: center; animation: ping 2.4s ease-out infinite; }
@keyframes ping { from { transform: scale(.5); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.orbit-dash { animation: dash 18s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -280; } }
.tw { transform-box: fill-box; transform-origin: center; animation: twinkle 3s ease-in-out infinite; }
.tw.t2 { animation-delay: -1s; } .tw.t3 { animation-delay: -2s; }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }

/* ---------- search ---------- */
.search-wrap { position: relative; z-index: 3; margin-top: -84px; }
.bigsearch { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 24px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(10,42,107,.16); transition: box-shadow .25s ease, border-color .25s ease; }
.bigsearch:focus-within { border-color: var(--blue); box-shadow: 0 18px 44px rgba(10,42,107,.2), 0 0 0 4px rgba(26,79,191,.14); }
.bigsearch .sic { color: var(--navy); flex: none; }
.bigsearch input { flex: 1; min-width: 0; height: 52px; border: 0; outline: none; background: none; font: inherit; font-size: 17px; color: var(--ink); }
.bigsearch input::placeholder { color: #5E6C84; }
.bigsearch input::-webkit-search-cancel-button { cursor: pointer; }
.sbtn { flex: none; height: 52px; padding: 0 34px; border: 0; border-radius: 999px; font-size: 17px; font-weight: 700; cursor: pointer; transition: transform .2s ease; }
.sbtn:hover { transform: translateY(-1px); }

/* ---------- feature tiles ---------- */
.feat { margin-top: 30px; }
.feat-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.tile { height: 100%; min-height: 126px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px 10px; border-radius: 18px; background: linear-gradient(180deg, #fff, #F6F9FF); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; text-decoration: none; color: var(--ink); font-size: 15.5px; font-weight: 600; line-height: 1.35; transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease; }
.tile svg { color: var(--navy-2); transition: transform .3s var(--ease); }
.tile small { display: block; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #B7CBEE; color: var(--navy); }
.tile:hover svg { transform: scale(1.08); }
.tile.active { background: linear-gradient(160deg, #1A4FBF 0%, #0E2F7A 55%, #0A2363 100%); border: 2px solid var(--gold-2); color: #fff; box-shadow: 0 16px 34px rgba(10,42,107,.35), 0 0 0 4px rgba(246,207,106,.18); }
.tile.active svg { color: #fff; }
.tile.active:hover { color: #fff; }

/* ---------- panels ---------- */
.panels { max-width: 1360px; margin-top: 34px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, .95fr); gap: 20px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.ph { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 10px 16px; background: linear-gradient(100deg, #0A2363 0%, #12409A 70%, #1A4FBF 100%); color: #fff; font-size: 17px; font-weight: 700; line-height: 1.3; }
.ph h2 { display: flex; align-items: center; gap: 10px; font-size: inherit; flex: 1; min-width: 0; }
.ph small { font-size: 13.5px; font-weight: 500; color: #D3DEF3; }
.ph .gold { color: var(--gold-2); flex: none; }
.ph-more { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--gold-2); font-size: 14.5px; font-weight: 600; text-decoration: none; }
.ph-more:hover { color: #fff; }
.ph-more:focus-visible { outline-color: #fff; }
.pb { padding: 14px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 6px 10px; padding: 12px; border-radius: 14px; background: #F6F9FF; border: 1px solid var(--line); }
.stat .sic { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.s1 { background: #E3ECFD; color: #1A4FBF; } .s2 { background: #FFF2D3; color: #8A5A00; } .s3 { background: #E3ECFD; color: #1A4FBF; } .s4 { background: #E9E6FB; color: #4F3FB0; }
.st { display: contents; }
.st .sv { grid-column: 1 / -1; }
.sl { font-size: 13.5px; color: var(--muted); line-height: 1.35; font-weight: 500; }
.sv { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.sv b { font-size: 29px; line-height: 1.15; color: var(--navy); font-variant-numeric: tabular-nums; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.delta span[aria-hidden] { font-size: 10px; }
.up-bad { background: #FDE7E5; color: #A8231A; }
.up-good, .flat { background: #E1F4E8; color: #1D6B40; }
.note { margin-top: 12px; font-size: 13px; color: var(--muted); }
.note.pad { margin: 0; padding: 0 18px 14px; }

.alerts { padding: 8px 10px; }
.alerts li + li { border-top: 1px solid var(--line); }
.al { display: grid; grid-template-columns: 36px 66px minmax(0, 1fr) auto 16px; align-items: center; gap: 10px; padding: 12px 6px; border-radius: 12px; color: var(--ink); text-decoration: none; transition: background-color .2s ease; }
.al:hover { background: var(--tint); }
.al:hover .chev { transform: translateX(3px); }
.cc { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.cc-eu { background: radial-gradient(circle, #1D3E9E 58%, #2B53C2 59%); color: #FFD54A; box-shadow: inset 0 0 0 3px #1D3E9E, inset 0 0 0 4px rgba(255,213,74,.7); }
.cc-us { background: #fff; color: #9E1B2A; box-shadow: inset 0 0 0 3px #9E1B2A, inset 0 0 0 6px #fff, inset 0 0 0 7.5px #0A2A6B; }
.cc-in { background: linear-gradient(180deg, #FFE1BF 0 33%, #fff 33% 66%, #D5F0DA 66%); color: #6B3A00; box-shadow: inset 0 0 0 1.5px #E7A04D; }
.tag { justify-self: start; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; text-align: center; min-width: 50px; white-space: nowrap; }
.t-ad { background: #FDE2E2; color: #9F1D1D; }
.t-301 { background: #FFF0CC; color: #7A4B00; }
.t-cvd { background: #DFE9FD; color: #133E9E; }
.at { font-size: 15px; font-weight: 500; line-height: 1.45; }
.ad { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.chev { color: var(--navy-2); transition: transform .25s var(--ease); }

.svc { padding: 14px; display: grid; gap: 10px; }
.svc a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(90deg, #EEF4FF, #F6F9FF); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 600; line-height: 1.4; transition: transform .25s var(--ease), background-color .2s ease, box-shadow .25s ease; }
.svc a > span:not(.svi) { flex: 1; }
.svc a:hover { transform: translateX(3px); box-shadow: var(--shadow); background: #E6EFFF; }
.svi { flex: none; width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(180deg, #FFF4D8, #FBE3A6); color: #7A4B00; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(227,165,42,.35); }

/* ---------- waves + footer ---------- */
.waves { margin-top: 44px; line-height: 0; }
.waves svg { display: block; width: 100%; height: 120px; }
.wv1 { stroke-dasharray: 1600; animation: wave-draw 2.6s var(--ease) both; }
@keyframes wave-draw { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
.foot { background: var(--navy); color: #D5DEEA; font-size: 15px; }
.fcols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-top: 34px; padding-bottom: 28px; }
.fcol { display: flex; flex-direction: column; gap: 8px; }
.fcol h2 { font-size: 16px; color: #fff; margin-bottom: 4px; }
.fcol a { color: #D5DEEA; text-decoration: none; }
.fcol a:hover { color: var(--gold-2); text-decoration: underline; }
.fcol:focus-within a:focus-visible, .legal a:focus-visible { outline-color: var(--gold-2); }
.fbrand { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.flogo { flex: none; padding: 6px 8px; border-radius: 10px; background: #fff; line-height: 0; }
.fbrand b { display: block; color: #fff; font-size: 17px; }
.fbrand small { color: #C3CEE2; font-size: 13.5px; }
.legal { border-top: 1px solid #22417F; padding-top: 16px; padding-bottom: 28px; font-size: 13.5px; color: #C3CEE2; }

/* ---------- video dialog ---------- */
.vdlg { width: min(720px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 30px 80px rgba(10,42,107,.35); color: var(--ink); }
.vdlg::backdrop { background: rgba(8,24,60,.55); backdrop-filter: blur(3px); }
.vhead { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 22px; background: linear-gradient(100deg, #0A2363, #1A4FBF); color: #fff; }
.vhead h2 { font-size: 18px; }
.vclose { color: #fff; } .vclose:hover { background: rgba(255,255,255,.15); }
.vstage { padding: 20px; display: grid; gap: 18px; }
.vscreen { aspect-ratio: 16 / 8; border-radius: 16px; background: radial-gradient(60% 80% at 70% 30%, #2F6FE0, #0A2363); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.vplay { color: var(--gold-2); animation: glow 2.4s ease-in-out infinite; }
.vsteps { counter-reset: s; display: grid; gap: 10px; }
.vsteps li { counter-increment: s; position: relative; padding: 10px 14px 10px 52px; border-radius: 12px; background: var(--tint); line-height: 1.5; }
.vsteps li::before { content: counter(s); position: absolute; left: 12px; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold-grad); color: var(--ink); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.vsteps b { display: block; color: var(--navy); }

/* ---------- floating AI (น้องปกป้อง) ---------- */
.ai-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 70; display: flex; align-items: center; gap: 14px; }
.ai-bubble { padding: 12px 16px; border-radius: 16px 16px 4px 16px; background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); font-size: 15px; line-height: 1.45; opacity: 0; transform: translateX(14px); pointer-events: none; transition: opacity .5s ease, transform .5s var(--ease); max-width: 240px; }
.ai-bubble.show { opacity: 1; transform: none; pointer-events: auto; }
.ai-bubble b { display: block; }
.ai-bubble span { color: var(--muted); font-size: 14px; }
.ai-fab { position: relative; flex: none; width: 78px; height: 78px; border: 0; border-radius: 50%; padding: 0; cursor: pointer; background: linear-gradient(135deg, var(--blue), var(--ink)); box-shadow: 0 16px 36px rgba(26,79,191,.38); display: flex; align-items: center; justify-content: center; animation: fabbob 3.2s ease-in-out infinite; transition: transform .3s var(--ease); }
.ai-fab:hover { transform: scale(1.06); }
.ai-fab .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue-2); animation: ring 2.4s ease-out infinite; }
.ai-fab .ring.g { border-color: var(--gold-2); animation-delay: 1.2s; }
.ai-fab .halo { position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, var(--gold-2), transparent, var(--blue-2), transparent); animation: spin 9s linear infinite; }
.ai-fab .core { position: absolute; inset: 3px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFFFFF, #EAF1FD 70%); }
.ai-fab svg { position: relative; transition: transform .35s var(--ease), opacity .2s ease; }
.ai-fab .x { position: absolute; opacity: 0; transform: rotate(-90deg); }
.ai-fab .tag { position: absolute; top: -2px; left: -4px; min-width: 0; padding: 0 6px; border-radius: 999px; background: var(--gold-2); color: var(--ink); font-size: 11px; font-weight: 700; line-height: 18px; }
.ai-fab:hover .mascot.s { transform: scale(1.08) rotate(-4deg); }
.ai-fab[aria-expanded="true"] { animation: none; }
.ai-fab[aria-expanded="true"] .ring, .ai-fab[aria-expanded="true"] .tag { display: none; }
.ai-fab[aria-expanded="true"] .mascot.s { opacity: 0; transform: scale(.6); }
.ai-fab[aria-expanded="true"] .x { opacity: 1; transform: none; }
@keyframes ring { from { transform: scale(1); opacity: .55; } to { transform: scale(1.9); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fabbob { 50% { transform: translateY(-6px); } }
.ai-panel { position: fixed; right: 24px; bottom: 118px; z-index: 69; width: min(400px, calc(100vw - 32px)); max-height: min(600px, calc(100vh - 140px)); border-radius: 24px; background: #fff; box-shadow: 0 30px 70px rgba(11,31,63,.25); overflow: hidden; display: flex; flex-direction: column; transform-origin: bottom right; opacity: 0; transform: translateY(20px) scale(.96); pointer-events: none; visibility: hidden; transition: opacity .35s ease, transform .45s var(--ease), visibility 0s linear .45s; }
.ai-panel.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .35s ease, transform .45s var(--ease), visibility 0s; }
.ai-head { padding: 16px 18px; background: linear-gradient(135deg, var(--ink), var(--blue)); color: #fff; display: flex; align-items: center; gap: 12px; }
.ai-head span.t { flex: 1; line-height: 1.35; }
.ai-head small { display: block; font-size: 13px; color: #C3CEE2; }
.ai-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.mascot-ic { background: #fff; overflow: visible; }
.mascot-ic .mascot { width: 36px; height: 36px; }
.ai-close { width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ai-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--ground); }
.hello { display: flex; gap: 12px; align-items: center; }
.hello span { display: flex; flex-direction: column; line-height: 1.4; }
.hello small { font-size: 13px; color: var(--muted); }
.msg { max-width: 88%; padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid var(--line); }
.msg.me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--blue); color: #fff; border: 0; }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-sugg button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; }
.ai-sugg button:hover { border-color: var(--blue); background: var(--tint); }
.ai-form { padding: 12px 14px; border-top: 1px solid var(--line); background: #fff; }
.ai-field { display: flex; gap: 8px; padding: 5px; border-radius: 14px; border: 1.5px solid var(--line-strong); transition: border-color .2s ease; }
.ai-field:focus-within { border-color: var(--blue); }
.ai-field input { flex: 1; min-width: 0; height: 42px; border: 0; padding: 0 10px; font: inherit; outline: none; color: var(--ink); }
.ai-field button { width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ai-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.typing { display: inline-flex; gap: 5px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: dot 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.mascot { display: block; overflow: visible; }
.mascot .eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.mascot .wave { transform-box: view-box; transform-origin: 50px 32px; animation: wave 3.2s ease-in-out infinite; }
@keyframes blink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.1); } }
@keyframes wave { 0%, 55%, 100% { transform: rotate(0); } 65% { transform: rotate(-22deg); } 75% { transform: rotate(10deg); } 85% { transform: rotate(-16deg); } }

/* ---------- scroll reveal (hidden only when JS runs; see main.js safety net) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; } .js .reveal.d2 { transition-delay: .16s; } .js .reveal.d3 { transition-delay: .24s; }
.js .reveal.d4 { transition-delay: .32s; } .js .reveal.d5 { transition-delay: .4s; } .js .reveal.d6 { transition-delay: .48s; }
.static .reveal, .js.static .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1440px) {
  .hdr-in { padding: 10px 18px; gap: 10px; }
  .brand { gap: 10px; }
  .brand .logo { width: 52px; }
  .ptext b { font-size: 18px; }
  .mi { padding: 0 11px; font-size: 15px; }
  .mi.active { padding: 0 18px; }
  .tools { gap: 2px; }
  .ic-btn { width: 40px; height: 40px; }
  .login { padding: 0 16px; margin-left: 4px; }
}
@media (max-width: 1280px) {
  .ptext small { display: none; }
}
@media (max-width: 1100px) {
  .burger { display: inline-flex; }
  .t-lang { display: none; }
  .nav { position: fixed; left: 0; right: 0; top: var(--hdr-h, 72px); bottom: 0; z-index: 49; margin: 0; padding: 16px 20px 32px; background: #fff; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s; }
  .nav.open { transform: none; visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
  .menu { flex-direction: column; align-items: stretch; gap: 4px; }
  .mi { width: 100%; height: 50px; justify-content: space-between; border-radius: 12px; font-size: 16.5px; padding: 0 14px; }
  .mi.active { justify-content: flex-start; padding: 0 14px; }
  .sub { position: static; min-width: 0; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 12px; }
  .has-sub.open .sub { display: block; }
  .nav-login { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; height: 50px; border-radius: 999px; background: var(--navy); color: #fff; text-decoration: none; font-weight: 600; }
  .tools { margin-left: auto; }
  body.nav-open { overflow: hidden; }
  body.nav-open .ai-wrap, body.nav-open .ai-panel { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { margin: 0 auto; max-width: 640px; width: 100%; }
  .feat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .panels #alerts { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .hdr-in { padding: 8px 16px; gap: 10px; min-height: 64px; }
  .brand { gap: 8px; }
  .brand .logo { width: 46px; }
  .brand .dvd { height: 32px; }
  .ptext b { font-size: 15.5px; }
  .t-bell { display: none; }
  .login { width: 42px; height: 42px; padding: 0; margin: 0; justify-content: center; }
  .login span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero { padding: 28px 0 104px; }
  .hero h1 { padding-left: 14px; margin-top: 18px; }
  .hero h1 .l1 { display: inline; }
  .btn { flex: 1 1 100%; }
  .search-wrap { margin-top: -70px; }
  .bigsearch { padding: 6px 6px 6px 16px; gap: 8px; }
  .bigsearch input { height: 46px; font-size: 16px; }
  .sbtn { height: 46px; padding: 0 18px; font-size: 16px; }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .feat-grid li:last-child { grid-column: 1 / -1; }
  .tile { min-height: 110px; font-size: 15px; }
  .panels { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .panels #alerts { grid-row: auto; }
  .ph { font-size: 16.5px; padding: 10px 14px; }
  .al { grid-template-columns: 38px minmax(0, 1fr) 18px; grid-template-areas: "cc tag chev" "cc at chev" "cc ad chev"; row-gap: 4px; }
  .al .cc { grid-area: cc; align-self: start; } .al .tag { grid-area: tag; } .al .at { grid-area: at; } .al .ad { grid-area: ad; } .al .chev { grid-area: chev; }
  .fcols { grid-template-columns: 1fr 1fr; gap: 22px; }
  .fcol.wide { grid-column: 1 / -1; }
  .waves svg { height: 80px; }
  .ai-bubble { display: none; }
  .ai-wrap { right: 16px; bottom: 16px; }
  .ai-fab { width: 66px; height: 66px; }
  .ai-fab .mascot.s { width: 48px; height: 48px; }
  .ai-panel { right: 16px; bottom: 96px; }
}
@media (max-width: 420px) {
  .brand .dvd, .brand .pmark { display: none; }
  .t-search { display: none; }
  .ptext b { font-size: 15px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .st .sv { grid-column: auto; justify-content: flex-end; }
  .sv b { font-size: 26px; }
  .ph h2, h2.ph { font-size: 16px; }
  .ph-more { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .wv1 { stroke-dasharray: none; }
}
