:root {
  color-scheme: light;
  --ink: #071b2b;
  --muted: #607080;
  --line: #dfe7ec;
  --paper: #f4f7f8;
  --white: #ffffff;
  --accent: #0b8f76;
  --accent-soft: #e6f6f1;
  --danger: #a34332;
  --danger-soft: #fff1ed;
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 5%, rgba(11, 143, 118, 0.1), transparent 30rem),
    linear-gradient(180deg, #edf3f4 0%, #f8fafb 45%, #ffffff 100%);
}

.quote-shell {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 48px;
}

.quote-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.quote-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: white;
  background: var(--ink);
  font-size: 13px;
}

.quote-intro {
  max-width: 690px;
  margin: 76px 0 36px;
}

.quote-eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.quote-intro h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.quote-intro > p:last-child {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.quote-composer {
  padding: 20px;
  border: 1px solid rgba(7, 27, 43, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 55px rgba(7, 27, 43, 0.08);
  backdrop-filter: blur(18px);
}

.quote-composer > label {
  display: block;
  margin: 2px 2px 10px;
  color: #324653;
  font-size: 13px;
  font-weight: 750;
}

.quote-example {
  margin: 0 2px 12px;
  color: #657783;
  font-size: 12px;
  line-height: 1.7;
}

.quote-composer textarea {
  width: 100%;
  min-height: 174px;
  padding: 18px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  resize: vertical;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
  font-size: 15px;
  line-height: 1.75;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.quote-composer textarea:focus {
  border-color: rgba(11, 143, 118, 0.6);
  box-shadow: 0 0 0 4px rgba(11, 143, 118, 0.09);
}

.quote-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
}

.quote-actions > span {
  color: var(--muted);
  font-size: 12px;
}

.quote-actions button,
.quote-again {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  color: white;
  background: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.quote-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.quote-result {
  margin-top: 30px;
}

.quote-result-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px 18px;
  border-bottom: 1px solid var(--line);
}

.quote-result-head span {
  font-size: 12px;
  font-weight: 800;
}

.quote-result-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.quote-result-head.ready span { color: var(--accent); }
.quote-result-head.rejected span { color: var(--danger); }

.quote-compare {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin: 20px 0;
  padding: 15px 18px;
  border-radius: 15px;
  color: #15584b;
  background: var(--accent-soft);
}

.quote-compare strong { font-size: 16px; }
.quote-assumptions, .quote-warning {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.quote-assumptions span {
  padding: 7px 10px;
  border-radius: 8px;
  color: #5d5031;
  background: #fff7df;
  font-size: 12px;
}
.quote-warning {
  padding: 12px 14px;
  border-radius: 10px;
  color: #793e2e;
  background: #fff1ec;
  font-size: 12px;
}

.quote-cards {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.quote-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
}

.quote-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.quote-card-top span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.quote-card-top h3 {
  margin: 5px 0 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.quote-card-top > strong {
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.quote-carry {
  margin: 12px 0 22px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.quote-pending {
  margin: -10px 0 20px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #8a4d16;
  background: #fff5df;
  font-size: 12px;
  font-weight: 700;
}

.quote-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}

.quote-facts div {
  padding: 14px;
  background: #fafcfc;
}

.quote-facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.quote-facts dd {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
}

.quote-ledger {
  margin-top: 22px;
}

.quote-ledger > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
}

.quote-ledger p {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(180px, 1.4fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f3;
  font-size: 13px;
}

.quote-ledger small {
  color: var(--muted);
}

.quote-ledger b {
  text-align: right;
  white-space: nowrap;
}

.quote-terms {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.quote-again {
  margin-top: 20px;
  color: var(--ink);
  background: #e9eff1;
}

.quote-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.quote-missing span {
  padding: 9px 12px;
  border: 1px solid #e9c9b8;
  border-radius: 10px;
  color: #733b24;
  background: #fff7f1;
  font-size: 13px;
}

.quote-range {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.quote-range div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
}

.quote-range strong { color: var(--accent); }

.quote-note,
.quote-message {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.75;
  white-space: pre-wrap;
}

.quote-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px;
  border-radius: 18px;
  color: var(--muted);
  background: var(--paper);
}

.quote-loading i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 900ms ease-in-out infinite alternate;
}

@keyframes pulse {
  to { opacity: 0.3; transform: scale(0.75); }
}

.quote-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 18px;
  margin-top: 44px;
  color: #7b8993;
  font-size: 11px;
  text-align: center;
}

.quote-footer span + span {
  color: #8b969d;
}

@media (max-width: 680px) {
  .quote-shell { width: min(100% - 24px, 920px); padding-top: 20px; }
  .quote-intro { margin: 52px 0 26px; }
  .quote-intro h1 { font-size: 46px; }
  .quote-actions { align-items: stretch; flex-direction: column; }
  .quote-actions button { width: 100%; }
  .quote-card { padding: 20px; }
  .quote-card-top { flex-direction: column; }
  .quote-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-ledger p { grid-template-columns: 1fr auto; }
  .quote-ledger small { grid-column: 1 / -1; grid-row: 2; }
  .quote-result-head { align-items: start; flex-direction: column; gap: 6px; }
}
