:root {
  --ink: #18211f;
  --muted: #5e6b66;
  --paper: #f7f4ec;
  --panel: #fffdf7;
  --line: #d9d2c2;
  --accent: #0f766e;
  --accent-2: #b45309;
  --chat-bg: #18211f;
  --chat-panel: #22302c;
  --chat-line: rgba(255, 253, 247, 0.14);
  --shadow: rgba(24, 33, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(180, 83, 9, 0.08), transparent 42%),
    var(--paper);
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.links a {
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
}

.links a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero {
  display: grid;
  min-height: 62vh;
  align-items: center;
  padding: 54px 0 72px;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead {
  max-width: 690px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.16rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--panel);
  font-weight: 800;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 32px 0 72px;
}

.card {
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 18px 40px var(--shadow);
}

.card h2,
.content h1,
.content h2 {
  margin: 0 0 12px;
  line-height: 1.2;
}

.card p,
.content p,
.note-list p {
  color: var(--muted);
}

.content {
  max-width: 840px;
  padding: 54px 0 86px;
}

.soft-band {
  margin: 0 0 82px;
  padding: 32px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 253, 247, 0.64);
}

.soft-band h2 {
  margin: 0 0 10px;
}

.soft-band p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.chat-section {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(360px, 1.16fr);
  gap: 28px;
  align-items: stretch;
  margin: 0 0 86px;
}

.chat-copy {
  padding: 34px 0;
}

.chat-copy h2 {
  max-width: 520px;
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.chat-copy p {
  max-width: 520px;
  color: var(--muted);
}

.chat-widget {
  display: grid;
  gap: 14px;
  min-height: 520px;
  padding: 18px;
  border: 1px solid rgba(24, 33, 31, 0.2);
  border-radius: 8px;
  background: var(--chat-bg);
  color: var(--panel);
  box-shadow: 0 24px 54px rgba(24, 33, 31, 0.26);
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 170px;
  max-height: 300px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--chat-line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.05);
}

.bubble {
  width: min(92%, 540px);
  padding: 12px 14px;
  border: 1px solid var(--chat-line);
  border-radius: 8px;
  background: var(--chat-panel);
}

.bubble.user {
  align-self: flex-end;
  background: rgba(15, 118, 110, 0.35);
}

.bubble span {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 253, 247, 0.68);
  font-size: 0.76rem;
  font-weight: 800;
}

.bubble p {
  margin: 0;
  color: var(--panel);
}

.prompt-chips,
.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.prompt-chips button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--chat-line);
  border-radius: 999px;
  background: transparent;
  color: var(--panel);
  cursor: pointer;
}

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

.field span {
  color: rgba(255, 253, 247, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.field select,
.field textarea,
.field input {
  width: 100%;
  border: 1px solid var(--chat-line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.08);
  color: var(--panel);
  font: inherit;
}

.field select,
.field input {
  min-height: 42px;
  padding: 8px 10px;
}

.field textarea {
  resize: vertical;
  min-height: 108px;
  padding: 10px;
}

.field textarea::placeholder,
.field input::placeholder {
  color: rgba(255, 253, 247, 0.45);
}

.chat-settings {
  border: 1px solid var(--chat-line);
  border-radius: 8px;
  padding: 10px 12px;
}

.chat-settings summary {
  cursor: pointer;
  font-weight: 800;
}

.chat-settings .field {
  margin-top: 10px;
}

.chat-status {
  min-height: 24px;
  margin: 0;
  color: rgba(255, 253, 247, 0.7);
  font-size: 0.9rem;
}

.chat-status[data-state="error"] {
  color: #fca5a5;
}

.chat-widget .button.secondary {
  border-color: var(--chat-line);
  color: var(--panel);
}

.note-list {
  display: grid;
  gap: 14px;
  padding: 24px 0 80px;
}

.note-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding: 38px 0 52px;
  }

  .hero h1 {
    font-size: 3.1rem;
  }

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

  .chat-section {
    grid-template-columns: 1fr;
  }

  .chat-widget {
    min-height: auto;
  }

  .soft-band {
    padding: 24px;
  }
}
