/* ==========================================================================
   New World Solutions — Legacy Corporate Design System
   Traditional enterprise-IT aesthetic (mid-2010s Oracle/IBM): light
   backgrounds, corporate blue + green, strict grid, high info density.
   ========================================================================== */

:root {
  --blue: #1b4e8b;
  --blue-dark: #143b69;
  --blue-deep: #0f2e52;
  --green: #1e7a4b;
  --green-dark: #165d38;
  --blue-tint: #eaf1f8;
  --green-tint: #e9f4ee;
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --text: #1a1d21;
  --muted: #4b5563;
  --faint: #6b7280;
  --border: #d9dee4;
  --border-strong: #c3cbd4;
  --navy: #10243e;
  --navy-light: #1b3556;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16, 36, 62, 0.08);
  --shadow-md: 0 2px 6px rgba(16, 36, 62, 0.10);
  --font: "Roboto", "Noto Sans Thai", Arial, Helvetica, sans-serif;
  --radius: 2px;
  --container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
.titled-link:hover { color: var(--blue); text-decoration: underline; }

img { max-width: 100%; display: block; }

[id] { scroll-margin-top: 96px; }

h1, h2, h3, h4, h5 {
  margin: 0;
  line-height: 1.2;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

button, input, textarea, select { font: inherit; color: inherit; }

/* --- Bilingual toggle -------------------------------------------------- */

.lang-th .en { display: none !important; }
.lang-en .th { display: none !important; }

/* --- Layout utilities -------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section-alt { padding: 72px 0; background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-tight { padding: 40px 0; }

.section-head { margin-bottom: 40px; max-width: 820px; }
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.eyebrow.green { color: var(--green); }

.lead { color: var(--muted); font-size: 17px; margin-top: 14px; }

.section-title { font-size: 32px; }

.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* --- Topbar ------------------------------------------------------------ */

.topbar {
  background: var(--navy);
  color: #c7d3e0;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
}
.topbar a { color: #dbe6f2; }
.topbar a:hover { color: #ffffff; text-decoration: underline; }
.topbar .topbar-contact { display: flex; gap: 22px; align-items: center; }
.topbar .topbar-tag { color: #8fa3bb; }
.topbar svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }

/* --- Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 72px;
}

.brand { display: flex; align-items: center; gap: 12px; line-height: 1.1; }
.brand-logo { height: 48px; width: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.site-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--blue); border-bottom-color: var(--blue); }
.site-nav a.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }

.header-tools { display: flex; align-items: center; gap: 16px; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang-toggle button {
  background: var(--bg);
  border: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: var(--muted);
}
.lang-toggle button.active {
  background: var(--blue);
  color: var(--white);
}

.header-cta { margin-left: 4px; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
}

/* --- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-green { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-tint); }
.btn-outline-green { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline-green:hover { background: var(--green-tint); }
.btn-white { background: var(--white); color: var(--blue-deep); border-color: var(--white); }
.btn-white:hover { background: var(--blue-tint); border-color: var(--blue-tint); }

/* --- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--blue-deep);
}
.hero .lead { font-size: 19px; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-media {
  position: relative;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: var(--bg-alt);
}
.hero-media img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 3; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 8px 14px;
  border-radius: var(--radius);
}
.badge svg { width: 16px; height: 16px; color: var(--green); flex: 0 0 auto; }

/* --- Stats strip ------------------------------------------------------- */

.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--white); }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 24px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat-value { font-size: 34px; font-weight: 700; color: var(--blue); line-height: 1; }
.stat-value.green { color: var(--green); }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* --- Cards (services / features) -------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }


.cards.four { grid-template-columns: repeat(4, 1fr); }

.card {
  border: 1px solid var(--border);
  background: var(--white);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-tint);
  color: var(--blue);
  border-radius: var(--radius);
}
.card-icon.green { background: var(--green-tint); color: var(--green); }
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 19px; }
.card p { color: var(--muted); font-size: 15px; }
.card .card-link { font-weight: 700; font-size: 14px; color: var(--blue); margin-top: auto; }
.card .card-link:hover { text-decoration: underline; }
.card .card-link.green { color: var(--green); }

/* --- Why us ------------------------------------------------------------ */

.why-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-item {
  display: flex;
  gap: 18px;
  padding: 26px 24px;
  border: 1px solid var(--border);
  background: var(--white);
}
.why-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue);
}
.why-icon.green { background: var(--green-tint); color: var(--green); }
.why-icon svg { width: 22px; height: 22px; }
.why-item h3 { font-size: 17px; margin-bottom: 6px; }
.why-item p { font-size: 14.5px; color: var(--muted); }

/* --- Checklist (feature bullets) -------------------------------------- */

.checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.checklist li strong { color: var(--text); }
.checklist svg { width: 18px; height: 18px; color: var(--green); flex: 0 0 auto; margin-top: 3px; }

/* --- Timeline (about) -------------------------------------------------- */

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.timeline-item { border-left: 3px solid var(--blue); padding: 4px 0 4px 18px; }
.timeline-item.green { border-left-color: var(--green); }
.timeline-year { font-size: 13px; font-weight: 700; color: var(--blue); letter-spacing: 0.04em; }
.timeline-item h4 { font-size: 16px; margin: 6px 0; }
.timeline-item p { font-size: 14px; color: var(--muted); }

/* --- Two-column feature (solutions) ------------------------------------ */

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature.reverse .feature-media { order: 2; }
.feature-media { border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.feature-media img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 16 / 10; }
.feature h2 { font-size: 26px; margin-bottom: 14px; }
.feature .feature-tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--green); margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: 16px; margin-bottom: 18px; }
/* --- Specialized team roles list (MSP) --- */
#msp .section-head { max-width: 1100px; margin: 0 auto 34px; }
#msp .section-title { font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 14px; }
#msp .lead { font-size: 16px; line-height: 1.6; margin-top: 0; }
#msp .eyebrow { letter-spacing: 0.12em; margin-bottom: 10px; }
.roles-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 56px; max-width: 1100px; margin: 0 auto; }
.role-row { display: flex; align-items: center; gap: 20px; padding: 0; }
.role-body { flex: 1; min-width: 0; }
.role-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--text); }
.role-title svg { width: 18px; height: 18px; color: var(--green); flex: 0 0 auto; }
.role-desc { font-size: 15px; color: var(--muted); margin-top: 3px; padding-left: 28px; }
.role-icon { width: 92px; height: 92px; object-fit: contain; border-radius: 8px; flex: 0 0 auto; }
@media (max-width: 640px) {
  .role-icon { width: 64px; height: 64px; }
  .role-desc { padding-left: 0; }
  .role-row { gap: 16px; }
}


/* --- Footer ------------------------------------------------------------ */

.site-footer { background: var(--navy); color: #c7d3e0; }
.site-footer a { color: #c7d3e0; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.footer-brand-name { font-size: 17px; font-weight: 700; color: #ffffff; letter-spacing: 0.02em; }
.footer-brand-sub { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #7fd1a4; }
.footer-grid h4 { color: #ffffff; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-grid ul { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-about { font-size: 14px; line-height: 1.7; color: #a9bbcd; margin-top: 16px; }
.footer-contact { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 16px; height: 16px; color: #7fd1a4; flex: 0 0 auto; margin-top: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: #8fa3bb;
  flex-wrap: wrap;
}
.footer-bottom nav { display: flex; gap: 20px; }

/* --- Page hero (subpages) ---------------------------------------------- */

.page-hero { background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); }
.page-hero .container { padding-top: 64px; padding-bottom: 64px; }
.page-hero h1 { font-size: 40px; color: var(--blue-deep); margin-bottom: 16px; max-width: 820px; }
.page-hero .lead { font-size: 18px; max-width: 760px; margin-top: 0; }
.breadcrumb { font-size: 13px; color: var(--faint); margin-bottom: 16px; }
.breadcrumb a { color: var(--blue); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; color: var(--border-strong); }

/* --- Forms ------------------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field label .req { color: var(--blue); }
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 15px;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 78, 139, 0.12);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 13px; color: var(--faint); }

/* --- Split contact layout ---------------------------------------------- */

.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.contact-card {
  border: 1px solid var(--border);
  background: var(--white);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}
.contact-block { padding: 22px 0; border-bottom: 1px solid var(--border); }
.contact-block:last-child { border-bottom: 0; }
.contact-block h3 { font-size: 16px; margin-bottom: 8px; }
.contact-block p, .contact-block a { font-size: 15px; color: var(--muted); }
.contact-block a:hover { color: var(--blue); text-decoration: underline; }
.contact-block .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green); font-weight: 700; margin-bottom: 4px; }

/* --- CTA band ---------------------------------------------------------- */

.cta-band { background: var(--blue-deep); color: #ffffff; }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 48px; padding-bottom: 48px; flex-wrap: wrap; }
.cta-band h2 { color: #ffffff; font-size: 28px; margin-bottom: 8px; }
.cta-band p { color: #b8c8dc; font-size: 16px; }
.cta-band .cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards.four { grid-template-columns: repeat(2, 1fr); }
  .why-list { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature.reverse .feature-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .site-nav a:last-child { border-bottom: 0; }
  .menu-toggle { display: block; }
  .header-cta { display: none; }
}

@media (max-width: 640px) {
  .section, .section-alt { padding: 48px 0; }
  .section-title { font-size: 26px; }
  .hero h1 { font-size: 30px; }
  .page-hero h1 { font-size: 30px; }
  .cards, .cards.two, .cards.four { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .topbar .topbar-tag { display: none; }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

@media (max-width: 1024px) {
  .roles-list { grid-template-columns: 1fr; gap: 18px; max-width: 640px; }
  #msp .section-head { max-width: 640px; }
}


/* --- EMMY AI assistant widget ------------------------------------------ */
.emmy { position: fixed; right: 20px; bottom: 20px; z-index: 1000; font-family: var(--font); }
.emmy [hidden] { display: none !important; }
.emmy-fab { display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; background: var(--navy); color: #fff; font: 600 15px var(--font); padding: 10px 18px 10px 10px; border-radius: 999px; box-shadow: 0 8px 24px rgba(16, 36, 62, 0.28); transition: transform .15s; }
.emmy-fab:hover { transform: translateY(-2px); }
.emmy-live { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.emmy-orb { width: 30px; height: 30px; border-radius: 50%; flex: none; background: conic-gradient(from 200deg, #1b4e8b, #06b6d4, #6366f1, #1b4e8b); position: relative; }
.emmy-orb::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; opacity: .9; }
.emmy-orb.lg { width: 38px; height: 38px; }
.emmy-orb.lg::after { inset: 12px; }
.emmy-panel { width: 370px; height: min(560px, calc(100vh - 40px)); background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 16px 48px rgba(16, 36, 62, 0.22); display: flex; flex-direction: column; overflow: hidden; }
.emmy-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--navy); color: #fff; }
.emmy-head b { display: block; font-size: 16px; }
.emmy-head small { font-size: 12.5px; opacity: .8; }
.emmy-close { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.emmy-close:hover { background: rgba(255,255,255,.12); }
.emmy-close svg, .emmy-send svg { width: 18px; height: 18px; }
.emmy-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-alt); }
.emmy-msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.emmy-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text); }
.emmy-msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.emmy-msg.err { border-color: #f3c2c2; background: #fff6f6; }
.emmy-msg.typing { display: flex; gap: 4px; padding: 13px 14px; }
.emmy-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: emmy-dot 1s infinite ease-in-out; }
.emmy-msg.typing i:nth-child(2) { animation-delay: .15s; }
.emmy-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes emmy-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.emmy-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; background: #fff; }
.emmy-chips button { border: 1px solid var(--border-strong); background: #fff; color: var(--blue); font: 500 13px var(--font); padding: 6px 11px; border-radius: 999px; cursor: pointer; }
.emmy-chips button:hover { background: var(--blue-tint); }
.emmy-form { display: flex; gap: 8px; padding: 12px; background: #fff; }
.emmy-input { flex: 1; min-width: 0; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; font: 15px var(--font); color: var(--text); }
.emmy-input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.emmy-send { width: 42px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; display: grid; place-items: center; }
.emmy-send:hover { background: var(--blue-dark); }
.emmy-note { margin: 0; padding: 0 12px 10px; background: #fff; font-size: 11.5px; color: var(--faint); text-align: center; }
@media (max-width: 480px) {
  .emmy { right: 12px; bottom: 12px; left: 12px; display: flex; justify-content: flex-end; }
  .emmy-panel { width: 100%; height: calc(100vh - 24px); }
}
@media (prefers-reduced-motion: reduce) { .emmy-msg.typing i { animation: none; } }
.emmy-link { display: block; margin-top: 8px; font-weight: 600; color: var(--blue); text-decoration: none; }
.emmy-link::after { content: " →"; }
.emmy-link:hover { text-decoration: underline; }
.emmy-cta { display: block; margin-top: 10px; border: 0; border-radius: 8px; background: var(--blue); color: #fff; font: 600 13.5px var(--font); padding: 8px 12px; cursor: pointer; }
.emmy-cta:disabled { opacity: .5; cursor: default; }
.emmy-chips { max-height: 92px; overflow-y: auto; }
.emmy-chips button.contact { background: var(--blue); border-color: var(--blue); color: #fff; }
.emmy-lead { align-self: stretch; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.emmy-lead b { font-size: 14.5px; color: var(--text); }
.emmy-lead input, .emmy-lead textarea { border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; font: 14px var(--font); color: var(--text); resize: vertical; }
.emmy-lead input:focus, .emmy-lead textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.emmy-lead.done { opacity: .6; }
.emmy-err { margin: 0; font-size: 12.5px; color: #b91c1c; }
.emmy-lead-actions { display: flex; gap: 8px; justify-content: flex-end; }
.emmy-lead-actions button { border: 1px solid var(--blue); background: var(--blue); color: #fff; font: 600 13.5px var(--font); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.emmy-lead-actions button.ghost { background: #fff; color: var(--blue); border-color: var(--border-strong); }
.emmy-chips.compact button:not(.contact) { display: none; }
