:root {
  --brand-navy: #0d1c76;
  --brand-navy-deep: #001679;
  --brand-blue: #0170b9;
  --cloud-a: #7eb8e8;
  --cloud-b: #a8d4f5;
  --cloud-c: #c9e5fa;
  --ink: #3a3a3a;
  --muted: #5c6470;
  --surface: #f4f6fa;
  --surface-strong: #ffffff;
  --accent-amber: #f4af1a;
  --line: rgba(13, 28, 118, 0.12);
  --shadow: 0 18px 50px rgba(13, 28, 118, 0.12);
  --radius: 18px;
  --font: "Montserrat", "Avenir Next", "Segoe UI", sans-serif;
  --ticket-bar-size: 3.25rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--ticket-bar-size) + 0.35rem);
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(168, 212, 245, 0.55), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(126, 184, 232, 0.35), transparent 50%),
    linear-gradient(180deg, #eef5fb 0%, var(--surface) 45%, #e8eef8 100%);
  line-height: 1.5;
}

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.cloud {
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(
    circle at 30% 40%,
    rgba(255, 255, 255, 0.95),
    var(--cloud-b) 45%,
    rgba(126, 184, 232, 0.35) 100%
  );
  filter: blur(0.5px);
  opacity: 0.7;
  animation: drift 28s ease-in-out infinite;
}

.cloud-a {
  width: 280px;
  height: 90px;
  top: 8%;
  left: -5%;
  background: radial-gradient(
    circle at 40% 40%,
    #ffffff,
    var(--cloud-c) 50%,
    transparent 75%
  );
}

.cloud-b {
  width: 360px;
  height: 110px;
  top: 18%;
  right: -8%;
  animation-duration: 36s;
  animation-delay: -8s;
  opacity: 0.55;
}

.cloud-c {
  width: 220px;
  height: 70px;
  top: 42%;
  left: 55%;
  animation-duration: 32s;
  animation-delay: -14s;
  opacity: 0.4;
}

@keyframes drift {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(28px) translateY(-10px);
  }
}

.top,
.shell,
dialog {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1.15rem;
  animation: rise 0.7s ease both;
}

.brand {
  text-decoration: none;
  color: var(--brand-navy);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-mark {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.brand-sub {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-blue);
}

.kb-link {
  color: var(--brand-navy);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.kb-link:hover,
.kb-link:focus-visible {
  border-bottom-color: var(--accent-amber);
}

.shell {
  width: min(1480px, calc(100% - 2rem));
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  animation: rise 0.85s ease both;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.hero {
  flex: 0 0 auto;
  margin-bottom: 0.55rem;
}

.hero h1 {
  margin: 0 0 0.25rem;
  color: var(--brand-navy-deep);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 700;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
  font-size: 0.88rem;
  line-height: 1.35;
}

.chat-panel,
.articles-panel {
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
  min-height: 0;
  overflow: hidden;
}

.chat-panel {
  display: flex;
  flex-direction: column;
}

.mascot-slot {
  width: 72px;
  flex: 0 0 72px;
  align-self: flex-end;
}

.mascot {
  width: 72px;
  height: calc(72px * 52 / 92);
  transform-origin: 50% 85%;
  pointer-events: none;
}

.mascot-svg {
  display: block;
  width: 72px;
  height: calc(72px * 52 / 92);
}

.mascot-svg circle {
  transform-box: fill-box;
  transform-origin: center;
}

.mascot[data-state="idle"] .mascot-svg circle,
.mascot[data-state="greeting"] .mascot-svg circle,
.mascot[data-state="typing"] .mascot-svg circle {
  animation: mascot-blink 4.8s ease-in-out infinite;
}

.mascot[data-state="idle"],
.mascot[data-state="greeting"],
.mascot[data-state="typing"] {
  animation: mascot-bob 2.8s ease-in-out infinite;
}

.mascot[data-state="thinking"] {
  animation: mascot-wiggle 0.9s ease-in-out infinite;
}

.mascot[data-state="thinking"] .mascot-svg circle[r="4.7"],
.mascot[data-state="thinking"] .mascot-svg circle[r="1.786"] {
  animation: mascot-look 1.15s ease-in-out infinite;
}

.mascot[data-state="happy"] {
  animation: mascot-hop 0.7s ease;
}

.mascot[data-state="concerned"] .mascot-svg path[d="M39.3 7 Q42.5 9.6 45.7 7"] {
  transform-box: fill-box;
  transform-origin: center;
  transform: scaleY(-1);
}

@keyframes mascot-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes mascot-blink {
  0%,
  42%,
  50%,
  100% {
    transform: scaleY(1);
  }
  46% {
    transform: scaleY(0.12);
  }
}

@keyframes mascot-look {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(1.6px);
  }
}

@keyframes mascot-wiggle {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

@keyframes mascot-hop {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
  70% {
    transform: translateY(-1px);
  }
}

@media (max-width: 640px) {
  .mascot-slot {
    width: 56px;
    flex-basis: 56px;
  }

  .mascot,
  .mascot-svg {
    width: 56px;
    height: calc(56px * 52 / 92);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mascot,
  .mascot-svg circle {
    animation: none;
  }
}

.ticket-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  margin: 0;
  pointer-events: none;
}

.ticket-sheet,
.ticket-bar {
  pointer-events: auto;
  width: min(1480px, calc(100% - 2rem));
}

.ticket-sheet {
  display: flex;
  flex-direction: column;
  height: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--surface-strong);
  border: 0 solid transparent;
  border-radius: 18px 18px 0 0;
  transition: height 0.28s ease, max-height 0.28s ease;
}

.ticket-dock.is-open .ticket-sheet {
  height: calc(90vh - var(--ticket-bar-size));
  height: calc(90dvh - var(--ticket-bar-size));
  max-height: calc(90vh - var(--ticket-bar-size));
  max-height: calc(90dvh - var(--ticket-bar-size));
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: none;
  box-shadow: 0 -16px 40px rgba(13, 28, 118, 0.16);
  padding: 0.7rem 0.95rem 0.45rem;
}

@media (prefers-reduced-motion: reduce) {
  .ticket-sheet {
    transition: none;
  }
}

.ticket-dock.live .ticket-bar,
.ticket-dock.has-draft .ticket-bar {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(1, 112, 185, 0.18);
}

.ticket-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: var(--ticket-bar-size);
  padding: 0.35rem 0.85rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 18px rgba(13, 28, 118, 0.08);
  cursor: pointer;
}

.ticket-dock.is-open .ticket-bar {
  border-radius: 0;
  box-shadow: none;
  cursor: default;
}

.ticket-bar button {
  padding: 0.4rem 0.8rem;
}

.ticket-bar-copy {
  margin: 0;
  color: var(--brand-navy);
  font-weight: 600;
  font-size: 0.95rem;
}

.ticket-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.articles-panel {
  display: flex;
  flex-direction: column;
}

.articles-panel h2 {
  margin: 0 0 0.45rem;
  color: var(--brand-navy);
  font-size: 1.05rem;
  flex: 0 0 auto;
}

.article-search {
  flex: 0 0 auto;
  margin: 0 0 0.5rem;
}

.article-search input {
  width: 100%;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  border-radius: 12px;
}

.articles-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.articles-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.article-categories {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.35rem;
  margin: 0;
  min-height: 0;
}

.article-categories[hidden],
.articles-list[hidden],
.articles-empty[hidden] {
  display: none;
}

.article-categories a {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(1, 112, 185, 0.45);
  background: #fff;
  color: var(--brand-navy);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.article-categories a:hover,
.article-categories a:focus-visible {
  background: rgba(126, 184, 232, 0.22);
  color: var(--brand-navy);
}

.article-categories a:focus-visible,
.browse-all:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-amber) 80%, white);
  outline-offset: 1px;
}

.articles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.browse-all {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 0.55rem;
  color: var(--brand-blue);
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
}

.browse-all:hover,
.browse-all:focus-visible {
  color: var(--brand-navy);
}

.articles-list li {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.articles-list a,
.articles-list strong {
  color: var(--brand-navy);
  font-weight: 600;
  text-decoration: none;
}

.articles-list a:hover,
.articles-list a:focus-visible {
  color: var(--brand-blue);
}

.articles-list p {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-size: 0.88rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-navy);
  flex: 1;
  min-width: 220px;
}

select,
textarea,
input {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: #fff;
}

select:focus,
textarea:focus,
input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent-amber) 80%, white);
  outline-offset: 1px;
  border-color: var(--brand-blue);
}

.messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.35rem 0.15rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.msg {
  max-width: 92%;
  animation: fade-in 0.35s ease both;
}

.msg.user {
  align-self: flex-end;
  text-align: right;
}

.msg.assistant {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 0.45rem;
  row-gap: 0.35rem;
  max-width: min(100%, 42rem);
}

.msg.assistant > :not(.mascot-slot):not(.bubble) {
  flex: 1 1 100%;
  margin-left: calc(72px + 0.45rem);
}

.msg.assistant .bubble {
  flex: 1 1 0;
  min-width: 0;
}

.msg.assistant .bubble.is-typing::after {
  content: "…";
  letter-spacing: 0.08em;
}

.msg .bubble {
  display: inline-block;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  white-space: pre-wrap;
  text-align: left;
}

.msg.user .bubble {
  background: var(--brand-navy);
  color: #fff;
}

.msg.assistant .bubble {
  background: rgba(126, 184, 232, 0.18);
  border: 1px solid rgba(1, 112, 185, 0.18);
  white-space: normal;
}

.msg.assistant .bubble p {
  margin: 0 0 0.55em;
}

.msg.assistant .bubble p:last-child {
  margin-bottom: 0;
}

.msg.assistant .bubble ul,
.msg.assistant .bubble ol {
  margin: 0.15em 0 0.55em;
  padding-left: 1.25em;
}

.msg.assistant .bubble li + li {
  margin-top: 0.2em;
}

.msg.assistant .bubble a {
  color: var(--brand-blue);
}

.msg .meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.msg .meta a {
  color: var(--brand-blue);
}

.feedback {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.4rem;
}

.feedback .thumb {
  border: 1px solid rgba(1, 112, 185, 0.35);
  background: #fff;
  color: var(--brand-navy);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.feedback .thumb[aria-pressed="true"] {
  background: var(--brand-navy);
  color: #fff;
}

.feedback-missing {
  flex-basis: 100%;
  display: grid;
  gap: 0.35rem;
  max-width: 28rem;
}

.feedback-missing[hidden] {
  display: none;
}

.feedback-missing label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--brand-navy);
}

.feedback-missing textarea {
  width: 100%;
  min-height: 3.2rem;
  font: inherit;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feedback-note {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: end;
}

.photo-hint {
  color: var(--muted);
  font-size: 0.75rem;
}

.photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-basis: 100%;
}

.photo-list:empty {
  display: none;
}

.photo-list li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.45rem 0.1rem 0.15rem;
  background: #fff;
}

.photo-list img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 999px;
}

.photo-list button {
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
}

.composer {
  flex: 0 0 auto;
}

.composer textarea {
  resize: none;
  min-height: 52px;
  max-height: 7rem;
}

button {
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  cursor: pointer;
  background: var(--brand-navy);
  color: #fff;
  transition: transform 0.15s ease, background 0.15s ease;
}

button:hover {
  background: var(--brand-navy-deep);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.ghost {
  background: transparent;
  color: var(--brand-navy);
  border: 1px solid var(--line);
}

button.ghost:hover {
  background: rgba(126, 184, 232, 0.15);
}

.status {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.status.error {
  color: #9b1c1c;
}

.status.ok {
  color: #0f6b3a;
}

.ticket-form .status.ok {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  background: #e6f4ec;
  border: 2px solid #0f6b3a;
  border-radius: 8px;
}

.ticket-form .status.ok a.view-ticket {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.75rem 1.1rem;
  background: var(--brand-navy);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
}

.ticket-form .status.ok a.view-ticket:hover {
  background: var(--brand-navy-deep);
}

.ticket-form .status.ok a.view-ticket:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
}

#submit-ticket.submitted,
#submit-ticket:disabled {
  background: #b8bec8;
  border-color: #b8bec8;
  color: #4a505a;
  cursor: not-allowed;
}

.status.searching {
  color: var(--brand-navy);
  font-weight: 600;
}

.status-label {
  background-image: linear-gradient(
    100deg,
    var(--brand-navy) 0%,
    var(--brand-navy) 36%,
    var(--brand-blue) 48%,
    var(--cloud-b) 54%,
    var(--brand-navy) 66%,
    var(--brand-navy) 100%
  );
  background-size: 220% 100%;
  background-position: 100% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: status-shimmer 2.4s ease-in-out infinite;
}

.status-dots {
  display: inline-block;
  width: 1.35em;
  margin-left: 0.05em;
  color: var(--brand-blue);
}

.status-dots span {
  display: inline-block;
  opacity: 0.25;
  animation: status-dot 1.4s ease-in-out infinite;
}

.status-dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.status-dots span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes status-shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes status-dot {
  0%,
  70%,
  100% {
    opacity: 0.25;
  }
  35% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-label,
  .status-dots span {
    animation: none;
  }

  .status-label {
    background: none;
    color: var(--brand-navy);
  }

  .status-dots span {
    opacity: 0.85;
    color: var(--brand-blue);
  }
}

.ticket-form[hidden] {
  display: none;
}

.ticket-open,
.msg .ticket-yes {
  font-size: 0.9rem;
  padding: 0.45rem 0.8rem;
}

.msg .ticket-yes {
  margin-top: 0.45rem;
}

.ticket-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.ticket-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 0.35rem;
}

.ticket-fields > label {
  min-width: 0;
  gap: 0.2rem;
  font-size: 0.75rem;
}

.ticket-fields > label[hidden] {
  display: none;
}

/* Media takes the full row when it has no item dropdown beside it. */
.ticket-fields > .ticket-media-label:has(+ label[hidden]) {
  grid-column: 1 / -1;
}

.field-hint {
  color: #9a5b00;
  font-size: 0.7rem;
  line-height: 1.3;
}

.field-hint[hidden] {
  display: none;
}

.ticket-fields input,
.ticket-fields select,
.ticket-fields textarea {
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
}

.ticket-fields h2,
.ticket-help,
.ticket-mode,
.ticket-gap,
.ticket-note-label {
  grid-column: 1 / -1;
}

.ticket-form h2 {
  margin: 0;
  color: var(--brand-navy);
  font-size: 1.08rem;
}

.ticket-mode {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(126, 184, 232, 0.35);
  color: var(--brand-navy);
  font-weight: 600;
}

.ticket-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.ticket-note-label textarea {
  height: 4.4rem;
  min-height: 4.4rem;
  resize: vertical;
}

.ticket-gap {
  margin: 0;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.ticket-gap h3 {
  margin: 0 0 0.35rem;
  color: var(--brand-navy);
  font-size: 0.95rem;
}

.ticket-gap pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  font-size: 0.85rem;
  max-height: 9rem;
  overflow: auto;
}

.ticket-form .status {
  flex: 0 0 auto;
  margin: 0.2rem 0 0;
}

.ticket-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0;
  padding: 0.5rem 0 0.1rem;
  background: var(--surface-strong);
  border-top: 1px solid var(--line);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-height: 640px) {
  .articles-panel {
    overflow: auto;
  }

  .articles-body {
    flex: 1 0 auto;
    min-height: 2.75rem;
  }
}

@media (max-height: 760px) {
  .top {
    padding: 0.35rem 0.85rem;
  }

  .brand-mark {
    font-size: 1.35rem;
  }

  .hero {
    margin-bottom: 0.35rem;
  }

}

@media (max-width: 860px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.4fr) minmax(0, 0.85fr);
  }

  .ticket-sheet,
  .ticket-bar {
    width: 100%;
  }

  .ticket-sheet,
  .ticket-bar,
  .ticket-dock.is-open .ticket-bar {
    border-radius: 0;
  }

  .ticket-dock.is-open .ticket-sheet {
    height: calc(100vh - var(--ticket-bar-size));
    height: calc(100dvh - var(--ticket-bar-size));
    max-height: calc(100vh - var(--ticket-bar-size));
    max-height: calc(100dvh - var(--ticket-bar-size));
  }

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

  .ticket-bar {
    align-items: center;
  }

  .ticket-bar-copy {
    font-size: 0.88rem;
  }
}

@media (max-width: 640px) {
  .article-search input {
    font-size: 16px;
  }

  .article-categories {
    gap: 0.3rem;
  }

  .article-categories a {
    font-size: 0.72rem;
    padding: 0.18rem 0.5rem;
  }

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

  .msg.assistant {
    column-gap: 0.35rem;
  }

  .msg.assistant > :not(.mascot-slot):not(.bubble) {
    margin-left: calc(56px + 0.35rem);
  }
}

/* Quick replies under a flow question. */
.msg.assistant > .quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.quick-replies button {
  border: 1px solid rgba(1, 112, 185, 0.45);
  background: #fff;
  color: var(--brand-navy);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}

.quick-replies button:hover,
.quick-replies button:focus-visible {
  background: rgba(126, 184, 232, 0.22);
}

.quick-replies button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-amber) 80%, white);
  outline-offset: 1px;
}

.quick-replies button.quick-open {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #fff;
}

.quick-replies button.quick-open:hover,
.quick-replies button.quick-open:focus-visible {
  background: var(--brand-navy-deep);
}

.quick-replies button:disabled {
  opacity: 0.45;
}

.quick-replies button[aria-pressed="true"] {
  opacity: 0.8;
  background: rgba(126, 184, 232, 0.35);
  color: var(--brand-navy);
}

/* Claim fields in the ticket drawer. */
.ticket-fields > .claim-only[hidden],
.ticket-fields > .printer-field[hidden] {
  display: none;
}

.ticket-fields > .claim-wide {
  grid-column: 1 / -1;
}

.ticket-fields #ticket-description {
  height: 3.3rem;
  min-height: 3.3rem;
  resize: vertical;
}

.claim-photos {
  margin: 0;
  padding: 0.5rem 0.75rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.claim-photos legend {
  padding: 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-navy);
}

.claim-photos .required-note {
  color: #9a5b00;
  font-weight: 600;
}

.claim-photos-help {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.claim-photos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.claim-photos-row button {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.claim-photos .photo-list .file-badge {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--cloud-c);
  color: var(--brand-navy);
  font-size: 0.6rem;
  font-weight: 700;
}

.ticket-fields .check-label {
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  color: var(--ink);
  min-width: 0;
}

.ticket-fields .check-label input {
  width: 1rem;
  height: 1rem;
  padding: 0;
}

.claim-photos.needs-photo {
  border-color: #9a5b00;
}
