:root {
  --ink: #37352f;
  --muted: #787774;
  --paper: #f4f7f6;
  --surface: rgba(255, 255, 255, 0.96);
  --soft: #f3f6f4;
  --line: rgba(55, 53, 47, 0.16);
  --teal: #0b6e69;
  --teal-dark: #075a57;
  --gold: #d99a2b;
  --danger: #a33a2b;
  --shadow: 0 1px 2px rgba(15, 15, 15, 0.05), 0 16px 44px rgba(27, 57, 53, 0.07);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(11, 110, 105, 0.11), transparent 34rem),
    radial-gradient(circle at 92% 18%, rgba(217, 154, 43, 0.07), transparent 28rem),
    linear-gradient(180deg, #f7faf9 0, var(--paper) 34rem, #fbfcfb 100%);
  background-attachment: fixed;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea { font: inherit; }
button { cursor: pointer; }

.sr-only,
.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.hidden { display: none !important; }

.site-header {
  width: min(760px, calc(100% - 40px));
  height: 60px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  background: linear-gradient(145deg, #075a57, #0b7d76);
  box-shadow: 0 5px 14px rgba(7, 90, 87, 0.2);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  overflow: visible;
}

.brand-glyph {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-node {
  fill: #e4ad4f;
  stroke: #075a57;
  stroke-width: 1.1;
}

nav {
  display: flex;
  gap: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-picker select {
  width: auto;
  min-width: 104px;
  height: 34px;
  border-color: transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}

.nav-action {
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  color: var(--teal-dark);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
}

.nav-action:hover { background: var(--soft); }

.page-shell {
  width: min(740px, calc(100% - 40px));
  margin: 42px auto 64px;
}

.intro {
  max-width: none;
  margin: 0 0 24px;
  text-align: left;
}

.eyebrow,
.step-label {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(36px, 5vw, 46px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.intro-copy {
  max-width: none;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 500;
}

.desk {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.tab {
  min-height: 48px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}

.tab.active {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
  background: transparent;
  box-shadow: none;
}

.tab-secondary { display: none; }

.panel {
  display: none;
  padding: 26px 28px 30px;
}

.panel.active { display: block; }

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.availability,
.review-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.availability i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a9b70;
  box-shadow: 0 0 0 4px rgba(42, 155, 112, 0.12);
}

.form-stack { display: grid; gap: 14px; }
.form-intro,
.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

label {
  display: grid;
  gap: 7px;
}

label > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.wide { grid-column: 1 / -1; }

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  color: var(--ink);
  background: #fbfbfa;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 88px;
  padding: 11px 12px;
  line-height: 1.5;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(10, 102, 99, 0.1);
}

.optional-fields {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.optional-fields summary {
  padding: 11px 12px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  list-style-position: inside;
}

.optional-fields[open] summary {
  border-bottom: 1px solid var(--line);
}

.optional-fields .form-grid {
  padding: 15px;
}

.consent {
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
}

.consent input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--teal);
}

.consent span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.primary-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--teal);
  font-size: 15px;
  font-weight: 600;
}

.primary-button:hover { background: var(--teal-dark); }
.primary-button:disabled,
.chat-compose button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.status-message {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

.status-message.success { color: var(--teal); }

.chat-workspace {
  display: grid;
  gap: 12px;
}

.chat-intro {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(11, 110, 105, 0.16);
  border-left: 3px solid var(--teal);
  border-radius: 7px;
  background: #fbfdfc;
}

.chat-intro strong {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 650;
}

.chat-intro span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.chat-log {
  height: min(50vh, 460px);
  min-height: 320px;
  padding: 18px;
  border: 1px solid rgba(55, 53, 47, 0.13);
  border-radius: 8px;
  overflow-y: auto;
  background: linear-gradient(180deg, #f7faf8, #f1f5f3);
}

.message {
  width: min(86%, 540px);
  margin-bottom: 13px;
  padding: 12px 14px;
  border: 1px solid rgba(55, 53, 47, 0.12);
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 2px rgba(15, 15, 15, 0.04);
}

.message.user {
  margin-left: auto;
  border-color: rgba(11, 110, 105, 0.22);
  background: #eaf6f2;
}

.message span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.message p {
  margin: 0;
  color: #2f332f;
  font-size: 15px;
  line-height: 1.62;
  white-space: pre-wrap;
}

.prompt-starter {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(55, 53, 47, 0.11);
  border-radius: 8px;
  background: #ffffff;
}

.prompt-starter > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-chips button {
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid rgba(11, 110, 105, 0.18);
  border-radius: 999px;
  color: var(--teal-dark);
  background: white;
  font-size: 12px;
  font-weight: 500;
}

.prompt-chips button:hover {
  border-color: rgba(11, 110, 105, 0.36);
  background: #f4faf8;
}

.intake-review-panel {
  display: grid;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(11, 110, 105, 0.18);
  border-radius: 7px;
  background: #fbfdfc;
}

.intake-review-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--teal-dark);
  font-size: 13px;
}

.intake-review-meta,
.intake-missing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.intake-chip,
.intake-missing-list span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 3px 8px;
  border: 1px solid rgba(55, 53, 47, 0.12);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 12px;
}

.intake-chip span,
.intake-review-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.intake-chip strong {
  font-weight: 600;
}

.intake-working-brief {
  padding: 8px 10px;
  border-left: 2px solid rgba(11, 110, 105, 0.35);
  border-radius: 0 6px 6px 0;
  background: rgba(11, 110, 105, 0.04);
  white-space: pre-wrap;
}

.intake-identified-list span {
  border-color: rgba(11, 110, 105, 0.18);
  color: var(--teal-dark);
  background: #f4faf8;
}

.intake-readiness {
  display: grid;
  gap: 6px;
}

.intake-readiness-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.intake-readiness-header strong {
  color: var(--teal-dark);
  font-weight: 650;
}

.intake-readiness-track {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(55, 53, 47, 0.1);
}

.intake-readiness-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d99a2b, #0b6e69);
}

.intake-review-section {
  display: grid;
  gap: 6px;
}

.intake-review-section p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: end;
}

.chat-compose textarea {
  min-height: 62px;
  max-height: 160px;
}

.chat-compose button {
  min-width: 78px;
  height: 46px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--teal);
  font-weight: 600;
}

.chat-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}


.chat-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.followup-submit {
  min-height: 32px;
  padding: 0 12px;
  border-color: rgba(11, 110, 105, 0.28);
  color: var(--teal-dark);
}

.followup-submit-ready {
  border-color: transparent;
  color: white;
  background: var(--teal);
}

.followup-submit-ready:hover {
  background: var(--teal-dark);
}

.followup-submit:disabled {
  cursor: default;
  opacity: 0.72;
}
.text-button {
  padding: 0;
  border: 0;
  color: var(--teal);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
}

.receipt {
  padding: 18px;
  border: 1px solid #bfd9d1;
  border-radius: 12px;
  background: #edf7f4;
}

.receipt span,
.receipt strong { display: block; }
.receipt span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
}
.receipt strong {
  margin: 7px 0;
  font-size: 20px;
  letter-spacing: 0.03em;
}
.receipt p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

footer {
  width: min(740px, calc(100% - 40px));
  margin: 0 auto 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.footer-product {
  color: var(--ink);
  font-weight: 500;
}

.footer-company { text-align: right; }

.status-view {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.recent-tracking {
  display: grid;
  gap: 10px;
}

.progress-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafcfb;
}

.recent-item-copy {
  display: grid;
  gap: 5px;
}

.recent-item-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.recent-item-copy strong {
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.status-content {
  min-height: 120px;
}

.status-card {
  display: grid;
  gap: 14px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--soft);
}

.status-row:last-child {
  border-bottom: none;
}

.status-row-action {
  justify-content: flex-start;
}

.status-row-time {
  color: var(--muted);
  font-size: 11px;
}

.status-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.status-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.status-badge {
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-received,
.status-reviewing,
.status-contact_planned,
.status-contacted,
.status-closed {
  background: var(--soft);
  color: var(--teal-dark);
}

.status-information_needed,
.status-action-required {
  background: #fef3e2;
  color: #b45309;
}

.receipt-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.secondary-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--teal-dark);
  background: var(--surface);
  font-weight: 500;
  font-size: 14px;
}

.secondary-button:hover {
  background: var(--soft);
}

.ai-tracking-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-size: 11px;
}

.tracking-label {
  color: var(--muted);
  font-weight: 500;
}

#aiTrackingCode {
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 12px;
}

@media (max-width: 920px) {
  .page-shell {
    margin-top: 32px;
  }
  .intro {
    padding-top: 8px;
  }
  h1 { max-width: 720px; }
}

@media (max-width: 620px) {
  .site-header {
    width: calc(100% - 28px);
    height: 58px;
  }
  .brand > span:last-child { display: none; }
  .header-actions { gap: 4px; }
  .language-picker select {
    min-width: 92px;
    padding: 0 7px;
  }
  .nav-action { padding: 0 10px; font-size: 13px; }
  .page-shell {
    width: calc(100% - 28px);
    margin-top: 24px;
    margin-bottom: 48px;
  }
  h1 { font-size: 34px; }
  .intro-copy { font-size: 15px; }
  .tabs { gap: 8px; padding: 0 14px; }
  .tab { min-height: 46px; padding: 0 4px; font-size: 13px; }
  .panel { padding: 20px 16px 22px; }
  .panel-heading { display: block; }
  .availability,
  .review-note { margin-top: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .chat-compose { grid-template-columns: 1fr; }
  .chat-compose button { width: 100%; }
  .chat-footer { display: grid; }
  .chat-actions { justify-content: flex-start; }
  footer {
    width: calc(100% - 28px);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .footer-company { text-align: left; }
  .status-view { padding: 16px; }
  .status-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .status-value { text-align: left; }
  .receipt-actions { flex-direction: column; }
  .ai-tracking-area { flex-direction: column; align-items: flex-start; }
  .recent-item { align-items: flex-start; }
}
