:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #5b6862;
  --line: #d7ded8;
  --soft: #f4f7f3;
  --paper: #ffffff;
  --forest: #1f5d4c;
  --forest-dark: #153d33;
  --copper: #a75f3f;
  --blue: #2f6f9f;
  --danger: #9b2f34;
  --hold: #8a5a12;
  --shadow: 0 18px 50px rgba(24, 35, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgba(215, 222, 216, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 4px;
  background: var(--forest);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

nav a:hover,
nav a:focus-visible {
  color: var(--forest-dark);
}

.hero {
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding: clamp(72px, 10vh, 120px) clamp(20px, 5vw, 72px) clamp(40px, 8vh, 80px);
  background:
    linear-gradient(90deg, rgba(17, 29, 26, 0.76), rgba(17, 29, 26, 0.34) 48%, rgba(17, 29, 26, 0.05)),
    url("https://images.unsplash.com/photo-1564013799919-ab600027ffc6?auto=format&fit=crop&w=2200&q=82") center / cover;
  color: #fff;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f0c6ad;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 760px;
  font-size: clamp(2.4rem, 4rem, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 640px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
}

.hero-actions,
.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-action,
.secondary-action,
button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.primary-action,
.send-button {
  background: var(--forest);
  color: #fff;
}

.primary-action:hover,
.send-button:hover,
.primary-action:focus-visible,
.send-button:focus-visible {
  background: var(--forest-dark);
}

.secondary-action,
.chat-actions button:not(.send-button) {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.chat-actions button:not(.send-button) {
  border-color: var(--line);
  background: var(--soft);
  color: var(--ink);
}

.listing-band,
.workspace {
  padding: clamp(44px, 7vw, 80px) clamp(20px, 5vw, 72px);
}

.listing-band {
  background: #fbfcfa;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 24px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.listing-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 8px 28px rgba(24, 35, 31, 0.08);
}

.listing-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.listing-body {
  padding: 18px;
}

.listing-body h3 {
  margin-bottom: 6px;
}

.listing-meta,
.listing-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.listing-price {
  margin: 14px 0 0;
  color: var(--forest-dark);
  font-size: 1.2rem;
  font-weight: 800;
}

.workspace {
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f8f5 100%);
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.chat-panel,
.protection-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.chat-panel {
  min-height: 620px;
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
  max-height: 540px;
  overflow: auto;
  padding: 22px;
}

.message {
  max-width: min(82%, 680px);
  padding: 13px 15px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.message.assistant {
  align-self: flex-start;
}

.message.user {
  align-self: flex-end;
  border-color: rgba(31, 93, 76, 0.26);
  background: #e8f2ed;
}

.message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

.chat-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
}

textarea {
  width: 100%;
  min-height: 94px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--ink);
}

textarea:focus {
  border-color: var(--forest);
  outline: 3px solid rgba(31, 93, 76, 0.16);
}

.protection-panel {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.panel-heading {
  margin-bottom: 14px;
}

.guard-state {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: var(--soft);
  color: var(--forest-dark);
  font-weight: 800;
}

.guard-state.blocked {
  border-color: rgba(155, 47, 52, 0.34);
  background: #fff0f0;
  color: var(--danger);
}

.guard-state.hold {
  border-color: rgba(138, 90, 18, 0.34);
  background: #fff7e6;
  color: var(--hold);
}

.guard-state.remediation {
  border-color: rgba(47, 111, 159, 0.34);
  background: #eef6fb;
  color: var(--blue);
}

.event-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-list li {
  border-left: 4px solid var(--forest);
  padding: 3px 0 3px 12px;
}

.event-list li.blocked {
  border-left-color: var(--danger);
}

.event-list li.hold {
  border-left-color: var(--hold);
}

.event-list li.remediation {
  border-left-color: var(--blue);
}

.event-list strong,
.event-list span {
  display: block;
}

.event-list span {
  color: var(--muted);
  font-size: 0.9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: 68vh;
  }

  .listing-grid,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .protection-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
  }

  nav {
    gap: 12px;
    font-size: 0.84rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  .hero-actions a,
  .chat-actions button {
    width: 100%;
    text-align: center;
  }

  .message {
    max-width: 100%;
  }
}
