* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f5f3ed;
  color: #21332e;
  font-family: Verdana, sans-serif;
  font-size: 14px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b86e39;
  outline-offset: 3px;
}
header {
  padding: 25px 4vw;
  border-bottom: 1px solid #d9ddd4;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.brand {
  font:
    25px Georgia,
    serif;
  font-weight: bold;
}
.tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #52655c;
}
.badge {
  background: #e4ecdf;
  border-radius: 30px;
  padding: 9px 14px;
  font-size: 11px;
}
.hero {
  padding: 50px 4vw 30px;
  max-width: 1500px;
  margin: auto;
}
.hero h1 {
  font:
    clamp(34px, 4vw, 58px)/1.1 Georgia,
    serif;
  letter-spacing: -0.035em;
  margin: 12px 0 18px;
  max-width: 820px;
}
.hero p {
  color: #58665f;
  line-height: 1.8;
  max-width: 740px;
}
.workspace {
  max-width: 1500px;
  margin: 10px auto 50px;
  padding: 0 4vw;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 270px;
  gap: 18px;
}
.panel {
  background: #fffefa;
  border: 1px solid #dce0d7;
  border-radius: 15px;
  padding: 22px;
  min-width: 0;
}
.panel h2 {
  font:
    22px Georgia,
    serif;
  margin: 0 0 18px;
}
.panel h3 {
  font-size: 13px;
}
.muted {
  color: #63736a;
  font-size: 12px;
  line-height: 1.7;
}
.primary,
.secondary,
.chip {
  border: 1px solid #ced7ca;
  border-radius: 8px;
  padding: 11px 15px;
  background: #f6f7f0;
  color: #21332e;
}
.primary {
  background: #254c3c;
  color: #fff;
  border-color: #254c3c;
}
.secondary {
  background: transparent;
}
.full {
  width: 100%;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.doc {
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px;
  margin-bottom: 10px;
  background: #f2f4ec;
  border: 1px solid #dce0d7;
  border-radius: 8px;
}
.doc.active {
  border-color: #456e53;
  background: #eaf0e3;
}
.doc small {
  display: block;
  margin-top: 7px;
  color: #657363;
}
textarea,
input,
select {
  width: 100%;
  border: 1px solid #cbd5c7;
  border-radius: 8px;
  padding: 12px;
  background: #fffefa;
  color: #21332e;
}
textarea {
  resize: vertical;
  min-height: 75px;
  line-height: 1.6;
}
label {
  display: block;
  font-size: 12px;
  line-height: 1.7;
}
#messages {
  height: 330px;
  overflow: auto;
  padding-right: 8px;
  scroll-behavior: smooth;
}
.message {
  padding: 15px 17px;
  background: #f0f3ea;
  border-radius: 12px;
  margin: 0 0 13px;
  white-space: pre-wrap;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.message.user {
  background: #254c3c;
  color: white;
  margin-left: 15%;
}
.message strong {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.source {
  border-left: 3px solid #b8844e;
  padding: 5px 0 5px 12px;
  margin: 15px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    14px/1.8 Georgia,
    serif;
}
.status {
  min-height: 23px;
  font-size: 12px;
  line-height: 1.8;
  color: #465d4b;
}
.error {
  color: #9c312a;
}
.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  border-top: 1px solid #e5e8de;
  padding-top: 15px;
  margin-top: 15px;
}
.suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.chip {
  font-size: 11px;
  padding: 8px 10px;
}
.foot {
  max-width: 1500px;
  padding: 0 4vw 35px;
  margin: auto;
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #63736a;
}
dialog {
  border: 1px solid #cbd5c7;
  border-radius: 15px;
  padding: 28px;
  width: min(520px, 94vw);
  background: #fffefa;
}
dialog::backdrop {
  background: #17261e88;
}
dialog h2 {
  font:
    28px Georgia,
    serif;
}
.two-col {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.kicker {
  color: #a66030;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.result {
  padding: 20px;
  background: #f1f4eb;
  border-radius: 10px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.tone.active,
.style.active {
  background: #254c3c;
  color: white;
}
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.gallery img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
}
.gallery figure {
  margin: 0;
}
.gallery figcaption {
  margin-top: 10px;
  font-size: 11px;
  color: #52655c;
}
.compare {
  position: relative;
}
.compare img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 12px;
}
#after-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
}
.pipeline {
  margin: 18px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pipeline span {
  border: 1px solid #d5ddd0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 10px;
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .workspace > .evidence {
    grid-column: 1/-1;
  }
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 680px) {
  header {
    padding: 18px 5vw;
    gap: 10px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 21px;
  }
  .hero {
    padding: 32px 5vw 15px;
  }
  .workspace,
  .two-col {
    display: flex;
    flex-direction: column;
    padding: 0 5vw;
  }
  .hero h1 {
    font-size: 38px;
  }
  .panel {
    padding: 19px;
  }
  #messages {
    height: 300px;
  }
  .composer {
    grid-template-columns: 1fr;
  }
  .gallery img {
    height: 220px;
  }
  .foot {
    padding: 0 5vw 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
