:root {
  --bg: #f4f7fa;
  --surface: #fff;
  --ink: #152638;
  --muted: #667687;
  --line: #e0e7ee;
  --blue: #1669a8;
  --pale: #e9f4ff;
  --brand: #66baff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.5 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
button,
a.button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button,
.button {
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button.primary,
.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
button:hover:not(:disabled),
.button:hover {
  border-color: var(--blue);
}
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding-left: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
}
h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
small,
.caption {
  font-size: 12px;
  line-height: 18px;
}
.muted,
small {
  color: var(--muted);
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  padding: 32px 18px 24px;
  background: white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: auto;
}
.brand {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  gap: 4px;
}
.brand strong {
  font-size: 28px;
  color: var(--blue);
  line-height: 36px;
}
.sidebar nav > a,
.sidebar nav div > a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px;
  border-radius: 8px;
  color: var(--muted);
  margin: 4px 0;
}
.sidebar nav a.active {
  color: var(--blue);
  background: var(--pale);
}
img.icon,
nav img {
  width: 20px;
  height: 20px;
  flex: none;
}
#project-context {
  margin-top: 22px;
}
#project-name {
  font-size: 17px;
  font-weight: 600;
  margin: 12px 0 16px;
  overflow-wrap: anywhere;
}
.profile {
  display: flex;
  gap: 12px;
  align-items: center;
}
.profile div {
  min-width: 0;
}
.profile strong {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.profile small {
  display: block;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pale);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex: none;
}
.content {
  margin-left: 240px;
  padding: 32px 4.44vw;
  max-width: 1800px;
}
.context {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0;
}
.heading p {
  color: var(--muted);
  margin-top: 8px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.filters {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tabs button[aria-pressed="true"] {
  background: var(--pale);
  border-color: var(--pale);
  color: var(--blue);
}
label {
  display: block;
}
input:not([type="checkbox"]),
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
label input {
  margin-top: 6px;
}
.search {
  width: 330px;
  max-width: 100%;
}
.project-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}
.project-row .description {
  flex: 1;
  min-width: 0;
}
.project-row h2 {
  overflow-wrap: anywhere;
}
.project-row p {
  color: var(--muted);
  margin-top: 8px;
}
.badge {
  font-size: 12px;
  display: inline-block;
  border-radius: 8px;
  padding: 4px 8px;
  background: var(--pale);
  color: var(--blue);
  white-space: nowrap;
}
.badge:empty {
  display: none;
}
.empty {
  padding: 48px 24px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
}
#notice {
  padding: 12px 16px;
  border: 1px solid #e6c78e;
  border-radius: 8px;
  background: #fff6e6;
  margin-bottom: 16px;
}
#notice.error {
  color: #9d3b29;
}
.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  gap: 24px;
}
.thread {
  display: flex;
  flex-direction: column;
  height: min(760px, calc(100dvh - 200px));
  min-height: 480px;
  gap: 16px;
}
.thread-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.thread-head small {
  display: block;
  margin-top: 4px;
}
.messages {
  overflow: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  scrollbar-gutter: stable;
}
.message {
  display: flex;
  gap: 12px;
}
.message-content {
  flex: 1;
  min-width: 0;
}
.message-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 6px;
}
.message-meta strong {
  font-weight: 500;
}
.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.attachment {
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 100%;
  width: 350px;
  color: var(--ink);
  background: white;
}
.attachment div {
  flex: 1;
  min-width: 0;
}
.attachment strong {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.attachment small {
  display: block;
}
.photo {
  display: block;
  max-width: 240px;
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  margin-top: 8px;
}
.composer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.composer textarea {
  resize: vertical;
  min-height: 80px;
  max-height: 200px;
}
.composer .row {
  margin-top: 10px;
}
.composer input[type="file"] {
  display: none;
}
.composer small {
  display: block;
  margin-top: 12px;
}
.uploads {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}
.upload {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  background: var(--bg);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.upload button {
  padding: 2px 8px;
  min-height: 28px;
}
.rail .card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rail p {
  color: var(--muted);
}
.settings {
  max-width: 928px;
}
.settings .card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.settings hr {
  margin: 0;
}
.settings input[type="email"] {
  max-width: 600px;
}
.settings .switch {
  width: 44px;
  height: 24px;
  accent-color: var(--blue);
}
.settings .row label {
  flex: none;
}
.status-line {
  margin-bottom: 24px;
}
.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr));
  gap: 16px;
}
.file-list .attachment {
  width: 100%;
}
.dashboard {
  width: 100%;
  height: calc(100dvh - 190px);
  min-height: 600px;
  border: 0;
  border-radius: 12px;
  background: var(--bg);
}
.skip {
  position: fixed;
  left: 250px;
  top: -100px;
  padding: 12px;
  background: white;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}
[hidden] {
  display: none !important;
}
.older {
  align-self: center;
  flex: none;
}
.footer-note {
  margin-top: 24px;
  color: var(--muted);
}
@media (max-width: 1200px) {
  .content {
    padding: 28px;
  }
  .chat-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    display: none;
  }
  .thread {
    height: calc(100dvh - 185px);
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .brand {
    display: block;
  }
  .brand span,
  .brand small {
    display: none;
  }
  .brand strong {
    font-size: 22px;
  }
  .sidebar hr,
  .sidebar .profile,
  .sidebar #project-context > small,
  .sidebar #project-name {
    display: none;
  }
  .sidebar > div:first-child {
    display: contents;
  }
  .sidebar nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
  }
  .sidebar nav > a,
  .sidebar nav div > a {
    font-size: 12px;
    min-height: 40px;
    padding: 8px;
    gap: 5px;
    white-space: nowrap;
  }
  .sidebar nav img {
    width: 20px;
    height: 20px;
  }
  .sidebar #project-context {
    display: contents;
    margin: 0;
  }
  .sidebar-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar-bottom nav {
    display: flex;
  }
  .sidebar #admin-link {
    font-size: 11px;
  }
  .content {
    margin-left: 0;
    padding: 20px 16px;
  }
  .context {
    font-size: 11px;
  }
  .context #sync {
    display: none;
  }
  .heading {
    margin: 18px 0;
  }
  .heading h1 {
    font-size: 24px;
  }
  .heading > .button {
    display: none;
  }
  .card {
    padding: 16px;
  }
  .project-row {
    flex-wrap: wrap;
    gap: 12px;
  }
  .project-row .description {
    flex-basis: 100%;
  }
  .project-row h2 {
    font-size: 18px;
  }
  .project-row .button {
    margin-left: auto;
  }
  .chat-layout {
    display: block;
  }
  .thread {
    height: calc(100dvh - 280px);
    min-height: 490px;
    gap: 12px;
  }
  .message {
    gap: 8px;
  }
  .message .avatar {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
  .messages {
    gap: 20px;
  }
  .attachment {
    width: 100%;
  }
  .composer .row {
    gap: 6px;
  }
  .composer .row button {
    font-size: 13px;
    padding: 8px 10px;
  }
  .settings .row {
    align-items: start;
  }
  .settings h2 {
    font-size: 18px;
  }
  .filters .search {
    width: 100%;
  }
  .status-line {
    flex-wrap: wrap;
  }
  .dashboard {
    height: calc(100dvh - 250px);
  }
  .skip {
    left: 16px;
  }
  .photo {
    max-width: 100%;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 760px) {
  .sidebar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 12px 16px;
  }
  .brand {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  .sidebar > div:first-child > nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
  }
  .sidebar nav > a,
  .sidebar nav div > a {
    padding: 6px;
    gap: 4px;
  }
  .sidebar-bottom {
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
  }
  .sidebar-bottom a[data-page="settings"] {
    font-size: 0;
    gap: 0;
  }
  .sidebar-bottom #admin-link {
    display: none !important;
  }
}
