:root {
  color-scheme: light;
  --ink: #182c26;
  --muted: #4c625a;
  --paper: #f6f7f3;
  --white: #fff;
  --line: #dce5de;
  --green: #123b35;
  --green-light: #dcece3;
  --accent: #d8ecab;
  --shadow: 0 14px 36px rgb(21 54 43 / 8%);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid #3a8060;
  outline-offset: 4px;
}

.symbol-sheet { position: absolute; width: 0; height: 0; pointer-events: none; }
.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; top: 8px; left: 8px; z-index: 2; border-radius: 6px; background: var(--white); padding: 8px 12px; }
.page-width { width: min(1240px, calc(100% - 80px)); margin-inline: auto; }

.header { background: var(--green); color: var(--white); }
.navigation { min-height: 69px; display: flex; align-items: center; gap: 49px; }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--white); text-decoration: none; font-size: 21px; font-weight: 750; letter-spacing: -.04em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--green); }
.brand-secondary { font-weight: 500; }
.nav-links { display: flex; gap: 26px; align-self: stretch; align-items: center; }
.nav-links a { display: flex; align-items: center; align-self: stretch; box-shadow: inset 0 -3px transparent; color: #e2efe6; text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav-links a[aria-current], .nav-links a:hover { box-shadow: inset 0 -3px var(--accent); color: var(--white); }
.profile { display: inline-flex; gap: 9px; align-items: center; margin-left: auto; white-space: nowrap; font-size: 13px; font-weight: 650; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #326056; color: #f1f9ed; font-size: 11px; letter-spacing: .06em; }

.content { padding-block: 46px 52px; }
.page-intro { margin-bottom: 32px; }
.eyebrow { color: #4b6656; font-weight: 750; font-size: 11px; letter-spacing: .14em; margin: 0 0 8px; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: "Georgia", serif; font-size: clamp(42px, 5vw, 59px); letter-spacing: -.065em; font-weight: 600; line-height: 1.04; }
.intro-copy { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.columns { display: grid; grid-template-columns: minmax(0, 1.43fr) minmax(370px, 1fr); align-items: start; gap: clamp(22px, 3vw, 40px); }
.section-heading { min-height: 30px; display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.section-heading h2 { font-size: 20px; letter-spacing: -.025em; font-weight: 750; }
.orders-count { color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 17px; }
.filters button { border: 1px solid var(--line); border-radius: 40px; background: var(--white); padding: 7px 13px; color: #3b5449; line-height: 1.25; font-size: 13px; font-weight: 650; }
.filters button[aria-pressed="true"] { border-color: var(--green); background: var(--green); color: var(--white); }
.filters button:not([aria-pressed="true"]):hover { border-color: #83a293; background: #edf4ee; }

.orders-list { display: grid; gap: 12px; }
.order { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.order:target { border-color: #418065; box-shadow: 0 0 0 3px #c8e2cd; }
.order-main { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 14px; }
.product-thumb { position: relative; display: grid; grid-area: auto; place-items: center; width: 84px; height: 80px; overflow: hidden; border-radius: 10px; background: #edf2eb; color: #567163; }
.product-thumb .icon { width: 29px; height: 29px; }
.product-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.order-title { font-size: 16px; font-weight: 750; line-height: 1.3; letter-spacing: -.012em; }
.order-meta { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.order-meta span + span::before { content: "·"; margin-right: 9px; color: #72887a; }
.order-status { display: inline-flex; align-items: center; vertical-align: top; gap: 4px; width: fit-content; margin-bottom: 5px; border-radius: 5px; padding: 2px 6px; font-size: 11px; line-height: 1.5; font-weight: 700; }
.order-status .icon { width: 13px; height: 13px; stroke-width: 2; }
.status-in_transit { background: #e3efde; color: #315c42; }
.status-payment_failed { background: #f9e9dd; color: #84340e; }
.status-delivered { background: #e9eeea; color: #42584d; }
.order-side { display: grid; justify-items: end; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.price { color: var(--ink); font-size: 14px; font-weight: 750; }
.order-side time { font-weight: 650; }
.order-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid #eef2ee; padding: 0 14px; }
.text-button { min-height: 36px; padding: 0; border: 0; background: transparent; display: inline-flex; gap: 4px; align-items: center; text-align: left; color: #365c49; font-size: 12px; font-weight: 650; }
.text-button .icon { width: 15px; height: 15px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-button[aria-expanded="true"] .icon { rotate: 180deg; }
.order-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; border-top: 1px solid #eef2ee; padding: 12px 14px; background: #f9fbf8; }
.order-details[hidden] { display: none; }
.order-details dt { margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.order-details dd { margin: 0; font-size: 13px; font-weight: 650; }
.order-state { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--white); color: var(--muted); font-size: 14px; }

.assistant { position: sticky; top: 24px; min-width: 0; overflow: hidden; border: 1px solid #cfdfd1; border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.assistant-header { display: flex; align-items: center; gap: 12px; padding: 21px; border-bottom: 1px solid #dce7dc; background: #e7f0e5; }
.assistant-mark { display: grid; flex: 0 0 auto; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: var(--green); color: var(--accent); }
.assistant-mark .icon { width: 24px; height: 24px; stroke-width: 1.55; }
.assistant-title h2 { font-size: 19px; font-weight: 760; letter-spacing: -.03em; line-height: 1.2; }
.assistant-title p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.assistant-tag { margin-left: auto; border: 1px solid #bcd3bf; border-radius: 5px; padding: 3px 6px; color: #355645; font-size: 10px; line-height: 1.25; font-weight: 750; letter-spacing: .05em; }
.demo-scenarios { border-bottom: 1px solid #eef2ee; padding: 9px 20px; background: #fcfdfa; color: #416050; font-size: 11px; font-weight: 700; }
.demo-buttons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.demo-buttons button { border: 1px solid #d6e4d8; border-radius: 6px; padding: 4px 7px; background: var(--white); color: #375847; font: inherit; }
.demo-buttons button:hover:not(:disabled) { background: #edf4ec; }
.demo-buttons button:disabled { opacity: .6; cursor: default; }
.chat { min-height: 267px; max-height: min(54vh, 550px); min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px; scrollbar-color: #b4cab9 transparent; scrollbar-width: thin; }
.chat-greeting { max-width: 310px; padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: #f2f5f0; font-size: 14px; line-height: 1.5; color: #405247; }
.chat-greeting .greeting-title { margin-bottom: 2px; color: var(--ink); font-size: 15px; font-weight: 750; }
#messages:not(:empty) { display: grid; align-items: start; gap: 12px; margin-top: 12px; }
.message { width: fit-content; max-width: 96%; border-radius: 4px 14px 14px 14px; padding: 11px 13px; background: #f2f5f0; font-size: 14px; line-height: 1.52; overflow-wrap: anywhere; }
.message p { white-space: pre-wrap; }
.message-user { justify-self: end; border-radius: 14px 4px 14px 14px; background: var(--green); color: var(--white); }
.message-error { background: #faeee7; }
.message-pending { color: var(--muted); }
.sources { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
.sources a { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #d7e4d8; border-radius: 6px; background: var(--white); padding: 4px 6px; text-decoration: none; color: #305845; font-size: 11px; line-height: 1.3; font-weight: 650; }
.sources a:hover { border-color: #82a58d; text-decoration: underline; }
.sources .icon, .trace .icon { width: 13px; height: 13px; }
.trace { margin-top: 8px; color: #416050; font-size: 11px; }
.trace summary { display: list-item; width: fit-content; cursor: pointer; }
.trace summary .icon { vertical-align: -3px; margin-right: 3px; }
.trace ol { display: grid; gap: 5px; margin: 5px 0 0; padding-left: 19px; }
.trace-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; }
.trace-status { color: #466755; }
.trace-time { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trace-detail { margin-top: 2px; color: var(--muted); }
.prompts { display: flex; flex-wrap: wrap; gap: 7px; max-width: 365px; margin-top: 13px; }
.prompts:empty { display: none; }
.prompts button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid #d6e4d8; border-radius: 7px; background: var(--white); color: #375847; text-align: left; font-size: 12px; font-weight: 650; line-height: 1.25; }
.prompts button:hover:not(:disabled) { border-color: #82a58d; background: #edf4ec; }
.prompts button:disabled { opacity: .6; cursor: default; }
.prompts .icon { width: 15px; height: 15px; }
.composer { padding: 12px 18px 11px; border-top: 1px solid #eef2ee; background: #fcfdfa; }
.composer form { display: flex; gap: 6px; align-items: flex-end; padding: 5px; border: 1px solid #cddcd0; border-radius: 12px; background: var(--white); }
.composer form:focus-within { border-color: #64957a; }
.composer textarea { display: block; min-width: 0; min-height: 36px; max-height: 110px; flex: 1; align-self: center; resize: none; border: 0; padding: 8px 6px 8px 8px; background: transparent; color: var(--ink); font-size: 14px; line-height: 20px; }
.composer textarea::placeholder { color: #65786e; }
.composer textarea:focus-visible { outline: none; }
#send { display: grid; flex: 0 0 35px; place-items: center; height: 35px; border: 0; border-radius: 8px; background: var(--green); color: var(--white); }
#send .icon { width: 18px; height: 18px; stroke-width: 2; }
#send:hover:not(:disabled) { background: #285b4a; }
#send:disabled { opacity: .52; cursor: default; }
.chat-caption { display: flex; justify-content: space-between; align-items: center; min-height: 22px; margin-top: 4px; color: var(--muted); font-size: 11px; }
#reset { background: transparent; border: 0; padding: 4px; color: #3f5d4d; font-size: inherit; }
#reset:disabled { opacity: .6; cursor: default; }
#reset:hover:not(:disabled) { text-decoration: underline; }

@media (max-width: 1050px) {
  .page-width { width: calc(100% - 48px); }
  .columns { grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr); gap: 22px; }
  .order-main { grid-template-columns: 68px minmax(0, 1fr) auto; gap: 10px; padding: 11px; }
  .product-thumb { width: 68px; height: 70px; }
}

@media (max-width: 800px) {
  .content { padding-block: 30px 42px; }
  .page-intro { margin-bottom: 24px; }
  .columns { grid-template-columns: minmax(0, 1fr); }
  .assistant { position: static; grid-row: 1; }
  .chat { min-height: 160px; max-height: min(49vh, 480px); }
  .prompts { max-width: none; }
}

@media (max-width: 500px) {
  .page-width { width: calc(100% - 28px); }
  .navigation { gap: 13px; min-height: 58px; }
  .brand { gap: 5px; font-size: 17px; }
  .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
  .brand-mark .icon { width: 16px; height: 16px; }
  .nav-links { gap: 10px; margin-left: auto; }
  .nav-links a { font-size: 12px; }
  .profile { margin-left: 0; }
  .profile-name { display: none; }
  .avatar { width: 25px; height: 25px; font-size: 9px; }
  .assistant-header { padding: 14px; }
  .demo-scenarios { padding-inline: 13px; }
  .chat { padding: 13px; }
  .composer { padding: 10px 12px 6px; }
  .order-main { grid-template-columns: 58px minmax(0, 1fr); }
  .product-thumb { width: 58px; height: 62px; grid-row: span 2; }
  .order-side { display: flex; justify-content: space-between; align-items: center; gap: 5px; white-space: normal; }
  .order-title { font-size: 15px; }
  .order-actions { padding-inline: 11px; }
  .filters button { padding-inline: 9px; font-size: 12px; }
}
