:root {
  --cream: #f6efe4;
  --paper: #fffaf0;
  --paper-strong: #fff5df;
  --green-950: #061f18;
  --green-900: #073b2d;
  --green-700: #12614b;
  --orange: #d97932;
  --gold: #f3c56b;
  --ink: #10251e;
  --muted: #66746f;
  --line: rgba(7, 59, 45, 0.14);
  --shadow-soft: 0 24px 70px rgba(7, 31, 24, 0.1);
  --shadow-strong: 0 36px 110px rgba(7, 31, 24, 0.18);
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgba(217, 121, 50, 0.18), transparent 28rem),
    radial-gradient(circle at 92% 6%, rgba(18, 97, 75, 0.16), transparent 26rem),
    linear-gradient(135deg, #f9f3e7 0%, #edf4ed 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

button,
input,
textarea {
  font: inherit;
}

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

.shell {
  margin: 0 auto;
  max-width: 1220px;
  padding: 24px;
}

.topbar,
.topnav,
.brand,
.hero-actions,
.form-actions {
  align-items: center;
  display: flex;
}

.topbar {
  background: rgba(255, 250, 240, 0.76);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  justify-content: space-between;
  padding: 10px 12px 10px 16px;
  position: sticky;
  top: 16px;
  z-index: 10;
}

.brand {
  gap: 10px;
}

.brand-mark {
  align-items: center;
  background: var(--green-900);
  border-radius: 999px;
  color: var(--gold);
  display: inline-flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  letter-spacing: -0.08em;
  width: 44px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.topnav a,
p,
label,
.form-message {
  color: var(--muted);
}

.topnav {
  gap: 8px;
}

.topnav a,
.ghost-button,
.link-button {
  border-radius: 999px;
  padding: 10px 14px;
}

.ghost-button,
.secondary-button,
.primary-button,
.link-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.ghost-button,
.secondary-button,
.link-button {
  background: rgba(7, 59, 45, 0.08);
  color: var(--green-900);
}

.primary-button {
  background: var(--green-900);
  border-radius: 999px;
  color: #fffaf0;
  padding: 14px 20px;
  box-shadow: 0 12px 30px rgba(7, 59, 45, 0.22);
}

.secondary-button {
  border-radius: 999px;
  padding: 14px 20px;
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.hero-app,
.panel,
.workspace {
  margin-top: 28px;
}

.hero-app {
  align-items: stretch;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  padding: 54px 4px 18px;
}

.eyebrow {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--green-950);
  font-family: var(--font-display);
  letter-spacing: -0.06em;
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 6.8rem);
  line-height: 0.92;
  max-width: 900px;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.96;
}

p {
  font-size: 1rem;
  line-height: 1.65;
}

.hero-app p:not(.eyebrow) {
  max-width: 660px;
}

.hero-actions,
.form-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.panel,
.account-box,
.chat-card,
.plan-card {
  background: rgba(255, 250, 240, 0.82);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
}

.panel {
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  padding: 30px;
}

.auth-card {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

input,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  padding: 14px 15px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.form-message {
  min-height: 24px;
}

.form-message.is-error {
  color: #9d2f2f;
}

.wallet-preview,
.wallet-box {
  background:
    radial-gradient(circle at 18% 20%, rgba(243, 197, 107, 0.24), transparent 34%),
    linear-gradient(145deg, #0b372b, #071d17);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  color: #fffaf0;
  padding: 26px;
}

.wallet-preview {
  min-width: min(360px, 100%);
}

.wallet-preview span,
.wallet-box span,
.session-grid span {
  color: rgba(255, 250, 240, 0.7);
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wallet-preview strong,
.wallet-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  letter-spacing: -0.08em;
  line-height: 0.95;
  margin: 12px 0 8px;
}

.wallet-preview small,
.wallet-box small {
  color: rgba(255, 250, 240, 0.68);
}

.preview-row,
.session-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.preview-row b,
.session-grid strong {
  display: block;
  font-size: 1rem;
  margin-top: 4px;
}

.workspace {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: 350px minmax(0, 1fr);
}

.account-box {
  display: grid;
  gap: 14px;
  padding: 24px;
  position: sticky;
  top: 110px;
}

.account-box h2 {
  font-size: 2rem;
}

.session-grid {
  background: rgba(7, 59, 45, 0.06);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
}

.session-grid span {
  color: rgba(7, 59, 45, 0.62);
}

.session-grid strong {
  color: var(--green-900);
}

.session-actions,
.account-actions {
  display: grid;
  gap: 10px;
}

.chat-card {
  display: grid;
  gap: 18px;
  min-height: 680px;
  padding: 24px;
}

.chat-header {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding-bottom: 16px;
}

.chat-header span {
  background: rgba(18, 97, 75, 0.1);
  border-radius: 999px;
  color: var(--green-900);
  font-weight: 900;
  padding: 9px 12px;
  white-space: nowrap;
}

.chat-log {
  align-content: start;
  display: grid;
  gap: 14px;
  max-height: 500px;
  overflow: auto;
  padding-right: 6px;
}

.message {
  border: 1px solid var(--line);
  border-radius: 20px;
  max-width: 86%;
  padding: 14px 16px;
  white-space: pre-wrap;
}

.message strong {
  color: var(--green-900);
}

.message p {
  margin: 8px 0 0;
}

.message.assistant {
  background: #fff;
}

.message.user {
  background: #e8f3ee;
  justify-self: end;
}

.chat-form {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.plans-panel {
  grid-template-columns: 1fr;
}

.plans {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-card {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.plan-card span {
  color: var(--green-900);
  font-weight: 900;
}

.plan-card strong {
  font-family: var(--font-display);
  font-size: 2.8rem;
  letter-spacing: -0.06em;
}

.plan-card em {
  background: var(--gold);
  border-radius: 999px;
  color: var(--green-950);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
  justify-self: start;
  padding: 7px 10px;
  text-transform: uppercase;
}

.plan-card.featured {
  background:
    radial-gradient(circle at 80% 0%, rgba(243, 197, 107, 0.3), transparent 34%),
    #fffaf0;
  border-color: rgba(217, 121, 50, 0.38);
}

@media (max-width: 920px) {
  .hero-app,
  .panel,
  .workspace,
  .plans {
    grid-template-columns: 1fr;
  }

  .account-box {
    position: static;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    border-radius: 24px;
    flex-direction: column;
    gap: 12px;
  }

  .topnav {
    flex-wrap: wrap;
  }

  .hero-app {
    padding-top: 28px;
  }

  .panel,
  .account-box,
  .chat-card,
  .wallet-preview {
    border-radius: 22px;
    padding: 18px;
  }

  .chat-form,
  .preview-row,
  .session-grid {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }
}
