:root {
  --bg: #f4efe7;
  --paper: rgba(255, 250, 243, 0.84);
  --paper-strong: #fffaf3;
  --ink: #16181d;
  --muted: #5e6470;
  --line: rgba(22, 24, 29, 0.12);
  --accent: #d46f37;
  --accent-deep: #a54819;
  --teal: #2f7d78;
  --gold: #f0c176;
  --shadow: 0 20px 60px rgba(42, 31, 18, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(212, 111, 55, 0.18), transparent 26%),
    radial-gradient(circle at 100% 10%, rgba(47, 125, 120, 0.2), transparent 20%),
    linear-gradient(180deg, #f8f3eb 0%, #f0e6d8 100%);
}

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

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #f19d60);
  color: white;
  box-shadow: 0 10px 24px rgba(212, 111, 55, 0.28);
}

.top-nav {
  display: flex;
  gap: 14px;
  color: var(--muted);
}

.card {
  backdrop-filter: blur(18px);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.92fr;
  gap: 24px;
}

.hero-copy,
.mini-card,
.form-card,
.result-main,
.result-side,
.card {
  padding: 28px;
}

.eyebrow,
.mini-kicker {
  margin: 0 0 10px;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.02;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 6vw, 5.1rem);
  max-width: 9ch;
}

.hero-text,
.section-text,
.help-text,
.result-summary,
.share-summary {
  color: var(--muted);
  line-height: 1.8;
}

.hero-text {
  max-width: 54ch;
  margin-top: 18px;
}

.hero-actions,
.action-row,
.inline-meta,
.panel-head,
.result-top {
  display: flex;
  gap: 14px;
}

.hero-actions,
.inline-meta,
.action-row {
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 26px;
}

.primary-btn,
.ghost-btn {
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--accent), #f2a25d);
  box-shadow: 0 14px 28px rgba(212, 111, 55, 0.25);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
}

.small-btn {
  min-height: 40px;
  padding: 8px 14px;
}

.hero-side {
  display: grid;
  gap: 20px;
}

.path-list,
.feature-list,
.quote-block ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 10px;
}

.form-card form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.field input,
.field textarea,
.code-block,
.answer-input {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.field input,
.field textarea {
  padding: 14px 16px;
}

.meta-chip {
  min-width: 180px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(22, 24, 29, 0.08);
}

.meta-chip span {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.test-grid,
.result-grid {
  display: grid;
  gap: 24px;
}

.test-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.result-grid {
  grid-template-columns: 1.2fr 0.82fr;
}

.panel-head,
.result-top {
  justify-content: space-between;
  align-items: flex-start;
}

.code-block,
.answer-input {
  margin-top: 14px;
  padding: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.94rem;
  line-height: 1.65;
  resize: vertical;
}

.status-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(164, 72, 25, 0.18);
  background: rgba(212, 111, 55, 0.08);
  color: var(--accent-deep);
}

.hidden {
  display: none;
}

.confidence-card {
  min-width: 120px;
  padding: 14px 16px;
  border-radius: 20px;
  text-align: right;
  background: linear-gradient(160deg, rgba(240, 193, 118, 0.35), rgba(255, 255, 255, 0.8));
}

.confidence-card span,
.dimension-meta,
.event-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.confidence-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.55rem;
}

.result-main h3 {
  font-size: clamp(2.6rem, 5vw, 4.5rem);
}

.result-title {
  margin: 8px 0 0;
  color: var(--accent-deep);
  font-size: 1.14rem;
  font-weight: 700;
}

.result-summary {
  margin: 18px 0 0;
}

.tag-list,
.share-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list {
  margin-top: 18px;
}

.tag {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(47, 125, 120, 0.12);
  border: 1px solid rgba(47, 125, 120, 0.16);
  color: var(--teal);
  font-weight: 700;
  font-size: 0.92rem;
}

.dimension-list {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.dimension-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(22, 24, 29, 0.08);
}

.dimension-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dimension-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(22, 24, 29, 0.08);
}

.dimension-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--accent));
}

.quote-block {
  margin-top: 22px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(22, 24, 29, 0.08);
}

.share-card {
  margin-top: 14px;
  padding: 24px;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(145deg, #1f5a61 0%, #0f2530 52%, #8c401f 100%);
  box-shadow: 0 18px 38px rgba(11, 20, 28, 0.22);
}

.share-brand {
  margin: 0 0 16px;
  opacity: 0.82;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.share-card h4 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.share-type {
  margin: 0 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.share-summary {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
}

.share-tags .tag {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
  color: white;
}

.event-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(22, 24, 29, 0.08);
}

.event-stats {
  display: grid;
  gap: 12px;
}

.event-stats div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(244, 239, 231, 0.92);
}

.event-stats strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.22rem;
}

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

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .site-header,
  .panel-head,
  .result-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    flex-wrap: wrap;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .hero-copy,
  .mini-card,
  .form-card,
  .result-main,
  .result-side,
  .card {
    padding: 22px;
  }
}
