:root {
  color-scheme: light;
  font: 15px/1.5 system-ui, sans-serif;
  color: #152720;
  background: #f5f7f2;
  --green: #12352b;
  --dark: #102b23;
  --lime: #c5f471;
  --muted: #52645a;
  --line: #dce5da;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, .link-button { border: 0; border-radius: 10px; background: var(--green); color: white; padding: 10px 16px; font-weight: 650; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button:hover, .link-button:hover { filter: brightness(1.14); }
.link-button { display: inline-block; text-decoration: none; }
.text-button { background: transparent; color: inherit; padding: 4px; text-decoration: underline; }
.secondary { background: #edf3eb; color: var(--green); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(32px, 5vw, 57px); letter-spacing: -.055em; line-height: 1.03; }
h2 { font-size: 22px; letter-spacing: -.035em; line-height: 1.2; }
p { color: var(--muted); }
small { color: var(--muted); }
label { display: grid; gap: 5px; font-weight: 650; margin-top: 10px; }
input, select, textarea { width: 100%; border: 1px solid #bdcbbf; border-radius: 9px; padding: 9px 12px; background: white; color: inherit; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid #629c64; outline-offset: 1px; }
form { display: grid; gap: 8px; max-width: 460px; }
form > button { justify-self: start; margin-top: 7px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.brand img { width: 35px; height: 35px; }
.eyebrow { color: #3c674d; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.auth { display: grid; min-height: 100dvh; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.auth-hero { padding: clamp(28px, 5vw, 80px); display: grid; align-content: space-between; gap: 38px; color: white;
  background: radial-gradient(ellipse at 95% 90%, #245541, transparent 65%), var(--dark); }
.auth-hero h1 { font-size: clamp(42px, 7vw, 104px); margin: 16px 0; }
.auth-hero p { max-width: 420px; color: #c8d9ce; }
.auth-hero .eyebrow, .auth-hero small { color: var(--lime); }
.auth-form { display: grid; align-content: center; padding: clamp(25px, 5vw, 72px); }
.auth-form h2 { font-size: 36px; }
.auth-form form { width: min(100%, 390px); margin: auto; }
.auth-form form > button { width: 100%; }
.layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); min-height: 100dvh; }
aside { background: var(--dark); color: #f6f9f4; padding: 28px 20px; display: flex; flex-direction: column; gap: 26px; }
aside small { color: #a7bfb2; font-size: 10px; letter-spacing: .14em; }
aside select { margin-top: 5px; background: #1c4235; border-color: #476657; }
aside nav { display: grid; gap: 5px; }
aside nav button { text-align: left; background: transparent; color: #deebe1; padding: 10px; }
aside nav button.active { background: var(--lime); color: var(--dark); }
.nav-index { opacity: .65; font-size: 11px; margin-right: 10px; }
.aside-bottom { margin-top: auto; display: grid; justify-items: start; gap: 14px; }
.dashboard { width: min(100%, 1150px); margin: auto; align-self: start; padding: 0 clamp(18px, 4vw, 60px) 40px; }
header { min-height: 65px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 650; }
.page-heading { margin: 34px 0 24px; display: grid; gap: 9px; }
.card { padding: clamp(15px, 3vw, 27px); margin-bottom: 16px; background: white; border: 1px solid var(--line); border-radius: 16px; overflow-wrap: anywhere; }
.card h2 + p, .card p + button, .card p + .link-button, .card .pill + h2, .card .eyebrow + h2 { margin-top: 10px; }
.card h2 + button { margin-top: 14px; }
.card code { display: block; margin: 8px 0; }
.card pre { white-space: pre-wrap; }
.card details { margin-top: 12px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metrics strong { display: block; font-size: 24px; letter-spacing: -.045em; }
.metrics small { font-size: 10px; letter-spacing: .12em; font-weight: 750; }
.feature { background: #ecf5e4; }
.pill, .badge { background: #e7f4dd; color: #245134; border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 750; display: inline-block; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row small, .conversation-heading small, .contact small { display: block; }
.row:last-child { border: 0; }
.standalone { max-width: 600px; margin: 24px auto; padding: 0 18px; }
.standalone .card { margin-top: 18px; }
.inbox { height: 100dvh; display: grid; grid-template-rows: 65px minmax(0, 1fr); }
.inbox header { padding: 0 18px; background: white; justify-content: start; }
.inbox header select { margin-left: auto; max-width: 220px; }
.inbox-grid { display: grid; grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); min-height: 0; }
.chat-list { background: white; border-right: 1px solid var(--line); overflow: auto; }
.chat-list-heading { padding: 24px 16px 12px; }
.chat-list-heading h1 { font-size: 35px; }
.filters { display: flex; gap: 5px; margin-top: 13px; flex-wrap: wrap; }
.filters button { background: #f1f4ee; color: var(--green); font-size: 12px; padding: 6px 10px; }
.filters button.selected { background: var(--lime); }
.chat-item { display: flex; width: 100%; align-items: center; text-align: left; gap: 10px; background: white; color: var(--green); border-radius: 0; border-bottom: 1px solid var(--line); }
.chat-item:hover, .chat-item.current { background: #edf5e8; }
.avatar { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; background: #e2f0db; }
.contact { flex: 1; overflow-wrap: anywhere; }
.empty { padding: 15px; }
.conversation { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; background: #edf3e9; }
.conversation.placeholder { display: grid; place-content: center; text-align: center; gap: 8px; }
.placeholder img { width: 52px; margin: 0 auto; }
.conversation-heading { background: white; display: flex; align-items: center; gap: 9px; padding: 12px; border-bottom: 1px solid var(--line); }
.chat-actions { margin-left: auto; display: flex; gap: 5px; }
.chat-actions button { padding: 6px 8px; }
.back { display: none; }
.messages { overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.message { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; max-width: min(88%, 650px); align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; }
.message.out { align-self: flex-end; background: #dff3d2; }
.message small { display: block; font-size: 11px; margin-top: 4px; }
.composer { background: white; border-top: 1px solid var(--line); padding: 9px 12px max(9px, env(safe-area-inset-bottom)); }
.composer form { display: flex; max-width: none; align-items: center; margin-top: 5px; }
.composer textarea { min-height: 44px; max-height: 120px; resize: vertical; }
.composer button { margin: 0; flex-shrink: 0; }
#notice { position: fixed; bottom: 16px; right: 16px; max-width: calc(100vw - 32px); border-radius: 10px; padding: 12px 16px; background: var(--green); color: white; box-shadow: 0 8px 24px #102b2330; z-index: 2; }
#notice.error { background: #922e30; }
@media (max-width: 700px) {
  .auth, .layout { display: block; }
  .auth-hero { gap: 22px; }
  .auth-hero small { display: none; }
  aside { gap: 12px; padding: 15px; }
  aside nav { display: flex; flex-wrap: wrap; }
  aside nav button { padding: 7px; }
  .nav-index { display: none; }
  .aside-bottom { display: flex; align-items: center; }
  .metrics { grid-template-columns: 1fr; gap: 0; }
  .inbox-grid { grid-template-columns: minmax(0, 1fr); }
  .inbox-grid:not(.has-chat) .conversation, .inbox-grid.has-chat .chat-list { display: none; }
  .inbox header { padding: 0 10px; gap: 7px; }
  .inbox .brand span { display: none; }
  .inbox header select { flex: 1; max-width: none; }
  .back { display: block; }
}
.composer .consent { display: flex; align-items: center; margin: 0; font-size: 12px; font-weight: 500; }
.composer .consent input { width: auto; }
.composer form[data-form="reply-template"] { flex-wrap: wrap; }
.composer form[data-form="reply-template"] select { flex: 1 1 160px; width: auto; }
