:root {
      --orange: #ff7200;
      --orange-hover: #e86a00;
      --ink: #1a1c1e;
      --ink-soft: #3d4248;
      --muted: #6b7178;
      --line: #e6e4e0;
      --paper: #f6f4f0;
      --white: #ffffff;
      --navy: #14171a;
      --shadow: 0 16px 40px rgba(20, 23, 26, 0.08);
      --radius: 18px;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      font-family: "DM Sans", system-ui, sans-serif;
      color: var(--ink);
      background: var(--paper);
      line-height: 1.55;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }
    a { color: inherit; text-decoration: none; }
    img { max-width: 100%; display: block; }
    .wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

    header {
      position: sticky; top: 0; z-index: 40;
      background: rgba(255,255,255,.96);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--line);
    }
    .nav {
      display: flex; align-items: center; justify-content: space-between;
      min-height: 110px; gap: 24px;
    }
    .logo { height: 94px; width: auto; }
    .nav-links { display: flex; gap: 26px; align-items: center; font-weight: 500; font-size: 15px; color: var(--ink-soft); }
    .nav-links a:hover { color: var(--orange); }
    .nav-cta { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
    .btn {
      display: inline-flex; align-items: center; justify-content: center;
      border-radius: 999px; padding: 11px 18px; font-weight: 600; font-size: 14px;
      border: 1.5px solid transparent; transition: .18s ease; cursor: pointer;
      font-family: inherit;
    }
    .btn-primary { background: var(--orange); color: #fff; }
    .btn-primary:hover { background: var(--orange-hover); }
    .btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
    .phone { font-weight: 600; font-size: 14px; color: var(--ink); }
    .menu-btn { display: none; background: none; border: 0; font-size: 24px; }

    main { flex: 1; padding: 36px 0 56px; }
    .page-head { max-width: 720px; margin-bottom: 28px; }
    .kicker {
      color: var(--orange); font-weight: 700; letter-spacing: .12em;
      text-transform: uppercase; font-size: 12px; margin-bottom: 10px;
    }
    h1 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.03em; line-height: 1.12; margin-bottom: 10px; }
    .page-head p { color: var(--muted); font-size: 17px; }

    .layout { display: grid; grid-template-columns: 1.35fr .75fr; gap: 22px; align-items: start; }

    .chat {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 24px;
      box-shadow: var(--shadow);
      display: flex; flex-direction: column;
      min-height: 640px;
      max-height: calc(100vh - 220px);
    }
    .chat-top {
      padding: 18px 22px;
      border-bottom: 1px solid var(--line);
      display: flex; align-items: center; gap: 12px;
    }
    .avatar {
      width: 42px; height: 42px; border-radius: 12px;
      background: #fff4ea; color: var(--orange);
      display: grid; place-items: center; font-weight: 700; font-size: 13px;
    }
    .chat-top strong { display: block; font-size: 15px; }
    .chat-top span { color: var(--muted); font-size: 13px; }
    .dot { width: 8px; height: 8px; border-radius: 50%; background: #22a45a; display: inline-block; margin-right: 6px; }

    .log {
      flex: 1; overflow-y: auto; padding: 22px;
      display: flex; flex-direction: column; gap: 14px;
    }
    .msg { max-width: 88%; }
    .msg.bot { align-self: flex-start; }
    .msg.user { align-self: flex-end; }
    .bubble {
      padding: 12px 16px; border-radius: 16px; font-size: 15px;
      white-space: pre-wrap;
    }
    .msg.bot .bubble { background: var(--paper); color: var(--ink); border-bottom-left-radius: 6px; }
    .msg.user .bubble { background: var(--navy); color: #fff; border-bottom-right-radius: 6px; }
    .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .chip {
      border: 1px solid var(--line); background: #fff; color: var(--ink);
      border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600;
      cursor: pointer; font-family: inherit;
    }
    .chip:hover { border-color: var(--orange); color: var(--orange); }
    .typing { display: flex; gap: 5px; padding: 14px 16px; }
    .typing i {
      width: 7px; height: 7px; border-radius: 50%; background: #b9b6b0;
      animation: bounce 1s infinite;
    }
    .typing i:nth-child(2) { animation-delay: .15s; }
    .typing i:nth-child(3) { animation-delay: .3s; }
    @keyframes bounce {
      0%, 80%, 100% { transform: translateY(0); opacity: .4; }
      40% { transform: translateY(-4px); opacity: 1; }
    }

    .composer {
      border-top: 1px solid var(--line);
      padding: 14px 16px 16px;
      display: flex; gap: 10px;
    }
    .composer input {
      flex: 1; border: 1.5px solid var(--line); border-radius: 999px;
      padding: 12px 16px; font: inherit; font-size: 15px; outline: none;
    }
    .composer input:focus { border-color: var(--orange); }
    .composer button { padding: 12px 20px; }

    .file {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 24px;
      box-shadow: var(--shadow);
      padding: 22px;
      position: sticky; top: 130px;
    }
    .file-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
    .file h2 { font-size: 18px; margin: 0; }
    .btn-reset {
      flex-shrink: 0; background: #fff; color: var(--ink-soft);
      border: 1.5px solid var(--line); border-radius: 999px;
      padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600;
      cursor: pointer;
    }
    .btn-reset:hover { border-color: var(--ink); color: var(--ink); }
    .file .sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
    .row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
    .row span { color: var(--muted); }
    .row b { text-align: right; font-weight: 600; }
    .row b.empty { color: #c4c1bb; font-weight: 500; }
    .status {
      margin-top: 18px; padding: 12px 14px; border-radius: 14px;
      background: #fff4ea; color: #9a4a00; font-size: 13px; font-weight: 600;
    }
    .status.ready { background: #eaf7ee; color: #1b6b38; }
    .status.search { background: #eef3f8; color: #1f3a5f; }

    footer { background: var(--navy); color: #c9c6c0; padding: 48px 0 28px; }
    .foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
    footer a:hover { color: #fff; }
    .legal { border-top: 1px solid #2c3138; padding-top: 16px; font-size: 12px; color: #8c8882; }
    .foot-logo { height: 72px; width: auto; margin-bottom: 14px; }

    @media (max-width: 1100px) {
      .logo { height: 78px; }
      .nav { min-height: 96px; }
    }
    @media (max-width: 960px) {
      .layout { grid-template-columns: 1fr; }
      .file { position: static; }
      .chat { max-height: none; min-height: 560px; }
    }
    @media (max-width: 860px) {
      .nav-links, .phone, .nav-cta .btn { display: none; }
      .menu-btn { display: block; }
      .logo { height: 64px; }
      .nav { min-height: 84px; }
      .foot { grid-template-columns: 1fr; }
    }
