:root {
  color-scheme: light;
  font: 16px/1.5 "Inter", "Segoe UI", Arial, sans-serif;
  color: #172d3a;
  background: #f4f7f8;
  --ink: #172d3a;
  --navy: #132e3f;
  --muted: #536772;
  --line: #d4dfe3;
  --accent: #0a6473;
}
* { box-sizing: border-box; }
body { margin: 0; }
header {
  min-height: 64px;
  padding: 0 max(5vw, calc((100% - 1120px) / 2));
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--navy);
  color: #fff;
}
header form { margin-left: auto; }
.brand { font-weight: 720; letter-spacing: -.035em; white-space: nowrap; }
.product { padding-left: 18px; border-left: 1px solid #55717e; color: #d5e8ed; }
main { max-width: 1160px; margin: 40px auto; padding: 0 20px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.045em; }
h2 { margin-bottom: 14px; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }
button, input, textarea { font: inherit; }
button {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
button:hover { background: #064f5a; }
button:disabled { opacity: .55; cursor: wait; }
.secondary, .quiet { border-color: #b5c8cf; background: transparent; color: #24546a; }
.secondary:hover { background: #eff5f7; }
.quiet { border-color: #66828f; color: #fff; }
.quiet:hover { background: #29485a; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #067eac;
  outline-offset: 3px;
}
label { display: block; font-weight: 630; font-size: 14px; }
input:not([type=hidden]), textarea {
  width: 100%;
  margin: 5px 0 16px;
  padding: 10px 12px;
  border: 1px solid #9dabb2;
  border-radius: 5px;
  background: white;
  color: var(--ink);
}
textarea { display: block; resize: vertical; min-height: 72px; }
.welcome {
  max-width: 420px;
  margin: clamp(36px, 12vh, 140px) auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(20, 45, 61, .06);
}
.welcome h1 { margin-bottom: 26px; font-size: 31px; }
.welcome form + form { margin-top: 14px; }
.welcome button { width: 100%; }
.heading, .conversation, .list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.heading, .conversation { flex-wrap: wrap; }
.heading { margin-bottom: 20px; }
.heading h1, .conversation h2, .list-head h2 { margin: 0; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.badge { padding: 5px 12px; border-radius: 20px; background: #e0ecee; color: #285860; font-size: 13px; }
.sender, .empty-message { color: var(--muted); font-size: 14px; }
.desk { display: grid; grid-template-columns: minmax(210px, 30%) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
aside, section { padding: 22px; min-width: 0; }
aside { border-right: 1px solid var(--line); background: #fafcfc; }
.list-head { margin-bottom: 18px; }
.refresh { color: var(--accent); font-size: 13px; text-underline-offset: 3px; }
.thread { display: block; margin: 4px 0; padding: 12px 14px; text-decoration: none; border-radius: 7px; color: inherit; }
.thread strong, .thread span, .thread small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread span { color: var(--muted); font-size: 14px; }
.thread small, article small { font-size: 12px; color: #435e68; }
.thread:hover { background: #edf2f4; }
.thread.selected { background: #e3eff0; box-shadow: inset 3px 0 var(--accent); }
.messages { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; min-height: 170px; }
article { align-self: flex-start; max-width: 88%; padding: 10px 14px; border-radius: 8px; background: #f1f4f5; }
article.out { align-self: flex-end; background: #dff0ed; }
article p { margin: 3px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.conversation h2 { overflow-wrap: anywhere; }
.compose { padding-top: 17px; border-top: 1px solid var(--line); }
.notice, #connection-status:not([hidden]) { padding: 12px 5vw; background: #e5f1f2; color: #194455; }
.policy { max-width: 780px; padding: clamp(24px, 4vw, 46px); background: white; border: 1px solid var(--line); border-radius: 12px; }
.policy h1 { margin-bottom: 22px; }
.policy h2 { margin: 26px 0 8px; }
.policy li { margin-block: 14px; }
.policy a, .policy-links a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
.policy-return { display: inline-block; margin-top: 12px; }
.policy-links { padding: 0 20px 28px; }
.policy-links nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; font-size: 14px; }
.number-setup { max-width: 540px; margin-bottom: 24px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.number-setup p { color: var(--muted); font-size: 14px; }
@media (max-width: 660px) {
  header { padding: 0 16px; gap: 10px; }
  .product { padding-left: 10px; font-size: 14px; }
  main { margin: 22px auto; padding: 0 14px; }
  .welcome { margin: 40px 14px; }
  .desk { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); }
  .desk nav { max-height: 220px; overflow-y: auto; }
  aside, section { padding: 16px; }
  .messages { min-height: 100px; }
}
