@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Noto+Sans+SC:wght@400;500;700&display=swap");

:root {
  --bg: #f6efe5;
  --bg-soft: rgba(255, 251, 246, 0.78);
  --card: rgba(255, 250, 244, 0.82);
  --card-strong: rgba(255, 252, 248, 0.96);
  --ink: #191714;
  --muted: #6d6258;
  --line: rgba(25, 23, 20, 0.1);
  --brand: #bf4e2d;
  --brand-deep: #8d3218;
  --teal: #0f6d73;
  --olive: #5a6f3f;
  --danger: #a93030;
  --shadow: 0 22px 70px rgba(86, 55, 26, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(191, 78, 45, 0.16), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(15, 109, 115, 0.16), transparent 24%),
    linear-gradient(180deg, #f7efe4 0%, #f2ebe3 45%, #ece5db 100%);
}

body.is-loading {
  cursor: progress;
}

.ambient {
  position: fixed;
  inset: auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(36px);
  opacity: 0.55;
  pointer-events: none;
}

.ambient-left {
  top: 72px;
  left: -100px;
  background: rgba(191, 78, 45, 0.12);
}

.ambient-right {
  top: 220px;
  right: -110px;
  background: rgba(15, 109, 115, 0.11);
}

.page-shell {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 430px);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy-group {
  padding: 10px 4px 8px;
}

.eyebrow,
h1,
h2,
h3,
button,
label,
.section-label,
.hero-panel-title,
.hero-kicker {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-deep);
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.35rem, 6vw, 4.9rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.82;
}

.hero-panel,
.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.card {
  background: var(--card);
}

.hero-panel {
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 251, 247, 0.94), rgba(255, 246, 238, 0.84)),
    radial-gradient(circle at top right, rgba(191, 78, 45, 0.14), transparent 32%);
}

.hero-panel-title,
.section-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel-grid {
  display: grid;
  gap: 14px;
}

.hero-panel-grid div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.hero-panel-grid strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.hero-panel-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.workspace {
  display: grid;
  gap: 20px;
}

.input-panel {
  padding: 24px;
}

.section-heading,
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2,
.results-header h2,
.card-head h3,
.product-meta h3 {
  margin: 0;
}

.helper-text {
  margin: 0;
  max-width: 360px;
  color: var(--muted);
  line-height: 1.65;
  text-align: right;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 168px;
  gap: 12px;
  margin-top: 18px;
}

input {
  width: 100%;
  border: 1px solid rgba(25, 23, 20, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  padding: 16px 18px;
  color: var(--ink);
  font-size: 1rem;
}

input:focus {
  outline: 2px solid rgba(191, 78, 45, 0.24);
  border-color: rgba(191, 78, 45, 0.38);
}

button {
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

#analyze-button {
  color: #fff8f2;
  background: linear-gradient(135deg, var(--brand) 0%, #d86b40 100%);
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: 0 14px 36px rgba(191, 78, 45, 0.22);
}

.example-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.example-link,
.ghost-button {
  padding: 10px 14px;
  color: var(--teal);
  background: rgba(15, 109, 115, 0.08);
  font-weight: 700;
}

.status {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.status.loading {
  color: var(--brand-deep);
}

.status.error {
  color: var(--danger);
}

.results-shell {
  display: grid;
  gap: 18px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.result-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill,
.tag-pill,
.source-badge,
.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.meta-pill,
.tag-pill {
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
}

.results-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 330px) 1fr;
  gap: 24px;
  padding: 24px;
}

.product-visual {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(191, 78, 45, 0.16), transparent 40%),
    linear-gradient(135deg, rgba(15, 109, 115, 0.12), rgba(255, 255, 255, 0.86));
}

.product-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.product-visual-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(25, 23, 20, 0.42);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
}

.product-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.source-badge {
  color: var(--brand-deep);
  background: rgba(191, 78, 45, 0.1);
}

.price-badge {
  color: var(--olive);
  background: rgba(90, 111, 63, 0.12);
}

.product-meta h3 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.2;
}

.product-summary {
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.75;
}

.fact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.fact-list div {
  padding: 14px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.fact-list dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.fact-list dd {
  margin: 0;
  font-weight: 600;
  line-height: 1.65;
}

.card:not(.product-card) {
  padding: 24px;
}

.analysis-sections {
  display: grid;
  gap: 14px;
}

.analysis-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
}

.analysis-block h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.analysis-block p {
  margin: 0;
  color: var(--ink);
  line-height: 1.7;
}

.analysis-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analysis-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 109, 115, 0.08);
  color: var(--ink);
  font-size: 0.92rem;
}

.script-card {
  background:
    linear-gradient(180deg, rgba(255, 249, 245, 0.95), rgba(255, 246, 240, 0.84)),
    radial-gradient(circle at top right, rgba(191, 78, 45, 0.12), transparent 32%);
}

.script-hook {
  margin: 10px 0 12px;
  color: var(--brand-deep);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.6;
}

.script-body {
  margin: 0;
  padding: 18px 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.95;
  font-size: 1.02rem;
}

.script-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none;
}

@media (max-width: 980px) {
  .hero,
  .product-card,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-column: auto;
  }

  .helper-text,
  .results-header {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1200px);
    padding-top: 24px;
  }

  .input-row,
  .fact-list {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .card-head,
  .results-header,
  .script-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    line-height: 1;
  }
}
