:root {
  color-scheme: light;
  --leaf-950: #061c16;
  --leaf-850: #0d3328;
  --leaf-700: #1b644d;
  --leaf-500: #38a873;
  --moss-200: #d4e7c5;
  --ink: #17201d;
  --muted: #65736e;
  --surface: rgba(255, 253, 247, 0.84);
  --warning: #b86e1d;
  --glass-border: rgba(8, 38, 31, 0.12);
  --shadow: 0 24px 70px rgba(8, 38, 31, 0.16), 0 4px 16px rgba(8, 38, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(24, 72, 55, 0.22), transparent 34%),
    linear-gradient(135deg, #d9e8d4 0%, #c7dcc2 48%, #eef5ea 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    linear-gradient(90deg, rgba(8, 38, 31, 0.08), transparent 18%, transparent 82%, rgba(8, 38, 31, 0.07)),
    url("/canopy-lines.svg") center / min(980px, 120vw) auto repeat;
  opacity: 0.9;
}

body::after {
  background:
    linear-gradient(180deg, rgba(8, 38, 31, 0.06), transparent 30%, rgba(8, 38, 31, 0.14)),
    repeating-linear-gradient(115deg, rgba(8, 38, 31, 0.075) 0 1px, transparent 1px 38px);
}

body.front-page {
  background:
    linear-gradient(180deg, #ffffff 0%, #f4fbf0 42%, #dbe9d4 100%),
    linear-gradient(145deg, rgba(212, 231, 197, 0.5), transparent 48%);
}

body.front-page::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, transparent 52%),
    url("/canopy-lines.svg") top -128px center / min(820px, 112vw) auto repeat-x;
  opacity: 0.34;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.78) 46%, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.78) 46%, transparent 90%);
}

body.front-page::after {
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, rgba(8, 38, 31, 0.08) 100%),
    linear-gradient(125deg, transparent 0 42%, rgba(255, 255, 255, 0.32) 42% 56%, transparent 56% 100%);
  opacity: 0.84;
}

body.contact-page {
  background:
    linear-gradient(180deg, #ffffff 0%, #f4fbf0 42%, #dbe9d4 100%),
    linear-gradient(145deg, rgba(212, 231, 197, 0.5), transparent 48%);
}

body.contact-page::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, transparent 52%),
    url("/canopy-lines.svg") top -128px center / min(820px, 112vw) auto repeat-x;
  opacity: 0.34;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.78) 46%, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.78) 46%, transparent 90%);
}

body.contact-page::after {
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, rgba(8, 38, 31, 0.08) 100%),
    linear-gradient(125deg, transparent 0 42%, rgba(255, 255, 255, 0.32) 42% 56%, transparent 56% 100%);
  opacity: 0.84;
}

button,
textarea {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto;
  gap: clamp(32px, 5vh, 48px);
  align-content: start;
  place-items: center;
  min-height: calc(100vh - 76px);
  padding: clamp(32px, 5vh, 48px) 28px 48px;
  overflow: hidden;
  isolation: isolate;
}

.front-page .app-shell::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -2;
  height: min(36%, 310px);
  background: var(--leaf-950);
  content: "";
}

.front-page .app-shell::after {
  position: absolute;
  right: 0;
  bottom: min(36%, 310px);
  left: 0;
  z-index: -1;
  height: 54px;
  background: var(--leaf-950);
  content: "";
  mask: url("/vegetation-edge.svg") center bottom / 220px 54px repeat-x;
  -webkit-mask: url("/vegetation-edge.svg") center bottom / 220px 54px repeat-x;
}

.front-main {
  position: relative;
  z-index: 1;
}

.front-page .app-shell {
  min-height: auto;
  padding-bottom: 72px;
}

.home-heading {
  width: min(100%, 880px);
  display: grid;
  gap: 10px;
  place-items: center;
  text-align: center;
}

.home-heading h1 {
  position: relative;
  display: inline-grid;
  justify-items: center;
  max-width: 760px;
  margin: 0;
  color: var(--leaf-950);
  background: linear-gradient(105deg, var(--leaf-950), var(--leaf-700) 58%, #2f7f5e);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(2.15rem, 5vw, 3.8rem);
  font-weight: 950;
  line-height: 1.02;
  text-wrap: balance;
  -webkit-text-fill-color: transparent;
}

.home-heading h1::after {
  width: min(160px, 42%);
  height: 3px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--leaf-500), transparent);
  content: "";
}

.home-heading p {
  max-width: 760px;
  margin: 0;
  color: rgba(8, 38, 31, 0.68);
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  font-weight: 400;
  line-height: 1.4;
}

.front-page .chat-panel {
  height: min(720px, calc(100vh - 260px));
  min-height: 520px;
}

.site-header {
  position: relative;
  z-index: 2;
  width: 100%;
  border-bottom: 1px solid rgba(8, 38, 31, 0.1);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(8, 38, 31, 0.08);
}

.site-header-inner {
  display: flex;
  align-items: center;
  position: relative;
  width: min(100%, 1120px);
  min-height: 76px;
  margin: 0 auto;
  padding: 12px 28px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--leaf-950);
  font-size: 1.08rem;
  font-weight: 950;
  text-decoration: none;
}

.site-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.site-menu-button {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgba(8, 38, 31, 0.1);
  border-radius: 8px;
  padding: 0;
  background: #ffffff;
  cursor: pointer;
}

.site-menu-button span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--leaf-950);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.site-menu-button span:not(.sr-only) + span:not(.sr-only) {
  margin-top: 4px;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(8, 38, 31, 0.74);
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.site-nav a:hover {
  color: var(--leaf-950);
  background: rgba(212, 231, 197, 0.46);
}

.chat-panel {
  width: min(100%, 880px);
  height: min(820px, calc(100vh - 124px));
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 253, 243, 0.78)),
    radial-gradient(circle at 16% 0%, rgba(56, 168, 115, 0.16), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(212, 231, 197, 0.28), transparent 30%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
}

.eyebrow,
.label {
  margin: 0;
  color: #2f7f5e;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: var(--leaf-950);
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1;
}

h2 {
  color: var(--leaf-950);
  font-size: 1.25rem;
}

.contact-landing {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 76px);
  padding-top: 0;
}

.contact-hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(280px, 390px);
  align-items: center;
  justify-content: center;
  min-height: min(620px, calc(100vh - 76px));
  overflow: hidden;
  gap: clamp(28px, 7vw, 96px);
  padding: clamp(72px, 10vw, 128px) max(28px, calc((100vw - 1120px) / 2));
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(244, 251, 240, 0.76) 58%, rgba(212, 231, 197, 0.28) 100%),
    radial-gradient(circle at 82% 22%, rgba(56, 168, 115, 0.14), transparent 32%);
}

.contact-hero-section::before {
  content: none;
}

.contact-hero-copy {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  width: min(100%, 620px);
}

.contact-hero-copy h1 {
  margin-top: 12px;
  max-width: 620px;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 0.94;
}

.contact-hero-copy p:not(.eyebrow) {
  max-width: 54ch;
  margin: 22px 0 0;
  color: rgba(8, 38, 31, 0.72);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.55;
}

.contact-hero-aside {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 16px;
}

.contact-portrait {
  display: grid;
  width: clamp(160px, 17vw, 220px);
  aspect-ratio: 4 / 5;
  margin: 0;
  border: 1px solid rgba(8, 38, 31, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 24px 70px rgba(8, 38, 31, 0.16);
}

.contact-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% center;
}

.contact-direct-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.contact-direct-list div {
  display: grid;
  gap: 3px;
  min-width: 150px;
  border-left: 3px solid var(--leaf-500);
  padding: 5px 0 5px 12px;
}

.contact-direct-list dt {
  color: var(--leaf-700);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contact-direct-list dd {
  margin: 0;
  color: var(--leaf-950);
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.contact-bio-section {
  padding: clamp(84px, 10vw, 138px) max(28px, calc((100vw - 920px) / 2));
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.84), rgba(242, 249, 237, 0.64)),
    radial-gradient(circle at 100% 0%, rgba(212, 231, 197, 0.24), transparent 34%);
}

.contact-copy {
  position: relative;
  display: grid;
  gap: 24px;
  max-width: 78ch;
  margin: 0 auto;
  padding-left: clamp(22px, 4vw, 42px);
}

.contact-copy::before {
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--leaf-700), rgba(27, 100, 77, 0.16));
  content: "";
}

.contact-copy p {
  margin: 0;
  color: rgba(8, 38, 31, 0.82);
  font-size: clamp(1.04rem, 1.55vw, 1.13rem);
  line-height: 1.8;
}

.contact-form-section {
  position: relative;
  margin-top: 34px;
  padding: clamp(86px, 10vw, 126px) max(28px, calc((100vw - 760px) / 2)) clamp(76px, 9vw, 118px);
  color: rgba(255, 255, 255, 0.9);
  background: var(--leaf-950);
}

.contact-form-section::before {
  position: absolute;
  right: 0;
  bottom: calc(100% - 2px);
  left: 0;
  height: 54px;
  pointer-events: none;
  background: var(--leaf-950);
  content: "";
  mask: url("/vegetation-edge.svg") center bottom / 220px 54px repeat-x;
  -webkit-mask: url("/vegetation-edge.svg") center bottom / 220px 54px repeat-x;
}

.front-page .contact-form-section {
  margin-top: 0;
  padding-top: clamp(56px, 6vw, 82px);
  background: var(--leaf-950);
}

.front-page .contact-form-section::before {
  display: none;
}

.contact-form-intro {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto 26px;
}

.contact-form-intro .eyebrow {
  color: rgba(212, 231, 197, 0.82);
}

.contact-form-intro h2 {
  margin-top: 8px;
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.contact-form-intro p:not(.eyebrow) {
  max-width: 48ch;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.55;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 18px 24px 22px;
  color: rgba(255, 255, 255, 0.62);
  background: var(--leaf-950);
  border-top: 1px solid rgba(212, 231, 197, 0.12);
}

.site-footer p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 720;
  letter-spacing: 0;
}

.contact-form {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 14px;
  width: min(100%, 760px);
  margin: 0 auto;
}

.form-row {
  display: grid;
  gap: 7px;
}

.form-row label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  font-weight: 900;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.form-row select {
  min-height: 46px;
}

.form-row textarea {
  max-height: none;
  min-height: 140px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: rgba(212, 231, 197, 0.88);
  box-shadow: 0 0 0 4px rgba(212, 231, 197, 0.18);
}

.contact-form button {
  justify-self: start;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--leaf-950);
  background: #d4e7c5;
  cursor: pointer;
  font-weight: 950;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.contact-form button:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.contact-form button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.contact-hp {
  position: absolute;
  left: -10000px;
}

.form-status {
  align-self: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 800;
}

.form-status[data-state="success"] {
  color: #d4e7c5;
}

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

.subtitle {
  margin: 6px 0 0;
  color: rgba(8, 38, 31, 0.68);
  font-size: 0.92rem;
  line-height: 1.35;
}

.prompt-set {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px 0;
}

.prompt-set button {
  min-height: 34px;
  border: 1px solid rgba(31, 107, 82, 0.2);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--leaf-850);
  background: rgba(255, 253, 247, 0.56);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.prompt-set button:hover {
  border-color: rgba(31, 107, 82, 0.4);
  background: rgba(212, 231, 197, 0.62);
  transform: translateY(-1px);
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border-radius: 10px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(8, 38, 31, 0.1);
  background: rgba(255, 255, 255, 0.34);
}

.chat-header-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.language-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(8, 38, 31, 0.08);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.3);
}

.language-switcher button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: saturate(0.72);
  font-size: 1rem;
  line-height: 1;
  opacity: 0.55;
  transition:
    background 160ms ease,
    filter 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.language-switcher button:hover,
.language-switcher button.is-active {
  background: rgba(255, 253, 247, 0.64);
  filter: saturate(0.88);
  opacity: 0.9;
}

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

.brand-mark {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 22px 18px 12px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: min(504px, 100%);
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--surface);
  background: var(--leaf-700);
  font-size: 0.68rem;
  font-weight: 900;
}

.message.user .avatar {
  background: var(--ink);
}

.bubble {
  max-width: 100%;
  border: 1px solid rgba(8, 38, 31, 0.1);
  border-radius: 8px;
  padding: 13px 15px;
  background: rgba(255, 253, 247, 0.76);
  line-height: 1.45;
  white-space: normal;
  box-shadow: 0 10px 26px rgba(8, 38, 31, 0.08);
}

.bubble > :first-child {
  margin-top: 0;
}

.bubble > :last-child {
  margin-bottom: 0;
}

.bubble p {
  margin: 0 0 10px;
}

.bubble h3,
.bubble h4 {
  margin: 12px 0 6px;
  color: var(--leaf-950);
  font-size: 0.98rem;
  line-height: 1.25;
}

.bubble h4 {
  font-size: 0.92rem;
}

.bubble ul,
.bubble ol {
  margin: 8px 0 10px;
  padding-left: 20px;
}

.bubble li {
  margin: 3px 0;
}

.bubble a {
  color: var(--leaf-700);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.message.user .bubble {
  color: #ffffff;
  background: var(--leaf-850);
  white-space: pre-wrap;
}

.sources {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(8, 38, 31, 0.1);
  color: var(--ink);
  white-space: normal;
}

.sources summary {
  cursor: pointer;
  color: var(--leaf-700);
  font-size: 0.86rem;
  font-weight: 900;
}

.sources ol {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding-left: 18px;
}

.sources li {
  line-height: 1.35;
}

.sources strong,
.sources span {
  display: block;
}

.sources strong {
  font-size: 0.88rem;
}

.sources span,
.sources p {
  color: var(--muted);
  font-size: 0.82rem;
}

.sources p {
  margin: 4px 0 0;
}

.expert-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 12px;
  border: 1px solid rgba(27, 100, 77, 0.22);
  border-radius: 999px;
  padding: 8px 13px;
  color: #ffffff;
  background: var(--leaf-850);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(8, 38, 31, 0.12);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.expert-contact-button:hover {
  background: var(--leaf-950);
  transform: translateY(-1px);
}

.bubble .expert-contact-button,
.bubble .expert-contact-button:visited {
  color: #ffffff;
}

.message.pending .bubble {
  color: var(--muted);
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 42px;
  min-height: 20px;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leaf-700);
  animation: typingPulse 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 140ms;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes typingPulse {
  0%,
  70%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  35% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 18px 18px;
  background: transparent;
}

textarea {
  width: 100%;
  max-height: 180px;
  min-height: 48px;
  resize: none;
  border: 1px solid rgba(8, 38, 31, 0.12);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  line-height: 1.4;
  box-shadow: 0 8px 22px rgba(8, 38, 31, 0.08);
}

textarea:focus {
  border-color: var(--leaf-500);
  box-shadow: 0 0 0 4px rgba(52, 160, 111, 0.14);
}

.composer button {
  min-width: 92px;
  min-height: 48px;
  border: 1px solid rgba(6, 28, 22, 0.08);
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--leaf-850);
  cursor: pointer;
  font-weight: 900;
  box-shadow: none;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.composer button:hover {
  background: var(--leaf-950);
  transform: translateY(-1px);
}

.composer button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(52, 160, 111, 0.18);
}

.composer button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .contact-hero-section {
    align-items: start;
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 44px;
  }

  .contact-hero-copy,
  .contact-hero-aside {
    grid-column: auto;
    grid-row: auto;
  }

  .contact-hero-aside {
    width: 100%;
    justify-self: stretch;
    margin-top: 24px;
  }

  .contact-portrait {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(42vw, 180px);
    margin: 0;
  }

  .contact-direct-list {
    flex: 1;
    min-width: 0;
  }

  .contact-direct-list div {
    min-width: 0;
  }
}

@media (max-width: 820px) {
  body {
    min-height: 100dvh;
  }

  .app-shell {
    place-items: stretch;
    min-height: auto;
    padding: 28px 12px 86px;
  }

  .front-page .app-shell {
    grid-template-rows: auto auto;
    min-height: auto;
    height: auto;
    gap: 18px;
    padding: 22px 12px 188px;
    align-content: start;
  }

  .front-page .app-shell::before {
    height: 128px;
  }

  .front-page .app-shell::after {
    bottom: 128px;
    height: 42px;
    mask-size: 220px 42px;
    -webkit-mask-size: 220px 42px;
  }

  .home-heading {
    width: 100%;
    gap: 15px;
    margin: 8px 0 12px;
    padding: 8px 2px;
    text-align: center;
  }

  .home-heading h1 {
    font-size: clamp(2rem, 9vw, 2.75rem);
    line-height: 1.05;
  }

  .home-heading h1::after {
    margin-top: 12px;
  }

  .home-heading p {
    margin: 2px 0 4px;
    line-height: 1.55;
  }

  .site-header-inner {
    min-height: 62px;
    padding: 8px 12px;
  }

  .site-logo {
    width: 36px;
    height: 36px;
  }

  .site-brand {
    gap: 8px;
    font-size: 1rem;
  }

  .site-menu-button {
    display: grid;
  }

  .site-header.is-menu-open .site-menu-button span:not(.sr-only):first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .site-header.is-menu-open .site-menu-button span:not(.sr-only):nth-child(2) {
    opacity: 0;
  }

  .site-header.is-menu-open .site-menu-button span:not(.sr-only):nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    z-index: 4;
    display: none;
    width: min(240px, calc(100vw - 24px));
    margin-left: 0;
    border: 1px solid rgba(8, 38, 31, 0.1);
    border-radius: 10px;
    padding: 8px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(8, 38, 31, 0.14);
  }

  .site-header.is-menu-open .site-nav {
    display: grid;
  }

  .site-nav a {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .chat-panel {
    width: 100%;
    height: calc(100dvh - 86px);
  }

  .front-page .chat-panel {
    height: calc(100dvh - 86px);
    min-height: 520px;
  }

  .contact-hero-section,
  .contact-bio-section,
  .contact-form-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .front-page .contact-form-section {
    padding-top: 52px;
  }

  .contact-hero-copy h1 {
    font-size: clamp(2.4rem, 15vw, 4.1rem);
  }

  .contact-portrait {
    width: min(68vw, 190px);
    margin-bottom: 28px;
  }

  .contact-form button {
    width: 100%;
  }

  .prompt-set {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-inline: 14px;
  }

  .chat-header {
    min-height: 58px;
    gap: 9px;
    padding: 12px 14px;
  }

  .language-switcher {
    gap: 2px;
  }

  .language-switcher button {
    width: 28px;
    height: 28px;
  }

  .messages {
    padding: 18px 14px 10px;
  }

  .composer {
    grid-template-columns: 1fr;
    padding: 10px 14px 14px;
  }

  .composer button {
    width: 100%;
  }
}
